

/*
-- ------ Groupsale ------ --
*/
function Groupsale(){}
//-- ------ #Parameters ------ --

Groupsale.prototype.sAjax_0=new netsSingleAjax();

//-- ------ #Methods ------ --
//#Navigation
Groupsale.prototype.sNavigationCount=5;
Groupsale.prototype.OnNavigation=function(pIndex){
	var Coun0=0;
	while(Coun0<this.sNavigationCount){
		document.getElementById("MainNavigation_"+Coun0).className="Groupsale_Navigation_2";
		Coun0++;
	}
	
	document.getElementById("MainNavigation_"+pIndex).className="Groupsale_Navigation_2_A";
	return 0;
}
//#Tips
Groupsale.prototype.sTipsName="mainTips";
Groupsale.prototype.OnTipsShow=function(pType){
	if(pType==0){
		document.getElementById(this.sTipsName).className="Groupsale_Navigation_2";
	}else{
		document.getElementById(this.sTipsName).className=tmpCommon.sysHidden;
	}
	
	return 0;
}
//#Zones
Groupsale.prototype.sZonesButton="zonesButton";
Groupsale.prototype.sZonesBox="zonesBox";
Groupsale.prototype.sZonesLink="zonesLink";
Groupsale.prototype.sZonesURL="Plus/Common/Nets/Data_Groupsale_Zone.php";
Groupsale.prototype.sZonesLoaded=0;
Groupsale.prototype.OnZonesboxShow=function(pType){
	if(pType==0){
		document.getElementById(this.sZonesButton).className="Groupsale_Head_3_4";
		document.getElementById(this.sZonesBox).className="Groupsale_Head_3_5";
		document.getElementById(this.sZonesLink).className="Link2 FWhite1";
		if(this.sZonesLoaded==0){
			tmpURL=tmpCommon.sysRoot+this.sZonesURL;
			this.sAjax_0.sFlag="Data";
			this.sAjax_0.sPanel=this.sZonesBox+"_Content";
			this.sAjax_0.sURL=tmpURL;
			this.sAjax_0.sendRequestSp(tmpURL,"groupsale_ZonesboxShow_Callback();");
			//window.open(tmpURL,"_blank");
		}
		
	}else{
		document.getElementById(this.sZonesButton).className="Groupsale_Head_3_2";
		document.getElementById(this.sZonesBox).className=tmpCommon.sysHidden;
		document.getElementById(this.sZonesLink).className="Link2 FBlack2";
	}
	
	return 0;
}
function groupsale_ZonesboxShow_Callback(){
	var tmpFlag=tmpGroupsale.sAjax_0.sFlag;
	var tmpPanel=document.getElementById(tmpGroupsale.sAjax_0.sPanel);
	var tmpURL=tmpGroupsale.sAjax_0.sURL;
	var tmpHttpRequests=tmpGroupsale.sAjax_0.sHttpRequests;
	//alert(tmpHttpRequests.responseText);
	if(tmpHttpRequests.readyState==4){
		//alert(tmpHttpRequests.responseText);
		var tmpData=getDataByFlag(tmpHttpRequests.responseText,tmpFlag);
		//alert(tmpData);
		if(tmpData.indexOf("sendRequest")>=0 && tmpData!="<!--sendRequest-->"){
			tmpPanel.innerHTML=tmpData;
			tmpGroupsale.sZonesLoaded=1;
	    	tmpFrames.showLoading(1);
	    }else{
	    	tmpPanel.innerHTML=tmpCommon.sysError_Ajax.replace(/\{Nets.Response}/g,tmpURL);
	    	tmpFrames.showLoading(1);
	    }
	}else{
		tmpFrames.showLoading(0);
		tmpPanel.innerHTML=tmpCommon.sysLoading_Ajax;
	}
}
//#Time
Groupsale.prototype.sTimeboxs="";
Groupsale.prototype.OnTimerun=function(){
	var tmpDate_Today=new Date();
	var tmpDate_Endday=new Date();
	
	var tmpAR0=this.sTimeboxs.split(tmpCommon.sysSPLIT1);
	var Coun0=0;
	while(tmpAR0.length>Coun0){
		if(document.getElementById("GroupsaleTime_"+tmpAR0[Coun0]+"_Endtime")!=undefined){
			tmpSTR=document.getElementById("GroupsaleTime_"+tmpAR0[Coun0]+"_Endtime").value;
			tmpDate_Endday=tmpCommon.formatDate(tmpSTR);
			var tmpDatetime=this.DateSub(tmpDate_Endday,tmpDate_Today);

			document.getElementById("GroupsaleTime_"+tmpAR0[Coun0]+"_Day").innerHTML=tmpDatetime[0];
			document.getElementById("GroupsaleTime_"+tmpAR0[Coun0]+"_Hour").innerHTML=tmpDatetime[1];
			document.getElementById("GroupsaleTime_"+tmpAR0[Coun0]+"_Min").innerHTML=tmpDatetime[2];
			document.getElementById("GroupsaleTime_"+tmpAR0[Coun0]+"_Seconds").innerHTML=tmpDatetime[3];
		}
		Coun0++;
	}

	return 0;
}
Groupsale.prototype.DateSub=function(pDate,pDate_DIS){
	var tmpAR0=new Array(0,0,0,0);
	
	tmpYear=pDate.getYear()-pDate_DIS.getYear();
	tmpMonth=pDate.getMonth()-(pDate_DIS.getMonth()+1);
	tmpDay=pDate.getDay()-pDate_DIS.getDay();
	tmpHour=pDate.getHours()-pDate_DIS.getHours();
	tmpMinute=pDate.getMinutes()-pDate_DIS.getMinutes();
	tmpSecond=pDate.getSeconds()-pDate_DIS.getSeconds();
	
	if(tmpSecond<0){
		tmpMinute--;
		tmpSecond+=60;
	}
	if(tmpMinute<0){
		tmpHour--;
		tmpMinute+=60;
	}
	if(tmpHour<0){
		tmpDay--;
		tmpHour+=24;
	}
	if(tmpDay<0){
		tmpMonth--;
		tmpDay+=30;
	}
	if(tmpMonth<0){
		tmpYear--;
		tmpMonth+=12;
	}
	
	tmpAR0[0]=tmpYear*365+tmpMonth*30+tmpDay;
	tmpAR0[1]=tmpHour;
	tmpAR0[2]=tmpMinute;
	tmpAR0[3]=tmpSecond;
	return tmpAR0;
}
//#DetailTab
Groupsale.prototype.sDetailTabCount=2;
Groupsale.prototype.OnDetailTab=function(pIndex){
	var Coun0=0;
	while(this.sDetailTabCount>Coun0){
		document.getElementById("detailBox_"+Coun0+"_ImgA").src=tmpCommon.sysCoreRoot+"Ui/m_nets/Img/User/Groupsale/24.jpg";
		document.getElementById("detailBox_"+Coun0+"_ImgB").src=tmpCommon.sysCoreRoot+"Ui/m_nets/Img/User/Groupsale/24.jpg";
		document.getElementById("detailBox_"+Coun0+"_Button").className="GroupsaleDetail_49";
		document.getElementById("detailBox_"+Coun0+"_Box").className=tmpCommon.sysHidden;
		Coun0++;
	}
	
	document.getElementById("detailBox_"+pIndex+"_ImgA").src=tmpCommon.sysCoreRoot+"Ui/m_nets/Img/User/Groupsale/21.jpg";
	document.getElementById("detailBox_"+pIndex+"_ImgB").src=tmpCommon.sysCoreRoot+"Ui/m_nets/Img/User/Groupsale/22.jpg";
	document.getElementById("detailBox_"+pIndex+"_Button").className="GroupsaleDetail_48";
	document.getElementById("detailBox_"+pIndex+"_Box").className="GroupsaleDetail_34";
	return 0;
}
//#Setcode
Groupsale.prototype.sSetcodeURL="Plus/m_default/Groupsale/groupsaleDetail.php";
Groupsale.prototype.OnSetcode=function(pID,pType){

	tmpURL=tmpCommon.sysRoot+this.sSetcodeURL+"?ActionType=D"+pType+"&D"+pType+"="+pID;
	this.sAjax_0.sFlag="Message";
	this.sAjax_0.sPanel="mainCode_"+pID+"_"+pType;
	this.sAjax_0.sURL=tmpURL;
	this.sAjax_0.sendRequestSp(tmpURL,"groupsale_Setcode_Callback();");
	//window.open(tmpURL,"_blank");
	tmpFrames.showMessage('','正在为您保存数据...','',0);
	
	return 0;
}
function groupsale_Setcode_Callback(){
	var tmpFlag=tmpGroupsale.sAjax_0.sFlag;
	var tmpPanel=document.getElementById(tmpGroupsale.sAjax_0.sPanel);
	var tmpURL=tmpGroupsale.sAjax_0.sURL;
	var tmpHttpRequests=tmpGroupsale.sAjax_0.sHttpRequests;
	//alert(tmpHttpRequests.responseText);
	if(tmpHttpRequests.readyState==4){
		//alert(tmpHttpRequests.responseText);
		var tmpData=getDataByFlag(tmpHttpRequests.responseText,tmpFlag);
		//alert(tmpData);
		if(tmpData.indexOf("sendRequest")>=0 && tmpData!="<!--sendRequest-->"){
			var tmpAR0=tmpData.split(tmpCommon.sysSPLIT1);
			if(tmpAR0.length==2){
				tmpPanel.innerHTML=tmpAR0[1];
				tmpFrames.showMessage('',tmpAR0[0],'',0);
			}else{
				tmpFrames.showMessage('',tmpData,'',0);
			}
			
	    	tmpFrames.showLoading(1);
		}else{
			tmpFrames.showMessage("",tmpCommon.sysError_Ajax.replace(/\{Nets.Response}/g,tmpURL),"",0);
			tmpFrames.showLoading(1);
	    }
	}else{
		tmpFrames.showMessage("",tmpCommon.sysLoading_Ajax,"",0);
		tmpFrames.showLoading(0);
	}
}
//#MessageCopy
Groupsale.prototype.sMessageCopyName="messageCopy";
Groupsale.prototype.OnMessageCopy=function(pID,pType){

	if(pType==0){
		document.getElementById(this.sMessageCopyName+"Box_"+pID).className="GroupsaleDetail_51";
	}else{
		document.getElementById(this.sMessageCopyName+"Box_"+pID).className=tmpCommon.sysHidden;
	}

	return 0;
}
Groupsale.prototype.OnMessageCopyClick=function(pControl){
	pControl.select();
	
	return 0;
}
Groupsale.prototype.OnMessageCopyCopy=function(pID){
	tmpSTR=document.getElementById(this.sMessageCopyName+"Input_"+pID).value;
	tmpCommon.OnClipboard(tmpSTR);
	
	return 0;
}

//#Order
Groupsale.prototype.OnOrder_Initial=function(){
	document.getElementById("OrderUserinfo_Contact_ZoneTxt").rows[0].deleteCell(0);
	document.getElementById("OrderUserinfo_CCodeTxt").rows[0].deleteCell(0);
	
	return 0;
}
Groupsale.prototype.OnOrder_CalculationALL=function(){
	var tmpALL=0.00;
	
	tmpALL+=parseFloat(document.getElementById("OrderInfo_TotalPayTxt").value);
	
	
	
	document.getElementById("OrderInfo_ALLPAY").innerHTML=tmpALL;
	return 0;
}


Groupsale.prototype.OnOrder_CountAdd=function(pID){
	var tmpINT=parseInt(document.getElementById("OrderInfo_Count_"+pID+"_Txt").value);
	var tmpMax=parseInt(document.getElementById("OrderInfo_CountLimitMax_"+pID+"_Txt").value);
	tmpINT++;
	if(tmpMax<tmpINT){
		tmpINT=tmpMax;
	}
	
	document.getElementById("OrderInfo_Count_"+pID+"_Txt").value=tmpINT;
	
	this.OnOrder_ReCalculation();
	this.OnOrder_CalculationALL();
	return 0;
}
Groupsale.prototype.OnOrder_CountSub=function(pID){
	var tmpINT=parseInt(document.getElementById("OrderInfo_Count_"+pID+"_Txt").value);
	var tmpMin=parseInt(document.getElementById("OrderInfo_CountLimitMin_"+pID+"_Txt").value);
	tmpINT--;
	if(tmpMin>tmpINT){
		tmpINT=tmpMin;
	}
	
	document.getElementById("OrderInfo_Count_"+pID+"_Txt").value=tmpINT;
	
	this.OnOrder_ReCalculation();
	this.OnOrder_CalculationALL();
	return 0;
}
Groupsale.prototype.OnOrder_ReCalculation=function(){
	var Coun0=0;
	var tmpTotalPrice=0;
	var tmpIDS="";
	tmpElement=document.getElementById("OrderInfo_Price_"+Coun0);
	while(tmpElement!=undefined){
		var tmpPrice=parseFloat(document.getElementById("OrderInfo_Price_"+Coun0).innerHTML);
		var tmpINT=parseInt(document.getElementById("OrderInfo_Count_"+Coun0+"_Txt").value);
		var tmpMin=parseInt(document.getElementById("OrderInfo_CountLimitMin_"+Coun0+"_Txt").value);
		if(tmpMin>tmpINT){
			tmpINT=tmpMin;
		}
		var tmpMax=parseInt(document.getElementById("OrderInfo_CountLimitMax_"+Coun0+"_Txt").value);
		if(tmpMax<tmpINT){
			tmpINT=tmpMax;
		}
		var tmpCount=tmpINT;
		document.getElementById("OrderInfo_Count_"+Coun0+"_Txt").value=tmpINT
		document.getElementById("OrderInfo_Pay_"+Coun0).innerHTML=tmpPrice*tmpCount;
		tmpTotalPrice+=tmpPrice*tmpCount;
		tmpIDS+=document.getElementById("OrderInfo_Saleid_"+Coun0+"_Txt").value+tmpCommon.sysSPLIT3+tmpCount+tmpCommon.sysSPLIT2;
		
		Coun0++;
		tmpElement=document.getElementById("OrderInfo_Price_"+Coun0);
	}
	document.getElementById("OrderInfo_TotalPay").innerHTML=tmpTotalPrice;
	document.getElementById("OrderInfo_TotalPayTxt").value=tmpTotalPrice;
	document.getElementById("IDS").value=tmpIDS;
	
	this.OnOrder_CalculationALL();
	return 0;
}
Groupsale.prototype.OnOrder_ResetOptionbox=function(){
	
	/*
	var Coun0=0;
	while(document.getElementById("OrderUserinfo_OptionBox").rows.length>Coun0){
		document.getElementById("OrderUserinfo_OptionBox").rows[Coun0].deleteCell(0);
		Coun0++;
	}
	var Coun0=0;
	while(document.getElementById("OrderSendmodel_OptionBox").rows.length>Coun0){
		document.getElementById("OrderSendmodel_OptionBox").rows[Coun0].deleteCell(0);
		Coun0++;
	}
	var Coun0=0;
	while(document.getElementById("OrderPaytype_OptionBox").rows.length>Coun0){
		document.getElementById("OrderPaytype_OptionBox").rows[Coun0].deleteCell(0);
		Coun0++;
	}
	var Coun0=0;
	while(document.getElementById("Favourableids_OptionBox").rows.length>Coun0){
		document.getElementById("Favourableids_OptionBox").rows[Coun0].deleteCell(0);
		Coun0++;
	}
	*/
	
	return 0;
}
Groupsale.prototype.OnOrder_Receiveaddress=function(){
	
	var Coun0=0;
	if(document.getElementById(tmpCommon.sysForm).Receiveaddress_Txt.value!=undefined){
		if(document.getElementById(tmpCommon.sysForm).Receiveaddress_Txt.checked){
			document.getElementById("OrderUserinfo_Label").innerHTML=document.getElementById("Receiveaddress_TxtLabel"+Coun0).innerHTML;
		}
	}
	Coun0=0;
	while(document.getElementById(tmpCommon.sysForm).Receiveaddress_Txt.length>Coun0){
		if(document.getElementById(tmpCommon.sysForm).Receiveaddress_Txt[Coun0].checked){
			document.getElementById("OrderUserinfo_Label").innerHTML=document.getElementById("Receiveaddress_TxtLabel"+Coun0).innerHTML;
		}
		Coun0++;
	}
	
	return 0;
}
Groupsale.prototype.OnOrder_OrderSendmodel=function(){

	var Coun0=0;
	if(document.getElementById(tmpCommon.sysForm).OrderSendmodel_Txt.value!=undefined){
		if(document.getElementById(tmpCommon.sysForm).OrderSendmodel_Txt.checked){
			document.getElementById("OrderSendmodel_Label").innerHTML=document.getElementById("OrderSendmodel_TxtLabel"+Coun0).innerHTML;
		}
	}
	Coun0=0;
	while(document.getElementById(tmpCommon.sysForm).OrderSendmodel_Txt.length>Coun0){
		if(document.getElementById(tmpCommon.sysForm).OrderSendmodel_Txt[Coun0].checked){
			document.getElementById("OrderSendmodel_Label").innerHTML=document.getElementById("OrderSendmodel_TxtLabel"+Coun0).innerHTML;
		}
		Coun0++;
	}
	
	return 0;
}
Groupsale.prototype.OnOrder_OrderPaytype=function(){

	var Coun0=0;
	if(document.getElementById(tmpCommon.sysForm).OrderPaytype_Txt.value!=undefined){
		if(document.getElementById(tmpCommon.sysForm).OrderPaytype_Txt.checked){
			document.getElementById("OrderPaytype_Label").innerHTML=document.getElementById("OrderPaytype_TxtLabel"+Coun0).innerHTML;
		}
	}
	Coun0=0;
	while(document.getElementById(tmpCommon.sysForm).OrderPaytype_Txt.length>Coun0){
		if(document.getElementById(tmpCommon.sysForm).OrderPaytype_Txt[Coun0].checked){
			document.getElementById("OrderPaytype_Label").innerHTML=document.getElementById("OrderPaytype_TxtLabel"+Coun0).innerHTML;
		}
		Coun0++;
	}
	
	return 0;
}
Groupsale.prototype.OnOrder_OrderOther=function(){
	//#Invoice
	var tmpInvoice="";
	var Coun0=0;
	if(document.getElementById(tmpCommon.sysForm).OrderOther_Invoice_Txt.value!=undefined){
		if(document.getElementById(tmpCommon.sysForm).OrderOther_Invoice_Txt.checked){
			tmpInvoice=document.getElementById("OrderOther_Invoice_TxtLabel"+Coun0).innerHTML;
		}
	}
	Coun0=0;
	while(document.getElementById(tmpCommon.sysForm).OrderOther_Invoice_Txt.length>Coun0){
		if(document.getElementById(tmpCommon.sysForm).OrderOther_Invoice_Txt[Coun0].checked){
			tmpInvoice=document.getElementById("OrderOther_Invoice_TxtLabel"+Coun0).innerHTML;
		}
		Coun0++;
	}
	//#InvoiceUnit
	var tmpInvoiceUnit="";
	var Coun0=0;
	if(document.getElementById(tmpCommon.sysForm).OrderOther_InvoiceUnit_Txt.value!=undefined){
		if(document.getElementById(tmpCommon.sysForm).OrderOther_InvoiceUnit_Txt.checked){
			tmpInvoiceUnit=document.getElementById("OrderOther_InvoiceUnit_TxtLabel"+Coun0).innerHTML;
		}
	}
	Coun0=0;
	while(document.getElementById(tmpCommon.sysForm).OrderOther_InvoiceUnit_Txt.length>Coun0){
		if(document.getElementById(tmpCommon.sysForm).OrderOther_InvoiceUnit_Txt[Coun0].checked){
			tmpInvoiceUnit=document.getElementById("OrderOther_InvoiceUnit_TxtLabel"+Coun0).innerHTML;
		}
		Coun0++;
	}
	//#InvoiceUnit
	var tmpInvoiceTitle=document.getElementById("OrderOther_InvoiceTitle_Txt").value;
	
	//#InvoiceUnit
	var tmpInvoiceTitleType=document.getElementById("OrderOther_InvoiceTitleType_Txt").options[document.getElementById("OrderOther_InvoiceTitleType_Txt").selectedIndex].text;
	
	//#InvoiceUnit
	var tmpFavourableids="";
	var Coun0=0;
	if(document.getElementById(tmpCommon.sysForm).OrderOther_FavourableidsTxt.value!=undefined){
		if(document.getElementById(tmpCommon.sysForm).OrderOther_FavourableidsTxt.checked){
			tmpFavourableids+=document.getElementById("OrderOther_FavourableidsTxtLabel"+Coun0).innerHTML;
		}
	}
	Coun0=0;
	while(document.getElementById(tmpCommon.sysForm).OrderOther_FavourableidsTxt.length>Coun0){
		if(document.getElementById(tmpCommon.sysForm).OrderOther_FavourableidsTxt[Coun0].checked){
			tmpFavourableids+=document.getElementById("OrderOther_FavourableidsTxtLabel"+Coun0).innerHTML+"；";
		}
		Coun0++;
	}
	
	document.getElementById("OrderOther_Label").innerHTML=
		"<b>是否需要发票：</b>"+tmpInvoice+"&nbsp;&nbsp;"+
		"<b>索取人类型：</b>"+tmpInvoiceUnit+"&nbsp;&nbsp;"+
		"<b>发票抬头：</b>"+tmpInvoiceTitle+"&nbsp;&nbsp;"+
		"<b>发票类型：</b>"+tmpInvoiceTitleType+"&nbsp;&nbsp;"+
		"<br /><b>使用优惠券：</b>"+tmpFavourableids+"&nbsp;&nbsp;"
		;
	return 0;
}

Groupsale.prototype.OnOrder_ShowBox=function(pName){

	if(document.getElementById(pName+"_Box").className==tmpCommon.sysHidden){
		document.getElementById(pName+"_Button").innerHTML="[关闭]";
		document.getElementById(pName+"_Label").className=tmpCommon.sysHidden;
		document.getElementById(pName+"_Box").className="GroupsaleOrder_1_41";
	}else{
		document.getElementById(pName+"_Button").innerHTML="[修改]";
		document.getElementById(pName+"_Label").className="GroupsaleOrder_1_48";
		document.getElementById(pName+"_Box").className=tmpCommon.sysHidden;
	}
	
	return 0;
}
Groupsale.prototype.OnOrder_Contact_New=function(){

	document.getElementById("OrderUserinfo_Contact_Box").className="GroupsaleOrder_1_42";
	
	document.getElementById("OrderUserinfo_Contact_ConManTxt").value="";
	document.getElementById("OrderUserinfo_Contact_MobileTxt").value="";
	document.getElementById("OrderUserinfo_Contact_EmailTxt").value="";
	/*
	document.getElementById("OrderUserinfo_Contact_Zone_CountryTxt").selectIndex=0;
	document.getElementById("OrderUserinfo_Contact_Zone_ProvinceTxt").selectIndex=0;
	document.getElementById("OrderUserinfo_Contact_Zone_CityTxt").selectIndex=0;
	*/
	document.getElementById("OrderUserinfo_Contact_AddressTxt").value="";
	document.getElementById("OrderUserinfo_Contact_TeleTxt").value="";
	document.getElementById("OrderUserinfo_Contact_NumCodeTxt").value="";
	//#Zone
	var tmpURL=tmpCommon.sysPage+"?ActionType=DZone";
	this.sAjax_0.sPanel="gsoctZoneChooseTxtPanelBox";
	this.sAjax_0.sFlag="gsoctZoneChooseTxt";
	this.sAjax_0.sendRequestSp(tmpURL,"groupsale_Contact_ZoneReflash_callback()");
	//window.open(tmpURL,"_blank");


	return 0;
}
Groupsale.prototype.OnOrder_Contact_Edit=function(pID,pConMan,pMobile,pEmail,pZone_Country,pZone_Province,pZone_City,
	pAddress,pTele,pNumCode){

	document.getElementById("OrderUserinfo_Contact_Box").className="GroupsaleOrder_1_42";

	document.getElementById("OrderUserinfo_Contact_IDTxt").value=pID;
	document.getElementById("OrderUserinfo_Contact_ConManTxt").value=pConMan;
	document.getElementById("OrderUserinfo_Contact_MobileTxt").value=pMobile;
	document.getElementById("OrderUserinfo_Contact_EmailTxt").value=pEmail;
	/*
	document.getElementById("OrderUserinfo_Contact_Zone_CountryTxt").selectIndex=0;
	document.getElementById("OrderUserinfo_Contact_Zone_ProvinceTxt").selectIndex=0;
	document.getElementById("OrderUserinfo_Contact_Zone_CityTxt").selectIndex=0;
	*/
	document.getElementById("OrderUserinfo_Contact_AddressTxt").value=pAddress;
	document.getElementById("OrderUserinfo_Contact_TeleTxt").value=pTele;
	document.getElementById("OrderUserinfo_Contact_NumCodeTxt").value=pNumCode;
	//#Zone
	if(pZone_City<2){
		pZone_City=2;
	}
	var tmpURL=tmpCommon.sysPage+"?ActionType=DZone&DZone="+pZone_City;
	this.sAjax_0.sPanel="gsoctZoneChooseTxtPanelBox";
	this.sAjax_0.sFlag="gsoctZoneChooseTxt";
	this.sAjax_0.sendRequestSp(tmpURL,"groupsale_Contact_ZoneReflash_callback()");
	//window.open(tmpURL,"_blank");


	return 0;
}
function groupsale_Contact_ZoneReflash_callback(){
	var tmpFlag=tmpGroupsale.sAjax_0.sFlag;
	var tmpPanel=document.getElementById(tmpGroupsale.sAjax_0.sPanel);
	var tmpURL=tmpGroupsale.sAjax_0.sURL;
	var tmpHttpRequests=tmpGroupsale.sAjax_0.sHttpRequests;
	//alert(tmpHttpRequests.responseText);
	if(tmpHttpRequests.readyState==4){
		//alert(tmpHttpRequests.responseText);
		var tmpData=getDataByFlag(tmpHttpRequests.responseText,tmpFlag);
		//alert(tmpData);
		if(tmpData.indexOf("sendRequest")>=0 && tmpData!="<!--sendRequest-->"){
			tmpPanel.innerHTML=tmpData;
	    	tmpFrames.showLoading(1);
	    }else{
	    	tmpPanel.innerHTML=tmpCommon.sysError_Ajax.replace(/\{Nets.Response}/g,tmpURL);
	    	tmpFrames.showLoading(1);
	    }
	}else{
		tmpFrames.showLoading(0);
	}
}

Groupsale.prototype.OnOrder_Contact_Save=function(){
	//-- #CHECK --
	//-- ------ #Check ------ --
	var tmpError="";
	var tmpChecker=new netsChecker();
	var Coun0=0;
	//#OrderUserinfo_Contact_ConManTxt
	tmpCheckCont=document.getElementById("OrderUserinfo_Contact_ConManTxt");
	tmpCheckCont.value=tmpChecker.Filter(tmpCheckCont.value,0);
	if(!tmpChecker.CheckLen(tmpCheckCont.value,1,120)){
		Coun0++;
		tmpError+=Coun0+".联系人姓名不能为空"+tmpCommon.sysSPLIT8;
	}
	//#OrderUserinfo_Contact_MobileTxt
	tmpCheckCont=document.getElementById("OrderUserinfo_Contact_MobileTxt");
	tmpCheckCont.value=tmpChecker.Filter(tmpCheckCont.value,0);
	if(!tmpChecker.CheckLen(tmpCheckCont.value,10,12)){
		Coun0++;
		tmpError+=Coun0+".手机号必须为11位的数字"+tmpCommon.sysSPLIT8;
	}
	//#OrderUserinfo_Contact_EmailTxt
	tmpCheckCont=document.getElementById("OrderUserinfo_Contact_EmailTxt");
	tmpCheckCont.value=tmpChecker.Filter(tmpCheckCont.value,0);
	if(!tmpChecker.CheckLen(tmpCheckCont.value,3,120)){
		Coun0++;
		tmpError+=Coun0+".邮箱地址格式错误，正确格式如：13900000000"+tmpCommon.sysSPLIT8;
	}
	//-- ------ #Result ------ --
	if(tmpError!=""){
		tmpSTR="<span class=\"FStrong\">对不起，您提交的内容存在以下错误:</span>"+tmpCommon.sysSPLIT8+tmpError;
		tmpFrames.showMessage("系统消息 - "+tmpCommon.sysName,tmpSTR,"","0");
		return 1;
	}

	//-- #SAVE --
	var tmpURL=tmpCommon.sysPage+"?ActionType=DSaveReceiveaddress"+
		"&ID="+tmpCommon.encodeURL(document.getElementById("OrderUserinfo_Contact_IDTxt").value)+
		"&ConManTxt="+tmpCommon.encodeURL(document.getElementById("OrderUserinfo_Contact_ConManTxt").value)+
		"&MobileTxt="+tmpCommon.encodeURL(document.getElementById("OrderUserinfo_Contact_MobileTxt").value)+
		"&EmailTxt="+tmpCommon.encodeURL(document.getElementById("OrderUserinfo_Contact_EmailTxt").value)+
		/*
		"&Zone_CountryTxt="+tmpCommon.encodeURL(document.getElementById("OrderUserinfo_Contact_Zone_CountryTxt").value)+
		"&Zone_ProvinceTxt="+tmpCommon.encodeURL(document.getElementById("OrderUserinfo_Contact_Zone_ProvinceTxt").value)+
		"&Zone_CityTxt="+tmpCommon.encodeURL(document.getElementById("OrderUserinfo_Contact_Zone_CityTxt").value)+
		*/
		"&Zone_CountryTxt="+tmpCommon.encodeURL(0)+
		"&Zone_ProvinceTxt="+tmpCommon.encodeURL(0)+
		"&Zone_CityTxt="+tmpCommon.encodeURL(document.getElementById("gsoctZoneChooseTxt").value)+
		"&AddressTxt="+tmpCommon.encodeURL(document.getElementById("OrderUserinfo_Contact_AddressTxt").value)+
		"&TeleTxt="+tmpCommon.encodeURL(document.getElementById("OrderUserinfo_Contact_TeleTxt").value)+
		"&NumCodeTxt="+tmpCommon.encodeURL(document.getElementById("OrderUserinfo_Contact_NumCodeTxt").value);

	this.sAjax_0.sPanel="OrderUserinfo_List";
	this.sAjax_0.sFlag="OrderUserinfo_Contact";
	this.sAjax_0.sendRequestSp(tmpURL,"groupsale_Contact_Save_callback()");
	//window.open(tmpURL,"_blank");
	
	return 0;
}
function groupsale_Contact_Save_callback(){
	var tmpFlag=tmpGroupsale.sAjax_0.sFlag;
	var tmpPanel=document.getElementById(tmpGroupsale.sAjax_0.sPanel);
	var tmpURL=tmpGroupsale.sAjax_0.sURL;
	var tmpHttpRequests=tmpGroupsale.sAjax_0.sHttpRequests;
	//alert(tmpHttpRequests.responseText);
	if(tmpHttpRequests.readyState==4){
		//alert(tmpHttpRequests.responseText);
		var tmpData=getDataByFlag(tmpHttpRequests.responseText,tmpFlag);
		//alert(tmpData);
		if(tmpData.indexOf("sendRequest")>=0 && tmpData!="<!--sendRequest-->"){
			tmpPanel.innerHTML=tmpData;
			document.getElementById("Receiveaddress_Txt0").selected=true;
			document.getElementById("OrderUserinfo_Contact_ConManTxt").value="";
			document.getElementById("OrderUserinfo_Contact_MobileTxt").value="";
			document.getElementById("OrderUserinfo_Contact_EmailTxt").value="";
			/*
			document.getElementById("OrderUserinfo_Contact_Zone_CountryTxt").selectIndex=0;
			document.getElementById("OrderUserinfo_Contact_Zone_ProvinceTxt").selectIndex=0;
			document.getElementById("OrderUserinfo_Contact_Zone_CityTxt").selectIndex=0;
			*/
			document.getElementById("gsoctZoneChooseTxt").selectIndex=0;
			document.getElementById("OrderUserinfo_Contact_AddressTxt").value="";
			document.getElementById("OrderUserinfo_Contact_TeleTxt").value="";
			document.getElementById("OrderUserinfo_Contact_NumCodeTxt").value="";

	    	tmpFrames.showLoading(1);
	    }else{
	    	tmpPanel.innerHTML=tmpCommon.sysError_Ajax.replace(/\{Nets.Response}/g,tmpURL);
	    	tmpFrames.showLoading(1);
	    }
	}else{
		tmpFrames.showLoading(0);
	}
}









