var poststate=false;
var loginstate=true;
var serveID="";

function doCharPost(){	
	if (poststate==true)
	{
		alert("正在提交，请稍等...！");
		return false;
	}else if($("y_Name").value==""||$("y_Name").value==null){
		alert("您的姓名没填写！");
		$("y_Name").focus();
		return false;
	}
	poststate=true;
	$("postForm").target="hidden_frame";//hidden_frame
	$("postForm").action="/postAction.asp";
	$("postForm").submit();	
}

function doFengshuiPost(){
	if (poststate==true)
	{
		alert("正在提交，请稍等...！");
		return false;
	}else if($("FenContent").value==""||$("FenContent").value==null){
		alert("您要预测的内容没填写！");
		$("FenContent").focus();
		return false;
	}else if($("Tel").value==""||$("Tel").value==null){
		alert("请填写电话号码，方便工作人员与你联系！");
		$("Tel").focus();
		return false;
	}
	poststate=true;
	$("postForm").target="hidden_frame";//hidden_frame
	$("postForm").action="/postAction.asp";
	$("postForm").submit();	


}

function doselectPost(){
	if (poststate==true)
	{
		alert("正在提交，请稍等...！");
		return false;
	}else if($("SelContent").value==""||$("SelContent").value==null){
		alert("您要择日的内容没填写！");
		$("SelContent").focus();
		return false;
	}

	poststate=true;
	$("postForm").target="hidden_frame";//hidden_frame
	$("postForm").action="/postAction.asp";
	$("postForm").submit();

}
 function doMarriagePost(){
	if (poststate==true)
	{
		alert("正在提交，请稍等...！");
		return false;
	}else if($("y_Name").value==""||$("y_Name").value==null){
		alert("您的姓名没填写！");
		$("y_Name").focus();
		return false;
	}else if($("o_Name").value==""||$("o_Name").value==null){
		alert("对方姓名的姓名没填写！");
		$("o_Name").focus();
		return false;
	}		
	poststate=true;
	$("postForm").target="hidden_frame";//hidden_frame
	$("postForm").action="/postAction.asp";
	$("postForm").submit();
 
 
 }

 function doForecastPost(){
	if (poststate==true)
	{
		alert("正在提交，请稍等...！");
		return false;
	}else if($("F_guaxiang").value==""||$("F_guaxiang").value==null){
		alert("您的卦象没填写！");
		$("F_guaxiang").focus();
		return false;
	}else if($("FContent").value==""||$("FContent").value==null){
		alert("您预测的内容没填写！");
		$("FContent").focus();
		return false;
	}
	poststate=true;
	$("postForm").target="hidden_frame";//hidden_frame
	$("postForm").action="/postAction.asp";
	$("postForm").submit();
 
 
 }
function dostudentPost(){
	if (poststate==true)
	{
		alert("正在提交，请稍等...！");
		return false;
	}else if($("y_Name").value==""||$("y_Name").value==null){
		alert("您的姓名没填写！");
		$("y_Name").focus();
		return false;
	}else if($("stuContent").value==""||$("stuContent").value==null){
		alert("您预测的内容没填写！");
		$("stuContent").focus();
		return false;
	}
	poststate=true;
	$("postForm").target="hidden_frame";//hidden_frame
	$("postForm").action="/postAction.asp";
	$("postForm").submit();
}

function dohealthPost(){
	if (poststate==true)
	{
		alert("正在提交，请稍等...！");
		return false;
	}else if($("y_Name").value==""||$("y_Name").value==null){
		alert("您的姓名没填写！");
		$("y_Name").focus();
		return false;
	}else if($("HealContent").value==""||$("HealContent").value==null){
		alert("您的调节内容没填写！");
		$("HealContent").focus();
		return false;
	}
	poststate=true;
	$("postForm").target="hidden_frame";//hidden_frame
	$("postForm").action="/postAction.asp";
	$("postForm").submit();

}

function doACompanyPost(){
	if (poststate==true)
	{
		alert("正在提交，请稍等...！");
		return false;
	}else if($("c_industry").value==""||$("c_industry").value==null){
		alert("公司行业没填写！");
		$("c_industry").focus();
		return false;
	}
	poststate=true;
	$("postForm").target="hidden_frame";//hidden_frame
	$("postForm").action="/postAction.asp";
	$("postForm").submit();

}

function PayContent(v,u,url){
	if (u==""){
		if (!confirm ("您还没有登录，登录后才能支付，是否现在登录？"))return false;
		
		window.location.href="/index.asp?str_url="+url;
		return false;
	}
	
	
	if (!confirm("确认付费查看此文章详细吗？"))return false;
	
	UrlPost("/ActionPayCon.asp?id="+v,"hidden_frame");//hidden_frame


}

// 检查选择的经营模式，选择不能超过2个，已经超过2个能去除  
function checkBizType(obj) {  
	var counter = 0;  
	
	if ($("Type_Manufacturing").checked) { counter++; }  
	if ($("Type_Trade").checked) { counter++; }  
	if ($("Type_Service").checked) { counter++; }  
	if ($("Type_GovOther").checked) { counter++; }  

	if (counter > 2) {  
	  if ($(obj).checked) {  
		alert("最多只能选择2种经营模式!");  
		return false;  
	  }  
	}  

	return true;  
} 

function callbackPost(nType,Msg){
	
if (nType=="10000")
{
	alert("您的预测内容已经成功提交,24小时之内预测中心会将结果发给您,请登录用户中心注意查收!谢谢您的信任和支持!");
	window.location.href="/serve.asp?id="+Msg
}else if (nType=="20000")
{
	alert("请先注册登录后才能提交！");
	window.location.href="/index.asp?str_url="+Msg;
}else if (nType=="30000")
{	
	alert(Msg);
	if (!confirm ("现在充值吗？"))return false;

	window.location.href="/userManage/charge.asp";
	
	
}else if (nType=="50005")
{
	window.location.href="/viewcontent.asp?id="+Msg;
}


}
