function becomePopupOnCenter(targetDivId, popupTitle)   
{	
		targetDiv = $('#' + targetDivId);

		titleHtml = '<div id="popupDivTitle' + targetDivId + '" class="popupDivTitle">' + 
			'<div id="popupDivTitleText'+targetDivId+'" class="popupDivTitleText">' + popupTitle + '</div>' + 
			'<img src="' + SGL_JS_WEBROOT + '/themes/' + SGL_JS_THEME + 
			'/images/popupDivTitle_close.gif" id="popupDivTitleClose'+targetDivId+'" class="popupDivTitleClose"/></div>';
		
		targetDiv.css("opacity", 0);
        targetDiv.css("display", "block");
        targetDiv.addClass('popupDivContainer');
        
        //popupDivTitle.inject(targetDiv, 'top');
        targetDiv.before(titleHtml);
        popupDivTitle = $('#popupDivTitle' + targetDivId);
        targetDiv.prepend($(popupDivTitle));
        
        popupDivTitlePos = popupDivTitle.position();
		targetDiv.css('padding-top', '+' + (popupDivTitle.height() + 4) + 'px');
        	        
		targetPos = targetDiv.position();
        
		targetDiv.css('position', 'fixed');
		targetDiv.css('margin-left', 'auto');
		targetDiv.css('margin-right', 'auto');
		targetDiv.css('left', $(window).width() / 2 - 25);
		targetDiv.css('top', 200);
		targetDiv.css('width', 50);
		
		targetDiv.draggable({cursor: 'move'});
		
		targetDiv.animate({
		    		'width': 600, //morphToWidth,
		    		'left': $(window).width() / 2 - 300,//mopthToLeft,
					'opacity': 100
		});
		
		$('#popupDivTitleClose'+targetDivId).click(function() {
			$('#' + targetDivId).css("display", "none");
			$('#popupDivTitle' + targetDivId).remove();        
    	});

}

