function loadIFrame(pPath){							//---------------Free for feedback on tclyit@gmail.com-----------------------
	var pPath = pPath;
	var pPaths;
	var sPlitPath = pPath.split("&")[0];
	var sPlitPathS = sPlitPath.split("=")[1];
	var PName = sPlitPathS;
	if(PName == "Guest Comment"){
		pPaths = "borei_guestbook.php";
		document.getElementById("detail").src = pPaths+pPath;
	}else if(PName == "chk_room_available"){
		pPaths = "borei_checkroom.php?ADate=$ADate&";
		document.getElementById("detail").src = pPaths+pPath;
	}else if(PName == "show_sitemap"){
		pPaths = "borei_sitemap.php";
		document.getElementById("detail").src = pPaths+pPath;
	}else if((PName == "Reservation") || (PName == "Online Confirmation")){
		var pPathp = window.open('https://reservations.g-rez.com/boreiangkor-siemreap/en','booking','width=900,height=800,scrollbars=yes, toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,minimize=no,maximize=no,fullscreen=no,dependent=no');
		var pPathpop = "borei_detail.php";
		document.getElementById("detail").src = pPathpop;
	}else if(PName == "Enquiry"){
		pPaths = "borei_booking.php";
		document.getElementById("detail").src = pPaths+pPath;
	}else if(PName == "Photo Gallery"){
		pPaths = "borei_gallery.php";
		document.getElementById("detail").src = pPaths+pPath;
	}else if(PName == "hot_promo_left"){
		pPaths = "borei_hot_promo.php";
		document.getElementById("detail").src = pPaths+pPath;
	}else{
		pPaths = "borei_detail.php";
		document.getElementById("detail").src = pPaths+pPath;	//-------------------------------For mainpage--------------------
		document.getElementById("detail1").src = "borei_hotnews.php"+pPath;	//-------------------For Hotnews---------------------
	}
}

function CheckAvailibility(){
	var ArD = document.index.arrDate_day.value;
	var DeD = document.index.deptDate_day.value;
	var AD = document.index.arrDate.value;
	var DD = document.index.deptDate.value;
	var ND = document.index.Day.value;
	var DAD = "&ADate="+AD+"&DDate="+DD+"&ND="+ND+"&ArD="+ArD+"&DeD="+DeD;
	document.location.href = 'javascript:loadIFrame("$PHP_SELF?CHK=chk_room_available'+DAD+'")';
}