//"; winhtml+="
"+markerinfo[id]['name']+", "+markerinfo[id]['city']+"
"; winhtml+="
List Price:
$"+markerinfo[id]['price']+"

"; winhtml+=""; winhtml+=""; winhtml+=""; winhtml+=""; winhtml+=""; winhtml+="
Bedrooms:"+markerinfo[id]['beds']+"
Bathrooms:"+markerinfo[id]['baths']+"
Sq. Ft.:"+markerinfo[id]['sqft']+"
Acreage:"+markerinfo[id]['acre']+"
"; document.getElementById("menu_bar_infowin").innerHTML = winhtml; document.getElementById("menu_bar_infowin").style.display = 'inline'; } function hideInfoWin() { document.getElementById("menu_bar_infowin").style.display = 'none'; } function showSrchWin() { document.getElementById("busyoverlay").style.visibility = 'visible'; document.getElementById("map_overlay").style.visibility = 'visible'; } function hideSrchWin() { document.getElementById("map_overlay").style.visibility = 'hidden'; } function showDetailWin(id) { window.open('/search/detail/'+markerinfo[id]['upd']); } function switchOptions(n) { switch(n) { case 'homes': document.getElementById("mhomes").style.display = 'none'; document.getElementById("lands").style.display = 'none'; document.getElementById("homes").style.display = 'block'; break; case 'mhomes': document.getElementById("homes").style.display = 'none'; document.getElementById("lands").style.display = 'none'; document.getElementById("mhomes").style.display = 'block'; break; case 'lands': document.getElementById("homes").style.display = 'none'; document.getElementById("mhomes").style.display = 'none'; document.getElementById("lands").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) { lr.style.backgroundColor='#ffff99'; document.getElementById('timage').src='/images/mapsearch/spinner_on_black.gif'; intY = lr.offsetTop; intX = lr.offsetLeft; intY=intY+60;intX=intX+30; thmb=document.getElementById('thumbnail'); thmb.style.left=intX+"px"; thmb.style.top=intY+"px"; thmb.style.visibility = 'visible'; document.getElementById('timage').src=markerinfo[id]['img']; var bounds = map.getBounds(); var mleft = bounds.getSouthWest().lng(); var mright = bounds.getNorthEast().lng(); var mbot = bounds.getSouthWest().lat(); var mtop = bounds.getNorthEast().lat(); polyline = new GPolyline([ new GLatLng(markerinfo[id]['lat'], mleft), new GLatLng(markerinfo[id]['lat'], mright) ], "#245580", 4); polyline2 = new GPolyline([ new GLatLng(mtop, markerinfo[id]['lng']), new GLatLng(mbot, markerinfo[id]['lng']) ], "#245580", 4); map.addOverlay(polyline); map.addOverlay(polyline2); } function listrowOut(lr) { lr.style.backgroundColor='#ffffff'; document.getElementById('thumbnail').style.visibility = 'hidden'; map.removeOverlay(polyline); map.removeOverlay(polyline2); } function createListHTML() { var lhtml = ''; var openlink=''; if (markerinfo.length==100) { lhtml += "
"+openlink+"Showing the first 100 listings only!
Zoom in, or Refine Your Search
"; } else { lhtml += "
"+openlink+"Your search found "+markerinfo.length+" listings.
Refine Your Search
"; } lhtml += "
"; lhtml += ""; for (var xx = 0; xx < markerinfo.length; xx++) { oldclick=xx; lhtml += ""; lhtml += " "; lhtml += " "; lhtml += " "; lhtml += " "; lhtml += " "; lhtml += " "; lhtml += " "; lhtml += ""; } lhtml += "
Address:List Price:Beds:Baths:Sq. Ft:Acreage:MLS #:
" + markerinfo[xx]['name'] +"$" + markerinfo[xx]['price'] +"" + markerinfo[xx]['beds'] +"" + markerinfo[xx]['baths'] +"" + markerinfo[xx]['sqft'] +"" + markerinfo[xx]['acre'] +"" + markerinfo[xx]['upd'] +"
"; document.getElementById("menu_bar").innerHTML = lhtml; } function createMarker(point,updid,name,type,desc,link,logo) { var marker = new GMarker(point,icon); GEvent.addListener(marker, "click", function() { }); // save the info we need to use later for the side_bar gmarkers[iold] = marker; // add a line to the side_bar html if (type==1){house_html += '';} if (type==2){condo_html += '';} iold++; return marker; } function sortDist(a, b) { return a[0] - b[0]; } // This function picks up the click and opens the corresponding info window function myclick(i) { GEvent.trigger(gmarkers[i], "click"); } function reseticon() { if (oldclick!=null) { var oimg=gmarkers[oldclick].getIcon().image; gmarkers[oldclick].setImage(oimg); } } function formsubmit(ptype) { lookurl = $(ptype).serialize(); lookurl += '&property_type[]='+ptype; lookurl += '&minimum_price='+$('mapsearchform').minimum_price.value; lookurl += '&maximum_price='+$('mapsearchform').maximum_price.value; hideSrchWin(); updateMap(); } function openTable() { var delay=50; var delm = document.getElementById("menu_bar"); var width = parseInt(delm.style.width); if (width==898 && !opening) { toWidth=230; } else if (!opening) { toWidth=898; } var change = toWidth-width; var total=width+Math.ceil((change/2)); if (change==-1) { total=width-1; } delm.style.width=total+'px'; function c() { openTable(); } if(change==0) { clearTimeout(timer);opening=false; return; } timer=setTimeout(c,delay); opening=true; } function toggleGroup(type) { if (type=='house') { var otype='condo'; } else { var otype='house'; } map.closeInfoWindow(); for (var i = 0; i < markerGroups[otype].length; i++) { var marker = markerGroups[otype][i]; if (!marker.isHidden()) { marker.hide(); } } for (var i = 0; i < markerGroups[type].length; i++) { var marker = markerGroups[type][i]; if (marker.isHidden()) { marker.show(); } } document.getElementById("show"+otype).style.display = "inline"; document.getElementById("show"+type).style.display = "none"; document.getElementById("map_current_title").innerHTML = eval(type+"_title"); document.getElementById("menu_bar").innerHTML = eval(type+"_html"); } function MyCustomControl() { // } //Default constructor for GControl MyCustomControl.prototype = new GControl(false,false); // Default location for the control MyCustomControl.prototype.getDefaultPosition = function() { return new GControlPosition(G_ANCHOR_TOP_LEFT,new GSize(5,5)); }; MyCustomControl.prototype.initialize = function(gmapref) { var container=gmapref.getContainer(); var c = document.createElement("div"); c.innerHTML=""; c.innerHTML+="
"; c.innerHTML+="
"; c.innerHTML+="
"; c.innerHTML+="
"; c.innerHTML+="
"; c.innerHTML+="
"; c.innerHTML+="
"; container.appendChild(c); GEvent.addDomListener($('zout'), "click", function() {map.zoomOut();}); GEvent.addDomListener($('zin'), "click", function() {map.zoomIn();}); GEvent.addDomListener($('panl'), "click", function() {map.panDirection('1', '0');}); GEvent.addDomListener($('panr'), "click", function() {map.panDirection(-1, 0);}); GEvent.addDomListener($('panu'), "click", function() {map.panDirection(0, 1);}); GEvent.addDomListener($('pand'), "click", function() {map.panDirection(0, -1);}); GEvent.addDomListener($('srch'), "click", function() {showSrchWin();}); return c; } //]]>