<!--
function CheckAll(){
	this.str_user_name=false;
	this.str_user_password=false;
	this.str_user_repassword=false;
	this.str_user_email=false;
	this.str_user_remail=false;
	this.str_position=true;
	this.str_company_firstname=false;
	this.str_company_lastname=false;
	this.str_company_name=false;
	this.str_country_id=false;
	this.str_address=false;
	this.str_tel=false;
	this.str_fax=true;
	this.str_mobile=true;
	this.str_infomation=false;
	this.str_authnum=false;
}
var checkAll = new CheckAll;


//	 array_lang_reg[] = "5-20位；只限数字(0-9)或英文(a-z)，不区分大";

function Client(method,url){
	var regex = new RegexValidation;
	var ajax = new HttpRequest(method,url);
	var request;
	var img_err = '<img src="images/icon_noteawake_16x16.gif" >&nbsp;';
	var img_rgt = '<img src="images/gou.gif" alt="right"/>&nbsp;';
	function post(callback,param){
		request = ajax.init();
		ajax.post(request,callback,param)
	}

	var array_lang_reg = new Array();
	if(ajax.$('str_lang').value == "china"){
		array_lang_reg[0]="5-15位；只限数字(0-9)或英文(a-z)，不区分大小写；注册成功后，不可修改；建议使用公司名的字母缩写";
		array_lang_reg[1]="<b>非常重要！</b>这是客户与您联系的首选方式，请务必填写真实，并确认是您最常用的电子邮件。"
		array_lang_reg[2]="您输入的电子邮箱不正确";
		array_lang_reg[3]="请输入确认邮箱地址";
		array_lang_reg[4]="两次输入的邮箱地址不一样";
		array_lang_reg[5]="6-15位，只限数字(0-9)或英文(a-z)，区分大小写, 不能与用户名相同；建议为英文字母和数字结合，便于记忆，不易被猜出。";
		array_lang_reg[6]="密码与用户名不能相同；建议为英文字母和数字结合，便于记忆，不易被猜出。";
		array_lang_reg[7]="请输入确认密码";
		array_lang_reg[8]="两次输入的密码不一样";
		array_lang_reg[9]="请正确输入您的名";
		array_lang_reg[10]="只能输入英文";
		array_lang_reg[11]="请正确输入您的姓";
		//array_lang_reg[12]="请输入公司名称";
		array_lang_reg[13]="填写不符合要求 (6~100)";
		array_lang_reg[14]="请正确输入公司地址";
		array_lang_reg[15]="请选择国家";
		array_lang_reg[16]="请正确输入城市名称";
		array_lang_reg[17]="请选择省份";
		array_lang_reg[18]="请正确输入邮编（数字）";
		//array_lang_reg[19]="请输入国家区号";
		array_lang_reg[20]="请输入正确的电话号码（数字）";
		array_lang_reg[21]="请输入正确的传真号码（数字）";
		array_lang_reg[22]="请输入正确的手机号码（数字）";
		//array_lang_reg[23]="请输入正确的地方区号（数字) ";
		//array_lang_reg[24]="地方区号填写正确";
		//array_lang_reg[25]="请输入电话号码";
		//array_lang_reg[26]="请输入正确的号码（数字）";
		//array_lang_reg[27]="电话号码填写正确";
		//array_lang_reg[28]="请输入完整";
		array_lang_reg[29]="请输入您的公司介绍信息。不支持HTML格式。(至少100个字符)";
		array_lang_reg[30]="请输入验证码";
		array_lang_reg[31]="验证码不匹配";
		array_lang_reg[32]="正确";
		array_lang_reg[33]="用户名已经存在，请重新输入用户名";
		array_lang_reg[34]="公司名已经存在，请重新输入公司名";
		array_lang_reg[35]="邮件地址已经存在，请重新输入邮件地址";
		array_lang_reg[36]="与服务器通信中";

	}
	else{
		array_lang_reg[0]="5-15 characters (a-z, 0-9, no spaces) <br/> This member ID cannot be changed once registered. Company name initials recommended.";
		array_lang_reg[1]="<b>Very Important!  </b>A valid email address is required to complete registration.";
		array_lang_reg[2]="Please specify a valid email address.";
		array_lang_reg[3]="Please re-enter the email address to confirm.";
		array_lang_reg[4]="The confirm email address is incorrect, please try again.";
		array_lang_reg[5]="6-15 characters (A-Z, a-z, 0-9, no spaces) <br>Please make sure the password is different with your member ID.";
		array_lang_reg[6]="Sorry, the password cannot be same with your member ID, we suggest you use mixed characters for security concern.";
		array_lang_reg[7]="Please re-enter your password to confirm.";
		array_lang_reg[8]="The confirm password is incorrect, please try again.";
		array_lang_reg[9]="Please specify your first name. 1-20 characters.";
		array_lang_reg[10]="Please input English only!.";
		array_lang_reg[11]="Please specify your last name. 1-20 characters";
		//array_lang_reg[12]="请输入公司名称";
		array_lang_reg[13]="Please enter the Street";
		array_lang_reg[14]="Please specify your company address.";
		array_lang_reg[15]="Please select your country.";
		array_lang_reg[16]="Please specify your city name.";
		array_lang_reg[17]="Please select your state/province.";
		array_lang_reg[18]="Please specify your zip code.";
		//array_lang_reg[19]="请输入国家区号";
		array_lang_reg[20]="Please input a valid telephone number. Numbers only.";
		array_lang_reg[21]="Please input a valid fax number. Numbers only";
		array_lang_reg[22]="Please input a valid mobile number.";
		//array_lang_reg[23]="Please specify the area code. Numbers only. If you don’t have an area code, please enter 0 instead.";
		//array_lang_reg[24]="area code ok";
		//array_lang_reg[25]="请输入电话号码";
		//array_lang_reg[26]="Please specify the number. Numbers only.";
		//array_lang_reg[27]="phone number ok";
		//array_lang_reg[28]="Please complete your information.";
		array_lang_reg[29]="Please provide a general summary about your company. HTML is not supported. (At lease 100 characters)";
		array_lang_reg[30]="Please specify the security code.";
		array_lang_reg[31]="The security code you enter is incorrect, please try again.";
		array_lang_reg[32]="Ok";
		array_lang_reg[33]="This member ID is occupied, please choose another one.";
		array_lang_reg[34]="This company name has existed, please enter again.";
		array_lang_reg[35]="This email address has already been registered<br>Please note that one email address can be only registered once.";
		array_lang_reg[36]="Check for availability.";



	}

	/*检查名称，首先判断是否符合格式，再通过ajax查询数据库是否有记录*/
	
	function GetXmlHttpObject()
{
  var xmlHttp=null;
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    }
  return xmlHttp;
}


function Isvalidname(){
		var str = regex.Trim(ajax.$('memberid').value);
		   if( str=="" ){
			ajax.$("memberid_tip").innerHTML=img_err+array_lang_reg[0];
			ajax.$("memberid_tip").className='aj_error';
			return false;
		}else if( !regex.IsEnglighAndNumber(str) || str.length < 5 || str.length > 15 ){
			ajax.$("memberid_tip").innerHTML=img_err+array_lang_reg[0];
			ajax.$("memberid_tip").className='aj_error';
			return false;
		}
		if (str.length==0) { 
		  document.getElementById("txtHint").innerHTML="";
		  return;
		}
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null) {
		alert ("Your browser does not support AJAX!");
		return;
		} 
	    var url="register.php";
		url=url+"?str="+str;
		
   		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChanged;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
}
function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("memberid_tip").innerHTML=xmlHttp.responseText;
}
}
	
/*function Isvalidname(){
	var memberid = $('memberid').value;

	new Ajax.Request('joinmember.php',{
		method: 'post',
		parameters:'str_action=check_user&memberid='+memberid ,
		onSuccess: function(response) {
			if ((response.responseText!=0) || (!/[x00-xff]+/.test( memberid )) ){
				bln_check.member = false;
				$('memberid_tip').innerHTML = response.responseText;
				$('memberid_tip').style.display='block';
			}else{
				bln_check.member = true;
				$('memberid_tip').style.display='none';
			}
		}
	});
}
*/	/*检查邮件地址，首先判断是否符合格式，再通过ajax查询数据库是否有记录*/
	function Isvalidemail(){
		var str = regex.Trim(ajax.$('mail').value);
		if(  str==""){
			ajax.$("mail_tip").innerHTML=img_err+array_lang_reg[1];
			ajax.$("mail_tip").className='aj_error';
			return false;
		}else if(  str=="" || !regex.ValidateEmail(str) ){
			ajax.$("mail_tip").innerHTML=img_err+array_lang_reg[2];
			ajax.$("mail_tip").className='aj_error';
			return false;
		}
		//return true;
		if (str.length==0) { 
		  document.getElementById("txtHint").innerHTML="";
		  return;
		}
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null) {
		alert ("Your browser does not support AJAX!");
		return;
		} 
	    var url="register.php";
		url=url+"?str1="+str;
		
   		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChanged1;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChanged1() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("mail_tip").innerHTML=xmlHttp.responseText;
}
}
	/*验证确认邮件地址时候和邮件地址相同*/
	this.Isvalidremail=Isvalidremail;
	function Isvalidremail(){
		var str = regex.Trim(ajax.$('remail').value);
		if( str=="" ){
			ajax.$("remail_tip").innerHTML=img_err+array_lang_reg[3];
			ajax.$("remail_tip").className='aj_error';
			return false;
		}else if( str!=ajax.$('mail').value ){
			ajax.$("remail_tip").innerHTML=img_err+array_lang_reg[4];
			ajax.$("remail_tip").className='aj_error';
			return false;
		}
		ajax.$("remail_tip").innerHTML=img_rgt+array_lang_reg[32];
		ajax.$("remail_tip").className='aj_right';
		checkAll.str_user_remail=true;
	}


	/*判断密码是否符合格式*/
	this.Isvalidpassword = Isvalidpassword;
	function Isvalidpassword(){
		var show_message =array_lang_reg[5];
		var str      = regex.Trim(ajax.$('password').value);
		var str_user = regex.Trim(ajax.$('memberid').value);
		if( str=="" ){
			ajax.$("password_tip").innerHTML=img_err+show_message;
			ajax.$("password_tip").className='aj_error';
			return false;
		}else if( !regex.IsEnglighAndNumber(str) || str.length < 6  || str.length > 15 ){
			ajax.$("password_tip").innerHTML=img_err+show_message;
			ajax.$("password_tip").className='aj_error';
			return false;			
		}else if( str==str_user ){
			ajax.$("password_tip").innerHTML=img_err+array_lang_reg[6];
			ajax.$("password_tip").className='aj_error';
			return false;
		}

		ajax.$("password_tip").innerHTML=img_rgt+array_lang_reg[32];
		ajax.$("password_tip").className='aj_right';
		checkAll.str_user_password=true;
	}

	/*验证确认密码时候和密码相同*/
	this.Isvalidrepassword=Isvalidrepassword;
	function Isvalidrepassword(){
		var str = regex.Trim(ajax.$('repassword').value);
		if( str=="" ){
			ajax.$("repassword_tip").innerHTML=img_err+array_lang_reg[7];
			ajax.$("repassword_tip").className='aj_error';
			return false;
		}else if( str!=ajax.$('password').value || str.length < 6 || str.length > 15 ){
			ajax.$("repassword_tip").innerHTML=img_err+array_lang_reg[8];
			ajax.$("repassword_tip").className='aj_error';
			return false;
		}
		ajax.$("repassword_tip").innerHTML=img_rgt+array_lang_reg[32];
		ajax.$("repassword_tip").className='aj_right';
		checkAll.str_user_repassword=true;
	}

	/*判断有没有写公司firstname*/
	this.Isvalidcompanyfirstname=Isvalidcompanyfirstname;
	function Isvalidcompanyfirstname(){
		var str = regex.Trim(ajax.$('firstname').value);
		if( str=="" || str.length<1 || str.length>20){
			ajax.$("firstname_tip").innerHTML=img_err+array_lang_reg[9];
			ajax.$("firstname_tip").className='aj_error';
			checkAll.str_company_firstname=false;
			return false;
		}else if( regex.ValidateChinaCode(str) ){
			ajax.$("firstname_tip").innerHTML=img_err+array_lang_reg[10];
			ajax.$("firstname_tip").className='aj_error';
			checkAll.str_company_firstname=false;
			return false;
		}else{
			ajax.$("firstname_tip").innerHTML=img_rgt+array_lang_reg[32];
			ajax.$("firstname_tip").className='aj_right';
		}
		checkAll.str_company_firstname=true;
	}

	/*判断有没有写公司lastname*/
	this.Isvalidcompanylastname=Isvalidcompanylastname;
	function Isvalidcompanylastname(){
		var str = regex.Trim(ajax.$('lastname').value);
		if( str=="" || str.length<1 || str.length>20){
			ajax.$("lastname_tip").innerHTML=img_err+array_lang_reg[11];
			ajax.$("lastname_tip").className='aj_error';
			checkAll.str_company_lastname=false;
			return false;
		}else if( regex.ValidateChinaCode(str) ){
			ajax.$("lastname_tip").innerHTML=img_err+array_lang_reg[10];
			ajax.$("lastname_tip").className='aj_error';
			checkAll.str_company_lastname=false;
			return false;
		}else{
			ajax.$("lastname_tip").innerHTML=img_rgt+array_lang_reg[32];
			ajax.$("lastname_tip").className='aj_right';
		}
		checkAll.str_company_lastname=true;
	}

	/*判断有没有写职位*/
	/*this.Isvalidposition=Isvalidposition;
	function Isvalidposition(){
		var str = regex.Trim(ajax.$('position').value);
		if( str !="" ){
			if( regex.ValidateChinaCode(str) ){
			ajax.$("position_tip").innerHTML=img_err+array_lang_reg[10];
			ajax.$("position_tip").className='aj_error';
			checkAll.str_position=false;
			return false;
			}
			else{
				ajax.$("position_tip").innerHTML=img_rgt+array_lang_reg[32];
				ajax.$("position_tip").className='aj_right';
			}
		}
		else{
			ajax.$("position_tip").innerHTML="";
		}
		checkAll.str_position=true;
	}*/

	/*判断有没有写公司名称,再通过ajax查询数据库是否有记录*/
	this.Isvalidcompanyname=Isvalidcompanyname;
	function Isvalidcompanyname(){
		var str = regex.Trim(ajax.$('companyname').value);
		if( str=="" || str.length<1 || str.length>100 ){
			ajax.$("companyname_tip").innerHTML=img_err+array_lang_reg[13];
			ajax.$("companyname_tip").className='aj_error';
			return false;
		}else if( regex.ValidateChinaCode(str) ){
			ajax.$("companyname_tip").innerHTML=img_err+array_lang_reg[10];
			ajax.$("companyname_tip").className='aj_error';
			return false;
		}
		return true;
	}

	/*判断有没有写公司地址*/
	/*this.Isvalidaddress=Isvalidaddress;
	function Isvalidaddress(){
		var str = regex.Trim(ajax.$('add1').value);
		if( str=="" ){
			ajax.$("add1_tip").innerHTML=img_err+array_lang_reg[14];
			ajax.$("add1_tip").className='aj_error';
			checkAll.str_address=false;
			return false;
		}else if( regex.ValidateChinaCode(str) ){
			ajax.$("add1_tip").innerHTML=img_err+array_lang_reg[10];
			ajax.$("add1_tip").className='aj_error';
			checkAll.str_address=false;
			return false;
		}else{
			ajax.$("add1_tip").innerHTML=img_rgt+array_lang_reg[32];
			ajax.$("add1_tip").className='aj_right';
		}
		checkAll.str_address=true;
	}*/

	/*判断有没有选择国家*/
	this.Isvalidcountryid=Isvalidcountryid;
	function Isvalidcountryid(){
		var str = regex.Trim(ajax.$('countryid').value);
		if( str==0){
			ajax.$("city_tip").innerHTML="";
			if(ajax.$("city").value) ajax.$("city").value="";
			/*ajax.$("state_tip").innerHTML="";*/
			ajax.$("zip_tip").innerHTML="";
			if(ajax.$("zip").value) ajax.$("zip").value="";
			ajax.$("countryid_tip").innerHTML=img_err+array_lang_reg[15];
			ajax.$("countryid_tip").className='aj_error';
			checkAll.str_country_id=false;
			return false;
		}else if (str==243){
			ajax.$("city_tip").innerHTML=array_lang_reg[16];
			if(ajax.$("city").value) ajax.$("city").value="";
			ajax.$("city_tip").className='aj_init';
			/*ajax.$("state_tip").innerHTML=array_lang_reg[17];
			ajax.$("state_tip").className='aj_init';*/
			ajax.$("zip_tip").innerHTML=array_lang_reg[18];
			if(ajax.$("zip").value) ajax.$("zip").value="";
			ajax.$("zip_tip").className='aj_init';
			ajax.$("countryid_tip").innerHTML=img_rgt+array_lang_reg[32];
			ajax.$("countryid_tip").className='aj_right';
		}else{
			ajax.$("city_tip").innerHTML="";
			if(ajax.$("city").value) ajax.$("city").value="";
			/*ajax.$("state_tip").innerHTML="";*/
			ajax.$("zip_tip").innerHTML="";
			if(ajax.$("zip").value) ajax.$("zip").value="";
			ajax.$("countryid_tip").innerHTML=img_rgt+array_lang_reg[32];
			ajax.$("countryid_tip").className='aj_right';
		}
		checkAll.str_country_id=true;
	}

	/*判断有没有选择省份*/
	this.Isvalidstate=Isvalidstate;
	function Isvalidstate(){
		var str = regex.Trim(ajax.$('countryid').value);
		if( str==0){
			ajax.$("countryid_tip").innerHTML=img_err+array_lang_reg[15];
			ajax.$("countryid_tip").className='aj_error';
			checkAll.str_country_id=false;
			return false;
		}else if (str==243){
			if (regex.Trim(ajax.$('state').value) =="" ){
				ajax.$("state_tip").innerHTML=img_err+array_lang_reg[17];
				ajax.$("state_tip").className='aj_error';
				checkAll.str_country_id=false;
				return false;
			}
			else{
				ajax.$("state_tip").innerHTML=img_rgt+array_lang_reg[32];
				ajax.$("state_tip").className='aj_right';
			}
		}
			
		checkAll.str_country_id=true;
	}

		/*判断有没有选择省份-2*/
	this.Isvalidstate2=Isvalidstate2;
	function Isvalidstate2(){
		var str = regex.Trim(ajax.$('countryid').value);
		var str1 = regex.Trim(ajax.$('state2').value);
		if (str != 243){
			if (str1 != "" ){
				if ( regex.ValidateChinaCode(str1) ) {
					ajax.$("state_tip").innerHTML=img_err+array_lang_reg[10];
					ajax.$("state_tip").className='aj_error';
					checkAll.str_country_id=false;
					return false;
				}
				else{
					ajax.$("state_tip").innerHTML=img_rgt+array_lang_reg[32];
					ajax.$("state_tip").className='aj_right';
				}
			}
			else{
				ajax.$("state_tip").innerHTML="";
			}
		}
			
		checkAll.str_country_id=true;
	}

	/*判断有没有选择城市*/
	this.Isvalidcity=Isvalidcity;
	function Isvalidcity(){
		var str = regex.Trim(ajax.$('countryid').value);
		var str1 = regex.Trim(ajax.$('city').value);
		if(str1 != ""){
				if ( regex.ValidateChinaCode(str1) ) {
					ajax.$("city_tip").innerHTML=img_err+array_lang_reg[10];
					ajax.$("city_tip").className='aj_error';
					checkAll.str_country_id=false;
					return false;
				}
				else{
					ajax.$("city_tip").innerHTML=img_rgt+array_lang_reg[32];
					ajax.$("city_tip").className='aj_right';
				}
			 
		}	
		else {
			if (str==243){
				if (str1 =="" ){
					ajax.$("city_tip").innerHTML=img_err+array_lang_reg[16];
					ajax.$("city_tip").className='aj_error';
					checkAll.str_country_id=false;
					return false;
				}else if ( regex.ValidateChinaCode(str1) ) {
					ajax.$("city_tip").innerHTML=img_err+array_lang_reg[10];
					ajax.$("city_tip").className='aj_error';
					checkAll.str_country_id=false;
					return false;
				}else{
					ajax.$("city_tip").innerHTML=img_rgt+array_lang_reg[32];
					ajax.$("city_tip").className='aj_right';
				}
			}
			else{
				ajax.$("city_tip").innerHTML="";
			}
		}

		checkAll.str_country_id=true;
	}

	/*判断有没有选择邮编*/
	this.Isvalidzip=Isvalidzip;
	function Isvalidzip(){
		var str = regex.Trim(ajax.$('countryid').value);
		var str1 = regex.Trim(ajax.$('zip').value);
		if(str1 != ""){
				if ( regex.ValidateChinaCode(str1) ) {
					ajax.$("zip_tip").innerHTML=img_err+array_lang_reg[10];
					ajax.$("zip_tip").className='aj_error';
					checkAll.str_country_id=false;
					return false;
				}
				else{
					ajax.$("zip_tip").innerHTML=img_rgt+array_lang_reg[32];
					ajax.$("zip_tip").className='aj_right';
				}
			 
		}	
		else {
			if (str==243){
				if (str1 =="" ){
					ajax.$("zip_tip").innerHTML=img_err+array_lang_reg[16];
					ajax.$("zip_tip").className='aj_error';
					checkAll.str_country_id=false;
					return false;
				}else if ( regex.ValidateChinaCode(str1) ) {
					ajax.$("zip_tip").innerHTML=img_err+array_lang_reg[10];
					ajax.$("zip_tip").className='aj_error';
					checkAll.str_country_id=false;
					return false;
				}else{
					ajax.$("zip_tip").innerHTML=img_rgt+array_lang_reg[32];
					ajax.$("zip_tip").className='aj_right';
				}
			}
			else{
				ajax.$("zip_tip").innerHTML="";
			}
		}

		checkAll.str_country_id=true;
	}

/*判断有没有写电话*/
	this.Isvalidtel=Isvalidtel;
	function Isvalidtel(){
		var str1 = regex.Trim(ajax.$('tel_country').value);
		var str2 = regex.Trim(ajax.$('tel_area').value);
		var str3 = regex.Trim(ajax.$('tel_no').value);
		var str4 = regex.Trim(ajax.$('tel_ext').value);
		if( str1=="" || str2=="" || str3=="" || !(regex.is_numeric(str1)) || !(regex.is_numeric(str2)) || !(regex.is_numeric(str3)) ){
			ajax.$("tel_tip").innerHTML=img_err+array_lang_reg[20];
			ajax.$("tel_tip").className='aj_error';
			checkAll.str_tel=false;
			return false;
		}
		if( str4 !=""){
			if(  !(regex.is_numeric(str4)) ){
				ajax.$("tel_tip").innerHTML=img_err+array_lang_reg[20];
				ajax.$("tel_tip").className='aj_error';
				checkAll.str_tel=false;
				return false;
			}
		}
		checkAll.str_tel=true;
		ajax.$("tel_tip").innerHTML=img_rgt+array_lang_reg[32];
		ajax.$("tel_tip").className='aj_right';
	}
/*判断写入传真的格式*/
	this.Isvalidfax=Isvalidfax;
	function Isvalidfax(){
		var str1 = regex.Trim(ajax.$('faxcounty').value);
		var str2 = regex.Trim(ajax.$('faxarea').value);
		var str3 = regex.Trim(ajax.$('faxno').value);
		if( str1 !="" || str2 !="" || str3 !=""){
			if( str1=="" || str2=="" || str3=="" || !(regex.is_numeric(str1)) || !(regex.is_numeric(str2)) || !(regex.is_numeric(str3)) ){
				ajax.$("fax_tip").innerHTML=img_err+array_lang_reg[21];
				ajax.$("fax_tip").className='aj_error';
				checkAll.str_fax=false;
				return false;
			}
			ajax.$("fax_tip").innerHTML=img_rgt+array_lang_reg[32];
			ajax.$("fax_tip").className='aj_right';			
		}else{
			ajax.$("fax_tip").innerHTML="";
		}
		checkAll.str_fax=true;
	}
	

	/*判断写入手机的格式*/
	this.Isvalidmobile=Isvalidmobile;
	function Isvalidmobile(){
		var str1 = regex.Trim(ajax.$('mobilecountry').value);
		var str2 = regex.Trim(ajax.$('mobilearea').value);
		var str3 = regex.Trim(ajax.$('moblieno').value);
		if( str1 !="" || str2 !="" || str3 !=""){
			if( str2=="" || str3=="" || !(regex.is_numeric(str2)) || !(regex.is_numeric(str3)) ){
				ajax.$("mobile_tip").innerHTML=img_err+array_lang_reg[22];
				ajax.$("mobile_tip").className='aj_error';
				checkAll.str_fax=false;
				return false;
			}
			if(str1 !=""){
				if( !(regex.is_numeric(str1)) ){
					ajax.$("mobile_tip").innerHTML=img_err+array_lang_reg[22];
					ajax.$("mobile_tip").className='aj_error';
					checkAll.str_fax=false;
					return false;
				}
			}
			ajax.$("mobile_tip").innerHTML=img_rgt+array_lang_reg[32];
			ajax.$("mobile_tip").className='aj_right';
		}else{
			ajax.$("mobile_tip").innerHTML="";
		}
		checkAll.str_mobile=true;
	}

	/*判断有没有写公司信息*/
	this.Isvalidcompanyinfomation=Isvalidcompanyinfomation;
	function Isvalidcompanyinfomation(){
		var str = regex.Trim(ajax.$('infomation').value);
		if( str=="" || str.length <100 ){
			ajax.$("infomation_tip").innerHTML=img_err+array_lang_reg[29];
			ajax.$("infomation_tip").className='aj_error';
			checkAll.str_infomation=false;
			return false;
		}else if( regex.ValidateChinaCode(str) ){
				ajax.$("infomation_tip").innerHTML=img_err+array_lang_reg[10];
				ajax.$("infomation_tip").className='aj_error';
				checkAll.str_infomation=false;
				return false;
		}else{
			ajax.$("infomation_tip").innerHTML=img_rgt+array_lang_reg[32];
			ajax.$("infomation_tip").className='aj_right';
		}
		checkAll.str_infomation=true;
	}


		/*判断验证码*/
	
	
	/*用户名ajax部分*/
	var username_result=function(){
		if(request.readyState==4){
			if(request.responseText == 1){
				ajax.$("memberid_tip").innerHTML=img_err+array_lang_reg[33];
				ajax.$("memberid_tip").className='aj_error';
				checkAll.str_user_name=false;
				return false;
			}else{
				checkAll.str_user_name=true;
				ajax.$("memberid_tip").innerHTML=img_rgt+array_lang_reg[32];
				ajax.$("memberid_tip").className='aj_right';
				return true;
			}
			request = null;
		}
	}

	this.username = username;
	function username(){
		if(Isvalidname())
		{
			ajax.$("memberid_tip").innerHTML=array_lang_reg[36];
		
			var username = escape(ajax.utf16to8(ajax.$('memberid').value));
			var param = 'str_action='+'check_userlogin'+'&str_user_name='+username;
			post(username_result,param);
		}else{
			checkAll.str_user_name=false;
		}
	}

	/*用户名ajax部分结束*/
	
	/*邮件地址ajax*/
	var email_result=function(){
		if(request.readyState==4){
			if(request.responseText == 1){
				ajax.$("mail_tip").innerHTML=img_err+array_lang_reg[35];
				ajax.$("mail_tip").className='aj_error';
				checkAll.str_user_email=false;
				return false;
			}else{
				checkAll.str_user_email=true;
				ajax.$("mail_tip").innerHTML=img_rgt+array_lang_reg[32];
				ajax.$("mail_tip").className='aj_right';
				return true;
			}
			request = null;
		}
	}

	this.email = email;
	function email(){
		if(Isvalidemail("str_user_email"))
		{
			ajax.$("mail_tip").innerHTML=array_lang_reg[36];
			var username = escape(ajax.utf16to8(ajax.$('mail').value));
			var param = 'str_action=check_email&str_user_email='+username;
			post(email_result,param);
		}else{
			checkAll.str_user_email=false;
		}
	}
	/*邮件地址部分ajax结束*/

	/*公司名ajax部分*/
	var companyname_result=function(){
		if(request.readyState==4){
			if(request.responseText == 1){
				ajax.$("companyname_tip").innerHTML=img_err+array_lang_reg[34];
				ajax.$("companyname_tip").className='aj_error';
				checkAll.str_company_name=false;
				return false;
			}else{
				checkAll.str_company_name=true;
				ajax.$("companyname_tip").innerHTML=img_rgt+array_lang_reg[32];
				ajax.$("companyname_tip").className='aj_right';
				return true;
			}
			request = null;
		}
	}

	this.companyname = companyname;
	function companyname(){
		if(Isvalidcompanyname())
		{
			ajax.$("companyname_tip").innerHTML=array_lang_reg[36];
			var username = escape(ajax.utf16to8(ajax.$('companyname').value));
			var param = 'str_action=check_companylogin&str_company_name='+username;
			post(companyname_result,param);
		}else{
			checkAll.str_company_name=false;
		}
	}

	/*公司名ajax部分结束*/

	/*验证码ajax部分*/
	var authnum_result=function(){
		if(request.readyState==4){
			if(request.responseText == 1){
				ajax.$("verify_word_tip").innerHTML=img_err+array_lang_reg[31];
				ajax.$("verify_word_tip").className='aj_error';
				checkAll.str_authnum=false;
				return false;
			}else{
				checkAll.str_authnum=true;
				ajax.$("verify_word_tip").innerHTML=img_rgt+array_lang_reg[32];
				ajax.$("verify_word_tip").className='aj_right';
				return true;
			}
			request = null;
		}
	}

	this.authnum = authnum;
	function authnum(){
		if(Isvalidauthnum())
		{
			ajax.$("verify_word_tip").innerHTML=array_lang_reg[36];
			var authnum = escape(ajax.utf16to8(ajax.$('verify_word').value));
			var param = 'str_action='+'check_authnum'+'&str_user_authnum='+authnum;
			post(authnum_result,param);
		}else{
			checkAll.str_authnum=false;
		}
	}

	/*验证码ajax部分结束*/


	this.final = function (){
		username();
		Isvalidname();
		email();
		Isvalidemail();
		companyname();
		Isvalidcompanyname();
		Isvalidpassword();
		Isvalidrepassword();
		Isvalidcompanyfirstname();
		Isvalidcompanylastname();
		//Isvalidposition();
		if(checkAll.str_country_id != true)
		Isvalidcountryid();
		Isvalidcity();
		Isvalidzip();
		//Isvalidaddress();
		Isvalidtel();
		Isvalidfax();
		Isvalidmobile();
		//Isvalidcompanyinfomation();
		authnum();
		if( checkAll.str_user_name && 
			checkAll.str_user_email && 
			checkAll.str_user_remail && 
			checkAll.str_user_password && 
			checkAll.str_user_repassword && 
			checkAll.str_company_firstname && 
			checkAll.str_company_lastname && 
			//checkAll.str_position &&
			checkAll.str_company_name && 
			checkAll.str_country_id && 
			//checkAll.str_address &&
			checkAll.str_tel &&
			checkAll.str_fax &&
			checkAll.str_mobile &&
			//checkAll.str_infomation &&
			checkAll.str_authnum 
		){
			ajax.$('registerform').submit();
			//ajax.$('registerform').onsubmit="return true";
			return true;
		}else{
			//alert(array_lang_reg[42]);
			return false;
		}
	}

	this.bind=bind;
	function bind(){
		ajax.$('memberid').onblur = new Client('POST','joinmember.php').username;
		ajax.$('mail').onblur = new Client('POST','joinmember.php').email;
		ajax.$('companyname').onblur = new Client('POST','joinmember.php').companyname;
		ajax.$('remail').onblur = new Client('POST','joinmember.php').Isvalidremail;
		ajax.$('password').onblur = new Client('POST','joinmember.php').Isvalidpassword;
		ajax.$('repassword').onblur = new Client('POST','joinmember.php').Isvalidrepassword;
		ajax.$('firstname').onblur = new Client('POST','joinmember.php').Isvalidcompanyfirstname;
		ajax.$('lastname').onblur = new Client('POST','joinmember.php').Isvalidcompanylastname;
		//ajax.$('position').onblur = new Client('POST','joinmember.php').Isvalidposition;
		ajax.$('countryid').onblur = new Client('POST','joinmember.php').Isvalidcountryid;
		//ajax.$('add1').onblur = new Client('POST','joinmember.php').Isvalidaddress;
		ajax.$('countryid').onchange = new Client('POST','joinmember.php').Isvalidcountryid;
		ajax.$('city').onblur = new Client('POST','joinmember.php').Isvalidcity;
		ajax.$('zip').onblur = new Client('POST','joinmember.php').Isvalidzip;
		ajax.$('tel_country').onblur = new Client('POST','joinmember.php').Isvalidtel;
		ajax.$('tel_area').onblur = new Client('POST','joinmember.php').Isvalidtel;
		ajax.$('tel_no').onblur = new Client('POST','joinmember.php').Isvalidtel;
		ajax.$('tel_ext').onblur = new Client('POST','joinmember.php').Isvalidtel;
		ajax.$('faxcounty').onblur = new Client('POST','joinmember.php').Isvalidfax;
		ajax.$('faxarea').onblur = new Client('POST','joinmember.php').Isvalidfax;
		ajax.$('faxno').onblur = new Client('POST','joinmember.php').Isvalidfax;
		ajax.$('mobilecountry').onblur = new Client('POST','joinmember.php').Isvalidmobile;
		ajax.$('mobilearea').onblur = new Client('POST','joinmember.php').Isvalidmobile;
		ajax.$('moblieno').onblur = new Client('POST','addmember.addmember').Isvalidmobile;		
		//ajax.$('infomation').onblur = new Client('POST','joinmember.php').Isvalidcompanyinfomation;
		ajax.$('verify_word').onblur = new Client('POST','joinmember.php').authnum;

	}
}

-->