


//注册检测


function checkMail(s) 
{ 
	var pattern=/\w+@\w+\.[a-z]+/; 
	if(pattern.test(s)) 
	{ 
		return true; 
	} 
	else 
	{ 
		return false; 
	} 
} 

function test()
  {
      if (document.form1.name.value==""){
	      alert("请输入用户名！")
		  document.form1.name.focus();
		  return false
		    }
	  if (document.form1.name.value.lenght<6){
	      alert("用户名长度不能少于6位！")
		  document.form1.name.select();
		  return false
		    }
	 
	 
	  if (document.form1.pwd.value==""){
	      alert("请输入密码！");
		  document.form1.pwd.focus();
		  return false
		  } 
		  if (document.form1.pwd.value!=document.form1.pwd1.value){
	      alert("两次密码输入不一致！");
		  document.form1.pwd.focus();
		  return false
		  } 
	if (document.form1.question.value==""){
	      alert("请输入密码问题！")
		  document.form1.question.focus();
		  return false
		    }
	if (document.form1.answer.value==""){
	      alert("请输入密码答案！")
		  document.form1.answer.focus();
		  return false
		    }

		
    if (document.form1.user.value=="0"){
	      alert("请选择会员类别！");
		  document.form1.user.focus();
		  return false
		  }
	if (document.form1.code.value==""){
	      alert("请输入验证码！")
		  document.form1.code.focus();
		  return false
		   }
	if(isNaN(document.form1.code.value)){
			alert("验证码必须为数字！");
			document.form1.code.select();
		  return false
		}
		  return true
  }

	
	
function ClickHtml(ShowDiv,HiddenDiv,ShowImg,HiddenImg,ShowImgFile,HiddenImgFile){
		document.getElementById(""+ShowDiv+"").style.display="";
		document.getElementById(""+HiddenDiv+"").style.display="none";
		document.all(""+ShowImg+"").background=ShowImgFile;
		document.all(""+HiddenImg+"").background=HiddenImgFile;
		
		document.getElementById(""+ShowImg+"").style.color="#5E5E5E";
		document.getElementById(""+HiddenImg+"").style.color="#FFFFFF";
	}
	
function linkurl(linkobj,url){
		document.all(""+linkobj+"").href=""+url+"";
	}
	
	
function mouseovertr(obj,color){
	obj.style.color=color;
}
function mouseouttr(obj){
	obj.style.color="";
}