ï»¿	function MM_changeProp(objName,x,theProp,theValue) { //v6.0
	  var obj = MM_findObj(objName);
	  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
		if (theValue == true || theValue == false)
		  eval("obj."+theProp+"="+theValue);
		else eval("obj."+theProp+"='"+theValue+"'");
	  }
	}
	function MM_findObj(n, d) { //v4.01
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}
	
	function MM_showHideLayers() { //v6.0
	  var i,p,v,obj,args=MM_showHideLayers.arguments;
	  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
		if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
		obj.visibility=v; }
	}
	function MM_preloadImages() { //v3.0
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
		var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}
	
	function MM_swapImgRestore() { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}
	
	function MM_findObj(n, d) { //v4.01
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}
	
	function MM_swapImage() { //v3.0
	  var i,j=0,x, a=MM_swapImage.arguments; 
	  document.MM_sr=new Array; 
	  for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null)
	   { 
	   	document.MM_sr[j++]=x; 
	   	if(!x.oSrc) x.oSrc=x.src; 
	   	x.src=a[i+2];
	   }
	}

	function resize_img(ih, iw) {
		document.big.width = iw;
		document.big.height = ih;
	}		
	// this function has issues with the way the mouse overs are changing the h/w params. 
	// therefore, it's not currently used. 
	function show_full_img(ww, wh, photos) {
		var curimg = document.getElementById(photos).src;
		var wwidth = document.getElementById(photos).width;
		var wheight = document.getElementById(photos).height;
		window.open(curimg,"Photo","titlebar=no,toolbar=no,status=no,resizable,width="+wwidth+",height="+wheight);
	}
	
	function enlarge_images() {
		var photos = document.getElementsByName("small");
		for (var i=0;i< photos.length; i++) {
		photos[i].style.width = "290px";
		photos[i].style.height = "auto";
		}
	}
	
	function MM_jumpMenu(targ,selObj,restore){ //v3.0
	  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	  if (restore) selObj.selectedIndex=0;
	}
	
	function MM_goToURL() { //v3.0
	  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
	  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
	}
	
	/***********************************************
	* Fixed ToolTip script- ? Dynamic Drive (www.dynamicdrive.com)
	* This notice MUST stay intact for legal use
	* Visit http://www.dynamicdrive.com/ for full source code
	***********************************************/
			
	var tipwidth='150px' //default tooltip width
	var tipbgcolor='#ffffff'  //tooltip bgcolor
	var disappeardelay=100  //tooltip disappear speed onMouseout (in miliseconds)
	var vertical_offset="10px" //horizontal offset of tooltip from anchor link
	var horizontal_offset="-3px" //horizontal offset of tooltip from anchor link
	
	/////No further editting needed
	
	var ie4=document.all
	var ns6=document.getElementById&&!document.all
	
	if (ie4||ns6)
	document.write('<div id="fixedtipdiv" style="visibility:hidden;width:'+tipwidth+';background-color:'+tipbgcolor+'" ></div>')
	
	function getposOffset(what, offsettype){
	var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
	var parentEl=what.offsetParent;
	while (parentEl!=null){
	totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
	parentEl=parentEl.offsetParent;
	}
	return totaloffset;
	}
	function showhide(obj, e, visible, hidden, tipwidth){
	if (ie4||ns6)
	dropmenuobj.style.left=dropmenuobj.style.top=-500
	if (tipwidth!=""){
	dropmenuobj.widthobj=dropmenuobj.style
	dropmenuobj.widthobj.width=tipwidth
	}
	if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
	obj.visibility=visible
	else if (e.type=="click")
	obj.visibility=hidden
	}
	
	function iecompattest(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
	}
	
	function clearbrowseredge(obj, whichedge){
	var edgeoffset=(whichedge=="rightedge")? parseInt(horizontal_offset)*-1 : parseInt(vertical_offset)*-1
	if (whichedge=="rightedge"){
	var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
	dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
	if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
	edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
	}
	else{
	var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
	dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
	if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
	edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
	}
	return edgeoffset
	}
	
	function fixedtooltip(menucontents, obj, e, tipwidth){
	if (window.event) event.cancelBubble=true
	else if (e.stopPropagation) e.stopPropagation()
	clearhidetip()
	dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv
	dropmenuobj.innerHTML=menucontents
	
	if (ie4||ns6){
	showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth)
	dropmenuobj.x=getposOffset(obj, "left")
	dropmenuobj.y=getposOffset(obj, "top")
	dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
	dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
	}
	}
	
	function hidetip(e){
	if (typeof dropmenuobj!="undefined"){
	if (ie4||ns6)
	dropmenuobj.style.visibility="hidden"
	}
	}
	
	function delayhidetip(){
	if (ie4||ns6)
	delayhide=setTimeout("hidetip()",disappeardelay)
	}
	
	function clearhidetip(){
	if (typeof delayhide!="undefined")
	clearTimeout(delayhide)
	}
	function OnSubmitForm(desturl)
	{
	if(document.pressed == 'Features Search')
	  {
	   document.searchfrm.action = desturl + "?Type=feature#features";
	   document.searchfrm.submit();
	   return true;
	  }
	  else
	  if(document.pressed == 'Price & Features Search')
	  {
	    document.searchfrm.action = desturl + "Type=basic";
	    return true;
	  }
	  else
	  if(document.pressed == 'Street Address Search')
	  {
	    document.searchfrm.action = desturl + "?Type=address";
	    return true;
	  }
	  else
	  if(document.pressed == 'MLS Number Search')
	  {
	    document.searchfrm.action =desturl + "?Type=mls";
	    return true;
	  } 
	  else
	  if(document.pressed == 'Search')
	  {
	    document.searchfrm.action =desturl;
	    return true;
	  }	  
	  else
	  if(document.pressed == 'Add Saved Search')
	  {
	    document.searchfrm.action =desturl;
	    return true;
	  }
	  return true;
	}
	function ChangeTab(tab, desturl)
	{
	   if(tab == 'Features Search')
	  {
	   document.searchfrm.action = desturl + "?Type=feature#features";
	  }
	  else
	  if(tab == 'Price &amp; Features Search')
	  {
	    document.searchfrm.action = desturl + "?Type=basic";
	  }
	  else
	  if(tab == 'Price & Features Search')
	  {
	    document.searchfrm.action = desturl + "?Type=basic";
	  }
	  else
	  if(tab == 'Street Address Search')
	  {
	    document.searchfrm.action =desturl + "?Type=address";
	  }
	  else
	  if(tab == 'MLS Number Search')
	  {
	    document.searchfrm.action = desturl + "?Type=mls";
	  } 
	  document.searchfrm.submit();
	}
	
	function ShowZip() 
	{
		document.searchfrm.geotype.value = "zip";
		var zipcd = document.getElementById("zipcode");
		var ctylist = document.getElementById("citylist");
		var mapareas = document.getElementById("mapareas");
		if (zipcd) { zipcd.style.display = "inline"; }
		if (ctylist) { ctylist.style.display = "none"; }
		if (mapareas) { mapareas.style.display = "none"; }
		
	}

	function ShowMap() 
	{
		document.searchfrm.geotype.value = "map";
		var zipcd = document.getElementById("zipcode");
		var ctylist = document.getElementById("citylist");
		var mapareas = document.getElementById("mapareas");
		if (zipcd) { zipcd.style.display = "none"; }
		if (ctylist) { ctylist.style.display = "none"; }
		var mapvals = document.searchfrm.maplist.value;
		if (mapvals) {SetMapGroup(mapvals, 1); }
		if (mapareas) { mapareas.style.display = "inline"; }
	}

	
	function ShowArea() 
	{
		document.searchfrm.geotype.value = "area";
		var zipcd = document.getElementById("zipcode");
		var ctylist = document.getElementById("citylist");
		var citydt = document.getElementById("citydt");
		var areadt = document.getElementById("areadt");
		var areatxt = document.getElementById("areatxtdt");
		var isdlist = document.getElementById("isd");
		var areabtn = document.getElementById("showarea");
		var isdbtn = document.getElementById("showisd");
		var iarea = document.getElementById("infoarea");
		var isch = document.getElementById("infosch");
		var mapareas = document.getElementById("mapareas");
		if (zipcd) { zipcd.style.display = "none"; }
		if (ctylist) { ctylist.style.display = "inline"; }
		if (citydt) { citydt.style.display = "inline"; }
		if (areadt) { areadt.style.display = "inline"; }
		if (areatxt) { areatxt.style.display = "inline"; }
		if (isdlist) { isdlist.style.display = "none"; }
		if (areabtn) { areabtn.style.display = "none"; }
		if (isdbtn) { isdbtn.style.display = "block"; }
		if (iarea) { iarea.style.display = "inline"; }
		if (isch) { isch.style.display = "none"; }
		if (mapareas) { mapareas.style.display = "none"; }	

		
	}
	function ShowISD() 
	{
		document.searchfrm.geotype.value = "isd";
		var zipcd = document.getElementById("zipcode");
		var ctylist = document.getElementById("citylist");
		var citydt = document.getElementById("citydt");
		var areadt = document.getElementById("areadt");
		var areatxt = document.getElementById("areatxtdt");
		var isdlist = document.getElementById("isd");
		var areabtn = document.getElementById("showarea");
		var isdbtn = document.getElementById("showisd");
		var iarea = document.getElementById("infoarea");
		var isch = document.getElementById("infosch");
		var mapareas = document.getElementById("mapareas");
		if (zipcd) { zipcd.style.display = "none"; }
		if (ctylist) { ctylist.style.display = "inline"; }
		if (citydt) { citydt.style.display = "none"; }
		if (areadt) { areadt.style.display = "none"; }
		if (areatxt) { areatxt.style.display = "none"; }
		if (isdlist) { isdlist.style.display = "block"; }
		if (areabtn) { areabtn.style.display = "block"; }
		if (isdbtn) { isdbtn.style.display = "none"; }
		if (iarea) { iarea.style.display = "none"; }
		if (isch) { isch.style.display = "inline"; }
		if (mapareas) { mapareas.style.display = "none"; }
		var chkcounty = document.getElementsByName('COUNTY[]');
		var chkcounties = chkcounty[0];
		
		for (var i = 0; i<chkcounties.length; i++) {
			if (chkcounties.options[i].selected) {
				if(chkcounties.options[i].value == "All") {
					chkcounties.options[0].selected = false;
					chkcounties.options[2].selected = true;
					SetISD();
					break;
				}
			}
		}
	}
	
	function PropSwitch(ptype) {
		document.searchfrm.proptype.value = ptype;
		hidecontrols();
	}

	function ShowOptions(state) 
	{
		var moreopt = document.getElementById("srch_moreopt");
		var morebttn = document.getElementById("morebtn");
		var moreotxt = document.getElementById("moreopttxt");
		if(state == 1) {
			if (moreopt) { moreopt.style.display = "block"; }
			if (morebttn) { morebttn.style.display = "none"; }
			if (moreotxt) { moreotxt.style.display = "none"; }
			document.searchfrm.moreopts.value = 1;
		} else  {
			if (moreopt) { moreopt.style.display = "none"; }
			if (morebttn) { morebttn.style.display = "inline"; }
			if (moreotxt) { moreotxt.style.display = "inline"; }
			document.searchfrm.moreopts.value = 0;
		} 
	}
	
	function FeatChg(featnum) {
		var featlist = document.getElementsByName("features[]");
		if(!featnum.checked) {
			for (var f=0; f<featlist.length; f++) {
				if(featlist[f].value == featnum.value) {
				featlist[f].checked = false;
				}
			}
		} else {
			for (var f=0; f<featlist.length; f++) {
				if(featlist[f].value == featnum.value) {
				featlist[f].checked = true;
				}
			}
		}
	}
	
	function ShowFeatures(state) 
	{
		var full = document.getElementById("srch_features");
		var pop = document.getElementById("srch_popfeatures");
		if(state == 1) {
			if (full) { full.style.display = "inline";}
			if (pop) { pop.style.display = "none";}
			document.searchfrm.fullfeatures.value = 1;
		} else  {
			if (full) { full.style.display = "none";}
			if (pop) { pop.style.display = "inline";}
			document.searchfrm.fullfeatures.value = 0;
		} 
	}
	
	function SetFormOpts()
	{
		if(document.searchfrm.geotype.value == "area") {
			ShowArea();
		}
		if(document.searchfrm.geotype.value == "zip") {
			ShowZip();
		}
		if(document.searchfrm.geotype.value == "map") {
			var mapvals = document.searchfrm.maplist.value;
			ShowMap();
			if (mapvals) {SetMapGroup(mapvals, 1); }
		}
		if(document.searchfrm.geotype.value == "isd") {
			ShowISD();
			SetISD();
		}
		
		if(document.searchfrm.moreopts.value == 1) {
			ShowOptions(1);
		} else {
			ShowOptions(0);
		}
		if(document.searchfrm.fullfeatures.value == 1) {
			ShowFeatures(1);
		} else {
			ShowFeatures(0);
		}
		hidecontrols();
	}
	
	function ShowAcre(shownum) {
		var acre = document.searchfrm.minacre;
		var acrefr = document.searchfrm.minacrefr;
		if(shownum==1) {
			acre.options.length = 4;
			acre.style.display="inline";
			acrefr.style.display="none";
		} else {
			acre.style.display="none";
			acrefr.style.display="inline";
		}
		
	}
	
	function ShowREtip(dname,state) {
		var showname = document.getElementById(dname);
		if(state == 1) {
			if (showname) { showname.style.display = "block"; }
		} else {
			if (showname) { showname.style.display = "none"; }
		}
	}
	
	function ClearAllCk(ckbox) {
		ckbox_count = document.getElementsByName(ckbox).length;
		for (var i = 0; i < ckbox_count; i++) {
			document.searchfrm.elements[ckbox][i].checked=false;
		}
		
	}
	
	function hidecontrols(form) 
	{
		var formtype = document.searchfrm.proptype.value;
		var bb = document.getElementById("bbdiv");
		var sqft = document.getElementById("sqftdiv");
		var acre = document.getElementById("acrediv");
		var units = document.getElementById("unitsdiv");
		var gar = document.getElementById("gardiv");
		var lotsz = document.getElementById("lotsize");
		var lottx = document.getElementById("ltsztxt");
		var inclnd = document.getElementById("incland");
		var div500 = document.getElementById("div500");
		var div510 = document.getElementById("div510");
		var div520 = document.getElementById("div520");
		var div525 = document.getElementById("div525");
		var div530 = document.getElementById("div530");
		var div535 = document.getElementById("div535");
		var div550 = document.getElementById("div550");
		var div555 = document.getElementById("div555");
		var div560 = document.getElementById("div560");
		var div570 = document.getElementById("div570");
		var div600 = document.getElementById("div600");
		var div610 = document.getElementById("div610");
		var div620 = document.getElementById("div620");
		var div630 = document.getElementById("div630");
		var div640 = document.getElementById("div640");
		var div650 = document.getElementById("div650");
		var div660 = document.getElementById("div660");
		var div670 = document.getElementById("div670");
		var div680 = document.getElementById("div680");
		var div690 = document.getElementById("div690");
		var full = document.getElementById("srch_features");
		var popdiv = document.getElementById("srch_popfeatures");
		var pop = document.getElementById("popfeat");
		var poptxt = document.getElementById("poptext");
		var popclr = document.getElementById("popclear");
		var morebttn = document.getElementById("morebtn");
		var moreotxt = document.getElementById("moreopttxt");
		var propsp = document.getElementById("propswp");
		var propsl = document.getElementById("propswl");
		var onestoryck = document.getElementById("onestorychk");
		


		if (formtype == "L") 
		{
		if (bb) { bb.style.display = "none"; }
		if (sqft) {sqft.style.display = "none"; }
		if (units) { units.style.display = "none"; }
		if (acre) { acre.style.display = "block"; }	
		if (lotsz) { lotsz.style.display = "none"; }	
		if (div500) { div500.style.display = "none"; }		
		if (div510) { div510.style.display = "none"; }
		if (div520) { div520.style.display = "none"; }		
		if (div525) { div525.style.display = "none"; }
		if (div530) { div530.style.display = "none"; }		
		if (div535) { div535.style.display = "none"; }
		if (div550) { div550.style.display = "none"; }		
		if (div555) { div555.style.display = "none"; }		
		if (div560) { div560.style.display = "none"; }		
		if (div570) { div570.style.display = "none"; }		
		if (div600) { div600.style.display = "block"; }
		if (div610) { div610.style.display = "block"; }		
		if (div620) { div620.style.display = "block"; }
		if (div630) { div630.style.display = "block"; }		
		if (div640) { div640.style.display = "none"; }
		if (div650) { div650.style.display = "none"; }		
		if (div660) { div660.style.display = "block"; }
		if (div670) { div670.style.display = "block"; }
		if (div680) { div680.style.display = "block"; }
		if (div690) { div690.style.display = "block"; }
		if (pop) { pop.style.display = "none"; }
		if (poptxt) { poptxt.style.display = "none"; }
		if (popclr) { popclr.style.display = "none"; }
		ShowOptions(0);
		if (morebttn) {morebttn.style.display = "none"; }
		if (moreotxt) {moreotxt.style.display = "none"; }
		if (propsp) {propsp.style.display = "inline"; }
		if (propsl) {propsl.style.display = "none"; }
		if (inclnd) {inclnd.style.display = "none"; }
		ShowAcre(1);
		}

		if (formtype == "P") 
		{
		if (bb) { bb.style.display = "none"; }
		if (sqft) {sqft.style.display = "none"; }
		if (units) { units.style.display = "none"; }
		if (acre) { acre.style.display = "block"; }	
		if (lotsz) { lotsz.style.display = "none"; }	
		if (div500) { div500.style.display = "none"; }		
		if (div510) { div510.style.display = "none"; }
		if (div520) { div520.style.display = "none"; }		
		if (div525) { div525.style.display = "none"; }
		if (div530) { div530.style.display = "none"; }		
		if (div535) { div535.style.display = "none"; }
		if (div550) { div550.style.display = "none"; }		
		if (div555) { div555.style.display = "none"; }		
		if (div560) { div560.style.display = "none"; }		
		if (div570) { div570.style.display = "none"; }		
		if (div600) { div600.style.display = "none"; }
		if (div610) { div610.style.display = "none"; }		
		if (div620) { div620.style.display = "none"; }
		if (div630) { div630.style.display = "none"; }		
		if (div640) { div640.style.display = "none"; }
		if (div650) { div650.style.display = "none"; }		
		if (div660) { div660.style.display = "none"; }
		if (div670) { div670.style.display = "none"; }
		if (div680) { div680.style.display = "none"; }
		if (div690) { div690.style.display = "none"; }
		if (poptxt) { poptxt.style.display = "none"; }
		if (popclr) { popclr.style.display = "none"; }
		ShowOptions(0);
		if (morebttn) {morebttn.style.display = "none"; }
		if (moreotxt) {moreotxt.style.display = "none"; }
		if (full) {full.style.display = "none"; }
		if (popdiv) { popdiv.style.display = "none"; }
		if (propsp) {propsp.style.display = "none"; }
		if (propsl) {propsl.style.display = "inline"; }
		if (inclnd) {inclnd.style.display = "none"; }
		ShowAcre(1);
		}
		
		if(formtype == "F")
		{
		if (bb) { bb.style.display = "block"; }
		if (sqft) {sqft.style.display = "none"; }
		if (units) { units.style.display = "none"; }
		if (acre) { acre.style.display = "block"; }
		if (gar) { gar.style.display = "none";}	
		if (lotsz) { lotsz.style.display = "none"; }	
		if (div500) { div500.style.display = "none"; }		
		if (div510) { div510.style.display = "none"; }
		if (div520) { div520.style.display = "none"; }		
		if (div525) { div525.style.display = "none"; }
		if (div530) { div530.style.display = "none"; }		
		if (div535) { div535.style.display = "none"; }
		if (div550) { div550.style.display = "none"; }		
		if (div555) { div555.style.display = "none"; }		
		if (div560) { div560.style.display = "none"; }		
		if (div570) { div570.style.display = "none"; }		
		if (div600) { div600.style.display = "block"; }
		if (div610) { div610.style.display = "block"; }		
		if (div620) { div620.style.display = "block"; }
		if (div630) { div630.style.display = "block"; }		
		if (div640) { div640.style.display = "block"; }
		if (div650) { div650.style.display = "block"; }		
		if (div660) { div660.style.display = "block"; }
		if (div670) { div670.style.display = "none"; }
		if (div680) { div680.style.display = "none"; }
		if (div690) { div690.style.display = "none"; }
		if (pop) { pop.style.display = "none"; }
		if (poptxt) { poptxt.style.display = "none"; }
		if (popclr) { popclr.style.display = "none"; }
		ShowOptions(0);
		if (morebttn) {morebttn.style.display = "none"; }
		if (moreotxt) {moreotxt.style.display = "none"; }
		if (propsp) {propsp.style.display = "none"; }
		if (propsl) {propsl.style.display = "none"; }
		if (inclnd) {inclnd.style.display = "block"; }
		if(document.searchfrm.fullfeatures.value == 1) {
			ShowFeatures(1);
		} else {
			ShowFeatures(0);
		}
		ShowAcre(0);
		}

		if(formtype == "R")
		{
		if (bb) { bb.style.display = "block"; }
		if (sqft) {sqft.style.display = "block"; }
		if (units) { units.style.display = "none"; }
		if (acre) { acre.style.display = "none"; }
		if (gar) { gar.style.display = "inline";}		
		if (lotsz) { lotsz.style.display = "block"; }	
		if (lottx) { lottx.style.display = "inline"; }
		if (inclnd) { inclnd.style.display = "none"; }	
		if (div500) { div500.style.display = "block"; }		
		if (div510) { div510.style.display = "block"; }
		if (div520) { div520.style.display = "block"; }		
		if (div525) { div525.style.display = "block"; }
		if (div530) { div530.style.display = "block"; }		
		if (div535) { div535.style.display = "block"; }
		if (div550) { div550.style.display = "block"; }		
		if (div555) { div555.style.display = "block"; }		
		if (div560) { div560.style.display = "none"; }		
		if (div570) { div570.style.display = "none"; }		
		if (div600) { div600.style.display = "none"; }
		if (div610) { div610.style.display = "none"; }		
		if (div620) { div620.style.display = "none"; }
		if (div630) { div630.style.display = "none"; }		
		if (div640) { div640.style.display = "none"; }
		if (div650) { div650.style.display = "none"; }		
		if (div660) { div660.style.display = "none"; }
		if (div670) { div670.style.display = "none"; }
		if (div680) { div680.style.display = "none"; }
		if (div690) { div690.style.display = "none"; }
		if (pop) { pop.style.display = "block"; }
		if (poptxt) { poptxt.style.display = "inline"; }
		if (popclr) { popclr.style.display = "inline"; }
		if (onestoryck) { onestoryck.style.display = "inline"; }
		if(document.searchfrm.fullfeatures.value == 1) {
			ShowFeatures(1);
		} else {
			ShowFeatures(0);
		}
		if(document.searchfrm.moreopts.value == 1) {
			ShowOptions(1);
		} else {
			ShowOptions(0);
		}
		}

		if(formtype == "RS")
		{
		if (bb) { bb.style.display = "block"; }
		if (sqft) {sqft.style.display = "block"; }
		if (units) { units.style.display = "none"; }
		if (acre) { acre.style.display = "none"; }
		if (gar) { gar.style.display = "block";}		
		if (lotsz) { lotsz.style.display = "block"; }	
		if (lottx) { lottx.style.display = "inline"; }
		if (inclnd) { inclnd.style.display = "none"; }	
		if (div500) { div500.style.display = "block"; }		
		if (div510) { div510.style.display = "block"; }
		if (div520) { div520.style.display = "block"; }		
		if (div525) { div525.style.display = "block"; }
		if (div530) { div530.style.display = "block"; }		
		if (div535) { div535.style.display = "block"; }
		if (div550) { div550.style.display = "block"; }		
		if (div555) { div555.style.display = "block"; }		
		if (div560) { div560.style.display = "none"; }		
		if (div570) { div570.style.display = "none"; }		
		if (div600) { div600.style.display = "none"; }
		if (div610) { div610.style.display = "none"; }		
		if (div620) { div620.style.display = "none"; }
		if (div630) { div630.style.display = "none"; }		
		if (div640) { div640.style.display = "none"; }
		if (div650) { div650.style.display = "none"; }		
		if (div660) { div660.style.display = "none"; }
		if (div670) { div670.style.display = "none"; }
		if (div680) { div680.style.display = "none"; }
		if (div690) { div690.style.display = "none"; }
		if (pop) { pop.style.display = "block"; }
		if (poptxt) { poptxt.style.display = "inline"; }
		if (popclr) { popclr.style.display = "inline"; }
		if (onestoryck) { onestoryck.style.display = "inline"; }
		if(document.searchfrm.fullfeatures.value == 1) {
			ShowFeatures(1);
		} else {
			ShowFeatures(0);
		}
		if(document.searchfrm.moreopts.value == 1) {
			ShowOptions(1);
		} else {
			ShowOptions(0);
		}
		}
		if(formtype == "RC")
		{
		if (bb) { bb.style.display = "block"; }
		if (sqft) {sqft.style.display = "block"; }
		if (units) { units.style.display = "none"; }
		if (acre) { acre.style.display = "none"; }
		if (gar) { gar.style.display = "block";}		
		if (lotsz) { lotsz.style.display = "none"; }
		if (lottx) { lottx.style.display = "none"; }
		if (inclnd) { inclnd.style.display = "none"; }	
		if (div500) { div500.style.display = "block"; }		
		if (div510) { div510.style.display = "block"; }
		if (div520) { div520.style.display = "block"; }		
		if (div525) { div525.style.display = "block"; }
		if (div530) { div530.style.display = "block"; }		
		if (div535) { div535.style.display = "block"; }
		if (div550) { div550.style.display = "block"; }		
		if (div555) { div555.style.display = "block"; }		
		if (div560) { div560.style.display = "none"; }		
		if (div570) { div570.style.display = "none"; }		
		if (div600) { div600.style.display = "none"; }
		if (div610) { div610.style.display = "none"; }		
		if (div620) { div620.style.display = "none"; }
		if (div630) { div630.style.display = "none"; }		
		if (div640) { div640.style.display = "none"; }
		if (div650) { div650.style.display = "none"; }		
		if (div660) { div660.style.display = "none"; }
		if (div670) { div670.style.display = "none"; }
		if (div680) { div680.style.display = "none"; }
		if (div690) { div690.style.display = "none"; }
		if (pop) { pop.style.display = "block"; }
		if (poptxt) { poptxt.style.display = "inline"; }
		if (popclr) { popclr.style.display = "inline"; }
		if (onestoryck) { onestoryck.style.display = "none"; }

		if(document.searchfrm.fullfeatures.value == 1) {
			ShowFeatures(1);
		} else {
			ShowFeatures(0);
		}
		if(document.searchfrm.moreopts.value == 1) {
			ShowOptions(1);
		} else {
			ShowOptions(0);
		}
		}

		if(formtype == "C")
		{
		if (bb) { bb.style.display = "none"; }
		if (sqft) {sqft.style.display = "none"; }
		if (units) { units.style.display = "none"; }
		if (acre) { acre.style.display = "none"; }	
		if (lotsz) { lotsz.style.display = "none"; }	
		if (inclnd) { inclnd.style.display = "none"; }	
		if (div500) { div500.style.display = "none"; }		
		if (div510) { div510.style.display = "none"; }
		if (div520) { div520.style.display = "none"; }		
		if (div525) { div525.style.display = "none"; }
		if (div530) { div530.style.display = "none"; }		
		if (div535) { div535.style.display = "none"; }
		if (div550) { div550.style.display = "none"; }		
		if (div555) { div555.style.display = "none"; }		
		if (div560) { div560.style.display = "block"; }		
		if (div570) { div570.style.display = "block"; }		
		if (div600) { div600.style.display = "none"; }
		if (div610) { div610.style.display = "none"; }		
		if (div620) { div620.style.display = "none"; }
		if (div630) { div630.style.display = "none"; }		
		if (div640) { div640.style.display = "none"; }
		if (div650) { div650.style.display = "none"; }		
		if (div660) { div660.style.display = "none"; }
		if (div670) { div670.style.display = "none"; }
		if (div680) { div680.style.display = "none"; }
		if (div690) { div690.style.display = "none"; }
		if (pop) { pop.style.display = "none"; }
		if (poptxt) { poptxt.style.display = "none"; }
		if (popclr) { popclr.style.display = "none"; }
		if (full) { full.style.display = "none"; }
		ShowOptions(0);
		if (morebttn) {morebttn.style.display = "none"; }
		}
	}
function ShowMapDesc(areanum, state) {
	var num=document.getElementById(areanum);
	if(num) { 
		if(state == 1) {
			num.style.display = "block";
		} else {
			num.style.display = "none";
		}
	}
}

function SetMapAreaList(areanum) {
//	alert(document.searchfrm.mapareas.value);
	var frmval = document.searchfrm.maplist.value;
	var areapc = document.getElementById(areanum);
	if (frmval.length > 0) {
		var curset = frmval.split(",");
	} else {
		var curset = "";
	}
	var newset = new Array();
	var action = 1;
	var newidx = 0;
	for (var i=0; i<curset.length; i++) {
//		alert(curset[i]);
//		alert(areanum);
		if (areanum == curset[i]) {
			action = 0;
			if(areapc) { areapc.style.zIndex = "2"; }
		} else {
			newset[newidx] = curset[i];
			newidx++;
		}
	}
	if (action == 1)	{
		newset[newidx] = areanum;
		if(areapc) { areapc.style.zIndex = "50"; }
	}
	document.searchfrm.maplist.value = newset.join(",");
}

function SetMapGroup(mapvals, state, grp) {
// possible states 1= on, 0= off, 2=toggle current state
// so first check to see if we're toggling and reset the action state
// otherwise, let the action state flow from the parameters
	if (state == 2) {
	var group = document.getElementById(grp); 
		if (group) {
			if (group.value == 0) { 
				state = 1;
				group.value = 1;
			} else { 
				state = 0;
				group.value = 0;
			} 
		}
		
	}
	var mlist = mapvals.split(",");
	for (var i=0; i<mlist.length; i++) {
//		alert(curset[i]);
//		alert(areanum);
		var areapc = document.getElementById(mlist[i]);
		if (state == 0) {
			action = 0;
			if(areapc) { areapc.style.zIndex = "2"; }
			BuildNewList(mlist[i], 0);
		} else {
			if(areapc) { areapc.style.zIndex = "50"; }
			BuildNewList(mlist[i], 1);
		}

	}
}

function BuildNewList(areaval, action) {

	var frmval = document.searchfrm.maplist.value;
	if (frmval.length > 0) {
		var curset = frmval.split(",");
	} else {
		var curset = new Array();
	}
// first check to see if we're adding or subtracting from the list
	if (action == 1) {
		// if we're adding to the list, check to see if we already have the area in the list
		var pres = 0;
		for(var x=0;x<curset.length;x++) {
			if (areaval == curset[x]) {
				var pres=1;
			} 
		}
		if (pres == 0) {
			curset.push(areaval);
		}
		document.searchfrm.maplist.value = curset.join(",");
//		alert (curset.join(","));
	} else {
		var newset = new Array();
		var newidx = 0;
		for (var i=0; i<curset.length; i++) {
	//		alert(curset[i]);
	//		alert(areanum);
			if (areaval != curset[i]) {
				newset[newidx] = curset[i];
				newidx++;
			}
		}
	document.searchfrm.maplist.value = newset.join(",");	
//	alert (newset.join(","));
	}
}

function ClearMapGroup(mapvals) {

	var mlist = mapvals.split(",");
	
	for (var i=0; i<mlist.length; i++) {
//		alert(curset[i]);
//		alert(areanum);
		var areapc = document.getElementById(mlist[i]);
		document.searchfrm.maplist.value = "";
		if(areapc) { areapc.style.zIndex = "2"; }
	}
		document.searchfrm.g1.value = 0;
		document.searchfrm.g2.value = 0;
		document.searchfrm.g3.value = 0;
		document.searchfrm.g4.value = 0;
		document.searchfrm.g5.value = 0;
}
	
//DHTML Window script- Copyright Dynamic Drive (http://www.dynamicdrive.com)
//For full source code, documentation, and terms of usage,
//Visit http://www.dynamicdrive.com/dynamicindex9/dhtmlwindow.htm

var dragapproved=false
var minrestore=0
var initialwidth,initialheight
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all

function iecompattest(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function drag_drop(e){
if (ie5&&dragapproved&&event.button==1){
document.getElementById("dwindow").style.left=tempx+event.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+event.clientY-offsety+"px"
}
else if (ns6&&dragapproved){
document.getElementById("dwindow").style.left=tempx+e.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+e.clientY-offsety+"px"
}
}

function initializedrag(e){
offsetx=ie5? event.clientX : e.clientX
offsety=ie5? event.clientY : e.clientY
document.getElementById("dwindowcontent").style.display="none" //extra
tempx=parseInt(document.getElementById("dwindow").style.left)
tempy=parseInt(document.getElementById("dwindow").style.top)

dragapproved=true
document.getElementById("dwindow").onmousemove=drag_drop
}

function loadwindow(url,width,height){
if (!ie5&&!ns6)
window.open(url,"","width=width,height=height,scrollbars=0")
else{
document.getElementById("dwindow").style.display=''
document.getElementById("dwindow").style.width=initialwidth=width+"px"
document.getElementById("dwindow").style.height=initialheight=height+"px"
document.getElementById("dwindow").style.left="5px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset*1+75+"px" : iecompattest().scrollTop*1+75+"px"
document.getElementById("cframe").src=url
}
}

function maximize(){
if (minrestore==0){
minrestore=1 //maximize window
document.getElementById("maxname").setAttribute("src","restore.gif")
document.getElementById("dwindow").style.width=ns6? window.innerWidth-20+"px" : iecompattest().clientWidth+"px"
document.getElementById("dwindow").style.height=ns6? window.innerHeight-20+"px" : iecompattest().clientHeight+"px"
}
else{
minrestore=0 //restore window
document.getElementById("maxname").setAttribute("src","max.gif")
document.getElementById("dwindow").style.width=initialwidth
document.getElementById("dwindow").style.height=initialheight
}
document.getElementById("dwindow").style.left=ns6? window.pageXOffset+"px" : iecompattest().scrollLeft+"px"
document.getElementById("dwindow").style.top=ns6? window.pageYOffset+"px" : iecompattest().scrollTop+"px"
}

function closeit(){
document.getElementById("dwindow").style.display="none"
}

function stopdrag(){
dragapproved=false;
document.getElementById("dwindow").onmousemove=null;
document.getElementById("dwindowcontent").style.display="" //extra
}

function printPage() {
  if (window.print)
    window.print()
  else
    alert("Sorry, your browser doesn't support this feature.");
}

/***********************************************
* Textarea Maxlength script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}

