﻿var isIE=document.all;
//用于验证登陆信息
function checkLogin(strLoginName,strPassword)
{
    var tempCtrl=document.getElementById(strLoginName);
    if(tempCtrl.value.length==0)
    {
        alert("请输入用户名");
        tempCtrl.focus();
        return false;
    }
    var tempCtrl=document.getElementById(strPassword);
    if(tempCtrl.value.length==0)
    {
        alert("请输入密码");
        tempCtrl.focus();
        return false;
    }
    return true;
}
//退出系统前的提示信息
function quitLogin()
{
    return confirm('您确定要退出系统吗？');
}
//退出系统前的提示信息(适用于菜单)
function funQuit()
{
    if(confirm("您确定要退出系统吗？"))
        parent.location="/loginOut.aspx";
    return ;
}
//阻止页面转向
function stopUrl()
{
    return ;
}
//验证修改密码
function checkModifyPwd(strPwd,strNewPwd,strVerPwd)
{
    var tempCtrl=document.getElementById(strPwd);
    if(tempCtrl.value.length==0)
    {
        alert("请输入旧密码");
        tempCtrl.focus();
        return false;
    }
    if(tempCtrl.value.length>50)
    {
        alert("旧密码的长度无效，旧密码的长度不能超过50个字符。");
        tempCtrl.focus();
        return false;
    }
    tempCtrl=document.getElementById(strNewPwd);
    if(tempCtrl.value.length==0)
    {
        alert("请输入新密码");
        tempCtrl.focus();
        return false;
    }
    if(tempCtrl.value.length>50)
    {
        alert("新密码的长度无效，新密码的长度不能超过50个字符。");
        tempCtrl.focus();
        return false;
    }
    tempCtrl1=document.getElementById(strVerPwd);
    if(tempCtrl1.value.length==0)
    {
        alert("请输入确认密码");
        tempCtrl1.focus();
        return false;
    }
    if(tempCtrl1.value.length>50)
    {
        alert("确认密码的长度无效，确认密码的长度不能超过50个字符。");
        tempCtrl1.focus();
        return false;
    }
    if(tempCtrl.value!=tempCtrl1.value)
    {
        alert("新密码与确认密码不一致。");
        tempCtrl1.focus();
        return false;
    }
    return true;
}
//放弃对话窗口
function cancelDialog()
{
    if(!confirm("您确定要放弃修改操作吗？"))
        return false;
    window.returnValue='';
    parent.window.opener=null;
    parent.window.close();
    return false;
}
//在对话框窗口中显示指定的页面信息
var comeback;
function ShowFTPForm(strUrl)
{
    if(comeback==null)
        comeback=window.open(strUrl,null);
    else
    {
        comeback=null;
        ShowFTPForm(strUrl);
    }
    return ;
}