var TP = new function (){
	this.Template = function (){
		//this.getTemplate ("Header", "TpHeader");
		//this.getTemplate ("Left", "TpLeft");
		//this.getTemplate ("Footer", "TpFooter");
		getCurrency ();
	};

	this.getTemplate = function (Mode, div){
		Home = (Home) ? Home : "";
		var myurl = "../Templates/Templates.php";
		var http = new getXMLHTTPRequest();
		http.onreadystatechange = function() {if (http.readyState != 4) { return; }
			if($(div))$(div).innerHTML=http.responseText;
			if (Mode=="Left"){getCurrency ();}
		};
		http.open("POST", myurl, false); http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		http.send("Mode="+Mode+"&Home="+Home+"&"+new Date().getTime());
	};

}

function ChangCurrency (){if(window.document.ChCurrency)	window.document.ChCurrency.submit();}
function getCurrency (){ obj = window.document.ChCurrency; if (obj) {obj.cboCurrency.value= sCurrencyShow;}}
function $(str){ return document.getElementById(str);}

function GoBasketPackage(ServiceNo){
	SetLoadTP();
	strFile = "../Accom/Payment.php";
	window.open(strFile,"_self");
}
function LeftDetail(ly,Mode){
	if($(ly))$(ly).innerHTML="";
	var myurl = "../Templates/LeftDetail.php";
	var http = new getXMLHTTPRequest();
	http.onreadystatechange = function() {if (http.readyState != 4) { return; }
		if($(ly))$(ly).innerHTML=http.responseText;
	};
	http.open("POST", myurl, false); http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	http.send("Mode="+Mode+"&"+new Date().getTime());
}