<script language="javascript" src="common/script/validate.js">
</script>
<script language="javascript" src="common/script/logon.js">
                </script>
                <!--script language="javascript" src="xmgl/script/loginrecord.js"-->
</script>
<script language="javascript">
var c_strHtmlMail="frame/default.jsp";
var c_SystemName="欢迎使用系统";
function login()
{
var vobjDom=new ActiveXObject("MSXML2.DOMDocument");
vobjDom.async=false;
var vLogonName=document.all("LogonName").value;
var vPassword=document.all("Password").value;
setCookie("LogonName",vLogonName); vobjDom.load("login.asp?LogonName=" + vLogonName   + "&Password=" + vPassword);
return vobjDom;
} function Submit_onclick()
{
document.all("LogonName").focus();
var vLogonName=document.all("LogonName").value;
var vPassword=document.all("Password").value;
var objLoginDom=login();
if (null!=objLoginDom.documentElement && "error"!=objLoginDom.documentElement.getAttribute("State"))
{
//登录成功
//window.returnValue=objLoginDom.documentElement.getAttribute("Canonical");
//window.close();
                //                loginrecord("1");//记录用户登录
var strUserName=objLoginDom.documentElement.getAttribute("Canonical");
if (null!=strUserName && ""!=strUserName)
{
window.document.title=c_SystemName+"("+strUserName+")";
setCookie("username",strUserName);
//alert(getCookie("username"));
window.onload = loadCols;
window.location.href=c_strHtmlMail;
}
else
window.document.write(""); function loadCols()
{
try { bottom.load("mnpFrames.data"); }
catch(e) { return; }
var colWidth = bottom.getAttribute("colWidth");
if (colWidth)
{ bottom.cols = colWidth + ",*"; }
} function saveCols()
{
bottom.setAttribute("colWidth", fstTreeColumn.offsetWidth);
try { bottom.save("mnpFrames.data"); }
catch(e) {}
}
}
else if(null!=objLoginDom.documentElement && "error"==objLoginDom.documentElement.getAttribute("State") && "" != objLoginDom.documentElement.getAttribute("Description")){
alert(objLoginDom.documentElement.getAttribute("Description"));
}
else//登录失败
{
                //                loginrecord("0");//记录用户登录
alert("登录失败");
}
} function window_onload() {
//document.all("LogonName").focus();
document.all("LogonName").value = getCookie("LogonName");
//document.all("Password").value="odps";
//2009.4.14 将焦点定位到密码处
document.all("Password").focus();
delCookie("LogonName");
} function onPasswordKeyDown()
{
if (window.event.keyCode == 13 && window.event.ctrlKey == false && window.event.altKey == false)
{
Submit_onclick();
}
}
function inputSelect()
{
event.srcElement.select();
}
</script>