

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

Subscribe.prototype.sAjax_0=new netsSingleAjax();

//-- ------ #Methods ------ --
//#Navigation
Subscribe.prototype.sNavigationCount=5;
Subscribe.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;
}

//#Order
Subscribe.prototype.sOrder_URL="Plus/m_default/Subscribe/subscribeDetail.php";
Subscribe.prototype.OnCountAdd=function(pID){
	var tmpINT=parseInt(document.getElementById("Subscribes_Count_"+pID+"_Txt").value);
	var tmpMax=parseInt(document.getElementById("Subscribes_CountLimitMax_"+pID+"_Txt").value);
	tmpINT++;
	if(tmpMax<tmpINT){
		tmpINT=tmpMax;
	}
	
	document.getElementById("Subscribes_Count_"+pID+"_Txt").value=tmpINT;
	return 0;
}
Subscribe.prototype.OnCountSub=function(pID){
	var tmpINT=parseInt(document.getElementById("Subscribes_Count_"+pID+"_Txt").value);
	var tmpMin=parseInt(document.getElementById("Subscribes_CountLimitMin_"+pID+"_Txt").value);
	tmpINT--;
	if(tmpMin>tmpINT){
		tmpINT=tmpMin;
	}
	
	document.getElementById("Subscribes_Count_"+pID+"_Txt").value=tmpINT;
	return 0;
}
Subscribe.prototype.OnCountChange=function(pID){
	var tmpINT=parseInt(document.getElementById("Subscribes_Count_"+pID+"_Txt").value);
	var tmpMin=parseInt(document.getElementById("Subscribes_CountLimitMin_"+pID+"_Txt").value);
	var tmpMax=parseInt(document.getElementById("Subscribes_CountLimitMax_"+pID+"_Txt").value);
	if(tmpMin>tmpINT){
		tmpINT=tmpMin;
	}
	if(tmpMax<tmpINT){
		tmpINT=tmpMax;
	}
	
	document.getElementById("Subscribes_Count_"+pID+"_Txt").value=tmpINT;
	return 0;
}
Subscribe.prototype.OnOrder_Subscribe=function(){
	var tmpPARAMETER="";
	
	if(document.getElementById(tmpCommon.sysForm).Subscribes_IDTxt.value!=undefined){
		if(document.getElementById(tmpCommon.sysForm).Subscribes_IDTxt.checked){
			tmpPARAMETER+=document.getElementById(tmpCommon.sysForm).Subscribes_IDTxt.value+tmpCommon.sysSPLIT3+
				document.getElementById("Subscribes_Count_"+document.getElementById(tmpCommon.sysForm).Subscribes_IDTxt.value+"_Txt").value+tmpCommon.sysSPLIT3+
				document.getElementById("Subscribes_Type_"+document.getElementById(tmpCommon.sysForm).Subscribes_IDTxt.value+"_Txt").value+tmpCommon.sysSPLIT2;
		}
	}
	Coun0=0;
	while(document.getElementById(tmpCommon.sysForm).Subscribes_IDTxt.length>Coun0){
		if(document.getElementById(tmpCommon.sysForm).Subscribes_IDTxt[Coun0].checked){
			tmpPARAMETER+=document.getElementById(tmpCommon.sysForm).Subscribes_IDTxt[Coun0].value+tmpCommon.sysSPLIT3+
				document.getElementById("Subscribes_Count_"+document.getElementById(tmpCommon.sysForm).Subscribes_IDTxt[Coun0].value+"_Txt").value+tmpCommon.sysSPLIT3+
				document.getElementById("Subscribes_Type_"+document.getElementById(tmpCommon.sysForm).Subscribes_IDTxt[Coun0].value+"_Txt").value+tmpCommon.sysSPLIT2;
		}
		Coun0++;
	}
	
	var tmpURL=tmpCommon.sysHome+this.sOrder_URL+"?ActionType=DSubscribe&DSubscribe="+tmpPARAMETER+
		"&Email="+tmpCommon.encodeURL(document.getElementById("UEmailTxt").value)+
		"&Mobile="+tmpCommon.encodeURL(document.getElementById("UMobileTxt").value);
	window.location=tmpURL;
	return 0;
}
Subscribe.prototype.OnOrder_Unsubscribe=function(){
	var tmpPARAMETER="";
	
	if(document.getElementById(tmpCommon.sysForm).Subscribes_IDTxt.value!=undefined){
		if(document.getElementById(tmpCommon.sysForm).Subscribes_IDTxt.checked){
			tmpPARAMETER+=document.getElementById(tmpCommon.sysForm).Subscribes_IDTxt.value+tmpCommon.sysSPLIT2;
		}
	}
	Coun0=0;
	while(document.getElementById(tmpCommon.sysForm).Subscribes_IDTxt.length>Coun0){
		if(document.getElementById(tmpCommon.sysForm).Subscribes_IDTxt[Coun0].checked){
			tmpPARAMETER+=document.getElementById(tmpCommon.sysForm).Subscribes_IDTxt[Coun0].value+tmpCommon.sysSPLIT2;
		}
		Coun0++;
	}
	
	var tmpURL=tmpCommon.sysHome+this.sOrder_URL+"?ActionType=DUnsubscribe&DUnsubscribe="+tmpPARAMETER+
		"&Email="+tmpCommon.encodeURL(document.getElementById("UEmailTxt").value)+
		"&Mobile="+tmpCommon.encodeURL(document.getElementById("UMobileTxt").value);
	window.location=tmpURL;
	return 0;
}
/*
Subscribe.prototype.OnOrder_SubscribeSingle=function(pID,pCount,pType){
	
	var tmpURL=tmpCommon.sysHome+this.sOrder_URL+"?ActionType=DSubscribe&DSubscribe="+
		pID+tmpCommon.sysSPLIT3+
		pCount+tmpCommon.sysSPLIT3+
		pType+tmpCommon.sysSPLIT2+
		"&Email="+tmpCommon.encodeURL(document.getElementById("UEmailTxt").value)+
		"&Mobile="+tmpCommon.encodeURL(document.getElementById("UMobileTxt").value);;
	window.location=tmpURL;
	return 0;
}
Subscribe.prototype.OnOrder_UnsubscribeSingle=function(pID){

	var tmpURL=tmpCommon.sysHome+this.sOrder_URL+"?ActionType=DUnsubscribe&DUnsubscribe="+pID+
		"&Email="+tmpCommon.encodeURL(document.getElementById("UEmailTxt").value)+
		"&Mobile="+tmpCommon.encodeURL(document.getElementById("UMobileTxt").value);;
	window.location=tmpURL;
	return 0;
}
*/


