function check_password(){
var password=document.regForm.qth8PassWord.value
if(password.length<6 || password.length>16 || password.length==0){
    document.getElementById("passWordPs").className="error_text"
	document.getElementById("passWordPs").innerHTML="请输入6-16位密码"
	}
	else{
			document.getElementById("passWordPs").className="right_text"
	document.getElementById("passWordPs").innerHTML="输入正确"
	}
}
function check_password1(){
var password=document.regForm.qth8PassWord.value
var password1=document.regForm.qth8PassWord1.value
if(password!=password1){
document.getElementById("passWord1Ps").className="error_text"
	document.getElementById("passWord1Ps").innerHTML="两次密码不相同"
	}
	else{
			document.getElementById("passWord1Ps").className="right_text"
	document.getElementById("passWord1Ps").innerHTML="输入正确"
	}

}
 function checkmail()
   {
        var e = document.regForm.qth8Email.value
        if(e == "" || !/(\S)+[@]{1}(\S)+[.]{1}(\w)+/.test(e)) {
        document.getElementById("emailPs").className="error_text"
               document.getElementById("emailPs").innerHTML="请输入正确Email地址"
            }
           else
            {
             document.getElementById("emailPs").className="right_text"
	document.getElementById("emailPs").innerHTML="输入正确"
            }
   }
 function checkusername(){
	var user_name_value=document.regForm.qth8UserName.value
	if(!/^[a-zA-Z]{1}[a-zA-Z0-9_]{3,16}$/.test(user_name_value)){
	document.getElementById("UserNamePs").className="error_text"
	document.getElementById("UserNamePs").innerHTML="非法的用户名"
	}
	else{
	document.getElementById("UserNamePs").className=""
		document.getElementById("UserNamePs").innerHTML='<iframe height="20" width="120" frameborder="0" scrolling="no" src="check.aspx?a='+user_name_value+'"></iframe>'
		}
	}

function check_form(){
	var password=document.regForm.qth8PassWord.value
	if(password.length<6 || password.length>16 || password.length==0){
    	alert("请输入6-16位密码");
		return false;
	}
	var password1=document.regForm.qth8PassWord1.value
		if(password!=password1){
		alert("两次密码不相同");
		return false;
	}
	var e = document.regForm.qth8Email.value
        if(e == "" || !/(\S)+[@]{1}(\S)+[.]{1}(\w)+/.test(e)) {
       alert("请输入正确Email地址");
	   return false;
            }
	var user_name_value=document.regForm.qth8UserName.value
	if(!/^[a-zA-Z]{1}[a-zA-Z0-9_]{3,16}$/.test(user_name_value)){
	alert("非法的用户名,用户名必需字母开头！")
	return false;
	}
	return true;
	}
