function ajaxFunction(script, formid, inputid, targetid, targetid2, tourid, personlimit, the_date)

  {

  var xmlHttp; 

  var personnumber = document.getElementById(inputid).value;

  var image_loading =	"<img src='./images/spinner.gif' border='0' width='16' height='16'/>";

   

//alert (document.getElementById(inputid).value);

   try

    {

    // Firefox, Opera 8.0+, Safari

    xmlHttp=new XMLHttpRequest();

    }

  catch (e)

    {

    // Internet Explorer

    try

      {

      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");

      }

    catch (e)

      {

      try

        {

        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");

        }

      catch (e)

        {

        alert("Your browser does not support AJAX!");

        return false;

        }

      }

    } 

   

    xmlHttp.onreadystatechange=function()

      {

      	if(xmlHttp.readyState == 0)

		{

	document.getElementById(targetid2).innerHTML = image_loading;//"Sending Request...";

		}

		if(xmlHttp.readyState == 1)

		{

	 document.getElementById(targetid2).innerHTML = image_loading;//"Loading Response...";

		}

		if(xmlHttp.readyState == 2)

		{

	     document.getElementById(targetid2).innerHTML = image_loading;//"Response   Loaded...";

		}

		if(xmlHttp.readyState == 3)

		{

		 document.getElementById(targetid2).innerHTML = image_loading;//"Response Ready...";

		}

		if(xmlHttp.readyState == 4)

		{

		var ajaxDisplay = document.getElementById(targetid2); 

		//alert(ajaxDisplay.innerHTML);

		ajaxDisplay.innerHTML = xmlHttp.responseText;

		 

	               }

               

       

      }

       
if(inputid=="input")

		{
			var queryString = "?tour=" + tourid + "&personlimit=" + personlimit + "&personnumber=" + personnumber+ "&the_date=" + the_date;
		}
		else if(inputid=="input2")
		{
			var queryString = "?tour=" + tourid + "&personlimit=" + personlimit + "&personnumber2=" + personnumber+ "&the_date=" + the_date;
		}
		else var queryString = "?tour=" + tourid + "&personlimit=" + personlimit + "&personnumber3=" + personnumber+ "&the_date=" + the_date;
      

    

    xmlHttp.open("GET",script+queryString,true); 

    xmlHttp.send(null);

  }

  

  

function ajaxEditTour(script, action, categoryid, tourid, userid, lang, targetid)

  {

  var xmlHttp; 

  var image_loading =	"<img src='./images/spinner.gif' border='0' width='16' height='16'/>";

   

//alert (document.getElementById(inputid).value);

   try

    {

    // Firefox, Opera 8.0+, Safari

    xmlHttp=new XMLHttpRequest();

    }

  catch (e)

    {

    // Internet Explorer

    try

      {

      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");

      }

    catch (e)

      {

      try

        {

        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");

        }

      catch (e)

        {

        alert("Your browser does not support AJAX!");

        return false;

        }

      }

    } 

   

    xmlHttp.onreadystatechange=function()

      {

      	if(xmlHttp.readyState == 0)

		{

	document.getElementById(targetid).innerHTML = image_loading;//"Sending Request...";

		}

		if(xmlHttp.readyState == 1)

		{

	 document.getElementById(targetid).innerHTML = image_loading;//"Loading Response...";

		}

		if(xmlHttp.readyState == 2)

		{

	     document.getElementById(targetid).innerHTML = image_loading;//"Response   Loaded...";

		}

		if(xmlHttp.readyState == 3)

		{

		 document.getElementById(targetid).innerHTML = image_loading;//"Response Ready...";

		}

		if(xmlHttp.readyState == 4)

		{

		var ajaxDisplay = document.getElementById(targetid); 

		//alert(ajaxDisplay.innerHTML);

		ajaxDisplay.innerHTML = xmlHttp.responseText;

		 

	               }

               

       

      }

    var queryString = "?action=" + action + "&page=tours&category=" + categoryid + "&tour=" + tourid + "&userid=" + userid + "&lang=" + lang;

    xmlHttp.open("GET",script+queryString,true); 

    xmlHttp.send(null);

  } 

  

 function ajaxDeleteTour(script, action, categoryid, tourid, userid, lang, targetid)

  {

  var xmlHttp; 

  var image_loading =	"<img src='./images/spinner.gif' border='0' width='16' height='16'/>";

   

//alert (document.getElementById(inputid).value);

   try

    {

    // Firefox, Opera 8.0+, Safari

    xmlHttp=new XMLHttpRequest();

    }

  catch (e)

    {

    // Internet Explorer

    try

      {

      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");

      }

    catch (e)

      {

      try

        {

        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");

        }

      catch (e)

        {

        alert("Your browser does not support AJAX!");

        return false;

        }

      }

    } 

   

    xmlHttp.onreadystatechange=function()

      {

      	if(xmlHttp.readyState == 0)

		{

	document.getElementById(targetid).innerHTML = image_loading;//"Sending Request...";

		}

		if(xmlHttp.readyState == 1)

		{

	 document.getElementById(targetid).innerHTML = image_loading;//"Loading Response...";

		}

		if(xmlHttp.readyState == 2)

		{

	     document.getElementById(targetid).innerHTML = image_loading;//"Response   Loaded...";

		}

		if(xmlHttp.readyState == 3)

		{

		 document.getElementById(targetid).innerHTML = image_loading;//"Response Ready...";

		}

		if(xmlHttp.readyState == 4)

		{

		var ajaxDisplay = document.getElementById(targetid); 

		//alert(ajaxDisplay.innerHTML);

		ajaxDisplay.innerHTML = xmlHttp.responseText;

		 

	               }

               

       

      }

    var queryString = "?action=" + action + "&page=tours&category=" + categoryid + "&tour=" + tourid + "&userid=" + userid + "&lang=" + lang;

    xmlHttp.open("GET",script+queryString,true); 

    xmlHttp.send(null);

  } 

  

/*  

  xmlHttp.onreadystatechange = function(){ 

if(xmlHttp.readyState == 4){ 

var ajaxDisplay = document.getElementById('ajaxDiv'); 

ajaxDisplay.innerHTML = xmlHttp.responseText; 

} 

} 

var cat = document.getElementById('cat').value; 

var id = document.getElementById('id').value; 

var queryString = "?cat=" + cat + "&id=" + id; 

xmlHttp.open("GET", "ajax-example.php" + queryString, true); 

xmlHttp.send(null);

*/


