var xmlhttp = false;
        
// If the user is using Mozilla/Firefox/Safari/etc
if (window.XMLHttpRequest) {
        //Intiate the object
        xmlhttp = new XMLHttpRequest();
        //Set the mime type
        xmlhttp.overrideMimeType('text/xml');
} else if (window.ActiveXObject) {
        //Intiate the object
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}

// ****************************************************************************
// ajaxregion
// ****************************************************************************
function ajaxregionupdate(url, containerid){
//  alert(url);
  xmlhttp.open('GET', url, true);
  //Check that the PHP script has finished sending us the result
  xmlhttp.onreadystatechange = function() {
    if(xmlhttp.readyState == 4 && xmlhttp.status == 200) {
      document.getElementById(containerid).innerHTML=xmlhttp.responseText
    }
	}
	xmlhttp.send(null);
}

function ajaxregion(region){
  ajaxregionupdate("region.cfm?page="+region.options[region.selectedIndex].value+"&id=-1", "regions");
}

function ajaxstate(strRegion, state){
  ajaxregionupdate("region.cfm?page="+strRegion+"&id="+state.options[state.selectedIndex].value, "regions");  
}

function onLoadRegion(strRegion, strState){
  ajaxregionupdate("region.cfm?page="+strRegion+"&id="+strState, "regions");  
}
