﻿function InitExprSignUp() {
    var txtPwd = document.getElementById("txtLogPwd");
    var td = txtPwd.parentNode;
    td.innerHTML = "<input id='txtLogPassword' onfocus='PwdOnFocus(this.id)' type='text' class='input_01' maxlength='20' value='Password' />";
}

function PwdOnFocus(txtPwdID) {
    var txtPwd = document.getElementById(txtPwdID);
    var td = txtPwd.parentNode;
    td.innerHTML = "<input id='txtLogPassword' name='txtLogPassword' onblur='PwdOnBlur(this.id)' type='password' class='input_01' maxlength='20' />";
    document.getElementById("txtLogPassword").focus();
    document.getElementById("txtLogPassword").focus(); //2个focus(),保证该文本框获得焦点
}

function PwdOnBlur(txtPwdID) {
    var txtPwd = document.getElementById(txtPwdID);
    if (txtPwd.value == "") {
        var td = txtPwd.parentNode;
        td.innerHTML = "<input id='txtLogPassword' onfocus='PwdOnFocus(this.id)' type='text' class='input_01' maxlength='20' value='Password' />";
    }
}
function InitSignUp() {
    var txtPwd = document.getElementById("cspassword");
    var td = txtPwd.parentNode;
    td.innerHTML = "<input id='cspwd' onfocus='PasswordOnFocus(this.id)' type='text' class='input_01' value='Password' />";
}

function PasswordOnFocus(txtPwdID) {
    var txtPwd = document.getElementById(txtPwdID);
    var td = txtPwd.parentNode;
    td.innerHTML = "<input id='cspwd' name='cspwd' onblur='PasswordOnBlur(this.id)' type='password' class='input_01' />";
    document.getElementById("cspwd").focus();
    document.getElementById("cspwd").focus(); //2个focus(),保证该文本框获得焦点
}

function PasswordOnBlur(txtPwdID) {
    var txtPwd = document.getElementById(txtPwdID);
    if (txtPwd.value == "") {
        var td = txtPwd.parentNode;
        td.innerHTML = "<input id='cspwd' onfocus='PasswordOnFocus(this.id)' type='text' class='input_01' value='Password' />";
    }
}
