﻿	
//登录窗口
function OpenLayer(LayerName){
    document.getElementById('AreaFrame').style.display = 'block';
	document.getElementById(LayerName).style.display='block';
	JobEMSShieldDIV();
}
//屏蔽操作
function JobEMSShieldDIV()
{
    if(document.body.clientHeight>screen.height-120){
        Layer1height=document.body.offsetHeight;
        Layer1width=document.body.offsetWidth;
    }
    else{
        Layer1height=screen.height;
        Layer1width=document.body.offsetWidth;
    }
    iframeObject = document.createElement("iframe");
    iframeObject.id="iframeOver";
    iframeObject.style.width=Layer1width;
    iframeObject.style.height=Layer1height;
    iframeObject.style.zIndex = 10;
    iframeObject.style.top = 0;
    iframeObject.style.left = 0;
    iframeObject.style.position = "absolute";
    iframeObject.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=0)";
    document.body.appendChild(iframeObject);
    document.getElementById("ShieldWinDIV").style.width=Layer1width;
    document.getElementById("ShieldWinDIV").style.height=Layer1height;
	document.getElementById("ShieldWinDIV").style.display='block';
}

//放开操作CloseShieldDIV
function CloseShieldDIV(LayerName) {
	ShieldWinDIV.innerHTML="";
	document.getElementById('AreaFrame').style.display = 'none';
	document.getElementById(LayerName).style.display='none';
	document.getElementById("ShieldWinDIV").style.display='none';
	//alert(document.getElementById('iframeOver'));
	//document.body.removeChild(document.getElementById('iframeOver'));
}
function SelectAreaMain(code,name)
{
//	divAreaMain.innerHTML=""
}
String.prototype.trim = function(){return this.replace(/(^\s*)|(\s*$)/g, "");};
var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height){if(popUpWin){if(!popUpWin.closed) popUpWin.close();}popUpWin = open(URLStr, 'popUpWin');}
var waitInterval;
var rsValue = null;
function adminLogin(){tb_show("用戶登入", "AdminLogin.aspx?KeepThis=true&TB_iframe=true&noClose=true&height=180&width=400", false);if(waitInterval)clearTimeout(waitInterval);}
function showAdminLogin(){tb_remove();waitInterval = window.setTimeout("adminLogin()",300);}function adminLoginEorr(msg){rsValue = msg;tb_remove();waitInterval = window.setTimeout("showWin(rsValue)",300);}
function showWin(msg){new ShowLayerMsgBox("用戶登入", msg,{execute : "showAdminLogin()"});clearTimeout(waitInterval);}
function chkLogin(){var id = (Request.QueryString("id") && $.trim(Request.QueryString("id")).length > 0) ? eval($.trim(Request.QueryString("id"))) : 0;var name = (Request.QueryString("propertyname") && $.trim(Request.QueryString("propertyname")).length > 0) ? $.trim(Request.QueryString("propertyname")) : "";if($.trim(name).length == 0 || id==0){linkPage("Admin_HouseProperty.aspx");return;}$.ajax({url:"WebService/HousePropertyHandle.asmx/IsLogin", data:{}, dataType: "xml", type: "POST", cache: false, success: function(rs){if(rs != null && $.text(rs) != null){if(!eval($.text(rs).toLocaleLowerCase())){linkPage("Admin_HouseProperty.aspx");return;}}}, error:function(xml,status){linkPage("Admin_HouseProperty.aspx");return;}});}