function Querystring(b){this.params={};if(b==null){b=location.search.substring(1,location.search.length)}if(b.length==0){return}b=b.replace(/\+/g," ");var c=b.split("&");for(var d=0;d<c.length;d++){var a=c[d].split("=");var e=decodeURIComponent(a[0]);var f=(a.length==2)?decodeURIComponent(a[1]):e;this.params[e]=f}}Querystring.prototype.get=function(b,c){var a=this.params[b];c=c||"";return(a!=null)?a:c};Querystring.prototype.contains=function(b){var a=this.params[b];return(a!=null)};var _onLoginAction=null;var _qs=new Querystring();function saveSearch(a){if(a){$(document).ready(function(){if(_isMemberLoggedIn){$(".save-search").attr("href",getSaveSearchUrl(0))}else{$(".save-search").attr("href",getHref("login"))}$(".save-search").colorbox({width:400,height:200,opacity:0.7,close:"<span></span>",iframe:true,scrollbars:false,speed:0,transition:"none"});$(".save-search").click()})}else{document.getElementById("ListingSearch/SaveSearch").value=1;document.forms.ListingSearch.submit()}}function getHref(b){var a=getAppRoot()+"/account/"+b+".aspx?formtype="+b+"&onregister=register&onsignin=signin&onresize=resizeoverlay&onloginsuccess=showlogininfo&onsuccess="+escape(escape(window.location.href+getRedirectParams()));return a}function resizeoverlay(b,a){$("#cboxIframe").contents().find("html").css("overflow","hidden");$("#cboxIframe").css("width",b+"px");$("#cboxIframe").css("height",a+"px");$("#cboxLoadedContent").css("width",b+"px");$("#cboxLoadedContent").css("height",a+"px");$("#cboxIframe").colorbox.resize()}function getSaveSearchUrl(){return getAppRoot()+"/account/savesearch.aspx?overlay=1"+(_qs.contains("ListingSearch")?"&ListingSearchID="+_qs.get("ListingSearch"):"")+"&onresize=resizeoverlay"}function isAdminApp(){return window.location.href.toString().toLowerCase().indexOf("fnistools.com")>=0}function getAppRoot(){return isAdminApp()?"/brokeroffice.admin/agent/public":Utils.AppPath}function isLoggedIn(){if(typeof(_customerInfo)!="undefined"){if(typeof(_customerInfo.firstName)!="undefined"&&_customerInfo.firstName!=""){return true}}return false}function register(){$("#cboxIframe").attr("src",getHref("signup"))}function signin(){$("#cboxIframe").attr("src",getHref("login"));$(".save-search").colorbox({width:400,height:200,opacity:0.7,close:"<span></span>",iframe:true,scrollbars:false,speed:0,transition:"none"});$(".save-search").click()}function showlogininfo(a){$("#cboxIframe").attr("src",getSaveSearchUrl())}function isProxyLoggedIn(){if(isAdminApp()&&readCookie("TRIO=GUID")!=""){return true}return false}function getRedirectParams(){var a=[];a.push(getSearchCookie());a.push(getNextAction());var b=["?"];if(window.location.href.lastIndexOf("/")==window.location.href.length-1){b=["default.aspx?"]}$.each(a,function(){if(this!=""){if(b.length>1){b.push(escape("%26"))}b.push(this)}});return b.join("")}function getSearchCookie(){var a=readCookie("TRIO=GUID");return a?"search="+a:""}function getNextAction(){return _onLoginAction==null?"":"nextaction="+_onLoginAction};var timeoutID=0;var searchStyleSet=false;var loginStyleSet=false;var navItems=new Array();var navNames=new Array();function rollover(b,a){b.src=a.src}function toggleImg(a,b){a.src=b}function rollover2(whichimg,overimg){eval('document.images["'+whichimg+'"].src = '+overimg+".src")}function showMyMenu(b,d){var a=document.getElementById(b);if(!a){return}var e=document.getElementById(d);if(e){if(b=="divNav1"){clearTimeout(timeoutID);if(!searchStyleSet&&document.all){searchStyleSet=true}}else{if(b=="divNav3"){if(!loginStyleSet){loginStyleSet=true;var c=document.getElementById("divNav3Login");if(orientation=="top"){c.style.top=0-e.offsetHeight-c.offsetHeight+"px"}}}}}if(orientation!="none"){if(b=="divNav3"){document.getElementById("divNav3Login").style.visibility="visible"}else{a.style.visibility="visible"}}}function hideMyMenu(b){var a=document.getElementById(b);if(!a){return}if(b=="divNav1"){timeoutID=setTimeout("document.getElementById('"+b+"').style.visibility = 'hidden'",800)}else{a.style.visibility="hidden"}if(b=="divNav3"){document.getElementById("divNav3Login").style.visibility="hidden"}}function setPosition(b,f){var a=document.getElementById(b);if(!a){return}var g=document.getElementById(f);if(g){if(document.all){var d=false;if(navItems.length==0){navItems[0]=f;navNames[0]=b}else{var e=0;for(;e<navItems.length;e++){if(navItems[e]==f){d=true;break}}if(d==false){navNames[e]=b;navItems[e]=f}}clearTimeout(timeoutID);for(e=0;e<navNames.length;e++){if(b==navNames[e]){a.style.visibility="visible";var c=document.getElementById(b.replace("divNav","subNav"));if(c){c.style.display="block"}}else{document.getElementById(navNames[e]).style.visibility="hidden"}}}else{var d=false;if(navItems.length==0){navItems[0]=f;navNames[0]=b}else{var e=0;for(;e<navItems.length;e++){if(navItems[e]==f){d=true;break}}if(d==false){navItems[e]=f;navNames[e]=b}}clearTimeout(timeoutID);for(e=0;e<navNames.length;e++){if(b==navNames[e]){a.style.visibility="visible";var c=document.getElementById(b.replace("divNav","subNav"));if(c){c.style.display="block"}}else{document.getElementById(navNames[e]).style.visibility="hidden"}}}}}function hideMenu(b){var a=document.getElementById(b);if(!a){return}timeoutID=setTimeout("document.getElementById('"+b+"').style.visibility = 'hidden'",400)};