// JavaScript Document

function showToolTip(theId) {

document.getElementById(theId).style.display="block";

}

function hideToolTip(theId) {

document.getElementById(theId).style.display="none";

}


function showMap () {
	
document.getElementById('swapHolder').style.display = "none";	
	
}



var xmlHttp

function switchListing(showOnly , typed)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
document.getElementById('theLuxApts').innerHTML = "Loading...";


//document.getElementById('swapHolder').style.display = "none";
 if (typed == "bedrooms") {
	 var url="/js/houses.asp?rooms=" + escape(showOnly);
 } else {
var url="/js/houses.asp?showOnly=" + escape(showOnly);
 }
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged() 
{ 
//have we got the data? yezzir. time to handle it.
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 
 
 	document.getElementById('theLuxApts').innerHTML = xmlHttp.responseText;
	document.getElementById('theLuxApts').style.marginTop = "10px";
	window.location.hash = "#Luxury";
	showMap();
 
 }
else {

	
}



}


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;
}