//-----------------------------------------------------------
// 文件名称: login.js
//---------------------------------------------
String.prototype.trim = function() {
    if (this == null) return null;
    return this.replace(/(^\s*)|(\s*$)/g, "");
}
function InputChk() {
    var UserNo = document.getElementById("txtUserNo").value.trim();
    var UserPwd = document.getElementById("txtUserPwd").value.trim();
    var UserCode = document.getElementById("txtUserCode").value.trim();
    var auth = document.getElementById("auth").value.trim();
    if (UserNo == "") {
        window.alert("很抱歉！请输入用户名！");
        return false;
    }
    if (UserPwd == "") {
        window.alert("很抱歉！请输入密码！");
        return false;
    }
    if (UserCode == "" && auth != "") {
        window.alert("很抱歉！请输入验证码！");
        return false;
    }
    return true;
}
function Anthem_Error(e) {
    window.alert(e.error);
}
var error = 1;
function errorTip() {
    if (error == 3) {
        document.getElementById("auth").value = "1";
        document.getElementById("authtr").style.visibility = "visible";
    }
    error++;
}