function getUrlParam(D,G,C){D=D.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var B="[\\?&]"+D+"=([^&#]*)";var F=new RegExp(B);var E=F.exec(window.location.href);if(E==null){return""}else{var A=E[1];if(G){A=cleanEscapes(A)}if(C){A=cleanAddress(A)}return A}}function cleanEscapes(A){A=unescape(A);A=replaceAll(A,"+"," ");return A}function cleanAddress(A){A=replaceAll(A,"&"," and ");return A}function replaceAll(A,C,D){var B=A.indexOf(C);while(B!=-1){A=A.replace(C,D);B=A.indexOf(C)}return A}function urlify(A,B,C){return(B==null&&C)?"":A+"="+encodeURIComponent(B)}function sluggify(A){A=replaceAll(A," ","-");A=replaceAll(A,"'","");return A.toLowerCase()}function safeString(C,B,A){if(typeof C!="string"){return""}if(B){C="x"+C}if(A){C=C+"x"}return C}function trimURL(A){var B=A.indexOf("://");if(B!=-1){return A.substr(B+3)}}function forEach(F,C,B){B=B||this;var A=F.length;for(var E=0;E<A;E++){var D=C.call(B,F[E],E);if(D!==undefined){return D}}}function paramIsSet(A){return(typeof A!="undefined")}function defaultIfNotSet(A,B){return(typeof A!="undefined")?A:B}function trackEvent(D,C,A,B){if(pageTracker){pageTracker._trackEvent(D,C,A,B)}}function trackNavigation(C,B,D,A){if(B&&D){trackEvent(B,D,safeString(A))}if(C){document.location=C}}function trackNavigationNewWindow(C,B,D,A){if(B&&D){trackEvent(B,D,safeString(A))}if(C){window.open(C,"newwin")}}function isNumeric(B){var A=/^[0-9]+$/;if(B.match(A)){return true}return false}function leadsWithNumber(B){var A=/^[0-9]+$/;if(B.substr(0,1).match(A)){return true}return false}function getLeadingNumber(B){if(!leadsWithNumber(B)){return false}var A=B.match(/[\d\.]+/g);if(A&&A[0]){return Number(A[0])}return false}Function.prototype.inheritsFrom=function(A){if(A.constructor==Function){this.prototype=new A;this.prototype.constructor=this;this.prototype.parent=A.prototype}else{this.prototype=A;this.prototype.constructor=this;this.prototype.parent=A}return this};function StringList(){this.list=[];this.length=function(){return this.list.length};this.get=function(A){return this.list[A]};this.indexOf=function(B){for(var A=0;A<this.list.length;A++){if(this.list[A]==B){return A}}return -1};this.isInList=function(A){return(this.indexOf(A)!=-1)};this.addIfUnique=function(A){if(!this.isInList(A)){this.list.push(A)}};this.add=function(A){this.list.push(A)}}function suppressErrors(){window.onerror=function(){return true}}function restoreErrors(){window.onerror=function(){return false}}function sortAmenityResults(B,A){if(B.length<=1){return B}B.sort(function(D,C){return D.getDispDist()-C.getDispDist()});return dedupeAmenities(B,A)}function sortAmenityResultsSnapDist(B,A){if(B.length<=1){return B}B.sort(function(D,C){return D.getSnapDistance()-C.getSnapDistance()});return dedupeAmenities(B)}function dedupeAmenities(D,A){var C=[];C.push(D[0]);for(var B=1;B<D.length;B++){if(D[B].getName()!=D[B-1].getName()&&D[B].getStreetAddress()!=D[B-1].getStreetAddress()){C.push(D[B])}}if(!A||A>=C.length){return C}return C.slice(0,A)}function labelResults(C,B){for(var A=0;A<C.length;A++){C[A].resultSetIndex=B;C[A].resultIndex=A}}function convertMeters(B,A){if(A==UNITS_MI){return B/1609.34}return B/1000}function convertMetersForDisplay(B,A,C,D,F){var E=convertMeters(B,A);if(D){E=roundNumber(E,D)}if(E<=0&&D==1){E="0.0"}else{if(E<=0&&D==2){E="0.01"}}dStr=String(E);if(C){dStr+=(A==UNITS_MI)?MILES_LABEL:KILOMETERS_LABEL}if(F){dStr=(dStr.substr(0,1)=="0")?dStr.substr(1):dStr}return dStr}function positive_mod(B,A){if(B<0){return A+(B%A)}else{return B%A}}GRID_SIZE=0.0015;HALF_GRID_SIZE=GRID_SIZE/2;function snapToGrid(A){A=A*1;distanceToGrid=positive_mod(A,GRID_SIZE);if(distanceToGrid<HALF_GRID_SIZE){A=A-distanceToGrid}else{A=A+GRID_SIZE-distanceToGrid}return(Math.round(A*10000))/10000}function getValue(A){if(A&&A.value){return A.value}return null}function setValue(B,A){if(B){B.value=A}}function getElemInternal(A){if(typeof (A)=="string"){return document.getElementById(A)}return A}function getElem(A){if(typeof (A)=="string"){return document.getElementById(A)}return null}function getHTML(B){var A=getElemInternal(B);if(A){return A.innerHTML}return null}function setHTML(C,A){var B=getElemInternal(C);if(B){B.innerHTML=A;return true}return false}function appendHTML(C,A){var B=getElemInternal(C);if(B){B.innerHTML+=A;return true}return false}function setStyle(C,A){var B=getElemInternal(C);if(B&&typeof (A)=="string"){B.style.cssText+=";"+A}}function getDocBody(){return document.getElementsByTagName("BODY")[0]}function addElemToDom(A){getDocBody().appendChild(A)}function showDialog(D,C,B){initDialog();startModal();var A=(B)?'<img class="close-box" onclick="hideDialog()" src="http://www2.walkscore.com/images/closeBox.gif" />':"";A+=D;getElem("ws-dialog").className=C;setHTML("ws-dialog",A);setStyle("ws-dialog","display:block;")}function hideDialog(){setStyle("ws-dialog","display:none;");endModal()}function initDialog(){if(getElem("ws-dialog")!=null){return }var A=document.createElement("div");A.id="ws-dialog";addElemToDom(A)}function startModal(){initModal();var A=getElem("popupMask");if(A&&A.style.display=="none"){setStyle(A,"display:block;");setMaskSize();hideSelectBoxes()}}function endModal(){setStyle("popupMask","display:none;");displaySelectBoxes()}function initModal(){if(getElem("popupMask")!=null){return }var A=document.createElement("div");A.id="popupMask";addElemToDom(A);setStyle(A,"display:none;");window.onresize=setMaskSize;window.onscroll=setMaskSize}function setMaskSize(){var B=getDocBody();var A=getElem("popupMask");A.style.top=Math.max(document.body.scrollTop,document.documentElement.scrollTop)+"px";A.style.left=Math.max(document.body.scrollLeft,document.documentElement.scrollLeft)+"px";A.style.height=Math.max(getViewportHeight(),B.scrollHeight)+"px";A.style.width=Math.max(getViewportWidth(),B.scrollWidth)+"px"}function getViewportHeight(){if(window.innerHeight!=window.undefined){return window.innerHeight}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientHeight}if(document.body){return document.body.clientHeight}return window.undefined}function getViewportWidth(){if(window.innerWidth!=window.undefined){return window.innerWidth}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientWidth}if(document.body){return document.body.clientWidth}}function hideSelectBoxes(){if(navigator.appName=="Microsoft Internet Explorer"&&parseFloat(navigator.appVersion.split("MSIE")[1])<7){var B=document.getElementsByTagName("SELECT");for(var A=0;A<B.length;A++){B[A].style.visibility="hidden"}}}function displaySelectBoxes(){if(navigator.appName=="Microsoft Internet Explorer"&&parseFloat(navigator.appVersion.split("MSIE")[1])<7){var B=document.getElementsByTagName("SELECT");for(var A=0;A<B.length;A++){B[A].style.visibility="visible"}}}function reportError(A){showMessage(A)}function alertThese(){}function logThese(){}function dbug(A){appendHTML("dbug","<br />"+A)}function rand(A){return(Math.floor(Math.random()*A+1))}function byte2Hex(B){var A="0123456789ABCDEF";return String(A.substr((B>>4)&15,1))+A.substr(B&15,1)}function RGB2Color(C,B,A){return"#"+byte2Hex(C)+byte2Hex(B)+byte2Hex(A)}function getScoreColor(B){var A=Array();A[0]=[223,68,51];A[1]=[235,237,129];A[2]=[173,228,108];A[3]=[78,173,66];if(B<55){return getBlendedColor(A[0],A[1],B/0.55)}else{if(B<75){return getBlendedColor(A[1],A[2],(B-55)/0.2)}else{if(B<95){return getBlendedColor(A[2],A[3],(B-75)/0.2)}else{return RGB2Color(78,173,66)}}}}function getBlendedColor(F,E,D){var C=F[0]*(1-D/100)+E[0]*D/100;var B=F[1]*(1-D/100)+E[1]*D/100;var A=F[2]*(1-D/100)+E[2]*D/100;return RGB2Color(C,B,A)}function convertToTime(C){var A=Math.floor(C);var D=String(extractMinutes(C));if(D.length==1){D="0"+D}var B=(A>=12)?"pm":"am";if(A==24){A=12;B="am"}else{if(A==0){A=12}else{if(A>12){A-=12}}}return A+":"+D+B}function extractMinutes(B){var A=Math.floor(B);var C=Math.round((B-A)*60);return C}function extractHours(A){return Math.floor(A)%24}function roundNumber(B,C){var A=Math.round(B*Math.pow(10,C))/Math.pow(10,C);return A}function cleanNumber(B){var A=B;A=A.replace("(","");A=A.replace(")","");A=A.replace("-","");A=A.replace(" ","");return A};