<!--
function validate(){ 
	var strUserName = document.frmSignUp.txtUserName.value;
	var strPassword = document.frmSignUp.txtPassword.value;
	var strConfPassword = document.frmSignUp.txtConfPassword.value;
	var strRealName = document.frmSignUp.txtRealName.value;
	var strGender = document.frmSignUp.sltGender.value;
	var strTel = document.frmSignUp.txtTel.value;
	var strEmail = document.frmSignUp.txtEmail.value;
	var strHomePage = document.frmSignUp.txtHomePage.value;
	
	var primeInUserName = strUserName.indexOf("'");
	var primeInPassword = strPassword.indexOf("'");
	var primeInRealName = strRealName.indexOf("'");
	var primeInTel = strTel.indexOf("'");
	var primeInEmail = strEmail.indexOf("'");
	var atInEmail = strEmail.indexOf("@");
	var pointInEmail = strEmail.indexOf(".");
	
	if (strUserName ==""){
		alert("请您输入用户名！");
		return false;
	}
	if (primeInUserName !=-1){
		alert("用户名中不能包含撇号！");
		return false;
	}
	if (strPassword ==""){
		alert("请输入密码！");
	return false;
	}
	if (primeInPassword !=-1){
		alert("密码中不能包含撇号！");
		return false;
	}
	if((strPassword.length)<6){
		alert("密码最少为6位！")
		return false;
	}
	if (strConfPassword ==""){
		alert("请您确认密码！");
	return false;
	}
	if (strPassword != strConfPassword){
		alert("两次输入的密码不一致！")
		return false;
	}
	if (strRealName ==""){
		alert("请输入真实姓名！");
		return false;
	}
	if (primeInRealName !=-1){
		alert("错误的姓名格式！");
		return false;
	}
	if (strGender =="non"){
		alert("请选择性别！");
		return false;
	}
	if (strTel ==""){
		alert("请输入电话号码！");
		return false;
	}
	if((strTel.length)<7){
		alert("不合法的电话号码！");
		return false;
	}
	if (primeInTel !=-1){
		alert("错误的电话号码格式！");
		return false;
	}
	if((ValidTel(strTel))==-1){
		alert("不合法的电话号码！");
		return false;
	}
	if (strEmail ==""){
		alert("请输入电子邮箱！");
		return false;
	}
	
	if (primeInEmail !=-1){
		alert("电子邮件地址中不能包含撇号！");
		return false;
	}
	
	if (atInEmail ==-1){
		alert("不合法的Email地址！");
		return false;
	}
	if (pointInEmail ==-1){
		alert("不合法的Email地址！");
		return false;
	}
	if((strEmail.length)<7){
		alert("不合法的Email地址！");
		return false;
	}
	if((strHomePage.length)>0 && ((strHomePage.indexOf("'"))!=-1 
	||(strHomePage.indexOf("."))==-1)){
		alert("不合法的网页地址！");
		return false;
	}
}

function ValidTel(strTel){
   var ValidChars = "0123456789()- ";
   var Valid=1;
   var Char;
   for (i = 0; i < strTel.length && Valid == 1; i++) { 
      Char = strTel.charAt(i); 
      if (ValidChars.indexOf(Char) == -1){
         Valid = -1;
      }
   }
   return Valid;
}
-->
