//用户名检测
   function fun_username_out()
 {
   	var jsu_username = document.getElementById("username");
	var jsusername_see = document.getElementById("username_see");
	
	if(jsu_username.value!='')
	{
	  patn =  /^[a-zA-Z]+[a-zA-Z0-9_]+$/;
	  
	  if (!patn.test(jsu_username.value) || jsu_username.value.length < 4 || jsu_username.value.length > 20)
		  { 
			 jsusername_see.innerHTML= " 您的填写有误。会员登录名只能由4-20个字母、数字或者下划线组成(不支持中文，不能以数字开头)"; 
			 jsusername_see.className = "tdred";
		  }else{
		  	var divid = "username_see";
			var url = "ajaxreguser.php?username="+jsu_username.value; 
			getinfo(divid,url)
			 jsusername_see.className = "tdbad";
		  	//jsemail_see.innerHTML= "填写正确！"; 

		  }
	}else{
		jsusername_see.innerHTML="由4-20个字母、数字或者下划线组成。不支持中文，不能以数字和下划线开头,注册成功后不可修改。";
		jsusername_see.className = "tdbad";
	}
 }
 
 
 function fun_username_in()
 {
	var jsu_username = document.getElementById("username");
	var jsusername_see = document.getElementById("username_see");
	if(jsu_username.value!='')
	{

	}else{
		jsusername_see.innerHTML="由4-20个字母、数字或者下划线组成。不支持中文，不能以数字和下划线开头,注册成功后不可修改。";
		jsusername_see.className = "tdred";
	}
	
 }


//密码长度确认
    function fun_password_out()
 {
   	var jspassword = document.getElementById("password");
	var jspassword_see = document.getElementById("password_see");
	if(jspassword.value!='')
	{
		  patn = /([a-zA-Z0-9_-]{6,20})/;
		  if (!patn.test(jspassword.value) ) { 
			 jspassword_see.innerHTML= " 您设置的密码有误。密码由6-20个字母或数字组成。 "; 
			 jspassword_see.className = "tdred";

		} else{
		  	jspassword_see.innerHTML= "填写正确，请牢记您的密码！！"; 
			jspassword_see.className = "tdbad";
		  }
	}else{
		    jspassword_see.innerHTML="请输入密码,由6-20个字母或数字组成！";
			jspassword_see.className = "tdred";
	}
 }
 
 
 function fun_password_in()
 {
	var jspassword = document.getElementById("password");
	var jspassword_see = document.getElementById("password_see");
	if(jspassword.value!='')
	{

	}else{
		jspassword_see.innerHTML="由6-20个字母或数字组成！";
		jspassword_see.className = "tdred";
	}
	
 }
 
//密码确认
 function fun_repwd_out()
 {
   	var jspassword = document.getElementById("password");
	var jsrepwd = document.getElementById("repwd");
	var jsrepwd_see = document.getElementById("repwd_see");
	
	if (jspassword.value != jsrepwd.value) 
	{
			 jsrepwd_see.innerHTML= " 两次输入的密码不一致！！ "; 
			 jsrepwd_see.className = "tdred";
	}else{
		  	jsrepwd_see.innerHTML= "密码一致！"; 
			jsrepwd_see.className = "tdbad";
	}
 }
 
 
 function fun_repwd_in()
 {
    var jspassword = document.getElementById("password");
	var jsrepwd = document.getElementById("repwd");
	var jsrepwd_see = document.getElementById("repwd_see");
	if(jsrepwd.value!='')
	{
	
	}else{
		jsrepwd_see.innerHTML="请再输入一遍您上面输入的密码！";
		jsrepwd_see.className = "tdred";
	}
	
 }

//检测真实姓名
function fun_truename_out()
 {
   	var jstruename = document.getElementById("truename");
	var jstruename_see = document.getElementById("truename_see");
	if(jstruename.value!='')
	{
	      if (jstruename.value.length < 1 || jstruename.value.length > 30)
		  { 
			 jstruename_see.innerHTML= " 填写错误!! "; 
			 jstruename_see.className = "tdred";
		  }else{
		  	jstruename_see.innerHTML= "填写正确！";
			jstruename_see.className = "tdbad";
		  }
	}else{
		jstruename_see.innerHTML="请您输入真实姓名！";
		jstruename_see.className = "tdred";
	}
 }
 
 
 function fun_truename_in()
 {
	var jstruename = document.getElementById("truename");
	var jstruename_see = document.getElementById("truename_see");
	if(jstruename.value!='')
	{

	}else{
		jstruename_see.innerHTML="请您输入真实姓名！";
		jstruename_see.className = "tdred";
	}
	
 }

//部门及职务

function fun_duty_out()
 {
   	var jsduty = document.getElementById("duty");
	var jsduty_see = document.getElementById("duty_see");
	if(jsduty.value!='')
	{
	      if (jsduty.value.length < 1 || jsduty.value.length > 30)
		  { 
			 jsduty_see.innerHTML= " 填写错误！！ "; 
			 jsduty_see.className = "tdred";
		  }else{
		  	jsduty_see.innerHTML= "填写正确！"; 
			jsduty_see.className = "tdbad";
		  }
	}else{
		    jsduty_see.innerHTML="请您输入部门及职务！";
			jsduty_see.className = "tdred";
	}
 }
 
 
 function fun_duty_in()
 {
	var jsduty = document.getElementById("duty");
	var jsduty_see = document.getElementById("duty_see");
	if(jsduty.value!='')
	{

	}else{
		jsduty_see.innerHTML="请您输入部门及职务！！";
		jsduty_see.className = "tdred";
	}
	
 }

//检测电子邮箱 
 
  function fun_email_out()
 {
   	var jsemail = document.getElementById("email");
	var jsemail_see = document.getElementById("email_see");
	if(jsemail.value!='')
	{
		  patn = /([_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,3}$))/;
	      if (!patn.test(jsemail.value)) { 
			 jsemail_see.innerHTML= " 填写错误！！ "; 
			 jsemail_see.className = "tdred";
		} else{
			var divid = "email_see";
			var url = "ajaxreg.php?email="+jsemail.value; 
			getinfo(divid,url)
			jsemail_see.className = "tdbad";
		  }
	}else{ 
			
			jsemail_see.innerHTML='此项为必填项。邮箱将会是您找回密码的重要途径，请谨慎填写！没有电子邮箱？<a href="http://mail.126.com">注册网易邮箱</a> <a href="http://mail.yahoo.com.cn">注册雅虎邮箱</a>';
			jsemail_see.className = "tdred";
	}
 }
 
 
 function fun_email_in()
 {
	var jsemail = document.getElementById("email");
	var jsemail_see = document.getElementById("email_see");
	if(jsemail.value!='')
	{

	}else{
		jsemail_see.innerHTML="请你正确输入电子邮箱！";
		jsemail_see.className = "tdred";
	}
	
 }
 
 
 //区号
  function fun_phone1_out()
 {
   	var jsphone1 = document.getElementById("phone1");
   	var jsphone2 = document.getElementById("phone2");
	var jsphone_see = document.getElementById("phone_see");
	
	if(jsphone1.value!='' && jsphone2.value!='')
	{
		 patn = /([0-9-]{1,100})/;
		 if (!patn.test(jsphone1.value || jsphone2.value) )
		  { 
			 jsphone_see.innerHTML= " 填写错误,填写区号和电话号码,只能是数字 ";
			 jsphone_see.className = "tdred";
			  }else{
			 jsphone_see.innerHTML= " 填写正确！！ "; 
			 jsphone_see.className = "tdbad";
	            }
                }else{
		     jsphone_see.innerHTML=" 请填写区号和电话号码,只能是数字 ";
			 jsphone_see.className = "tdred";
	}
 }
 
 
 function fun_phone1_in()
 {
   	var jsphone1 = document.getElementById("phone1");
	var jsphone_see = document.getElementById("phone_see");
   	var jsphone2 = document.getElementById("phone2");

	if(jsphone1.value!='' && jsphone2.value!='')
	{

	}else{
		jsphone_see.innerHTML=" 请填写区号和电话号码,只能是数字 ";
		jsphone_see.className = "tdred";
	}
	
 }
 
//电话号码
 function fun_phone2_out()
 {
   	var jsphone2 = document.getElementById("phone2");
   	var jsphone1 = document.getElementById("phone1");
	var jsphone_see = document.getElementById("phone_see");
	if(jsphone2.value!='' && jsphone1.value!='')
	{
		 patn = /([0-9-]{1,100})/;
		 if (!patn.test(jsphone2.value || jsphone1.value) )
		  { 
			 jsphone_see.innerHTML= " 填写错误,填写区号和电话号码,只能是数字 "; 
			 jsphone_see.className = "tdred";
		  }else{
			 jsphone_see.innerHTML= " 填写正确！！ "; 
			 jsphone_see.className = "tdbad";
	            }
                }else{
		     jsphone_see.innerHTML=" 请填写区号和电话号码,只能是数字 ";
			 jsphone_see.className = "tdred";
	}
 }
 
 
 function fun_phone2_in()
 {
   	var jsphone2 = document.getElementById("phone2");
	var jsphone_see = document.getElementById("phone_see");
   	var jsphone1 = document.getElementById("phone1");

	if(jsphone2.value!='' && jsphone1.value!='')
	{

	}else{
		jsphone_see.innerHTML=" 请填写区号和电话号码,只能是数字 ";
	    jsphone_see.className = "tdred";
	}
	
 }

 

//传真区号
  function fun_fx1_out()
 {
   	var jsfx1 = document.getElementById("fx1");
	var jsfx_see = document.getElementById("fx_see");
   	var jsfx2 = document.getElementById("fx2");
	if(jsfx1.value!='' && jsfx2.value!='')
	{
		 patn = /([0-9-]{1,100})/;
		 if (!patn.test(jsfx1.value) || !patn.test(jsfx2.value))
		  { 
			 jsfx_see.innerHTML= " 填写错误,填写区号和电话号码,只能是数字 "; 
			 jsfx_see.className = "tdred";
		  }else{
			 jsfx_see.innerHTML= " 填写正确！！ "; 
			 jsfx_see.className = "tdbad";
	            }
                }else{
		     jsfx_see.innerHTML=" 请填写区号和电话号码,只能是数字 ";
			 jsfx_see.className = "tdred";
	}
 }
 
 
 function fun_fx1_in()
 {
   	var jsfx1 = document.getElementById("fx1");
	var jsfx_see = document.getElementById("fx_see");
   	var jsfx2 = document.getElementById("fx2");
	if(jsfx1.value!='' && jsfx2.value!='')
	{

	}else{
		jsfx_see.innerHTML=" 请填写区号和电话号码,只能是数字 ";
	    jsfx_see.className = "tdred";
	}
	
 }



//传真号码
 function fun_fx2_out()
 {
   	var jsfx2 = document.getElementById("fx2");
	var jsfx_see = document.getElementById("fx_see");
   	var jsfx1 = document.getElementById("fx1");
	if(jsfx2.value!='' && jsfx1.value!='')
	{
		 patn = /([0-9-]{1,100})/;
		 if (!patn.test(jsfx2.value) || !patn.test(jsfx1.value))
		  { 
			 jsfx_see.innerHTML= " 填写错误,填写区号和电话号码,只能是数字 "; 
			 jsfx_see.className = "tdred";
		  }else{
			 jsfx_see.innerHTML= " 填写正确！！ "; 
			 jsfx_see.className = "tdbad";
	            }
                }else{
		     jsfx_see.innerHTML=" 请填写区号和电话号码,只能是数字 ";
			 jsfx_see.className = "tdred";
	}
 }
 
 
 function fun_fx2_in()
 {
   	var jsfx2 = document.getElementById("fx2");
	var jsfx_see = document.getElementById("fx_see");
   	var jsfx1 = document.getElementById("fx1");
	if(jsfx2.value!='' && jsfx1.value!='')
	{

	}else{
		jsfx_see.innerHTML=" 请填写区号和电话号码,只能是数字 ";
		jsfx_see.className = "tdred";
	}
	
 }


//手机号码
 function fun_mobi_out()
 {
   	var jsmobi = document.getElementById("mobi");
	var jsmobi_see = document.getElementById("mobi_see");
	
	if(jsmobi.value!='')
	{
		 patn = /([0-9-]{1,100})/;
		 if (!patn.test(jsmobi.value))
		  { 
			 jsmobi_see.innerHTML= " 手机号码输入错误(只能输入数字)！！ ";
			 jsmobi_see.className = "tdred";
		  }else{
			 jsmobi_see.innerHTML= " 填写正确！！ "; 
			 jsmobi_see.className = "tdbad";
	            }
                }else{
		     jsmobi_see.innerHTML="请正确输入手机号码！！";
			 jsmobi_see.className = "tdred";
	}
 }
 
 
 function fun_mobi_in()
 {
   	var jsmobi = document.getElementById("mobi");
	var jsmobi_see = document.getElementById("mobi_see");

	if(jsmobi.value!='')
	{

	}else{
		jsmobi_see.innerHTML="请正确输入手机号码！";
	    jsmobi_see.className = "tdred";
	}
	
 }




//公司类型  >>  企业单位


 function fun_usertype1_out()
 {
   	var jsusertype1 = document.getElementById("usertype1");
	var jscomtype_see = document.getElementById("comtype_see");
   	var jscomtype = document.getElementById("comtype");
	if(jsusertype1.value==1 && jscomtype.value!='')
		{
		
			 jscomtype_see.innerHTML= " 填写正确！！ "; 
			 jscomtype_see.className = "tdbad";
		
		}
		  else{
		  		  
			 jscomtype_see.innerHTML= " 请选择公司类型！！ "; 
			 jscomtype_see.className = "tdred";
			 
		  }
 }
 
 
 
 function fun_usertype1_in()
 {
   	var jsusertype1 = document.getElementById("usertype1");
	var jscomtype_see = document.getElementById("comtype_see");
	if(jsusertype1.value==1)
	{
	    jscomtype_see.innerHTML= " 请选择公司类型！！ "; 
		jscomtype_see.className = "tdred";
	}
	
 }



 function fun_comtype_out()
 {
   	var jsusertype1 = document.getElementById("usertype1");
	var jscomtype_see = document.getElementById("comtype_see");
   	var jscomtype = document.getElementById("comtype");
	
	
	if(jscomtype.value!='' && jsusertype1.value==1)
		  {
		  		  
			 jscomtype_see.innerHTML= " 填写正确！！ "; 
			 jscomtype_see.className = "tdbad";
		  }else{
			 jscomtype_see.innerHTML= " 请选择公司类型！！ "; 
		     jscomtype_see.className = "tdred";
	            }
 }
 
 
 
 function fun_comtype_in()
 {
	var jscomtype_see = document.getElementById("comtype_see");
   	var jscomtype = document.getElementById("comtype");
   	var jsusertype1 = document.getElementById("usertype1");
	if(jscomtype.value!='' && jsusertype1.value==1 )
	{
	    jscomtype_see.innerHTML= " 填写正确！！ "; 
		jscomtype_see.className = "tdbad";
	}else{
		jscomtype_see.innerHTML="请选择公司类型";
		jscomtype_see.className = "tdred";
	}
	
 }
//   个人经营
 function fun_usertype2_out()
 {
   	var jsusertype2 = document.getElementById("usertype2");
	var jscomtype_see = document.getElementById("comtype_see");
	
	if(jsusertype2.value==2)
		  {
		  		  
			 jscomtype_see.innerHTML= " 填写正确！！ "; 
		     jscomtype_see.className = "tdbad";
 			 
		  }else{
			 jscomtype_see.innerHTML= " 请选择公司类型！！ ";
		     jscomtype_see.className = "tdred";
	            }
 }
 
 
 
 function fun_usertype2_in()
 {
   	var jsusertype2 = document.getElementById("usertype2");
	var jscomtype_see = document.getElementById("comtype_see");
	if(jsusertype2.value==2)
	{
	    jscomtype_see.innerHTML= " 填写正确！！ "; 
		jscomtype_see.className = "tdbad";
	}else{
		jscomtype_see.innerHTML="请选择公司类型";
	    jscomtype_see.className = "tdred";
	}
	
 }


//公司名称
 function fun_comname_out()
 {
   	var jscomname = document.getElementById("comname");
	var jscomname_see = document.getElementById("comname_see");
	
	if(jscomname.value!=''){
		
	if(jscomname.value.length < 4 || jscomname.value.length > 50)
		  { 
			 jscomname_see.innerHTML= " 填写有误,最少4个以上文字"; 
			 jscomname_see.className = "tdred";
		  }else{
		  	var divid = "comname_see";
			var url = "ajaxregcom.php?comname="+jscomname.value; 
			getinfo(divid,url)
		    jscomname_see.className = "tdbad";
		  }
		  
	}else{
		 jscomname_see.innerHTML= " 请正确填写公司名称！！ "; 
		 jscomname_see.className = "tdred";
	            }
 }
 
 
 
 function fun_comname_in()
 {
   	var jscomname = document.getElementById("comname");
	var jscomname_see = document.getElementById("comname_see");
	if(jscomname.value!='')
	{
	}else{
		jscomname_see.innerHTML="请正确填写公司名称！！";
	    jscomname_see.className = "tdred";
	}
	
 }



//   所在地   省份
 function fun_province_out()
 {
   	var jsprovince = document.getElementById("province");
	var jsprovince_see = document.getElementById("province_see");
	
	if(jsprovince.value!='')
		  {
		  		  
			 jsprovince_see.innerHTML= " 请选择城市！！ "; 
			 jsprovince_see.className = "tdred";
		  }else{
			 jsprovince_see.innerHTML= " 请选择省份和城市！！ ";
	         jsprovince_see.className = "tdred";
	            }
 }
 
 
 
 function fun_province_in()
 {
   	var jsprovince = document.getElementById("province");
	var jsprovince_see = document.getElementById("province_see");
	if(jsprovince.value!='')
	{
	}else{
		jsprovince_see.innerHTML="请选择省份和城市";
	    jsprovince_see.className = "tdred";
	}
	
 }



//城市
 function fun_city_out()
 {
   	var jscity = document.getElementById("city");
	var jsprovince_see = document.getElementById("province_see");
	
	if(jscity.value!='')
		  {
		  		  
			 jsprovince_see.innerHTML= " 选择正确！！ "; 
	         jsprovince_see.className = "tdbad";
			 
		  }else{
			 jsprovince_see.innerHTML= " 请选择省份和城市！！ "; 
			 jsprovince_see.className = "tdred";
	            }
 }
 
 
 
 function fun_city_in()
 {
   	var jscity = document.getElementById("city");
	var jsprovince_see = document.getElementById("province_see");
	if(jscity.value!='')
	{
		jsprovince_see.innerHTML= " 选择正确！！ "; 
		jsprovince_see.className = "tdbad";
	}else{
		jsprovince_see.innerHTML="请选择省份和城市";
	    jsprovince_see.className = "tdred";
	}
	
 }


//经营地址
 function fun_address_out()
 {
   	var jsaddress = document.getElementById("address");
	var jscomaddress_see = document.getElementById("comaddress_see");
	
	if(jsaddress.value.length!=''){
	if(jsaddress.value.length < 4 || jsaddress.value.length > 100)
		     {
			 jscomaddress_see.innerHTML= "填写错误！！请详细填写贵公司经营地址,不能少于4个文字 "; 
			 jscomaddress_see.className = "tdred";
			  }else{
			 jscomaddress_see.innerHTML= "填写正确"; 
		     jscomaddress_see.className = "tdbad";
	          }
	 }else{
		 
			 jscomaddress_see.innerHTML= "请详细填写贵公司经营地址,不能少于4个文字。如:林和西横路107号计经大楼6层"; 
			 jscomaddress_see.className = "tdred";
		 
		 }
 
 }
 
 
 function fun_address_in()
 {
   	var jsaddress = document.getElementById("address");
	var jscomaddress_see = document.getElementById("comaddress_see");
	if(jsaddress.value!='')
	{
	}else{
		jscomaddress_see.innerHTML="请详细填写贵公司经营地址,不能少于4个文字。如:林和西横路107号计经大楼6层";
		jscomaddress_see.className = "tdred";
	}
	
 }



//主营业务/商品
 function fun_service_out()
 {
   	var jsservice = document.getElementById("service");
	var jsservice_see = document.getElementById("service_see");
	if(jsservice.value.length!=''){
	if(jsservice.value.length < 4 || jsservice.value.length > 100)
		  {
			 jsservice_see.innerHTML= " 填写错误！！ ";
			 jsservice_see.className = "tdred";
		  }else{
			 jsservice_see.innerHTML= "填写正确"; 
		     jsservice_see.className = "tdbad";
	            }
    }else{
		
			 jsservice_see.innerHTML= "请填写主营业务/商品,不能少于4个文字。"; 
			 jsservice_see.className = "tdred";
		}
} 
 
 
 function fun_service_in()
 {
   	var jsservice = document.getElementById("service");
	var jsservice_see = document.getElementById("service_see");
	if(jsservice.value!='')
	{
		jsservice_see.innerHTML= " 选择正确！！ "; 
		jsservice_see.className = "tdbad";
	}else{
		jsservice_see.innerHTML="请填写主营业务/商品,不能少于4个文字。";
		jsservice_see.className = "tdred";
	}
	
 }


//物流及相关行业

 function fun_trade_wl_id_out()
 {
   	var jstrade_wl_id = document.getElementById("trade_wl_id");
	var jstrade_wl_see = document.getElementById("trade_wl_see");
	
	if(jstrade_wl_id.value!=''){
	if(jstrade_wl_id.value==0)
		  {
		  		  
			 jstrade_wl_see.innerHTML= "请选择主营行业！！ "; 
			 jstrade_wl_see.className = "tdred";
		  }else{
			 jstrade_wl_see.innerHTML= " 填写正确！！ "; 
		     jstrade_wl_see.className = "tdbad";
	            }
	 }else{
			 jstrade_wl_see.innerHTML= " 请选择主营行业！！ "; 
			 jstrade_wl_see.className = "tdred";
		 }
 
 }
 
 
 function fun_trade_wl_id_in()
 {
   	var jstrade_wl_id = document.getElementById("trade_wl_id");
	var jstrade_wl_see = document.getElementById("trade_wl_see");
	if(jstrade_wl_id.value!='')
	{
	}else{
		jstrade_wl_see.innerHTML="请选择主营行业";
		jstrade_wl_see.className = "tdred";
	}
	
 }

//贸易及相关行业

 function fun_tradeid_out()
 {
   	var jstradeid = document.getElementById("tradeid");
	var jstrade_see = document.getElementById("trade_see");
	if(jstradeid.value!=''){
	if(jstradeid.value==0)
		  {
			 jstrade_see.innerHTML= " 请选择主营行业！！ "; 
			 jstrade_see.className = "tdred";
		  }else{
			 jstrade_see.innerHTML= " 填写正确！！ "; 
		     jstrade_see.className = "tdbad";
	            }
		 }else{
			 
			 jstrade_see.innerHTML= " 请选择主营行业！！ "; 
			 jstrade_see.className = "tdred";
			 }
 
 }
 
 function fun_tradeid_in()
 {
   	var jstradeid = document.getElementById("tradeid");
	var jstrade_see = document.getElementById("trade_see");
	if(jstradeid.value!='')
	{
	}else{
		jstrade_see.innerHTML="请选择主营行业";
		jstrade_see.className = "tdred";
	}
	
 }







