﻿var D=document,G="getElementById",G_Name="getElementsByName",G_TagName="getElementsByTagName";
document.writeln("<div id=\"layers\" style=\"position:absolute;z-index:2121;background:#000;top:0px;left:0px;display:none;\"><\/div><div id=\"layers_win\" style=\"position:absolute;z-index:2122;top:0px;left:0px;display:none;\"><iframe id=\"ifrs\" scrolling=\"no\" width=\"335\" height=\"188\" frameborder=\"no\"></iframe><\/div>");
var infoObj_W=335,infoObj_H=188;//框的初始宽度、高度
var paddingPix=40;
function getClient(){
	var wclienth=(window.innerHeight) ? window.innerHeight : (document.documentElement && document.documentElement.clientHeight) ? document.documentElement.clientHeight : document.body.offsetHeight;
	var wclientw=(window.innerWidth) ? window.innerWidth : (document.documentElement && document.documentElement.clientWidth) ? document.documentElement.clientWidth : document.body.offsetWidth;
	return [wclientw,wclienth];
}
function getScroll(){
	var scrollPosy=0;
	var scrollPosx=0;
	if (typeof window.pageYOffset != 'undefined'){
	   scrollPosy = window.pageYOffset;
	   scrollPosx = window.pageXOffset;
	}else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat'){
	   scrollPosy = document.documentElement.scrollTop;
	   scrollPosx = document.documentElement.scrollLeft;
	}else if (typeof document.body != 'undefined'){
	   scrollPosy = document.body.scrollTop;
	   scrollPosx = document.body.scrollLeft;
	}
	return [scrollPosx,scrollPosy];
}
function showLays(ifrUrl,needwin){
	if (typeof arguments[1] == 'undefined'){needwin=true;}
	if(!needwin && Is_clt==1){
		document.location.href="ydlogin://";
	}else{
		//document.documentElement.style.overflowY="hidden";//干掉滚动条
		var sWidth=document.body.scrollWidth;
		if(Is_clt!=1){var footers=document.getElementById("footers").clientHeight;}else{var footers=0;}
		if(navigator.userAgent.toLowerCase().indexOf("msie") != -1){var sHeight=document.body.scrollHeight;}
		else{var sHeight=document.getElementById("mainBody").clientHeight+document.getElementById("headers").clientHeight+footers;}
		var bgObj=D[G]("layers");//遮罩背景div层
		bgObj.style.width=sWidth+"px";
		bgObj.style.height=sHeight+"px";
		bgObj.style.display="";
		//bgObj.style.filter ="Alpha(opacity=50)";
		//bgObj.style.opacity="0.5";
		showAlpha();
		var ifObj=D[G]("layers_win");//显示信息层
		D[G]("ifrs").src=ifrUrl;
		ifObj.style.display="";
		var cltsize=getClient();	
		var srlpos=getScroll();
		var x=(cltsize[0]-(infoObj_W+paddingPix))/2+srlpos[0];
		var y=(cltsize[1]-(infoObj_H+paddingPix))/2+srlpos[1];
		ifObj.style.top=y+"px";
		ifObj.style.left=x+"px";
	}
}
function closeLay(id1,id2){//关闭弹出信息层
	//document.documentElement.style.overflowY="scroll";
	document.getElementById(id1).style.display='none';
	document.getElementById(id2).style.display='none';
}

