if(typeof Beast=="undefined"){Beast={}}if(typeof Beast.Frame=="undefined"){Beast.FrameCount=0;Beast.Frames=[];Beast.Frame={GetViewportScroll:function(){if(Beast.Frames.length>0){return Beast.Frames[0].GetViewportScroll()}else{return 0}},DocumentResized:function(B,A){if(Beast.Frames.length>0){return Beast.Frames[0].DocumentResized(B,A)}else{return 0}},ScrollTo:function(A){if(Beast.Frames.length>0){return Beast.Frames[0].ScrollTo(A)}else{return 0}}};Beast.FrameConstructor=function(A){Beast.FrameCount++;this.DomId="_dsSearchAgent_Idx_Frame_"+A;this.BaseUrl="http://idx-lite.diversesolutions.com/search/3177/41/featuredoffice";this.DiverseRoot=false;this.Query="";this.IdxDomain="idx-lite.diversesolutions.com";this.FirstResize=false;this.WindowLoaded=false;this.GetViewportScroll=function(){var B=document.getElementById(this.DomId);var D=this.cumulativeOffset(B);var C=(window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop);if(C>D[1]){return C-D[1]}else{return 0}};this.BuildFrame=function(){var J=this;this.DiverseRoot=this.BaseUrl.toLowerCase().indexOf("idx.diversesolutions.com")>=0;if(!this.DiverseRoot){var E=location.host.split(".");if(location.host!=E[E.length-2]+"."+E[E.length-1]){document.domain=E[E.length-2]+"."+E[E.length-1]}}var I=/linkid=(\d+)/i.exec(location.search);if(I==null){I=/linkid=(\d+)/i.exec(location.hash)}if(I!=null){if(this.BaseUrl.indexOf("/link/")==-1){if(this.BaseUrl.lastIndexOf("/")==this.BaseUrl.length-1){this.BaseUrl=this.BaseUrl.substring(0,this.BaseUrl.length-1)}this.BaseUrl+="/link/"+I[1]}else{this.BaseUrl=this.BaseUrl.replace(/\/link\/(\d+)/i,"/link/"+I[1])}}var C=location.hash;var M=location.search;if(this.BaseUrl.substring(0,1)=="#"){this.BaseUrl=this.BaseUrl.substring(1)}if(this.BaseUrl.substring(0,1)=="/"){this.BaseUrl=this.BaseUrl.substring(1)}if(C.substring(0,1)=="#"){C=C.substring(1)}if(C.substring(0,1)=="&"){C=C.substring(1)}if(M.substring(0,1)=="?"){M=M.substring(1)}if(M.substring(0,1)=="&"){M=M.substring(1)}if(M!=""){hash="#"+M+this.Query}else{if(C!=""){hash="#"+C+this.Query}else{hash="#"+this.Query}}var K=/PropertySearchID=([0-9]+)/.exec(location.hash);if(K==null){K=/PropertySearchID=([0-9]+)/.exec(location.search)}if(K){this.BaseUrl+="/"+K[1]}var L=/mlsnumber=(\w+)/i.exec(location.search);if(L==null){L=/mlsnumber=(\w+)/i.exec(location.hash)}if(L){this.BaseUrl+="/mlsnumber/"+L[1]}var H=/featured/i.exec(location.search);if(H==null){H=/featured/i.exec(location.hash)}if(H){this.BaseUrl+="/featured"}var D=/featuredoffice/i.exec(location.search);if(D==null){D=/featuredoffice/i.exec(location.hash)}if(D){this.BaseUrl+="/featuredoffice"}var F=/ref=([a-zA-Z1-9]+)/i.exec(location.search);if(F==null){F=/ref=([a-zA-Z1-9]+)/i.exec(location.hash)}if(F){this.BaseUrl+="/ref/"+F[1]}var B=document.getElementById(this.DomId+"_div");FrameSrc="<iframe id='"+this.DomId+"' name='"+this.DomId+"' src='"+this.BaseUrl+hash+"' scrolling='"+(this.DiverseRoot?"auto":"no")+"' style='width:auto;height:"+2000+"px;' frameborder='0'></iframe>";if(B==null){document.write("<div id='"+this.DomId+"_div'></div>");B=document.getElementById(this.DomId+"_div")}B.innerHTML=FrameSrc;var G=document.getElementById(this.DomId);if(G.parentNode.offsetWidth!=0){G.style.width=(G.parentNode.offsetWidth<720?720:G.parentNode.offsetWidth)+"px"}this.CheckReady();this.ThisWindowScrolledProxy=function(){J.ThisWindowScrolled()};this.WindowLoadProxy=function(){J.WindowLoad()};this.UnLoadProxy=function(){J.UnLoad()};if(window.addEventListener){window.addEventListener("scroll",this.ThisWindowScrolledProxy,false)}else{if(document.addEventListener){document.addEventListener("scroll",this.ThisWindowScrolledProxy,false)}else{if(window.attachEvent){window.attachEvent("onscroll",this.ThisWindowScrolledProxy)}}}if(window.addEventListener){window.addEventListener("load",this.WindowLoadProxy,false)}else{if(document.addEventListener){document.addEventListener("load",this.WindowLoadProxy,false)}else{if(window.attachEvent){window.attachEvent("onload",this.WindowLoadProxy)}}}if(window.addEventListener){window.addEventListener("unload",this.UnLoadProxy,false)}else{if(document.addEventListener){document.addEventListener("unload",this.UnLoadProxy,false)}else{if(window.attachEvent){window.attachEvent("onunload",this.UnLoadProxy)}}}};this.CheckReady=function(){var B=this;var C=document.getElementById(this.DomId);if(!C.parentNode.nextSibling&&!this.WindowLoaded){C.style.width=(C.parentNode.offsetWidth<720?720:C.parentNode.offsetWidth)+"px";setTimeout(function(){B.CheckReady()},250)}else{C.style.width=(C.parentNode.offsetWidth<720?720:C.parentNode.offsetWidth)+"px"}};this.UnLoad=function(){var B=this;if(window.addEventListener){window.removeEventListener("scroll",this.ThisWindowScrolledProxy,false)}else{if(document.addEventListener){document.removeEventListener("scroll",this.ThisWindowScrolledProxy,false)}else{if(window.attachEvent){window.detachEvent("onscroll",this.ThisWindowScrolledProxy)}}}if(window.addEventListener){window.removeEventListener("load",this.WindowLoadProxy,false)}else{if(document.addEventListener){document.removeEventListener("load",this.WindowLoadProxy,false)}else{if(window.attachEvent){window.detachEvent("onload",this.WindowLoadProxy)}}}if(window.addEventListener){window.removeEventListener("unload",this.UnLoadProxy,false)}else{if(document.addEventListener){document.removeEventListener("unload",this.UnLoadProxy,false)}else{if(window.attachEvent){window.detachEvent("onunload",this.UnLoadProxy)}}}};this.ThisWindowScrolled=function(){try{if(!window.frames[this.DomId]){return }var C=window.frames[this.DomId].Beast}catch(B){return }if(window.frames[this.DomId]&&typeof window.frames[this.DomId].Beast!="undefined"&&typeof window.frames[this.DomId].Beast.FrameCommunicator!="undefined"){window.frames[this.DomId].Beast.FrameCommunicator.ParentScrolled()}};this.WindowLoad=function(){this.WindowLoaded=true;this.FixWidth()};this.FixWidth=function(){var B=document.getElementById(this.DomId);B.style.width=(B.parentNode.offsetWidth<720?720:B.parentNode.offsetWidth)+"px"};this.DocumentResized=function(D,B){var C=document.getElementById(this.DomId);if(typeof D!="number"){D=2000}C.style.height=D+"px";C.style.width=(C.parentNode.offsetWidth<720?720:C.parentNode.offsetWidth)+"px"};this.ScrollTo=function(D){var I=this;var H=document.getElementById(this.DomId);var F=this.cumulativeOffset(H);var E=F[1]+D;var G=(window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop);var B=E-G;var J=document.documentElement.clientHeight;window.scroll(0,G+B);var C=(window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop);if(C!=G+B){window.setTimeout(function(){I.ScrollTo(D)},250)}};this.cumulativeOffset=function(C){var B=0,D=0;do{B+=C.offsetTop||0;D+=C.offsetLeft||0;C=C.offsetParent}while(C);return this._returnOffset(D,B)};this._returnOffset=function(C,D){var B=[C,D];B.left=C;B.top=D;return B};this.BuildFrame()}}Beast.Frames[Beast.FrameCount]=new Beast.FrameConstructor(Beast.FrameCount);