

var heightResultsStartAt;var activeMapIcon;var activePRID;var down=false;var mapInitialised=false;var markersInitialised=false;var prid_timer=0;var activeMarkerId=0;var userArr=Array();var propsDisplayed;var propFirst;var propLast;var markers;var tooltip;var map;var authenticated;var resultsAccordion;var srch_suburb;var srch_postcode;var srch_state;var ads_ids=Array();var ads_cid=Array();var ads_img1=Array();var ads_type1=Array();var ads_h1=Array();var ads_w1=Array();var ads_img2=Array();var ads_type2=Array();var ads_h2=Array();var ads_w2=Array();var login_email;var partial_popup=false;var alertTimer=0;var ad=Array();var multiPropertyMapBoxAddress_count=1;var picnumber=0;addEvent(window,"load",function(){mySearchFormInitialiser($("sale_suburb_query"),$("sale_suburb_query_auto_complete"))});function windowHeight(){var A=0;if(typeof (window.innerWidth)=="number"){A=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){A=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){A=document.body.clientHeight}}}return A}function windowWidth(){var A=0;if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){A=document.documentElement.clientWidth}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){A=document.body.clientWidth}else{if(typeof (window.innerWidth)=="number"){A=window.innerWidth}}}return A}function fixPageHeight(){var H=0;var D=0;var G=0;if($("boxSearchContainer")){H=$("boxSearchContainer").offsetHeight}if($("boxTopMenuContainer")){D=$("boxTopMenuContainer").offsetHeight}if($("boxLogoContainer")){G=$("boxLogoContainer").offsetHeight}var J=D+G+H;var B=15;var F=windowHeight();var C=30;heightResultsStartAt=(F-J<445)?445:(F-J);var I=F-J-B;I=(I<440)?440:I;var E=I-C;hideSearchPanes();$("stretchResults").height=I;$("stretchMap").height=E;$("boxMapContent").setStyle({height:E});$("boxMapContent").setAttribute("style","height: "+E+"px;");$("stretchDemogs").height=E;$("boxDemographicsContent").setStyle({height:E});$("boxDemographicsContent").setAttribute("style","height: "+E+"px;");$("stretchLocality").height=E;$("boxLocalityContent").setStyle({height:E});$("boxLocalityContent").setAttribute("style","height: "+E+"px;");$("boxAds").setStyle({height:I});$("boxAds").setAttribute("style","height: "+I+"px;");var A=windowWidth()-851;A=(A<140)?140:A;$("searchPaneAd").setStyle({width:A});$("searchPaneAd").setAttribute("style","width: "+A+"px;")}function hideSearchPanes(){var A="";if($("boxMainResults")){$("boxMainResults").hide()}$("boxMainCover").show();var B=heightResultsStartAt-1;$("boxMainCover").setStyle({height:B});A+='<img src="'+url_images+'transparent_1x1.gif" height="'+B+'" width="1" class="floatLeft"><br><br>';A+=getDescriptionImageMap();$("boxMainCover").update(A)}function showSearchPanes(){$("boxMainCover").hide();if($("boxMainResults")){$("boxMainResults").show()}$("boxMainCover").update("");showAds()}function hideDropDowns(){if(typeof document.body.style.maxHeight=="undefined"){if($("sale_baths")){$("sale_baths").hide()}if($("sale_beds")){$("sale_beds").hide()}if($("sale_garages")){$("sale_garages").hide()}if($("sale_dwelling")){$("sale_dwelling").hide()}if($("state_drop")){$("state_drop").hide()}if($("buy_ests_volume")){$("buy_ests_volume").hide()}if($("purchase_state_drop")){$("purchase_state_drop").hide()}if($("purchase_prop_type")){$("purchase_prop_type").hide()}if($("purchase_prop_rating")){$("purchase_prop_rating").hide()}if($("prop_rating")){$("prop_rating").hide()}if($("prop_type")){$("prop_type").hide()}}if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){$("valueGoogleMapHolder").hide();$("purchaseGoogleMapHolder").hide()}}function showDropDowns(){if($("pageOverlay").style.display!="block"){if($("sale_baths")){$("sale_baths").show()}if($("sale_beds")){$("sale_beds").show()}if($("sale_garages")){$("sale_garages").show()}if($("sale_dwelling")){$("sale_dwelling").show()}if($("state_drop")){$("state_drop").show()}if($("buy_ests_volume")){$("buy_ests_volume").show()}if($("purchase_state_drop")){$("purchase_state_drop").show()}if($("purchase_prop_type")){$("purchase_prop_type").show()}if($("purchase_prop_rating")){$("purchase_prop_rating").show()}if($("prop_type")){$("prop_type").show()}if($("prop_rating")){$("prop_rating").show()}}if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){$("valueGoogleMapHolder").show();$("purchaseGoogleMapHolder").show()}}function showBlogDetails(){$("haveYourSay").stopObserving("click",showBlogDetails);if(down){Effect.BlindUp($("blogSayDetails"));down=false}else{Effect.BlindDown($("blogSayDetails"));down=true}setTimeout(function(){$("haveYourSay").observe("click",showBlogDetails)},1800)}function showOverlay(D){var F="";var E="";var C="";var B=new Date();switch(D){case"faq":F="Frequently Asked Questions";C=site_url+"/html/faq.html";break;case"contact":F="Contact Us";C=site_url+"/html/contact.html";break;case"disclaimer":F="FindMeAHome.com.au - Conditions of Use";C=site_url+"/html/disclaimer.html";break;case"signup":F="Free Account Sign-Up";C=site_url+"/html/signup.html?"+B.getMilliseconds();break;case"blank":F="-";C=site_url+"/html/blank.html";break;case"activate":F="Activate Your Account";C=site_url+"/html/activate.html";break;case"notactivated":F="Activate Your Account";C=site_url+"/html/notactivated.html";break;case"accountactivationlocked":F="Account Activation Locked";C=site_url+"/html/accountactivationlocked.html";break;case"reactivate":F="Activate Your Account";C=site_url+"/html/reactivate.html";break;case"password":F="Forgotten Your Password";C=site_url+"/html/password.html";break;case"account":F="Account Details";C=site_url+"/html/account.html";break;case"disclaimer_popup":F="Price Estimations";C=site_url+"/html/disclaimer_popup.html";break;case"purchase":F="Find Me A Home Shop";C=site_url+"html/purchase.html";break;case"rating_help_house":F="Rating Help - Houses";C=site_url+"html/rating_help_house.html";break;case"rating_help_unit":F="Rating Help - Units";C=site_url+"html/rating_help_unit.html";break;case"rating_help_land":F="Rating Help - Vacant Land";C=site_url+"html/rating_help_land.html";break;case"signin":F="Account Sign-In";C=site_url+"html/signin.html";break;default:F="Incorrect Link";C=site_url+"/html/wrong.html";break}var A="";if(D=="purchase"){A=", onComplete:loadPurchaseDetails"}E+='       <div id="overlayText"><div style="text-align: center; width: 100px; margin: auto;"><br><img src="'+url_images+'loader.gif" align="center" style="margin: auto;"><br>...loading...<br></div></div>';E+="        <script>new Ajax.Updater( 'overlayText', '"+C+"', {method: 'get'"+A+"});";if(D=="account"){E+="        loadAccountDetails();"}E+="        <\/script>";showOverlayHTML(F,"",E);return }function showOverlayHTML(E,A,D){var F="";var C=windowWidth();var B=windowHeight();hideDropDowns();hideAds();showHideDiv($("pageOverlay"));showHideDiv($("overlayBox"));$("overlayBox").setStyle({"margin-left":((C-600)/2)+"px"});$("overlayBox").style.marginLeft=((C-600)/2)+"px";$("overlayBox").setStyle({height:(B-100)+"px"});F+='<div class="overlayBoxContentHeader" id="contentPop">';F+='<div  class="floatLeft" style="width: 594px;">';F+='<img src="'+url_images+'transparent_1x1.gif" width="35" height="50" class="imgFloatLeft">';F+='<img src="'+url_images+'transparent_1x1.gif" width="559" height="17" class="imgFloatLeft">';F+='<div style="height: 33px; float: left;">'+E+"</div>";F+="</div>";F+='<div class="overlayBoxClose">';F+="<a href=# onMouseOver=\"$('overlayClose').src='"+url_images+"background_overlayHeaderCloseOn.gif';\" onClick=\"hideOverlay( ); return false;\" onMouseOut=\"$('overlayClose').src='"+url_images+'background_overlayHeaderClose.gif\';" style="position: relative;">';F+='<img id=overlayClose src="'+url_images+'background_overlayHeaderClose.gif" border="0" style="z-index: 100;">';F+="</a>";F+="</div>";F+="</div>";F+='<div class="overlayBoxContent" style="height: '+(B-160)+'px;">';subheadHeight=0;if(A!=""){F+='    <div class="overlayBoxContentMainHead">'+A+"</div>";subheadHeight=50}else{F+='<img src="'+url_images+'transparent_1x1.gif" width="600" height="25">'}F+='    <div id="mycustomscroll" class="scroller" style="height: '+(B-160-45-subheadHeight)+'px;"><div>';F+=D;F+="    </div></div>";F+="</div> <!-- end overlayBoxMain -->";F+="</div> <!-- end overlayBoxContent -->";$("overlayBox").update(F);return }function hideOverlay(){showHideDiv($("pageOverlay"));showHideDiv($("overlayBox"));showDropDowns();showAds();return }function showHideDiv(A){if(A.style.display=="none"||A.style.display==""){A.style.display="block"}else{A.style.display="none"}}function isEnterKey(B){var A;if(window.event){A=window.event.keyCode}else{if(B){A=B.which}}if(A==13){return true}else{return false}}function checkEnterKey(C,B){var A;if(window.event){A=window.event.keyCode}else{if(C){A=C.which}}if(A==13){if(B=="sale"){manageSaleSearch();return false}}else{return true}}function openPopup(C,D){var B=(D=="")?"height=500,width=400,scrollbars=1,resizable=1":D;var A=C.replace(/[^a-zA-Z0-9]/g,"");newwindow=window.open(C,A,B);if(window.focus){newwindow.focus()}}function createMarker(F,E){var D=new Object();var C=false;var B;if(properties.isMultipleListings(F)){D.icon=createIcon(url_images+"icon_map_multi.png",new GSize(28,32),new GPoint(6,32));for(key in F){if(key=="listCount"){continue}if(C===false){B=F[key].lockedCoords;C=new GMarker(B,D)}F[key].marker=C;F[key].markerId=E}var A=function(){showMapPropertyList(F,E,1,0,1)}}else{B=F.lockedCoords;D.icon=createIcon(url_images+"icon_map_house.png",new GSize(28,32),new GPoint(6,32));C=new GMarker(B,D);F.marker=C;F.markerId=F.prid;var A=function(){showMapPropertyFeatureOnly(F,1,0,1)}}GEvent.addListener(C,"click",A);return C}function createIcon(D,A,B){var C=new GIcon();C.image=D;C.iconSize=A;C.iconAnchor=B;return C}function preloadImages(C){for(var B=0;B<C.length;B++){var A=new Image();A.src=C[B]}}function showBlog(D){var C=properties.getProperty(D);var B=makeOverlaySubhead(C);var A="";A+='   <div style="width: 535px; height: 100%;">';A+='       <div id="blogContainerMakeComment"></div>';A+='       <div class="clear"></div>';A+='       <div id="blogContainerResidexRating"></div>';A+='       <div class="clear"></div>';A+='       <div id="blogContainerAgentSay"></div>';A+='       <div class="clear"></div>';A+='       <div id="blogContainerVisitorComments"></div>';A+='       <div class="clear"></div>';A+="   </div>";A+='   <div class="clear">&nbsp;</div>';showOverlayHTML("Have Your Say ",B,A);showMakeComment(C.prid,"",C);showResidexRating(C.rdx_score,C.rdx_price);showAgentSay(C.agt_score,C.agt_price,C.agt_comment,C.agt_name);showVisitorComments(C.prid)}function makeOverlaySubhead(B){var A="";A+='<div class="floatLeft" style="width: 405px;">'+B.address+"</div>";A+='<div class="floatRight" style="width: 155px;">';A+='         <img src="'+url_images+'transparent_1x1.gif" width="150" height="15" class="floatRight">';A+='        <div class="propertyBlogRowStats">';A+='            <div class="propertyBlogRowDetailsCount">';A+='                <div class="propertyBlogRowDetailsCountText">&nbsp;'+B.beds+"&nbsp;</div>";A+='                <div class="propertyBlogRowDetailsCountImage">';A+='                    <img src="'+url_images+'image_bedBig.png" class="floatLeft">';A+='                    <img src="'+url_images+'transparent_1x1.gif" height="1" width="4" class="floatLeft">';A+="                </div>";A+='                <div class="propertyBlogRowDetailsCount">';A+='                    <div class="propertyBlogRowDetailsCountText">&nbsp;'+B.baths+"&nbsp;</div>";A+='                    <div class="propertyBlogRowDetailsCountImage">';A+='                        <img src="'+url_images+'image_bathBig.png" class="floatLeft">';A+='                        <img src="'+url_images+'transparent_1x1.gif" height="1" width="4" class="floatLeft">';A+="                    </div>";A+="                </div>";A+='                <div class="propertyBlogRowDetailsCount">';A+='                    <div class="propertyBlogRowDetailsCountText">&nbsp;'+B.cars+"&nbsp;</div>";A+='                    <div class="propertyBlogRowDetailsCountImage">';A+='                        <img src="'+url_images+'image_carBig.png">';A+="                    </div>";A+="                </div>";A+="            </div>";A+="        </div> <!-- end propertyBodyRowStats -->";A+="</div>";return A}function showMakeComment(F,I,C){var D="";var A="";var E="";if(C){var H=C.beds;var B=C.baths;var G=C.cars}else{var H=$("hidden_beds").value;var B=$("hidden_baths").value;var G=$("hidden_garages").value}D+='   <div class="containerBlogYourSay">     ';D+='       <div class="blogSaySomethingHeader"><img src="'+url_images+'button_blogSomethingToSay.png" id="haveYourSay" value="Have your say" onMouseOver="$(\'haveYourSay\').src = \''+url_images+"button_blogSomethingToSayActive.png';\" onMouseOut=\"$('haveYourSay').src = '"+url_images+"button_blogSomethingToSay.png';\"></div>";D+='       <div class="blogSayDetails" id="blogSayDetails">';D+='           <img src="'+url_images+'transparent_1x1.gif" width="535" height="10" class="floatLeft">';D+='             <img src="'+url_images+'image_haveYourSay.png" class="floatLeft">';D+='             <img src="'+url_images+'transparent_1x1.gif" width="7" height="10" class="floatLeft">';if(authenticated){D+='           <div class="blogSayDetailsText" style="background-color: #F9F9F9;">';if(I!=""){D+='               <div style="text-align: center; font-weight: bold;">'+I+"</div>";D+='                   <img src="'+url_images+'transparent_1x1.gif" width="455" height="8">'}D+='               <form onSubmit="addComment('+F+'); return false;" id="blogComment"><input type="hidden" name="prid" id="prid" value="'+F+'">';D+='                   <div class="blogSayDesc">This property has '+getHTMLDropdown("cust_bed",H,1)+" bedrooms, "+getHTMLDropdown("cust_bath",B,1)+" bathrooms and "+getHTMLDropdown("cust_garage",G,0)+" garages.</div>";D+='                   <img src="'+url_images+'transparent_1x1.gif" width="455" height="5">';D+='                   <div class="blogSayDesc">Compared to other properties in the street I rate it a '+getHTMLDropdown("cust_score",A,0)+" out of 10.</div>";D+='                   <img src="'+url_images+'transparent_1x1.gif" width="455" height="5">';D+='                   <div class="blogSayDesc">I estimate it is worth $<input name="cust_value" id="cust_value" type="text" class="blogTextInput" size="12"></div>';D+='                   <img src="'+url_images+'transparent_1x1.gif" width="455" height="5">';D+='                   <div class="blogSayDesc">Display name:<input name="cust_alias" id="cust_alias" type="text" class="blogTextInput"></div>';D+='                   <img src="'+url_images+'transparent_1x1.gif" width="455" height="5">';D+='                   <div class="blogSayDesc"><div style="height: 18px; float: left;">Your comments:</div><textarea name="cust_comments" id="cust_comments" class="blogTextArea"></textarea></div> ';D+='                   <img src="'+url_images+'transparent_1x1.gif" width="455" height="5">';D+='                   <div class="blogSayDesc"><input align="right" type="image" src="'+url_images+'button_submit.png" value="Submit Comments" id="yourSaySubmit" onMouseOver="$(\'yourSaySubmit\').src = \''+url_images+"button_submitActive.png';\" onMouseOut=\"$('yourSaySubmit').src = '"+url_images+"button_submit.png';\"></div>";D+='                   <img src="'+url_images+'transparent_1x1.gif" width="455" height="5">';D+="               </form>";D+="           </div>"}else{D+='           <div class="blogSayDetailsText" style="background-color: #F9F9F9;">';D+='               <input type="hidden" name="hidden_prid" id="hidden_prid" value="'+F+'">';if(C){D+='               <input type="hidden" name="hidden_beds" id="hidden_beds" value="'+C.beds+'">';D+='               <input type="hidden" name="hidden_baths" id="hidden_baths" value="'+C.baths+'">';D+='               <input type="hidden" name="hidden_garages" id="hidden_garages" value="'+C.cars+'">'}D+='               <div class="blogSayDesc"><div class="blogLogin" id="blogLogin"></div></div>';D+="           </div>"}D+="         </div>";D+="       </div>";D+='       <div class="clear"></div>';D+="   </div>";D+='   <img src="'+url_images+'transparent_1x1.gif" width="535" height="10" class="floatLeft">';$("blogContainerMakeComment").update(D);$("haveYourSay").observe("click",showBlogDetails);if(I!=""){$("blogSayDetails").show();down=true}else{$("blogSayDetails").hide();down=false}if(!authenticated){manageLogin("","blog")}}function showResidexRating(D,C){var A="";var E="";A+='   <div class="containerBlogYourSay">     ';A+='       <div class="reportHeader"><img src="'+url_images+'transparent_1x1.gif" width="30" height="10" class="floatLeft">Find Me A Home\'s calculated value</div>';for(var B=1;B<=10;B++){if(B<=D){E+='<img src="'+url_images+'image_houseFull.png" class="floatLeft">'}else{if((D-B)>0){E+='<img src="'+url_images+'image_houseHalf.png" class="floatLeft">'}else{E+='<img src="'+url_images+'image_houseEmpty.png" class="floatLeft">'}}}A+=getHTMLComment(D,C,"",E,0,"residex");A+='   <img src="'+url_images+'transparent_1x1.gif" width="535" height="10" class="floatLeft">';$("blogContainerResidexRating").update(A)}function showAgentSay(D,B,C,E){var A="";A+='   <div class="containerBlogYourSay">     ';A+='       <div class="reportHeader"><img src="'+url_images+'transparent_1x1.gif" width="30" height="10" class="floatLeft">The agent\'s estimate</div>';if(C==""||C==null){E="";C="The agent is yet to have their say. <br><br>Do you know the agent? Contact Residex now to have your say!";B=""}A+=getHTMLComment(D,B,E,C,0,"agent");A+='   <img src="'+url_images+'transparent_1x1.gif" width="535" height="10" class="floatLeft">';$("blogContainerAgentSay").update(A)}function resetUserScore(D,A){var C=properties.getProperty(D);C.vst_score=A;var B=(C.vst_score>10)?"10+":C.vst_score;$(D+"_score").update(B+"/10")}function showVisitorComments(C){var A=site_url+"fetch/property_user_comments.php";var B="prid="+C;new Ajax.Request(A,{method:"post",parameters:B,onComplete:function(G){var E="";E+='   <div class="containerBlogYourSay">     ';E+='       <div class="reportHeader"><img src="'+url_images+'transparent_1x1.gif" width="30" height="10" class="floatLeft">Your estimate</div>';E+='       <div class="clear"></div>';var N=G.responseXML.documentElement;var M=N.getElementsByTagName("pc")[0];resetUserScore(M.getAttribute("prid"),M.getAttribute("s"));var L=N.getElementsByTagName("uc");commTotal=L.length;for(var H=0;H<commTotal;H++){var I=L[H].getAttribute("by");var D=L[H].getAttribute("s");var K=L[H].getAttribute("p");var J=L[H].getAttribute("t");var F=((H+1)<commTotal)?1:0;E+=getHTMLComment(D,K,I,J,F,"consumer")}if(commTotal==0){E+=getHTMLComment("?","","","No one has had their say yet<br><br>Be the first, have your say now!",0,"consumer")}E+="    </div>";E+='    <img src="'+url_images+'transparent_1x1.gif" width="535" height="10" class="floatLeft">';$("blogContainerVisitorComments").update(E)}})}function addComment(C){var A=site_url+"fetch/customer_say_add.php";var B=$("blogComment").serialize();new Ajax.Request(A,{method:"post",parameters:B,onLoading:$("blogContainerMakeComment").update('<div class="containerBlogYourSay"><div class="blogSaySomethingHeader">...submitting comment...</div></div>'),onComplete:function(){$("blogContainerMakeComment").update('<div class="containerBlogYourSay"><div class="blogSaySomethingHeader">thanks for your comments!</div></div>');showVisitorComments(C)}})}function getHTMLComment(G,C,F,H,E,B){strprice="";if(C!=""&&B=="residex"){strprice="Residex calculates it is worth "+C.toLowerCase().replace("k",",000","g")}else{if(C!=""&&B=="agent"){strprice="The agent's estimate: "+C.toLowerCase()}else{if(C!=""&&B=="consumer"){strprice=F+" - estimates it is worth "+C.toLowerCase()}else{if(B=="consumer"){strprice=F}}}}var D=(G>10)?"10<span style='font-size: 15px;font-weight: bold;'><sup>+</sup></span>":G;var A="";A+='       <img src="'+url_images+'transparent_1x1.gif" width="535" height="1">';A+='       <div class="blogSayLeft">';A+='           <img src="'+url_images+'transparent_1x1.gif" width="80" height="7">';A+='           <div class="blogSayScore">'+D+"</div>";A+='           <img src="'+url_images+'transparent_1x1.gif" width="80" height="7">';A+="       </div>";A+='       <div class="blogSayRight">';A+='           <div class="blogSayText">';if(strprice!=""){A+='           <div class="blogSayAuthor">'+strprice+"</div>"}A+="               "+H.replace(/\r|\n|\r\n/g,"<br>");A+="           </div>";A+="       </div>";A+='       <div class="clear"></div>';if(E==1){A+='       <div class="blogSayBreaker"></div>'}A+='       <div class="clear"></div>';return A}function getHTMLDropdown(B,G,E){G=(G=="")?null:G;var F="";var C=E;F+='<select name="'+B+'" id="'+B+'" class="blogDropDown">';F+='<option value="-1">?</option>';for(C=E;C<=10;C++){var D=(G==C)?"selected":"";F+='<option value="'+C+'" '+D+">"+C+"</option>"}var A=(G==11)?"selected":"";F+='<option value="11" '+A+">10+</option>";F+="</select>";return F}function getUserArray(A){userArr.user_id=A.getAttribute("user_id");userArr.title=A.getAttribute("title");userArr.firstname=A.getAttribute("firstname");userArr.surname=A.getAttribute("surname");userArr.email=A.getAttribute("email");userArr.mobile=A.getAttribute("mobile");userArr.mobver=A.getAttribute("mv");userArr.aa=A.getAttribute("aa")}function showReportDownload(E,C){activePRID=E;var D=properties.getProperty(E);var A="";A+='<input type="hidden" name="hidden_prid" id="hidden_prid" value="'+E+'">';if(C==1){A+='       <div class="report">';A+='           <div class="reportHeader"><img src="'+url_images+'image_reportFMAH.png" class="floatLeft">Realtor Report</div>';A+='           <div class="reportDescLeft" style="color: #008bf9; font-size: 15px;"><br><br><br>The agent has sponsored this report</div>';A+='           <div class="reportDescRight">';A+='               <div class="reportUnavailable"><img src="'+url_images+'image_reportAvailBtn.png" align="center" class="inline"></div>';A+='               <img src="'+url_images+'transparent_1x1.gif" width="390" height="5">';A+='               <div class="reportLoginMsg" id="reportDownloadLink"></div>';A+='               <img src="'+url_images+'transparent_1x1.gif" width="50" height="5" class="floatLeft">';A+="           </div>";A+="       </div>";A+='       <div class="reportSeperator"></div>'}else{A+='       <div class="report">';A+='           <div class="reportHeader"><img src="'+url_images+'image_reportFMAH.png" class="floatLeft">Realtor Report</div>';A+='           <div class="reportDescLeft" style="color: #ff7e00; font-size: 15px;"><br><br><br>The agent has not yet sponsored this report</div>';A+='           <div class="reportDescRight">';A+="               <p>Do you want <b>independent price information</b>? Are you wanting inside <b>information straight from the real estate agent</b>? And did we tell you it was <b>free</b>!</p>";A+="               <p>The <b>Realtor Report</b> produced by Residex and sponsored by the real estate agent combines critical information about the property with relevant statistics to help you find your dream home at the right price.</p>";A+="               <ul>The report contains:";A+='                   <li style="margin-left: 20px;">Recent sales in the suburb upgraded to today\'s value</li>';A+='                   <li style="margin-left: 20px;">The properties growth potential</li>';A+='                   <li style="margin-left: 20px;">List of other properties for sale in the area</li>';A+='                   <li style="margin-left: 20px;">The agents comments about the property</li>';A+="               </ul>";A+='               <p>For <b>FREE</b>, ensure the property is the right one for you.</p><p><a target=_new href="./samples/realtor_report.pdf">View Sample Report.</a></p>';A+='               <div class="reportUnavailable"><img src="'+url_images+'image_reportUnavailBtn.png" align="center" class="inline"></div>';A+='               <img src="'+url_images+'transparent_1x1.gif" width="50" height="5" class="floatLeft">';A+="           </div>";A+="       </div>";A+='       <div class="reportSeperator"></div>'}A+='       <div class="report">';A+='           <div class="reportHeader"><img src="'+url_images+'image_reportFMAH.png" class="floatLeft">SMS Valuer</div>';A+='           <div class="reportDescLeft"><div class="reportPrice">$3.95</div><br>sms valuer</div>';A+='           <div class="reportDescRight">';A+="               <p>Looking for the <b>lowest cost solution</b> to get a good lead on the right price?</p>";A+="               <p>For <b>only $3.95</b> the <b>SMS Valuer</b> will tell you the answer based on the information you provide.</p>";A+='               <div class="reportLoginMsg" id="reportSMSLink"></div>';A+='               <img src="'+url_images+'transparent_1x1.gif" width="50" height="5" class="floatLeft">';A+="           </div>";A+="       </div>";A+='       <div class="reportSeperator"></div>';A+='   <div id="reportPurchaseContent"></div>';A+="   <script>new Ajax.Updater( 'reportPurchaseContent', site_url+'/html/report.html', {method: 'get'});<\/script>";A+='   <img src="'+url_images+'transparent_1x1.gif" width="500" height="25" class="floatLeft">';A+="<br>";A+="</div> <!-- end containerReport --> ";var B=makeOverlaySubhead(D);showOverlayHTML("Property Reports",B,A);showReportDownloadLink(D.prid,"")}function showReportDownloadLink(F,A){var D="";var C="";var E=properties.getProperty(F);if(authenticated){if(A!=""){D+='               <div style="font-weight: bold;">'+A+"</div>";D+='                 <img src="'+url_images+'transparent_1x1.gif" width="340" height="3">';C+='               <div style="font-weight: bold;">'+A+"</div>";C+='                 <img src="'+url_images+'transparent_1x1.gif" width="340" height="3">'}if(userArr.mobver=="true"){var B=E.address.replace(", "+E.suburb,"","i");D+="               By downloading this report you agree to supply the following details to the estate agent.<br>";D+='               <img src="'+url_images+'transparent_1x1.gif" width="340" height="4">';D+="                 <b>&nbsp;&nbsp;&nbsp;Name:</b> "+userArr.title+" "+userArr.firstname+" "+userArr.surname+"<br>";D+='                 <img src="'+url_images+'transparent_1x1.gif" width="340" height="3">';D+="                 <b>&nbsp;&nbsp;&nbsp;Email:</b> "+userArr.email+"<br>";D+='                 <img src="'+url_images+'transparent_1x1.gif" width="340" height="3">';D+="                 <b>&nbsp;&nbsp;&nbsp;Mobile:</b> "+userArr.mobile+"<br>";D+='                 <img src="'+url_images+'transparent_1x1.gif" width="340" height="3">';D+="                 <b>&nbsp;&nbsp;&nbsp;Property:</b> "+E.address+"<br>";D+='                 <img src="'+url_images+'transparent_1x1.gif" width="340" height="3">';D+='               <form id="reportDownload" method=POST action="'+site_url+'/fetch/report_download.php" target=_new><input type="hidden" name="prid" value="'+F+'">';D+='                   <img src="'+url_images+'transparent_1x1.gif" width="340" height="5">';D+='                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="download report" class="inputButtonLonger">';D+='                 <img src="'+url_images+'transparent_1x1.gif" width="340" height="5">';D+="               </form>";C+='               <img src="'+url_images+'transparent_1x1.gif" width="340" height="4">';C+="               <form id=\"reportDownload\" method=\"POST\" action=\"#\" target=_new class=\"inline\" onSubmit=\"if( !$('sms_report_tandc').checked ){ alert('Please agree to the Terms and Conditions');}else if ( $('cust_rating').value < 0 || $('cust_rating').value > 10 ){ alert( 'Please choose a rating for the property' ); }else{purchaseSMSReport( "+F+', $(\'cust_rating\').value ); }return false;"><input type="hidden" name="prid" value="'+F+'">';C+="                 <b>&nbsp;&nbsp;&nbsp;Name:</b> "+userArr.title+" "+userArr.firstname+" "+userArr.surname+"<br>";C+='                 <img src="'+url_images+'transparent_1x1.gif" width="340" height="3">';C+="                 <b>&nbsp;&nbsp;&nbsp;Mobile:</b> "+userArr.mobile+"<br>";C+='                 <img src="'+url_images+'transparent_1x1.gif" width="340" height="3">';C+="                 <b>&nbsp;&nbsp;&nbsp;Property:</b> "+E.address+"<br>";C+='                 <img src="'+url_images+'transparent_1x1.gif" width="340" height="3">';C+="                 <b>&nbsp;&nbsp;&nbsp;Your Rating:</b> "+getHTMLDropdown("cust_rating",E.rdx_score,0)+"<br>";C+='                 <img src="'+url_images+'transparent_1x1.gif" width="340" height="3">';C+='                 <b>&nbsp;&nbsp;&nbsp;Terms and Conditions:</b> I agree to the \'<a href="#" onClick="openPopup( \''+site_url+'/php/conditions_of_use.php\', \'\' ); return false;">Terms and Conditions</a>\' <input type="checkbox" name="sms_report_tandc" id="sms_report_tandc"><br>';C+='                 <img src="'+url_images+'transparent_1x1.gif" width="340" height="3">';C+='                   <img src="'+url_images+'transparent_1x1.gif" width="340" height="5">';C+='                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="sms me now" class="inputButtonLong" id="sendsmsnow">';C+='                   <img src="'+url_images+'transparent_1x1.gif" width="340" height="5">';C+="               </form>"}else{if(userArr.mobver=="false"){D+='               <div style="font-weight: bold;">You have not yet validated your mobile phone number.</div>We will validate your phone number by SMSing you a code which you will need to enter below, please confirm your mobile number and click \'SMS me now\'.<br><img src="'+url_images+'transparent_1x1.gif" height="6" width="340">';D+='               <div id="report-validate-error" class="error"></div>';D+='               <form class="inline" onSubmit="manageSMSSend(\'report\');return false;"><b>mobile:</b> <input type="text" id="report-validate-mobile" class="inputTextNormal" value="'+userArr.mobile+'"> &nbsp;&nbsp; <input type="submit" value="SMS me now" class="inputButtonLong" id="report-validate-button"></form><br><img src="'+url_images+'transparent_1x1.gif" height="6" width="340">';D+='               <img src="'+url_images+'transparent_1x1.gif" width="340" height="6">';D+='               <div id="report-validate-code-error" class="error"></div>';D+='               <div id="report-validate-code-msg" style="display: none;"><b>Enter your SMS code here:</b> <form class="inline" onSubmit="manageSMSValidation(\'report\');return false;"> &nbsp; <input type="text" id="report-validate-code" class="inputTextNormal" value=""> &nbsp;&nbsp; <input type="submit" value="validate" class="inputButton" id="report-validate-code-button"></form></div>';C+='               <div style="font-weight: bold;">You have not yet validated your mobile phone number.</div>We will validate your phone number by SMSing you a code which you will need to enter below, please confirm your mobile number and click \'SMS me now\'.<br><img src="'+url_images+'transparent_1x1.gif" height="6" width="340">';C+='               <div id="sms-validate-error" class="error"></div>';C+='               <form class="inline" onSubmit="manageSMSSend(\'sms\');return false;"><b>mobile:</b> <input type="text" id="sms-validate-mobile" class="inputTextNormal" value="'+userArr.mobile+'"> &nbsp;&nbsp; <input type="submit" value="SMS me now" class="inputButtonLong" id="sms-validate-button"></form><br><img src="'+url_images+'transparent_1x1.gif" height="6" width="340">';C+='               <img src="'+url_images+'transparent_1x1.gif" width="340" height="6">';C+='               <div id="sms-validate-code-error" class="error"></div>';C+='               <div id="sms-validate-code-msg" style="display: none;"><b>Enter your SMS code here:</b> <form class="inline" onSubmit="manageSMSValidation(\'sms\');return false;"> &nbsp; <input type="text" id="sms-validate-code" class="inputTextNormal" value=""> &nbsp;&nbsp; <input type="submit" value="validate" class="inputButton" id="sms-validate-code-button"></form></div>'}else{if(userArr.mobver=="locked"){D+="               Your account is locked due to too many failed mobile validation attempts - please enter your SMS code or contact Residex.";D+='               <img src="'+url_images+'transparent_1x1.gif" width="340" height="6">';D+='               <div id="report-validate-code-error" class="error"></div>';D+='               <div id="report-validate-code-msg"><b>Enter your SMS code here:</b> <form class="inline" onSubmit="manageSMSValidation(\'report\');return false;"> &nbsp; <input type="text" id="report-validate-code" class="inputTextNormal" value=""> &nbsp;&nbsp; <input type="submit" value="validate" class="inputButton" id="report-validate-code-button"></form></div>';C+="               Your account is locked due to too many failed mobile validation attempts - please enter your SMS code or contact Residex.";C+='               <img src="'+url_images+'transparent_1x1.gif" width="340" height="6">';C+='               <div id="sms-validate-code-error" class="error"></div>';C+='               <div id="sms-validate-code-msg"><b>Enter your SMS code here:</b> <form class="inline" onSubmit="manageSMSValidation(\'sms\');return false;"> &nbsp; <input type="text" id="sms-validate-code" class="inputTextNormal" value=""> &nbsp;&nbsp; <input type="submit" value="validate" class="inputButton" id="sms-validate-code-button"></form></div>'}else{D+="               There is an issue with your account, please contact Residex.";C+="               There is an issue with your account, please contact Residex."}}}}else{D+='               <div class="reportLogin" id="reportLogin"></div>';C+='               <div class="reportLogin" id="smsLogin"></div><div class="clear"></div>'}if($("reportDownloadLink")){$("reportDownloadLink").update(D)}$("reportSMSLink").update(C);if(!authenticated){manageLogin("","report")}}function purchaseSMSReport(D,C){$("sendsmsnow").value="...sending...";var A=site_url+"fetch/report_sms.php";var B="prid="+urlEncode(D)+"&cust_rating="+urlEncode(C)+"&sms_report_tandc=on";new Ajax.Request(A,{method:"post",parameters:B,onComplete:function(F){var E=F.responseXML.documentElement;var G=E.getElementsByTagName("success")[0].firstChild.nodeValue;if(G=="true"){$("reportSMSLink").update("<b>Congratulations</b> - your SMS has been sent, you should receive it shortly.<br><br>");return true}else{$("sendsmsnow").value="sms me now";alert("SMS failed, please try again later");return false}}})}function showReportLogin(B){var G="";var A="";G+="<em>Please login to download this report.</em>";G+="<form class=\"inline\" onSubmit=\"manageLogin( 'login-download', 'report' );return false;\">";G+='<table width="390">';G+='    <tr><td align="right" nowrap>email address </td><td align="left"><input tabindex="1" type="text" id="loginEmail-download" class="inputTextLonger"></td><td rowspan="2"><input tabindex="3" type="image" src="'+url_images+'btn_login.png"></td></tr>';G+='    <tr><td align="right">password </td><td align="left"><div class="floatLeft" ><input tabindex="1" type="password" id="loginPassword-download" class="inputTextNormal"></div><div class="loginForgottenPass"><a href="#" onClick="hideOverlay();showOverlay(\'password\'); return false;" class="forgotPassSmall">forgotten password?</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></td></tr>';G+="</table>";G+="</form>";G+='<img src="'+url_images+'transparent_1x1.gif" height="3" width="340">';A+="<em>Please log in to receive the SMS Valuer.</em><br>";A+="<form class=\"inline\" onSubmit=\"manageLogin( 'login-sms', 'report' );return false;\">";A+='<table width="390">';A+='    <tr><td align="right" nowrap>email address </td><td align="left"><input tabindex="4" type="text" id="loginEmail-sms" class="inputTextLonger"></td><td rowspan="2"><input tabindex="6" type="image" src="'+url_images+'btn_login.png"></td></tr>';A+='    <tr><td align="right">password </td><td align="left"><div class="floatLeft" ><input tabindex="5" type="password" id="loginPassword-sms" class="inputTextNormal"></div><div class="loginForgottenPass"><a href="#" onClick="hideOverlay();showOverlay(\'password\'); return false;" class="forgotPassSmall">forgotten password?</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></td></tr>';A+="</table>";A+="</form>";A+='<img src="'+url_images+'transparent_1x1.gif" height="3" width="340">';if(B!=null){var F=B.responseXML.documentElement;var C=F.getElementsByTagName("logged_in")[0].firstChild.nodeValue;if(C=="true"){var I=F.getElementsByTagName("user")[0];getUserArray(I);authenticated=true;var J="Welcome, "+userArr.title+" "+userArr.firstname+" "+userArr.surname+", thanks for logging in.";showReportDownloadLink($("hidden_prid").value,J);var H=(userArr.aa!="")?' &nbsp; <input type="button" value="agency admin" onClick="openPopup(\''+userArr.aa+"', 'width=1010,height=650,resizable=1,scrollbars=1');\" class=\"inputButtonHighlight\">":"";var E="Welcome, "+userArr.title+" "+userArr.firstname+" "+userArr.surname+'.&nbsp;&nbsp; <input type="button" value="logout" onClick="manageLogin(\'logout\', \'topmenu\' );" class="inputButton">'+H;updateMenuLogin(E);if($("menuSignUp")){$("menuSignUp").hide()}if($("menuAccount")){$("menuAccount").show()}if($("mainForgetPass")){$("mainForgetPass").hide()}return }else{var D=F.getElementsByTagName("failed_reason")[0].firstChild.nodeValue;if(D=="not activated"){login_email=F.getElementsByTagName("login_email")[0].firstChild.nodeValue;hideOverlay();showOverlay("notactivated");return }else{if(D=="activation locked"){login_email=F.getElementsByTagName("login_email")[0].firstChild.nodeValue;hideOverlay();showOverlay("accountactivationlocked");return }else{G+='<div class="loginMessage">login failed!</div>';A+='<div class="loginMessage">login failed!</div>'}}}}if($("reportLogin")){$("reportLogin").update(G)}$("smsLogin").update(A)}function showMapPropertyList(A,K,I,F,J,L){if(!properties.isMultipleListings(A)){return false}if(markersInitialised===false){return false}if(J==1){var B=$$("#drawers .propertyHandleOpen")[0];if(B){resultsAccordion.activate(B)}}if(activeMarkerId!=K){hideMarkerHTML();setPropertyIconState(A,K);if((I==1||F==1)){var C=A.listCount;for(key in A){if(key=="listCount"){continue}var G=A[key].marker;var E="scroll_"+A[key].markerId;var H="list_"+A[key].markerId;break}var D="";D+='<div class="multiMapDrawer">';D+='     <div class="clearLeft">';D+='	    	<div class="borderShadowTopLeft floatLeft">&nbsp;</div>';D+='	    	<div class="borderShadowTop floatLeft">&nbsp;</div>';D+='	    	<div class="borderShadowTopRight floatLeft">&nbsp;</div>';D+="		</div>";D+='     <div class="borderMiddleContainer clearLeft">';D+='     	<div class="borderShadowLeft floatLeft">&nbsp;</div>';D+='     	<div class="multiMapListingsParentContainer floatLeft">';D+='				<div class="multiMapListingsHeader clearLeft">';D+='   				<a href="#" class="disabledUp" id="'+E+'_up" onclick="scrollMultiList(\''+E+"', 'up', "+C+'); this.blur(); return false;">&nbsp;</a>';D+='  				<div class="multiPropertyRowTopClose" ><a href="#" onClick="hideMarkerHTML(); return false;" class="propertyCloseLink">x</a></div>';D+="				</div>";D+='     		<div class="multiMapListingsContainer clearLeft" id="'+E+'">';D+=createMapMultiPropertyBox(A);D+="        		</div>";D+='				<div class="multiMapListingsFooter clearLeft">';D+='   				<a href="#" class="down" id="'+E+'_down" onclick="scrollMultiList(\''+E+"', 'down', "+C+'); this.blur(); return false;">&nbsp;</a>';D+="				</div>";D+='	       		<div class="multiPropertyMapBoxAd clearLeft">';D+='					<div class="ad-3-2">'+getAdContent("3_2")+"</div>";D+="        		</div>";D+="			</div>";D+='     	<div class="borderShadowRight floatLeft">&nbsp;</div>';D+="		</div>";D+='     <div class="clearLeft">';D+='	    	<div class="borderShadowBottomLeft floatLeft">&nbsp;</div>';D+='	    	<div class="borderShadowBottom floatLeft">&nbsp;</div>';D+='	    	<div class="borderShadowBottomRight floatLeft">&nbsp;</div>';D+="		</div>";D+="</div>";showMarkerHTML(G,D,"list")}}return true}function showMapPropertyFeatureOnly(C,E,D,G,F){if(typeof F!="undefined"){arrClassList=$(F).className.split(" ");if(typeof arrClassList[1]=="undefined"||arrClassList[1]!="propertyHandleOpen"){return false}}if(markersInitialised===false){return false}var H=(typeof C=="object"?C:properties.getProperty(C));if(G==1){var B=$$("#drawers .propertyHandleOpen")[0];if(B){resultsAccordion.activate(B)}}hideMarkerHTML();picnumber=0;setPropertyIconState(H,H.markerId);if((E==1||D==1)&&H.type=="c"){var A="";A+='<div class="mapDrawer">';A+=createMapPropertyBox(H);if(H.agt_say==1){A+='    <div class="mapBackgroundShadow">';A+='        <img src="'+url_images+'transparent_1x1.gif" width="316" height="5">';A+='        <img src="'+url_images+'transparent_1x1.gif" width="9" height="99" class="imgFloatLeft">';A+='	       <div class="propertyMapBoxAgent">';A+=createMapAgentSayBox(H);A+="        </div>";A+='        <div class="clear"></div>';A+="    </div>"}if(H.thumbnail==1){A+='    <div class="mapBackgroundShadow">';A+='        <img src="'+url_images+'transparent_1x1.gif" width="316" height="3">';A+='        <img src="'+url_images+'transparent_1x1.gif" width="9" height="99" class="imgFloatLeft">';A+='	       <div class="propertyMapBoxAgent">';A+='            <div class="propertyImages">';A+='                <div class="propertyImageBtn"><img src="'+url_images+'transparent_1x1.gif" width="26" height="37"><a href="#" onClick="changePropertyPic('+H.prid+', -1);" ><img src="'+url_images+'btn_arrow_left_pic.gif" align="center" border="0"></a></div>';A+='                <div class="propertyImage"><img id="propertyPic" src="'+site_url+"fetch/fetch_property_image.php?prid="+H.prid+"&numb="+picnumber+'" height="125" style="display: block; margin: auto;"></div>';A+='                <div class="propertyImageBtn"><img src="'+url_images+'transparent_1x1.gif" width="26" height="37"><a href="#" onClick="changePropertyPic('+H.prid+',1);"><img src="'+url_images+'btn_arrow_right_pic.gif" align="center" border="0"></a></div>';A+="            </div>";A+="        </div>";A+='        <img src="'+url_images+'transparent_1x1.gif" width="316" height="3">';A+='        <div class="clear"></div>';A+="    </div>"}A+='        <div class="clear"></div>';A+='    <div class="mapBackgroundShadow">';A+='        <img src="'+url_images+'transparent_1x1.gif" width="10" height="30" class="imgFloatLeft">';A+='	       <div class="propertyMapBoxAd">';A+='            <div class="ad" id="ad-3-2">'+getAdContent("3_2")+"</div>";A+="        </div>";A+="    </div>";A+='	   <div class="propertyHandleMapBase">&nbsp;</div>';A+="</div>";showMarkerHTML(H.marker,A,(H.agt_say==1?"agentsay":"feature"))}return true}function changePropertyPic(B,A){picnumber=picnumber+A;$("propertyPic").src=site_url+"fetch/fetch_property_image.php?prid="+B+"&numb="+picnumber}function addEvent(D,C,A){if(D.addEventListener){D.addEventListener(C,A,false);return true}else{if(D.attachEvent){var B=D.attachEvent("on"+C,A);return B}else{return false}}}function showMarkerHTML(E,B,J){clearTimeout(prid_timer);hideDropDowns();var F=map.fromLatLngToDivPixel(map.getBounds().getNorthEast());var Q=map.fromLatLngToDivPixel(map.getBounds().getSouthWest());var N=0;var I=0;var L=0;var H=0;var G=map.fromLatLngToDivPixel(E.getPoint());var P=310;if(G.x+P>F.x){N=(G.x+P)-F.x}else{if(G.x<Q.x){N=G.x-Q.x-70}}var M;switch(J){case"list":M=170;break;case"agentsay":M=300;break;case"feature":default:M=160;break}if(G.y-M<F.y){L=(F.y+M)-G.y}else{if(G.y>Q.y){L=Q.y-G.y-50}}if(N!=0||L!=0){I=(N!=0?-N-10:0);H=(L!=0?L+30:0);map.panBy(new GSize(I,H))}tooltip.innerHTML=B;var O=map.getCurrentMapType().getProjection().fromLatLngToPixel(map.getBounds().getSouthWest(),map.getZoom());var C=map.getCurrentMapType().getProjection().fromLatLngToPixel(E.getPoint(),map.getZoom());var D=E.getIcon().iconAnchor;var A=E.getIcon().iconSize.width;var K=new GControlPosition(G_ANCHOR_BOTTOM_LEFT,new GSize(C.x-O.x-D.x+(A/2)+I,-C.y+O.y+(D.y/2)-H));K.apply(tooltip);tooltip.style.visibility="visible"}function hideMarkerHTML(){showDropDowns();if(tooltip){tooltip.style.visibility="hidden"}setPropertyIconState()}function sleepHideMapPropertyDetails(){prid_timer=setTimeout("hideMarkerHTML();",30000)}function setPropertyIconState(C,B){if(markersInitialised){if(activeMarkerId!=0){var A=properties.propertiesList[activeMarkerId];if(properties.isMultipleListings(A)){for(key in A){if(key=="listCount"){continue}setPropertyIcon(A[key],false)}}else{setPropertyIcon(A,false)}activeMarkerId=0;multiPropertyMapBoxAddress_count=1}if(typeof C!="undefined"){if(properties.isMultipleListings(C)){for(key in C){if(key=="listCount"){continue}setPropertyIcon(C[key],true)}}else{setPropertyIcon(C,true)}activeMarkerId=B}}}function setPropertyIcon(C,B){if(B==false){var A=(C.markerId.substring(0,9)=="multiList"?url_images+"icon_map_multi.png":url_images+"icon_map_house.png")}else{var A=(C.markerId.substring(0,9)=="multiList"?url_images+"icon_map_multi_highlight.png":url_images+"icon_map_house_highlight.png")}C.marker.setImage(A)}function generateReportLink(D){var C=properties.getProperty(D);var A=C.address.replace(", "+C.suburb,"","i");var B="";B+="prid="+urlEncode(C.prid)+"&street_rating="+urlEncode(C.rdx_score);B+="&address="+urlEncode(A)+"&suburb="+urlEncode(C.suburb)+"&state="+urlEncode(C.state)+"&postcode="+urlEncode(C.postcode);B+="&beds="+urlEncode(C.beds)+"&baths="+urlEncode(C.baths)+"&garages="+urlEncode(C.cars);B+="&cust_title="+urlEncode(userArr.title)+"&cust_firstname="+urlEncode(userArr.firstname)+"&cust_surname="+urlEncode(userArr.surname)+"&cust_email="+urlEncode(userArr.email)+"&cust_phone="+urlEncode(userArr.phone)+"&cust_mobile="+urlEncode(userArr.mobile);B+="&cust_unitno="+urlEncode(userArr.unitno)+"&cust_streetno="+urlEncode(userArr.streetno)+"&cust_street="+urlEncode(userArr.street)+"&cust_streettype="+urlEncode(userArr.streettype);B+="&cust_suburb="+urlEncode(userArr.suburb)+"&cust_postcode="+urlEncode(userArr.postcode)+"&cust_state="+urlEncode(userArr.state);return B}function urlEncode(A){if(A==undefined){return""}else{return escape(A)}}function verifyAccountDetails(P){var N=0;var O=$("su_firstname").value;var E=$("su_surname").value;var L=$("su_email").value;var C=$("su_mobile").value;var F=$("su_phone").value;var I=$("su_address_1").value;var H=$("su_address_2").value;var G=$("su_suburb").value;var R=$("su_postcode").value;var D=$("su_state").value;var B=$("password").value;var K=$("pass_conf").value;var A=$("newsletter").value;var J=$("marketing").value;$("row_firstname").setStyle({backgroundColor:"#ecf3ff"});$("row_surname").setStyle({backgroundColor:"#ecf3ff"});$("row_email").setStyle({backgroundColor:"#ecf3ff"});$("row_password").setStyle({backgroundColor:"#ecf3ff"});$("row_pass_conf").setStyle({backgroundColor:"#ecf3ff"});if(O==""){$("row_firstname").setStyle({backgroundColor:"#FFD7D7"});showAccountError(-10);return false}if(E==""){$("row_surname").setStyle({backgroundColor:"#FFD7D7"});showAccountError(-10);return false}if(L==""){$("row_email").setStyle({backgroundColor:"#FFD7D7"});showAccountError(-10);return false}if(B==""){$("row_password").setStyle({backgroundColor:"#FFD7D7"});showAccountError(-10);return false}if(K==""){$("row_pass_conf").setStyle({backgroundColor:"#FFD7D7"});showAccountError(-10);return false}if(K!=B){$("row_pass_conf").setStyle({backgroundColor:"#FFD7D7"});showAccountError(-3);return false}if(N==0){$("row_firstname").setStyle({backgroundColor:"#ecf3ff"});$("row_surname").setStyle({backgroundColor:"#ecf3ff"});$("row_email").setStyle({backgroundColor:"#ecf3ff"});$("row_mobile").setStyle({backgroundColor:"#ecf3ff"});$("row_password").setStyle({backgroundColor:"#ecf3ff"});$("row_pass_conf").setStyle({backgroundColor:"#ecf3ff"});$("accountFormFields").hide();$("accountLoading").show();if(P=="signup"){var Q=site_url+"fetch/signup.php";var M="task=signup&";M+="firstname="+urlEncode(O)+"&surname="+urlEncode(E)+"&email="+urlEncode(L)+"&mobile="+urlEncode(C)+"&phone="+urlEncode(F);M+="&address_1="+urlEncode(I)+"&address_2="+urlEncode(H)+"&suburb="+urlEncode(G)+"&postcode="+urlEncode(R)+"&state="+urlEncode(D)+"&password="+urlEncode(B)+"&pass_conf="+urlEncode(K)+"&newsletter="+urlEncode(A)+"&marketing="+urlEncode(J);new Ajax.Request(Q,{method:"post",parameters:M,onComplete:function(T){var S=T.responseXML.documentElement;var U=S.getElementsByTagName("newuser")[0].firstChild.nodeValue;if(U<0){$("accountLoading").hide();$("accountFormFields").show();showAccountError(U);return false}else{$("accountLoading").hide();$("accountFormFields").hide();showActivationScreen("signup",U)}}})}else{if(P=="update"){var Q=site_url+"fetch/account_details.php";var M="task=update&";M+="firstname="+urlEncode(O)+"&surname="+urlEncode(E)+"&email="+urlEncode(L)+"&mobile="+urlEncode(C)+"&phone="+urlEncode(F);M+="&address_1="+urlEncode(I)+"&address_2="+urlEncode(H)+"&suburb="+urlEncode(G)+"&postcode="+urlEncode(R)+"&state="+urlEncode(D)+"&password="+urlEncode(B)+"&pass_conf="+urlEncode(K)+"&newsletter="+urlEncode(A)+"&marketing="+urlEncode(J);new Ajax.Request(Q,{method:"post",parameters:M,onComplete:function(V){var T=V.responseXML.documentElement;var U=T.getElementsByTagName("user")[0].firstChild.nodeValue;var W=T.getElementsByTagName("result")[0].firstChild.nodeValue;if(W<0){$("accountLoading").hide();$("accountFormFields").show();showAccountError(W);return false}else{if(W==2){$("accountLoading").hide();$("accountFormFields").hide();showActivationScreen("update",U)}else{var S="";S+='<div id="signin-top" class="overlaySubHeading">Account Updated!</div>';S+="<p>Your account has been updated - please continue browsing findmeahome.com.au.</p>";S+='<div style="text-align: center;"><input type="button" value="continue" class="inputButtonLong" onClick="hideOverlay();"></div>';$("accountLoading").hide();$("signUpHeader").update(S);manageLogin("check","update")}}}})}}return true}}function showAccountError(B){var A="An error occurred, please check the sign-up form.";if(B==-10){A="Please check the required fields."}else{if(B==-1){$("row_firstname").setStyle({backgroundColor:"#FFD7D7"});A="Please check the highlighted fields."}else{if(B==-2){$("row_surname").setStyle({backgroundColor:"#FFD7D7"});A="Please check the highlighted fields."}else{if(B==-3){$("row_password").setStyle({backgroundColor:"#FFD7D7"});$("row_pass_conf").setStyle({backgroundColor:"#FFD7D7"});A="Please check the passwords match."}else{if(B==-4){$("row_email").setStyle({backgroundColor:"#FFD7D7"});A="Please check you have entered a valid email address."}else{if(B==-5){$("row_mobile").setStyle({backgroundColor:"#FFD7D7"});A="Please check you have entered a valid mobile number."}else{if(B==-7){$("row_email").setStyle({backgroundColor:"#FFD7D7"});A="A user with this email address has already signed up, please check the email address or request a password reset."}}}}}}}$("accountError").update('<div class="errorRed">'+A+'</div><div class="clear"></div>')}function showActivationScreen(C,B){var A="";if(C=="signup"){A+='<div id="signin-top" class="overlaySubHeading">Congratulations!</div>';A+="<p>Thank you for joining us. Your membership will allow you to provide feedback on properties and participate in new developments we launch for this site. There are many in the pipeline and each is designed to make you more successful in the residential property market.</p>";A+='<p>The FindMeAhome.com.au is about providing all, an Australian "Fair Go" in the tradition of our great Australian spirit. Good luck!</p>';A+="<p>An activation code has been emailed to the email address you supplied, please enter the code in the box below or follow the instructions in the email.</p>"}else{if(C=="update"){A+='<div id="signin-top" class="overlaySubHeading">Account Activation</div>';A+="<p>As you have changed your email address you will need to revalidate it, an email has been sent with a new activation code - please follow the instructions within the email.</p>"}else{A+='<div id="signin-top" class="overlaySubHeading">Account Activation</div>';A+="<p>Please enter your email address and activation code below.</p>"}}A+='<img src="'+url_images+'transparent_1x1.gif" width="400" height="2" class="inline">';A+='<div id="activateFormFields" >';A+='<div id="activateError"></div>';A+='<form method="" action="" onSubmit="activateAccount(); return false;">';A+='<div class="formRow" id="row_act_email"><div class="formLabel">Email</div><div class="formInput"><input type="text" class="inputTextLong" name="act_email" id="act_email" value="'+B+'"></div></div>';A+='<div class="formRow" id="row_act_code"><div class="formLabel">Activation Code</div><div class="formInput"><input type="text" class="inputTextLong" name="act_code" id="act_code"> </div></div>';A+='<img src="'+url_images+'transparent_1x1.gif" width="400" height="4" class="inline">';A+='<div style="text-align: center;"><input type="submit" value="activate now" class="inputButtonLong"></div>';A+="</form>";A+="</div>";$("signUpHeader").show();$("signUpHeader").update(A)}function activateAccount(){email=$("act_email").value;code=$("act_code").value;if(email==""||code==""){$("activateError").update('<div class="errorRed">Please enter your email address and activation code.</div><div class="clear"></div><img src="'+url_images+'transparent_1x1.gif" width="400" height="10" class="inline"><div class="clear"></div>');return false}else{var A=site_url+"fetch/signup.php";var B="task=activate&email="+urlEncode(email)+"&code="+urlEncode(code);new Ajax.Request(A,{method:"post",parameters:B,onComplete:function(E){var D=E.responseXML.documentElement;var F=D.getElementsByTagName("success")[0].firstChild.nodeValue;if(F=="false"){errmsg='Account validation failed, please check the details and try again.  Misplaced the activation email?  <a href="#" onClick="resendActivationEmail();">Click here</a> to resend now.';$("activateError").update('<div class="errorRed">'+errmsg+'</div><div class="clear"></div><img src="'+url_images+'transparent_1x1.gif" width="400" height="10" class="inline"><div class="clear"></div>');return false}else{var C="";C+='<div class="overlaySubHeading">Account Activated!</div>';C+="<p>Congratulations, your account has been activated.</p>";if(in_frame){C+='<div style="text-align: center;"><input type="button" value="continue" class="inputButtonLong" onClick="showNewEstimateScreen();"></div>';$("signUpHeader").hide()}else{C+='<div style="text-align: center;"><input type="button" value="continue" class="inputButtonLong" onClick="hideOverlay();"></div>';$("signUpHeader").update(C)}manageLogin("check","activation")}}});return true}}function resendActivationEmail(){email=$("act_email").value;if(email){var A=site_url+"fetch/signup.php";var B="task=resend&email="+urlEncode(email);new Ajax.Request(A,{method:"post",parameters:B,onComplete:function(D){var C=D.responseXML.documentElement;var E=C.getElementsByTagName("success")[0].firstChild.nodeValue;email=$("act_email").value;alert("Activation code has been resent to: "+email)}})}else{alert("Please enter an email address below and click again.")}}function forgotPassword(){email=$("pass_email").value;if(email==""){$("passwordError").update('<div class="errorRed">Please enter your email address.</div><div class="clear"></div><img src="'+url_images+'transparent_1x1.gif" width="400" height="10" class="inline"><div class="clear"></div>');return false}else{var A=site_url+"fetch/signup.php";var B="task=password&email="+urlEncode(email);new Ajax.Request(A,{method:"post",parameters:B,onComplete:function(E){var D=E.responseXML.documentElement;var F=D.getElementsByTagName("success")[0].firstChild.nodeValue;if(F=="0"){errmsg="This email address is not registered, please try again.";$("passwordError").update('<div class="errorRed">'+errmsg+'</div><div class="clear"></div><img src="'+url_images+'transparent_1x1.gif" width="400" height="10" class="inline"><div class="clear"></div>');return false}else{var C="";C+='<div class="overlaySubHeading">Password Sent</div>';C+="<p>Your current password has been successfully sent to your email address.</p>";if(in_frame==1){C+='<div style="text-align: center;"><input type="button" value="continue" class="inputButtonLong" onClick="$(\'accountLoading\').hide();$(\'signUpHeader\').hide();$(\'accountFormFields\').show();"></div>'}else{C+='<div style="text-align: center;"><input type="button" value="continue" class="inputButtonLong" onClick="hideOverlay();"></div>'}$("signUpHeader").update(C)}}});return true}}function loadAccountDetails(){var A=site_url+"fetch/account_details.php";var B="task=get";new Ajax.Request(A,{method:"POST",parameters:B,onComplete:manageAccountDetails})}function manageAccountDetails(K){var O=K.responseXML.documentElement;var R=O.getElementsByTagName("logged_in")[0].firstChild.nodeValue;if(R=="true"){var C=O.getElementsByTagName("user")[0];var Q=C.getAttribute("fn");var F=C.getAttribute("sn");var N=C.getAttribute("e");var D=C.getAttribute("m");var G=C.getAttribute("p");var J=C.getAttribute("a1");var I=C.getAttribute("a2");var H=C.getAttribute("sub");var S=C.getAttribute("pc");var E=C.getAttribute("st");var B=C.getAttribute("pwd");var M=C.getAttribute("pwd");var A=C.getAttribute("n");var L=C.getAttribute("mrk");$("su_firstname").value=Q;$("su_surname").value=F;$("su_email").value=N;$("su_mobile").value=D;$("su_phone").value=G;$("su_address_1").value=J;$("su_address_2").value=I;$("su_suburb").value=H;$("su_postcode").value=S;$("su_state").value=E;$("password").value=B;$("pass_conf").value=B;$("newsletter").checked=(A==1)?true:false;$("marketing").checked=(L==1)?true:false;if($("menuSignUp")){$("menuSignUp").hide()}if($("menuAccount")){$("menuAccount").show()}if($("mainForgetPass")){$("mainForgetPass").hide()}}else{if(R=="failed"){var P='<div class="error">You must be logged in to manage your account.</div>';if($("menuSignUp")){$("menuSignUp").update(P)}}}$("accountLoading").hide();$("accountFormFields").show()}function manageSMSValidation(D){var C=D+"-validate-code";var A=site_url+"fetch/signup.php";var B="task=validate-mobile-code&code="+$(C).value;new Ajax.Request(A,{method:"post",parameters:B,onLoading:$(D+"-validate-code-error").update('<span class="loading">...loading...</span>'),onComplete:function(H){var G="An incorrect code was entered, please try again.";if(H!=null){var F=H.responseXML.documentElement;var E=F.getElementsByTagName("result")[0].firstChild.nodeValue;if(E=="success"){if(D=="pridvalue"){userArr.mobver="true";chooseValuePrid($("holding_prid").value,$("holding_lat").value,$("holding_lon").value,$("holding_address").value)}else{userArr.mobver="true";showReportDownloadLink($("hidden_prid").value,"Thanks for validating your mobile phone number")}}else{if(E=="fail"){G="The code you have entered is not valid please try again."}}}$(D+"-validate-code-error").update(G)}})}function manageSMSSend(D){var C=D+"-validate-mobile";var A=site_url+"fetch/signup.php";var B="task=validate-mobile&mobile="+$(C).value;new Ajax.Request(A,{method:"post",parameters:B,onLoading:$(D+"-validate-error").update('<span class="loading">...loading...</span>'),onComplete:function(I){var G="An error occurred, please contact Residex for assistance or try again later.";if(I!=null){var F=I.responseXML.documentElement;var E=F.getElementsByTagName("result")[0].firstChild.nodeValue;var H=F.getElementsByTagName("mobile")[0].firstChild.nodeValue;userArr.mobile=H;if(E=="success"){$(D+"-validate-button").disabled=true;$(D+"-validate-mobile").disabled=true;G="The SMS has been successfully sent to "+userArr.mobile+".";$(D+"-validate-code-msg").show()}else{if(E=="not-mobile"){G="The mobile number you have entered is not valid, please check it and try again (Australian mobile numbers only)."}else{if(E=="sms-no"){$(D+"-validate-button").disabled=true;$(D+"-validate-mobile").disabled=true;G="No SMS has been sent as you have already requested an SMS be sent multiple times, please enter the code which has been sent to you previously or contact Residex for assistance.";$(D+"-validate-code-msg").show()}else{if(E=="sms-fail"){G="SMS sending has failed, please try again later.";$(D+"-validate-code-msg").show()}}}}}$(D+"-validate-error").update(G)}})}function manageLogin(C,G){var F="";var E="";var D="";var B="";var A=site_url+"fetch/fmah_user.php";switch(G){case"blog":switch(C){case"login":var E="task="+C+"&email="+$("loginEmail").value+"&password="+$("loginPassword").value;new Ajax.Request(A,{method:"post",parameters:E,onLoading:$("blogLogin").update('<span class="loading">...loading...</span>'),onComplete:showBlogLogin});break;default:showBlogLogin(null);break}break;case"report":switch(C){case"login-sms":var E="task=login&email="+$("loginEmail-sms").value+"&password="+$("loginPassword-sms").value;new Ajax.Request(A,{method:"post",parameters:E,onLoading:function(){if($("reportLogin")){$("reportLogin").update('<span class="loading">...loading...</span>')}$("smsLogin").update('<span class="loading">...loading...</span>')},onComplete:showReportLogin});break;case"login-download":var E="task=login&email="+$("loginEmail-download").value+"&password="+$("loginPassword-download").value;new Ajax.Request(A,{method:"post",parameters:E,onLoading:function(){if($("reportLogin")){$("reportLogin").update('<span class="loading">...loading...</span>')}$("smsLogin").update('<span class="loading">...loading...</span>')},onComplete:showReportLogin});break;default:showReportLogin(null);break}break;case"pridvalue":switch(C){case"login":var E="task=login&email="+$("loginEmail-valueprid").value+"&password="+$("loginPassword-valueprid").value;new Ajax.Request(A,{method:"post",parameters:E,onLoading:function(){$("pridvalueLogin").update('<span class="loading">...loading...</span>')},onComplete:showPridValueLogin});break;default:showPridValueLogin(null);break}break;case"valuefp":switch(C){case"login":var E="task=login&email="+$("loginEmail-valuefp").value+"&password="+$("loginPassword-valuefp").value;new Ajax.Request(A,{method:"post",parameters:E,onLoading:function(){$("valuefp").update('<span class="loading-plain">...loading...</span>')},onComplete:showValueFPLogin});break;default:showValueFPLogin(null);break}break;case"loginoverlay":switch(C){case"login":var E="task=login&email="+$("loginEmail-valuefp").value+"&password="+$("loginPassword-valuefp").value;new Ajax.Request(A,{method:"post",parameters:E,onLoading:function(){$("valuefp").update('<span class="loading-plain">...loading...</span>')},onComplete:showOverlayLogin});break;default:showOverlayLogin(null);break}break;case"update":switch(C){case"check":var E="task="+C;new Ajax.Request(A,{method:"post",parameters:E,onComplete:updateUser});break}break;default:switch(C){case"check":var E="task="+C;new Ajax.Request(A,{method:"post",parameters:E,onLoading:updateMenuLogin('<span class="loading">...loading...</span>'),onComplete:showLogin});break;case"login":var E="task="+C+"&email="+$("loginEmail").value+"&password="+$("loginPassword").value;new Ajax.Request(A,{method:"post",parameters:E,onLoading:updateMenuLogin('<span class="loading">...loading...</span>'),onComplete:showLogin});break;case"logout":var E="task="+C;new Ajax.Request(A,{method:"post",parameters:E,onLoading:updateMenuLogin('<span class="loading">...loading...</span>'),onComplete:showLogout});break;default:new Ajax.Request(A,{method:"post",parameters:E,onLoading:updateMenuLogin('<span class="loading">...loading...</span>'),onComplete:showLogin});break}break}}function updateMenuLogin(A){if($("topMenuLogin")){$("topMenuLogin").update(A)}}function updateUser(C){if(C!=null){var A=C.responseXML.documentElement;var B=A.getElementsByTagName("logged_in")[0].firstChild.nodeValue;if(B=="true"){var D=A.getElementsByTagName("user")[0];getUserArray(D);authenticated=true}else{unsetUserArray()}}}function showLogout(A){unsetUserArray();showLogin(A);if($("menuAccount")){$("menuAccount").hide()}if($("menuSignUp")){$("menuSignUp").show()}if($("mainForgetPass")){$("mainForgetPass").hide()}if($("valueLeftContent_PrevEst_Estimate")){$("valueLeftContent_PrevEst_Estimate").update()}}function unsetUserArray(){authenticated=false;userArr.title="";userArr.firstname="";userArr.surname="";userArr.email="";userArr.mobile="";userArr.mobver=""}function showBlogLogin(B){var A='<b>You must be logged in have your say, please login now.</b><br><br><form class="inline" onSubmit="manageLogin( \'login\', \'blog\' );return false;">email address: <input type="text" id="loginEmail" class="inputTextLong"><br><img src="'+url_images+'transparent_1x1.gif" height="6" width="451">password: <input type="password" id="loginPassword" class="inputTextNormal">&nbsp;&nbsp;&nbsp;<input type="submit" value="sign in" class="inputButton"></form><br><img src="'+url_images+'transparent_1x1.gif" height="6" width="451">';if(B!=null){var F=B.responseXML.documentElement;var C=F.getElementsByTagName("logged_in")[0].firstChild.nodeValue;if(C=="true"){var H=F.getElementsByTagName("user")[0];getUserArray(H);authenticated=true;var I="Welcome, "+userArr.title+" "+userArr.firstname+" "+userArr.surname+", thanks for logging in.";showMakeComment($("hidden_prid").value,I,false);var G=(userArr.aa!="")?' &nbsp; <input type="button" value="agency admin" onClick="openPopup(\''+userArr.aa+"',  'width=1010,height=650,resizable=1,scrollbars=1' );\" class=\"inputButtonHighlight\">":"";var E="Welcome, "+userArr.title+" "+userArr.firstname+" "+userArr.surname+'.&nbsp;&nbsp; <input type="button" value="logout" onClick="manageLogin(\'logout\', \'topmenu\' );" class="inputButton">'+G;updateMenuLogin(E);if($("menuSignUp")){$("menuSignUp").hide()}if($("menuAccount")){$("menuAccount").show()}if($("mainForgetPass")){$("mainForgetPass").hide()}return }else{var D=F.getElementsByTagName("failed_reason")[0].firstChild.nodeValue;if(D=="not activated"){login_email=F.getElementsByTagName("login_email")[0].firstChild.nodeValue;hideOverlay();showOverlay("notactivated");return }else{if(D=="activation locked"){login_email=F.getElementsByTagName("login_email")[0].firstChild.nodeValue;hideOverlay();showOverlay("accountactivationlocked");return }else{A+='<div class="loginMessage">login failed!</div>'}}}}$("blogLogin").update(A)}function showLogin(F){var C='<form class="inline" onSubmit="manageLogin( \'login\', \'topmenu\' );return false;">email address: <input type="text" id="loginEmail" class="inputTextLong">&nbsp;&nbsp;&nbsp;password: <input type="password" id="loginPassword" class="inputTextNormal">&nbsp;&nbsp;&nbsp;<input type="submit" value="sign in" class="inputButton"></form>';var B=F.responseXML.documentElement;var E=B.getElementsByTagName("logged_in")[0].firstChild.nodeValue;if(E=="true"){var G=B.getElementsByTagName("user")[0];getUserArray(G);authenticated=true;var A=(userArr.aa!="")?' &nbsp; <input type="button" value="agency admin" onClick="openPopup(\''+userArr.aa+"', 'width=1010,height=650,resizable=1,scrollbars=1');\" class=\"inputButtonHighlight\">":"";C="Welcome, "+userArr.title+" "+userArr.firstname+" "+userArr.surname+'.&nbsp;&nbsp; <input type="button" value="logout" onClick="manageLogin(\'logout\', \'topmenu\' );" class="inputButton">'+A;if($("menuSignUp")){$("menuSignUp").hide()}if($("menuAccount")){$("menuAccount").show()}if($("mainForgetPass")){$("mainForgetPass").hide()}loadPreviousEstimations()}else{if(E=="failed"){var D=B.getElementsByTagName("failed_reason")[0].firstChild.nodeValue;if(D=="not activated"){login_email=B.getElementsByTagName("login_email")[0].firstChild.nodeValue;showOverlay("notactivated");C+='<div class="loginMessage">please activate</div>'}else{if(D=="activation locked"){login_email=B.getElementsByTagName("login_email")[0].firstChild.nodeValue;showOverlay("accountactivationlocked");C+='<div class="loginMessage">activation failed</div>'}else{C+='<div class="loginMessage">login failed!</div>'}}if($("menuSignUp")){$("menuSignUp").show()}if($("menuAccount")){$("menuAccount").hide()}if($("mainForgetPass")){$("mainForgetPass").show()}}else{if(E=="loggedout"){C+='<div class="loginMessage">logged out</div>';if($("menuSignUp")){$("menuSignUp").show()}if($("menuAccount")){$("menuAccount").hide()}if($("mainForgetPass")){$("mainForgetPass").show()}loadPreviousEstimations()}}}updateMenuLogin(C)}function requestActivationUnlock(){var A=site_url+"fetch/support_email.php";var B="task=activationunlock&email="+login_email;new Ajax.Request(A,{method:"POST",parameters:B,onLoading:$("unlockaccount").update('<div style="text-align: center;"><span class="loading">...loading...</span></div>'),onComplete:function(E){var D="";if(E!=null){var C=E.responseXML.documentElement;var F=C.getElementsByTagName("success")[0].firstChild.nodeValue;if(F==1){D+='<div style="text-align: center;" class="error">Thanks - your request has been submitted, we will respond as soon as possible.</div><div style="text-align: center;"><input type="button" value="close" class="inputButton" onClick="hideOverlay();"></div>'}}$("unlockaccount").update(D)}})}function manageSuburbQuery(B,A){if(A.id=="NOTFOUND"){$("sale_suburb_id").value="";$("findbtn").src=url_images+"button_find_inactive.png";$("sale_suburb_query").value=""}else{if(A.id=="TOOMANY"){$("sale_suburb_id").value="";$("findbtn").src=url_images+"button_find_inactive.png";$("sale_suburb_query").value=""}else{$("sale_suburb_id").value=A.id;$("findbtn").src=url_images+"button_find.png"}}}function resetSuburbQuery(B,A){if(!isEnterKey(B)){$("findbtn").src=url_images+"button_find_inactive.png";$("sale_suburb_id").value=""}return A}function validSuburb(){if($("sale_suburb_id").value==""){$("sale_suburb_query_auto_complete").update('<ul><li class="selected" id="CHOOSE_A_SUBURB">...please choose a suburb...</li></ul>');$("sale_suburb_query_auto_complete").show();$("sale_suburb_query").focus();return false}else{return true}}function clearValue(){if($("sale_suburb_query").value=="enter your suburb here"){$("sale_suburb_query").value=""}}function manageSaleSearch(){if(validSuburb()){var J="SALE";var B=$("sale_suburb_id").value;var H=$("sale_from").value;var I=$("sale_to").value;var A=$("sale_dwelling").value;var F=$("sale_beds").value;var C=$("sale_baths").value;var E=$("sale_garages").value;var D=$("surrounding").checked;var G=$("partial").checked;if(G==true&&partial_popup==false){showAlertMessage('<b>Please Note:</b> some of the properties listed in the search results are marked "Transparency Difficult" in our Price Estimate display.  These properties are marked in this way because we have been asked to remove the price information and/or have not been given alternative or sufficient information from which to generate a price. These properties appear at the bottom of the search results list.<br><br>For these properties we highly recommend you obtain a detailed pricing report from us for the property. To do this click on the words "report" inour listing for this property.<br>If you are the vendor or agent and want pricing information added to your property, please contact us by email at fmah@residex.com.au');partial_popup=true}setPageModeToSearching();manageSaleResults(B,H,I,A,F,C,E,D,G);manageDemographics(B);manageLocality(B);manageAds(B)}return }function mySearchFormInitialiser(A,B){if(B!=null){if(typeof B.style=="object"&&(!B.style.position||B.style.position=="absolute")){B.style.position="absolute";Position.clone(A,B,{setHeight:false,offsetTop:A.offsetHeight})}}}function setPageModeToSearching(){$("drawers").update("");var A=heightResultsStartAt-1;if($("boxMainResults")){$("boxMainResults").hide()}$("boxMainCover").show();$("boxMainCover").setStyle({height:A});$("boxMainCover").update('<img src="'+url_images+'transparent_1x1.gif" height="'+A+'" width="1" class="floatLeft"><div class="loader"><br><img src="'+url_images+'loader.gif" align="center" style="margin: auto;"><br>...finding your home...<br></div>');hideAds();$("boxDemographics").hide();$("boxLocality").hide();$("boxMap").hide()}function manageSaleResults(B,I,J,A,G,D,F,E,H){var K=site_url+"fetch/sales_query.php";var C="suburb_id="+B+"&from="+I+"&to="+J+"&dwelling="+A+"&beds="+G+"&baths="+D+"&garages="+F+"&surrounding="+E+"&partial="+H;new Ajax.Request(K,{method:"POST",parameters:C,onComplete:manageResultsResponse})}function manageResultsResponse(B){var A=B.responseXML.documentElement;mapInitialised=false;markersInitialised=false;activeMarkerId=0;showSearchPanes();mapInitialised=initMap(A);manageResultsList(A);manageResultsMap()}function manageResultsList(A){properties.srch_suburb=A.getElementsByTagName("suburb")[0].firstChild.nodeValue;properties.srch_postcode=A.getElementsByTagName("postcode")[0].firstChild.nodeValue;properties.srch_state=A.getElementsByTagName("state")[0].firstChild.nodeValue;var B=A.getElementsByTagName("p");properties.loadPropertyData(B);properties.regenerateList();printProperties(1);if(properties.total==0){$("drawers").update('<div class="boxLoading">No properties returned for this search.</div>')}}function printProperties(D){var A="";propsDisplayed=calculatePropDisplay();var B=((D+propsDisplayed)<properties.total)?(D+propsDisplayed):properties.total;var C=0;for(key in properties.propertiesData){C++;if(C<D){continue}else{if(C<=B){A+=createSearchPropertyBox(properties.propertiesData[key],C)}else{C--;break}}}A+='<div class="propertyLastBit"><img src="'+url_images+'background_propertyBaseLast.png" class="floatLeft"></div>';propFirst=D;propLast=C;printPagination();if(C>0){$("drawers").update(A);resultsAccordion=new accordion("drawers",{classNames:{toggle:"propertyHandle",toggleActive:"propertyHandleOpen",content:"propertyContent"},onEvent:"click",onActivate:function(E){var G=parseInt(E.id.replace("prid",""));var F=properties.getProperty(G);if(F.type=="c"){showMapPropertyFeatureOnly(G,0,1,0)}else{hideMarkerHTML()}}});resultsAccordion.activate($$("#drawers .propertyHandle")[0])}}function printPagination(){var C="";var F="";var B="";var G=propFirst-1;var D=((G-propsDisplayed)<0)?1:(G-propsDisplayed);if(G==0){F='<img src="'+url_images+'icon_paginationLeftFade.png" align="right" border="0">'}else{F='<a href="#" onClick="printProperties('+D+'); return false;"><img src="'+url_images+'icon_paginationLeft.png" align="right" border="0"></a>'}if(propLast==properties.total){B='<img src="'+url_images+'icon_paginationRightFade.png" align="left" border="0">'}else{var G=propLast+1;B='<a href="#" onClick="printProperties('+G+'); return false;"><img src="'+url_images+'icon_paginationRight.png" align="left" border="0"></a>'}var A=(properties.total>0)?propFirst:0;var E=propLast;C+='    <div class="boxResultsPaginationButton">'+F+"</div>";C+='    <div class="boxResultsPaginationText">results '+A+" to "+E+" of "+properties.total+"</div>";C+='    <div class="boxResultsPaginationButton">'+B+"</div>";$("boxResultsPagination").update(C)}function calculatePropDisplay(){var C=152;var D=57;var B=$("stretchResults").height-18-9;var A=Math.floor((B-152)/D);return A}function createSearchPropertyBox(D,A){var B="";resiscore=(D.rdx_score<0)?0:D.rdx_score;resiscore=(resiscore>10)?10:resiscore;resiscore=(resiscore=="?")?0:resiscore;var C=(D.type=="c")?'onmouseover="showMapPropertyFeatureOnly('+D.prid+", 0, 1, 0, 'draw_handle_"+D.prid+"' )\"":"";B+='<div class="drawer" id="draw_'+D.prid+'" '+C+">";B+='	   <div class="propertyHandle" id="draw_handle_'+D.prid+'">';B+='        <div class="propertyRowTop">';B+='            <div class="propertyRowTopNumber">'+A+"</div>";B+='            <div class="propertyRowTopAddress">&nbsp;'+D.address+"</div>";B+="        </div>";B+='        <div class="propertyRowHouses"><img src="'+url_images+"background_propertyHouses_"+resiscore+'.png"></div>';B+="    </div>";B+='	   <div class="propertyContent" id="prid'+D.prid+'">';B+=generateSearchPanelContent(D);B+="    </div>";B+="</div>";return B}function createMapPropertyBox(B){var A="";A+='	       <div class="propertyMapBoxAddress">';A+='            <div class="propertyRowTopAddressMap">';A+="                "+B.address;A+="            </div>";A+='            <div class="propertyRowTopClose" ><a href="#" onClick="hideMarkerHTML(); return false;" class="propertyCloseLink">x</a></div>';A+="        </div>";A+='    <div class="clear"></div>';A+='    <div class="mapBackgroundShadow">';A+='	       <div class="propertyMapBoxSrchPanel">';A+=generateSearchPanelContent(B);A+="        </div>";A+="    </div>";return A}function createMapMultiPropertyBox(B){if(!properties.isMultipleListings(B)){return false}var A="";var C=0;for(key in B){if(key=="listCount"){continue}C++;var D=B[key];A+='	    <div class="multiPropertyMapBoxAddress" id="multiPropertyMapBoxAddress_'+C+'">';A+='            <div class="multiPropertyRowTopAddressMap">';A+="                "+D.address;A+="            </div>";A+="     </div>";A+='	   <div class="multiPropertyMapBoxSrchPanel">';A+=generateSearchPanelContent(D);A+="    </div>"}return A}function scrollMultiList(E,F,A){var C=1;var B=(F=="down"?parseInt(multiPropertyMapBoxAddress_count)+parseInt(C):parseInt(multiPropertyMapBoxAddress_count)-parseInt(C));if(!$("multiPropertyMapBoxAddress_"+B)){if(F=="up"){B=1}else{return }}multiPropertyMapBoxAddress_count=B;var G=$("multiPropertyMapBoxAddress_"+multiPropertyMapBoxAddress_count);var D=$(E);scrollTo(D,G);if(multiPropertyMapBoxAddress_count==1){$(E+"_up").className="disabledUp"}else{$(E+"_up").className="up"}if(multiPropertyMapBoxAddress_count==A){$(E+"_down").className="disabledDown"}else{$(E+"_down").className="down"}}function scrollTo(A,B){var C=B.offsetTop-A.scrollTop;new Effect.Scroll(A,{y:C,duration:0.2})}function generateSearchPanelContent(H){if(H.agt_report==1){freeReport=1}else{freeReport=0}var C=(H.rdx_score>10)?"10+":H.rdx_score;var D=(H.agt_score>10)?"10+":H.agt_score;var G=(H.vst_score>10)?"10+":H.vst_score;var B="";B+='	   <div class="propertyContentMain">';B+='        <img src="'+url_images+'transparent_1x1.gif" width="6" height="70" class="imgFloatLeft">';B+='	       <div class="propertyContentCol1">';B+='            <img src="'+url_images+'transparent_1x1.gif" width="56" height="9">';B+='            <div class="propertyContentRow">residex</div>';B+='            <div class="propertyContentRow">agent</div>';B+='            <div class="propertyContentRowBase">visitors</div>';B+="        </div>";B+='        <div class="propertyContentCol2">';B+='            <img src="'+url_images+'transparent_1x1.gif" width="52" height="9">';B+='            <div class="propertyContentRow">'+C+"/10</div>";B+='            <div class="propertyContentRow">'+D+"/10</div>";B+='            <div class="propertyContentRowBase" id="'+H.prid+'_score">'+G+"/10</div>";B+="        </div>";B+='        <div class="propertyContentCol3">';B+='            <img src="'+url_images+'transparent_1x1.gif" width="143" height="9">';if(H.agt_score!="?"||H.agt_price!=""){var A=H.agt_price}else{var A="have your say"}var F=(link_id!="residex"&&purchase_productid=="FMAH-RPR-WHITE")?"FMAH-RPR-WHITE":"FMAH-RPR-RESIDEX";if(H.type=="c"){B+='            <div class="propertyContentRow"><a onClick="purchaseSearchReport( \''+F+"', "+H.prid+", '"+H.address+"', '"+H.dwelling+"', '"+H.latitude+"', '"+H.longitude+'\' );return false;" class="linkProperty" title="Buy Residex Report" href="#" >'+H.rdx_price+"</a></div>";B+='            <div class="propertyContentRow"><a href="#" class="linkProperty" onClick="showBlog('+H.prid+'); return false;">'+A+"</a></div>";B+='            <div class="propertyContentRowBase"><a href="#" class="linkProperty" onClick="showBlog('+H.prid+'); return false;">have your say</a></div>'}else{B+='            <div class="propertyContentRow">Transparency Difficult</div>';B+='            <div class="propertyContentRow">&nbsp;</div>';B+='            <div class="propertyContentRowBase">&nbsp;</div>'}B+="        </div>";B+='        <div class="propertyContentCol4">';if(H.type=="c"){if(H.agt_report==1){var E=H.agt_report_url;B+='            <img border="0" src="'+url_images+'icon_report_consumer_off.gif"  class="imgFloatLeft"><a href="#" onClick="purchaseSearchReport( \'FMAH-RPR-RESIDEX\', '+H.prid+", '"+H.address+"', '"+H.dwelling+"', '"+H.latitude+"', '"+H.longitude+'\'  );return false;" title="Free Report!"><img border="0" src="'+url_images+'icon_report_agent_on.gif"  class="imgFloatLeft"></a>'}else{B+='            <a href="#" onClick="purchaseSearchReport( \''+F+"', "+H.prid+", '"+H.address+"', '"+H.dwelling+"', '"+H.latitude+"', '"+H.longitude+'\'  );return false;" title="Property Report!"><img border="0" src="'+url_images+'icon_report_consumer_on.gif"  class="imgFloatLeft"></a><img border="0" src="'+url_images+'icon_report_agent_off.gif"  class="imgFloatLeft">'}}else{B+='            <img border="0" src="'+url_images+'icon_report_consumer_off.gif"  class="imgFloatLeft"><img border="0" src="'+url_images+'icon_report_agent_off.gif"  class="imgFloatLeft">'}B+="        </div>";B+="     </div>";B+='        <div class="propertyRowBase">';B+='<img src="'+url_images+'transparent_1x1.gif" width="6" height="20" class="imgFloatLeft">';B+='<div class="propertyRowBaseLink">';B+='<img src="'+url_images+'transparent_1x1.gif" height="20" width="32" class="imgFloatLeft"><a href="'+H.site_url+'" target="_new" class="linkProperty">'+H.site_name+"</a>";B+="            </div>";B+='            <div class="propertyRowBaseStats">';B+='                <div class="propertyRowBaseStatsBed">&nbsp;'+H.beds+"&nbsp;</div>";B+='                <div class="propertyRowBaseStatsBath">&nbsp;'+H.baths+"&nbsp;</div>";B+='                <div class="propertyRowBaseStatsGarage">&nbsp;'+H.cars+"&nbsp;</div>";B+="            </div>";B+="        </div>";return B}function purchaseSearchReport(C,E,H,A,F,B){if(secure_site==1){purchase_productid=C;purchase_prid=E;purchase_address=H;purchase_lat=F;purchase_lon=B;purchase_dwelling=A;showReportPurchaseAddressEntry();showOverlay("purchase");return }else{var K="";var I="";var J="";if(authenticated){I+="&cust_title="+urlEncode(userArr.title)+"&cust_firstname="+urlEncode(userArr.firstname)+"&cust_surname="+urlEncode(userArr.surname)+"&cust_email="+urlEncode(userArr.email)+"&cust_phone="+urlEncode(userArr.phone)+"&cust_mobile="+urlEncode(userArr.mobile);I+="&cust_unitno="+urlEncode(userArr.unitno)+"&cust_streetno="+urlEncode(userArr.streetno)+"&cust_street="+urlEncode(userArr.street)+"&cust_streettype="+urlEncode(userArr.streettype);I+="&cust_suburb="+urlEncode(userArr.suburb)+"&cust_postcode="+urlEncode(userArr.postcode)+"&cust_state="+urlEncode(userArr.state)}J+="product_id="+urlEncode(C)+"&prid="+urlEncode(E)+"&link_id="+urlEncode(link_id);var D="action=purchase&"+J+I;var G=secure_site_url+"search.php?"+D;window.location=G;return }}function createMapAgentSayBox(B){var A="";if(B.agt_say==1){A+='            <div class="featureProp">';A+='                <div class="featureImage"><img src="'+B.prop_pic1+'" style="display: block; margin: auto;"></div>';A+='                <div class="featureDesc">'+B.agt_summary+"</div>";A+='                <div class="featureDesc"><img src="'+url_images+'background_mapOverlayLine.png" width="286" height="1"  class="imgFloatLeft"></div>';A+='                <img src="'+url_images+'transparent_1x1.gif" width="288" height="2"  class="imgFloatLeft">';A+='                <div class="featureBase">';A+='                    <div class="featureBaseText">';A+="                        "+B.agt_name+"<br>";A+="                        "+B.agt_mobile+"<br>";A+='                        <a class="agentEmail" href="#" onClick="contactAgent( \''+B.prid+"' );\">Email the Agent</a>";A+="                    </div>";A+='                    <div class="featureBaseLogo">';A+='                        <img height="40" src="'+B.agt_logo+'">';A+="                    </div>";A+="                </div>";A+="            </div>"}return A}function contactAgent(G){var C=(userArr.firstname)?userArr.firstname+" "+userArr.surname:"";var A=(userArr.email)?userArr.email:"";var E=(userArr.mobile)?userArr.mobile:"";var B="";B+='<div id="accountForm">';B+="    <p>Enter your contact details below and a brief message for the agent.</p>";B+='    <form method="post" onSubmit="verifyContactAgent();return false;">';B+='    <input type="hidden" name="ca_prid" id="ca_prid" value="'+G+'">';B+='    <div id="accountError"></div>';B+='    <div style="height: 2pxl; font-size: 1px;"><img src="'+url_images+'transparent_1x1.gif" width="500" height="2" class="inline"></div>';B+='    <div class="formRow" id="row_name"><div class="formLabel">Name*</div><div class="formInput"><input type="text" class="inputTextLong" name="ca_name" id="ca_name" value="'+C+'"> </div></div>';B+='    <div class="formRow" id="row_email"><div class="formLabel">Email*</div><div class="formInput"><input type="text" class="inputTextLong" name="ca_email" id="ca_email" value="'+A+'"> </div></div>';B+='    <div class="formRow" id="row_phone"><div class="formLabel">Phone</div><div class="formInput"><input type="text" class="inputTextLong" name="ca_phone" id="ca_phone" value="'+E+'"> </div></div>';B+='    <div id="row_msg"><div class="formLabel">Message</div><div style="float: left;"><textarea type="text" rows="10" class="inputTextarea" name="ca_msg" id="ca_msg"></textarea></div></div>';B+='    <div class="formRow" id="row_submit"><div class="formLabel">&nbsp;</div><div class="formInput"><input type="submit" class="inputButton" value="send"></div></div>';B+="    </form>";B+="</div>";B+='<div id="accountLoading" style="text-align: center;display: none;">';B+="    <br>";B+='    <img src="'+url_images+'loader.gif" align="center" style="margin: auto;"><br>...please wait...<br></div>';B+="</div>";var F=properties.getProperty(G);var D=makeOverlaySubhead(F);showOverlayHTML("Contact Agent",D,B)}function verifyContactAgent(){var D=0;var H=$("ca_prid").value;var G=$("ca_name").value;var F=$("ca_email").value;var C=$("ca_phone").value;var B=$("ca_msg").value;if(G==""){$("row_name").setStyle({backgroundColor:"#FFD7D7"});showContactAgentError(-10);return false}if(F==""){$("row_email").setStyle({backgroundColor:"#FFD7D7"});showContactAgentError(-10);return false}if(D==0){$("row_name").setStyle({backgroundColor:"#FFFFFF"});$("row_email").setStyle({backgroundColor:"#FFFFFF"});$("accountForm").hide();$("accountLoading").show();var A=site_url+"fetch/contact_agent.php";var E="";E+="prid="+urlEncode(H)+"&name="+urlEncode(G)+"&email="+urlEncode(F)+"&phone="+urlEncode(C)+"&msg="+urlEncode(B);new Ajax.Request(A,{method:"post",parameters:E,onComplete:function(J){var I=J.responseXML.documentElement;var K=I.getElementsByTagName("success")[0].firstChild.nodeValue;if(K<0){$("accountLoading").hide();$("accountForm").show();showContactAgentError(K);return false}else{$("accountForm").update('<p>Your message has been sent to the agent - they should contact you shortly.</p><p style="margin: auto;text-align: center;"><input type=button value="close" class="inputButton" onClick="hideOverlay();"></p>');$("accountForm").show();$("accountLoading").hide()}}});return true}}function showContactAgentError(B){var A="An error occurred, please check the contact form.";if(B==-10){A="Please check the required fields."}$("accountError").update('<div class="error">'+A+'</div><div class="clear"></div>')}function initMap(I){$("boxMap").show();if(I.getElementsByTagName("lon_min")[0].firstChild!=null){var J=I.getElementsByTagName("lon_min")[0].firstChild.nodeValue;var E=I.getElementsByTagName("lon_mid")[0].firstChild.nodeValue;var C=I.getElementsByTagName("lon_max")[0].firstChild.nodeValue;var H=I.getElementsByTagName("lat_min")[0].firstChild.nodeValue;var D=I.getElementsByTagName("lat_mid")[0].firstChild.nodeValue;var B=I.getElementsByTagName("lat_max")[0].firstChild.nodeValue;if(GBrowserIsCompatible()){map=new GMap2($("boxMapContent"));map.addControl(new GMapTypeControl());map.addControl(new GLargeMapControl());tooltip=document.createElement("div");document.getElementById("boxMapContent").appendChild(tooltip);tooltip.style.visibility="hidden";var L=new GLatLng(H,J);var F=new GLatLng(B,C);var A=new GLatLngBounds(L,F);var G=map.getBoundsZoomLevel(A);var K=new GLatLng(D,E);if(G>15){G=15}map.setCenter(K,G);map.checkResize();map.setMapType(G_HYBRID_MAP);GEvent.addListener(map,"zoomend",function(){properties.regenerateList();manageResultsMap()});return true}else{return false}}else{showBlankMap();return true}}function manageResultsMap(){if(mapInitialised===true){map.clearOverlays();var A;for(key in properties.propertiesList){A=createMarker(properties.propertiesList[key],key);map.addOverlay(A)}markersInitialised=true}}function showBlankMap(){map=new GMap2($("boxMapContent"));map.addControl(new GMapTypeControl());map.addControl(new GLargeMapControl());map.setCenter(new GLatLng(-25.878994,132.93457),4)}function manageDemographics(B){var A="";A+='<img src="'+url_images+'transparent_1x1.gif" width="100%" height="3">';A+='<div class="tabSubContainer" id="boxAges">';A+='   <table cellspacing="0" cellpadding="0" border="0" class="tabSubHeader">';A+='        <tr width="100%"><td><img border="0" src="'+url_images+'background_tabSubCnrEdgeActive.png" class="floatLeft"></td><td class="tabSubCentralActive">Ages</td><td><img src="'+url_images+'background_tabSubCnrActiveNot.png" class="floatLeft"></td><td class="tabSubCentral"><a class="tabSubLink" onClick="$(\'boxAges\').hide();$(\'boxDwelling\').show(); return false;" href="#">Dwelling</a></td><td><img src="'+url_images+'background_tabSubCnrNotNot.png" class="floatLeft"></td><td class="tabSubCentral"><a class="tabSubLink" onClick="$(\'boxAges\').hide();$(\'boxOwnership\').show(); return false;" href="#">Ownership</a></td><td><img border="0" src="'+url_images+'background_tabSubCnrNotEdge.png" class="floatLeft"></td></tr>';A+="    </table>";A+='    <table width="100%" cellspacing="0" cellpadding="0" border="0" class="tabSubMain">';A+='        <tr width="100%" height="100%" ><td height="100%" class="boxContentSubTab" valign="top" align="right" ><img src="'+url_images+'transparent_1x1.gif" height="330" width="10" class="floatLeft"><img src="'+url_images+'transparent_1x1.gif" height="10" width="125"><div class="ad" id="ad-2-1"></div><img src="'+url_images+'transparent_1x1.gif" height="360" width="10" class="floatLeft"><img class="floatLeft" src="'+site_url+"fetch/image_proxy.php?img=/demographics/age/"+B+'_b01.gif" width="345"></td></tr>';A+="    </table> ";A+="</div>";A+='<div class="tabSubContainer" id="boxDwelling">';A+='   <table cellspacing="0" cellpadding="0" border="0" class="tabSubHeader">';A+='        <tr width="100%"><td><img border="0" src="'+url_images+'background_tabSubCnrEdgeNot.png" class="floatLeft"></td><td class="tabSubCentral"><a class="tabSubLink" onClick="$(\'boxDwelling\').hide();$(\'boxAges\').show(); return false;" href="#">Ages</a></td><td><img src="'+url_images+'background_tabSubCnrNotActive.png" class="floatLeft"></td><td class="tabSubCentralActive">Dwelling</td><td><img src="'+url_images+'background_tabSubCnrActiveNot.png" class="floatLeft"></td><td class="tabSubCentral"><a class="tabSubLink" onClick="$(\'boxDwelling\').hide();$(\'boxOwnership\').show(); return false;" href="#">Ownership</a></td><td><img border="0" src="'+url_images+'background_tabSubCnrNotEdge.png" class="floatLeft"></td></tr>';A+="    </table>";A+='    <table width="100%" cellspacing="0" cellpadding="0" border="0" class="tabSubMain">';A+='        <tr width="100%" height="100%" ><td height="100%" class="boxContentSubTab" valign="top" align="right" ><img src="'+url_images+'transparent_1x1.gif" height="330" width="10" class="floatLeft"><img src="'+url_images+'transparent_1x1.gif" height="10" width="125"><div class="ad" id="ad-2-1"></div><img src="'+url_images+'transparent_1x1.gif" height="360" width="10" class="floatLeft"><img class="floatLeft" src="'+site_url+"fetch/image_proxy.php?img=/demographics/dwelling/"+B+'_b31.gif" width="345"></td></tr>';A+="    </table> ";A+="</div>";A+='<div class="tabSubContainer" id="boxOwnership">';A+='   <table cellspacing="0" cellpadding="0" border="0" class="tabSubHeader">';A+='        <tr width="100%"><td><img border="0" src="'+url_images+'background_tabSubCnrEdgeNot.png" class="floatLeft"></td><td class="tabSubCentral"><a class="tabSubLink" onClick="$(\'boxOwnership\').hide();$(\'boxAges\').show(); return false;" href="#">Ages</a></td><td><img src="'+url_images+'background_tabSubCnrNotNot.png" class="floatLeft"></td><td class="tabSubCentral"><a class="tabSubLink" onClick="$(\'boxOwnership\').hide();$(\'boxDwelling\').show(); return false;" href="#">Dwelling</a></td><td><img src="'+url_images+'background_tabSubCnrNotActive.png" class="floatLeft"></td><td class="tabSubCentralActive">Ownership</td><td><img border="0" src="'+url_images+'background_tabSubCnrActiveEdge.png" class="floatLeft"></td></tr>';A+="    </table>";A+='    <table width="100%" cellspacing="0" cellpadding="0" border="0" class="tabSubMain">';A+='        <tr width="100%" height="100%" ><td height="100%" class="boxContentSubTab" valign="top" align="right" ><img src="'+url_images+'transparent_1x1.gif" height="330" width="10" class="floatLeft"><img src="'+url_images+'transparent_1x1.gif" height="10" width="125"><div class="ad" id="ad-2-1"></div><img src="'+url_images+'transparent_1x1.gif" height="360" width="10" class="floatLeft"><img class="floatLeft" src="'+site_url+"fetch/image_proxy.php?img=/demographics/home_ownership/"+B+'_b32.gif" width="345"></td></tr>';A+="    </table> ";A+="</div>";$("boxDemographicsContent").update(A);$("boxAges").show();$("boxDwelling").hide();$("boxOwnership").hide()}function manageLocality(C){var A=site_url+"fetch/locality.php";var B="suburb_id="+C;new Ajax.Request(A,{method:"post",parameters:B,onComplete:function(K){var E='<img src="'+url_images+'transparent_1x1.gif" width="100%" height="10">';if(K!=null){var D=K.responseXML.documentElement;var F=D.getElementsByTagName("l")[0];var J=F.getAttribute("e");var I=F.getAttribute("a");var G=F.getAttribute("p");var H=F.getAttribute("h");E+='<div class="localityContainer">';E+="<h2>"+H+"</h2>";E+='<img align="right" src="'+G+'">';E+=I;if(J==0){E+='<img src="'+url_images+'transparent_1x1.gif" width="100%" height="20">';E+='    <div style="border-top: 1px dashed #A9ACAF;">';E+="    <b>$50 on Us!</b><br>";E+="    Earn a valuable reward of $50 by writing a 170 word story about your Suburb and";E+="    taking a photograph of what you think is the suburb's most important feature.";E+="    If we publish it on this page we will give you $50 off the cost of any one of our reports.<br>";E+='    Email: <a href="mailto:stories@residex.com.au">stories@residex.com.au</a> to submit your story and photo.';E+="    </div>"}E+="</div>"}$("boxLocalityContent").update(E)}})}function manageAds(C){var A=site_url+"fetch/ads.php";var B="suburb_id="+C+"&link_id="+link_id;new Ajax.Request(A,{method:"post",parameters:B,onComplete:function(H){if(H!=null){var D=H.responseXML.documentElement;var F=D.getElementsByTagName("a");var G=F.length;for(var E=0;E<G;E++){ads_ids[E]=F[E].getAttribute("lid");ads_cid[E]=F[E].getAttribute("cid");ads_img1[E]=F[E].getAttribute("img1");ads_type1[E]=F[E].getAttribute("type1");ads_h1[E]=F[E].getAttribute("h1");ads_w1[E]=F[E].getAttribute("w1");ads_img2[E]=F[E].getAttribute("img2");ads_type2[E]=F[E].getAttribute("type2");ads_h2[E]=F[E].getAttribute("h2");ads_w2[E]=F[E].getAttribute("w2")}refreshImages()}}});setTimeout("manageAds("+C+");",720000)}function refreshImages(){adsCnt=ads_ids.length;for(var F=0;F<adsCnt;F++){var I=ads_ids[F];var K=ads_cid[F];var C=ads_img1[F];var G=ads_type1[F];var L=ads_h1[F];var H=ads_w1[F];var B=ads_img2[F];var D=ads_type2[F];var J=ads_h2[F];var E=ads_w2[F];var M=site_url+"/visit_ad/"+K+"/";var A="";if(C!=""){if(G=="swf"){A='<object style="visibility: visible;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+H+'" height="'+L+'">\n';A+='  	<param name="movie" value="'+C+"?clickTag="+M+"&clickTAG="+M+'">\n';A+="  	<!--[if !IE]>-->\n";A+='  	<object type="application/x-shockwave-flash" data="'+C+"?clickTag="+M+"&clickTAG="+M+'" width="'+H+'" height="'+L+'"></object>\n';A+="  	<!--<![endif]-->\n";A+="</object>\n"}else{A='<a href="'+M+'" target="_new_'+K+'"><img src="'+C+'" border=0 width="'+H+'" height="'+L+'"></a>'}$("ad-"+I+"-1").update(A)}var A="";if(B!=""){if(D=="swf"){A='<a href="'+M+'" target="_new_'+K+'"><object style="visibility: visible;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  width="'+E+'" height="'+J+'">';A+='  	<param name="movie" value="'+B+"?clickTag="+M+"&clickTAG="+M+'">';A+="  	<!--[if !IE]>-->";A+='  	<object type="application/x-shockwave-flash" data="'+B+"?clickTag="+M+"&clickTAG="+M+'" width="'+E+'" height="'+J+'"></object>';A+="  	<!--<![endif]-->";A+="</object></a>"}else{A='<a href="'+M+'" target="_new_'+K+'"><img src="'+B+'" border=0 width="'+E+'" height="'+J+'"></a>'}ad[I+"_2"]=A;updateHTMLByCSS("ad-"+I+"-2",A)}}}function hideAds(){var A=$$("div.ad");for(i=0;i<A.length;i++){$(A[i]).hide()}}function showAds(){var A=$$("div.ad");for(i=0;i<A.length;i++){$(A[i]).show()}}function getAdContent(A){if(typeof ad[A]!="undefined"){return ad[A]}else{return""}}function updateHTMLByCSS(C,A){var B=$$("div."+C);for(i=0;i<B.length;i++){$(B[i]).update(A)}}function createExplanation(C){var B=url_images+"transparent_1x1.gif";var A="Hold your mouse over the image to display a description.";switch(C){case"houses":B=url_images+"image_expBoxHouses.gif";A='This is a comparative street rating. It tells you how this house compares to other houses in the street. <br><br>The better quality houses in the street would be:<img src="'+url_images+'image_9outof10.png"><br>The poorest quality houses in the street would be:<img src="'+url_images+'image_1outof10.png">';break;case"bedbathcar":B=url_images+"image_expBoxBedBathCar.gif";A="Bedroom, bathroom and garage count.";break;case"agentvisitor":B=url_images+"image_expBoxAgentVisitor.gif";A="The agent and public may rate it differently, their ratings are displayed here.<br><br>You can have your say or add data  which may change the way we rate the property.<br><br>Note, you must be logged in to have your say.";break;case"price":B=url_images+"image_expBoxPrice.gif";A="Residex's calculated value based on comparative street rating.";break;case"report":B=url_images+"image_expBoxReport.gif";A="Want more information?  Purchase a Residex Property report here.";break;case"scores":B=url_images+"image_expBoxScores.gif";A="The comparative street rating is expressed as a number between 1 and 10.<br><br>1 = the worst and 10 = the best.";break;case"url":B=url_images+"image_expBoxURL.gif";A="To see the full listing follow this link.";break;default:break}$("explainImage").src=B;$("explainText").update(A)}function getDescriptionImageMap(){var A="";A+='<div class="spTutorialHeader">A few things to know before getting started</div>';A+='<div class="spTutorialExample">';A+='    <div class="fpTutorialExampleImages">';A+='        <div class="fpContainerExpImage"><img id="explainImage" src="'+url_images+'transparent_1x1.gif" width="298" height="156" border="0" usemap="#explanation"></div>';A+='        <div class="floatLeft"><img src="'+url_images+'transparent_1x1.gif" width="10" height="156"></div>';A+='        <div class="floatLeft"><img src="'+url_images+'background_tutorialDivider.png" width="3" height="156"></div>';A+='        <div class="floatLeft"><img src="'+url_images+'transparent_1x1.gif" width="10" height="156"></div>';A+='        <div class="fpContainerExpText"><img src="'+url_images+'transparent_1x1.gif" width="298" height="5"><div class="fpContainerExpTextInner" id="explainText">Hold your mouse over the image to display a description.</div></div>';A+='        <map name="explanation">';A+='            <area shape="rect" coords="6,25,290,57" onMouseOver="createExplanation( \'houses\' );">';A+='            <area shape="rect" coords="260,55,290,84" onMouseOver="createExplanation( \'report\' );">';A+='            <area shape="rect" coords="143,124,290,151" onMouseOver="createExplanation( \'bedbathcar\' );">';A+='            <area shape="rect" coords="70,55,129,123" onMouseOver="createExplanation( \'scores\' );">';A+='            <area shape="rect" coords="4,78,243,126" onMouseOver="createExplanation( \'agentvisitor\' );">';A+='            <area shape="rect" coords="127,55,242,78" onMouseOver="createExplanation( \'price\' );">';A+='            <area shape="rect" coords="4,124,98,151" onMouseOver="createExplanation( \'url\' );">';A+="        </map>";A+="    </div>";A+='    <div class="clear"></div>';A+="</div>";return A}Effect.BlindLeft=function(A){A=$(A);A.makeClipping();return new Effect.Scale(A,0,Object.extend({scaleContent:false,scaleY:false,restoreAfterFinish:true,afterFinishInternal:function(B){B.element.hide().undoClipping()}},arguments[1]||{}))};Effect.BlindRight=function(B){B=$(B);var A=B.getDimensions();return new Effect.Scale(B,100,Object.extend({scaleContent:false,scaleY:false,scaleFrom:0,scaleMode:{originalHeight:A.height,originalWidth:A.width},restoreAfterFinish:true,afterSetup:function(C){C.element.makeClipping().setStyle({width:"0px"}).show()},afterFinishInternal:function(C){C.element.undoClipping()}},arguments[1]||{}))};var properties={propertiesData:new Object(),propertiesList:new Object(),total:0,srch_suburb:new String(),srch_postcode:new String(),srch_state:new String(),lockPixelCoordinate:function(F){var A=F;var B=16;var E=F%B;if(E!=0){var D=F-E;var C=B*0.5;if(E>C){D+=B}A=D}return Math.round(A)},lock:function(B){var C=this.lockPixelCoordinate(B.x);var A=this.lockPixelCoordinate(B.y);return new GPoint(C,A)},isMultipleListings:function(A){if(A.listCount!="undefined"&&A.listCount>1){return true}else{return false}},loadPropertyData:function(C){var B=new Object();this.propertiesData=new Object();this.total=C.length;for(var A=0;A<this.total;A++){var D=C[A].getAttribute("id");B[D]=this.loadPropertyAttributes(C[A])}this.propertiesData=B},loadPropertyAttributes:function(B){propObj=new Object();propObj.prid=B.getAttribute("id");propObj.type=B.getAttribute("t");propObj.address=B.getAttribute("a");propObj.dwelling=B.getAttribute("d");propObj.suburb=this.srch_suburb;propObj.state=this.srch_state;propObj.postcode=this.srch_postcode;propObj.beds=B.getAttribute("be");propObj.baths=B.getAttribute("ba");propObj.cars=B.getAttribute("c");propObj.longitude=parseFloat(B.getAttribute("lo"));propObj.latitude=parseFloat(B.getAttribute("la"));propObj.site_name=B.getAttribute("sn");if(propObj.type=="c"){propObj.site_url=site_url+"/visit_property/"+propObj.prid+"/"+propObj.site_name+"/"}else{propObj.site_url=site_url+"/visit_property_incomplete/"+propObj.prid+"/"+propObj.site_name+"/"}if(propObj.site_name=="MyHome"){propObj.thumbnail=B.getAttribute("tn")}else{propObj.thumbnail=0}var C=B.getElementsByTagName("rs")[0];propObj.rdx_score=C.getAttribute("rr");propObj.rdx_price=C.getAttribute("rp");var A=B.getElementsByTagName("vs")[0];propObj.vst_score=(A.getAttribute("vr")=="")?"?":A.getAttribute("vr");propObj.agt_say=B.getAttribute("as");propObj.agt_report=B.getAttribute("ar");propObj.agt_score="?";propObj.agt_price="have your say";if(propObj.agt_say==1){var D=B.getElementsByTagName("as")[0];propObj.agt_score=D.getAttribute("ar");propObj.agt_price=D.getAttribute("ap");propObj.agt_summary=D.getAttribute("as");propObj.agt_comment=D.getAttribute("ac");propObj.agt_name=D.getAttribute("n");propObj.agt_mobile=D.getAttribute("m");propObj.agt_email=D.getAttribute("e");propObj.agt_logo=D.getAttribute("l");propObj.prop_pics=D.getAttribute("ps");propObj.prop_pic1=D.getAttribute("p1");propObj.prop_pic2=D.getAttribute("p2")}return propObj},getProperty:function(E,B){if(typeof this.propertiesList[E]!="undefined"){return this.propertiesList[E]}var A;var D="";var C=$H(this.propertiesList);C.each(function(H){if(properties.isMultipleListings(H.value)){var F;var G=$H(H.value);G.each(function(I){if(E==I.key){F=I.value;throw $break}});if(typeof F!="undefined"){A=F;D=H.key;throw $break}}});if(typeof A!="undefined"){if(typeof B!="undefined"&&B==true){retObject=new Object();retObject.key=D;retObject.value=A;return retObject}return A}return false},regenerateList:function(){map.setCenter(map.getCenter(),map.getZoom());this.propertiesList=new Object();var G=new Object();var F=this.propertiesData;for(key in F){if(F[key].type=="c"){var E=F[key].latitude;var H=F[key].longitude;var I=new GLatLng(E,H);var J=map.fromLatLngToDivPixel(I);var K=this.lock(J);F[key].lockedCoords=map.fromDivPixelToLatLng(K);var D=K.x+"_"+K.y;if(typeof (G[D])=="undefined"){G[D]=F[key]}else{if(this.isMultipleListings(G[D])){G[D][F[key].prid]=F[key];G[D].listCount++}else{var A=G[D];var C=new Object();C.listCount=2;C[A.prid]=A;C[F[key].prid]=F[key];G[D]=C}}}}var B=0;for(key in G){if(this.isMultipleListings(G[key])){B++;this.propertiesList["multiList"+B]=G[key]}else{this.propertiesList[G[key].prid]=G[key]}}}};Element.addMethods({scrollTo:function(A,C,B){var A=$(A);if(arguments.length==1){var D=A.cumulativeOffset();window.scrollTo(D[0],D[1])}else{A.scrollLeft=C;A.scrollTop=B}return A}});Effect.Scroll=Class.create();Object.extend(Object.extend(Effect.Scroll.prototype,Effect.Base.prototype),{initialize:function(A){this.element=$(A);if(!this.element){throw (Effect._elementDoesNotExistError)}this.start(Object.extend({x:0,y:0},arguments[1]||{}))},setup:function(){var A=(this.element==window)?document.viewport.getScrollOffsets():Element._returnOffset(this.element.scrollLeft,this.element.scrollTop);this.originalScrollLeft=A.left;this.originalScrollTop=A.top},update:function(A){this.element.scrollTo(Math.round(this.options.x*A+this.originalScrollLeft),Math.round(this.options.y*A+this.originalScrollTop))}});function showSearchPage(){if($("tabSales")){$("tabSales").className="searchTabSelected"}if($("tabEstimates")){$("tabEstimates").className="searchTabNotSelected"}if($("tabPurchase")){$("tabPurchase").className="searchTabNotSelected"}$("boxMainEstimates").style.display="none";$("boxMainEstimates").hide();if($("boxMainPurchase")){$("boxMainPurchase").style.display="none";$("boxMainPurchase").hide()}$("boxMainLoader").style.display="none";$("boxMainLoader").hide();if($("boxMainResults")){$("boxMainResults").style.display="block";$("boxMainResults").show()}if($("boxSearchForm")){$("boxSearchForm").style.display="block";$("boxSearchForm").show()}if(!mapInitialised){fixPageHeight()}$("boxMap").show();$("boxDemographics").hide();$("boxLocality").hide();if(link_id!="residex"){if(link_logo_on_sales==0&&$("linkBox")){$("linkBox").hide()}}}function showPriceEstimations(){if($("tabSales")){$("tabSales").className="searchTabNotSelected"}if($("tabPurchase")){$("tabPurchase").className="searchTabNotSelected"}if($("tabEstimates")){$("tabEstimates").className="searchTabSelected"}$("boxMainCover").style.display="none";$("boxMainCover").hide();if($("boxMainPurchase")){$("boxMainPurchase").style.display="none";$("boxMainPurchase").hide()}$("boxMainLoader").style.display="none";$("boxMainLoader").hide();if($("boxMainResults")){$("boxMainResults").style.display="none";$("boxMainResults").hide()}if($("boxSearchForm")){$("boxSearchForm").style.display="none";$("boxSearchForm").hide()}$("boxMainEstimates").style.display="block";$("boxMainEstimates").show();if(link_id!="residex"&&$("linkBox")){$("linkBox").update("Proudly sponsored by:"+link_link_top+'<img src="'+link_image_top+'" border="0" usemap="#link_map">');$("linkBox").style.display="block";$("linkBox").show()}fixValuePageHeight("estimates")}function showPurchasePage(){if($("tabSales")){$("tabSales").className="searchTabNotSelected"}if($("tabPurchase")){$("tabPurchase").className="searchTabSelected"}if($("tabEstimates")){$("tabEstimates").className="searchTabNotSelected"}$("boxMainCover").style.display="none";$("boxMainCover").hide();$("boxMainEstimates").style.display="none";$("boxMainEstimates").hide();$("boxMainLoader").style.display="none";$("boxMainLoader").hide();if($("boxMainResults")){$("boxMainResults").style.display="none";$("boxMainResults").hide()}if($("boxSearchForm")){$("boxSearchForm").style.display="none";$("boxSearchForm").hide()}$("boxMainPurchase").style.display="block";$("boxMainPurchase").show();if(link_id!="residex"&&$("linkBox")){$("linkBox").update("Proudly sponsored by:"+link_link_top+'<img src="'+link_image_top+'" border="0" usemap="#link_map">');$("linkBox").style.display="block";$("linkBox").show()}fixValuePageHeight("purchase")}function showAlertMessage(A){if($("alertMsg")){$("alertMsg").update(A);$("alertMsg").style.display="block";$("alertMsg").show();clearTimeout(alertTimer);alertTimer=setTimeout(function(){$("alertMsg").hide()},60000)}}function validateEmail(A){var B=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return A.match(B)};