var inDiv1=false;
jQuery().ready(function(){
	if(jQuery("#menu1")==null)return false;
	jQuery("#menu1").mouseout(function(){
		inDiv1=false;
	});
	jQuery("#weblink").mouseout(function(){
		inDiv1=false;
	});
	jQuery("#weblink").mousemove(function(){
		inDiv1=true;
	});
	jQuery("#menu1").mousemove(function(){
		inDiv1=true;
	});
});
setInterval (function(){//weblink
	if(jQuery("#weblink")==null)return ;
	if(inDiv1){
		jQuery("#weblink").show();
	}else{
		jQuery("#weblink").hide();
	}
},500);


function valueMenu_nav(s,m,n)
{
	if (n == "out"){
		 jQuery("#"+s+" a").attr("style","color:#FFFFFF; text-decoration:none; height:40px; display:block; font-weight:bold;");
		 jQuery("#"+m+"_a").css("color","#FFFFFF");
	}else{
		//alert(document.getElementById('menuUi'));
		//alert(jQuery("#menuUi"));
		if( jQuery("#menuUi li a")==null)return;
		jQuery("#menuUi li a").each(
							 function(e){
								 jQuery(this).attr("style"," ");
							 });
		jQuery("#menuUi li a").each(
							 function(e){
							//	 jQuery(this).css("color","#717171");
							 }); 
		
		//jQuery("#"+m+"_a").css("color","#7fa93b");
		//jQuery("#"+s+" a").attr("style","color:#FFFFFF; text-decoration:none; background:url(/images/menu_on.gif) no-repeat center top; width:135px; height:46px; display:block");
		jQuery("#"+s+" a").attr("style","olor:#ffffff; text-decoration:none; background:url(images/hover_bg.gif); background-repeat:repeat-x; border-left:#006e01 solid 1px; border-right:#006e01 solid 1px; display:block; height:40px;");
		if(s == "home")
			jQuery('#menu_nav').html('<span style="padding-left:0px;" >欢迎来到八联网络科技有限公司</span>');
		if(s == "domain")
			jQuery('#menu_nav').html('');
		if(s == "email")
			jQuery('#menu_nav').html('<span style="padding-left:650px"><a href="/email.php">邮箱计划</a> | <a href="/email_controller.php">垃圾邮件控制中心</a> | <a href="/email_smtp.php">监控邮箱</a> | <a href="/email_services.php">增值服务</a></span>');
		if(s == "host")
			jQuery('#menu_nav').html('<span style="padding-left:170px"><a href="/hosting_table.php?type=c">C型香港虚拟主机</a> | <a href="/hosting_table.php?type=a">A型香港虚拟主机</a> | <a href="/hosting_services.php">增值服务</a> | <a href="/hosting_advance.php">香港虚拟主机优势</a>  |  <a href="/hosting_networks_wn.php">带宽管理</a>  |  <a href="/hosting_networks_data.php">数据中心</a></span>');
		if(s == "server")
			jQuery('#menu_nav').html('<span style="padding-left:80px"><a href="/server_dedicated.php?type=0">租用精选香港服务器</a> | <a href="/server_dedicated.php?type=1">租用戴尔香港服务器</a> | <a href="/server_services_basic.php">基本服务</a> | <a href="/server_services_maintenance.php">代维服务</a> | <a href="/server_services_add.php">增值服务</a> | <a href="/advance.php">香港服务器优势</a>  |  <a href="/server_networks_wn.php">带宽管理</a>  |  <a href="/server_networks_data.php">机房介绍</a></span>');
	    if(s == "server_tg")
			jQuery('#menu_nav').html('<span style="padding-left:100px"><a href="/server_allocated.php">托管香港服务器</a> | <a href="/allocated_services_basic.php">基本服务</a> | <a href="/allocated_services_maintenance.php">代维服务</a> | <a href="/allocated_services_add.php">增值服务</a> | <a href="/advance.php">香港服务器优势</a>  |  <a href="/allocated_networks_wn.php">带宽管理</a> | <a href="allocated_networks_data.php">机房介绍</a></span>');
		if(s == "web")
			jQuery('#menu_nav').html('');
		if(s == "eshop")
			jQuery('#menu_nav').html('');	
		if(s == "dl")
			jQuery('#menu_nav').html('<span style="padding-left:550px;"><a href="/agents.php">代理专区</a> | <a href="/agents_apply.php">代理申请</a> | <a href="/agents_step.php">申请步骤</a> | <a href="http://agent.communilink.cn" target="_blank"">代理管理平台</a></span>');	
	    if(s == "other")
			jQuery('#menu_nav').html('<span style="padding-left:815px;"><a href="/domain.php">域名</a> | <a href="/eceshop.php">网店</a> | <a href="http://www.gathermind.cn/" target="_blank">建站</a></span>');	
	    if(s == "vps")
			jQuery('#menu_nav').html('');	
	}
	
	if (m == "load"){	 
		 jQuery("#"+s+" a").attr("style","color:#FFFFFF; text-decoration:none; height:40px; display:block");
	}
}



function host_search(s)
{	
	jQuery("#host_r").attr("style","display:none");
	jQuery("#host_r_ajax").attr("style","display:");
	var str = s.substr(0,(s.length-1));
	for(var i=0;i<7;i++)
	{
		jQuery("#"+str+i).attr("class"," ");
	}
	jQuery("#"+s).attr("class","search_all");//改變狀態
	jQuery("#"+str+"value").val(s);//改變隱藏的值
	
	jQuery("#"+str).text(jQuery("#"+s+" a").text());//頁面顯示搜索條件
	//ajax
	ajax_go();
}
function host_search_reset()
{	
	jQuery("#host_r").attr("style","display:none");
	jQuery("#host_r_ajax").attr("style","display:");
	jQuery("#search_ul li span").each(
						 function(e){
							 jQuery(this).attr("class"," ");
						 });
	jQuery("#price_search_0").attr("class","search_all");
	jQuery("#db_search_0").attr("class","search_all");
	jQuery("#language_search_0").attr("class","search_all");
	jQuery("#space_search_0").attr("class","search_all");
	
	jQuery("#price_search_value").val("0");//隱藏值變0
	jQuery("#db_search_value").val("0");
	jQuery("#language_search_value").val("0");
	jQuery("#space_search_value").val("0");
	
	jQuery("#price_search_").text("");//條件值變0
	jQuery("#db_search_").text("");
	jQuery("#language_search_").text("");
	jQuery("#space_search_").text("");
	
	ajax_go();
}

function ajax_go()
{	
	jQueryprice = jQuery("#price_search_value").val();
	jQuerydb = jQuery("#db_search_value").val();
	jQuerylanguage = jQuery("#language_search_value").val();
	jQueryspace = jQuery("#space_search_value").val();
	jQuery.get(
      'ajax_search.php',
      {
        price:jQueryprice,
        db:jQuerydb,
        language:jQuerylanguage,
        space:jQueryspace
      },
      function(data) //回传函数
      {
        jQuery("#host_r_ajax_main").html(data);
      }
    );	
}
function alone_radio_click(s)
{	
	for(var i=0;i<9;i++)
	{
		jQuery("#priceH_span_"+i).text("");
		jQuery("#price_span_"+i).show();
		jQuery("#priceH_span_"+i).hide();
	}

	var m = parseInt(jQuery("#price_span_"+s).text())+300;
	jQuery("#priceH_span_"+s).text(m);
	jQuery("#price_span_"+s).hide();
	jQuery("#priceH_span_"+s).show();

	for(var i=1;i<9;i++)
	{	
		jQuery("#alone_radio"+i).val("0");
	}
	jQuery("#alone_radio"+s).val("1");//guanjian a 購買鏈接是否點擊價錢
}
function alone_radio_click1(s)
{
	for(var i=0;i<9;i++)
	{
		jQuery("#priceH_span1_"+i).text("");
		jQuery("#price_span1_"+i).show();
		jQuery("#priceH_span1_"+i).hide();
	}

	var m = parseInt(jQuery("#price_span1_"+s).text())+300;
	jQuery("#priceH_span1_"+s).text(m);
	jQuery("#price_span1_"+s).hide();
	jQuery("#priceH_span1_"+s).show();
	for(var i=1;i<9;i++)
	{	
		jQuery("#alone_radio1"+i).val("0");
	}
	jQuery("#alone_radio1"+s).val("1");//guanjian a 購買鏈接是否點擊價錢
}

function step1_host_alone()
{
	if(jQuery("#alone_if").val() == 1)
	{	
		jQuery("#alone_if").val("0");
		for(var i=1;i<9;i++)
		{
				 jQuery("#price_host_"+i+" option:first-child").val(parseInt(jQuery("#price_host_"+i+" option:first-child").val())-300); 
			jQuery("#price_host_"+i+" option:first-child").text(parseInt(jQuery("#price_host_"+i+" option:first-child").val())+"元/ 年");
				 jQuery("#price_host_"+i+" option:nth-child(2)").val(parseInt(jQuery("#price_host_"+i+" option:nth-child(2)").val())-300*2);	
				 		var js2 = parseInt(jQuery("#price_host_"+i+" option:nth-child(2)").val())/0.95 - parseInt(jQuery("#price_host_"+i+" option:nth-child(2)").val());
			jQuery("#price_host_"+i+" option:nth-child(2)").text(parseInt(jQuery("#price_host_"+i+" option:nth-child(2)").val())+"元/2年 (节省 "+js2+" 元)");
				 jQuery("#price_host_"+i+" option:nth-child(3)").val(parseInt(jQuery("#price_host_"+i+" option:nth-child(3)").val())-300*3);
				 		var js3 = parseInt(jQuery("#price_host_"+i+" option:nth-child(3)").val())/0.9 - parseInt(jQuery("#price_host_"+i+" option:nth-child(3)").val());
			jQuery("#price_host_"+i+" option:nth-child(3)").text(parseInt(jQuery("#price_host_"+i+" option:nth-child(3)").val())+"元/3年 (节省 "+js3+" 元)");
				 jQuery("#price_host_"+i+" option:nth-child(4)").val(parseInt(jQuery("#price_host_"+i+" option:nth-child(4)").val())-300*5);
				 		var js5 = parseInt(jQuery("#price_host_"+i+" option:nth-child(4)").val())/0.85 - parseInt(jQuery("#price_host_"+i+" option:nth-child(4)").val());
			jQuery("#price_host_"+i+" option:nth-child(4)").text(parseInt(jQuery("#price_host_"+i+" option:nth-child(4)").val())+"元/5年 (节省 "+js5+" 元)");
		}
	}else if(jQuery("#alone_if").val() == 0)
	{	
		jQuery("#alone_if").val("1");
		for(var i=1;i<9;i++)
		{	
				jQuery("#price_host_"+i+" option:first-child").val(parseInt(jQuery("#price_host_"+i+" option:first-child").val())+300);
			jQuery("#price_host_"+i+" option:first-child").text((parseInt(jQuery("#price_host_"+i+" option:first-child").val()))+"元/ 年");
				jQuery("#price_host_"+i+" option:nth-child(2)").val(parseInt(jQuery("#price_host_"+i+" option:nth-child(2)").val())+300*2);
					var js2 = (parseInt(jQuery("#price_host_"+i+" option:nth-child(2)").val())-300*2)/0.95 - (parseInt(jQuery("#price_host_"+i+" option:nth-child(2)").val())-300*2);
			jQuery("#price_host_"+i+" option:nth-child(2)").text(parseInt(jQuery("#price_host_"+i+" option:nth-child(2)").val())+"元/2年 (节省 "+js2+" 元)");
				 jQuery("#price_host_"+i+" option:nth-child(3)").val(parseInt(jQuery("#price_host_"+i+" option:nth-child(3)").val())+300*3);
				 	var js3 = (parseInt(jQuery("#price_host_"+i+" option:nth-child(3)").val())-300*3)/0.9 - (parseInt(jQuery("#price_host_"+i+" option:nth-child(3)").val())-300*3);
			jQuery("#price_host_"+i+" option:nth-child(3)").text(parseInt(jQuery("#price_host_"+i+" option:nth-child(3)").val())+"元/3年 (节省 "+js3+" 元)");
				 jQuery("#price_host_"+i+" option:nth-child(4)").val(parseInt(jQuery("#price_host_"+i+" option:nth-child(4)").val())+300*5);
				 	var js5 = (parseInt(jQuery("#price_host_"+i+" option:nth-child(4)").val())-300*5)/0.85 - (parseInt(jQuery("#price_host_"+i+" option:nth-child(4)").val())-300*5);
			jQuery("#price_host_"+i+" option:nth-child(4)").text(parseInt(jQuery("#price_host_"+i+" option:nth-child(4)").val())+"元/5年 (节省 "+js5+" 元)");
		}
	}
}
function host_step1go()
{	
	var s = jQuery("#buy_id").val();
	var price_last = jQuery("#price_host_"+s+" option:selected").text();
	price_last = encodeURI(price_last);
	location.href="step2.php?type=host&id="+jQuery("#buy_id").val()+"&priceIf="+jQuery("#alone_if").val()+"&price_last="+price_last;	
}
function server_step1go()//kllk
{	
	var s = jQuery("#buy_server_id").val();
	var price_last = jQuery("#price_server_"+s+" option:selected").val();
	price_last = encodeURI(price_last);
	location.href="step2.php?type=server&id="+s+"&price_last="+price_last;	
}
function email_step1go()//kllk
{	
	var s = jQuery("#buy_email_name").val();
	var price_last = jQuery("#price_email_"+s+" option:selected").val();
	price_last = encodeURI(price_last);
	location.href="step2.php?type=email&name="+s+"&price_last="+price_last;	
}
function ecshop_step1go()
{	
	var id = jQuery("#ecshop input:checked").val();
	var price_last = jQuery("#ecshop_server_"+id+" option:selected").val();

	location.href="step2.php?type=ecshop&id="+id+'&price_last='+price_last;	
}
function m_step1go()
{	
	var id = jQuery("#managed input:checked").val();
	var price_last = jQuery("#price_m_"+id+" option:selected").val();
	var name=jQuery("#mname"+id).val();

	if(typeof(id)=='undefined'){
		alert('请选择项目!');
		return;
	}
	location.href="step2.php?type=managed&id="+id+'&price_last='+price_last+'&name='+name;	
}

function step2_form_check()
{
	var _form  = document.getElementById("step2_form");
		if(_form.compname.value == "")
		{
			alert("请填写持有人/公司名称");
			_form.compname.style.border = "red thin solid"
			_form.compname.focus();
			return false;
		}
		if(_form.linkman.value == "")
		{
			alert("请填写联系人");
			_form.linkman.style.border = "red thin solid"
			_form.linkman.focus();
			return false;
		}
		if(_form.Email.value == "")
		{
			alert("请填写电子邮件");
			_form.Email.style.border = "red thin solid"
			_form.Email.focus();
			return false;
		}if(!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(_form.Email.value))
		{	
			alert("请正确填写电子邮件");
			_form.Email.style.border = "red thin solid"
			_form.Email.focus();
			return false;
		}
		if(_form.fax.value == "")
		{
			alert("请填写传真号码");
			_form.fax.style.border = "red thin solid"
			_form.fax.focus();
			return false;
		}
		if(_form.area.value == "")
		{
			alert("请填写所属区域");
			_form.area.style.border = "red thin solid"
			_form.area.focus();
			return false;
		}
		if(_form.address.value == "")
		{
			alert("请填写通信地址");
			_form.address.style.border = "red thin solid"
			_form.address.focus();
			return false;
		}
		if(_form.phone_m.value == "")
		{
			alert("请填写联系电话");
			_form.phone_m.style.border = "red thin solid"
			_form.phone_m.focus();
			return false;
		}
		if(_form.read.checked == false)
		{
			alert("请阅读条款");
			return false;
		}
		
	return true;	
}

function step2_form_submit()
{
	var _form  = document.getElementById("step2_form");
	//var s =1;
	var s = step2_form_check();
	if(_form.type.value == "host" && s)
	{
		if(_form.host_domain.value == "")
		{
			alert("请填写主机域名");
			_form.host_domain.style.border = "red thin solid"
			_form.host_domain.focus();
			s = 0;
		}
		host_domain_check_fun();
		if(_form.host_domain_check_if.value == "0")
		{
			alert("请输入正确的主机域名");
			_form.host_domain.style.border = "red thin solid"
			_form.host_domain.focus();
			s=0;
		}
		
	}if(_form.type.value == "email" && s)
	{
		if(_form.email_domain.value == "" && s)
		{
			alert("请填写域名名称");
			_form.email_domain.style.border = "red thin solid"
			_form.email_domain.focus();
			s = 0;
		}
		domain_email_check();
		if(_form.domain_email_check_if.value == "0")
		{
			alert("请输入正确的主机域名");
			_form.email_domain.style.border = "red thin solid"
			_form.email_domain.focus();
			s=0;
		}
	}if(_form.type.value == "domain" && s)
	{
		if(_form.domain_domain.value == "" && s)
		{
			alert("请填写域名名称");
			_form.domain_domain.style.border = "red thin solid"
			_form.domain_domain.focus();
			s = 0;
		}
		domain_domain_check();
		if(_form.domain_domain_check_if.value == "0")
		{
			alert("请输入正确的主机域名");
			_form.domain_domain.style.border = "red thin solid"
			_form.domain_domain.focus();
			s=0;
		}
	}
	 if(_form.type.value =='ecshop' && s){
		if(_form.ecshop_domain.value == "")
		{
			alert("请填写主机域名");
			_form.ecshop_domain.style.border = "red thin solid"
			_form.ecshop_domain.focus();
			s = 0;
		}
		//ecshop_domain_check_fun();
		if(_form.ecshop_domain_check_if.value == "0")
		{
			alert("请输入正确的主机域名");
			_form.ecshop_domain.style.border = "red thin solid"
			_form.ecshop_domain.focus();
			s=0;
		}
	}
	
	
	if(s)
	{	_form.submit();}
	return false;
}

function FormValidatorClient(theForm) {

			if (theForm.login.value=="") {
				alert("请输入用户名");
				theForm.login.focus();
				return (false);
			}
			
			if (theForm.password.value=="") {
				alert("请输入用密码");
				theForm.password.focus();
				return (false);
			}
}

function FormValidatorWhois(theForm) {
   		//temp = eval("document." + formname);
			if (theForm.domain.value=="") {
				alert("域名未填写");
				theForm.domain.focus();
				return (false);
			}
   		var checkok=false;
   		for (var i=0;i<theForm.elements.length;i++) {
      		var e = theForm.elements[i];
      		if (e.checked == true) {checkok=true;}
   		}	
   		if (checkok==false) {
   			alert("请选择最少一个类别域名 (如:.com / .net)");
   			return (false);
   		}
}
function support_form_check(form)
{
	if(form.name.value == "")
	{
		alert("请输入姓名");
		form.name.focus();
		return false;
	}
	if(form.email.value == "")
	{
		alert("请输入邮箱地址");
		form.email.focus();
		return false;
	}if(!/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*jQuery/.test(form.email.value))
		{	
			alert("请正确填写邮箱地址");
			form.email.focus();
			return false;
		}
	if(form.phone.value == "")
	{
		alert("请输入电话");
		form.phone.focus();
		return false;
	}	
	if(form.domainName.value == "")
	{
		alert("请输入域名/用户名");
		form.domainName.focus();
		return false;
	}	
	if(form.subject.value == "")
	{
		alert("请输入主题");
		form.subject.focus();
		return false;
	}	
	if(form.content.value == "")
	{
		alert("请输入内容");
		form.content.focus();
		return false;
	}	if(form.code.value == "")
	{
		alert("请输入验证码");
		form.code.focus();
		return false;
	}	
	return true;	
}
function host_domain_check_fun()
{	
	var host_domain = jQuery("#host_domain").val();
	var host_domain_ext = jQuery("#host_domain_ext option:selected").text();
	if(!/^([\w-]+\.)+((com)|(net)|(org)|(gov\.cn)|(info)|(cc)|(com\.cn)|(net\.cn)|(org\.cn)|(name)|(biz)|(tv)|(cn)|(mobi)|(name)|(sh)|(ac)|(io)|(tw)|(com\.tw)|(hk)|(com\.hk)|(ws)|(travel)|(us)|(tm)|(la)|(me\.uk)|(org\.uk)|(ltd\.uk)|(plc\.uk)|(in)|(eu)|(it)|(jp))$/.test(host_domain+"."+host_domain_ext) || host_domain =="")
	{
		jQuery("#host_domain_check_mes").text("请输入正确的域名 如：Communilink.net, yahoo.com.hk");
		jQuery("#host_domain_check_if").val("0");
	}else{
			jQuery("#host_domain_check_mes").text("loading...检测中，请等待。");
			
			if(jQuery("#host_domain_check_x").val() == "new")
			{	
				jQuery.get("check_domain.php", { name:host_domain,name_ext:host_domain_ext},
					  function(data){
						//alert("Data Loaded: " + data);
						if(data == 1)
						{
							jQuery("#host_domain_check_if").val("1");
							jQuery("#host_domain_check_mes").text("可以使用！");
						}else
						{
							jQuery("#host_domain_check_mes").text("不可以使用，此域名已被注册或者域名错误！");	
							jQuery("#host_domain_check_if").val("0");
						}
					  }); 
				
			}
			else if(jQuery("#host_domain_check_x").val() == "has")
			{
					jQuery.get("check_domain.php", { name:host_domain,name_ext:host_domain_ext},
					  function(data){
						//alert("Data Loaded: " + data);
						if(data == 1)
						{
							jQuery("#host_domain_check_mes").text("不可以使用，此域名还没有被注册！");	
							jQuery("#host_domain_check_if").val("0");
						}else
						{	
							jQuery("#host_domain_check_if").val("1");
							jQuery("#host_domain_check_mes").text("可以使用！");
						}
					  }); 
			}
	}
}

function ecshop_domain_check_fun()
{	
	var host_domain = jQuery("#ecshop_domain").val();
	var host_domain_ext = jQuery("#ecshop_domain_ext option:selected").text();
	if(!/^([\w-]+\.)+((com)|(net)|(org)|(gov\.cn)|(info)|(cc)|(com\.cn)|(net\.cn)|(org\.cn)|(name)|(biz)|(tv)|(cn)|(mobi)|(name)|(sh)|(ac)|(io)|(tw)|(com\.tw)|(hk)|(com\.hk)|(ws)|(travel)|(us)|(tm)|(la)|(me\.uk)|(org\.uk)|(ltd\.uk)|(plc\.uk)|(in)|(eu)|(it)|(jp))$/.test(host_domain+"."+host_domain_ext) || host_domain =="")
	{
		jQuery("#ecshop_domain_check_mes").text("请输入正确的域名 如：Communilink.net, yahoo.com.hk");
		jQuery("#ecshop_domain_check_if").val("0");
	}else{		
			jQuery("#ecshop_domain_check_mes").text("loading...检测中，请等待。");
			var option1 = jQuery("input[name=ecshop_domain_check]:checked").val();
			if(option1 == "new")
			{	
				jQuery.get("check_domain.php", { name:host_domain,name_ext:host_domain_ext},
					  function(data){
						//alert("Data Loaded: " + data);
						if(data == 1)
						{
							jQuery("#ecshop_domain_check_if").val("1");
							jQuery("#ecshop_domain_check_mes").text("可以使用！");
						}else
						{
							jQuery("#ecshop_domain_check_mes").text("不可以使用，此域名已被注册或者域名错误！");	
							jQuery("#ecshop_domain_check_if").val("0");
						}
					  }); 
				
			}
			else if(option1 == "has")
			{
					jQuery.get("check_domain.php", { name:host_domain,name_ext:host_domain_ext},
					  function(data){
						//alert("Data Loaded: " + data);
						if(data == 1)
						{
							jQuery("#ecshop_domain_check_mes").text("不可以使用，此域名还没有被注册！");	
							jQuery("#ecshop_domain_check_if").val("0");
						}else
						{	
							jQuery("#ecshop_domain_check_if").val("1");
							jQuery("#ecshop_domain_check_mes").text("可以使用！");
						}
					  }); 
			}
	}
}
function domain_email_check()
{	
	var host_domain = jQuery("#email_domain").val();
	var host_domain_ext = jQuery("#email_domain_ext option:selected").text();
	if(!/^([\w-]+\.)+((com)|(net)|(org)|(gov\.cn)|(info)|(cc)|(com\.cn)|(net\.cn)|(org\.cn)|(name)|(biz)|(tv)|(cn)|(mobi)|(name)|(sh)|(ac)|(io)|(tw)|(com\.tw)|(hk)|(com\.hk)|(ws)|(travel)|(us)|(tm)|(la)|(me\.uk)|(org\.uk)|(ltd\.uk)|(plc\.uk)|(in)|(eu)|(it)|(jp))$/.test(host_domain+"."+host_domain_ext) || host_domain =="")
	{
		jQuery("#email_domain_check_mes").text("请输入正确的域名 如：Communilink.net, yahoo.com.hk");
		jQuery("#domain_email_check_if").val("0");
	}else{
			jQuery("#email_domain_check_mes").text("loading...检测中，请等待。");
			
				if(jQuery("#email_domain_check_x").val() == "new")
				{	
					jQuery.get("check_domain.php", { name:host_domain,name_ext:host_domain_ext},
						  function(data){
							//alert("Data Loaded: " + data);
							if(data == 1)
							{
								jQuery("#domain_email_check_if").val("1");
								jQuery("#email_domain_check_mes").text("可以使用！");
							}else
							{
								jQuery("#email_domain_check_mes").text("不可以使用，此域名已被注册或者域名错误！");	
								jQuery("#domain_email_check_if").val("0");
							}
						  }); 
					
				}
				else if(jQuery("#email_domain_check_x").val() == "has")
				{
						jQuery.get("check_domain.php", { name:host_domain,name_ext:host_domain_ext},
						  function(data){
							//alert("Data Loaded: " + data);
							if(data == 1)
							{
								jQuery("#email_domain_check_mes").text("不可以使用，此域名还没有被注册！");	
								jQuery("#domain_email_check_if").val("0");
							}else
							{		
								jQuery("#email_domain_check_mes").text("可以使用！");	
								jQuery("#domain_email_check_if").val("1");
							}
						  }); 
				}
	}
}
function domain_domain_check()
{	
	var host_domain = jQuery("#domain_domain").val();
	var host_domain_ext = jQuery("#domain_domain_ext").val();
	if(!/^([\w-]+\.)+((com)|(net)|(org)|(gov\.cn)|(info)|(cc)|(com\.cn)|(net\.cn)|(org\.cn)|(name)|(biz)|(tv)|(cn)|(mobi)|(name)|(sh)|(ac)|(io)|(tw)|(com\.tw)|(hk)|(com\.hk)|(ws)|(travel)|(us)|(tm)|(la)|(me\.uk)|(org\.uk)|(ltd\.uk)|(plc\.uk)|(in)|(eu)|(it)|(jp))$/.test(host_domain+"."+host_domain_ext) || host_domain =="")
	{
		jQuery("#domain_domain_check_mes").text("请输入正确的域名 如：Communilink.net, yahoo.com.hk");
		jQuery("#domain_domain_check_if").val("0");
	}else{
			jQuery("#domain_domain_check_mes").text("loading...检测中，请等待。");
			
				jQuery.get("check_domain.php", { name:host_domain,name_ext:host_domain_ext},
				  function(data){
					//alert("Data Loaded: " + data);
					if(data == 1)
					{
						jQuery("#domain_domain_check_if").val("1");
						jQuery("#domain_domain_check_mes").text("可以使用！");	
					}else
					{	
						jQuery("#domain_domain_check_mes").text("不可以使用，此域名已被注册！");	
						jQuery("#domain_email_check_if").val("0");
					}
				  }); 
	}
}

//eceshop menu
function swich_menu(str){
	for (i=1; i<=4; i++){
		document.getElementById("div_"+i).style.display="none";
	}
		document.getElementById("online_nav").className="online_nav"+str;
	document.getElementById("div_"+str).style.display="block";
}











