function lockPage(){
	$("select").css({ visibility:"hidden"});
	$("body").append("<div id='pageLock'><img class=\"page_loading\" src='"+themeUrl+"/images/loadingAnimation.gif' /></div>");
	
	return overlaySize();
	
}
function overlaySize(){ 
	if (window.innerHeight && window.scrollMaxY || window.innerWidth && window.scrollMaxX) {  
		yScroll  = window.innerHeight + window.scrollMaxY;
		xScroll  = window.innerWidth + window.scrollMaxX;
		var deff = document.documentElement;
		var wff  = (deff&&deff.clientWidth) || document.body.clientWidth || window.innerWidth || self.innerWidth;
		var hff  = (deff&&deff.clientHeight) || document.body.clientHeight || window.innerHeight || self.innerHeight;
		xScroll -= (window.innerWidth - wff);
		yScroll -= (window.innerHeight - hff);
	}else if (document.body.scrollHeight > document.body.offsetHeight || document.body.scrollWidth > document.body.offsetWidth){ // all but Explorer Mac
		yScroll  = document.body.scrollHeight;
		xScroll  = document.body.scrollWidth;
	}else{ // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		yScroll  = document.body.offsetHeight;
		xScroll  = document.body.offsetWidth;
	}
	
	
	$("#pageLock").css({"height": yScroll, "width": xScroll});
	return xScroll;
}
function unlockPage() {
	$("select").css({ visibility:"visible"});
	$("#pageLock").remove();
}
function alignPopupWin(winName,width){
	try{
		
		var swidth = $(window).width();
		
		var leftWidth = ((swidth-510)/2 )+"px";
		var leftWidth1 = ((swidth-705)/2 )+"px";
		var leftWidth2 = ((swidth-930)/2 )+"px";
		var leftWidth3 = ((swidth-760)/2 )+"px";
		
		//document.getElementById(winName).css({"left":leftWidth});
		$("#popWindow").css({"left":leftWidth});
		$("#popWindow1").css({"left":leftWidth1});
		$("#popWindow2").css({"left":leftWidth2});
		$("#popWindow3").css({"left":leftWidth3});
		//$("#"+winName).css({"left":leftWidth});
	}catch(e){
		
	}
}
