//= 5.5) && (document.body.filters)) { var img = document.images['mcontrol'] var imgID = (img.id) ? "id='" + img.id + "' " : "" var imgClass = (img.className) ? "class='" + img.className + "' " : "" var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' " var imgStyle = "display:inline-block;" + img.style.cssText if (img.align == "left") imgStyle = "float:left;" + imgStyle if (img.align == "right") imgStyle = "float:right;" + imgStyle if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle var strNewHTML = "" img.outerHTML = strNewHTML } } initsrch=true; updateMap(); } } function updateMap(){ if (loading){return;} loading=true; //if (moved){GEvent.removeListener(moved);} map.clearOverlays(); batch = []; markerinfo= []; //mgr = new GMarkerManager(map); map.disableDragging(); if (!initsrch){lookurl = $('mapsearchform').serialize();}else{lookurl="newmapsearch=1";} loading=true; $("busyoverlay").style.visibility = 'visible'; $("searching").style.visibility = 'visible'; GDownloadUrl("/mapsearch/searchresults?"+lookurl, function(data, responseCode) { var xml = GXml.parse(data); markers = xml.documentElement.getElementsByTagName("marker"); bounds = new GLatLngBounds(); for (var i = 0; i < markers.length; i++) { if (!isNaN(parseFloat(markers[i].getAttribute("lat"))) && !isNaN(parseFloat(markers[i].getAttribute("lng")))){ var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); var markerinfoin = []; markerinfoin['lat'] = markers[i].getAttribute("lat"); markerinfoin['lng'] = markers[i].getAttribute("lng"); markerinfoin['upd'] = markers[i].getAttribute("upd"); markerinfoin['name'] = markers[i].getAttribute("name"); markerinfoin['city'] = markers[i].getAttribute("city"); markerinfoin['price'] = markers[i].getAttribute("price"); markerinfoin['img'] = markers[i].getAttribute("img"); markerinfoin['beds'] = markers[i].getAttribute("beds"); markerinfoin['baths'] = markers[i].getAttribute("baths"); markerinfoin['sqft'] = markers[i].getAttribute("sqft"); markerinfoin['acre'] = markers[i].getAttribute("acre"); markerinfoin['bhlisting'] = markers[i].getAttribute("bhlisting"); markerinfoin['type'] = markers[i].getAttribute("type"); markerinfoin['ihtml'] = markers[i].childNodes[0].childNodes[0].nodeValue; markerinfo.push(markerinfoin); bounds.extend(point); var marker = creatMarker(point,batch.length); map.addOverlay(marker); batch.push(marker); } } loading=false; if (map.getBoundsZoomLevel(bounds) > 0 && markerinfo.length > 0){ map.setCenter(bounds.getCenter()); map.setZoom(map.getBoundsZoomLevel(bounds)); createListHTML(); }else if (markerinfo.length==0){alert('No properties were found matching your search.\nPlease change your criteria and try again.');} map.enableDragging(); $("searching").style.visibility = 'hidden'; $("busyoverlay").style.visibility = 'hidden'; });//end gdownload markers } function showInfoWin(id){ $("menu_bar_infowin").innerHTML = markerinfo[id]['ihtml']; $("menu_bar_infowin").style.display = 'inline'; } function hideInfoWin(){$("menu_bar_infowin").style.display = 'none';} function showSrchWin(){ map.closeInfoWindow(); $("srchbar").style.display = 'block'; $("resbar").style.display = 'none'; $("tab_mapsearch").setAttribute("class", "active"); $("tab_mapsearch").setAttribute("className", "active"); $("tab_mapresults").setAttribute("class", "inactive"); $("tab_mapresults").setAttribute("className", "inactive"); } function showResWin(){ $("srchbar").style.display = 'none'; $("resbar").style.display = 'inline'; $("tab_mapsearch").setAttribute("class", "inactive"); $("tab_mapsearch").setAttribute("className", "inactive"); $("tab_mapresults").setAttribute("class", "active"); $("tab_mapresults").setAttribute("className", "active"); } function hideSrchWin(){$("srchbar").style.display = 'none';} function showDetailWin(id){document.location.href='/search/detail/'+markerinfo[id]['upd']; } function switchOptions(n){ switch(n) { case 'residential': $("mhomes").style.display = 'none'; $("acre").style.display = 'block'; $("homes").style.display = 'block'; break; case 'multi_family': $("homes").style.display = 'none'; $("acre").style.display = 'none'; $("mhomes").style.display = 'block'; break; case 'land': $("homes").style.display = 'none'; $("mhomes").style.display = 'none'; $("acre").style.display = 'block'; } } function creatMarker(point,id) { if (markerinfo[id]['bhlisting']=='true'){var marker = new GMarker(point,bhicon);}else{var marker = new GMarker(point,gicon);} GEvent.addListener(marker, "mouseover", function() {showInfoWin(id);}); GEvent.addListener(marker, "mouseout", function() {hideInfoWin();}); GEvent.addListener(marker, "click", function() {showDetailWin(id);}); return marker; } function listrowOn(lr,id){ //map.removeOverlay(polyline);map.removeOverlay(polyline2); lr.style.backgroundColor='#ffff99'; var winhtml="
| Address: | List Price: | Beds: | Baths: | Sq. Ft: | Acreage: | MLS #: |
| " + markerinfo[xx]['name'] +" | "; lhtml += "$" + markerinfo[xx]['price'] +" | "; lhtml += "" + markerinfo[xx]['beds'] +" | "; lhtml += "" + markerinfo[xx]['baths'] +" | "; lhtml += "" + markerinfo[xx]['sqft'] +" | "; lhtml += "" + markerinfo[xx]['acre'] +" | "; lhtml += "" + markerinfo[xx]['upd'] +" | "; lhtml += "
