
function checkThisForm() 
{
   
    if(!document.thisForm.memberClass[0].checked) {
        if(!document.thisForm.memberClass[1].checked)	{
            alert("請選擇您註冊的會員的類型!");
            document.thisForm.memberClass[0].focus();
            return false;
        }
    }
	/*
    if(document.thisForm.userName.value=="") {
        alert("請填寫用戶名.");
        document.thisForm.userName.focus();
        return false;
    }
    if(getStrCharLen(document.thisForm.userName.value) > 20 ||
        6 > getStrCharLen(document.thisForm.userName.value)) {
        alert("用戶名長度不能低於6個字符，也不能大於20個字符!");
        document.thisForm.userName.focus();
        return false;
    }

    if(!isStr(document.thisForm.userName.value)) {
        alert("用戶名請填寫英文字母，數字或下劃線!");
        document.thisForm.userName.focus();
        return false;
    }*/

    if(document.thisForm.password.value=="") {
        alert("請填寫密碼!");
        document.thisForm.password.focus();
        return false;
    }

    if(!isStr(document.thisForm.password.value)) {
        alert("請填寫英文字母，數字或下劃線!");
        document.thisForm.password.focus();
        return false;
    }

    if(document.thisForm.password.value.length < 6) {
        alert("密碼長度不能小於六位,請修改!");
        document.thisForm.password.focus();
        return false;
    }

    if(!isStr(document.thisForm.confirmPassword.value)) {
        alert("密碼請填寫英文字母，數字或下劃線!");
        document.thisForm.confirmPassword.focus();
        return false;
    }

    if(document.thisForm.confirmPassword.value.length < 6) {
        alert("密碼長度不能小於六位,請修改!");
        document.thisForm.confirmPassword.focus();
        return false;
    }

    if(document.thisForm.password.value==document.thisForm.userName.value) {
        alert("用戶名和口令不能一樣,請修改!");
        document.thisForm.password.focus();
        return false;
    }

    if(document.thisForm.password.value != document.thisForm.confirmPassword.value) {
        alert("密碼與確認密碼不匹配，請重新填寫!");
        document.thisForm.password.focus();
        return false;
    }
    if(document.thisForm.email.value=="") {
        alert("請填寫郵件地址!");
        document.thisForm.email.focus();
        return false;
    }
    if(!isEmail(document.thisForm.email.value)) {
        alert("對不起,您輸入的電子郵件可能不正確!\n如果，您使用的是我們系統無法識別的電子郵件地址，請和我們聯系!");
        document.thisForm.email.focus();
        return false;
    }

    document.thisForm.submit();
}



function check_user()
{
    if(document.thisForm.userName.value=="")
    {
        alert("請填寫用戶名!");
        document.thisForm.userName.focus();
        return false;
    }

    if(getStrCharLen(document.thisForm.userName.value)>20 ||
        6>getStrCharLen(document.thisForm.userName.value))
    {
        alert("用戶名長度不能低於6個字符，也不能大於20個字符!");
        document.thisForm.userName.focus();
        return false;
    }

    if (!isStr(document.thisForm.userName.value))
    {
        msg="對不起，用戶名必須為6個以上的英文字母或數字！\n註意：您不能使用漢字、漢字字符以及非法字符（包括：空格、#、%等）當作用戶名！";
        alert(msg);
        document.thisForm.userName.focus();
        return false;
    }

    var feature = "dialogHeight:250px;dialogWidth:470px;dialogTop:100px; center:yes;scroll:no;status:no;resizable:yes;edge:raised;help:no;unadorned:no";
    var returnValue = window.showModalDialog("/resume/center/check_userName_email?userName="+document.thisForm.userName.value, "中國工作在線提醒您", feature);

    if(returnValue<=0) document.thisForm.password.focus();
    else document.thisForm.userName.focus();
    return true ;
}

function check_email()
{
	if(getStrCharLen(document.thisForm.email.value)<3)
	{
		alert("請輸入電子郵件!");
		document.thisForm.email.focus();
		return false;
	}
    if (!isEmail(document.thisForm.email.value))
    {
        msg="對不起,您輸入的電子郵件可能不正確！\n如果，您使用的是我們系統無法識別的電子郵件地址，請和我們聯系！";
        alert(msg);
        document.thisForm.email.focus();
        return false;
    }

    var feature = "dialogHeight:250px;dialogWidth:470px;dialogTop:100px; center:yes;scroll:no;status:no;resizable:yes;edge:raised;help:no;unadorned:no";
    var returnValue = window.showModalDialog("/resume/center/check_userName_email?email="+document.thisForm.email.value, "中國工作在線提醒您", feature);
    if(returnValue>0) document.thisForm.email.focus();
    return true;
}

