
//-团购-
 var diag_tuan = null;
function longinTuan(corpId,corpName,corpHomeSendInfoId)
{
	function destine_tuan(corpId,corpName,corpHomeSendInfoId)
	{
		diag_tuan = new Dialog("Diag_tuangou");
		diag_tuan.Width = 620;
		diag_tuan.Height = 475;
		diag_tuan.URL = ctx+'/corp/clientOrder.shtml?method=getTgActionPage';//&corpId='+ corpId +'&corpName='+ corpName
		diag_tuan.params={corpId:corpId,corpName:corpName,corpHomeSendInfoId:corpHomeSendInfoId};//做post数据用到的
		diag_tuan.showIframe();
	}
	
	function inContinue()
	{
		destine_tuan(corpId,corpName,corpHomeSendInfoId);
	}
	
	netUserLogin(inContinue);	
}

var diag_0 = null;
function destine_order(corpId,corpName, eatDate_, eatTime_, eatPersons_,dType_)
{
	diag_0 = new Dialog("DiagBookPub");
	diag_0.Width = 590;
	diag_0.Height = 500;
	diag_0.URL = ctx+"/corp/clientOrder.shtml?method=destineOrder";	
	//diag_0.params={corpId:corpId,corpName:corpName};//做post数据用到的 
	diag_0.params={corpId:corpId,corpName:corpName,date:eatDate_,time:eatTime_,pNum:eatPersons_,dType:dType_};
	diag_0.showIframe();
}

function no_login_destine_order(corpId,corpName, eatDate_, eatTime_, eatPersons_,dType_)
{
	diag_0 = new Dialog("DiagBookPub");
	diag_0.Width = 590;
	diag_0.Height = 630;
	diag_0.URL = ctx+"/corp/clientOrder.shtml?method=noLoginSestineOrder";	
	//diag_0.params={corpId:corpId,corpName:corpName};//做post数据用到的
	diag_0.params={corpId:corpId,corpName:corpName,date:eatDate_,time:eatTime_,pNum:eatPersons_,dType:dType_};
	
	diag_0.showIframe();
}

function isLoginDestine(corpId,corpName,strEatDate, strEatTime, strPersons,dType)
{
   /**
	   if(corpId=='7185')
		{
			longinTuan(corpId,corpName);
			return; 
		}
   **/
	
	var eatDate_ = strEatDate==undefined?"":strEatDate;
	var eatTime_ = strEatTime==undefined?"":strEatTime;
	var eatPersons_ = strPersons==undefined?"":strPersons;
	var dType_ = dType==undefined?"":dType;
	
	if($$("#netUserName").html() == "")
	{
		no_login_destine_order(corpId,corpName, eatDate_, eatTime_, eatPersons_,dType_);
	}
	else
	{
		destine_order(corpId,corpName, eatDate_, eatTime_, eatPersons_,dType_);
	}
}
