function createAjax() {
var _xmlhttp;
try { 
_xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
}
catch (e) {
try {
   _xmlhttp=new XMLHttpRequest(); 
}
catch (e) {
   _xmlhttp=false; 
}
}
return _xmlhttp; 
}



function checkname(name) {
var xmlhttp1=createAjax(); 
if (xmlhttp1) { 
var span=document.getElementById('laos_name');
xmlhttp1.open('get','../../click.asp?name='+name+'&Act=Regname&n='+Math.random(),true); 
xmlhttp1.onreadystatechange=function() { 
   if (xmlhttp1.readyState==4 && xmlhttp1.status==200) { 
    span.innerHTML=unescape(xmlhttp1.responseText); 
    }
   else {
    span.innerHTML='<span style="color:red;font-size:12px;">正在查询...</span>'; 
   }

}
xmlhttp1.send(null); 
}
}



function checkpass() {
var span=document.getElementById('laos_pass');
var pass=document.myform.pass.value;
	if (pass==""){ 
    	span.innerHTML='<span style="color:red;font-size:12px;">密码不能为空！</span>'; 
	}
	else
	if (pass=="123456"){ 
    	span.innerHTML='<span style="color:red;font-size:12px;">您的密码过于简单，请重新设置！</span>'; 
	}
	else
	if (pass=="111111"){ 
    	span.innerHTML='<span style="color:red;font-size:12px;">您的密码过于简单，请重新设置！</span>'; 
	}
	else
	if(pass.length>20||pass.length<6){
		span.innerHTML='<span style="color:red;font-size:12px;">密码不能小于6位，不能超过20位！</span>';
	}
	else{
		span.innerHTML='<span style="color:#006600;font-size:12px;">√ 正确！</span>';
	}
}



function checkpasss(){
var span=document.getElementById('laos_pass2');
var a=document.myform.pass.value;
var b=document.myform.pass2.value;
	if (b==""){
		span.innerHTML='<span style="color:red;font-size:12px;">请输入确认密码</span>';
		return false;
	}
	if (a!=b){
		span.innerHTML='<span style="color:red;font-size:12px;">两次密码不一样</span>'; 
		return false;
	}
	span.innerHTML='<span style="color:#006600;font-size:12px;">√ 正确！</span>'; 
}




function checkemail(email) {
var xmlhttp1=createAjax(); 
if (xmlhttp1) { 
var span=document.getElementById('laos_email');
xmlhttp1.open('get','../click.asp?email='+email+'&Act=Regemail&n='+Math.random(),true); 
xmlhttp1.onreadystatechange=function() { 
   if (xmlhttp1.readyState==4 && xmlhttp1.status==200) { 
    span.innerHTML=unescape(xmlhttp1.responseText); 
    }
   else {
    span.innerHTML='<span style="color:red;font-size:12px;">正在查询...</span>'; 
   }

}
xmlhttp1.send(null); 
}
}




function chkform(){ 
if(myform.name.value==""){ 
alert("请输入用户名!"); 
myform.name.focus(); 
return false; 
}
if(myform.pass.value==""){ 
alert("请输入密码!"); 
myform.pass.focus(); 
return false; 
}
if(myform.pass2.value==""){ 
alert("请输入重复密码!"); 
myform.pass2.focus(); 
return false; 
}
if(myform.email.value==""){ 
alert("请输入Email!"); 
myform.email.focus(); 
return false; 
}
} 