// JavaScript Document

function showToolTip(theId) {

document.getElementById(theId).style.display="block";

}

function hideToolTip(theId) {

document.getElementById(theId).style.display="none";

}


function swapImage (theImage) {
	

	
	
document.getElementById('swap').src = "/Ultimate/images/" + theImage + "_image.jpg";


switch(theImage) {
	
	
case "ashton":

	document.getElementById('view_floorplans').href = "javascript:switchListing('ashton');";
	document.getElementById('photo_gallery').href = "http://www.trimarkproperties.com/ashton_lane_luxury_apartments/";

break;


case "camden":

	document.getElementById('view_floorplans').href = "javascript:switchListing('camden');";
	document.getElementById('photo_gallery').href = "http://www.trimarkproperties.com/Camden_Court_Luxury_Apartments_Gainesville_Fl/";

break;


case "heritage":

	document.getElementById('view_floorplans').href = "javascript:switchListing('heritage');";
	document.getElementById('photo_gallery').href = "http://www.trimarkproperties.com/heritage_oaks_apartments_in_gainesville_florida/phase2/";

break;


case "royale":

	document.getElementById('view_floorplans').href = "javascript:switchListing('royale');";
	document.getElementById('photo_gallery').href = "http://www.trimarkproperties.com/royale_palms_luxury_gainesville_apartments/";

break;


case "sabal":

	document.getElementById('view_floorplans').href = "javascript:switchListing('sabal');";
	document.getElementById('photo_gallery').href = "http://www.trimarkproperties.com/sabal_palms_luxury_apartments_gainesville_fl/";

break;



case "stratford":

	document.getElementById('view_floorplans').href = "javascript:switchListing('stratford');";
	document.getElementById('photo_gallery').href = "http://www.trimarkproperties.com/stratford_court_gainesville_apartments/luxury-2005/";

break;


	
	
}

document.getElementById('swapHolder').style.display = "block";
	
	
}

function showMap () {
	
document.getElementById('swapHolder').style.display = "none";	
	
}



var xmlHttp

function switchListing(showOnly)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
document.getElementById('theLuxApts').innerHTML = "<div align='center' style='margin:100px 0;'><img src='/images/loading_ajax.gif' /></div>";


document.getElementById('swapHolder').style.display = "none";

var url="/js/affordable.asp?showOnly=" + 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;
	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;
}