function FCKeditor_OnComplete( editorInstance ) { 
	editorInstance.Events.AttachEvent( 'OnBlur', new Client_anonymous_post_buy('POST','anonymous_post_buy.php').tb_description ) ; 
}

function anonymous_post_buy_check(){
	this.title = false;
	this.keyword=false;
	this.keyword1=true;
	this.keyword2=true;
	this.keyword3=true;
	this.catid=false;
	this.description=false;
	this.measurement = true;
	this.price=true;
	this.buy_amount=true;
	this.tb_package=true;
	this.realname=false;
	this.email=false;
	this.telephone=false;
	this.fax=true;
	this.mobile=true;
	this.cbi_name=true;
	this.area_id=true;
	this.address=true;
	this.reg_code=false;
}
var anonymous_post_buy_check = new anonymous_post_buy_check();

function Client_anonymous_post_buy(method, url) {
	var regex = new RegexValidation;
	var ajax = new HttpRequest(method, url);
	var request;
	var img_err = '<img src="../images/register/icon_noteawake_16x16.gif" alt="error"/>&nbsp;';
	var img_rgt = '<img src="../images/register/gou.gif" alt="right"/>&nbsp;';
	function post(callback, param) {
		request = ajax.init();
		ajax.post(request, callback, param);
	}
	
	//标题
	this.tb_title = tb_title;
	function tb_title(){
		if(ajax.Trim( ajax.$('tb_title').value ).length ==0){
			ajax.$('tb_title_tip').innerHTML = img_err+'请输入信息标题，长度为4-45个字';
			ajax.$("tb_title_tip").className='tab_s_e';
			anonymous_post_buy_check.title=false;
			return ;
		}
		if( ajax.Trim( ajax.$('tb_title').value ).length < 4 || ajax.Trim( ajax.$('tb_title').value ).length > 45 ){
			ajax.$('tb_title_tip').innerHTML = img_err+'信息标题的长度为4-45个字';
			ajax.$("tb_title_tip").className='tab_s_e';
			anonymous_post_buy_check.title=false;
			return ;
		}		
		ajax.$('tb_title_tip').innerHTML = img_rgt;	
		ajax.$("tb_title_tip").className='tab_s_r';	
		anonymous_post_buy_check.title=true;
	}

	//关键字
	this.tb_keyword = tb_keyword;
	function tb_keyword(){
		if(ajax.Trim( ajax.$('tb_keywords1').value ).length ==0 && ajax.Trim( ajax.$('tb_keywords2').value ).length ==0 && ajax.Trim( ajax.$('tb_keywords3').value ).length ==0 ){
			ajax.$('tb_keywords_tip').innerHTML = img_err+'请至少输入一个产品关键词';
			ajax.$("tb_keywords_tip").className='tab_s_e';
			anonymous_post_buy_check.keyword=false;
			return ;
		}else if ( !anonymous_post_buy_check.keyword1 || !anonymous_post_buy_check.keyword2 || !anonymous_post_buy_check.keyword3 )	{
			ajax.$('tb_keywords_tip').innerHTML = img_err+'您输入的关键词有误，每个关键词长度为2-30个字符';
			ajax.$("tb_keywords_tip").className='tab_s_e';	
			anonymous_post_buy_check.keyword=false;
			return ;
		}else{
			ajax.$('tb_keywords_tip').innerHTML = img_rgt;	
			ajax.$("tb_keywords_tip").className='tab_s_r';	
			anonymous_post_buy_check.keyword=true;
		}
	}

	this.tb_keyword1 = tb_keyword1;
	function tb_keyword1(){
		if( ajax.Trim( ajax.$('tb_keywords1').value ).length <2 || ajax.Trim( ajax.$('tb_keywords1').value ).length >30){
			ajax.$('tb_keywords_tip').innerHTML = img_err+'您输入的关键词有误，每个关键词长度为2-30个字符';
			ajax.$("tb_keywords_tip").className='tab_s_e';
			anonymous_post_buy_check.keyword1=false;
			return ;
		}else{
			ajax.$('tb_keywords_tip').innerHTML = img_rgt;	
			ajax.$("tb_keywords_tip").className='tab_s_r';	
			anonymous_post_buy_check.keyword1=true;
			anonymous_post_buy_check.keyword=true;
		}
	}
	this.tb_keyword2 = tb_keyword2;
	function tb_keyword2(){
		if( ajax.Trim( ajax.$('tb_keywords2').value ).length <2 || ajax.Trim( ajax.$('tb_keywords2').value ).length >30){
			ajax.$('tb_keywords_tip').innerHTML = img_err+'您输入的关键词有误，每个关键词长度为2-30个字符';
			ajax.$("tb_keywords_tip").className='tab_s_e';
			anonymous_post_buy_check.keyword2=false;
			return ;
		}else{
			ajax.$('tb_keywords_tip').innerHTML = img_rgt;	
			ajax.$("tb_keywords_tip").className='tab_s_r';	
			anonymous_post_buy_check.keyword2=true;
			anonymous_post_buy_check.keyword=true;
		}
	}

	this.tb_keyword3 = tb_keyword3;
	function tb_keyword3(){
		if( ajax.Trim( ajax.$('tb_keywords3').value ).length <2 || ajax.Trim( ajax.$('tb_keywords3').value ).length >30){
			ajax.$('tb_keywords_tip').innerHTML = img_err+'您输入的关键词有误，每个关键词长度为2-30个字符';
			ajax.$("tb_keywords_tip").className='tab_s_e';
			anonymous_post_buy_check.keyword3=false;
			return ;
		}else{
			ajax.$('tb_keywords_tip').innerHTML = img_rgt;	
			ajax.$("tb_keywords_tip").className='tab_s_r';	
			anonymous_post_buy_check.keyword3=true;
			anonymous_post_buy_check.keyword=true;
		}
	}
		
	//类目
	this.tb_catid = tb_catid;
	function tb_catid(){
		if(ajax.Trim( ajax.$('cat_id').value ).length ==0 ){
			ajax.$('cat_id_tip').innerHTML = img_err+'请选择发布产品所属的分类';
			ajax.$("cat_id_tip").className='tab_s_e';
			anonymous_post_buy_check.catid=false;
			return ;
		}
		
		ajax.$('cat_id_tip').innerHTML = img_rgt;	
		ajax.$("cat_id_tip").className='tab_s_r';	
		anonymous_post_buy_check.catid=true;
	}

	//信息详述
	this.tb_description = tb_description;
	function tb_description(){
		if ( ajax.$('edit2').checked ){
			var oEditor = FCKeditorAPI.GetInstance('str_tb_description');
			var fck_info_editor = ajax.Trim(oEditor.GetXHTML( true ));
			var str_fck_info_editor = String(fck_info_editor).replace(/&nbsp;/g,"");
			if( str_fck_info_editor.length ==0 ){
				ajax.$('tb_description_tip').innerHTML = img_err+'请输入信息详述，不能少于为30个字';
				ajax.$("tb_description_tip").className='tab_s_e';
				anonymous_post_buy_check.description=false;
				return ;				
			}
			if( str_fck_info_editor.length < 30){
				ajax.$('tb_description_tip').innerHTML = img_err+'信息详述，不能少于为30个字';
				ajax.$("tb_description_tip").className='tab_s_e';
				anonymous_post_buy_check.description=false;
				return ;
			}	
		}
		else{
			if(ajax.Trim( ajax.$('tb_description').value ).length ==0){
				ajax.$('tb_description_tip').innerHTML = img_err+'请输入信息详述，不能少于为30个字';
				ajax.$("tb_description_tip").className='tab_s_e';
				anonymous_post_buy_check.description=false;
				return ;
			}
			if( ajax.Trim( ajax.$('tb_description').value ).length < 30){
				ajax.$('tb_description_tip').innerHTML = img_err+'信息详述，不能少于为30个字';
				ajax.$("tb_description_tip").className='tab_s_e';
				anonymous_post_buy_check.description=false;
				return ;
			}		
		}
		ajax.$('tb_description_tip').innerHTML = img_rgt;	
		ajax.$("tb_description_tip").className='tab_s_r';	
		anonymous_post_buy_check.description=true;
	}

	//计量单位：tb_measurement
	this.tb_measurement = tb_measurement;
	function tb_measurement(){
		if ( ajax.Trim( ajax.$('tb_measurement').value ).length == 0 ){
			ajax.$('tb_measurement_tip').innerHTML = '请填写计量单位 例如 “个”，“桶”，“吨”';	
			ajax.$("tb_measurement_tip").className='right input_eg';	
			anonymous_post_buy_check.measurement=true;
			return ;
		}
		if(ajax.Trim( ajax.$('tb_measurement').value ).length <1 || ajax.Trim( ajax.$('tb_measurement').value ).length >6 ){
			ajax.$('tb_measurement_tip').innerHTML = img_err+'计量单位的长度为6个字符';
			ajax.$("tb_measurement_tip").className='tab_s_e';
			anonymous_post_buy_check.measurement=false;
			return ;
		}
		else{
			ajax.$('tb_measurement_tip').innerHTML = img_rgt;	
			ajax.$("tb_measurement_tip").className='tab_s_r';	
			anonymous_post_buy_check.measurement=true;
			return ;
		}	
	}

	//价格要求：tb_price
	this.tb_price = tb_price;
	function tb_price(){
		var price = ajax.Trim( ajax.$('tb_price').value);
		if( price != ""){
			var strP=/^\d+(\.\d+)?$/;
			var isok=strP.test(price);
			if(isok==false ){
				ajax.$('tb_price_tip').innerHTML = img_err+'价格必须用数字填写';
				ajax.$("tb_price_tip").className='tab_s_e';
				anonymous_post_buy_check.price=false;
				return false;
			}else{	
				ajax.$('tb_price_tip').innerHTML = img_rgt;	
				ajax.$("tb_price_tip").className='tab_s_r';	
				anonymous_post_buy_check.price=true;
				return true;
			}
		}
		ajax.$('tb_price_tip').innerHTML = '请填写价格，价格以人民币计算，例如 32.00';	
		ajax.$("tb_price_tip").className='right input_eg';	
		anonymous_post_buy_check.price=true;
	}
  
	//求购数量：tb_buy_amount
	this.tb_buy_amount = tb_buy_amount;
	function tb_buy_amount(){
		var amount = ajax.Trim( ajax.$('tb_buy_amount').value) ;
		if( amount.length!="" ){
			if ( amount.length > 14 ){
				ajax.$('tb_buy_amount_tip').innerHTML = img_err+'求购数量，最多14个字符';
				ajax.$("tb_buy_amount_tip").className='tab_s_e';
				anonymous_post_buy_check.buy_amount=false;
				return false;
			}
			else{
				ajax.$('tb_buy_amount_tip').innerHTML = img_rgt;	
				ajax.$("tb_buy_amount_tip").className='tab_s_r';	
				anonymous_post_buy_check.buy_amount=true;
				return true;
			}
		}
		ajax.$('tb_buy_amount_tip').innerHTML = '请输入求购数量，最多14个字符';	
		ajax.$("tb_buy_amount_tip").className='right input_eg';	
		anonymous_post_buy_check.buy_amount=true;
	}

	//包装要求:tb_package
	this.tb_package = tb_package;
	function tb_package(){
		var pack = ajax.Trim( ajax.$('tb_package').value);
		if( pack.length!=""){
			if ( pack.length >15 ){
				ajax.$('tb_package_tip').innerHTML = img_err+'包装要求，最多15个字';
				ajax.$("tb_package_tip").className='tab_s_e';
				anonymous_post_buy_check.tb_package=false;
				return false;
			}else{
				ajax.$('tb_package_tip').innerHTML = img_rgt;	
				ajax.$("tb_package_tip").className='tab_s_r';	
				anonymous_post_buy_check.tb_package=true;
				return true;
			}
		} 
		ajax.$('tb_package_tip').innerHTML = '请输入包装要求，最多15个字';
		ajax.$("tb_package_tip").className='right input_eg';
		anonymous_post_buy_check.tb_package=true;
	}

	//真实姓名
	this.ui_realname=ui_realname;
	function ui_realname(){
		var str = regex.Trim(ajax.$('ui_realname').value);
		if ( str == '' ){
			ajax.$("ui_realname_tip").innerHTML=img_err+"此项为必填项。由2-10个字组成";
			ajax.$("ui_realname_tip").className='tab_s_e';
			anonymous_post_buy_check.realname=false;
			return false;
		}else	if( str.length<2 || str.length>10 ){
			ajax.$("ui_realname_tip").innerHTML=img_err+"您的填写有误，真实姓名由2-10个字组成";
			ajax.$("ui_realname_tip").className='tab_s_e';
			anonymous_post_buy_check.realname=false;
			return false;
		}
		ajax.$("ui_realname_tip").innerHTML=img_rgt;
		ajax.$("ui_realname_tip").className='tab_s_r';
		anonymous_post_buy_check.realname=true;
	}

	//电子邮件
	this.Isvalidemail=Isvalidemail;
	function Isvalidemail(){
		var str = regex.Trim(ajax.$('user_email').value);
		if ( str == "" ){
			ajax.$("email_tip").innerHTML=img_err+"此项为必填项。请填写您的电子邮箱";
			ajax.$("email_tip").className='tab_s_e';
			return false;
		}else if( !regex.ValidateEmail(str) ){
			ajax.$("email_tip").innerHTML=img_err+"电子邮件格式不正确，请重新输入正确的电子邮箱格式，如:abc@busytrade.com";
			ajax.$("email_tip").className='tab_s_e';
			return false;
		}
		return true;
	}
	
	/*验证用户电话号码*/
	this.Isvalidphone1=Isvalidphone1;
	function Isvalidphone1(){
		var str1 = regex.Trim(ajax.$('cei_telephone1').value);
		
		if ( str1 != '' ){
			if(!(/^[0-9]{1,}$/.test(str1))) {
				ajax.$("telephone_tip").innerHTML=img_err+"国家区号填写错误，国家区号只能是数字";
				ajax.$("telephone_tip").className='tab_s_e';
				anonymous_post_buy_check.telephone=false;
				return false;
			} else{
				ajax.$("telephone_tip").innerHTML = "请继续填写区号";
				ajax.$("telephone_tip").className='input_eg';
				return true;				
			}
		}
		return true;
	}

	/*验证用户电话号码*/
	this.Isvalidphone2=Isvalidphone2;
	function Isvalidphone2(){
		var str2 = regex.Trim(ajax.$('cei_telephone2').value);		
		if ( Isvalidphone1() ){
			if ( str2 == '' ){
				ajax.$("telephone_tip").innerHTML=img_err+"此项为必填项";
				ajax.$("telephone_tip").className='tab_s_e';
				anonymous_post_buy_check.telephone=false;
				return false;
			}else	if(!(/^[0-9]{3,4}$/.test(str2))){
				ajax.$("telephone_tip").innerHTML=img_err+"区号填写错误，中国地区的区号只能是2-4位数字";
				ajax.$("telephone_tip").className='tab_s_e';
				anonymous_post_buy_check.telephone=false;
				return false;
			}else{
				ajax.$("telephone_tip").innerHTML = "请继续填写电话号码";
				ajax.$("telephone_tip").className='input_eg';
				return true;
			}
		}
		return false;
	}

	/*验证用户电话号码*/
	this.Isvalidphone3=Isvalidphone3;
	function Isvalidphone3(){
		var str3 = regex.Trim(ajax.$('cei_telephone3').value);
		if ( str3 == '' ){
			ajax.$("telephone_tip").innerHTML=img_err+"此项为必填项";
			ajax.$("telephone_tip").className='tab_s_e';
			anonymous_post_buy_check.telephone=false;
			return false;
		}else if ( Isvalidphone2() ){
			if(!(/^[0-9]{6,10}$/.test(str3))){
				ajax.$("telephone_tip").innerHTML=img_err+"电话号码错误，中国地区的电话号码只能是6或10位数字";
				ajax.$("telephone_tip").className='tab_s_e';
				anonymous_post_buy_check.telephone=false;
				return false;
			}else{
				ajax.$("telephone_tip").innerHTML = img_rgt;
				ajax.$("telephone_tip").className='tab_s_r';
				anonymous_post_buy_check.telephone=true;
			}
		}		
	}
	
	/*验证用户传真*/
	this.cei_fax1=cei_fax1;
	function cei_fax1(){
		var str1 = regex.Trim(ajax.$('cei_fax1').value);
		
		if ( str1 != '' ){
			if(!(/^[0-9]{1,}$/.test(str1))) {
				ajax.$("fax_tip").innerHTML=img_err+"国家区号填写错误，国家区号只能是数字";
				ajax.$("fax_tip").className='tab_s_e';
				anonymous_post_buy_check.fax=false;
				return false;
			} else{
				ajax.$("fax_tip").innerHTML = "请继续填写区号";
				ajax.$("fax_tip").className='input_eg';
				anonymous_post_buy_check.fax=false;
				return true;				
			}
		}
		return true;
	}

	/*验证用户传真*/
	this.cei_fax2=cei_fax2;
	function cei_fax2(){
		var str2 = regex.Trim(ajax.$('cei_fax2').value);
		if ( !cei_fax1() ){
			return false;
		}
		if ( cei_fax1() && str2 != '' ){
			if(!(/^[0-9]{2,4}$/.test(str2))){
				ajax.$("fax_tip").innerHTML=img_err+"区号填写错误，中国地区的区号只能是2-4位数字";
				ajax.$("fax_tip").className='tab_s_e';
				anonymous_post_buy_check.fax=false;
				return false;
			}else{
				ajax.$("fax_tip").innerHTML = "请继续填写传真号码";
				ajax.$("fax_tip").className='input_eg';
				anonymous_post_buy_check.fax=false;
				return true;
			}
		}
		return true;
	}

	/*验证用户传真*/
	this.cei_fax3=cei_fax3;
	function cei_fax3(){
		var str1 = regex.Trim(ajax.$('cei_fax1').value);
		var str2 = regex.Trim(ajax.$('cei_fax2').value);	
		var str3 = regex.Trim(ajax.$('cei_fax3').value);
		if ( !cei_fax2() ){
			return false;
		}
		if ( cei_fax2() && str3 != '' ){
			if(!(/^[0-9]{6,10}$/.test(str3))){
				ajax.$("fax_tip").innerHTML=img_err+"传真号码错误，中国地区的传真号码只能是6或10位数字";
				ajax.$("fax_tip").className='tab_s_e';
				anonymous_post_buy_check.fax=false;
				return false;
			}else{
				ajax.$("fax_tip").innerHTML = img_rgt;
				ajax.$("fax_tip").className='tab_s_r';
				anonymous_post_buy_check.fax=true;
			}
		}
		if ( str1 == '' && str2 == '' && str3 == '' ){
			ajax.$("fax_tip").className='input_eg';
			anonymous_post_buy_check.fax=true;
		}
	}

	/*验证用户输入的手机号码是否符合格式*/
	this.ui_mobile=ui_mobile;
	function ui_mobile(){
		var str = regex.Trim(ajax.$('ui_mobile').value);
		if( str.length!=0 && (!regex.ValidateNum(str) || str.length > 12) ){
			ajax.$("mobile_tip").innerHTML=img_err+"请用数字填写此项";
			ajax.$("mobile_tip").className='tab_s_e';
			anonymous_post_buy_check.mobile=false;
			return false;
		}else if( str.length == 0 || str=='' ){
			ajax.$("mobile_tip").innerHTML = "建议您填写，以便潜在客户及时与您联系，万国商业网将不会绑定该号码及收取任何费用！";		
			ajax.$("mobile_tip").className='input_eg';
		}else{
			ajax.$("mobile_tip").innerHTML = img_rgt;
			ajax.$("mobile_tip").className='tab_s_r';
		}
		anonymous_post_buy_check.mobile=true;
	}

	/*验证公司名*/
	this.Isvalidcbiname=Isvalidcbiname;
	function Isvalidcbiname(){
		var str = regex.Trim(ajax.$('cbi_name').value);
		if ( str != '' ){
			if(!(/^[\u4e00-\u9fa5,\(,\),\.]{2,80}$/.test(str))){
				ajax.$("company_name_tip").innerHTML=img_err+"请填写完整的公司名称";
				ajax.$("company_name_tip").className='tab_s_e';
				anonymous_post_buy_check.cbi_name=false;
				return false;
			}else{
				return true;
			}
		}
		ajax.$("company_name_tip").innerHTML='国内注册企业请用中文填写在工商局注册的全称；无商号的个体经营者填写执照上姓名，并标注个体经营。如：张三（个体经营）';
		ajax.$("company_name_tip").className='input_eg';
		anonymous_post_buy_check.cbi_name=true;
		return false;
	}
	
	/*地区*/
	this.cbi_area_id = cbi_area_id;
	function cbi_area_id(){
		var str = regex.Trim(ajax.$('cbi_area_id').value);
		if ( str == '' ){
			ajax.$("area_id_tip").innerHTML='';
			ajax.$("area_id_tip").className='tab_s_r';
			anonymous_post_buy_check.area_id=true;
			return false;
		}else{
			ajax.$("area_id_tip").innerHTML=img_rgt;
			ajax.$("area_id_tip").className='tab_s_r';
			anonymous_post_buy_check.area_id=true;
		}
	}

	/*详细地址*/
	this.cei_address = cei_address;
	function cei_address(){
		var str = regex.Trim(ajax.$('cei_address').value);
		if ( str != '' ){
			if ( str.length < 5 ){
				ajax.$("address_tip").innerHTML=img_err+"请填写完整的公司地址";
				ajax.$("address_tip").className='tab_s_e';
				anonymous_post_buy_check.address=false;	
				return false;
			}else{
				ajax.$("address_tip").innerHTML=img_rgt;
				ajax.$("address_tip").className='tab_s_r';
				anonymous_post_buy_check.address=true;
				return true;
			}
		ajax.$("address_tip").innerHTML='';
		ajax.$("address_tip").className='input_eg';
		anonymous_post_buy_check.address=true;
		}
	}

	/*邮件地址ajax*/
	var email_result=function(){
		if(request.readyState==4){
			if(request.responseText == 1){
				ajax.$("email_tip").innerHTML=img_err+"您填写的邮箱已被注册。请检查输入是否正确，或使用其他邮箱";
				ajax.$("email_tip").className='tab_s_e';
				anonymous_post_buy_check.email=false;
				return false;
			}else{
				anonymous_post_buy_check.email=true;
				ajax.$("email_tip").innerHTML=img_rgt+"恭喜你，此电子邮件可以注册";
				ajax.$("email_tip").className='tab_s_r';
				return true;
			}
			request = null;
		}
	}

	this.email = email
	function email(){
		if( Isvalidemail() )
		{
			ajax.$("email_tip").innerHTML="与服务器通信中";
			var user_email = escape(ajax.utf16to8(regex.Trim(ajax.$('user_email').value)));
			var param = 'ajax_action=check_email&user_email='+user_email;
			post(email_result,param);
		}else{
			anonymous_post_buy_check.email=false;
		}
	}
	/*邮件地址部分ajax结束*/	

	/*公司名ajax部分*/
	var cbiname_result=function(){
		if(request.readyState==4){
			if(request.responseText == 1){
				ajax.$("company_name_tip").innerHTML=img_err+"您填写的公司名称已存在，请再次核对。如果仍有疑问，请联系我们的客服。";
				ajax.$("company_name_tip").className='tab_s_e';
				anonymous_post_buy_check.cbi_name=false;
				return false;
			}else{
				anonymous_post_buy_check.cbi_name=true;
				ajax.$("company_name_tip").innerHTML=img_rgt+"恭喜您，此公司名称可以使用";
				ajax.$("company_name_tip").className='tab_s_r';
				return true;
			}
			request = null;
		}
	}

	this.cbiname = cbiname
	function cbiname(){
		if(Isvalidcbiname())
		{
			ajax.$("company_name_tip").innerHTML="与服务器通信中";
			var cbi_name = escape(ajax.utf16to8(regex.Trim(ajax.$('cbi_name').value)));
			var param = 'ajax_action='+'check_company'+'&cbi_name='+cbi_name;
			post(cbiname_result,param);
		}
	}

	/*公司名ajax部分结束*/

	//验证码
	var reg_code_result=function(){
		if(request.readyState==4){
			if(request.responseText == "yes"){
				ajax.$("validateCode_tip").innerHTML=img_rgt;
				ajax.$("validateCode_tip").className='tab_s_r';
				anonymous_post_buy_check.reg_code=true;
				return true;
			}else{
				ajax.$("validateCode_tip").innerHTML=img_err+"请正确填写验证码";	
				ajax.$("validateCode_tip").className='tab_s_e';
				anonymous_post_buy_check.reg_code=false;
				return false;
			}
			request = null;
		}
	}


	this.reg_code=reg_code
	function reg_code(){
		var code = regex.Trim(ajax.$('user_validateCode').value);
		if(code=="" || code.length<0){
			ajax.$("validateCode_tip").innerHTML=img_err+"此项为必填项";	
			ajax.$("validateCode_tip").className='tab_s_e';
			anonymous_post_buy_check.reg_code=false;
		}else{
			var param = 'ajax_action=check_reg_code&str_reg_code='+code;
			post(reg_code_result,param);
		}	
	}

	this.tb_submit=tb_submit;
	function tb_submit(){
		tb_title();
		tb_keyword();
		tb_catid();
		tb_description();
		tb_measurement();
		tb_price();
		tb_buy_amount();
		tb_package();
		ui_realname();
	//	user_email();
		Isvalidphone3();
		cei_fax3();
		ui_mobile();
	//	cbi_name();
		cbi_area_id();
		cei_address();
		reg_code();
	//	cbiname();
/*
alert( "title=" + anonymous_post_buy_check.title);
alert( "keyword=" +  anonymous_post_buy_check.keyword ); 
alert( "catid=" + anonymous_post_buy_check.catid );
alert( "description=" + anonymous_post_buy_check.description );  
alert( "description=" + anonymous_post_buy_check.price );
alert( "description=" + anonymous_post_buy_check.buy_amount );
alert( "description=" + anonymous_post_buy_check.tb_package );
alert( "description=" + anonymous_post_buy_check.realname );  
alert( "description=" + anonymous_post_buy_check.email );
alert( "description=" + anonymous_post_buy_check.telephone );
alert( "description=" + anonymous_post_buy_check.fax );
alert( "description=" + anonymous_post_buy_check.mobile );
alert( "description=" + anonymous_post_buy_check.cbi_name );
alert( "description=" + anonymous_post_buy_check.area_id );
alert( "description=" + anonymous_post_buy_check.address );
alert( "description=" + anonymous_post_buy_check.reg_code );
alert( "description=" + anonymous_post_buy_check.measurement);
*/
		if( anonymous_post_buy_check.title && anonymous_post_buy_check.keyword &&
			anonymous_post_buy_check.catid && anonymous_post_buy_check.description && 
			anonymous_post_buy_check.price && anonymous_post_buy_check.buy_amount && 
			anonymous_post_buy_check.tb_package && anonymous_post_buy_check.realname && 
			anonymous_post_buy_check.email && anonymous_post_buy_check.telephone && 
			anonymous_post_buy_check.fax && anonymous_post_buy_check.mobile && 
			anonymous_post_buy_check.cbi_name && anonymous_post_buy_check.area_id && 
			anonymous_post_buy_check.address && anonymous_post_buy_check.reg_code 
			&& anonymous_post_buy_check.measurement){
			//ajax.$('post_buy_info').onsubmit="return true";
			return true;
		}else{
			alert("您填写的信息有问题，请参看提示");
			return false;
		}
	}

	this.bind=bind;
	function bind(){
		ajax.$('tb_title').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').tb_title;
		ajax.$('tb_keywords1').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').tb_keyword1;
		ajax.$('tb_keywords2').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').tb_keyword2;
		ajax.$('tb_keywords3').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').tb_keyword3;
		ajax.$('str_cat_info').onblur= new Client_anonymous_post_buy('POST','anonymous_post_buy.php').tb_catid;
		ajax.$('tb_description').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').tb_description;
		ajax.$('tb_measurement').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').tb_measurement;
		ajax.$('tb_price').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').tb_price;
		ajax.$('tb_buy_amount').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').tb_buy_amount;
		ajax.$('tb_package').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').tb_package;
		ajax.$('ui_realname').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').ui_realname;
		ajax.$('user_email').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').email;
		ajax.$('cei_telephone1').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').Isvalidphone1;
		ajax.$('cei_telephone2').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').Isvalidphone2;
		ajax.$('cei_telephone3').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').Isvalidphone3;
		ajax.$('cei_fax1').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').cei_fax1;
		ajax.$('cei_fax2').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').cei_fax2;
		ajax.$('cei_fax3').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').cei_fax3;
		ajax.$('ui_mobile').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').ui_mobile;
		ajax.$('cbi_name').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').cbiname;
		ajax.$('cbi_area_id').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').cbi_area_id;
		ajax.$('cei_address').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').cei_address;
		ajax.$('user_validateCode').onblur = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').reg_code;
		//ajax.$('tb_submit').onclick = new Client_anonymous_post_buy('POST','anonymous_post_buy.php').tb_submit;
	}
}
