var xmlHttp


function updateShipping(cityid, promocode, ctlName)
{ 

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="shippingrates.php"
url=url+"?cityid="+ cityid
url=url+"&promocode="+ promocode
url=url+"&sid="+Math.random()
 xmlHttp.onreadystatechange=function(){
     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
            document.getElementById(ctlName).innerHTML= "<div style='width: 250px; margin-bottom: 5px;'>Please note that a disruption in postal service may delay the delivery of your order. In the case of a strike, please consider purchasing your Passport to Prana from one of the following studio retailers. <a href='retail-locations.php'>Click here.</a></div>" + xmlHttp.responseText;
        }
     };

xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}




function updateShippingType(cityid, ctlName)
{ 

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="shippingtype.php"
url=url+"?cityid="+ cityid
url=url+"&sid="+Math.random()
 xmlHttp.onreadystatechange=function(){
     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
            document.getElementById(ctlName).innerHTML=xmlHttp.responseText;
        }
     };

xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}




function updateShippingStudio(cityid, ctlName)
{ 

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="shippingratestudio.php"
url=url+"?cityid="+ cityid
url=url+"&sid="+Math.random()
 xmlHttp.onreadystatechange=function(){
     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
            document.getElementById(ctlName).innerHTML=xmlHttp.responseText;
        }
     };

xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}




function viewMessage(msgid, ctlName)
{ 

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="viewmessage.php"
url=url+"?msgid="+ msgid
url=url+"&sid="+Math.random()
 xmlHttp.onreadystatechange=function(){
     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
            document.getElementById(ctlName).innerHTML=xmlHttp.responseText;
        }
     };

xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}


function updateHearAbout(cityid, ctlName)
{ 

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url="hearabout.php"
url=url+"?cityid="+ cityid
url=url+"&sid="+Math.random()
 xmlHttp.onreadystatechange=function(){
     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
            document.getElementById(ctlName).innerHTML=xmlHttp.responseText;
        }
     };

xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}




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;
}
