
String.prototype.startsWith=function(c){return c==this.charAt(0);};String.prototype.cleanCurrency=function(){return this==null?0.0:this.replace(/[,\$]/g,'');};String.prototype.cleanPercent=function(){return this==null?0.0:this.replace(/[%]/g,'');};String.prototype.toCurrency=function(){return this.startsWith('$')?this:'$'+this;};function rotateImage(offset,photos,heights,widths,imageNode,numberNode){var position=parseInt(numberNode.innerHTML)+offset;while(position<1)position+=photos.length;while(position>photos.length)position-=photos.length;if(document.images){imageNode.src=photos[position-1];imageNode.height=heights[position-1];imageNode.width=widths[position-1];}
numberNode.innerHTML=''+position;}
function mapSale(map,longitude,latitude,address,price,bedbath,sqft,dom,imgUrl,height,width){var point=new GPoint(longitude,latitude);var marker=new GMarker(point);var html='<p>'+address+'</p>'+'<div style="width:50%;float:left;text-align:left;"><span style="font-size:125%;font-weight:bold;">'+
price+'</span><br/>'+bedbath+'<br/>'+sqft+'<br/>days on mkt:&nbsp;'+dom+' days'+'</div><div style="width:50%;float:right;"><img src="'+imgUrl+'" height="'+height+'" width="'+
width+'" /></div>';GEvent.addListener(marker,'click',function(){origCenter=map.getCenter();origZoom=map.getZoom();marker.openInfoWindowHtml(html,{maxWidth:250});});map.addOverlay(marker);return marker;}
function bookmark(title){if((navigator.appName=="Microsoft Internet Explorer")&&(parseInt(navigator.appVersion)>=4)){window.external.AddFavorite(window.document.location.href,title);}else if(navigator.appName=="Netscape"){window.sidebar.addPanel(title,window.document.location.href,"");}else{alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");}}