var xmlHttp

function changeDropOffTime(str1,str2)
{	
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="changeDropOffTime.php"
var variable1="index"+str2
url=url+"?time="+str1
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById(variable1).innerHTML=xmlHttp.responseText 
 } 
}	
	}

//new function Get Tournament
function calculatePrice(str1,str4,str2,str3)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="calculateprice.php"
var variable="price"+str3
var noofdaysvariable="days"+str3
url=url+"?qty="+str1+"&price="+str2+"&days="+str4
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById(variable).innerHTML=xmlHttp.responseText 
  document.getElementById(noofdaysvariable).value=xmlHttp.responseText 
 } 
}
}
//end

//new function to calculate number of days
function calculateNoofDays(str1,str2)
{ alert ("test")
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="calculatedays.php"
url=url+"?pickup="+str1+"&drop="+str2

/*url=url+"&sid="+Math.random()*/

xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById(noofdays).innerHTML=xmlHttp.responseText 
 //document.getElementById(days).innerHTML=xmlHttp.responseText 
 } 
}
}
//end


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;
}// JavaScript Document







