var xmlHttp;
var please_wait = "<img src='../modules/loading.gif' > loding ...";

function GetItinerary(tourid)
{
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			{
			  alert ("Your browser does not support AJAX!");
			  return;
			} 	  	        		    
			
 			var sendi = "../modules/itinerary.php?tourid=" + tourid;
			sendi = uncache(sendi);
			
			document.getElementById("ajax_loading").innerHTML = please_wait;			
			xmlHttp.open("GET", sendi,true);

			xmlHttp.onreadystatechange = stateChanged;
			xmlHttp.send(null);			
}

function GetDescription(tourid)
{
			xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
			{
			  alert ("Your browser does not support AJAX!");
			  return;
			} 	  	        		    
			
 			var sendi = "../modules/description.php?tourid=" + tourid;
			sendi = uncache(sendi);
			
			document.getElementById("ajax_loading").innerHTML = please_wait;			
			xmlHttp.open("GET", sendi,true);

			xmlHttp.onreadystatechange = stateChanged;
			xmlHttp.send(null);			
}
	
		
function stateChanged()
{
	 xmlDoc=xmlHttp.responseXML;
	if (xmlHttp.readyState==4)
	{
		document.getElementById("ajax_loading").innerHTML ="";
		document.getElementById("tour_content").innerHTML=  xmlHttp.responseText;	
	}
}



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;
}


function uncache(url){
	var d = new Date();
	var time = d.getTime();
	return url + "&time="+time;
} 



