/* All Scripts Written By Minds Eye Marketing */
/* (c) BHA 2010 */
function overMenu(theDiv){
document.getElementById(theDiv+"Button").style.backgroundPosition = "0px 50px";
}
function clickMenu(theDiv){
document.getElementById(theDiv+"Button").style.backgroundPosition = "0px 25px";
}
function offMenu(theDiv){
document.getElementById(theDiv+"Button").style.backgroundPosition = "0px 0px";
}
function getBooking() {
/* loads the separate php data into the id-ed div */
ajaxPhpFunction('getBooking','none','none','loadCal');
}


/* DO NOT edit below this line */

function getXMLObject()  //XML OBJECT
{
   var xmlHttp = false;
   try {
     xmlHttp = new ActiveXObject("Msxml2.XMLHTTP")  // For Old Microsoft Browsers
   }
   catch (e) {
     try {
       xmlHttp = new ActiveXObject("Microsoft.XMLHTTP")  // For Microsoft IE 6.0+
     }
     catch (e2) {
       xmlHttp = false   // No Browser accepts the XMLHTTP Object then false
     }
   }
   if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
     xmlHttp = new XMLHttpRequest();        //For Mozilla, Opera Browsers
   }
   return xmlHttp;  // Mandatory Statement returning the ajax object created
}

function ajaxPhpFunction(myScript,myVar,myTo,resultsDiv) {
var xmlhttp = new getXMLObject();
if(myTo !="none") {
xmlhttp.open("GET","/assets/includes/" + myScript + ".php?dep=" + myVar + "&dest=" + myTo,true);
} else {
// alert("Running /assets/includes/" + myScript + ".php?dep=" + myVar);
xmlhttp.open("GET","/assets/includes/" + myScript + ".php?dep=" + myVar,true);
}
 xmlhttp.onreadystatechange=function() {
	if(xmlhttp.readyState==4) {
		var resultHTML =xmlhttp.responseText; //Update the HTML Form element 
		resultHTML = resultHTML.split("njltest").join("&nbsp;");
		resultHTML = resultHTML.split("**").join("/t");
		resultHTML = resultHTML.split("*").join("'");
     	document.getElementById(resultsDiv).innerHTML = resultHTML;
  	}
 }
 xmlhttp.send(null);
}
 
