function loadXMLDoc(url)
{
	xmlhttp=null;

// code for Mozilla, etc.
	if (window.XMLHttpRequest)
  	{
		// security bypass for file:
		/*try {
		netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
		} catch (e) {
		alert("Permission UniversalBrowserRead denied.");
		}*/
  		xmlhttp=new XMLHttpRequest()
 	}
// code for IE
	else if (window.ActiveXObject)
  	{
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
  	}

	if (xmlhttp!=null)
  	{
 		xmlhttp.onreadystatechange=onResponse;
  		xmlhttp.open("GET",url,true);
  		xmlhttp.send(null);
  	}
	else
  	{
  		alert("Your browser does not support XMLHTTP.")
  	}
}


// **************************************

function checkReadyState(xmlhttp) {
	if(xmlhttp.readyState == 4){ // if the request is finished
		if(xmlhttp.status == 200) {  // and successfull
    		  return true;
  		}
		else {
  			atxt="<img src=\"\/skylights\/images\/CP\/seatseeker\/loading_error.gif\" height=\"35px\" alt=\"Sorry there is a problem with the data feed, please try again later!\" width=\"200px\"\/>";
  			document.getElementById("loader").innerHTML=atxt;
			document.getElementById("loader").style.display="block";
			//document.getElementById("typeSelector").style.display="none";
		}
	}
  	else {
  		atxt="<img src=\"\/skylights\/images\/CP\/seatseeker\/loading_ani.gif\" height=\"20px\" width=\"200px\"\/>";
		document.getElementById("loader").innerHTML=atxt;
		document.getElementById("loader").style.display="block";
	  }
}


function onResponse() {
	if(checkReadyState(xmlhttp)) {

  		document.getElementById("loader").innerHTML="";
		document.getElementById("loader").style.display="none";

		if (typeof ActiveXObject != "undefined") {  // build xml doc for ie
			var msXmlAx = null;
			try {
				msXmlAx = new ActiveXObject ("Msxml2.DOMDocument");
			}
			catch (e) {
				msXmlAx = new ActiveXObject ("Msxml.DOMDocument");
			}
			xmlDoc = msXmlAx;
			xmlDoc.async=false;
			xmlDoc.loadXML(xmlhttp.responseText);
		}
		else if (document.implementation && document.implementation.createDocument) {// build xml doc for moz
			xmlDoc = document.implementation.createDocument("","",null);
			var text = xmlhttp.responseText;
			var parser=new DOMParser();
			xmlDoc=parser.parseFromString(text,"text/xml");
		}
	pageProcesses()
	}


}

