function checkusername(){ 
	var browser = navigator.appName; 
	if(browser == "Microsoft Internet Explorer"){ 
		var objAjax = new ActiveXObject("Microsoft.XMLHTTP"); 
		}
	else{ 
		var objAjax = new XMLHttpRequest(); 
		} 

	objAjax.open("get", "operate.asp?act=checkusername&user_name="+getobj("user_name").value);
	objAjax.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		   objAjax.onreadystatechange = function() {
					if (objAjax.readyState == 4) {
						getobj("checkusername").style.display="inline"
						getobj("checkusername").innerHTML = objAjax.responseText;
					}
				}			   
		   objAjax.send(null); 

}	 

function checknickname(){ 
	var browser = navigator.appName; 
	if(browser == "Microsoft Internet Explorer"){ 
		var objAjax = new ActiveXObject("Microsoft.XMLHTTP"); 
		}
	else{ 
		var objAjax = new XMLHttpRequest(); 
		} 

	objAjax.open("get", "operate.asp?act=checknickname&user_nickname="+getobj("user_nickname").value);
	objAjax.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		   objAjax.onreadystatechange = function() {
					if (objAjax.readyState == 4) {
						getobj("checknickname").style.display="inline"
						getobj("checknickname").innerHTML = objAjax.responseText;
					}
				}			   
		   objAjax.send(null); 

}	



 //客户端检测
 function checkform(){
	//检测用户名不能为空
	if (chkempty('user_name',"请填写用户名") == false) {
		return false;
	}
	//密码不能为空
	if (chkempty('user_pass1',"请填写密码") == false) {
		return false;
	}
	//确认密码不能为空
	if (chkempty('user_pass2',"清填写确认密码") == false) {
		return false;
	}
	//昵称不能为空
	if (chkempty('user_nickname',"清填写昵称") == false) {
		return false;
	}
	//问题答案不能为空
	if (chkempty('user_answer',"清填写问题答案") == false) {
		return false;
	}
	//检测email不能为空
	if (chkempty('user_mail',"清填写email地址") == false) {
		return false;
	}
	//检测头像
	if (chkempty('user_face',"请填写头像") == false) {
		return false;
	}
 }
