
   function is_zw(str)
  {
	exp=/[0-9a-zA-Z_]/g;
	if(str.search(exp) != -1)
	{
		return false;
	}
	return true;
  }
 
 function is_number(str)
{
    str=str.replace(/１/g,"1");
	str=str.replace(/２/g,"2");
	str=str.replace(/３/g,"3");
	str=str.replace(/４/g,"4");
	str=str.replace(/５/g,"5");
	str=str.replace(/６/g,"6");
	str=str.replace(/７/g,"7");
	str=str.replace(/８/g,"8");
	str=str.replace(/９/g,"9");
	str=str.replace(/０/g,"0");
	str=str.replace(/－/g,"-");
	exp=/[^0-9()-]/g;
	if(str.search(exp) != -1)
	{
		return false;
	}
	return true;
}


function check_reg(){

 if (companyname_err.innerHTML.indexOf("ok.gif")==-1){
	 document.getElementById("companyname").focus;
	 companyname_err.innerHTML="<font color=red>请完成公司名称</font>";
	 return false;}
	 
  if (jiedao_err.innerHTML.indexOf("ok.gif")==-1){
	  document.getElementById("jiedao").focus;
	  jiedao_err.innerHTML="<font color=red>请完成公司地址</font>";
	  return false;}
	  
  if (c_contactphone_err.innerHTML.indexOf("ok.gif")==-1){
	  document.getElementById("c_contactphone2").focus;
	  c_contactphone_err.innerHTML="<font color=red>请完成公司联系电话</font>";
	  return false;}
  
   if (contactperson_err.innerHTML.indexOf("ok.gif")==-1){
	   document.getElementById("contactperson").focus;
	  contactperson_err.innerHTML="<font color=red>请完成公司联系人</font>";
	   return false;}
   
   
     if (mailbox_err.innerHTML.indexOf("ok.gif")==-1){
		 document.getElementById("mailbox").focus;
		 mailbox_err.innerHTML="<font color=red>请完成公司联系电子邮件</font>";
		 return false;}
		 
if (username_err.innerHTML.indexOf("ok.gif")==-1){
	document.getElementById("username").focus;
	username_err.innerHTML="<font color=red>请完成用户名</font>";
	return false;}
	
if (password_err.innerHTML.indexOf("ok.gif")==-1){
	document.getElementById("password").focus;
	password_err.innerHTML="<font color=red>请完成密码</font>";
	return false;}
	
if (password1_err.innerHTML.indexOf("ok.gif")==-1){
	document.getElementById("password1").focus;
	password1_err.innerHTML="<font color=red>请完成密码</font>";
	return false;}
//if (shouji_err.innerHTML!=""&&shouji_err.innerHTML.indexOf("ok.gif")==-1){
	//document.getElementById("shouji").focus;
	//shouji_err.innerHTML="<font color=red>请完成密码</font>";
	//}

 }

function check_reg1(){
//alert("ss");
 if (companyname_err.innerHTML.indexOf("ok.gif")==-1){
	if (btdiv.innerHTML.indexOf("zhuce_hui.gif")==-1) {btdiv.innerHTML="<input id=submit name=imageField type=image src=/pers/images/zhuce_hui.gif  border=0 disabled=disabled>";}
	 	 return false;}
	 
  if (jiedao_err.innerHTML.indexOf("ok.gif")==-1){
	if (btdiv.innerHTML.indexOf("zhuce_hui.gif")==-1) {btdiv.innerHTML="<input id=submit name=imageField type=image src=/pers/images/zhuce_hui.gif  border=0 disabled=disabled>";}
  return false;}
	  
  if (c_contactphone_err.innerHTML.indexOf("ok.gif")==-1){
if (btdiv.innerHTML.indexOf("zhuce_hui.gif")==-1) {btdiv.innerHTML="<input id=submit name=imageField type=image src=/pers/images/zhuce_hui.gif  border=0 disabled=disabled>";}
	  return false;}
  
   if (contactperson_err.innerHTML.indexOf("ok.gif")==-1){
if (btdiv.innerHTML.indexOf("zhuce_hui.gif")==-1) {btdiv.innerHTML="<input id=submit name=imageField type=image src=/pers/images/zhuce_hui.gif  border=0 disabled=disabled>";}
	   return false;}
   
   
     if (mailbox_err.innerHTML.indexOf("ok.gif")==-1){
if (btdiv.innerHTML.indexOf("zhuce_hui.gif")==-1) {btdiv.innerHTML="<input id=submit name=imageField type=image src=/pers/images/zhuce_hui.gif  border=0 disabled=disabled>";}
		 return false;}
		 
if (username_err.innerHTML.indexOf("ok.gif")==-1){
if (btdiv.innerHTML.indexOf("zhuce_hui.gif")==-1) {btdiv.innerHTML="<input id=submit name=imageField type=image src=/pers/images/zhuce_hui.gif  border=0 disabled=disabled>";}
	return false;}
	
if (password_err.innerHTML.indexOf("ok.gif")==-1){
if (btdiv.innerHTML.indexOf("zhuce_hui.gif")==-1) {btdiv.innerHTML="<input id=submit name=imageField type=image src=/pers/images/zhuce_hui.gif  border=0 disabled=disabled>";}
	return false;}
	
if (password1_err.innerHTML.indexOf("ok.gif")==-1){
	if (btdiv.innerHTML.indexOf("zhuce_hui.gif")==-1) {btdiv.innerHTML="<input id=submit name=imageField type=image src=/pers/images/zhuce_hui.gif  border=0 disabled=disabled>";}
return false;}


btdiv.innerHTML="<input id=submit name=imageField type=image src=/pers/images/zhuce.gif  border=0 onclick='reg.submit()'>";
 }



