function G(id){return document.getElementById(id);}

var popLoaded=false;

function showPop(url){

		var objSha = G("shadowDiv");
		objSha.style.height = document.body.scrollHeight+"px";
		objSha.style.width= document.body.scrollWidth+"px";
		objSha.style.left = 0;
		objSha.style.top = 0;
		
		/*if(!popLoaded){
			
 			try{
 				G("ifr").src= url;
				popLoaded=true;
 			}catch(e)
 			{
 				try{
 					document.frames["ifr"].location = url;
 					popLoaded=true;
				}catch(e){
					popLoaded=false;
				}
 			}
		}*/


		if(!popLoaded){
 			try{
 				G("ifr").src= url;
 			}catch(e)
 			{
 				document.frames["ifr"].location = url;
 			}
		}

		var objPop = G("popDiv");
		var sClientWidth = document.body.clientWidth;
		var sClientHeight = document.body.clientHeight;
		var sScrollTop = document.body.scrollTop;
		var sleft = (document.body.clientWidth / 2) - 0;
		var iTop = -80 + (sClientHeight / 2 + sScrollTop) - 0;
		var sTop = iTop > 0 ? iTop : (sClientHeight / 2 + sScrollTop) - 225;
		if(sTop < 1) sTop="20px";
		if(sleft < 1) sleft="20px";
				
		if(screen.width < 801){

			objPop.style.left = "20px";
			objPop.style.top = "20px";	
			objPop.style.height = "350px";

		}else if(screen.width > 1024){

			objPop.style.left = "300px";
			objPop.style.top = "170px";
			objPop.style.height = "550px";

		}else{		
			
			objPop.style.left = "180px";
			objPop.style.top = "120px";
			objPop.style.height = "500px";
		}

		objSha.style.display = "";
		objPop.style.display = "";

}

function hidePop(){

		G("popDiv").style.display = "none";
		G("shadowDiv").style.display = "none";

		
}
