//登录页面登录有效性验证
function isValid() {
    var txbUserName = document.all.txb_userName;
    var txbPassword = document.all.txb_password;

    if (txbUserName.value.trim().length == 0 || txbPassword.value.trim().length == 0) {
        alert("用户名或密码不能为空!");
        return false;
    }
    return true;
}

//二级验证登录框有效性验证
function isSecondValid(){
    if(document.getElementById("txb_secondPwd").value.trim() == "")
    {
        alert("密码不能为空！");
        return false;
    }
    return true;
}

//回车键
function enterKey(){  
     var txbUserName = document.getElementById ("txb_userName");
     var txbPassword = document.getElementById ("txb_password");
     var txbValid=document.getElementById ("txb_valid");
    if (event.keyCode=="13")
    {
        if (txbUserName.value.trim()=="")
        { txbUserName.focus(); return false ;}
        else 
        { 
            if(txbPassword.value.trim()==""){  txbPassword.focus();return false ;}
            else 
            {
                if(txbValid.value.trim()==""){txbValid.focus();return false }               
            }
        }
    }  
    return true ;  
}


