// JavaScript Document
var xmlHttp2;
function getfacilities(type){
	document.getElementById("facilities").innerHTML = '<table height="100%" cellspacing="2"><tr><td><img src="images/ajax-loader.gif" alt="Please Wait for AJAX Results"/></td><td></td></tr></table>';

	xmlHttp2 = getXmlHttpObject();

	if (xmlHttp2 == null){
		alert ("Browser Does not Support AJAX");
		return;
		}

	var url = "Scripts/getfacilitiesfortype.php";
	url = url+"?type="+type+"&sid="+Math.random();

  xmlHttp2.onreadystatechange=state_Change3;
  xmlHttp2.open("GET",url,true);
  xmlHttp2.send(null);

	}
	
function state_Change3(){
	if(xmlHttp2.readyState == 4){
	document.getElementById("facilities").innerHTML = xmlHttp2.responseText;
		}
	
	}	
	
/*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;
}*/
	
