$(document).ready(function(){		
		$(".halonav li").hoverIntent (
			function(){ $("div", this).slideDown("fast"); }, 
			function(){ $("div", this).fadeOut("fast"); } 
		);

		$(".halonav li #a", this).hover (
			function(){ $("a.searchlistings").addClass("searchlistingshover"); }, 
			function(){ $("a.searchlistings").removeClass("searchlistingshover"); } 
			);
		$(".halonav li #b", this).hover (
			function(){ $("a.newdevelopments").addClass("newdevelopmentshover"); }, 
			function(){ $("a.newdevelopments").removeClass("newdevelopmentshover"); } 
			);
		$(".halonav li #c", this).hover (
			function(){ $("a.ouragents").addClass("ouragentshover"); }, 
			function(){ $("a.ouragents").removeClass("ouragentshover"); } 
			);
		$(".halonav li #d", this).hover (
			function(){ $("a.areastowns").addClass("areastownshover"); }, 
			function(){ $("a.areastowns").removeClass("areastownshover"); } 
			);
		$(".halonav li #e", this).hover (
			function(){ $("a.globalservices").addClass("globalserviceshover"); }, 
			function(){ $("a.globalservices").removeClass("globalserviceshover"); } 
			);
		$(".halonav li #f", this).hover (
			function(){ $("a.resources").addClass("resourceshover"); }, 
			function(){ $("a.resources").removeClass("resourceshover"); } 
			);
		$(".halonav li #g", this).hover (
			function(){ $("a.aboutus").addClass("aboutushover"); }, 
			function(){ $("a.aboutus").removeClass("aboutushover"); } 
			);
			
	});		
	
	

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function check() {
  selInd = document.quick.type.selectedIndex; 
  if ( selInd == 3 ) {
	goURL = "addresses.aspx"
	top.location.href = goURL; 
  }
}

var thestate = false

function checkall(formname){
if (thestate == false) { //toggle existing state of h
 thestate = true;
 }else{
 thestate = false;
 }
var el_collection=eval("document.forms."+formname)
for (c=0;c<el_collection.length;c++)
el_collection[c].checked=thestate
}







function ExpandClose(ID, icon){
	if(document.getElementById(ID).style.display == 'none'){
		document.getElementById(ID).style.display = '';
		document.images[icon].src = "gfx/expand_close.gif";
 	}
	else{
		document.getElementById(ID).style.display = 'none'
        document.images[icon].src = "gfx/expand_open.gif";
 	}
}


function UES()
{
	var args = arguments;
	start_point:
	for (var i=0;i<document.forms['Search'].elements.length;i++)
	{
	found = false;
	var e=document.forms['Search'].elements[i];
	if ((e.name != 'SectUES') && (e.type=='checkbox'))
		{
		for (var j = 0; j < args.length; j++)
			if (args[j] == e.name)			
			e.checked=document.forms['Search'].SectUES.checked;
		}
	}	
}

function MES()
{
	var args = arguments;
	start_point:
	for (var i=0;i<document.forms['Search'].elements.length;i++)
	{
	found = false;
	var e=document.forms['Search'].elements[i];
	if ((e.name != 'SectMES') && (e.type=='checkbox'))
		{
		for (var j = 0; j < args.length; j++)
			if (args[j] == e.name)			
			e.checked=document.forms['Search'].SectMES.checked;
		}
	}	
}

function UWS()
{
	var args = arguments;
	start_point:
	for (var i=0;i<document.forms['Search'].elements.length;i++)
	{
	found = false;
	var e=document.forms['Search'].elements[i];
	if ((e.name != 'SectUWS') && (e.type=='checkbox'))
		{
		for (var j = 0; j < args.length; j++)
			if (args[j] == e.name)			
			e.checked=document.forms['Search'].SectUWS.checked;
		}
	}	
}



function MWS()
{
	var args = arguments;
	start_point:
	for (var i=0;i<document.forms['Search'].elements.length;i++)
	{
	found = false;
	var e=document.forms['Search'].elements[i];
	if ((e.name != 'SectMWS') && (e.type=='checkbox'))
		{
		for (var j = 0; j < args.length; j++)
			if (args[j] == e.name)			
			e.checked=document.forms['Search'].SectMWS.checked;
		}
	}	
}

function UMH()
{
	var args = arguments;
	start_point:
	for (var i=0;i<document.forms['Search'].elements.length;i++)
	{
	found = false;
	var e=document.forms['Search'].elements[i];
	if ((e.name != 'SectUMH') && (e.type=='checkbox'))
		{
		for (var j = 0; j < args.length; j++)
			if (args[j] == e.name)			
			e.checked=document.forms['Search'].SectUMH.checked;
		}
	}	
}

function DTN()
{
	var args = arguments;
	start_point:
	for (var i=0;i<document.forms['Search'].elements.length;i++)
	{
	found = false;
	var e=document.forms['Search'].elements[i];
	if ((e.name != 'SectDTN') && (e.type=='checkbox'))
		{
		for (var j = 0; j < args.length; j++)
			if (args[j] == e.name)			
			e.checked=document.forms['Search'].SectDTN.checked;
		}
	}	
}

function BRK()
{
	var args = arguments;
	start_point:
	for (var i=0;i<document.forms['Search'].elements.length;i++)
	{
	found = false;
	var e=document.forms['Search'].elements[i];
	if ((e.name != 'SectBRK') && (e.type=='checkbox'))
		{
		for (var j = 0; j < args.length; j++)
			if (args[j] == e.name)			
			e.checked=document.forms['Search'].SectBRK.checked;
		}
	}	
}

function QNS()
{
	var args = arguments;
	start_point:
	for (var i=0;i<document.forms['Search'].elements.length;i++)
	{
	found = false;
	var e=document.forms['Search'].elements[i];
	if ((e.name != 'SectQNS') && (e.type=='checkbox'))
		{
		for (var j = 0; j < args.length; j++)
			if (args[j] == e.name)			
			e.checked=document.forms['Search'].SectQNS.checked;
		}
	}	
}

function NJS()
{
	var args = arguments;
	start_point:
	for (var i=0;i<document.forms['Search'].elements.length;i++)
	{
	found = false;
	var e=document.forms['Search'].elements[i];
	if ((e.name != 'SectNJS') && (e.type=='checkbox'))
		{
		for (var j = 0; j < args.length; j++)
			if (args[j] == e.name)			
			e.checked=document.forms['Search'].SectNJS.checked;
		}
	}	
}

function CT()
{
	var args = arguments;
	start_point:
	for (var i=0;i<document.forms['Search'].elements.length;i++)
	{
	found = false;
	var e=document.forms['Search'].elements[i];
	if ((e.name != 'SectCT') && (e.type=='checkbox'))
		{
		for (var j = 0; j < args.length; j++)
			if (args[j] == e.name)			
			e.checked=document.forms['Search'].SectCT.checked;
		}
	}	
}

function BRX()
{
	var args = arguments;
	start_point:
	for (var i=0;i<document.forms['Search'].elements.length;i++)
	{
	found = false;
	var e=document.forms['Search'].elements[i];
	if ((e.name != 'SectBRX') && (e.type=='checkbox'))
		{
		for (var j = 0; j < args.length; j++)
			if (args[j] == e.name)			
			e.checked=document.forms['Search'].SectBRX.checked;
		}
	}	
}

function WCH()
{
	var args = arguments;
	start_point:
	for (var i=0;i<document.forms['Search'].elements.length;i++)
	{
	found = false;
	var e=document.forms['Search'].elements[i];
	if ((e.name != 'SectWCH') && (e.type=='checkbox'))
		{
		for (var j = 0; j < args.length; j++)
			if (args[j] == e.name)			
			e.checked=document.forms['Search'].SectWCH.checked;
		}
	}	
}




function UWS_check()
{
	if (document.forms['Search'].SectUWS.checked == true)
	{
		   document.forms['Search'].n20.checked = true
		   document.forms['Search'].n23.checked = true
		   document.forms['Search'].n28.checked = true
		   document.forms['Search'].n42.checked = true
	}
}

function UMH_check()
{
	if (document.forms['Search'].SectUMH.checked == true)
	{
		   document.forms['Search'].n8.checked = true
		   document.forms['Search'].n13.checked = true
		   document.forms['Search'].n16.checked = true
		   document.forms['Search'].n17.checked = true
		   document.forms['Search'].n31.checked = true
		   document.forms['Search'].n49.checked = true
		   document.forms['Search'].n48.checked = true
		   document.forms['Search'].n31.checked = true
		   document.forms['Search'].n34.checked = true
		   document.forms['Search'].n43.checked = true
	}
}

function UES_check()
{
	if (document.forms['Search'].SectUES.checked == true)
	{
		  document.forms['Search'].n3.checked = true
		  document.forms['Search'].n19.checked = true
		  document.forms['Search'].n45.checked = true
	}
}

function MES_check()
{
	if (document.forms['Search'].SectMES.checked == true)
	{
		  document.forms['Search'].n35.checked = true
		   document.forms['Search'].n38.checked = true
		   document.forms['Search'].n29.checked = true
		   document.forms['Search'].n18.checked = true
	}
}

function MWS_check()
{
	if (document.forms['Search'].SectMWS.checked == true)
	{
		  document.forms['Search'].n7.checked = true
		   document.forms['Search'].n36.checked = true
		   document.forms['Search'].n10.checked = true
	}
}

function DTN_check()
{
	if (document.forms['Search'].SectDTN.checked == true)
	{	
		 if (document.forms['Search'].nCHL != null){
			 document.forms['Search'].nCHL.checked = true
		  }
		 if (document.forms['Search'].nWVL != null){
			 document.forms['Search'].nWVL.checked = true
		  }
		  if (document.forms['Search'].nCVL != null){
			 document.forms['Search'].nCVL.checked = true
		  }
		  if (document.forms['Search'].nSHO != null){
			 document.forms['Search'].nSHO.checked = true
		  }
		  if (document.forms['Search'].nTRI != null){
			 document.forms['Search'].nTRI.checked = true
		  }
		  if (document.forms['Search'].nLMH != null){
			 document.forms['Search'].nLMH.checked = true
		  }
		  if (document.forms['Search'].nBPC != null){
			 document.forms['Search'].nBPC.checked = true
		  }
		  if (document.forms['Search'].nFLT != null){
			 document.forms['Search'].nFLT.checked = true
		  }
		  if (document.forms['Search'].nGPK != null){
			 document.forms['Search'].nGPK.checked = true
		  }
		  if (document.forms['Search'].nSTU != null){
			 document.forms['Search'].nSTU.checked = true
		  }
		  if (document.forms['Search'].nEVL != null){
			 document.forms['Search'].nEVL.checked = true
		  }
		  if (document.forms['Search'].nNHO != null){
			 document.forms['Search'].nNHO.checked = true
		  }
		 if (document.forms['Search'].nCHT != null){
			 document.forms['Search'].nCHT.checked = true
		  }
		 if (document.forms['Search'].nITA != null){
			 document.forms['Search'].nITA.checked = true
		  } 
		 if (document.forms['Search'].nLES != null){
			 document.forms['Search'].nLES.checked = true
		  } 
	}
}

function WCH_check()
{
	if (document.forms['Search'].SectWCH.checked == true)
	{
		 document.forms['Search'].nWHT.checked = true
		 document.forms['Search'].nYON.checked = true
	}
}

function QNS_check()
{
	if (document.forms['Search'].SectQNS.checked == true)
	{
		 if (document.forms['Search'].nLIC != null){
			 document.forms['Search'].nLIC.checked = true
		  } 
		if (document.forms['Search'].n1FU != null){
			 document.forms['Search'].n1FU.checked = true
		  } 
		if (document.forms['Search'].n1AT != null){
			 document.forms['Search'].n1AT.checked = true
		  } 
		if (document.forms['Search'].n1SS != null){
			 document.forms['Search'].n1SS.checked = true
		  } 
		if (document.forms['Search'].n1FH != null){
			 document.forms['Search'].n1FH.checked = true
		  } 		
	}
}

function BRX_check()
{
	if (document.forms['Search'].SectBRX.checked == true)
	{
		 document.forms['Search'].nRIV.checked = true
	}
}

function NJS_check()
{
	if (document.forms['Search'].SectNJS.checked == true)
	{
		 if (document.forms['Search'].nHOB != null){
			 document.forms['Search'].nHOB.checked = true
		  } 
		  if (document.forms['Search'].nIVG != null){
			 document.forms['Search'].nIVG.checked = true
		  } 
		  if (document.forms['Search'].nJER != null){
			 document.forms['Search'].nJER.checked = true
		  } 
		  if (document.forms['Search'].nMTC != null){
			 document.forms['Search'].nMTC.checked = true
		  } 
		  if (document.forms['Search'].nSOG != null){
			 document.forms['Search'].nSOG.checked = true
		  } 
		  if (document.forms['Search'].nWEE != null){
			 document.forms['Search'].nWEE.checked = true
		  } 
		  if (document.forms['Search'].nWOG != null){
			 document.forms['Search'].nWOG.checked = true
		  } 
		  if (document.forms['Search'].nMPW != null){
			 document.forms['Search'].nMPW.checked = true
		  } 
		  if (document.forms['Search'].nITA != null){
			 document.forms['Search'].nITA.checked = true
		  } 
	}
}

function CT_check()
{
	if (document.forms['Search'].SectCT.checked == true)
	{
		if (document.forms['Search'].nBRI != null){
			 document.forms['Search'].nBRI.checked = true
		  } 
		if (document.forms['Search'].nDAN != null){
			 document.forms['Search'].nDAN.checked = true
		  } 		
		if (document.forms['Search'].nDAR != null){
			 document.forms['Search'].nDAR.checked = true
		  } 		
		if (document.forms['Search'].nEAS != null){
			 document.forms['Search'].nEAS.checked = true
		  } 	
		if (document.forms['Search'].nFAI != null){
			 document.forms['Search'].nFAI.checked = true
		  } 			  
		if (document.forms['Search'].nGWH != null){
			 document.forms['Search'].nGWH.checked = true
		  } 			  
		if (document.forms['Search'].nMON != null){
			 document.forms['Search'].nMON.checked = true
		  } 			  
		if (document.forms['Search'].nNCA != null){
			 document.forms['Search'].nNCA.checked = true
		  } 			  
		if (document.forms['Search'].nNTN != null){
			 document.forms['Search'].nNTN.checked = true
		  } 			  
		if (document.forms['Search'].nNOR != null){
			 document.forms['Search'].nNOR.checked = true
		  } 			  
		if (document.forms['Search'].nSLT != null){
			 document.forms['Search'].nSLT.checked = true
		  } 			  
		if (document.forms['Search'].nSTM != null){
			 document.forms['Search'].nSTM.checked = true
		  } 			  
		if (document.forms['Search'].nTRU != null){
			 document.forms['Search'].nTRU.checked = true
		  } 			  
		if (document.forms['Search'].nWTN != null){
			 document.forms['Search'].nWTN.checked = true
		  } 			  
		if (document.forms['Search'].nWTP != null){
			 document.forms['Search'].nWTP.checked = true
		  } 			  
		if (document.forms['Search'].nWIL != null){
			 document.forms['Search'].nWIL.checked = true
		  } 			  
		if (document.forms['Search'].nROW != null){
			 document.forms['Search'].nROW.checked = true
		  } 			  
		
	}
}


function BRK_check()
{
	if (document.forms['Search'].SectBRK.checked == true)
	{
		if (document.forms['Search'].nBAT != null){
			 document.forms['Search'].nBAT.checked = true
		  } 
		if (document.forms['Search'].nBAY != null){
			 document.forms['Search'].nBAY.checked = true
		  } 		
		if (document.forms['Search'].nBED != null){
			 document.forms['Search'].nBED.checked = true
		  } 		
		if (document.forms['Search'].nBEN != null){
			 document.forms['Search'].nBEN.checked = true
		  } 	
		if (document.forms['Search'].nBOR != null){
			 document.forms['Search'].nBOR.checked = true
		  } 			  
		if (document.forms['Search'].nBOP != null){
			 document.forms['Search'].nBOP.checked = true
		  } 			  
		if (document.forms['Search'].nBRB != null){
			 document.forms['Search'].nBRB.checked = true
		  } 			  
		if (document.forms['Search'].nBRG != null){
			 document.forms['Search'].nBRG.checked = true
		  } 			  
		if (document.forms['Search'].nBKH != null){
			 document.forms['Search'].nBKH.checked = true
		  } 			  
		if (document.forms['Search'].nBRO != null){
			 document.forms['Search'].nBRO.checked = true
		  } 			  
		if (document.forms['Search'].nBUS != null){
			 document.forms['Search'].nBUS.checked = true
		  } 			  
		if (document.forms['Search'].nCAN != null){
			 document.forms['Search'].nCAN.checked = true
		  } 			  
		if (document.forms['Search'].nCAR != null){
			 document.forms['Search'].nCAR.checked = true
		  } 			  
		if (document.forms['Search'].nCLI != null){
			 document.forms['Search'].nCLI.checked = true
		  } 			  
		if (document.forms['Search'].nCOB != null){
			 document.forms['Search'].nCOB.checked = true
		  } 			  
		if (document.forms['Search'].nCSW != null){
			 document.forms['Search'].nCSW.checked = true
		  } 			  
		if (document.forms['Search'].nCON != null){
			 document.forms['Search'].nCON.checked = true
		  } 			  
		if (document.forms['Search'].nCRO != null){
			 document.forms['Search'].nCRO.checked = true
		  } 		
		if (document.forms['Search'].nDIT != null){
			 document.forms['Search'].nDIT.checked = true
		  } 		
		if (document.forms['Search'].nDOW != null){
			 document.forms['Search'].nDOW.checked = true
		  } 			  
		if (document.forms['Search'].nDUM != null){
			 document.forms['Search'].nDUM.checked = true
		  } 			  
		if (document.forms['Search'].nDYK != null){
			 document.forms['Search'].nDYK.checked = true
		  } 			  
		if (document.forms['Search'].nEFB != null){
			 document.forms['Search'].nEFB.checked = true
		  } 			  
		if (document.forms['Search'].nENY != null){
			 document.forms['Search'].nENY.checked = true
		  } 			  
		if (document.forms['Search'].nEWI != null){
			 document.forms['Search'].nEWI.checked = true
		  } 			  
		if (document.forms['Search'].nFLA != null){
			 document.forms['Search'].nFLA.checked = true
		  } 			  
		if (document.forms['Search'].nFTL != null){
			 document.forms['Search'].nFTL.checked = true
		  } 			  
		if (document.forms['Search'].nFOR != null){
			 document.forms['Search'].nFOR.checked = true
		  } 			  
		if (document.forms['Search'].nGER != null){
			 document.forms['Search'].nGER.checked = true
		  } 			  
		if (document.forms['Search'].nGRA != null){
			 document.forms['Search'].nGRA.checked = true
		  } 			  
		if (document.forms['Search'].nGRE != null){
			 document.forms['Search'].nGRE.checked = true
		  } 			  
		if (document.forms['Search'].nKEN != null){
			 document.forms['Search'].nKEN.checked = true
		  } 			  
		if (document.forms['Search'].nMAN != null){
			 document.forms['Search'].nMAN.checked = true
		  } 			  
		if (document.forms['Search'].nMAR != null){
			 document.forms['Search'].nMAR.checked = true
		  } 			  
		if (document.forms['Search'].nMID != null){
			 document.forms['Search'].nMID.checked = true
		  } 			  
		if (document.forms['Search'].nMIL != null){
			 document.forms['Search'].nMIL.checked = true
		  } 			  
		if (document.forms['Search'].nPAR != null){
			 document.forms['Search'].nPAR.checked = true
		  } 			
		if (document.forms['Search'].nPRO != null){
			 document.forms['Search'].nPRO.checked = true
		  } 			  
		if (document.forms['Search'].nPPS != null){
			 document.forms['Search'].nPPS.checked = true
		  } 			  
		if (document.forms['Search'].nPLG != null){
			 document.forms['Search'].nPLG.checked = true
		  } 			  
		if (document.forms['Search'].nRED != null){
			 document.forms['Search'].nRED.checked = true
		  } 			  
		if (document.forms['Search'].nSHE != null){
			 document.forms['Search'].nSHE.checked = true
		  } 			  
		if (document.forms['Search'].nSEA != null){
			 document.forms['Search'].nSEA.checked = true
		  } 			  
		if (document.forms['Search'].nSUN != null){
			 document.forms['Search'].nSUN.checked = true
		  } 			  
		if (document.forms['Search'].nVIN != null){
			 document.forms['Search'].nVIN.checked = true
		  } 			  
		if (document.forms['Search'].nWNS != null){
			 document.forms['Search'].nWNS.checked = true
		  } 			  
		if (document.forms['Search'].nWSS != null){
			 document.forms['Search'].nWSS.checked = true
		  } 			  
		if (document.forms['Search'].nWIN != null){
			 document.forms['Search'].nWIN.checked = true
		  } 			  
		if (document.forms['Search'].nWSB != null){
			 document.forms['Search'].nWSB.checked = true
		  } 			    
		    
	}
}

function loadZipImages(zipnum) {

	str = "maprollimg_" + zipnum + " = new Image();";
	eval(str);
	str = "maprollimg_" + zipnum + ".src = 'img/maps/" + zipnum + ".gif';";
	eval(str);
}

maprollimg_0 = new Image();
maprollimg_0.src = "img/maps/blank.gif";
	
function rollOverMap(zip) {
		document.getElementById('invisiMap'+zip).innerHTML = "<IMG SRC=\"" + eval("maprollimg_" + zip + ".src") + "\" width=450 height=110 border=0 name=transmapsinvisiMap  USEMAP=#h_map class=Maps>";
	}

function rollOffMap(zip) {
	if (eval("document.Search."+ zip +".checked == true")) 
		{
			document.getElementById('invisiMap'+zip).innerHTML = "<IMG SRC=\"" + eval("maprollimg_" + zip + ".src") + "\" width=450 height=110 border=0 name=transmapsinvisiMap  USEMAP=#h_map class=Maps>";
		} else
		{
			document.getElementById('invisiMap'+zip).innerHTML = "<IMG SRC=\"" + eval("maprollimg_0.src") + "\"  width=450 height=110 border=0 name=transmapsinvisiMap  USEMAP=#h_map class=Maps>";
		}
}


function passCheckbox(zip) {
	if (eval("document.Search." + zip + ".checked == true")) {
		document.getElementById('invisiMap'+ zip).innerHTML = "<IMG SRC=\"" + eval("maprollimg_" + zip + ".src") + "\" WIDTH=450 HEIGHT=110 BORDER=0 name=transmapsinvisiMap  USEMAP=#h_map class=Maps>";		
	} else {
		
		document.getElementById('invisiMap'+ zip).innerHTML = "<IMG SRC=\"" + eval("maprollimg_0.src") + "\"  WIDTH=450 HEIGHT=110 BORDER=0 name=transmapsinvisiMap  USEMAP=#h_map class=Maps>";
	}
}

function checksetup(zip) {
	if (eval("document.Search."+ zip +".checked == 0")) 
		{
		  eval("document.Search."+ zip +".checked = 1");			
		} else
		{
		  if (eval("document.Search."+ zip +".checked == true")) 
		  	{ 
		  	eval("document.Search."+ zip +".checked = 0");	
			document.getElementById('invisiMap'+ zip).innerHTML = "<IMG SRC=\"" + eval("maprollimg_0.src") + "\"  WIDTH=450 HEIGHT=110 BORDER=0 name=transmapsinvisiMap  USEMAP=#h_map class=Maps>";	
			}
			
		}
  
	}

function checksetup2(zip) {
	if (eval("document.Search."+ zip +".checked == 0")) 
		{
		  eval("document.Search."+ zip +".checked = 1");			
		} else
		{
		  if (eval("document.Search."+ zip +".checked == true")) 
		  	{ 
		  	eval("document.Search."+ zip +".checked = 0");	
			//document.getElementById('invisiMap'+ zip).innerHTML = "<IMG SRC=\"" + eval("maprollimg_0.src") + "\"  WIDTH=450 HEIGHT=110 BORDER=0 name=transmapsinvisiMap  USEMAP=#h_map class=Maps>";	
			}
			
		}
  
	}	
	
function checksetup_super(zip) {
	if (eval("document.Search."+ zip +".checked == 0")) 
		{
		  eval("document.Search."+ zip +".checked = 1");			
		  document.getElementById('invisiMap'+ zip).innerHTML = "<IMG SRC=\"" + eval("maprollimg_" + zip + ".src") + "\"  WIDTH=450 HEIGHT=110 BORDER=0 name=transmapsinvisiMap  USEMAP=#h_map class=Maps>";
		} else
		{
		  if (eval("document.Search."+ zip +".checked == true")) 
		  	{ 
		  	eval("document.Search."+ zip +".checked = 0");	
			document.getElementById('invisiMap'+ zip).innerHTML = "<IMG SRC=\"" + eval("maprollimg_0.src") + "\"  WIDTH=450 HEIGHT=110 BORDER=0 name=transmapsinvisiMap  USEMAP=#h_map class=Maps>";	
			}
		}
  
	}	
	
function checksetup_noimg(zip) {
	if (eval("document.Search."+ zip +".checked == 0")) 
		{
		  eval("document.Search."+ zip +".checked = 1");			
		} else
		{
		  if (eval("document.Search."+ zip +".checked == true")) 
		  	{ 
		  	eval("document.Search."+ zip +".checked = 0");	
			//document.getElementById('invisiMap'+ zip).innerHTML = "<IMG SRC=\"" + eval("maprollimg_0.src") + "\"  WIDTH=450 HEIGHT=110 BORDER=0 name=transmapsinvisiMap  USEMAP=#h_map class=Maps>";	
			}
		}
  
	}	
	

		
function AllManhattan()
{
	checksetup_super('SectDTN');DTN('nCHL','nWVL','nCVL','nSHO','nTRI','nLMH','nBPC','nFLT','nGPK','nSTU','nEVL','nNHO','nCHT','nITA','nLES');
	checksetup_super('SectMWS');MWS('n7','n36','n10');
	checksetup_super('SectMES');MES('n35','n38','n29', 'n18');
	checksetup_super('SectUWS');UWS('n20','n23','n28','n42');
	checksetup_super('SectUES');UES('n3','n19','n45');
	checksetup_super('SectUMH');UMH('n8','n13','n16','n17','n49','n48','n31','n34','n43');
}

function AllQueens()
{
	checksetup_noimg('SectQNS');QNS('nLIC','n1FU');
}


function AllBronx()
{
	checksetup_super('SectBRX');BRX('nRIV');
}

function AllNewJersey()
{
	checksetup_super('SectNJS');
}

function AllConnecticut()
{
	checksetup_noimg('SectCT');
}

function AllHudsonValley()
{
	checksetup_noimg('nUNY');
}

function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)	 
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
}


function Switcher(quick){
	if(document.getElementById(quick).style.display == 'none'){
		document.getElementById(quick).style.display = '';		
		var element = document.getElementById("myText");
        element.innerHTML = document.getElementById("FlipHide").innerHTML;
 	}
	else{
		document.getElementById(quick).style.display = 'none'
		var element = document.getElementById("myText");
        element.innerHTML = document.getElementById("MyHalsteadFlip").innerHTML;
 	}
}










function createRequestObject() {
     var req;

     if ( window.XMLHttpRequest ) {
          // Firefox, Safari, Opera...
          req = new XMLHttpRequest();
     }
     else if ( window.ActiveXObject ) {
          try {
               if ( navigator.appVersion.indexOf("MSIE 5.5") >= 0 ) {
                    // Internet Explorer 5+
                    req = new ActiveXObject("Microsoft.XMLHTTP");
               }
               else {
                    // Internet Explorer 6+
                    req = new ActiveXObject("Msxml2.XMLHTTP");
               }
          }
          catch ( e ) {
               
               return;
          }
     }
     else {
          // There is an error creating the object,
          // just as an old browser is being used.
         alert("couldnt make object, ie sucks");
          return;
     }

     return req;
}

var http = createRequestObject();

function handleResponse() {
	//alert("pre" + http.status);
	 //if ( http.status == 200 ) {
     if ( http.readyState == 4 && http.status == 200 ) {
          var response = http.responseText;

          if ( response ) {
               document.getElementById("searchResults").innerHTML = http.responseText;
               document.getElementById("searchResults").style.display = "";
			   OptionsHide();
			   if(document.getElementById("Weather")) {
			   document.getElementById("LuxSect").style.display = "none";
		  	   document.getElementById("LuxPrice").style.display = "none";
		  	   document.getElementById("LuxPaging").style.display = "none";
          }}
          else {
		  	   OptionsReveal();
               document.getElementById("searchResults").style.display = "none";
			   if(document.getElementById("Weather")) {
			   document.getElementById("LuxSect").style.display = "inline";
		 	   document.getElementById("LuxPrice").style.display = "inline";
		  	   document.getElementById("LuxPaging").style.display = "inline";
          }}
     }
}


function sendRequest(str)
{
   if ( str.length > 0 ) {
		  	 var url = "suggest.aspx?sid=" + Math.random() + "&q="+str;
			 http.open("GET", url , true);
			 http.onreadystatechange = handleResponse;
             http.send(null);
			 OptionsHide();
			 if(document.getElementById("Weather")) {
			 //alert("test");
			 document.getElementById("LuxSect").style.display = "none";
		  	 document.getElementById("LuxPrice").style.display = "none";
		  	 document.getElementById("LuxPaging").style.display = "none";
			 }
     }
     else {
          document.getElementById("searchResults").style.display = "none";
          document.getElementById("searchResults").innerHTML = "";
		  OptionsReveal();
		  if(document.getElementById("Weather")) {
		  document.getElementById("LuxSect").style.display = "inline";
		  document.getElementById("LuxPrice").style.display = "inline";
		  document.getElementById("LuxPaging").style.display = "inline";
		  }
          return;
     }
}



function Suggest() {
	document.getElementById("searchResults").style.display = "none";
    document.getElementById("searchResults").innerHTML = "";
	document.quicksearch.q.value = "";
	OptionsReveal();
	if(document.getElementById("Weather")) {
	document.getElementById("LuxSect").style.display = "inline";
	document.getElementById("LuxPrice").style.display = "inline";
	document.getElementById("LuxPaging").style.display = "inline";
}}


function SuggestRestore() {
	OptionsReveal();
	document.getElementById("searchResults").style.display = "none";
    document.getElementById("searchResults").innerHTML = "";
	if(document.getElementById("Weather")) {
	document.getElementById("LuxSect").style.display = "inline";
	document.getElementById("LuxPrice").style.display = "inline";
	document.getElementById("LuxPaging").style.display = "inline";
	}
	//document.quicksearch.query.value = "";
}


function MyHalstead() {
	document.getElementById('searchResults').style.display = "none";
	document.getElementById('MyHalsteadFlip').style.display = "block";
	document.quicksearch.type.style.display = "none";
	document.quicksearch.query.style.display = "none";
	document.quicksearch.SearchButton.style.display = "none";
	}
	
function ReturnSearch() {
	document.getElementById('MyHalsteadFlip').style.display = "none";
	document.quicksearch.type.style.display = "inline";
	document.quicksearch.q.style.display = "inline";
	document.quicksearch.SearchButton.style.display = "inline";
	}	

function ActivateHelp() {
	//alert("test");
	if(document.getElementById("helpoverlay")) {
	document.getElementById('helpoverlay').style.display='block';
	//document.getElementById('SearchBoxSelect').style.display='none';
	}}
	
function DeactivateHelp() {
	if(document.getElementById("helpoverlay")) {
	document.getElementById('helpoverlay').style.display='none';
	//document.getElementById('SearchBoxSelect').style.display='inline';
	}}		

function ShowWeather() {
	if(document.getElementById("Weather")) {
	document.getElementById('Weather').style.display='block';
	}}
	
function HideWeather() {
	if(document.getElementById("Weather")) {
	document.getElementById('Weather').style.display='none';
	}}
	
	
	
function HelpHide() {
	if(document.getElementById("helpbutton"))
	{
		document.getElementById('helpbutton').style.display='none';
	}}	
	
function HelpReveal() {
	if(document.getElementById("helpbutton"))
	{
		document.getElementById('helpbutton').style.display='inline';
	}}	

function OptionsHide() {
	if(document.getElementById("hidediv"))
	{
		document.getElementById('hidediv').style.display='none';
	}}	
	
function OptionsReveal() {
	if(document.getElementById("hidediv"))
	{
		document.getElementById('hidediv').style.display='inline';
	}}	

function ViewHide() {
	if(document.getElementById("ViewAll_LuxPort"))
	{
		document.getElementById('ViewAll_LuxPort').style.display='none';
	}
	if(document.getElementById("ViewAll_FProp"))
	{
		document.getElementById('ViewAll_FProp').style.display='none';
	}}	
	
function ViewReveal() {
	if(document.getElementById("ViewAll_LuxPort"))
	{
		document.getElementById('ViewAll_LuxPort').style.display='inline';
	}
	if(document.getElementById("ViewAll_FProp"))
	{
		document.getElementById('ViewAll_FProp').style.display='inline';
	}}	
	

	
	
	
	

	
function TabSwitch(str) {
	if (str == "Manhattan") {
		document.getElementById('Manhattan').style.display = "block";
		document.getElementById('OutsideManhattan').style.display = "none";
		document.getElementById('OutsideNewYork').style.display = "none";
		document.getElementById('OutsideUSA').style.display = "none";
		
		document.getElementById('NYC').className = "ActiveFirst";
		document.getElementById('OMH').className = "Inactive";
		document.getElementById('ONY').className = "Inactive";
		document.getElementById('OUS').className = "Inactive";
		}
	
	if (str == "OutsideManhattan") {
		
		document.getElementById('Manhattan').style.display = "none";
		document.getElementById('OutsideManhattan').style.display = "block";
		document.getElementById('OutsideNewYork').style.display = "none";
		document.getElementById('OutsideUSA').style.display = "none";		
		
		document.getElementById('NYC').className = "InactiveFirst";
		document.getElementById('OMH').className = "Active";
		document.getElementById('ONY').className = "Inactive";
		document.getElementById('OUS').className = "Inactive";
		}
	
	if (str == "OutsideNewYork") {
		document.getElementById('Manhattan').style.display = "none";
		document.getElementById('OutsideManhattan').style.display = "none";
		document.getElementById('OutsideNewYork').style.display = "block";
		document.getElementById('OutsideUSA').style.display = "none";
		
		document.getElementById('NYC').className = "InactiveFirst";
		document.getElementById('OMH').className = "Inactive";
		document.getElementById('ONY').className = "Active";
		document.getElementById('OUS').className = "Inactive";
		}
		
	if (str == "OutsideUSA") {
		document.getElementById('Manhattan').style.display = "none";
		document.getElementById('OutsideManhattan').style.display = "none";
		document.getElementById('OutsideNewYork').style.display = "none";
		document.getElementById('OutsideUSA').style.display = "block";
		
		document.getElementById('NYC').className = "InactiveFirst";
		document.getElementById('OMH').className = "Inactive";
		document.getElementById('ONY').className = "Inactive";
		document.getElementById('OUS').className = "ActiveLast";
		}		

	}	
	
	
	var maxcount
	var mincount
	var list1
	var list2
	var list3
	
	maxcount = 9
	mincount = 0
	list1 = 0
	list2 = 0	
	list3 = 0	
	
					function FillProperties() {
						list1 = 0;						
						list2 = 0;
						document.getElementById('LuxPhoto').src = LuxuryPortfolio[0][2];
						document.getElementById('LuxSect').innerHTML = LuxuryPortfolio[0][1];
						document.getElementById('LuxPrice').innerHTML = LuxuryPortfolio[0][4];
						document.getElementById('LuxAddress').innerHTML = LuxuryPortfolio[0][3];
						document.getElementById('LuxNotes').innerHTML = LuxuryPortfolio[0][5];
						document.getElementById('FPropPhoto').src = FeaturedProperty[0][2];
						document.getElementById('FPropSect').innerHTML = FeaturedProperty[0][1];
						document.getElementById('FPropPrice').innerHTML = FeaturedProperty[0][4];
						document.getElementById('FPropAddress').innerHTML = FeaturedProperty[0][3];	
						document.getElementById('FPropNotes').innerHTML = FeaturedProperty[0][5];
						document.getElementById('NewDevPhoto').src = NewDev[0][2];
						document.getElementById('NewDevSect').innerHTML = NewDev[0][1];
						document.getElementById('NewDevPrice').innerHTML = NewDev[0][4];
						document.getElementById('NewDevAddress').innerHTML = NewDev[0][3];	
						document.getElementById('NewDevNotes').innerHTML = NewDev[0][5];										
						}
					
					function luxport_previous() {	
						if (list1 > mincount) {
							document.getElementById('LuxPhoto').src = LuxuryPortfolio[list1][2];							
							document.getElementById('LuxSect').innerHTML = LuxuryPortfolio[list1][1];
							document.getElementById('LuxPrice').innerHTML = LuxuryPortfolio[list1][4];
							document.getElementById('LuxAddress').innerHTML = LuxuryPortfolio[list1][3];		
							document.getElementById('LuxNotes').innerHTML = LuxuryPortfolio[list1][5];	
							list1 = list1 - 1;
						}
							else
							list1 = maxcount;
							document.getElementById('LuxPhoto').src = LuxuryPortfolio[list1][2];
							document.getElementById('LuxSect').innerHTML = LuxuryPortfolio[list1][1];
							document.getElementById('LuxPrice').innerHTML = LuxuryPortfolio[list1][4];
							document.getElementById('LuxAddress').innerHTML = LuxuryPortfolio[list1][3];
							document.getElementById('LuxNotes').innerHTML = LuxuryPortfolio[list1][5];				
						}
						
					function luxport_next() {		
						if (list1 < maxcount) {			
							list1 = list1 + 1;
							document.getElementById('LuxPhoto').src = LuxuryPortfolio[list1][2];						
							document.getElementById('LuxSect').innerHTML = LuxuryPortfolio[list1][1];
							document.getElementById('LuxPrice').innerHTML = LuxuryPortfolio[list1][4];
							document.getElementById('LuxAddress').innerHTML = LuxuryPortfolio[list1][3];
							document.getElementById('LuxNotes').innerHTML = LuxuryPortfolio[list1][5];						
							}
						else
							list1 = mincount;
							document.getElementById('LuxPhoto').src = LuxuryPortfolio[list1][2];						
							document.getElementById('LuxSect').innerHTML = LuxuryPortfolio[list1][1];
							document.getElementById('LuxPrice').innerHTML = LuxuryPortfolio[list1][4];			
							document.getElementById('LuxAddress').innerHTML = LuxuryPortfolio[list1][3];
							document.getElementById('LuxNotes').innerHTML = LuxuryPortfolio[list1][5];			
						}
						
					function fprop_previous() {		
						if (list2 > mincount) {
							document.getElementById('FPropPhoto').src = FeaturedProperty[list2][2];							
							document.getElementById('FPropSect').innerHTML = FeaturedProperty[list2][1];
							document.getElementById('FPropPrice').innerHTML = FeaturedProperty[list2][4];
							document.getElementById('FPropAddress').innerHTML = FeaturedProperty[list2][3];	
							document.getElementById('FPropNotes').innerHTML = FeaturedProperty[list2][5];			
							list2 = list2 - 1;
						}
							else
							list2 = maxcount;
							document.getElementById('FPropPhoto').src = FeaturedProperty[list2][2];
							document.getElementById('FPropSect').innerHTML = FeaturedProperty[list2][1];
							document.getElementById('FPropPrice').innerHTML = FeaturedProperty[list2][4];
							document.getElementById('FPropAddress').innerHTML = FeaturedProperty[list2][3];	
							document.getElementById('FPropNotes').innerHTML = FeaturedProperty[list2][5];			
						}
						
					function fprop_next() {		
						if (list2 < maxcount) {			
							list2 = list2 + 1;
							document.getElementById('FPropPhoto').src = FeaturedProperty[list2][2];					
							document.getElementById('FPropSect').innerHTML = FeaturedProperty[list2][1];
							document.getElementById('FPropPrice').innerHTML = FeaturedProperty[list2][4];
							document.getElementById('FPropAddress').innerHTML = FeaturedProperty[list2][3];
							document.getElementById('FPropNotes').innerHTML = FeaturedProperty[list2][5];						
							}
						else
							list2 = mincount;
							document.getElementById('FPropPhoto').src = FeaturedProperty[list2][2];					
							document.getElementById('FPropSect').innerHTML = FeaturedProperty[list2][1];
							document.getElementById('FPropPrice').innerHTML = FeaturedProperty[list2][4];			
							document.getElementById('FPropAddress').innerHTML = FeaturedProperty[list2][3];
							document.getElementById('FPropNotes').innerHTML = FeaturedProperty[list2][5];			
						}	
					
					function newdev_previous() {		
						if (list3 > mincount) {
							document.getElementById('NewDevPhoto').src = NewDev[list3][2];							
							document.getElementById('NewDevSect').innerHTML = NewDev[list3][1];
							document.getElementById('NewDevPrice').innerHTML = NewDev[list3][4];
							document.getElementById('NewDevAddress').innerHTML = NewDev[list3][3];	
							document.getElementById('NewDevNotes').innerHTML = NewDev[list3][5];			
							list3 = list3 - 1;
						}
							else
							list3 = maxcount;
							document.getElementById('NewDevPhoto').src = NewDev[list3][2];							
							document.getElementById('NewDevSect').innerHTML = NewDev[list3][1];
							document.getElementById('NewDevPrice').innerHTML = NewDev[list3][4];
							document.getElementById('NewDevAddress').innerHTML = NewDev[list3][3];	
							document.getElementById('NewDevNotes').innerHTML = NewDev[list3][5];			
						}
						
					function newdev_next() {		
						if (list3 < maxcount) {			
							list3 = list3 + 1;
							document.getElementById('NewDevPhoto').src = NewDev[list3][2];							
							document.getElementById('NewDevSect').innerHTML = NewDev[list3][1];
							document.getElementById('NewDevPrice').innerHTML = NewDev[list3][4];
							document.getElementById('NewDevAddress').innerHTML = NewDev[list3][3];	
							document.getElementById('NewDevNotes').innerHTML = NewDev[list3][5];						
							}
						else
							list3 = mincount;
							document.getElementById('NewDevPhoto').src = NewDev[list3][2];							
							document.getElementById('NewDevSect').innerHTML = NewDev[list3][1];
							document.getElementById('NewDevPrice').innerHTML = NewDev[list3][4];
							document.getElementById('NewDevAddress').innerHTML = NewDev[list3][3];	
							document.getElementById('NewDevNotes').innerHTML = NewDev[list3][5];			
						}	
					
					function ListingDetails(lid) {
						var lid;
						lid = LuxuryPortfolio[list1][0];
						document.LuxPort.id.value = lid;
						document.LuxPort.action = "detail.aspx?id=" + lid + "&f=y";
						document.LuxPort.submit();
						}
						
					function PropertyDetails(lid) {
						var lid;
						lid = FeaturedProperty[list2][0];
						document.FProp.id.value = lid;
						document.FProp.action = "detail.aspx?id=" + lid + "&f=y";
						//document.FProp.action = "detail.aspx?id=" + lid  + "&Section=Value&listingString=1118807,1697912,1499034,1628376,1616659,1678607,1164080,1124445,1601521,1620558,1595708,1693061,1692927,1699968,1628075,1619681,1671890,1518894,1700517,1590489,1630697,1495552,1476797,1708723,1701318,1499034,1671890,1659068";
						document.FProp.submit();
						}
					function DevelopmentDetails(lid) {
						var lid;
						lid = NewDev[list3][0];
						document.NewDev.id.value = lid;
						document.NewDev.action = "http://www.halsteadpdm.com/detail/?id=" + lid;
						document.NewDev.submit();
						}


	
	
		
	function SearchOptions() {
		
		//alert(document.getElementById("QuickSearchOptions").style.display);
		
		if (document.getElementById("QuickSearchOptions").style.display == "" || document.getElementById("QuickSearchOptions").style.display == "none") {	
			document.getElementById("SearchOptionsButton").style.background = "url(img/h_searchoptions_on.gif)";
			document.getElementById("QuickSearchOptions").style.display = "block";
			}
		else  {		
			document.getElementById("SearchOptionsButton").style.background = "url(img/h_searchoptions.gif)";
			document.getElementById("QuickSearchOptions").style.display = "none";
			}
	
		}
		
		
	function DirectionsOpen() {
		if (document.getElementById("DirectionsBlock").style.display == "" || document.getElementById("DirectionsBlock").style.display == "none") {
			document.getElementById("DirectionsBlock").style.display = "block";
			
			}
		else {
			document.getElementById("DirectionsBlock").style.display = "none";
			}
		}
		
		
	var SetSearchTextDelay = 3000	
		
	var SearchTotal = 0
	var SearchMax = 1
	var SearchTextArray = new Array(1)
		SearchTextArray[0] = ["Start your Halstead.com search by typing here"]
		SearchTextArray[1] = ["Enter a Web#, address, keyword, or agent name"]	
		
	function SearchRotation() {
		SearchText = setTimeout("SearchRotation()",SetSearchTextDelay);		
		if (SearchTotal > SearchMax) {SearchTotal = 0}		
		document.forms["quicksearch"].q.value = SearchTextArray[SearchTotal][0];		
		SearchTotal = SearchTotal + 1;
	
		}		
		
	function SearchRotationStop() {		
		document.forms["quicksearch"].q.value = "";
		clearTimeout(SearchText);
		
		}					
		
	
	function CurrencyConverter() {
			if (document.getElementById("converter").style.display == "" || document.getElementById("converter").style.display == "none") {
			document.getElementById("converter").style.display = "block";
			//document.getElementById("CurrencyStatus").style.display = "none";
			document.getElementById("CurrencyStatus").src = "img/curr_on.gif";
			}
		else {
			document.getElementById("converter").style.display = "none";
			//document.getElementById("CurrencyStatus").style.display = "block";
			document.getElementById("CurrencyStatus").src = "img/curr_off.gif";
			}
		}
	
function formatCurrency(num) {
num = num.toString().replace(/\$|\,/g,'');
if(isNaN(num))
num = "0";
sign = (num == (num = Math.abs(num)));
num = Math.floor(num*100+0.50000000001);
cents = num%100;
num = Math.floor(num/100).toString();
if(cents<10)
cents = "0" + cents;
for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
num = num.substring(0,num.length-(4*i+3))+','+
num.substring(num.length-(4*i+3));
return (((sign)?'':'-')  + num + '.' + cents);
}



