﻿// JScript 文件

function relogin() {
    divDisplayUserOut.style.display = '';
    setDivWidthAndHeight('divYouQingTopByUserOut');
    //setFloatPos('divYouQingMessageByUserOut');
    setIframeWidthAndHeight('ifmByUserOut', 'divYouQingTopByUserOut');
}	

function logout() {
    divDisplayUserExit.style.display = '';
    setDivWidthAndHeight('divYouQingTopByUserExit');
    //setFloatPos('divYouQingMessageByUserExit');
    setIframeWidthAndHeight('ifmByUserExit', 'divYouQingTopByUserExit');
}   

function setDivWidthAndHeight(divName){
    document.getElementById(divName).style.width=document.body.clientWidth;
    document.getElementById(divName).style.height=document.body.clientHeight;
}

function sc11(divName){
 document.getElementById(divName).style.top=(document.documentElement.scrollTop+(document.documentElement.clientHeight-document.getElementById(divName).offsetHeight)/2)+"px";
 document.getElementById(divName).style.left = (document.documentElement.scrollLeft + (document.documentElement.clientWidth - document.getElementById(divName).offsetWidth) / 2) + "px";

}

function sc1(){
    var divName = "divYouQingMessageBySubmit"; //document.getElementById('divYouQingMessageName').innerHTML;
 if (document.getElementById(divName) != null) {
 document.getElementById(divName).style.top=(document.documentElement.scrollTop+(document.documentElement.clientHeight-document.getElementById(divName).offsetHeight)/2)+"px";
 document.getElementById(divName).style.left=(document.documentElement.scrollLeft+(document.documentElement.clientWidth-document.getElementById(divName).offsetWidth)/2)+"px";
 }
}

function scall(){
 sc1();sc2();sc3();sc4();sc5();
}


function setFloatPos(floatDiv){

//var s = "";
//s += "\r\n网页可见区域宽："+ document.body.clientWidth;
//s += "\r\n网页可见区域高："+ document.body.clientHeight;
//s += "\r\n网页可见区域宽："+ document.body.offsetWidth +" (包括边线的宽)";
//s += "\r\n网页可见区域高："+ document.body.offsetHeight +" (包括边线的宽)";
//s += "\r\n网页正文全文宽："+ document.body.scrollWidth;
//s += "\r\n网页正文全文高："+ document.body.scrollHeight;
//s += "\r\n网页被卷去的高："+ document.body.scrollTop;
//s += "\r\n网页被卷去的左："+ document.body.scrollLeft;
//s += "\r\n网页正文部分上："+ window.screenTop;
//s += "\r\n网页正文部分左："+ window.screenLeft;
//s += "\r\n屏幕分辨率的高："+ window.screen.height;
//s += "\r\n屏幕分辨率的宽："+ window.screen.width;
//s += "\r\n屏幕可用工作区高度："+ window.screen.availHeight;
//s += "\r\n屏幕可用工作区宽度："+ window.screen.availWidth;

    var objstyle=document.getElementById(floatDiv).style;
    document.getElementById(floatDiv).style.left=parseInt((document.body.clientWidth-400)/2);
    document.getElementById(floatDiv).style.top=parseInt((document.body.clientHeight-260)/2) + document.body.scrollTop; 
}

function setIframeWidthAndHeight(ifmName, divName){
    document.getElementById(ifmName).style.width=document.getElementById(divName).style.width;
    document.getElementById(ifmName).style.height=document.getElementById(divName).style.height;
}



function GetCurrentTime()
    {
        setInterval("jnkc.innerHTML='当前时间：' +new Date().getFullYear()+ '年'+(new Date().getMonth()+1)+ '月'+new Date().getDate()+ '日'+' 星期'+'日一二三四五六'.charAt(new Date().getDay())+'&nbsp;'+new Date().getHours()+ ':'+new Date().getMinutes()+':'+new Date().getSeconds();",1000);
    }
    function relogin(){
		if(confirm("您确定要重新登录吗？"))
			parent.location="AdminDefault.aspx?AdminPageCode=ReLogin";
	}	
	
	function logout(){
		if(confirm("您确定要退出系统吗？"))
		{
			location="AdminDefault.aspx?AdminPageCode=LoginExit";
		}
	}   
