﻿// Ajax code for Integrated Menu

// Start Main Integrated menu function
imenu();

var xmlHttp

function imenu()
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");  return;
  } 
  
  var time=Math.random();
  var url="booknow.htm"+"?"+time;
//var url="booknow.htm";


xmlHttp.open("GET",url,true);xmlHttp.send(null);xmlHttp.onreadystatechange=stateChanged;
} 

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
	var mynull = null;
	var TEmpEle = document.getElementById("imenu");
		if (mynull == TEmpEle)
	{  alert("Div imenu not found. This alert is from code.js file. If imenu is not required then you can comment this alert. Programmers are requested to comment this alert only after moving the site on server.");
		return false;
	}
	TEmpEle.innerHTML=xmlHttp.responseText;
    
   // var $jq = jQuery.noConflict();
    SetMonth('E');
   // $jq("#nadult").selectbox();
   // $jq("#nchild").selectbox();	 
  //  $jq("#nrooms").selectbox();
	    
}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  { // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    }
  catch (e)
    { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");    }
  }
return xmlHttp;
}
// End of Main Integrated menu function
