function check_reg(){

		 if(this.myform.username.value=="")
		 {
		 	document.getElementById("spanname").innerHTML="<font color='#990000'>请输入用户名!</font>";
	         this.myform.username.focus();
	         return false;
		 }
		 else
		 {
			 if(!check(this.myform.username.value)){
				document.getElementById("spanname").innerHTML="&nbsp;<font color='#990000'>提示：用户名只能由字母和数字组成!</font>";
				this.myform.username.focus();
				return false;
			}
			else
			{
				if(Len(this.myform.username.value)<5 || Len(this.myform.username.value)>20)
				 {
						document.getElementById("spanname").innerHTML="&nbsp;<font color='#990000'>提示：用户名长度必须大于5位小于20位!</font>";
						this.myform.username.focus();
						return false;
				}
				else
				{
					document.getElementById("spanname").innerHTML="<span class='STYLE2'>*</span> 5-20个英文或数字字符";
				}
			}
		 }
		 
		 if(this.myform.pwd.value=="")
		 {
			 document.getElementById("spanpwd").innerHTML="<font color='#990000'>请输入您的密码!</font>";
	         this.myform.pwd.focus();
	         return false;
	      }
		  else
		  {
		  	document.getElementById("spanpwd").innerHTML="";
		  }
		  if(Len(this.myform.pwd.value)<6 || Len(this.myform.pwd.value)>20)
		  {
			document.getElementById("spanpwd").innerHTML="<font color='#990000'>密码长度为6-20!</font>";
			this.myform.pwd.focus();
			return false;
		  }
		  else
		  {
			document.getElementById("spanpwd").innerHTML="<span class='STYLE2'>*</span> 6-20位，区分大小写";
		  }
		  if(this.myform.pwd.value!=this.myform.reppwd.value){
			 document.getElementById("rspan").innerHTML="<font color='#990000'>两次密码不一致!</font>";
	         this.myform.reppwd.focus();
	         return false;
	      }
		  else
		  {
		  	document.getElementById("rspan").innerHTML="<span class='STYLE2'>*</span>";
		  }
		  if(this.myform.email.value==""){
			 document.getElementById("spanemail").innerHTML="<font color='#990000'>请填写Email!</font>";
	         this.myform.email.focus();
	         return false;
	      }
		  else
		  {
		  		var regu="^(([0-9a-zA-Z]+)|([0-9a-zA-Z]+[_.0-9a-zA-Z-]*[_.0-9a-zA-Z]+))@([a-zA-Z0-9-]+[.])+([a-zA-Z]{2}|net|NET|com|COM|gov|GOV|mil|MIL|org|ORG|edu|EDU|int|INT)$";
				var re = new RegExp(regu);
				if (this.myform.email.value.search(re)== -1)
				{
					document.getElementById("spanemail").innerHTML="<font color='#990000'>请正确填写Email!</font>";

					this.myform.email.focus();
	         		return false;
				}
				else
				{
					document.getElementById("spanemail").innerHTML="<span class='STYLE2'>*</span>";
				}
		  }
		  if(document.myform.authinput.value!=document.myform.auth.value){
			 document.getElementById("spanauth").innerHTML="<font color='#990000'>验证码错误，请重新输入!</font>";
	         document.myform.authinput.focus();
	         return false;
	      }
		  else
		  {
		  	document.getElementById("spanauth").innerHTML="<span class='STYLE2'>*</span>";
		  }
		  if(document.myform.agree.checked==false)
		  {
			  document.getElementById("spancheck").innerHTML="<font color='#990000'>请先阅读，选择!</font>";
	         document.myform.agree.focus();
	         return false;
		  }
		  else
		  {
			  document.getElementById("spancheck").innerHTML="<span class='STYLE2'>*</span>";
		  }
}

function check_reg1(){
		 if(this.myform1.comname.value=="")
		 {
		 	document.getElementById("spancomname").innerHTML="<font color='#990000'>请输入企业名称!</font>";
	         this.myform1.comname.focus();
	         return false;
		 }
		 else
		 {
		 	document.getElementById("spancomname").innerHTML="<span class='STYLE2'>*</span>";
		 }
		 
		 if(this.myform1.username.value=="")
		 {
		 	document.getElementById("spanname1").innerHTML="<font color='#990000'>请输入用户名!</font>";
	         this.myform1.username.focus();
	         return false;
		 }
		 else
		 {
			 if(!check(this.myform1.username.value)){
				document.getElementById("spanname1").innerHTML="&nbsp;<font color='#990000'>提示：用户名只能由字母和数字组成!</font>";
				this.myform1.username.focus();
				return false;
			}
			else
			{
				if(Len(this.myform1.username.value)<5 || Len(this.myform1.username.value)>20)
				 {
						document.getElementById("spanname1").innerHTML="&nbsp;<font color='#990000'>提示：用户名长度必须大于5位小于20位!</font>";
						this.myform1.username.focus();
						return false;
				}
				else
				{
					document.getElementById("spanname1").innerHTML="<span class='STYLE2'>*</span>";
				}
			}
		 }
		 
		 if(this.myform1.pwd.value=="")
		 {
			 document.getElementById("spanpwd1").innerHTML="<font color='#990000'>请输入您的密码!</font>";
	         this.myform1.pwd.focus();
	         return false;
	      }
		  else
		  {
		  	document.getElementById("spanpwd1").innerHTML="";
		  }
		  if(Len(this.myform1.pwd.value)<6 || Len(this.myform1.pwd.value)>20)
		  {
			document.getElementById("spanpwd1").innerHTML="<font color='#990000'>密码长度为6-20!</font>";
			this.myform1.pwd.focus();
			return false;
		  }
		  else
		  {
			document.getElementById("spanpwd1").innerHTML="<span class='STYLE2'>*</span>";
		  }
		  if(this.myform1.pwd.value!=this.myform1.reppwd.value){
			 document.getElementById("rspan1").innerHTML="<font color='#990000'>两次密码不一致!</font>";
	         this.myform1.reppwd.focus();
	         return false;
	      }
		  else
		  {
		  	document.getElementById("rspan1").innerHTML="<span class='STYLE2'>*</span>";
		  }
		  
		  if(this.myform1.email.value==""){
			 document.getElementById("spanemail1").innerHTML="<font color='#990000'>请填写Email!</font>";
	         this.myform1.email.focus();
	         return false;
	      }
		  else
		  {
		  		var regu="^(([0-9a-zA-Z]+)|([0-9a-zA-Z]+[_.0-9a-zA-Z-]*[_.0-9a-zA-Z]+))@([a-zA-Z0-9-]+[.])+([a-zA-Z]{2}|net|NET|com|COM|gov|GOV|mil|MIL|org|ORG|edu|EDU|int|INT)$";
				var re = new RegExp(regu);
				if (this.myform1.email.value.search(re)== -1)
				{
					document.getElementById("spanemail1").innerHTML="<font color='#990000'>请正确填写Email!</font>";

					this.myform1.email.focus();
	         		return false;
				}
				else
				{
					document.getElementById("spanemail1").innerHTML="<span class='STYLE2'>*</span>";
				}
		  }
		  
		  if(this.myform1.businesscode.value=="")
		 {
			 document.getElementById("spancode").innerHTML="<font color='#990000'>请输入企业工商代码!</font>";
	         this.myform1.businesscode.focus();
	         return false;
	      }
		  else
		  {
		  	document.getElementById("spancode").innerHTML="<span class='STYLE2'>*</span>";
		  }
		  if(this.myform1.lxrname.value=="")
		 {
			 document.getElementById("spanlxrname").innerHTML="<font color='#990000'>请输入联系人姓名!</font>";
	         this.myform1.lxrname.focus();
	         return false;
	      }
		  else
		  {
		  	document.getElementById("spanlxrname").innerHTML="<span class='STYLE2'>*</span>";
		  }
		 if(this.myform1.tel.value==""){
			 document.getElementById("spantel").innerHTML="<font color='#990000'>请输入联系电话!</font>";
	         this.myform1.tel.focus();
	         return false;
	      }
		  else
		  {
			document.getElementById("spantel").innerHTML="<span class='STYLE2'>*</span>";
		  }
		 
		  if(this.myform1.province.value=="0"){
			 document.getElementById("spanprovince").innerHTML="<font color='#990000'>请选择您所在的地区!</font>";
	         this.myform1.province.focus();
	         return false;
	      }
		  else
		  {
		  	document.getElementById("spanprovince").innerHTML="<span class='STYLE2'>*</span>";
		  }
		  if(this.myform1.address.value==""){
			 document.getElementById("spanaddress").innerHTML="<font color='#990000'>请填写通讯地址!</font>";
	         this.myform1.address.focus();
	         return false;
	      }
		  else
		  {
		  	document.getElementById("spanaddress").innerHTML="<span class='STYLE2'>*</span>";
		  }
		  
		  if(this.myform1.scope.value=="")
		 {
		 	document.getElementById("spanscope").innerHTML="<font color='#990000'>请输入经营范围!</font>";
	         this.myform1.scope.focus();
	         return false;
		 }
		 else
		 {
		 	document.getElementById("spanscope").innerHTML="<span class='STYLE2'>*</span>";
		 }
}

