/**打开覆盖层**/
function openWebBgLayer(){
	if(document.getElementById('lotteryContents')!= null){
		document.getElementById('lotteryContents').style.display = "none";
	}
	var webBgLayer = document.getElementById("webBgLayer");
	var bodyHeight = getMaskHight();
	webBgLayer.style.height = bodyHeight+"px";//设置高
	webBgLayer.style.width = "100%";
	webBgLayer.style.display = "block";
	//alert("屏幕可用工作区高度:"+window.screen.availHeight );
	//alert("已卷去高："+document.body.scrollTop); 0
	if(getOs() != 'IE6'){
		webBgLayer.style.left = 0+"px";
	}
	//alert("全文高："+document.body.scrollHeight );
}

/**登录过程中**/
function displayLoginSuccess(){
	if(!validateQuickLogin()){
		return false;
	}
	document.getElementById("noDisplayButton").style.display = "block";
	document.getElementById("showDisplayButton").style.display = "none";
	window.frames["iframeLogin"].document.getElementById("userName").value = document.getElementById("quickUserName").value;
	window.frames["iframeLogin"].document.getElementById("pwd").value = document.getElementById("quickPwd").value;
	window.frames["iframeLogin"].document.getElementById("authCode").value = document.getElementById("quickAuthCode").value;
	window.frames["iframeLogin"].document.getElementById("model").value = "1";
	window.frames["iframeLogin"].document.forms[0].submit();
}

function getMaskHight() {
	var h = 0;
	if (document.body.scrollHeight > document.body.clientHeight) {
		h = document.body.scrollHeight;
	} else {
		h = document.body.clientHeight;
	}
	return h;
}

<!--sleep-->
function Sleep(obj,iMinSecond)
{
	if(window.eventList==null)
	window.eventList=new Array();
	var ind=-1;
	for (var i=0;i<window.eventList.length;i++)
	{  
		if (window.eventList[i]==null){
			window.eventList[i]=obj;ind=i;break;
		}
	}
	if (ind==-1){  
	    ind=window.eventList.length;  
	    window.eventList[ind]=obj;
   	}
   	setTimeout("GoOn(" + ind + ")",iMinSecond);
}
function GoOn(ind)
{
   var obj = window.eventList[ind];
   window.eventList[ind] = null;
   if (obj.NextStep) obj.NextStep();
   else obj();
}

/**浏览器类型**/
function getOs(){
    var OsObject = "";
	if(navigator.userAgent.indexOf("MSIE")>0) {
		if(/MSIE 6.0/ig.test(navigator.appVersion) ) {
			return "IE6";
		}if(/MSIE 7.0/ig.test(navigator.appVersion) ) {
			return "IE7";
		}
		return "MSIE";
	}
	if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){
		return "Firefox";
	}
	if(isSafari=navigator.userAgent.indexOf("Safari")>0) {
		return "Safari";
	} 
	if(isCamino=navigator.userAgent.indexOf("Camino")>0){
		return "Camino";
	}
	if(isMozilla=navigator.userAgent.indexOf("Gecko/")>0){
		return "Gecko";
	}
}
/**对弹出层进行控制**/
function showPopUp(id,idWidth,idHeight){
	var getWindowSize = function(){
		if(self.innerHeight){
			return {'width':self.innerWidth,'height':self.innerHeight};
		}else if(document.documentElement && document.documentElement.clientHeight){
			return {
				'width':document.documentElement.clientWidth,
				'height':document.documentElement.clientHeight
			};
		}else if(document.body){
			return {
				'width':document.body.clientWidth,
				'height':document.body.clientHeight
			};
		}
	};
	var de = document.documentElement;
	var windowSize = getWindowSize();
	//alert("浏览器高度："+windowSize.height);
	var div = document.getElementById(id);
	//alert("浏览器宽度："+windowSize.width);
	div.style.left = Math.ceil((windowSize.width - idWidth) / 2) + 'px';
	//alert(Math.ceil((windowSize.width - idWidth) / 2));
	div.style.top = de.scrollTop + Math.ceil((windowSize.height - idHeight) / 2) + 'px';
	if(windowSize.height>idHeight){//客户端浏览器如果高度大于弹出框高度。自动居中
		window.onscroll = function(){
			div.style.top = de.scrollTop + Math.ceil((windowSize.height - idHeight) / 2) + 'px';
		};
	}
}

//隐藏登陆页面的回车登陆
function hiddenLoginIsKeyCode13(event){
	if(keyCode13(event)){
		displayLoginSuccess();
	}else{
		return false;
	}
}

//判断用户是否使用了回车键
function keyCode13(event){
	if(event.keyCode == 13){
    	return true;
    }else{
    	return false;
    }
}
/**暂时无开放**/
function showTip()
{
	alert("内部公测中，请等待...");
	return false;
}
