

var AJAXQUEUE_STATUS_PREPPING=0;var AJAXQUEUE_STATUS_QUEUED=1;var AJAXQUEUE_STATUS_PROCESSING=2;var AJAXQUEUE_STATUS_SENT=3;var AJAXQUEUE_STATUS_COMPLETE=4;var AJAXQUEUE_STATUS_ERROR=5;var AJAXQUEUE_STATUS_CANCELLED=6;function AjaxQueue(){this.bDoCleanup=true;this.iAjaxCallInterval=250;this.iIntervalId=0;this.bIntervalStarted=false;this.locks=new Object;this.calls=new Object;this.strLastCall=null;this.iIteration=0;this.errorHandler=null;this.RegisterErrorHandler=function(a){this.errorHandler=a};this.schedule=function(g,d,j,i,a,h){if(this.calls[g]!=undefined){this.destroyCall(g)
}var c=true;var b=new AjaxQueueCall(d,h);b.callback=j;b.priority=(a==true)?true:false;if(i==true){this.purgeAllCalls()}this.calls[g]=b;this.calls[g].state=AJAXQUEUE_STATUS_PREPPING;try{this.calls[g].xmlObject=this.getNewXMLObject();this.calls[g].xmlObject.onreadystatechange=function(){onReadyStateChangeHelper(g,d)}}catch(f){if(this.errorHandler){this.errorHandler(f)}else{alert("AjaxQueue Scheduling Failed for ["+g+"]: "+f.message)}bRetrun=false}this.calls[g].state=AJAXQUEUE_STATUS_QUEUED;return c};this.isLocked=function(b){if(b!=undefined){if(this.locks[b]!=undefined){return this.locks[b].state
}else{return false}}else{for(var a in this.locks){if(this.locks[a].state==true){return true}}return false}};this.registerLock=function(b){var a=new AjaxQueueLock(b);this.locks[b]=a;return};this.unregisterLock=function(b){try{delete this.locks[b]}catch(a){}return};this.engageLock=function(a){return this.changeLockState(a,true)};this.disengageLock=function(a){return this.changeLockState(a,false)};this.changeLockState=function(c,a){try{this.locks[c].state=a}catch(b){if(this.errorHandler){this.errorHandler(b)}else{alert("AjaxQueue: cannot change lock ["+c+"]: "+b.message)
}}return};this.destroyCall=function(a){if(this.calls[a]!=undefined){this.calls[a].state=AJAXQUEUE_STATUS_CANCELLED;this.abortCall(a);if(this.bDoCleanup==true){this.purgeCall(a)}}};this.purgeCall=function(a){try{delete this.calls[a]}catch(b){}return};this.abortCall=function(a){this.calls[a].xmlObject.abort();return};this.purgeAllCalls=function(){for(var a in this.calls){this.destroyCall(a)}if(this.bDoCleanup==true){this.calls=new Object}};this.getNewXMLObject=function(){var a=null;try{if(window.XMLHttpRequest){a=new XMLHttpRequest()
}else{a=new ActiveXObject("Microsoft.XMLHTTP")}if(a==undefined||a==null){alert("This website requires that your browser support AJAX.  Please update your browser, or use the accesible site links at the bottom of the page to continue.")}}catch(b){alert("This website requires that your browser support AJAX.  Please update your browser, or use the accesible site links at the bottom of the page to continue.")}return a};this.doAjaxHandling=function(){var a=this.getNextPriorityOpenCall();if(a==null){a=this.getNextOpenCall()
}this.strLastCall=a;this.iIteration++;if(a!=null){if(this.isLocked()==true&&this.calls[a].priority==false){this.strLastCall="skip! "+this.isLocked()+" "+this.calls[a].priority;return}this.calls[a].state=AJAXQUEUE_STATUS_PROCESSING;try{var c=this.calls[a];if(c.postData==null){c.xmlObject.open("GET",c.url,true);c.xmlObject.send("")}else{c.xmlObject.open("POST",c.url,true);c.xmlObject.setRequestHeader("Content-type","application/x-www-form-urlencoded");c.xmlObject.setRequestHeader("Content-length",c.postData.length);
c.xmlObject.setRequestHeader("Connection","close");c.xmlObject.send(c.postData)}}catch(b){c.state=AJAXQUEUE_STATUS_ERROR;if(this.errorHandler){this.errorHandler(b)}else{alert("AjaxQueue: Could not act on ["+a+"]:"+b.message)}}}this.cleanUpCalls()};this.getNextOpenCall=function(){for(var a in this.calls){if(this.calls[a].state==AJAXQUEUE_STATUS_QUEUED){return a}}return null};this.getNextPriorityOpenCall=function(){for(var a in this.calls){if(this.calls[a].state==AJAXQUEUE_STATUS_QUEUED&&this.calls[a].priority==true){return a
}}return null};this.cleanUpCalls=function(){if(this.bDoCleanup==true){for(var a in this.calls){if(this.calls[a].state>AJAXQUEUE_STATUS_SENT){this.destroyCall(a)}}return}};this.IsAjaxCapable=function(){var a=this.getNewXMLObject();if(a==undefined||a==null){return false}a=null;return true}}function onReadyStateChangeHelper(a,c){if(g_AjaxQueue.calls[a]){if(g_AjaxQueue.calls[a].state!=AJAXQUEUE_STATUS_PROCESSING){return}if(g_AjaxQueue.calls[a].xmlObject.readyState==4){if(g_AjaxQueue.calls[a].xmlObject.status&&g_AjaxQueue.calls[a].xmlObject.status==200){try{g_AjaxQueue.calls[a].callback(g_AjaxQueue.calls[a].xmlObject);
g_AjaxQueue.calls[a].state=AJAXQUEUE_STATUS_COMPLETE}catch(b){g_AjaxQueue.calls[a].state=AJAXQUEUE_STATUS_ERROR;if(this.errorHandler){this.errorHandler(b)}else{alert("AjaxQueue: callback for ["+a+"] failed: "+b.message)}}}else{if(g_AjaxQueue.calls[a].xmlObject.status==404){g_AjaxQueue.calls[a].state=AJAXQUEUE_STATUS_ERROR;if(this.errorHandler){var b=new Error("404: Page not found, "+c);this.errorHandler(b)}else{alert("AjaxQueue Call Failed for ["+a+"]: ["+c+"] Does Not Exist!")}}else{if(g_AjaxQueue.calls[a].xmlObject.status==500){g_AjaxQueue.calls[a].state=AJAXQUEUE_STATUS_ERROR;
if(this.errorHandler){var b=new Error("500: Internal server error, "+c);this.errorHandler(b)}else{alert("AjaxQueue Call Failed for ["+a+"]: ["+c+"] Server Error!")}}}}}}}function AjaxQueueCall(b,a){this.url=b;this.postData=a;this.xmlObject=null;this.state=AJAXQUEUE_STATUS_PREPPING;this.callback=null;this.priority=0}function AjaxQueueLock(a){this.name=a;this.state=false}function CyberGetNodeValue(g,b){try{if(g){var c=g.getElementsByTagName(b);if(c&&c[0]){var h=c[0].childNodes;var a="";for(var d=0;d<h.length;d++){a+=h[d].nodeValue
}return a}}}catch(f){}return""}function CyberUrlEncode(g){var c="";var a=0;g=g.toString();var f=/(^[a-zA-Z0-9_.]*)/;while(a<g.length){var d=f.exec(g.substr(a));if(d!=null&&d.length>1&&d[1]!=""){c+=d[1];a+=d[1].length}else{if(g[a]==" "){c+="+"}else{var b=g.charCodeAt(a);var e=b.toString(16);c+="%"+(e.length<2?"0":"")+e.toUpperCase()}a++}}return c}g_AjaxQueue=new AjaxQueue();g_bAjaxEnabled=g_AjaxQueue.IsAjaxCapable();function fireAjaxQueue(){if(g_AjaxQueue.bIntervalStarted==false){g_AjaxQueue.iIntervalId=setInterval(function(){g_AjaxQueue.doAjaxHandling()
},g_AjaxQueue.iAjaxCallInterval);g_AjaxQueue.bIntervalStarted==true}}RfgQueueCommand("fireAjaxQueue();");
function CyberC21Slider(B,M,D,L,T,Q,R,Y,H,C,J,S,P,E,X,G,W,Z,V,F){this.pContainer=document.getElementById(B);if(!this.pContainer){throw (new TypeError("Container ID must exist, could not create slider object"))}this.pContainer.style.cssFloat="left";this.pContainer.style.margin="0";this.pContainer.style.width=C;this.pContainer.style.height=J;var U=B+"_lowpointer";var K=B+"_highpointer";var I=B+"_track";var O=B+"_activeoverlay";var N=false;if(H!=null&&H!=""){N=true}var A='<div id="'+I+'" style="height:'+J+"px;width:"+C+"px;background:url("+Y+");position:relative;overflow:hidden;"+S+'">'+(N?'   <div id="'+O+'" style="background:url('+H+");width:0px; height:"+J+'px;position:absolute;"></div>':"")+'   <div id="'+U+'" style="background:url('+P+");width:"+X+"px; height:"+G+'px;position:absolute; cursor: pointer;"></div>'+(M?'   <div id="'+K+'" style="background:url('+E+");width:"+X+"px; height:"+G+'px;position:absolute; cursor: pointer;"></div>':"")+"</div>";
this.pContainer.innerHTML=A;this.pTrack=document.getElementById(I);if(!this.pTrack){throw (new TypeError("Could not create new slider track."))}this.pTrack.iRealLowBound=D;this.pTrack.iRealHighBound=L;if(T<=0){T=1}D=Math.round(parseFloat(D)/parseFloat(T));L=Math.round(parseFloat(L)/parseFloat(T));Q=Math.round(parseFloat(Q)/parseFloat(T));R=Math.round(parseFloat(R)/parseFloat(T));this.pTrack.strContainerId=B;this.pTrack.iLowBound=D;this.pTrack.iHighBound=L;this.pTrack.iResolution=T;this.pTrack.iStartLowAt=Q;this.pTrack.iStartHighAt=R;
this.pTrack.strBgImage=Y;this.pTrack.iBgWidth=C-W-Z;this.pTrack.iBgHeight=J;this.pTrack.iFgWidth=X;this.pTrack.iFgHeight=G;this.pTrack.onMoveComplete=V;this.pTrack.onMove=F;this.pTrack.pMyself=this;this.pTrack.iDistance=this.pTrack.iBgWidth-X;this.pTrack.xMax=0;this.pTrack.yMax=0;this.pTrack.xMin=W;this.pTrack.yMin=0;this.pTrack.bInDrag=false;this.pTrack.iNumElements=L-D;this.pTrack.fLowValue=Q;this.pTrack.fHighValue=R;this.pTrack.iEffectiveBound=0;this.pTrack.bRangeSlider=M;this.pTrack.bActiveOverlay=N;this.pTrack.scale=((this.pTrack.iHighBound-this.pTrack.iLowBound)/this.pTrack.iDistance);
this.pTrack.iEffectiveBound=D;this.pTrack.xMax=this.pTrack.iDistance;this.pTrack.yMax=0;this.pTrack.pLowPointer=document.getElementById(U);if(!this.pTrack.pLowPointer){throw (new TypeError("Could not create new low slider pointer."))}if(this.pTrack.bRangeSlider){this.pTrack.pHighPointer=document.getElementById(K);if(!this.pTrack.pHighPointer){throw (new TypeError("Could not create new high slider pointer."))}}if(this.pTrack.bActiveOverlay){this.pTrack.pActiveOverlayPointer=document.getElementById(O);if(!this.pTrack.pActiveOverlayPointer){throw (new TypeError("Could not create new active overlay pointer."))
}this.pTrack.pActiveOverlayPointer.pTrack=this.pTrack}this.pTrack.pLowPointer.pTrack=this.pTrack;if(this.pTrack.bRangeSlider){this.pTrack.pHighPointer.pTrack=this.pTrack}this.pTrack.pLowPointer.startOffsetX=0;this.pTrack.pLowPointer.startOffsetY=0;this.pTrack.pLowPointer.iHiLoInd=0;if(this.pTrack.bRangeSlider){this.pTrack.pHighPointer.startOffsetX=0;this.pTrack.pHighPointer.startOffsetY=0;this.pTrack.pHighPointer.iHiLoInd=1;this.pTrack.pHighPointer.onmousedown=cyberC21SliderHandleOnMouseDown}this.pTrack.pLowPointer.onmousedown=cyberC21SliderHandleOnMouseDown;
this.pTrack.onmousedown=cyberC21SliderHandleTrackOnClick;if(this.pTrack.bActiveOverlay){this.pTrack.pActiveOverlayPointer.onmousedown=cyberC21SliderHandleOverlayOnClick}this.SetValues=function(a,e,c){var b=Math.round(parseFloat(a)/parseFloat(T));var d=Math.round(parseFloat(e)/parseFloat(T));this.realSetValues(b,d,c)};this.realSetValues=function(a,f,d){if(this.pTrack.bRangeSlider&&a>f){var c=a;a=f;f=c}if(a>this.pTrack.iHighBound){a=this.pTrack.iHighBound}if(a<this.pTrack.iLowBound){a=this.pTrack.iLowBound}if(this.pTrack.bRangeSlider){if(f>this.pTrack.iHighBound){f=this.pTrack.iHighBound
}if(f<this.pTrack.iLowBound){f=this.pTrack.iLowBound}this.pTrack.fHighValue=f}this.pTrack.fLowValue=a;var e=(a-this.pTrack.iEffectiveBound)/this.pTrack.scale;if(this.pTrack.bRangeSlider){var b=(f-this.pTrack.iEffectiveBound)/this.pTrack.scale}this.getSetObjectLeft(this.pTrack.pLowPointer,Math.round(e+this.pTrack.xMin));if(this.pTrack.bRangeSlider){this.getSetObjectLeft(this.pTrack.pHighPointer,Math.round(b+this.pTrack.xMin))}if(this.pTrack.bActiveOverlay){if(this.pTrack.bRangeSlider){this.pTrack.pActiveOverlayPointer.style.left=this.getSetObjectLeft(this.pTrack.pLowPointer)+this.pTrack.iFgWidth+"px";
this.pTrack.pActiveOverlayPointer.style.width=this.getSetObjectLeft(this.pTrack.pHighPointer)-this.getSetObjectLeft(this.pTrack.pLowPointer)+"px"}else{this.pTrack.pActiveOverlayPointer.style.left=this.pTrack.xMin;this.pTrack.pActiveOverlayPointer.style.width=this.getSetObjectLeft(this.pTrack.pLowPointer)+"px"}}if(d&&this.pTrack.onMoveComplete){this.pTrack.onMoveComplete(this)}};this.GetLowValue=function(){var a=(this.pTrack.fLowValue*this.pTrack.iResolution);if(a<this.pTrack.iRealLowBound){a=this.pTrack.iRealLowBound
}return a};this.GetHighValue=function(){var a=(this.pTrack.fHighValue*this.pTrack.iResolution);if(a>this.pTrack.iRealHighBound){a=this.pTrack.iRealHighBound}return a};this.Destroy=function(){if(document.removeEventListener){document.removeEventListener("mousemove",cyberC21SliderHandleOnMouseMove,false);document.removeEventListener("mouseup",cyberC21SliderHandleOnMouseUp,false)}else{if(document.detachEvent){document.detachEvent("onmousemove",cyberC21SliderHandleOnMouseMove);document.detachEvent("onmouseup",cyberC21SliderHandleOnMouseUp)
}}this.pTrack.pLowPointer.onmousedown=null;if(this.pTrack.bRangeSlider){this.pTrack.pHighPointer.onmousedown=null}this.pTrack.onclick=null;this.pContainer.innerHTML=""};this.getSetObjectLeft=function(a,b){if(a.style&&(typeof (a.style.left)=="string")){if(typeof (b)=="number"){a.style.left=b+"px"}else{b=parseInt(a.style.left);if(isNaN(b)){b=0}}}else{if(a.style&&a.style.pixelLeft){if(typeof (b)=="number"){a.style.pixelLeft=b}else{b=a.style.pixelLeft}}}return b};this.findPosY=function(b){var a=0;if(document.getElementById||document.all){if(!b.offsetParent){a+=b.offsetTop
}while(b.offsetParent){a+=b.offsetTop;b=b.offsetParent}}else{if(document.layers){a+=b.y}}return a};this.findPosX=function(a){var b=0;if(document.getElementById||document.all){while(a.offsetParent){b+=a.offsetLeft;a=a.offsetParent}}else{if(document.layers){b+=a.x}}return b};this.getSetObjectTop=function(a,b){if(a.style&&(typeof (a.style.top)=="string")){if(typeof (b)=="number"){a.style.top=b+"px"}else{b=parseInt(a.style.top);if(isNaN(b)){b=0}}}else{if(a.style&&a.style.pixelTop){if(typeof (b)=="number"){a.style.pixelTop=b
}else{b=a.style.pixelTop}}}return b};this.HandleTrackOnClick=function(b){var g=0;if(b.pageX){g=b.pageX}else{if(b.clientX){g=b.clientX+(document.body.scrollLeft?document.body.scrollLeft:0)}}var e=g-this.findPosX(this.pTrack)-(this.pTrack.iFgWidth/2)-this.pTrack.xMin;var c=Math.round((e*this.pTrack.scale+this.pTrack.iEffectiveBound));var d=(c-this.pTrack.iEffectiveBound)/(this.pTrack.scale);if(d>this.pTrack.xMax){d=this.pTrack.xMax}if(d<this.pTrack.xMin){d=0}if(this.pTrack.bRangeSlider){var f=this.findPosX(this.pTrack.pLowPointer);
var a=this.findPosX(this.pTrack.pHighPointer);if(Math.abs(g-f)>Math.abs(g-a)){this.getSetObjectLeft(this.pTrack.pHighPointer,Math.round(d+this.pTrack.xMin));this.pTrack.fHighValue=c}else{this.getSetObjectLeft(this.pTrack.pLowPointer,Math.round(d+this.pTrack.xMin));if(this.getSetObjectLeft(this.pTrack.pLowPointer)>this.getSetObjectLeft(this.pTrack.pHighPointer)){this.getSetObjectLeft(this.pTrack.pLowPointer,this.getSetObjectLeft(this.pTrack.pHighPointer));this.getSetObjectLeft(this.pTrack.pHighPointer,Math.round(d+this.pTrack.xMin));
this.pTrack.fHighValue=c}else{this.pTrack.fLowValue=c}}}else{this.getSetObjectLeft(this.pTrack.pLowPointer,Math.round(d+this.pTrack.xMin));this.pTrack.fLowValue=c}if(this.pTrack.bActiveOverlay){if(this.pTrack.bRangeSlider){this.pTrack.pActiveOverlayPointer.style.left=this.getSetObjectLeft(this.pTrack.pLowPointer)+this.pTrack.iFgWidth+"px";this.pTrack.pActiveOverlayPointer.style.width=this.getSetObjectLeft(this.pTrack.pHighPointer)-this.getSetObjectLeft(this.pTrack.pLowPointer)+"px"}else{this.pTrack.pActiveOverlayPointer.style.left=this.pTrack.xMin;
this.pTrack.pActiveOverlayPointer.style.width=this.getSetObjectLeft(this.pTrack.pLowPointer)+"px"}}if(this.pTrack.onMoveComplete){this.pTrack.onMoveComplete(this)}};this.HandleOnMouseDown=function(a){if(g_pCurrentMovingPointer){g_pCurrentMovingPointer.startOffsetX=this.getSetObjectLeft(g_pCurrentMovingPointer)-a.screenX;g_pCurrentMovingPointer.startOffsetY=this.getSetObjectTop(g_pCurrentMovingPointer)-a.screenY;if(this.pTrack.pHighPointer){g_pCurrentMovingPointer.startHiX=this.getSetObjectLeft(this.pTrack.pHighPointer)
}else{g_pCurrentMovingPointer.startHiX=this.pTrack.xMax}if(this.pTrack.pLowPointer){g_pCurrentMovingPointer.startLoX=this.getSetObjectLeft(this.pTrack.pLowPointer)}else{g_pCurrentMovingPointer.startHiX=this.pTrack.xMin}this.pTrack.bInDrag=true;if(window.addEventListener){document.addEventListener("mousemove",cyberC21SliderHandleOnMouseMove,false);document.addEventListener("mouseup",cyberC21SliderHandleOnMouseUp,false)}else{document.attachEvent("onmouseup",cyberC21SliderHandleOnMouseUp);document.attachEvent("onmousemove",cyberC21SliderHandleOnMouseMove)
}}return false};this.HandleOnMouseMove=function(b){if(this.pTrack.bInDrag&&g_pCurrentMovingPointer){var a=g_pCurrentMovingPointer.startOffsetX+b.screenX;if(a>this.pTrack.xMax+this.pTrack.xMin){a=this.pTrack.xMax+this.pTrack.xMin}if(a<this.pTrack.xMin){a=this.pTrack.xMin}var d=a;var e=(parseFloat(this.pTrack.iDistance)/parseFloat(this.pTrack.iNumElements))*Math.round(parseFloat(this.pTrack.iNumElements)*parseFloat(d)/parseFloat(this.pTrack.iDistance));var c=Math.round((e*this.pTrack.scale+this.pTrack.iEffectiveBound));
if(g_pCurrentMovingPointer.iHiLoInd){if(c<this.pTrack.fLowValue){return }this.pTrack.fHighValue=c;if(this.pTrack.bRangeSlider&&a<g_pCurrentMovingPointer.startLoX){a=this.getSetObjectLeft(this.pTrack.pLowPointer)}}else{if(this.pTrack.bRangeSlider&&c>this.pTrack.fHighValue){return }this.pTrack.fLowValue=c;if(this.pTrack.bRangeSlider&&a>g_pCurrentMovingPointer.startHiX){a=this.getSetObjectLeft(this.pTrack.pHighPointer)}}this.getSetObjectLeft(g_pCurrentMovingPointer,a);if(this.pTrack.bActiveOverlay){if(this.pTrack.bRangeSlider){this.pTrack.pActiveOverlayPointer.style.left=this.getSetObjectLeft(this.pTrack.pLowPointer)+this.pTrack.iFgWidth+"px";
this.pTrack.pActiveOverlayPointer.style.width=this.getSetObjectLeft(this.pTrack.pHighPointer)-this.getSetObjectLeft(this.pTrack.pLowPointer)+"px"}else{this.pTrack.pActiveOverlayPointer.style.left=this.pTrack.xMin;this.pTrack.pActiveOverlayPointer.style.width=this.getSetObjectLeft(this.pTrack.pLowPointer)+"px"}}if(this.pTrack.onMove){this.pTrack.onMove(this)}return false}return };this.HandleOnMouseUp=function(a){if(this.pTrack.bInDrag&&g_pCurrentMovingPointer){var c=null;if(g_pCurrentMovingPointer.iHiLoInd){c=(this.pTrack.fHighValue)?this.pTrack.fHighValue:0
}else{c=(this.pTrack.fLowValue)?this.pTrack.fLowValue:0}var f=(c-this.pTrack.iEffectiveBound)/(this.pTrack.scale);f=(f>this.pTrack.xMax)?this.pTrack.xMax:f;f=(f<this.pTrack.xMin)?this.pTrack.xMin:f;if(g_pCurrentMovingPointer){var b=this.findPosX(g_pCurrentMovingPointer);if(!this.pTrack.bRangeSlider||g_pCurrentMovingPointer.iHiLoInd){var e=this.findPosX(this.pTrack.pLowPointer);if(b<e){f+=(this.pTrack.iFgWidth/2)}}else{var d=this.findPosX(this.pTrack.pHighPointer);if(b>=d){f-=(this.pTrack.iFgWidth/2)}}this.getSetObjectLeft(g_pCurrentMovingPointer,f)
}if(document.removeEventListener){document.removeEventListener("mousemove",cyberC21SliderHandleOnMouseMove,false);document.removeEventListener("mouseup",cyberC21SliderHandleOnMouseUp,false)}else{if(document.detachEvent){document.detachEvent("onmousemove",cyberC21SliderHandleOnMouseMove);document.detachEvent("onmouseup",cyberC21SliderHandleOnMouseUp)}}}this.pTrack.bInDrag=false;this.realSetValues(this.pTrack.fLowValue,this.pTrack.fHighValue,true)};this.realSetValues(Q,R,false)}var g_pCurrentMovingPointer=null;
function cyberC21SliderHandleOnMouseDown(A){if(!A){A=window.event}var B=(A.target)?A.target:A.srcElement;if(B&&B.pTrack){g_pCurrentMovingPointer=B;return B.pTrack.pMyself.HandleOnMouseDown(A)}}function cyberC21SliderHandleOnMouseMove(A){if(!A){A=window.event}var B=g_pCurrentMovingPointer;if(B&&B.pTrack){return B.pTrack.pMyself.HandleOnMouseMove(A)}}function cyberC21SliderHandleOnMouseUp(A){if(!A){A=window.event}var B=g_pCurrentMovingPointer;if(B&&B.pTrack){return B.pTrack.pMyself.HandleOnMouseUp(A)}}function cyberC21SliderHandleTrackOnClick(A){if(!A){A=window.event
}var B=(A.target)?A.target:A.srcElement;if(B&&B.pMyself){return B.pMyself.HandleTrackOnClick(A)}}function cyberC21SliderHandleOverlayOnClick(A){if(!A){A=window.event}var B=(A.target)?A.target:A.srcElement;if(B&&B.pTrack){return B.pTrack.pMyself.HandleTrackOnClick(A)}};
function SmoothMovement(_1,_2,_3){_1=Math.round(_1);_2=Math.round(_2);_3=(_3?Math.round(_3):0);this.updatePosition=function(){_1+=_3;if(_3<0){if(_1-_3*(_3-1)/2<_2){_3++;}else{if(_1-(_3-1)*(_3-2)/2>=_2){_3--;}}}else{if(_1+_3*(_3+1)/2>_2){_3--;}else{if(_1+(_3+1)*(_3+2)/2<=_2){_3++;}}}return _1;};this.changeTarget=function(_4){_2=Math.round(_4);};this.getPosition=function(){return _1;};this.getVelocity=function(){return _3;};this.hasStopped=function(){return (_1==_2&&_3==0);};}

var g_pBrowser=new Object();g_pBrowser.bIsMsIe=false;g_pBrowser.bIsFirefox=false;g_pBrowser.bIsSafari=false;g_pBrowser.bIsOpera=false;g_pBrowser.fVersionMajor=1;try{if(navigator.appName=="Microsoft Internet Explorer"){if(navigator.userAgent.indexOf("Opera")==-1){g_pBrowser.bIsMsIe=true;document.execCommand("BackgroundImageCache",false,true)}}if(navigator.userAgent.indexOf("Opera")!=-1){g_pBrowser.bIsOpera=true}if(navigator.userAgent.indexOf("Firefox")!=-1){g_pBrowser.bIsFirefox=true}if(navigator.userAgent.indexOf("Safari")!=-1){g_pBrowser.bIsSafari=true
}if(g_pBrowser.bIsMsIe){g_pBrowser.fVersionMajor=parseFloat(navigator.appVersion.split("MSIE")[1])}else{g_pBrowser.fVersionMajor=parseInt(navigator.appVersion)}}catch(err){}function HasClass(a,b){if(typeof a=="string"){a=document.getElementById(a)}if(a&&a.className){return a.className.match(new RegExp("(\\s|^)"+b+"(\\s|$)"))}return false}function AddClass(a,b){if(typeof a=="string"){a=document.getElementById(a)}if(a){if(!this.HasClass(a,b)){a.className+=" "+b;return true}}return false}function RemoveClass(a,c){if(typeof a=="string"){a=document.getElementById(a)
}if(a){if(HasClass(a,c)){var b=new RegExp("(\\s|^)"+c+"(\\s|$)");a.className=a.className.replace(b," ");return true}}return false}function AddClassToChildTags(b,d,e){if(typeof b=="string"){b=document.getElementById(b)}var c=b.getElementsByTagName(d);if(c&&c.length>0){for(var a=0;a<c.length;a++){AddClass(c[a],e)}}}function RemoveClassFromChildTags(b,d,e){if(typeof b=="string"){b=document.getElementById(b)}var c=b.getElementsByTagName(d);if(c&&c.length>0){for(var a=0;a<c.length;a++){RemoveClass(c[a],e)}}}function trim(a){return a.replace(/^\s+|\s+$/g,"")
}function ltrim(a){return a.replace(/^\s+/,"")}function rtrim(a){return a.replace(/\s+$/,"")}function GetNodeValue(c,a){if(c){var b=c.getElementsByTagName(a);if(b&&b[0]){if(b[0].firstChild){return b[0].firstChild.nodeValue}}}return""}function AddCommas(b){b+="";x=b.split(".");x1=x[0];x2=x.length>1?"."+x[1]:"";var a=/(\d+)(\d{3})/;while(a.test(x1)){x1=x1.replace(a,"$1,$2")}return x1+x2}function CyberCoreFindWidth(b){var a=0;if(document.getElementById||document.all){a=b.offsetWidth}else{if(document.layers){a=b.width
}}return a}function CyberCoreFindHeight(b){var a=0;if(document.getElementById||document.all){a=b.offsetHeight}else{if(document.layers){a=b.height}}return a}function CyberCoreFindPosX(a){var b=0;if(document.getElementById||document.all){while(a.offsetParent){b+=a.offsetLeft;a=a.offsetParent}}else{if(document.layers){b+=a.x}}return b}function CyberCoreFindPosY(b){var a=0;if(document.getElementById||document.all){if(!b.offsetParent){a+=b.offsetTop}while(b.offsetParent){a+=b.offsetTop;b=b.offsetParent}}else{if(document.layers){a+=b.y
}}return a}function CyberCoreAddEvent(b,e,a,c){if(b.addEventListener){b.addEventListener(e,a,c);return true}else{if(b.attachEvent){var d=b.attachEvent("on"+e,a);return d}else{return false}}}function GetScrollTop(){return this.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop}function DisableFormElements(c,b){if(typeof c=="string"){c=document.getElementById(c)}var d=c.getElementsByTagName("input");if(d&&d.length>0){for(var a=0;a<d.length;a++){d[a].disabled=b}}d=c.getElementsByTagName("select");
if(d&&d.length>0){for(var a=0;a<d.length;a++){d[a].disabled=b}}d=c.getElementsByTagName("checkbox");if(d&&d.length>0){for(var a=0;a<d.length;a++){d[a].disabled=b}}}function GetElementsByClassName(b){var a=[];var f=new RegExp("\\b"+b+"\\b");var e=this.getElementsByTagName("*");for(var d=0;d<e.length;d++){var c=e[d].className;if(f.test(c)){a.push(e[d])}}return a}function GetEventInformation(b){var c=new Object();var a=0;var d=0;if(!b){var b=window.event}if(b.pageX||b.pageY){a=b.pageX;d=b.pageY}else{if(b.clientX||b.clientY){a=b.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;
d=b.clientY+document.body.scrollTop+document.documentElement.scrollTop}}c.iPosX=a;c.iPosY=d;c.pTarget=b.relatedTarget||b.fromElement;return c}function FormDataEnteredInContainer(c){if(typeof c=="string"){c=document.getElementById(c)}if(!c){return false}var b=false;var d=c.getElementsByTagName("input");for(var a=0;a<d.length;a++){if((d[a].type=="text"||d[a].type=="hidden")&&d[a].name!="svf"){if(d[a].strDefaultValue){if(!((d[a].value==d[a].strDefaultValue)||(d[a].value==""))){b=true}}else{if(d[a].value!=""){b=true
}}}return b}return false}function clearDefaultValue(b){var a=window.event?window.event.srcElement:b?b.target:null;if(!a){return}if(a.value==a.strDefaultValue){a.value=""}}function setDefaultValue(b){var a=window.event?window.event.srcElement:b?b.target:null;if(!a){return}if(a.value==""&&a.strDefaultValue){a.value=a.strDefaultValue}}function BindDefaultValue(f,d,a){var c=document.getElementById(f);if(c){var e=c.getElementsByTagName("input");if(e&&e.length>0){for(var b=0;b<e.length;b++){if(e[b].name==d){e[b].strDefaultValue=a;
CyberCoreAddEvent(e[b],"focus",clearDefaultValue,false);CyberCoreAddEvent(e[b],"blur",setDefaultValue,false)}}}}}function RemoveAllDefaultData(b){if(b){for(var a=0;a<b.elements.length;a++){if(b.elements[a].type=="text"||b.elements[a].type=="hidden"){if(b.elements[a].strDefaultValue){if(b.elements[a].value==b.elements[a].strDefaultValue){b.elements[a].value=""}}}}}}function SetInnerHtml(a,c){var b=document.getElementById(a);if(b){b.innerHTML=c}}function KeystokeWasEnter(b){var a=(b.which==undefined)?b.keyCode:b.which;
if(a==13){return true}return false}function SetOnEmpty(a,c){var b=document.getElementById(a);if(b){if(b.value==""){b.value=c}}}function GetHiddenFieldIntValue(c,b){if(b==null){b=0}var a=document.getElementById(c);if(a){if(a.value!=""){return parseInt(a.value)}}return b}function GetHiddenFieldFloatValue(b){var a=document.getElementById(b);if(a){if(a.value!=""){return parseFloat(a.value)}}return 0}function getCookieVal(b){var a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length}return(unescape(document.cookie.substring(b,a)))
}function GetCookie(d){var b=d+"=";var f=b.length;var a=document.cookie.length;var e=0;while(e<a){var c=e+f;if(document.cookie.substring(e,c)==b){return(getCookieVal(c))}e=document.cookie.indexOf(" ",e)+1;if(e==0){break}}return(null)}function SetCookie(b,d,a,f,c,e){document.cookie=b+"="+escape(d)+((a)?"; expires="+a.toGMTString():"")+((f)?"; path="+f:"")+((c)?"; domain="+c:"")+((e)?"; secure":"")}function SubmitFormOnEnter(b,a){if(a){if(KeystokeWasEnter(b)){if(a.form){if(a.form.onsubmit){a.form.onsubmit()}a.form.submit()
}}}}function callFunctionOnEnter(b,a){var d;var c;if(window.event){d=b.keyCode}else{if(b.which){d=b.which}}if(d==13){a();return false}return true}var g_pDragObject=null;function clFinishDrag(h){document.onmouseup=null;if(!h){h=window.event}if(!h){return}var g=h.target!=null?h.target:h.srcElement;while(g){if(g.className.search("draggable_row")>=0){if(g_pDragObject.rowIndex==g.rowIndex){return false}var f=false;var c=document.getElementsByTagName("table");for(var b=0;b<c.length&&!f;b++){if(c[b].className.search("draggable_table")>=0){var d=c[b];
f=true}}if(!d){alert("couldn't find table")}var a=g_pDragObject.cloneNode(true);if(g_pDragObject.rowIndex<g.rowIndex){g=g.nextSibling}d.getElementsByTagName("tbody")[0].insertBefore(g_pDragObject,g);return false}g=g.parentNode}return false}function clStartDrag(b){if(!b){b=window.event}if(!b){return}var a=b.target!=null?b.target:b.srcElement;while(a){if(a.className.search("draggable_row")>=0){g_pDragObject=a;document.onmouseup=clFinishDrag;b.returnValue=false;return false}a=a.parentNode}return false}function EmbedFlashVideo(c,b,a){AC_FL_RunContent("codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0","width","320","height","190","quality","high","pluginspage","http://www.macromedia.com/go/getflashplayer","align","middle","play","true","loop","true","scale","noscale","wmode","transparent","devicefont","false","bgcolor","#ffffff","menu","false","allowFullScreen","false","allowScriptAccess","sameDomain","salign","tl","src",c,"id",c,"name",c,"movie","/flash/careerfranchise/videoPlayer?preview="+a+"&video="+b)
}function EmbedCyberFlashVideo(g,c,b,d,f,e){var a="&bigplay=false";if(e){a="&bigplay=true"}AC_FL_RunContent("codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0","width",d,"height",f+10,"quality","high","pluginspage","http://www.macromedia.com/go/getflashplayer","align","middle","play","true","loop","true","scale","noscale","wmode","transparent","devicefont","false","bgcolor","#ffffff","menu","false","allowFullScreen","false","allowScriptAccess","sameDomain","salign","tl","bigplay","false","id",g,"src",g,"name",g,"movie","/flash/C21EnhVP?preview="+b+"&video="+c+"&id="+g+a)
}function HideVideoPopup(){var a=document.getElementById("videopopup");if(a){a.style.display="none"}}function ShowVideoPopup(){var a=document.getElementById("videopopup");if(a){a.style.display="inline"}}function SetCyberVideoPopup(g,b,a,c,d){var f=document.getElementById("videoframe");if(f){f.src="/aboutus/videoframed.jsp?videoid="+g+"&videopath="+b+"&videoimage="+a+"&videotype="+d}var e=document.getElementById("videodescription");if(e){e.innerHTML=c}ShowVideoPopup()}function HideC21VideoPopup(){var a=document.getElementById("c21videopopup");
AddClass(a,"hide");HideModal()}function ShowC21VideoPopup(){var a=document.getElementById("c21videopopup");a.style.top=GetScrollTop()+60+(!g_pBrowser.bIsMsIe&&!g_pBrowser.bIsFirefox?"px":"");RemoveClass(a,"hide");a.style.display="inline";a.style.zIndex=50000;ShowModal()}var award_headers=new Array();award_headers.herovideo1="/flash/ceohome/agenttop/top_lwhite.jpg";award_headers.herovideo2="/flash/ceohome/agenttop/top_andyj.jpg";award_headers.herovideo3="/flash/ceohome/agenttop/top_bparry.jpg";award_headers.herovideo4="/flash/ceohome/agenttop/top_richd.jpg";
award_headers.herovideo5="/flash/ceohome/agenttop/top_lscope.jpg";award_headers.herovideo6="/flash/ceohome/agenttop/top_dbow.jpg";award_headers.herovideo7="/flash/ceohome/agenttop/top_annb.jpg";award_headers.herovideo8="/flash/ceohome/agenttop/top_tomg.jpg";function SetC21VideoPopup(s,c,p,e,q,r,l,m){var b=document.getElementById("c21videopopup");var i=document.getElementById("vcontainer");var k=document.getElementById("c21videoframe");var f=r+50;var g=q+92;var a=r;var d=q;var n=r+50;if(l==null||l==""||l=="flv"){a=a+10
}else{a=a+3;d=d+2}if(m==null){m=""}if(k){k.style.height=(a)+"px";k.style.width=(q)+"px";k.src="/includes/video_framed.jsp?videoid="+s+"&videopath="+c+"&videoimage="+p+"&height="+r+"&width="+q+"&videotype="+l+"&embedcode="+CyberUrlEncode(m)}if(i){i.style.height=(n)+"px";i.style.width=(q)+"px"}if(b){b.style.height=(f)+"px";b.style.width=(g)+"px"}var o=document.getElementById("c21videodescription");if(o){o.innerHTML=e}var h=document.getElementById("award_label");var j=document.getElementById("award_header");if(award_headers[s]!=null&&award_headers[s]!=""&&h&&j){f=f+60;
n=n+60;i.style.height=(n)+"px";b.style.height=(f)+"px";RemoveClass(j,"hide");h.src=award_headers[s]}else{AddClass(j,"hide")}ShowC21VideoPopup()};
function SelectHero(A){}function MovePropSliderLeft(C,B,H,F,I){if(g_bInMove){return }g_bInMove=true;var L=document.getElementById(C);if(L){var J=0;var D=0;if(!L.style.width||L.style.width==""){var A=L.getElementsByTagName("div");if(A&&A.length>0){for(var G=0;G<A.length;G++){D+=CyberCoreFindWidth(A[G])+8}}L.style.width=D+"px"}else{D=parseInt(L.style.width)}if(L.style.marginLeft!=null&&L.style.marginLeft!=""){J=parseInt(L.style.marginLeft)}L.style.marginLeft=J+"px";if(J<0){var E=J+(B*H);var K=new SmoothMovement(J,E,-7);
window.setTimeout(function(){UpdatePropSliderSlide(L,K,E,F,I)},20)}else{g_bInMove=false}}}function MovePropSliderRight(D,C,I,G,J){if(g_bInMove){return }g_bInMove=true;var M=document.getElementById(D);if(M){var K=0;var E=0;if(!M.style.width||M.style.width==""){var A=M.getElementsByTagName("div");if(A&&A.length>0){for(var H=0;H<A.length;H++){if(A[H].className=="feature"){E+=CyberCoreFindWidth(A[H])+10}}}M.style.width=E+"px"}else{E=parseInt(M.style.width)}if(M.style.marginLeft!=null&&M.style.marginLeft!=""){K=parseInt(M.style.marginLeft)
}M.style.marginLeft=K+"px";var F=K-(C*I);E=E-24;if(Math.abs(F)<E){var L=new SmoothMovement(K,F,7);window.setTimeout(function(){UpdatePropSliderSlide(M,L,F,G,J)},20)}else{g_bInMove=false;var B=document.getElementById(J);B.src="/images/detail/nextphoto_disabled.gif"}}}function UpdatePropSliderSlide(D,A,F,B,H){var G=A.updatePosition();D.style.marginLeft=G+"px";if(G!=F){window.setTimeout(function(){UpdatePropSliderSlide(D,A,F,B,H)},20)}else{g_bInMove=false;var E=document.getElementById(B);if(F>=0){E.src="/images/detail/previousphoto_disabled.gif"
}else{E.src="/images/detail/previousphoto.gif"}var C=document.getElementById(H);if(Math.abs(F)>=parseInt(D.style.width)/2){C.src="/images/detail/nextphoto_disabled.gif"}else{C.src="/images/detail/nextphoto.gif"}}}function MoveFeaturesLeft(A){if(g_bInMove){return }g_bInMove=true;var C=document.getElementById("featurescontainer");if(C){var H=0;var F=0;if(!C.style.width||C.style.width==""){var E=C.getElementsByTagName("div");if(E&&E.length>0){for(var D=0;D<E.length;D++){F+=CyberCoreFindWidth(E[D])+8}}C.style.width=F+"px"
}else{F=parseInt(C.style.width)}if(C.style.marginLeft!=null&&C.style.marginLeft!=""){H=parseInt(C.style.marginLeft)}C.style.marginLeft=H+"px";if(H<0){var G=H+(A*95);var B=new SmoothMovement(H,G,-7);window.setTimeout(function(){UpdateFeatureSlide(C,B,G)},20)}else{g_bInMove=false}}}function MoveFeaturesRight(C){if(g_bInMove){return }g_bInMove=true;var I=document.getElementById("featurescontainer");if(I){var G=0;var D=0;if(!I.style.width||I.style.width==""){var A=I.getElementsByTagName("div");if(A&&A.length>0){for(var F=0;
F<A.length;F++){if(A[F].className=="feature"){D+=CyberCoreFindWidth(A[F])+10}}}I.style.width=D+"px"}else{D=parseInt(I.style.width)}if(I.style.marginLeft!=null&&I.style.marginLeft!=""){G=parseInt(I.style.marginLeft)}I.style.marginLeft=G+"px";var E=G-(C*95);D=D-24;if(Math.abs(E)<D){var H=new SmoothMovement(G,E,7);window.setTimeout(function(){UpdateFeatureSlide(I,H,E)},20)}else{g_bInMove=false;var B=document.getElementById("featuresnextbtn");B.src="/images/detail/nextphoto_disabled.gif"}}}function UpdateFeatureSlide(C,A,E){var F=A.updatePosition();
C.style.marginLeft=F+"px";if(F!=E){window.setTimeout(function(){UpdateFeatureSlide(C,A,E)},20)}else{g_bInMove=false;var D=document.getElementById("featurespreviousbtn");if(E>=0){D.src="/images/detail/previousphoto_disabled.gif"}else{D.src="/images/detail/previousphoto.gif"}var B=document.getElementById("featuresnextbtn");if(Math.abs(E)>=parseInt(C.style.width)/2){B.src="/images/detail/nextphoto_disabled.gif"}else{B.src="/images/detail/nextphoto.gif"}}}function ClickFeature(A){dcsMultiTrack("DCS.dcsuri",A,"WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","View Featured Property");
return true};
function InitializeHeros(D,A){var C=document.getElementById(D);if(C){var E=C.getElementsByTagName("div");C.rotationalhero=new Object();C.rotationalhero.iSelectInterval=A;C.rotationalhero.iCurrentHero=1;C.rotationalhero.aHeros=new Array();C.rotationalhero.aControls=new Array();C.rotationalhero.iWidth=CyberCoreFindWidth(C);C.rotationalhero.pSmoothMovement=null;C.rotationalhero.pAnimatingTimer=null;for(var B=0;B<E.length;B++){if(HasClass(E[B],"rotationalhero")){C.rotationalhero.aHeros.push(E[B])}if(HasClass(E[B],"control")){C.rotationalhero.aControls.push(E[B])
}}C.rotationalhero.pRotateInterval=window.setTimeout(function(){SelectHero(D,(C.rotationalhero.iCurrentHero%C.rotationalhero.aHeros.length)+1,true)},(C.rotationalhero.iSelectInterval*1000))}}function SelectHero(H,E,C){var A=document.getElementById(H);if(A&&A.rotationalhero){try{if(A.rotationalhero.pRotateInterval!=null){clearTimeout(A.rotationalhero.pRotateInterval)}if(A.rotationalhero.pAnimatingTimer!=null){clearTimeout(A.rotationalhero.pAnimatingTimer);for(var B=0;B<A.rotationalhero.aHeros.length;B++){if(B==(A.rotationalhero.iCurrentHero-1)){RemoveClass(A.rotationalhero.aHeros[B],"hide")
}else{AddClass(A.rotationalhero.aHeros[B],"hide")}A.rotationalhero.aHeros[B].style.width=A.rotationalhero.iWidth+"px";A.rotationalhero.aHeros[B].style.left="0px";A.rotationalhero.aHeros[B].getElementsByTagName("*")[0].style.marginLeft=""}}A.rotationalhero.pRotateInterval=null;A.rotationalhero.pAnimatingTimer=null}catch(F){}if(A.rotationalhero.iCurrentHero!=E){var I=A.rotationalhero.aHeros[A.rotationalhero.iCurrentHero-1];var D=A.rotationalhero.aHeros[E-1];var G=0;if(E>A.rotationalhero.iCurrentHero){D.style.width="0px";
G=A.rotationalhero.iWidth}else{D.style.width=A.rotationalhero.iWidth+"px";G=0}RemoveClass(I,"hide");RemoveClass(D,"hide");if(E>A.rotationalhero.iCurrentHero){A.rotationalhero.pSmoothMovement=new SmoothMovement(0,A.rotationalhero.iWidth)}else{A.rotationalhero.pSmoothMovement=new SmoothMovement(A.rotationalhero.iWidth,0)}A.rotationalhero.pAnimatingTimer=window.setTimeout(function(){SlideInHero(A,I,D,G,C)},20);RemoveClass(A.rotationalhero.aControls[A.rotationalhero.iCurrentHero-1],"active_control");AddClass(A.rotationalhero.aControls[E-1],"active_control");
A.rotationalhero.iCurrentHero=E}}}function SlideInHero(C,D,B,F,A){var E=C.rotationalhero.pSmoothMovement.updatePosition();if((F>0)&&E>=F){B.style.width=C.rotationalhero.iWidth+"px";AddClass(D,"hide");C.rotationalhero.pAnimatingTimer=null;if(A){C.rotationalhero.pRotateInterval=window.setTimeout(function(){SelectHero(C.id,(C.rotationalhero.iCurrentHero%C.rotationalhero.aHeros.length)+1,true)},(C.rotationalhero.iSelectInterval*1000))}}else{if((F<1)&&E<=F){D.style.width="0px";AddClass(D,"hide");D.style.width=C.rotationalhero.iWidth+"px";
D.style.left="0px";D.getElementsByTagName("*")[0].style.marginLeft="";C.rotationalhero.pAnimatingTimer=null;if(A){C.rotationalhero.pRotateInterval=window.setTimeout(function(){SelectHero(C.id,(C.rotationalhero.iCurrentHero%C.rotationalhero.aHeros.length)+1,true)},(C.rotationalhero.iSelectInterval*1000))}}else{if(F>0){B.style.width=E+"px"}else{D.style.width=E+"px";D.style.left=(C.rotationalhero.iWidth-E)+"px";D.getElementsByTagName("*")[0].style.marginLeft=E-C.rotationalhero.iWidth+"px"}C.rotationalhero.pAnimatingTimer=window.setTimeout(function(){SlideInHero(C,D,B,F,A)
},30)}}}function StopHeroes(B){var A=document.getElementById(B);if(A&&A.rotationalhero){if(A.rotationalhero.pRotateInterval!=null){clearTimeout(A.rotationalhero.pRotateInterval)}}}function ReplaceHeroWithIFrame(C,B,D){var A=document.getElementById(B);if(A){StopHeroes(C);A.innerHTML='<iframe src="'+D+'" width="460" height="384" frameborder="0" marginheight="0" marginwidth="0" scrolling="no"></iframe>'}return false}function VideoPlayerState(B,A){StopHeroes("homepageheroes")};
var g_pProxSlider;var g_pBedSlider;var g_pBathSlider;var g_pPriceSlider;var g_pSqFtSlider;var g_pRentalProxSlider;var g_pRentalBedSlider;var g_pRentalBathSlider;var g_pRentalPriceSlider;var g_pRentalSqFtSlider;var g_pAreaPriceSlider;var g_pAreaEduAtmSlider;var g_pAreaAgeSlider;var g_pAreaIncomeSlider;var g_pAreaEduLevelSlider;var g_pAreaWKidsSlider;var g_pAreaDensitySlider;var g_bInitializeComplete=false;var g_strLastSearchUrl="";var g_bIgnoreSearchInput=false;var g_iPriceLowBound=0;var g_iPriceHighBound=950000;
var g_iPriceIncrement=50000;var g_iPriceRentHighBound=5000;var g_iPriceRentIncrement=200;RfgQueueCommand("InitializeSliders%28%29%3B");function SidebarTabOnClick(c){var d=document.getElementById("sidebar_tabframe");if(d){var a=d.getElementsByTagName("div");if(a&&a.length>0){for(var b=0;b<a.length;b++){if(a[b].id==c){AddClass(a[b],"active_tab");a[b].style.zIndex=5;RemoveClass(a[b].id+"_content","hide")}else{RemoveClass(a[b],"active_tab");a[b].style.zIndex=(a.length-b);AddClass(a[b].id+"_content","hide")}}}}return false
}function SidebarToggleSaleRental(c){var a=document.getElementById("sidebar_tab_property_content");var b=document.getElementById("sidebar_tab_rental_content");if(a&&b){if(c){RemoveClass(a,"hide");AddClass(b,"hide")}else{RemoveClass(b,"hide");AddClass(a,"hide")}}return false}function ShowPropertyMapSearch(b){if(g_previewMode){return false}var d=document.getElementById("propertywhere_1");if(b){d=document.getElementById("rentalwhere_1")}var c="/search/map.jsp";var a="?";if(d&&d.value){c+=a+"wheresync="+d.value;
a="&"}if(b){c+=a+"tab=rental"}document.location.href=c}function ReviseMapSelections(a){if(a){var b=document.getElementById("sidebar_form_rental");if(b){b.action="/search/map.jsp";b.submit()}}else{var b=document.getElementById("sidebar_form_property");if(b){b.action="/search/map.jsp";b.submit()}}}function ShowPropertyLocationSearch(h){if(h!=null){h.returnValue=false}for(var b=1;b<=4;b++){var g=document.getElementById("propertyshape_"+b);if(g){g.value=""}}for(var b=1;b<=4;b++){var g=document.getElementById("rentalshape_"+b);
if(g){g.value=""}}AddClass("propertybymap","hide");RemoveClass("propertybylocation","hide");AddClass("rentalbymap","hide");RemoveClass("rentalbylocation","hide");var f=document.getElementById("sidebar_drawer_property_1_handle");var a=document.getElementById("sidebar_drawer_property_1_content");if(f){f.style.display=""}if(a){a.style.display=""}var c=document.getElementById("sidebar_drawer_rental_1_handle");var d=document.getElementById("sidebar_drawer_rental_1_content");if(c){c.style.display=""}if(d){d.style.display=""
}if(window.ShowShapeList){if(g_pMainSearchMap){g_pMainSearchMap.DeleteAllPolygons()}ShowShapeList();if(window.RestoreSavedShapes){RestoreSavedShapes()}}return true}function ResetAllFormData(b){var c=g_bIgnoreSearchInput;g_bIgnoreSearchInput=true;if(b){for(var a=0;a<b.elements.length;a++){if((b.elements[a].type=="text"||b.elements[a].type=="hidden")&&b.elements[a].name!="svf"){if(b.elements[a].strDefaultValue){b.elements[a].value=b.elements[a].strDefaultValue}else{if(b.elements[a].name!="svf"){b.elements[a].value=""
}}}else{if(b.elements[a].type=="checkbox"){b.elements[a].checked=false}else{if(b.elements[a].type=="select-one"){b.elements[a].selectedIndex=0}}}}}g_bIgnoreSearchInput=c}function ResetPropertySearch(i){var c=g_bIgnoreSearchInput;g_bIgnoreSearchInput=true;i.returnValue=false;ResetAllFormData(document.getElementById("sidebar_form_property"));TogglePropertySearchType(null);UpdateInputGroupStatus("property","1");UpdateInputGroupStatus("property","2");UpdateInputGroupStatus("property","3");UpdateInputGroupStatus("property","4");
var h=GetHiddenFieldIntValue("propertyminbeds");var b=GetHiddenFieldIntValue("propertymaxbeds");var g=GetHiddenFieldIntValue("propertyminbaths");var l=GetHiddenFieldIntValue("propertymaxbaths");var j=GetHiddenFieldIntValue("propertyminprice");var d=GetHiddenFieldIntValue("propertymaxprice");var a=GetHiddenFieldIntValue("propertyminsqft");var k=GetHiddenFieldIntValue("propertymaxsqft");var f=GetHiddenFieldIntValue("propertyproximity");g_pBedSlider.SetValues(h,(b>0)?b:6,true);g_pBathSlider.SetValues(g,(l>0)?l:6,true);
g_pPriceSlider.SetValues(j,(d>0)?d:g_iPriceHighBound,true);g_pSqFtSlider.SetValues(a,(k>0)?k:5000,true);g_pProxSlider.SetValues(f,0,true);if(window.ShowShapeList){if(g_pMainSearchMap){g_pMainSearchMap.DeleteAllPolygons()}ShowShapeList();if(window.RestoreSavedShapes){RestoreSavedShapes()}}else{if(document.getElementById("propertybymap")){ShowPropertyLocationSearch(i)}}g_bIgnoreSearchInput=c;return false}function ResetRentalSearch(i){var c=g_bIgnoreSearchInput;g_bIgnoreSearchInput=true;i.returnValue=false;ResetAllFormData(document.getElementById("sidebar_form_rental"));
document.sidebar_form_rental.rental.value="y";document.sidebar_form_rental.tab.value="rental";TogglePropertySearchType(null);UpdateInputGroupStatus("rental","1");UpdateInputGroupStatus("rental","2");UpdateInputGroupStatus("rental","3");UpdateInputGroupStatus("rental","4");var h=GetHiddenFieldIntValue("rentalminbeds");var b=GetHiddenFieldIntValue("rentalmaxbeds");var g=GetHiddenFieldIntValue("rentalminbaths");var l=GetHiddenFieldIntValue("rentalmaxbaths");var j=GetHiddenFieldIntValue("rentalminprice");var d=GetHiddenFieldIntValue("rentalmaxprice");
var a=GetHiddenFieldIntValue("rentalminsqft");var k=GetHiddenFieldIntValue("rentalmaxsqft");var f=GetHiddenFieldIntValue("rentalproximity");g_pRentalBedSlider.SetValues(h,(b>0)?b:6,true);g_pRentalBathSlider.SetValues(g,(l>0)?l:6,true);g_pRentalPriceSlider.SetValues(j,(d>0)?d:g_iPriceRentHighBound,true);g_pRentalSqFtSlider.SetValues(a,(k>0)?k:5000,true);g_pRentalProxSlider.SetValues(f,0,true);if(window.ShowShapeList){if(g_pMainSearchMap){g_pMainSearchMap.DeleteAllPolygons()}ShowShapeList();if(window.RestoreSavedShapes){RestoreSavedShapes()
}}else{if(document.getElementById("rentalbymap")){ShowPropertyLocationSearch(i)}}g_bIgnoreSearchInput=c;return false}function ResetAgentSearch(b){var a=g_bIgnoreSearchInput;g_bIgnoreSearchInput=true;b.returnValue=false;ResetAllFormData(document.getElementById("sidebar_form_agent"));UpdateInputGroupStatus("agent","1");document.getElementById("sidebar_form_agent").commercial.value="y";g_bIgnoreSearchInput=a;return false}function ResetOfficeSearch(b){var a=g_bIgnoreSearchInput;g_bIgnoreSearchInput=true;b.returnValue=false;
ResetAllFormData(document.getElementById("sidebar_form_office"));UpdateInputGroupStatus("office","1");UpdateInputGroupStatus("office","2");g_bIgnoreSearchInput=a;return false}function ResetAreaSearch(i){var c=g_bIgnoreSearchInput;g_bIgnoreSearchInput=true;ResetAllFormData(document.getElementById("sidebar_form_area"));document.getElementById("areaop").value="y";var j=GetHiddenFieldIntValue("areaminprice");var h=GetHiddenFieldIntValue("areamaxprice");var a=GetHiddenFieldIntValue("areaeduatm",50);var b=GetHiddenFieldIntValue("areaage",50);
var k=GetHiddenFieldIntValue("areaincome",50);var f=GetHiddenFieldIntValue("areaedulevel",50);var d=GetHiddenFieldIntValue("areawkids",50);var g=GetHiddenFieldIntValue("areadensity",50);g_pAreaPriceSlider.SetValues(j,(h>0)?h:g_iPriceHighBound,true);g_pAreaEduAtmSlider.SetValues(a,0,true);g_pAreaAgeSlider.SetValues(b,0,true);g_pAreaIncomeSlider.SetValues(k,0,true);g_pAreaEduLevelSlider.SetValues(f,0,true);g_pAreaWKidsSlider.SetValues(d,0,true);g_pAreaDensitySlider.SetValues(g,0,true);UpdateInputGroupStatus("area","1");
UpdateInputGroupStatus("area","2");UpdateInputGroupStatus("area","3");g_bIgnoreSearchInput=c;return false}function UpdateInputGroupStatus(b,f){var j=document.getElementById("sidebar_drawer_"+b+"_"+f+"_openmarker");var g=document.getElementById("sidebar_drawer_"+b+"_"+f+"_closedmarker");if(j||g){var h="sidebar_drawer_"+b+"_"+f+"_content";var c=document.getElementById(h);if(c){var d=false;var a=c.getElementsByTagName("input");if(a&&a.length>0){for(var e=0;e<a.length;e++){if(a[e].type=="checkbox"||a[e].type=="radio"){if(a[e].checked){d=true
}}else{if(a[e].type=="text"||a[e].type=="hidden"){if(a[e].value!=""){if(a[e].strDefaultValue){if(a[e].value!=a[e].strDefaultValue){d=true}}else{d=true}}}}}}a=c.getElementsByTagName("select");if(a&&a.length>0){for(var e=0;e<a.length;e++){if(a[e].options[a[e].selectedIndex].value!=""){d=true}}}if(d){if(j){j.innerHTML='<img src="/images/sidebar/checkmark.gif" width="14" height="14" border="0">'}if(g){g.innerHTML='<img src="/images/sidebar/checkmark.gif" width="14" height="14" border="0">'}}else{if(j){j.innerHTML=""
}if(g){g.innerHTML=""}}}}}function syncHybridSelector(e){var d=document.getElementById("hybridcb_1");var c=document.getElementById("hybridcb_2");var b=document.getElementById("brandcd_1");var a=document.getElementById("brandcd_2");if(d){d.checked=e}if(c){c.checked=e}if(b&&e){b.value="2"}if(a&&e){a.value="2"}UpdatePropertySearchLimits()}function syncOpenHouseSelector(c){dcsMultiTrack("DCS.dcsuri",location.href,"WT.cg_n","Indirect Conversion","WT.z_engage_type","Indirect","WT.z_engage_event","Open House");var b=document.getElementById("openhousecb_1");
var a=document.getElementById("openhousecb_2");if(b){b.checked=c}if(a){a.checked=c}UpdatePropertySearchLimits()}function enablePropertyMlsSearch(b,a){if(b){if(RemoveClass("propertymlsgroupcontainer","disabled")||a){DisableFormElements("propertymlsgroupcontainer",false)}if(RemoveClass("rentalmlsgroupcontainer","disabled")||a){DisableFormElements("rentalmlsgroupcontainer",false)}}else{if(AddClass("propertymlsgroupcontainer","disabled")||a){DisableFormElements("propertymlsgroupcontainer",true)}if(AddClass("rentalmlsgroupcontainer","disabled")||a){DisableFormElements("rentalmlsgroupcontainer",true)
}}}function enablePropertyWhereSearch(b,a){if(b){if(RemoveClass("propertywheregroupcontainer","disabled")||a){DisableFormElements("propertywheregroupcontainer",false)}if(RemoveClass("rentalwheregroupcontainer","disabled")||a){DisableFormElements("rentalwheregroupcontainer",false)}}else{if(AddClass("rentalwheregroupcontainer","disabled")||a){DisableFormElements("rentalwheregroupcontainer",true)}}}function TogglePropertySearchType(c){var b=false;if(c&&(c.name=="mls"||c.name=="where")){if(c.strDefaultValue){if(c.value==c.strDefaultValue||c.value==""){b=false
}else{b=true}}else{b=(trim(c.value)!="")}if(b){if(c.name=="mls"){enablePropertyWhereSearch(false,false)}else{enablePropertyMlsSearch(false,false)}return}}var a=document.getElementById("propertywheregroupcontainer");var d=document.getElementById("propertymlsgroupcontainer");if(a&&d){var b=false;b=FormDataEnteredInContainer(a);if(b){enablePropertyMlsSearch(false,true);enablePropertyWhereSearch(true,true);return}b=FormDataEnteredInContainer(d);if(b){enablePropertyMlsSearch(true,true);enablePropertyWhereSearch(false,true);
return}enablePropertyMlsSearch(true,true);enablePropertyWhereSearch(true,true)}}function SidebarExpandAllDrawers(b){var c=document.getElementById("sidebar_drawer_"+b+"_container");if(c){var d=c.getElementsByTagName("div");if(d&&d.length>0){for(var a=0;a<d.length;a++){if(d[a].id){if(d[a].id.match(/sidebar_drawer_.*_.*_content/)!=null){RemoveClass(d[a],"hide")}else{if(d[a].id.match(/sidebar_drawer_.*_.*_handle/)!=null){AddClass(d[a],"hide")}}}}}}return false}function SidebarExpandDrawer(b,e){var f="sidebar_drawer_"+b+"_"+e+"_content";
var h="sidebar_drawer_"+b+"_"+e+"_handle";var g="sidebar_drawer_"+b+"_"+e+"_handle_functions";var a=document.getElementById("sidebar_drawer_"+b+"_container");if(a){var c=a.getElementsByTagName("div");if(c&&c.length>0){for(var d=0;d<c.length;d++){if(c[d].id){if(c[d].id.match(/sidebar_drawer_.*_.*_content/)!=null){AddClass(c[d],"hide")}else{if(c[d].id.match(/sidebar_drawer_.*_.*_handle/)!=null){RemoveClass(c[d],"hide")}}}}}var j=document.getElementById(f);j.parentNode.style.visibility="hidden";RemoveClass(j,"hide");
AddClass(h,"hide");AddClass(g,"hide");StartDrawerOpenLoop(j)}return false}function SidebarCollapseDrawer(a,d){var k="sidebar_drawer_"+a+"_"+d+"_handle";var g="sidebar_drawer_"+a+"_"+d+"_content";var h="sidebar_drawer_"+a+"_"+d+"_handle_functions";var f=document.getElementById(g);if(f){var l=CyberCoreFindHeight(f);var e=CyberCoreFindPosY(f);var j=f.getElementsByTagName("div");var n=null;var b=new Array();for(var c=(j.length-1);c>=0;c--){if(HasClass(j[c],"slidercontainer")){b.push(j[c]);j[c].originalBottom=CyberCoreFindPosY(j[c])+CyberCoreFindHeight(j[c])-e
}}f.style.height=l+"px";var m=new SmoothMovement(l,0,7);window.setTimeout(function(){UpdateDrawerClose(f,b,m,l,k,h)},20)}return false}function UpdateDrawerOpen(a,d,b,e,f){var f=b.updatePosition();if(f>=e){for(var c=0;c<d.length;c++){if(HasClass(d[c],"slidercontainer")){RemoveClass(d[c],"hide")}}a.style.height=""}else{for(var c=0;c<d.length;c++){if(d[c].originalBottom<f){RemoveClass(d[c],"hide")}}a.style.height=f+"px";window.setTimeout(function(){UpdateDrawerOpen(a,d,b,e,f)},20)}}function UpdateDrawerClose(a,d,b,g,e,f){var g=b.updatePosition();
if(g<=1){AddClass(a,"hide");RemoveClass(e,"hide");RemoveClass(f,"hide");a.style.height="";for(var c=0;c<d.length;c++){if(HasClass(d[c],"slidercontainer")){RemoveClass(d[c],"hide")}}}else{for(var c=0;c<d.length;c++){if(d[c].originalBottom>=g){AddClass(d[c],"hide")}}a.style.height=g+"px";window.setTimeout(function(){UpdateDrawerClose(a,d,b,g,e,f)},20)}}function StartDrawerOpenLoop(a){if(a){var f=CyberCoreFindHeight(a);var e=CyberCoreFindPosY(a);var g=a.getElementsByTagName("div");var h=null;var d=new Array();for(var c=(g.length-1);
c>=0;c--){if(HasClass(g[c],"slidercontainer")){d.push(g[c]);g[c].originalBottom=CyberCoreFindPosY(g[c])+CyberCoreFindHeight(g[c])-e;AddClass(g[c],"hide")}}a.style.height=0;a.parentNode.style.visibility="visible";var b=new SmoothMovement(0,f,10);window.setTimeout(function(){UpdateDrawerOpen(a,d,b,f,0)},20)}}function ExtendSidebarSelection(f){try{try{if(HasClass(f+"groupcontainer","disabled")){alert("You may only select either a location or an MLS/Listing ID#.");return false}}catch(g){}var h=new Array();var c=document.getElementById(f+"groupcontainer");
var d=c.getElementsByTagName("div");if(d&&d.length>0){var a=new RegExp("^"+f+"container_\\d+$");for(var b=0;b<d.length;b++){if(d[b].id.search(a)!=-1){h.push(d[b])}}}for(var b in h){if(HasClass(h[b],"hide")){RemoveClass(h[b],"hide");if(b==(h.length-1)){AddClass(f+"extendaction","hide")}var d=c.getElementsByTagName("*");for(var b=0;b<d.length;b++){if(HasClass(d[b],"sidebaractionbutton")){RemoveClass(d[b],"hide")}}return false}}}catch(g){alert(g.message)}return false}function WithdrawSidebarSelection(a,f){try{var l=new Array();
var n=document.getElementById(a+"groupcontainer");var b=n.getElementsByTagName("div");if(b&&b.length>0){var c=new RegExp("^"+a+"container_\\d+$");for(var k=0;k<b.length;k++){if(b[k].id.search(c)!=-1){l.push(b[k])}}}}catch(m){alert(m.message)}var g=0;for(var k in l){if(!HasClass(l[k],"hide")){g++}}if(f<g){for(var k=f;k<g;k++){var o=new Array();var d=l[k-1].getElementsByTagName("input");var p=l[k].getElementsByTagName("input");if((d&&p)&&d.length==p.length){for(var h=0;h<d.length;h++){if(d[h].type=="text"||d[h].type=="hidden"){d[h].value=p[h].value
}}}}}var b=l[g-1].getElementsByTagName("input");if(b&&b.length>0){for(var k=0;k<b.length;k++){if(b[k].type=="text"||b[k].type=="hidden"){if(b[k].strDefaultValue){b[k].value=b[k].strDefaultValue}else{b[k].value=""}}}}AddClass(l[g-1],"hide");if(g<=2){var b=l[0].getElementsByTagName("*");for(var k=0;k<b.length;k++){if(HasClass(b[k],"sidebaractionbutton")){AddClass(b[k],"hide")}}}RemoveClass(a+"extendaction","hide");TogglePropertySearchType();return false}function UpdateAreaSearchLimits(){if(!g_bInitializeComplete){return
}if(g_bIgnoreSearchInput){return}var a=document.getElementById("searchresultscontainer");if(a&&document.forms.sidebar_form_area){if(window.DoAjaxAreaSearch){DoAjaxAreaSearch()}else{if(document.forms.sidebar_form_area.onsubmit){document.forms.sidebar_form_area.onsubmit()}document.forms.sidebar_form_area.submit()}}}function UpdateRentalSearchLimits(){if(g_previewMode){return false}if(!g_bInitializeComplete){return}if(g_bIgnoreSearchInput){return}var a=document.getElementById("searchresultscontainer");if(a&&document.forms.sidebar_form_rental){if(document.forms.sidebar_form_rental.onsubmit){document.forms.sidebar_form_rental.onsubmit()
}document.forms.sidebar_form_rental.submit()}}function UpdatePropertySearchLimits(){if(g_previewMode){return false}if(!g_bInitializeComplete){return}if(g_bIgnoreSearchInput){return}var a=document.getElementById("searchresultscontainer");if(a&&document.forms.sidebar_form_property){if(document.forms.sidebar_form_property.onsubmit){document.forms.sidebar_form_property.onsubmit()}document.forms.sidebar_form_property.submit()}}function onChangeBedSlider(a){onMovingBedSlider(a);UpdateInputGroupStatus("property","2",null);
UpdatePropertySearchLimits()}function onChangeBathSlider(a){onMovingBathSlider(a);UpdateInputGroupStatus("property","2",null);UpdatePropertySearchLimits()}function onChangeProxSlider(a){onMovingProxSlider(a);UpdateInputGroupStatus("property","1",null);UpdatePropertySearchLimits()}function onChangePriceSlider(a){onMovingPriceSlider(a);UpdateInputGroupStatus("property","2",null);UpdatePropertySearchLimits()}function onChangeSqFtSlider(a){onMovingSqFtSlider(a);UpdateInputGroupStatus("property","2",null);UpdatePropertySearchLimits()
}function onMovingBedSlider(b){var c=b.GetLowValue();var a=b.GetHighValue();if(a>=6){document.getElementById("propertybedslabel").innerHTML=c+" to No limit";document.getElementById("propertymaxbeds").value=""}else{document.getElementById("propertybedslabel").innerHTML=c+" to "+a;document.getElementById("propertymaxbeds").value=a}if(c>1){document.getElementById("propertyminbeds").value=c}else{document.getElementById("propertyminbeds").value=""}}function onMovingBathSlider(b){var c=b.GetLowValue();var a=b.GetHighValue();
if(a>=6){document.getElementById("propertybathslabel").innerHTML=c+" to No limit";document.getElementById("propertymaxbaths").value=""}else{document.getElementById("propertybathslabel").innerHTML=c+" to "+a;document.getElementById("propertymaxbaths").value=a}if(c>1){document.getElementById("propertyminbaths").value=c}else{document.getElementById("propertyminbaths").value=""}}function onMovingProxSlider(a){var b=a.GetLowValue();if(b<1){document.getElementById("propertyproximitylabel").innerHTML="Exact area";document.getElementById("propertyproximity").value=""
}else{document.getElementById("propertyproximitylabel").innerHTML=b+" miles";document.getElementById("propertyproximity").value=b}}function onMovingPriceSlider(b){var c=b.GetLowValue();var a=b.GetHighValue();if(a>(g_iPriceHighBound-g_iPriceIncrement)){document.getElementById("propertypricelabel").innerHTML="$"+AddCommas(c)+" to No limit";document.getElementById("propertymaxprice").value=""}else{document.getElementById("propertypricelabel").innerHTML="$"+AddCommas(c)+" to $"+AddCommas(a);document.getElementById("propertymaxprice").value=a
}if(c>10000){document.getElementById("propertyminprice").value=c}else{document.getElementById("propertyminprice").value=""}}function onMovingSqFtSlider(b){var c=b.GetLowValue();var a=b.GetHighValue();if(a>=5000){document.getElementById("propertysqftlabel").innerHTML=AddCommas(c)+" to No limit";document.getElementById("propertymaxsqft").value=""}else{document.getElementById("propertysqftlabel").innerHTML=AddCommas(c)+" to "+AddCommas(a);document.getElementById("propertymaxsqft").value=a}if(c>1){document.getElementById("propertyminsqft").value=c
}else{document.getElementById("propertyminsqft").value=""}}function onChangeRentBedSlider(a){onMovingBedSlider(a);UpdateInputGroupStatus("rental","2",null);UpdateRentalSearchLimits()}function onChangeRentBathSlider(a){onMovingBathSlider(a);UpdateInputGroupStatus("rental","2",null);UpdateRentalSearchLimits()}function onChangeRentProxSlider(a){onMovingProxSlider(a);UpdateInputGroupStatus("rental","1",null);UpdateRentalSearchLimits()}function onChangeRentPriceSlider(a){onMovingPriceSlider(a);UpdateInputGroupStatus("rental","2",null);
UpdateRentalSearchLimits()}function onChangeRentSqFtSlider(a){onMovingSqFtSlider(a);UpdateInputGroupStatus("rental","2",null);UpdateRentalSearchLimits()}function onMovingRentBedSlider(b){var c=b.GetLowValue();var a=b.GetHighValue();if(a>=6){document.getElementById("rentalbedslabel").innerHTML=c+" to No limit";document.getElementById("rentalmaxbeds").value=""}else{document.getElementById("rentalbedslabel").innerHTML=c+" to "+a;document.getElementById("rentalmaxbeds").value=a}if(c>1){document.getElementById("rentalminbeds").value=c
}else{document.getElementById("rentalminbeds").value=""}}function onMovingRentBathSlider(b){var c=b.GetLowValue();var a=b.GetHighValue();if(a>=6){document.getElementById("rentalbathslabel").innerHTML=c+" to No limit";document.getElementById("rentalmaxbaths").value=""}else{document.getElementById("rentalbathslabel").innerHTML=c+" to "+a;document.getElementById("rentalmaxbaths").value=a}if(c>1){document.getElementById("rentalminbaths").value=c}else{document.getElementById("rentalminbaths").value=""}}function onMovingRentProxSlider(a){var b=a.GetLowValue();
if(b<1){document.getElementById("rentalproximitylabel").innerHTML="Exact area";document.getElementById("rentalproximity").value=""}else{document.getElementById("rentalproximitylabel").innerHTML=b+" miles";document.getElementById("rentalproximity").value=b}}function onMovingRentPriceSlider(b){var c=b.GetLowValue();var a=b.GetHighValue();if(a>(g_iPriceRentHighBound-g_iPriceRentIncrement)){document.getElementById("rentalpricelabel").innerHTML="$"+AddCommas(c)+" to No limit";document.getElementById("rentalmaxprice").value=""
}else{document.getElementById("rentalpricelabel").innerHTML="$"+AddCommas(c)+" to $"+AddCommas(a);document.getElementById("rentalmaxprice").value=a}if(c>0){document.getElementById("rentalminprice").value=c}else{document.getElementById("rentalminprice").value=""}}function onMovingRentSqFtSlider(b){var c=b.GetLowValue();var a=b.GetHighValue();if(a>=5000){document.getElementById("rentalsqftlabel").innerHTML=AddCommas(c)+" to No limit";document.getElementById("rentalmaxsqft").value=""}else{document.getElementById("rentalsqftlabel").innerHTML=AddCommas(c)+" to "+AddCommas(a);
document.getElementById("rentalmaxsqft").value=a}if(c>1){document.getElementById("rentalminsqft").value=c}else{document.getElementById("rentalminsqft").value=""}}function onChangeAreaPriceSlider(a){onMovingAreaPriceSlider(a);UpdateInputGroupStatus("area","1",null);UpdateAreaSearchLimits()}function onMovingAreaPriceSlider(b){var c=b.GetLowValue();var a=b.GetHighValue();if(a>900000){document.getElementById("areapricelabel").innerHTML="$"+AddCommas(c)+" to No limit";document.getElementById("areamaxprice").value=""
}else{document.getElementById("areapricelabel").innerHTML="$"+AddCommas(c)+" to $"+AddCommas(a);document.getElementById("areamaxprice").value=a}if(c>10000){document.getElementById("areaminprice").value=c}else{document.getElementById("areaminprice").value=""}}function onChangeAreaEduAtm(a){onMovingAreaEduAtm(a);UpdateInputGroupStatus("area","2",null);UpdateAreaSearchLimits()}function onMovingAreaEduAtm(a){document.getElementById("areaeduatm").value=a.GetLowValue()}function onChangeAreaAge(a){onMovingAreaAge(a);
UpdateInputGroupStatus("area","3",null);UpdateAreaSearchLimits()}function onMovingAreaAge(a){document.getElementById("areaage").value=a.GetLowValue()}function onChangeAreaIncome(a){onMovingAreaIncome(a);UpdateInputGroupStatus("area","3",null);UpdateAreaSearchLimits()}function onMovingAreaIncome(a){document.getElementById("areaincome").value=a.GetLowValue()}function onChangeAreaEduLevel(a){onMovingAreaEduLevel(a);UpdateInputGroupStatus("area","3",null);UpdateAreaSearchLimits()}function onMovingAreaEduLevel(a){document.getElementById("areaedulevel").value=a.GetLowValue()
}function onChangeAreaWKids(a){onMovingAreaWKids(a);UpdateInputGroupStatus("area","3",null);UpdateAreaSearchLimits()}function onMovingAreaWKids(a){document.getElementById("areawkids").value=a.GetLowValue()}function onChangeAreaDensity(a){onMovingAreaDensity(a);UpdateInputGroupStatus("area","3",null);UpdateAreaSearchLimits()}function onMovingAreaDensity(a){document.getElementById("areadensity").value=a.GetLowValue()}function InitializeSliders(){if(document.getElementById){var a=GetHiddenFieldIntValue("propertyminbeds");
var f=GetHiddenFieldIntValue("propertymaxbeds");var Q=GetHiddenFieldIntValue("propertyminbaths");var c=GetHiddenFieldIntValue("propertymaxbaths");var g=GetHiddenFieldIntValue("propertyminprice");var l=GetHiddenFieldIntValue("propertymaxprice");var r=GetHiddenFieldIntValue("propertyminsqft");var w=GetHiddenFieldIntValue("propertymaxsqft");var G=GetHiddenFieldIntValue("propertyproximity");var x=document.getElementById("propertypriceslide");var o=document.getElementById("propertybedsslide");var n=document.getElementById("propertybathsslide");
var R=document.getElementById("propertyproximityslide");var F=document.getElementById("propertysqftslide");if(g_iPriceLowBound>g){g=Math.max(g,g_iPriceLowBound);document.getElementById("propertyminprice").value=g}if(x&&o&&n&&R&&F){if(a==0&&f==0){document.getElementById("propertybedslabel").innerHTML="No limit"}else{if(f==0){document.getElementById("propertybedslabel").innerHTML=a+" to No limit"}else{document.getElementById("propertybedslabel").innerHTML=a+" to "+f}}if(Q==0&&c==0){document.getElementById("propertybathslabel").innerHTML="No limit"
}else{if(c==0){document.getElementById("propertybathslabel").innerHTML=Q+" to No limit"}else{document.getElementById("propertybathslabel").innerHTML=Q+" to "+c}}if(G<1){document.getElementById("propertyproximitylabel").innerHTML="Exact area"}else{document.getElementById("propertyproximitylabel").innerHTML=G+" miles"}if(l>0){document.getElementById("propertypricelabel").innerHTML="$"+AddCommas(g)+" to $"+AddCommas(l)}else{document.getElementById("propertypricelabel").innerHTML="$"+AddCommas(g)+" to No limit"}if(w>0){document.getElementById("propertysqftlabel").innerHTML=AddCommas(r)+" to "+AddCommas(w)
}else{document.getElementById("propertysqftlabel").innerHTML=AddCommas(r)+" to No limit"}try{g_pProxSlider=new CyberC21Slider(R.id,false,0,50,1,G,0,"/images/sidebar/sliderbg_148.gif","/images/sidebar/slideractivearea.gif",148,16,"","/images/sidebar/grabwidget.gif","",15,16,1,1,onChangeProxSlider,onMovingProxSlider);g_pBedSlider=new CyberC21Slider(o.id,true,1,6,1,a,(f>0)?f:6,"/images/sidebar/sliderbg_122_g6.gif","/images/sidebar/slideractivearea.gif",122,16,"","/images/sidebar/grabwidget.gif","/images/sidebar/grabwidget.gif",15,16,1,1,onChangeBedSlider,onMovingBedSlider);
g_pBathSlider=new CyberC21Slider(n.id,true,1,6,1,Q,(c>0)?c:6,"/images/sidebar/sliderbg_122_g6.gif","/images/sidebar/slideractivearea.gif",122,16,"","/images/sidebar/grabwidget.gif","/images/sidebar/grabwidget.gif",15,16,1,1,onChangeBathSlider,onMovingBathSlider);g_pPriceSlider=new CyberC21Slider(x.id,true,g_iPriceLowBound,g_iPriceHighBound,g_iPriceIncrement,g,(l>0)?l:g_iPriceHighBound,"/images/sidebar/sliderbg_122.gif","/images/sidebar/slideractivearea.gif",122,16,"","/images/sidebar/grabwidget.gif","/images/sidebar/grabwidget.gif",15,16,1,1,onChangePriceSlider,onMovingPriceSlider);
g_pSqFtSlider=new CyberC21Slider(F.id,true,0,5000,500,r,(w>0)?w:5000,"/images/sidebar/sliderbg_122.gif","/images/sidebar/slideractivearea.gif",122,16,"","/images/sidebar/grabwidget.gif","/images/sidebar/grabwidget.gif",15,16,1,1,onChangeSqFtSlider,onMovingSqFtSlider)}catch(N){g_bAjaxEnabled=false}}var u=GetHiddenFieldIntValue("rentalminbeds");var A=GetHiddenFieldIntValue("rentalmaxbeds");var y=GetHiddenFieldIntValue("rentalminbaths");var E=GetHiddenFieldIntValue("rentalmaxbaths");var I=GetHiddenFieldIntValue("rentalminprice");
var O=GetHiddenFieldIntValue("rentalmaxprice");var M=GetHiddenFieldIntValue("rentalminsqft");var S=GetHiddenFieldIntValue("rentalmaxsqft");var i=GetHiddenFieldIntValue("rentalproximity");var C=document.getElementById("rentalpriceslide");var j=document.getElementById("rentalbedsslide");var t=document.getElementById("rentalbathsslide");var L=document.getElementById("rentalproximityslide");var z=document.getElementById("rentalsqftslide");if(g_iPriceLowBound>I){I=Math.max(I,g_iPriceLowBound);document.getElementById("rentalminprice").value=I
}if(C&&j&&t&&L&&z){if(u==0&&A==0){document.getElementById("rentalbedslabel").innerHTML="No limit"}else{if(A==0){document.getElementById("rentalbedslabel").innerHTML=u+" to No limit"}else{document.getElementById("rentalbedslabel").innerHTML=u+" to "+A}}if(y==0&&E==0){document.getElementById("rentalbathslabel").innerHTML="No limit"}else{if(E==0){document.getElementById("rentalbathslabel").innerHTML=y+" to No limit"}else{document.getElementById("rentalbathslabel").innerHTML=y+" to "+c}}if(i<1){document.getElementById("rentalproximitylabel").innerHTML="Exact area"
}else{document.getElementById("rentalproximitylabel").innerHTML=i+" miles"}if(O>0){document.getElementById("rentalpricelabel").innerHTML="$"+AddCommas(I)+" to $"+AddCommas(O)}else{document.getElementById("rentalpricelabel").innerHTML="$"+AddCommas(I)+" to No limit"}if(S>0){document.getElementById("rentalsqftlabel").innerHTML=AddCommas(M)+" to "+AddCommas(S)}else{document.getElementById("rentalsqftlabel").innerHTML=AddCommas(M)+" to No limit"}try{g_pRentalProxSlider=new CyberC21Slider(L.id,false,0,50,1,i,0,"/images/sidebar/sliderbg_148.gif","/images/sidebar/slideractivearea.gif",148,16,"","/images/sidebar/grabwidget.gif","",15,16,1,1,onChangeRentProxSlider,onMovingRentProxSlider);
g_pRentalBedSlider=new CyberC21Slider(j.id,true,1,6,1,u,(A>0)?A:6,"/images/sidebar/sliderbg_122_g6.gif","/images/sidebar/slideractivearea.gif",122,16,"","/images/sidebar/grabwidget.gif","/images/sidebar/grabwidget.gif",15,16,1,1,onChangeRentBedSlider,onMovingRentBedSlider);g_pRentalBathSlider=new CyberC21Slider(t.id,true,1,6,1,y,(E>0)?E:6,"/images/sidebar/sliderbg_122_g6.gif","/images/sidebar/slideractivearea.gif",122,16,"","/images/sidebar/grabwidget.gif","/images/sidebar/grabwidget.gif",15,16,1,1,onChangeRentBathSlider,onMovingRentBathSlider);
g_pRentalPriceSlider=new CyberC21Slider(C.id,true,g_iPriceLowBound,g_iPriceRentHighBound,g_iPriceRentIncrement,I,(O>0)?O:g_iPriceHighBound,"/images/sidebar/sliderbg_122.gif","/images/sidebar/slideractivearea.gif",122,16,"","/images/sidebar/grabwidget.gif","/images/sidebar/grabwidget.gif",15,16,1,1,onChangeRentPriceSlider,onMovingRentPriceSlider);g_pRentalSqFtSlider=new CyberC21Slider(z.id,true,0,5000,500,M,(S>0)?S:5000,"/images/sidebar/sliderbg_122.gif","/images/sidebar/slideractivearea.gif",122,16,"","/images/sidebar/grabwidget.gif","/images/sidebar/grabwidget.gif",15,16,1,1,onChangeRentSqFtSlider,onMovingRentSqFtSlider)
}catch(N){g_bAjaxEnabled=false}}var d=GetHiddenFieldIntValue("areaminprice");var k=GetHiddenFieldIntValue("areamaxprice");var K=GetHiddenFieldIntValue("areaeduatm",50);var h=GetHiddenFieldIntValue("areaage",50);var H=GetHiddenFieldIntValue("areaincome",50);var B=GetHiddenFieldIntValue("areaedulevel",50);var D=GetHiddenFieldIntValue("areawkids",50);var m=GetHiddenFieldIntValue("areadensity",50);var J=document.getElementById("areapriceslide");var s=document.getElementById("areaeduatmslide");var P=document.getElementById("areaageslide");
var p=document.getElementById("areaincomeslide");var v=document.getElementById("areaedulevelslide");var q=document.getElementById("areawkidsslide");var b=document.getElementById("areadensityslide");if(document.getElementById("areapricelabel")){if(k>0){document.getElementById("areapricelabel").innerHTML="$"+AddCommas(d)+" to $"+AddCommas(k)}else{document.getElementById("areapricelabel").innerHTML="$"+AddCommas(d)+" to No limit"}}if(J&&s&&P&&p&&v&&q&&b){g_pAreaPriceSlider=new CyberC21Slider(J.id,true,0,950000,50000,d,(k>0)?k:950000,"/images/sidebar/sliderbg_122.gif","/images/sidebar/slideractivearea.gif",122,16,"","/images/sidebar/grabwidget.gif","/images/sidebar/grabwidget.gif",15,16,1,1,onChangeAreaPriceSlider,onMovingAreaPriceSlider);
g_pAreaEduAtmSlider=new CyberC21Slider(s.id,false,0,100,1,K,0,"/images/sidebar/sliderbg_210_weakstrong.gif",null,210,30,"","/images/sidebar/grabwidget.gif","",15,16,1,1,onChangeAreaEduAtm,onMovingAreaEduAtm);g_pAreaAgeSlider=new CyberC21Slider(P.id,false,0,100,1,h,0,"/images/sidebar/sliderbg_122_youngold.gif",null,122,24,"","/images/sidebar/grabwidget.gif","",15,16,1,1,onChangeAreaAge,onMovingAreaAge);g_pAreaIncomeSlider=new CyberC21Slider(p.id,false,0,100,1,H,0,"/images/sidebar/sliderbg_122_plusminus.gif",null,122,24,"","/images/sidebar/grabwidget.gif","",15,16,1,1,onChangeAreaIncome,onMovingAreaIncome);
g_pAreaEduLevelSlider=new CyberC21Slider(v.id,false,0,100,1,B,0,"/images/sidebar/sliderbg_89_plusminus.gif",null,89,20,"","/images/sidebar/grabwidget.gif","",15,16,1,1,onChangeAreaEduLevel,onMovingAreaEduLevel);g_pAreaWKidsSlider=new CyberC21Slider(q.id,false,0,100,1,D,0,"/images/sidebar/sliderbg_89_plusminus.gif",null,89,20,"","/images/sidebar/grabwidget.gif","",15,16,1,1,onChangeAreaWKids,onMovingAreaWKids);g_pAreaDensitySlider=new CyberC21Slider(b.id,false,0,100,1,m,0,"/images/sidebar/sliderbg_89_plusminus.gif",null,89,20,"","/images/sidebar/grabwidget.gif","",15,16,1,1,onChangeAreaDensity,onMovingAreaDensity)
}g_bInitializeComplete=true}else{g_bAjaxEnabled=false}};
var g_pMainSearchMap=null;var g_iMapPreviewPosLeft=0;var g_iMapPreviewPosRight=0;var g_iMapPreviewPosTop=0;var g_iMapPreviewPosBottom=0;var g_bMapPreviewCancelCloseRequest=false;var g_bMapPreviewTimeoutActive=false;var g_bMapPreviewVisible=false;var g_objMapPreview=new Object();var g_previewMode=false;var g_iIEMapOffsetX=260;var g_iIEMapOffsetY=160;function InitializeAllSearches(){if(!g_AjaxQueue){alert("Could not initialize AJAX.  An AJAX capable browser is required to use the advanced features on C21.com");
return}g_AjaxQueue.registerLock("DoingPropertySearch");g_AjaxQueue.registerLock("DoingAgentSearch");g_AjaxQueue.registerLock("DoingOfficeSearch")}function DoPropertySearch(a){var b=new Date().getTime();try{if(g_previewMode){return false}if(!FormDataEnteredInContainer("propertywheregroupcontainer")){if(!FormDataEnteredInContainer("propertymlsgroupcontainer")){if(!FormDataEnteredInContainer("propertyshapegroupcontainer")){return false}}}if((b-g_last_search_submit)>500){RemoveAllDefaultData(a);RewritePropertySearchURL(a)
}}catch(c){}g_last_search_submit=new Date().getTime();return true}function DoPropertySearch_Simple(a){try{var b=document.getElementById("propertywhere_1");if(b){if(b.value!=""&&b.value!="City, State or Zip"){RemoveAllDefaultData(a);RewritePropertySearchURL(a)}}}catch(c){}return true}function DoRentalSearch(a){var b=new Date().getTime();try{if(g_previewMode){return false}if(!FormDataEnteredInContainer("rentalwheregroupcontainer")){if(!FormDataEnteredInContainer("rentalmlsgroupcontainer")){if(!FormDataEnteredInContainer("rentalshapegroupcontainer")){return false
}}}if((b-g_last_search_submit)>500){RemoveAllDefaultData(a);RewriteRentalSearchURL(a)}}catch(c){}g_last_search_submit=new Date().getTime();return true}function DoRentalSearch_Simple(a){try{var b=document.getElementById("rentalwhere_1");if(b){if(b.value!=""&&b.value!="City, State or Zip"){RemoveAllDefaultData(a);RewriteRentalSearchURL(a)}}}catch(c){}return true}function RewriteRentalSearchURL(c){var g="/realestatesearch/";var a=document.getElementById("rentalwhere_1");var e=a.value;var b=e.split(",");if(b.length==2){g+=trim(b[0])+"-"+trim(b[1])
}else{if(b.length==1){var b=e.split(" ");if(b.length==1){g+=b[0]}else{if(b.length==2){g+=trim(b[0])+"-"+trim(b[1])}else{var d=b.pop();var f=b.join(" ");g+=f+"-"+d}}}}a.value="";c.action=g}function RewritePropertySearchURL(g){var b="/realestatesearch/";var e=document.getElementById("hybridcb_1");if(e==null){e=document.getElementById("hybridcb_2")}if(e!=null){if(!e.checked){b="/realestatesearch/hybrid/"}}var c=document.getElementById("brandcd");if((e&&e.checked)&&c){c.value="2"}var f=document.getElementById("hybrid");
if((e&&!e.checked)&&f){f.value="Y"}var k=document.getElementById("propertywhere_1");var h=k.value;if(h&&h!=""&&h!="City, State OR Zip"&&h!="City, State or Zip"){var j=h.split(",");if(j.length==2){b+=trim(j[0])+"-"+trim(j[1])}else{if(j.length==1){var j=h.split(" ");if(j.length==1){b+=j[0]}else{if(j.length==2){b+=trim(j[0])+"-"+trim(j[1])}else{var a=j.pop();var d=j.join(" ");b+=d+"-"+a}}}}}k.value="";g.action=b}function LTrim(b){var a=/\s*((\S+\s*)*)/;return b.replace(a,"$1")}function RTrim(b){var a=/((\s*\S+)*)\s*/;
return b.replace(a,"$1")}function trim(a){return LTrim(RTrim(a))}var g_last_search_submit=new Date().getTime();function DoAgentSearch(a){var b=new Date().getTime();try{if(!FormDataEnteredInContainer("agentwheregroupcontainer")){if(!FormDataEnteredInContainer("agentwhatgroupcontainer")){return false}}if((b-g_last_search_submit)>500){RemoveAllDefaultData(a);RewriteAgentSearchURL(a)}}catch(c){}g_last_search_submit=new Date().getTime();return true}function RewriteAgentSearchURL(d){var h="";var b=window.location.href;
var a=document.getElementById("agentwhere_1");var f=a.value;var c=f.split(",");if(ContainsCommercial(b)){return}if(c.length==2){h="/realestateagents/"+trim(c[0])+"-"+trim(c[1])}else{if(c.length==1){var c=f.split(" ");if(c.length==1){h="/realestateagents/"+c[0]}else{if(c.length==2){h="/realestateagents/"+trim(c[0])+"-"+trim(c[1])}else{var e=c.pop();var g=c.join(" ");h="/realestateagents/"+g+"-"+e}}}else{h="/realestateagents/"}}a.value="";d.action=h}function DoOfficeSearch(a){var b=new Date().getTime();try{if(!FormDataEnteredInContainer("officewheregroupcontainer")){if(!FormDataEnteredInContainer("officewhatgroupcontainer")){return false
}}if((b-g_last_search_submit)>500){RemoveAllDefaultData(a);RewriteOfficeSearchURL(a)}}catch(c){}g_last_search_submit=new Date().getTime();return true}function RewriteOfficeSearchURL(d){var h="";var b=window.location.href;var a=document.getElementById("officewhere_1");var f=a.value;var c=f.split(",");if(ContainsCommercial(b)){return}else{if(c.length==2){h="/realestateoffices/"+trim(c[0])+"-"+trim(c[1])}else{if(c.length==1){var c=f.split(" ");if(c.length==1){h="/realestateoffices/"+c[0]}else{if(c.length==2){h="/realestateoffices/"+trim(c[0])+"-"+trim(c[1])
}else{var e=c.pop();var g=c.join(" ");h="/realestateoffices/"+g+"-"+e}}}else{h="/realestateoffices/"}}}a.value="";d.action=h}function ContainsCommercial(a){var b=false;if(a.search("commercial")>-1){b=true}return b}function DoAreaSearch(a){try{if(!FormDataEnteredInContainer("areawheregroupcontainer")){if(!FormDataEnteredInContainer("areawhatgroupcontainer")){alert("You must enter a location to start your search.");return false}}RemoveAllDefaultData(a);if(a.north){a.north.value=""}if(a.south){a.south.value=""}if(a.east){a.east.value=""
}if(a.west){a.west.value=""}if(a.zoom){a.zoom.value=""}}catch(b){}return true}function ShowSearchResultMapMouseOver(c,l,h,k){strTrKey=unescape(h);var f=document.getElementById(g_objMapPreview.popupname);if(f){if(g_bMapPreviewVisible){if(g_objMapPreview){if(g_objMapPreview.iXPos==c&&g_objMapPreview.iYPos==l&&g_objMapPreview.strTrKey==strTrKey){return}}HideMapPreview()}g_bMapPreviewVisible=true;g_bMapPreviewCancelCloseRequest=true;g_bMapPreviewTimeoutActive=true;g_bMapPreviewNeedsRepositioned=false;if(g_objMapPreview){g_objMapPreview.iXPos=c;
g_objMapPreview.iYPos=l;g_objMapPreview.strTrKey=strTrKey}var j;j=document.getElementById("officemapviewpreviewname_"+strTrKey);if(j){SetInnerHtml("officemapviewpreviewname",j.innerHTML)}j=document.getElementById("officemapviewpreviewdetails_"+strTrKey);if(j){SetInnerHtml("officemapviewpreviewdetails",j.innerHTML)}j=document.getElementById("propertymapviewpreviewprice_"+strTrKey);if(j){SetInnerHtml("propertymapviewpreviewprice",j.innerHTML)}j=document.getElementById("propertymapviewpreviewdetails_"+strTrKey);
if(j){SetInnerHtml("propertymapviewpreviewdetails",j.innerHTML)}j=document.getElementById("propertymapviewpreviewoffice_"+strTrKey);if(j){SetInnerHtml("propertymapviewpreviewoffice",j.innerHTML)}j=document.getElementById("areamapviewpreviewname_"+strTrKey);if(j){SetInnerHtml("areamapviewpreviewname",j.innerHTML)}j=document.getElementById("areamapviewpreviewdetails_"+strTrKey);if(j){SetInnerHtml("areamapviewpreviewdetails",j.innerHTML)}var a=0;var g=0;j=document.getElementById("propertymapviewpreviewlat_"+strTrKey);
if(j){a=document.getElementById("propertymapviewpreviewlat_"+strTrKey).innerHTML;g=document.getElementById("propertymapviewpreviewlon_"+strTrKey).innerHTML}j=document.getElementById("officemapviewpreviewlat_"+strTrKey);if(j){a=document.getElementById("officemapviewpreviewlat_"+strTrKey).innerHTML;g=document.getElementById("officemapviewpreviewlon_"+strTrKey).innerHTML}j=document.getElementById("areamapviewpreviewlat_"+strTrKey);if(j){a=document.getElementById("areamapviewpreviewlat_"+strTrKey).innerHTML;g=document.getElementById("areamapviewpreviewlon_"+strTrKey).innerHTML
}var b=RfgPixelFromLatLong("resultmap",a,g);var e=b.x;var d=b.y;RfgSetObjectPosition(f,e-5,d-20);f.style.display="block";RemoveClass(g_objMapPreview.popupname,"hide");if(!window.event){if(document.addEventListener){document.addEventListener("mousemove",MoveMapPreview,true)}else{document.attachEvent("onmousemove",MoveMapPreview);document.attachEvent("onmouseover",MoveMapPreview);document.attachEvent("onmouseout",MoveMapPreview)}}else{setTimeout(BeginShowMapPreview,400)}}}function TrackMapPreview(d){var c=document.getElementById(g_objMapPreview.popupname);
if(c!=null){var b=RfgGetMouseXPosition(d,0);var a=RfgGetMouseYPosition(d,0);if(g_pBrowser.bIsMsIe&&g_pBrowser.fVersionMajor>6){b=b-g_iIEMapOffsetX;a=a-g_iIEMapOffsetY}if(b<g_iMapPreviewPosLeft||b>g_iMapPreviewPosRight){if(!g_bMapPreviewTimeoutActive){g_bMapPreviewCancelCloseRequest=false;setTimeout(RequestHideMapPreview,400);g_bMapPreviewTimeoutActive=true}return}if(a<g_iMapPreviewPosTop||a>g_iMapPreviewPosBottom){if(!g_bMapPreviewTimeoutActive){g_bMapPreviewCancelCloseRequest=false;setTimeout(RequestHideMapPreview,400);
g_bMapPreviewTimeoutActive=true}return}g_bMapPreviewCancelCloseRequest=true}}function RequestHideMapPreview(){var a=document.getElementById(g_objMapPreview.popupname);if(a!=null){g_bMapPreviewTimeoutActive=false;if(!g_bMapPreviewCancelCloseRequest){HideMapPreview()}}}function HideMapPreview(){var a=document.getElementById(g_objMapPreview.popupname);if(a!=null){if(document.removeEventListener){document.removeEventListener("mousemove",TrackMapPreview,true)}else{document.detachEvent("onmousemove",TrackMapPreview);
document.detachEvent("onmouseover",TrackMapPreview);document.detachEvent("onmouseout",TrackMapPreview)}a.style.display="none";g_bMapPreviewVisible=false;g_bMapPreviewCurrentId="";g_objMapPreview.strTrKey=""}}function MoveMapPreview(a){if(document.removeEventListener){document.removeEventListener("mousemove",MoveMapPreview,true);document.removeEventListener("mousemove",MoveMapPreview,true);document.removeEventListener("mousemove",MoveMapPreview,true)}else{document.detachEvent("onmousemove",MoveMapPreview)}setTimeout(BeginShowMapPreview,400)
}function BeginShowMapPreview(){var a=document.getElementById(g_objMapPreview.popupname);if(a!=null){g_iMapPreviewPosLeft=RfgFindPosX(a);g_iMapPreviewPosRight=g_iMapPreviewPosLeft+RfgFindWidth(a);g_iMapPreviewPosTop=RfgFindPosY(a)-30;g_iMapPreviewPosBottom=g_iMapPreviewPosTop+RfgFindHeight(a)+30;if(document.addEventListener){document.addEventListener("mousemove",TrackMapPreview,true)}else{document.attachEvent("onmousemove",TrackMapPreview)}setTimeout(RequestHideMapPreview,400)}}function ShowPropertyGridViewPreview(f,a){var b=document.getElementById("propertygridviewpreview");
if(b){var d=document.getElementById("property_"+a);var h=CyberCoreFindPosX(d);var c=CyberCoreFindPosY(d);if(g_pBrowser.bIsMsIe){h-=260}b.style.left=h-200+"px";isIE6=/msie|MSIE 6/.test(navigator.userAgent);if(isIE6){b.style.left=h+100+"px"}b.style.top=c-99+"px";b.style.display="block";if(g_ObjHide.bOpen){HidePropertyGridViewPreview()}g_ObjHide.bOpen=true;g_ObjHide.iTrKey=a;g_ObjHide.iMinX=h;g_ObjHide.iMaxX=h+100;g_ObjHide.iMinY=c;g_ObjHide.iMaxY=c+100;SetInnerHtml("propertygridviewpreviewimage",document.getElementById("propertygridviewpreviewimage_"+a).innerHTML);
SetInnerHtml("propertygridviewpreviewdetails",document.getElementById("propertygridviewpreviewdetails_"+a).innerHTML);SetInnerHtml("propertygridviewpreviewdescription",document.getElementById("propertygridviewpreviewdescription_"+a).innerHTML);var g=document.getElementById("propertygridviewpreviewcourtesy_"+a).innerHTML;if(g!=""){SetInnerHtml("propertygridviewpreviewcourtesycontainer",g);document.getElementById("propertygridviewpreviewcourtesycontainer").style.height="12px";document.getElementById("propertygridviewpreviewdesccontainer").style.top="102px";
b.style.top=c-116+"px";b.style.height="185px"}else{SetInnerHtml("propertygridviewpreviewcourtesycontainer","");document.getElementById("propertygridviewpreviewcourtesycontainer").style.height="0px";document.getElementById("propertygridviewpreviewdesccontainer").style.top="88px";b.style.height="168px"}RemoveClass("propertygridviewpreview","hide");document.onmousemove=CheckForPropertyGridViewPreviewHide}}function HidePropertyGridViewPreview(){var a=document.getElementById("propertygridviewpreview");if(a){AddClass("propertygridviewpreview","hide");
a.style.display="none";g_ObjHide.bOpen=false;g_ObjHide.iTrKey=-1;document.onmousemove=null}}var g_ObjHide=new Object();g_ObjHide.bOpen=false;function CheckForPropertyGridViewPreviewHide(a){if(g_ObjHide.bOpen){var c=GetEventInformation(a);var d=c.iPosX;var b=c.iPosY;if(d<g_ObjHide.iMinX||d>g_ObjHide.iMaxX){HidePropertyGridViewPreview()}if(b<g_ObjHide.iMinY||b>g_ObjHide.iMaxY){HidePropertyGridViewPreview()}}}function TogglePropertyListViewPreview(b,a){if(HasClass("property_"+a+"_previewrow","hide")){ShowPropertyListViewPreview(a)
}else{HidePropertyListViewPreview(a)}b.returnValue=false;return false}function ShowPropertyListViewPreview(a){var b=document.getElementById("property_"+a+"_previewrow");if(b){RemoveClass(b,"hide")}return false}function HidePropertyListViewPreview(a){AddClass("property_"+a+"_previewrow","hide")}function ShowNextPreviewPhoto(e){var f=document.getElementById("photopreviewscrollcontainer_"+e);if(f){var a=-1;var h=f.getElementsByTagName("div");var g=new Array();if(h&&h.length>0){for(var d=0;d<h.length;d++){if(HasClass(h[d],"landscapethumbnailcontainer")){g.push(h[d]);
if(a==-1&&h[d].style.display!="none"){a=g.length-1}}}if(g.length>0&&a<(g.length-2)){g[a].style.display="none";g[a+1].style.display="block";g[a+2].style.display="block"}if(a>=(g.length-2)){var b=document.getElementById("photonextbtn_"+e);b.src="/images/detail/nextphoto_disabled.gif"}if(a>0){var c=document.getElementById("photopreviousbtn_"+e);c.src="/images/detail/previousphoto.gif"}}}}function ShowPreviousPreviewPhoto(e){var f=document.getElementById("photopreviewscrollcontainer_"+e);if(f){var a=-1;var h=f.getElementsByTagName("div");
var g=new Array();if(h&&h.length>0){for(var d=0;d<h.length;d++){if(HasClass(h[d],"landscapethumbnailcontainer")){g.push(h[d]);if(a==-1&&h[d].style.display!="none"){a=g.length-1}}}if(g.length>0&&a>0){g[a+1].style.display="none";g[a].style.display="block";g[a-1].style.display="block"}if(a<=1){var c=document.getElementById("photopreviousbtn_"+e);c.src="/images/detail/previousphoto_disabled.gif"}if(a<(g.length-2)){var b=document.getElementById("photonextbtn_"+e);b.src="/images/detail/nextphoto.gif"}}}}function OnCompleteShowPropertyListViewPreview(k){if(k.readyState!=4){return
}var a=k.responseXML.getElementsByTagName("property");if(!a.length||a.length==0){alert("Could not load property preview.");return}var c=GetNodeValue(k.responseXML,"provider-listingid");var d=GetNodeValue(k.responseXML,"description");if(!c||c==""){alert("Could not load property preview.");return}if(d==""){var n=GetNodeValue(k.responseXML,"agent-name");d="Please contact "+n+" for more information."}var b='<div style="float:left;"><a href="Javascript:ShowPreviousPreviewPhoto(\''+c+'\');"><img src="/images/detail/previousphoto_disabled.gif" id="photopreviousbtn_'+c+'" border="0"></a></div><div id="photopreviewscrollcontainer_'+c+'" style="position:relative;left:-5px">';
var m=k.responseXML.getElementsByTagName("picture");for(var g=0;g<m.length;g++){var j=GetNodeValue(m[g],"picture-url");var f="";if(g>1){f="display: none;"}b+='<div class="landscapethumbnailcontainer" style="float:left;margin-left:10px;'+f+'"><a href="/property/index.jsp?id='+c+'"><img src="'+j+'" width="118" height="79" alt="" border="0" class="landscapethumbnail"></a><div class="tl"></div><div class="tr"></div><div class="bl"></div><div class="br"></div></div>'}b+='</div><div style="float:left;"><a href="Javascript:ShowNextPreviewPhoto(\''+c+'\');"><img src="/images/detail/nextphoto.gif" id="photonextbtn_'+c+'" border="0"></a></div>';
if(m.length==0){b=""}var h=document.getElementById("property_"+c+"_previewbutton");if(h){h.src="/images/search/listingpreviewclose.gif"}var e=document.getElementById("property_"+c+"_photopreview");var l=document.getElementById("property_"+c+"_description");if(e&&l){e.innerHTML=b;l.innerHTML=d}return true}function ShowContactAgentForm(d,b,a,c){var f="/contactus/contactagentpopup.jsp?id="+b;if(a){f+="&trkey="+a}if(c){f+="&source="+c}return ShowContactForm(d,f)}function ShowContactIdxPropertyForm(b,a){var c="/contactus/contactidxpropertypopup.jsp?id="+a;
return ShowContactForm(b,c)}function ShowContactPuertoRicoForm(b,a){var c="/contactus/contactpuertoricopopup.jsp?id="+a;return ShowContactForm(b,c)}function ShowContactOfficeForm(d,b,a,c){var f="/contactus/contactofficepopup.jsp?id="+b;if(a){f+="&trkey="+a}if(c){f+="&source="+c}return ShowContactForm(d,f)}function ShowContactTeamForm(d,a,b,c){var f="/contactus/contactteampopup.jsp?id="+a;if(b){f+="&trkey="+b}if(c){f+="&source="+c}return ShowContactForm(d,f)}function CommercialShowContactAgentForm(d,b,a,c){var f="/contactus/contactagentpopup.jsp?id="+b;
if(a){f+="&commkey="+a}if(c){f+="&type="+c}return ShowContactForm(d,f)}function CommercialShowContactOfficeForm(d,b,a,c){var f="/contactus/contactofficepopup.jsp?id="+b;if(a){f+="&commkey="+a}if(c){f+="&type="+c}return ShowContactForm(d,f)}function CommercialShowContactTeamForm(d,a,b,c){var f="/contactus/contactteampopup.jsp?id="+a;if(b){f+="&commkey="+b}if(c){f+="&type="+c}return ShowContactForm(d,f)}function ShowContactForm(h,j){var g=document.getElementById("contactpopupbody");if(!g){return true}var c=window.innerHeight;
if(navigator.appName.indexOf("Microsoft")!=-1){c=document.documentElement.clientHeight}var f=c-50;var b=490;var a=540;if(f-a<0){a=f}strHtml='<div id="PopupFrameContainer" class="calloutgrey" style="position:relative;background: #ffffff;">   <iframe id="PopupIframe" src="'+j+'" width="'+b+'" height="'+a+'" scrolling="auto" frameborder="0"></iframe></div>';g.innerHTML=strHtml;var d=document.getElementById("contactpopup");if(!d){return true}try{if(window.innerWidth){d.style.left=(window.innerWidth/2)-209+"px"}else{if(document.body&&document.body.clientWidth){d.style.left=(document.body.clientWidth/2)-209+"px"
}else{d.style.left="300px"}}}catch(h){}d.style.display="block";h.returnValue=false;return false}function HideContactForm(){var b=document.getElementById("contactpopup");if(b){b.style.display="none"}var a=document.getElementById("PopupIframe");if(a){a.src="/blank.html"}return false}function HideContactOfficeForm(){return HideContactForm()}function HideContactAgentForm(){return HideContactForm()}function getPageSize(){var a={x:0,y:0};if(window.innerHeight&&window.scrollMaxY){a.x=window.innerWidth+window.scrollMaxX;
a.y=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){a.x=document.body.scrollWidth;a.y=document.body.scrollHeight}else{a.x=document.body.offsetWidth+document.body.offsetLeft;a.y=document.body.offsetHeight+document.body.offsetTop}}return a}function getViewport(){var a={x:1024,y:768};try{if(typeof(window.innerWidth)=="number"){a.x=window.innerWidth;a.y=window.innerHeight}else{if(document.documentElement&&document.documentElement.clientWidth){a.x=document.documentElement.clientWidth;
a.y=document.documentElement.clientHeight}else{if(document.body&&document.body.clientWidth){a.x=document.body.clientWidth;a.y=document.body.clientHeight}}}}catch(b){}return a}function getScrollOffset(){var a={x:0,y:0};if(typeof(window.pageXOffset)=="number"){a.x=window.pageXOffset;a.y=window.pageYOffset}else{if(document.body&&document.body.scrollLeft){a.x=document.body.scrollLeft;a.y=document.body.scrollTop}else{if(document.documentElement&&document.documentElement.scrollLeft){a.x=document.documentElement.scrollLeft;
a.y=document.documentElement.scrollTop}}}return a}function ShowFullPageWaitDialog(){var e=getPageSize();var c=getViewport();var j=getScrollOffset();var b=(c.x/2)+j.x;var a=(c.y/2)+j.y;var f=document.createElement("div");f.id="fullpagewait";f.style.width=e.x+"px";f.style.height=e.y+"px";var d=document.createElement("div");d.className="shader";d.innerHTML=" &nbsp; ";f.appendChild(d);var g=document.createElement("div");g.className="calloutblack";g.style.position="fixed";g.style.width="300px";g.style.height="110px";
g.style.marginRight="20px";g.style.color="white";g.style.top=(a-55)+"px";g.style.left=(b-150)+"px";var h='<div class="label"><div class="tl"></div><div class="tr"></div><b>Please Wait...</b>      </div><div class="body" style="color:white">   <div style="height:90px;padding-left:16px;margin-right:5px;">      <div style="float:right"><a href="#" onClick="return HideFullPageWaitDialog();"><img src="/images/close.gif" width=20 height=20></a></div>      Please wait while we perform your search.      <br><br>      <img src="/images/loading.gif">   </div></div><div class="bl"></div><div class="bm"></div><div class="br"></div>';
g.innerHTML=h;f.appendChild(g);document.body.appendChild(f)}function HideFullPageWaitDialog(){var a=document.getElementById("fullpagewait");if(a){document.body.removeChild(a)}return false}function closeENIDXChooser(){document.body.removeChild(document.getElementById("enidxmls_chooser"))}function doENIDXChooser(e,a){var b="/enidx/chooser.jsp?";var d=e.split("?");if(d.length==2){b+=d[1];var c=(new Date()).getTime();b+="&rid="+escape(c);location.href=b}return true}function finishENIDXChooserDisplay(){HideFullPageWaitDialog();
var a=document.getElementById("myc21popup");if(a){a.style.display="block"}}function handleENIDXRedirect(e,b,c,a){var d=function(k){if(k.readyState==4){var j=false;if(k.status==200){var f=GetNodeValue(k.responseXML,"results");if(f&&f=="success"){var l=GetNodeValue(k.responseXML,"url");var h=GetNodeValue(k.responseXML,"query");if(l!=""){var g=document.getElementById("enidxsearchhandlerform");if(g){g.action=l+"?c21numzones="+c+"&c21thiszone="+a+"&WT.ac=C21IDXlinkIDX";g.query.value=h;g.submit();j=true}}}}if(!j){HideFullPageWaitDialog();
alert("Sorry, your request could not be completed.  Please try again.")}}};ShowFullPageWaitDialog();g_AjaxQueue.schedule("enidxmlsurl",e,d,true,true,b);return false}function doENIDXRedirect(c,d,f,e,a){var g="/ajaxservlet/enidx/getmlsurl";var b="mlsid="+c+"&z="+escape(d)+"&addl="+escape(f);return handleENIDXRedirect(g,b,e,a)}function doENIDXRedirectByCity(d,c,f,e,a){var g="/ajaxservlet/enidx/getmlsurl";var b="mlsid="+d+"&c="+escape(c)+"&addl="+escape(f);return handleENIDXRedirect(g,b,e,a)}function enidxGetListingCount(a,b){var d="/ajaxservlet/enidx/getidxmlsarea?where="+a+"&limit=1000";
var c=function(o){if(o.readyState==4){if(o.status==200){var m=0;var l=o.responseXML;if(l){var p=null;if(b){p=l.getElementsByTagName("rentalcount")}else{p=l.getElementsByTagName("listingcount")}for(i=0;i<p.length;i++){var h=p[i].firstChild.nodeValue;try{m=m+parseInt(h)}catch(n){m=m+0}}m=m/2}if(m>0){m=addCommas(m);var k=document.getElementById("idxsearchlinkcontainer1");var g=document.getElementById("idxsearchlinkcontainer2");var q=document.getElementById("additional_listings");if(k){k.style.display="inline"}if(g){g.style.display="inline"
}if(q){q.style.display="inline"}var j=document.getElementById("enidxcount1");var f=document.getElementById("enidxcount2");if(j){j.innerHTML=m}if(f){f.innerHTML=m}}}}};g_AjaxQueue.schedule("enidxlistingcount",d,c)}function addCommas(b){b+="";x=b.split(".");x1=x[0];x2=x.length>1?"."+x[1]:"";var a=/(\d+)(\d{3})/;while(a.test(x1)){x1=x1.replace(a,"$1,$2")}return x1+x2}function printSearch(){if(window.location.href.search("display=photoflow")>=0){var c=document.getElementById("listingid").innerHTML;var a=document.getElementById("propertyType").innerHTML;
if(a=="idx"){var b="/idxproperty/print.jsp?id="+c}else{var b="/property/print.jsp?id="+c}document.getElementById("main_print").href=b;return true}else{document.getElementById("print_select").style.display="inline";document.getElementById("close_print").style.display="inline"}return false}function cancelPrintSearch(){document.getElementById("print_select").style.display="none";document.getElementById("close_print").style.display="none"}function printPage(d,f){var e=window.location.href;e=e.replace("#","");var c=document.print_form.print_type;
var a="";for(var b=0;b<c.length;b++){if(c[b].checked){a=c[b].value}}if(a=="all"){e=e+"&rpp=100";e=e.replace("pg=","")}var d="";if(e.search("property.jsp")>=0){d="property"}else{if(e.search("agent.jsp")>=0){d="agent"}else{if(e.search("area.jsp")>=0){d="area"}else{if(e.search("office.jsp")>=0){d="office"}}}}switch(d){case"property":e=e.replace("property.jsp","property_print.jsp");document.getElementById("print_link").href=e;break;case"agent":e=e.replace("agent.jsp","agent_print.jsp");document.getElementById("print_link").href=e;
break;case"area":e=e.replace("area.jsp","area_print.jsp");document.getElementById("print_link").href=e;break;case"office":e=e.replace("office.jsp","office_print.jsp");document.getElementById("print_link").href=e;break;default:window.print()}cancelPrintSearch();return true}function ReturnTrue(){return true}function ConfigureMapPopup(){RfgShowMapDashboard("resultmap",false);RfgShowDetailOnMouseOver(false);RfgAddVEPushpinOnMouseOver(ShowSearchResultMapMouseOver);g_pMainSearchMap=RfgGetMapById("resultmap")}function ShowOpenHouseDateDisplay(d,b){var a=document.getElementById("addlopenhouses_popup");
if(a){var f=document.getElementById("searchresults_addlopenhouses_"+b);if(f){SetInnerHtml("addlopenhouses_content",f.innerHTML);ShowModal();positionPopup(d,a);RemoveClass(a,"hide")}}return false}function HideOpenHouseDateDisplay(){HideModal();AddClass("addlopenhouses_popup","hide");return false}function ShowModal(){var a=document.getElementById("modalBackground");if(a){RemoveClass(a,"hide")}}function HideModal(){var a=document.getElementById("modalBackground");if(a){AddClass(a,"hide")}}function setSavedImage(b){var c=document.getElementById(b);
if(c){var a=c.src;c.src=a.replace("save_but","save_but_on")}}function enidxContactOffice(b){var a=window.open(b,"enidxoffice"+(new Date()).getTime(),"width=600,height=600");return false}function toggleOverflow(d,a){var b=document.getElementById(d);var c=document.getElementById(a);if(b){if((b.style.overflow=="hidden"||b.style.overflow=="")){b.style.overflow="visible";if(c){if(c.style.backgroundImage.indexOf("topbar_arrow.gif")>=0){c.style.backgroundImage="url(/images/search/topbar_arrow_on.gif)"}else{c.style.backgroundImage="url(/images/search/h_arrow_up.gif)"
}}}else{b.style.overflow="hidden";if(c){if(c.style.backgroundImage.indexOf("topbar_arrow_on.gif")>=0){c.style.backgroundImage="url(/images/search/topbar_arrow.gif)"}else{c.style.backgroundImage="url(/images/search/h_arrow_down.gif)"}}}}}function getIndexInArray(c,b){for(var a=0;a<c.length;a++){if(c[a]==b){return a}}return -1}var g_aDropdowns=new Array();var g_aDropdownActions=new Array();function requestMenuOverflowOff(c,b){var a=getIndexInArray(g_aDropdowns,c);a=(a<0)?g_aDropdowns.length:a;g_aDropdowns[a]=c;
if(!g_aDropdownActions[a]){g_aDropdownActions[a]=new Array()}g_aDropdownActions[a]["action"]="close";g_aDropdownActions[a]["elem_id"]=c;g_aDropdownActions[a]["arrow_id"]=b;setTimeout(menuOverflowOff,400)}function menuOverflowOff(){for(var a=0;a<g_aDropdowns.length;a++){var e=g_aDropdownActions[a]["action"];var f=g_aDropdownActions[a]["elem_id"];var b=g_aDropdownActions[a]["arrow_id"];var c=document.getElementById(f);var d=document.getElementById(b);if(c&&e=="close"){c.style.overflow="hidden";if(d){d.style.backgroundImage="url(/images/search/topbar_arrow.gif)"
}}}}function menuOverflowOn(f,c){var b=new Date();var a=getIndexInArray(g_aDropdowns,f);a=(a<0)?g_aDropdowns.length:a;g_aDropdowns[a]=f;if(!g_aDropdownActions[a]){g_aDropdownActions[a]=new Array()}g_aDropdownActions[a]["action"]="open";g_aDropdownActions[a]["elem_id"]=f;g_aDropdownActions[a]["arrow_id"]=c;var d=document.getElementById(f);var e=document.getElementById(c);if(d){d.style.overflow="visible"}}function highlightOption(g,c){var e=document.getElementById(g+c);var d=document.getElementById(g+c+"_link");
var b=document.getElementById(g+c+"_icon");var a=document.getElementById(g+c+"_dot");var f=document.getElementById(g+c+"_arrow");if(e){e.style.backgroundImage="url(/images/search/h_yel_bg.gif)";e.style.color="#000000";if(d){d.style.color="#000000"}if(a){a.style.backgroundImage="url(/images/search/h_yel_dot.gif)"}if(f){if(f.style.backgroundImage.indexOf("topbar_arrow_on.gif")>=0){f.style.backgroundImage="url(/images/search/h_arrow_up.gif)"}else{f.style.backgroundImage="url(/images/search/h_arrow_down.gif)"}}if(b){switch(c){case"list":b.src="/images/search/h_list_icon.gif";
break;case"map":b.src="/images/search/h_map_icon.gif";break;case"grid":b.src="/images/search/h_grid_icon.gif";break;case"photo":b.src="/images/search/h_photo_icon.gif";break;case"save":if(b.src.indexOf("h_check_icon.gif")>=0){b.src="/images/search/h_check_icon_blk.gif"}else{b.src="/images/search/h_save_icon_blk.gif"}break;case"print":b.src="/images/search/h_print_icon_blk.gif";break;case"email":b.src="/images/search/h_save_icon_blk.gif";break;case"rss":b.src="/images/search/h_rss_icon_blk.gif";break;case"share":b.src="/images/search/h_save_icon_blk.gif";
break}}}}function endHighlightOption(g,c){var e=document.getElementById(g+c);var d=document.getElementById(g+c+"_link");var b=document.getElementById(g+c+"_icon");var a=document.getElementById(g+c+"_dot");var f=document.getElementById(g+c+"_arrow");if(e){e.style.backgroundImage="url(/images/search/topbar_mid.gif)";e.style.color="#FECE02";if(d){d.style.color="#FECE02"}if(a){a.style.backgroundImage="url(/images/search/h_pag_dot.gif)"}if(f){if(f.style.backgroundImage.indexOf("h_arrow_up.gif")>=0){f.style.backgroundImage="url(/images/search/topbar_arrow_on.gif)"
}else{f.style.backgroundImage="url(/images/search/topbar_arrow.gif)"}}if(b){switch(c){case"list":b.src="/images/search/list_icon.gif";break;case"map":b.src="/images/search/map_icon.gif";break;case"grid":b.src="/images/search/grid_icon.gif";break;case"photo":b.src="/images/search/photoflow.gif";break;case"save":if(b.src.indexOf("h_check_icon_blk.gif")>=0){b.src="/images/search/h_check_icon.gif"}else{b.src="/images/search/h_save_icon.gif"}break;case"print":b.src="/images/search/h_print_icon.gif";break;case"email":b.src="/images/search/h_save_icon.gif";
break;case"rss":b.src="/images/search/h_rss_icon.gif";break}}}}function displayIdxPopup(a,b){ShowModal();var c;var m;if(typeof(window.innerWidth)=="number"){c=window.innerWidth;m=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){c=document.documentElement.clientWidth;m=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){c=document.body.clientWidth;m=document.body.clientHeight
}}}if(c<1030){var g=document.getElementById("idxpopup");if(g){g.style.height=(m-55)+"px";g.style.width="840px";g.style.marginLeft="-433px"}var h=document.getElementById("idxpopupcontent");if(h){h.style.height=(m-125)+"px"}var l=document.getElementById("idx_header_mid");if(l){l.style.width="816px"}}else{var g=document.getElementById("idxpopup");if(g){g.style.height=(m-45)+"px"}var h=document.getElementById("idxpopupcontent");if(h){h.style.height=(m-105)+"px"}}var f=document.getElementById("idx_popup_provider1");
if(f){f.innerHTML=b}var d=document.getElementById("idx_popup_provider2");if(d){d.innerHTML=b}var k=document.getElementById("idx_open_window1");if(k){k.href=a}var j=document.getElementById("idx_open_window2");if(j){j.href=a;j.innerHTML=a}var e=document.getElementById("idxpopupcontent");if(e){e.src=a}RemoveClass("idxpopup","hide");return false}function closeIdxPopup(){HideModal();AddClass("idxpopup","hide");return false}function displayIdxContactPopup(a,b){ShowModal();var c;var l;if(typeof(window.innerWidth)=="number"){c=window.innerWidth;
l=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){c=document.documentElement.clientWidth;l=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){c=document.body.clientWidth;l=document.body.clientHeight}}}var g=document.getElementById("idxcontactpopup");if(g){g.style.height=(l-45)+"px"}var h=document.getElementById("idxcontactpopupcontent");if(h){h.style.height=(l-125)+"px"
}var f=document.getElementById("idx_contact_popup_provider1");if(f){f.innerHTML=b}var d=document.getElementById("idx_contact_popup_provider2");if(d){d.innerHTML=b}var k=document.getElementById("idx_contact_open_window1");if(k){k.href=a}var j=document.getElementById("idx_contact_open_window2");if(j){j.href=a;j.innerHTML=a}var e=document.getElementById("idxcontactpopupcontent");if(e){e.src=a}RemoveClass("idxcontactpopup","hide");return false}function closeIdxContactPopup(){HideModal();AddClass("idxcontactpopup","hide");
return false};
function InitOffsiteLinks(){var E;if(document.getElementsByTagName){var G=document.getElementsByTagName("a");var F=G.length;for(var C=0;C<F;C++){if(G[C].href){E=getServerName(G[C].getAttribute("href"));if(E.length>0){if(!isValidC21Server(E)){var B=G[C].getAttribute("linktype");switch(B){case"property":G[C].onclick=function(){dcsMultiTrack("DCS.dcsuri",location.href,"WT.cg_n","Property Listing Search","WT.z_engage_type","Indirect","WT.z_engage_event","Search Router")};break;case"agent":G[C].onclick=function(){dcsMultiTrack("DCS.dcsuri",location.href,"WT.cg_n","Agent Search","WT.z_engage_type","Indirect","WT.z_engage_event","Agent Weblink")
};break;case"office":G[C].onclick=function(){dcsMultiTrack("DCS.dcsuri",location.href,"WT.cg_n","Office Listing Search","WT.z_engage_type","Indirect","WT.z_engage_event","Office Weblink")};break;default:break}var D=G[C].getAttribute("title");var A="You have selected a link to a website that is not owned or maintained by Century21.com.  Different terms of use and privacy policies will apply.";if(D){A+=" "+D}G[C].setAttribute("title",A)}}}}}}function getServerName(C){var B;var A;B=C.toLowerCase();A=B.indexOf("?");
if(A>=0){B=B.substring(0,A)}if(B.indexOf("http")==0){A=B.indexOf("https://");if(A>=0){B=B.substring((A+8),B.length)}A=B.indexOf("http://");if(A>=0){B=B.substring((A+7),B.length)}A=B.indexOf("/");if(A>=0){B=B.substring(0,A)}}else{B=""}return B}function isValidC21Server(B){var A=document.location.host.toLowerCase();if(B.indexOf(".c21.com")>=0){return true}if(B=="c21.com"){return true}if(B.indexOf(".century21.com")>=0){return true}if(B=="century21.com"){return true}if(B.indexOf(".netmovein.com")>=0){return true
}if(B.indexOf(".century21mortgage.com")>=0){return false}if(B==A){return true}return false}function c21Reporting(E,C,D){if(D.charAt(0)>="A"&&D.charAt(0)<="Z"){return }var B=document.getElementById("messagequeueiframe");if(B){var A=""+(Math.random()*10000000000000);B.src="/reporting/"+E+"?id="+D+"&type="+C+"&rnd="+A}return true}RfgQueueCommand("InitOffsiteLinks%28%29%3B");
var g_bInMove=false;function MoveSliderLeft(d){if(g_bInMove){return}if(d==null||d<=0){d=205}g_bInMove=true;var j=document.getElementById("photoselectioncontainer");if(j){var f=0;var b=0;if(!j.style.width||j.style.width==""){var a=j.getElementsByTagName("div");if(a&&a.length>0){for(var e=0;e<a.length;e++){var g=a[e].className;if(g.search("slide")>0){b+=CyberCoreFindWidth(a[e])}}}j.style.width=b+"px"}else{b=parseInt(j.style.width)}if(j.style.marginLeft!=null&&j.style.marginLeft!=""){f=parseInt(j.style.marginLeft)
}j.style.marginLeft=f+"px";if(f<0){var c=f+d;var h=new SmoothMovement(f,c,-7);window.setTimeout(function(){UpdateSlider(j,h,c,d)},20)}else{g_bInMove=false}}}function MoveSliderRight(e){if(g_bInMove){return}if(e==null||e<=0){e=205}g_bInMove=true;var k=document.getElementById("photoselectioncontainer");if(k){var g=0;var c=0;if(!k.style.width||k.style.width==""){var a=k.getElementsByTagName("div");if(a&&a.length>0){for(var f=0;f<a.length;f++){var h=a[f].className;if(h.search("slide")>0){c+=CyberCoreFindWidth(a[f])
}}}k.style.width=c+"px"}else{c=parseInt(k.style.width)}if(k.style.marginLeft!=null&&k.style.marginLeft!=""){g=parseInt(k.style.marginLeft)}k.style.marginLeft=g+"px";var d=g-e;if(Math.abs(d)<c){var j=new SmoothMovement(g,d,7);window.setTimeout(function(){UpdateSlider(k,j,d,e)},20)}else{g_bInMove=false;var b=document.getElementById("collectionnextbtn");b.src="/images/detail/nextphoto_disabled.gif"}}}function InitSlider(g){if(g==null||g<=0){g=205}var b=document.getElementById("photoselectioncontainer");if(b){var f=0;
if(!b.style.width||b.style.width==""){var e=b.getElementsByTagName("div");if(e&&e.length>0){for(var c=0;c<e.length;c++){var d=e[c].className;if(d.search("slide")>0){f+=CyberCoreFindWidth(e[c])}}}b.style.width=f+"px"}else{f=parseInt(b.style.width)}var a=document.getElementById("collectionnextbtn");if(g>=parseInt(f)){a.src="/images/detail/nextphoto_disabled.gif"}else{a.src="/images/detail/nextphoto.gif"}}}function UpdateSlider(c,a,e,g){if(g==null||g<=0){g=205}var f=a.updatePosition();c.style.marginLeft=f+"px";
if(f!=e){window.setTimeout(function(){UpdateSlider(c,a,e,g)},20)}else{g_bInMove=false;var d=document.getElementById("collectionpreviousbtn");if(e>=0){d.src="/images/detail/previousphoto_disabled.gif"}else{d.src="/images/detail/previousphoto.gif"}var b=document.getElementById("collectionnextbtn");if(Math.abs(e-g)>=parseInt(c.style.width)){b.src="/images/detail/nextphoto_disabled.gif"}else{b.src="/images/detail/nextphoto.gif"}}}function SwapMainImage(d,c){var b=document.getElementById("mainimageimg");if(b){b.src=d
}var a=document.getElementById("mainimage_caption");if(a){a.innerHTML=c}return false}function MoveCollectionLeft(g){if(g_bInMove){return}if(g==null||g<=0){g=205}g_bInMove=true;var b=document.getElementById("photoselectioncontainer");if(b){var h=0;var e=0;if(!b.style.width||b.style.width==""){var d=b.getElementsByTagName("div");if(d&&d.length>0){for(var c=0;c<d.length;c++){e+=CyberCoreFindWidth(d[c])+8}}b.style.width=e+"px"}else{e=parseInt(b.style.width)}if(b.style.marginLeft!=null&&b.style.marginLeft!=""){h=parseInt(b.style.marginLeft)
}b.style.marginLeft=h+"px";if(h<0){var f=h+g;var a=new SmoothMovement(h,f,-7);window.setTimeout(function(){UpdateCollectionSlide(b,a,f)},20)}else{g_bInMove=false}}}function MoveCollectionRight(e){if(g_bInMove){return}if(e==null||e<=0){e=205}g_bInMove=true;var j=document.getElementById("photoselectioncontainer");if(j){var g=0;var c=0;if(!j.style.width||j.style.width==""){var a=j.getElementsByTagName("div");if(a&&a.length>0){for(var f=0;f<a.length;f++){c+=CyberCoreFindWidth(a[f])+8}}j.style.width=c+"px"}else{c=parseInt(j.style.width)
}if(j.style.marginLeft!=null&&j.style.marginLeft!=""){g=parseInt(j.style.marginLeft)}j.style.marginLeft=g+"px";var d=g-e;if(Math.abs(d)<c){var h=new SmoothMovement(g,d,7);window.setTimeout(function(){UpdateCollectionSlide(j,h,d)},20)}else{g_bInMove=false;var b=document.getElementById("collectionnextbtn");b.src="/images/detail/nextphoto_disabled.gif"}}}function InitCollectionSlide(c){if(c==null||c<=0){c=205}var b=document.getElementById("photoselectioncontainer");if(b){var a=document.getElementById("collectionnextbtn");
if(c>=parseInt(b.style.width)){a.src="/images/detail/nextphoto_disabled.gif"}else{a.src="/images/detail/nextphoto.gif"}}}function UpdateCollectionSlide(c,a,e,g){if(g==null||g<=0){g=205}var f=a.updatePosition();c.style.marginLeft=f+"px";if(f!=e){window.setTimeout(function(){UpdateCollectionSlide(c,a,e)},20)}else{g_bInMove=false;var d=document.getElementById("collectionpreviousbtn");if(e>=0){d.src="/images/detail/previousphoto_disabled.gif"}else{d.src="/images/detail/previousphoto.gif"}var b=document.getElementById("collectionnextbtn");
if(Math.abs(e-g)>=parseInt(c.style.width)){b.src="/images/detail/nextphoto_disabled.gif"}else{b.src="/images/detail/nextphoto.gif"}}}function processMiniNav(m,b){var a=null;var k=null;var c=null;var g=null;try{var d=m.getElementsByTagName("property");if(d.length<1){return}for(var h=0;h<d.length;h++){var f=GetNodeValue(d[h],"id");if(f==b){if(h>0){a=GetNodeValue(d[h-1],"id");k=GetNodeValue(d[h-1],"picture-url")}if(h<(d.length-1)){c=GetNodeValue(d[h+1],"id");g=GetNodeValue(d[h+1],"picture-url")}break}}}catch(l){return
}if(a&&k){var j="/property/index.jsp?id="+a+"";if(a.charAt(0)>="A"&&a.charAt(0)<="Z"){j="/idxproperty/index.jsp?id="+a}SetInnerHtml("mininavprevtxt",'<a href="'+j+'">Previous<br/>result</a>');SetInnerHtml("mininavprevbtn",'<a href="'+j+'"><img src="/images/detail/previousresult.gif" width="18" height="18" border="0"></a>');SetInnerHtml("mininavprevimg",'<a href="'+j+'"><img src="'+k+'" width="43" height="29" border="0"></a>')}else{SetInnerHtml("mininavprevbtn",'<img src="/images/detail/previousphoto_disabled.gif" width="18" height="18" border="0">')
}if(c&&g){var j="/property/index.jsp?id="+c+"";if(c.charAt(0)>="A"&&c.charAt(0)<="Z"){j="/idxproperty/index.jsp?id="+c}SetInnerHtml("mininavnexttxt",'<a href="'+j+'">Next<br/>result</a>');SetInnerHtml("mininavnextbtn",'<a href="'+j+'"><img src="/images/detail/nextresult.gif" width="18" height="18" border="0"></a>');SetInnerHtml("mininavnextimg",'<a href="'+j+'"><img src="'+g+'" width="43" height="29" border="0"></a>')}else{SetInnerHtml("mininavnextbtn",'<img src="/images/detail/nextphoto_disabled.gif" width="18" height="18" border="0">')
}}function doMiniNav(b){var a=GetCookie("lsp");if(a){a=unescape(a);var d="/xml-bin/propertymininav?id="+b+"&"+a;var c=function(e){if(e.readyState==4&&e.status==200){processMiniNav(e.responseXML,b)}};g_AjaxQueue.schedule("propertymininav",d,c)}}function doSlideshow(b){c21Reporting("listing","Slides",b);var c="/property/slideshow.jsp?id="+b;if(g_previewMode){c+="&preview=true"}var a=window.open(c,"_blank","height=600,width=800,resizable=no,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes");dcsMultiTrack("DCS.dcsuri",location.href,"WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","View Prop Multimedia");
return false}function displayMedianAgeChartPopup(){return false}function doVirtualTour(b){var a=window.open(b,"_blank","height=525,width=525,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no");dcsMultiTrack("DCS.dcsuri",location.href,"WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","View Prop Multimedia");return false}function displaySharePopup(c){var a=document.getElementById("share_popup");if(a){try{positionPopup(c,a)}catch(b){}a.style.display="block";a.style.zIndex=50000
}return false}function displayYouTubeLinkPopup(c){var a=document.getElementById("youtubelinkpopup");if(a){try{positionPopup(c,a)}catch(b){}a.style.display="block";a.style.zIndex=50000}return false}function displayVirtualTourPopup(f,a,d){c21Reporting("listing","Virtual",d);if(a==1){doVirtualTour(g_strFirstVirtualTour)}else{var b=document.getElementById("virtualtourspopup");if(b){try{positionPopup(f,b)}catch(c){}b.style.display="block";b.style.zIndex=50000}}return false}function doFloorPlan(b){var a=window.open(b,"_blank","height=525,width=525,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no");
return false}function displayFloorPlanPopup(f,d,c){c21Reporting("listing","Floor",c);if(d==1){doFloorPlan(g_strFirstFloorPlan)}else{var a=document.getElementById("floorplanspopup");if(a){try{positionPopup(f,a)}catch(b){}a.style.display="block";a.style.zIndex=50000}}return false}function doAttachment(b){var a=window.open(b,"_blank","height=525,width=525,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=no");return false}function displayAttachmentPopup(f,a,d){if(a==1){doFloorPlan(g_strFirstAttachment)
}else{var b=document.getElementById("attachmentspopup");if(b){try{positionPopup(f,b)}catch(c){}b.style.display="block";b.style.zIndex=50000}}return false}function ShowC21Connection(a,b){return true}function showEmailDialog(h,g,a){var d=document.getElementById("emailafriendpopup");if(d){try{positionPopup(h,d)}catch(f){}d.style.display="block";d.style.zIndex=50000;var c=(new Date()).getTime();var b=document.getElementById("emailafriendframe");if(b){b.src="/emailafriend/property.jsp?id="+escape(g)+"&officeid="+escape(a)+"&rid="+escape(c)
}}return false}function showSearchEmailDialog(h){var g="";var c=document.getElementById("emailpropertyids");if(c){g=c.value}var d=document.getElementById("emailafriendpopup");if(d){try{positionPopup(h,d)}catch(f){}d.style.display="block";d.style.zIndex=50000;var b=(new Date()).getTime();var a=document.getElementById("emailafriendframe");if(a){a.src="/emailafriend/search.jsp?ids="+escape(g)+"&rid="+escape(b)}}return false}function removeDefaultText(b,a){if(b){if(b.value==a){b.value=""}}return false}function SelectDetailTab(c,b){resetDetailTabs();
c.className="selected";c.blur();hideAllDetailContainers();var f=document.getElementById(b);if(f){f.style.visibility="visible"}var e=document.getElementById("tabholder");if(e){var a=f.offsetHeight;var d=a+20;if(d<335){d=335}if(b=="detailcontainer_2"){d=585}e.style.height=d+"px"}return false}function resetDetailTabs(){var a=false;for(var b=1;a==false;b++){var c=document.getElementById("detailtab_"+b);if(c){c.className=""}else{if(b!=1){a=true}}}}function hideAllDetailContainers(){var a=false;for(var b=1;a==false;
b++){var c=document.getElementById("detailcontainer_"+b);if(c){c.style.visibility="hidden"}else{if(b!=1){a=true}}}}function openFullDescription(){var b=document.getElementById("partialDescription");var a=document.getElementById("fullDescription");if(b&&a){b.style.display="none";a.style.display="block"}}function closeFullDescription(){var b=document.getElementById("partialDescription");var a=document.getElementById("fullDescription");if(b&&a){b.style.display="block";a.style.display="none"}}function DisableAllLinksAndForms(){try{var b=document.getElementsByTagName("form");
for(var c=0;c<b.length;c++){if(b[c].className.indexOf("preview_ok")<0){b[c].action="";b[c].onsubmit="";b[c].onsubmit=previewAlert}}var a=document.getElementsByTagName("a");for(var c=0;c<a.length;c++){if(a[c].className==null||a[c].className.indexOf("preview_ok")<0){a[c].href="#";a[c].onclick=previewAlert}}}catch(d){alert("fail")}}function previewAlert(){alert("Action Disabled For Preview");return false}var youtubes=new Object();function ShowVideo(f){var a=document.getElementById("videopopup");if(a){a.style.display="inline";
var e=document.getElementById("videocontainer");var d=document.getElementById("videodescription");if(e&&d){var b=getYouTubeEmbedUrl(youtubes[f+"_ref"]);var c='<object width="480" height="385"><param name="movie" value="'+b+'"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="'+b+'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>';e.innerHTML=c;d.innerHTML=youtubes[f+"_com"]
}}HidePopup("youtubelinkpopup");return false}function isYouTubeUrl(a){var b=new RegExp("http://[A-Z1-9]*.?youtube.com");return b.test(a)}function getYouTubeEmbedUrl(b){var a="http://www.youtube.com/v/";var c=getYoutubeKey(b);return a+c}function getYoutubeUrl(a){var c=/http:\/\/[A-Z1-9]*\.?youtube\.com/;var b=c.exec(a);return b[0]}function getYoutubeKey(d){var d=d.substring(23);var b=d.indexOf("/");var a=d.indexOf("=");if(b>=0&&a>=0){d=d.substring(Math.min(b,a)+1)}else{if(b<0){d=d.substring(a+1)}}var c=d.indexOf("&");
if(c>=0){d=d.substring(0,c)}return d};
function ShowComingSoonDialog(){var A=document.getElementById("comingsoonpopup");if(A){A.style.top="125px";try{if(window.innerWidth){A.style.left=(window.innerWidth/2)-209+"px"}else{if(document.body&&document.body.clientWidth){A.style.left=(document.body.clientWidth/2)-209+"px"}else{A.style.left="300px"}}}catch(B){}A.style.display="block"}return false}function HideComingSoonDialog(){var A=document.getElementById("comingsoonpopup");if(A){A.style.display="none"}return false};
var ignoreMe;if(document.body){ignoreMe=document.body.scrollTop}if(document.documentElement.scrollTop){ignoreMe=document.documentElement.scrollTop}var g_lMyC21Account=null;var g_strMyC21FName=null;var g_cMyC21AccountType=null;var g_globalAfterLoginCallback=null;var g_globalAfterLoginCallbackArgs=null;function MyC21AccountLogout(){document.cookie="talksacct=; expires=Thu, 1 Jan 70 00:00:01 GMT; path=/communities/";document.cookie="myc21=; expires=Thu, 1 Jan 70 00:00:01 GMT; path=/";document.cookie="myc21auth=; expires=Thu, 1 Jan 70 00:00:01 GMT; path=/";
var A=document.getElementById("beacontext");if(A){A.innerHTML='<a onClick="return displayMyC21Login(null);" href="/myc21/standalone/login.jsp">Sign in</a><br>Not registered? <a href="/myc21/standalone/register.jsp" onClick="return DisplayRegisterPopup();">Sign up</a>'}SetInnerHtml("openhouseplancount","");var B=location.href;if(B.search(/myc21/)>-1){location.href="/"}g_lMyC21Account=null;g_strMyC21FName=null}function processMyC21Account(){var A=GetCookie("myc21");if(A){A=A.replace('"',"");A=A.replace('"',"");
if(A){var B=A.split(":");if(B.length>3){g_lMyC21Account=B[0];if(g_lMyC21Account>0){g_cMyC21AccountType=B[1];if(g_cMyC21AccountType=="G"){g_strMyC21FName="Guest"}else{if(g_cMyC21AccountType=="R"){g_strMyC21FName=B[2].replace(/\+/g," ");g_strMyC21FName=unescape(g_strMyC21FName)}else{g_lMyC21Account=null;return false}}count=B[3];if(count!=""){SetInnerHtml("openhouseplancount","("+count+")")}return true}}}}return false}function updateOpenHousePlanCount(A){processMyC21Account();document.cookie='myc21="'+g_lMyC21Account+":"+g_cMyC21AccountType+":"+escape(g_strMyC21FName)+":"+A+'"; path=/';
SetInnerHtml("openhouseplancount","("+A+")")}function loginMyC21AccountAndPerformAction(C,B,A){if(g_lMyC21Account==null){if(!processMyC21Account()){HideOpenHouseDateDisplay();g_globalAfterLoginCallback=C;g_globalAfterLoginCallbackArgs=B;displayMyC21Login();return false}}if(g_cMyC21AccountType=="G"&&(A==null||!A)){displayGuestRestriction();return false}C(B);return false}function setMyC21TabContent(B){var A=document.getElementById("beacontext");if(A){A.innerHTML=B}}function setMyC21TabLoggedIn(){setMyC21TabLoggedInWithValue(g_strMyC21FName)
}function setMyC21TabLoggedInWithValue(A){var A="Welcome "+A+"<br/>";A+='<a href="#" onclick="return MyC21AccountLogout();">Logout</a> &nbsp; ';A+='<a href="/myc21/results/properties.jsp">Go to My C21 page</a>';setMyC21TabContent(A)}function setMyC21TabGuestLoggedIn(){var A="Welcome Guest<br/>";A+='<a href="/myc21/standalone/register.jsp" onClick="return DisplayRegisterPopup();">Register</a>';setMyC21TabContent(A)}function setSavedImage(B){var A=document.getElementById(B);if(A){if(B=="option_save_icon"){A.src="/images/search/h_check_icon.gif"
}else{if(B=="save_img"){A.src="/images/search/topbar_save_on.gif"}else{if(B.indexOf("save_img_v2_")>=0){A.src="/images/search/save_check_but_yel.gif"}else{if(B.indexOf("save_text")>=0){A.innerHTML="Saved"}else{A.src="/images/myc21/save_but_on.gif"}}}}}}function getInputValue(B){var A=document.getElementById(B);if(A){return A.value}return""}function setFocus(B){var A=document.getElementById(B);if(A){A.focus()}}function clearInputValue(B){var A=document.getElementById(B);if(A){A.value=""}}function setInputValue(B,C){var A=document.getElementById(B);
if(A){A.value=C}}function getCenterPosition(){try{if(window.innerWidth){return(window.innerWidth/2)-120+"px"}else{if(document.body&&document.body.clientWidth){return(document.body.clientWidth/2)-120+"px"}else{return"125px"}}}catch(A){}return"125px"}function positionPopup(D,C){if(D&&!(g_pBrowser.bIsMsIe&&g_pBrowser.fVersionMajor)){var B=CyberCoreFindPosX(D)-100;if(g_pBrowser.bIsMsIe){if(document.getElementById("page_sidebar")){B-=(CyberCoreFindWidth(document.getElementById("page_sidebar"))+10)}}var A=CyberCoreFindPosY(D);
C.style.left=B+"px";C.style.top=A+"px";if(parseInt(C.style.left)<0){C.style.left="125px"}if(parseInt(C.style.top)<0){C.style.top="65px"}}else{if(D){var A=CyberCoreFindPosY(D);C.style.top=A+"px";C.style.left=getCenterPosition()}else{C.style.top="125px";C.style.left=getCenterPosition()}}}function doMyC21Login(){RemoveClass("myc21loginload","hide");AddClass("myc21loginsubmit","hide");return true}function doCallbackAfterLogin(){if(g_lMyC21Account!=null){g_globalAfterLoginCallback(g_globalAfterLoginCallbackArgs)}return false
}function doMortgageRecalculation(){var C=parseFloat(document.getElementById("mortgageamt").value);var B=parseFloat(document.getElementById("mortgagerate").value)/100;var D=parseInt(document.getElementById("mortgageterm").value);var A=(C*((B/12)/(1-Math.pow((1+(B/12)),(-12*D)))));HidePopup("mortgagepopup");var E=document.getElementById("propertyMonthlyPayment");if(E){E.innerHTML="$"+AddCommas(A.toFixed(2))}}function displayMortgageRecalculator(D,C){var A=document.getElementById("mortgagepopup");if(A){try{positionPopup(D,A);
A.style.left=(parseInt(A.style.left)-100)+"px";setInputValue("mortgageamt",C);setInputValue("mortgagerate","4.75");setInputValue("mortgageterm","30")}catch(B){}A.style.display="block";A.style.zIndex=50000}return false}function displayGuestRestriction(){var C=document.getElementById("myc21popup");if(C){try{positionPopup(pObj,C);C.style.left=(parseInt(C.style.left)-250)+"px"}catch(D){}ShowModal();C.style.display="block";C.style.zIndex=50000;var B=(new Date()).getTime();var A=document.getElementById("myc21frame");
if(A){A.src="/myc21/forms/guestrestriction.jsp?rid="+escape(B)}}return false}function displayMyC21Login(E){var C=document.getElementById("myc21popup");if(C){try{positionPopup(E,C);C.style.left=(parseInt(C.style.left)-250)+"px"}catch(D){}ShowModal();C.style.display="block";C.style.zIndex=50000;var B=(new Date()).getTime();var A=document.getElementById("myc21frame");if(A){A.src="/myc21/forms/login.jsp?rid="+escape(B)}}return false}function hideAndResetSavedSearchPopup(){HidePopup("myc21searchpopup");clearInputValue("myc21searchnickname");
clearInputValue("myc21searchnotes");clearInputValue("myc21searchparms");DisableFormElements("myc21searchpopup",false);AddClass("myc21searchsaved","hide");RemoveClass("myc21searchsubmit","hide");AddClass("pseach_save_options","hide");RemoveClass("pseach_edit_options","hide")}function hideAndResetAddItemPopup(){HidePopup("myc21addpopup");clearInputValue("myc21addnickname");clearInputValue("myc21addnotes");clearInputValue("myc21addparms");DisableFormElements("myc21addpopup",false);AddClass("myc21addsaved","hide");
RemoveClass("myc21addsubmit","hide")}function doMyC21AddItem(){var C=getInputValue("myc21addnickname");var D=getInputValue("myc21addnotes");var E=getInputValue("myc21addparms");var A=getInputValue("myc21addimgid");var B=(new Date()).getTime();var G="/ajaxservlet/myc21/saveitem?"+E+"&nickname="+escape(C)+"&notes="+escape(D)+"&rid="+escape(B);if(E.indexOf("type=S")>-1){if(!getInputValue("myc21addnotifyend").match(/\d{2}\/\d{2}\/\d{4}/)){alert("Please enter a date in the correct format MM/DD/YYYY");return }else{if(1*getInputValue("myc21addfreq")>Math.ceil(((new Date(getInputValue("myc21addnotifyend"))).getTime()-(new Date()).getTime())/(1000*60*60*24))){alert("The entered frequency will never be triggered with the current end date. Please enter another end date or frequency.");
return }}G+="&freq="+getInputValue("myc21addfreq")+"&notifyend="+getInputValue("myc21addnotifyend")}var F=function(K){if(K.readyState==4&&K.status==200){var H=GetNodeValue(K.responseXML,"results");alert(H);if(H&&H=="success"){AddClass("myc21addload","hide");RemoveClass("myc21addsaved","hide");var J=GetNodeValue(K.responseXML,"type");var L=GetNodeValue(K.responseXML,"key");if(J&&J!=""&&L&&L!=""){c21Reporting(J,"Saved",L)}setSavedImage(A);window.setTimeout(hideAndResetAddItemPopup,2000)}else{var I=GetNodeValue(K.responseXML,"message");
if(!I){I="An error occurred while processing your request.  Please try again."}SetInnerHtml("myc21adderror",I);DisableFormElements("myc21addpopup",false);AddClass("myc21addload","hide");RemoveClass("myc21addsubmit","hide")}}};DisableFormElements("myc21addpopup",true);RemoveClass("myc21addload","hide");AddClass("myc21addsubmit","hide");g_AjaxQueue.schedule("myc21add",G,F);dcsMultiTrack("WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","Add Note");return false}function doMyC21SaveSearch(){var D=getInputValue("myc21searchnickname");
var E=getInputValue("myc21searchnotes");var F=getInputValue("myc21searchparms");var B=getInputValue("myc21searchimgid");var C=(new Date()).getTime();var H="/ajaxservlet/myc21/saveitem?"+F+"&nickname="+escape(D)+"&notes="+escape(E)+"&rid="+escape(C);var A=getInputValue("myc21searchnotifyend");if(A!=""&&!A.match(/\d{2}\/\d{2}\/\d{4}/)){alert("Please enter a date in the correct format MM/DD/YYYY");return }else{if(A!=""&&1*getInputValue("myc21searchfreq")>Math.ceil(((new Date(A)).getTime()-(new Date()).getTime())/(1000*60*60*24))){alert("The entered frequency will never be triggered with the current end date. Please enter another end date or frequency.");
return }}H+="&freq="+getInputValue("myc21searchfreq")+"&notifyend="+A;var G=function(L){if(L.readyState==4&&L.status==200){var I=GetNodeValue(L.responseXML,"results");if(I&&I=="success"){AddClass("myc21searchload","hide");RemoveClass("myc21searchsaved","hide");var K=GetNodeValue(L.responseXML,"type");var M=GetNodeValue(L.responseXML,"key");if(K&&K!=""&&M&&M!=""){c21Reporting(K,"Saved",M)}setSavedImage(B);window.setTimeout(hideAndResetSavedSearchPopup,2000)}else{var J=GetNodeValue(L.responseXML,"message");if(!J){J="An error occurred while processing your request.  Please try again."
}SetInnerHtml("myc21searcherror",J);DisableFormElements("myc21searchpopup",false);AddClass("myc21searchload","hide");RemoveClass("myc21searchsubmit","hide")}}};DisableFormElements("myc21searchpopup",true);RemoveClass("myc21searchload","hide");AddClass("myc21searchsubmit","hide");g_AjaxQueue.schedule("myc21search",H,G);dcsMultiTrack("WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","Add Note");return false}function displayMyC21SaveItemPopup(E,C,A){var B=document.getElementById("myc21addpopup");
if(B){try{positionPopup(E,B);ShowModal();setInputValue("myc21addparms",C);setInputValue("myc21addimgid",A);AddClass("myc21addload","hide");RemoveClass("myc21addsubmit","hide");SetInnerHtml("myc21adderror","");SetInnerHtml("additemadditional","");document.getElementById("additempopupcallout").style.height="177px";setFocus("myc21addnickname")}catch(D){}B.style.display="block";B.style.zIndex=50000}return false}function displayMyC21SaveSearchPopup(F,C,A,E){var B=document.getElementById("myc21searchpopup");if(B){try{positionPopup(F,B);
ShowModal();setInputValue("myc21searchparms",C);setInputValue("myc21searchimgid",A);AddClass("myc21searchload","hide");RemoveClass("myc21searchsubmit","hide");SetInnerHtml("myc21searcherror","");if(E){RemoveClass("search_popup_table","hide");document.getElementById("myc21searchtitle").innerHTML="Receive Email Alerts<div style='font-size:.9em;font-weight:normal;'>Setup your alert now</div>";document.getElementById("myc21searchnicknamelabel").innerHTML="Alert Nickname";document.getElementById("myc21searchnotelabel").innerHTML="Add a note to this alert"
}else{AddClass("search_popup_table","hide");document.getElementById("myc21searchtitle").innerHTML="Setup Your Saved Search";document.getElementById("myc21searchnicknamelabel").innerHTML="Search Nickname";document.getElementById("myc21searchnotelabel").innerHTML="Add a note to this search"}setFocus("myc21searchnickname")}catch(D){}B.style.display="block";B.style.zIndex=50000}return false}function saveOfficeToMyC21(B,A){loginMyC21AccountAndPerformAction(this.saveOfficeToMyC21Body,arguments)}function saveOfficeToMyC21Body(A){var C=A[0];
var B=A[1];displayMyC21SaveItemPopup(C,"type=O&office_key="+escape(B),"save_img"+B);dcsMultiTrack("WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","Save Office");return false}function saveAgentToMyC21(B,A){loginMyC21AccountAndPerformAction(this.saveAgentToMyC21Body,arguments)}function saveAgentToMyC21Body(A){var C=A[0];var B=A[1];displayMyC21SaveItemPopup(C,"type=A&sa_key="+escape(B),"save_img"+B);dcsMultiTrack("WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","Save Agent");
return false}function saveOpenHouseToMyC21(D,B,C,A){loginMyC21AccountAndPerformAction(this.saveOpenHouseToMyC21Body,arguments,true)}function saveOpenHouseToMyC21Body(C){var F=C[0];var B=C[1];var E=C[2];var A=C[3];var D=(new Date()).getTime();var H="/ajaxservlet/openhouse/saveevent?tr_key="+escape(F)+"&start="+escape(B)+"&rid="+escape(D);var G=function(L){if(L.readyState==4&&L.status==200){var I=GetNodeValue(L.responseXML,"result");if(I&&I=="success"){var K=document.getElementById("openhouse_save_"+F+"_"+B);if(K){K.innerHTML='<img src="/images/myc21/save_but_on.gif" alt="saved" align="top" />'
}var M=GetNodeValue(L.responseXML,"message");HideOpenHouseDateDisplay();displaySavedOpenHousePopup(M,B,E,A)}else{var J=GetNodeValue(L.responseXML,"message");if(!J){J="An error occurred while processing your request.  Please try again."}alert(J)}}};g_AjaxQueue.schedule("myc21add",H,G);return false}function printCommercialListing(A,B){window.print()}function printListing(A){c21Reporting("listing","PropPrinted",A);window.print();dcsMultiTrack("WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","Print Listing")
}function printListingUpdated(F){var A=false;if(window.location.href.search("directions.jsp")>=0){var B=document.forms.directionsform.faddress.value;var G=document.forms.directionsform.fcity.value;var E=document.forms.directionsform.fstate.value;var D=document.forms.directionsform.fzip.value;var C=getDirectionErrors(B,G,E,D);if(C!=""){alert(C);return true}else{button=document.getElementById("print_button");button.href=button.href+"&faddress="+B+"&fcity="+G+"&fstate="+E+"&fzip="+D}}else{if(!window.location.href.search("index.jsp")&&!window.location.href.search("heighborhoods.jsp")){window.print();
A=true}}c21Reporting("listing","PropPrinted",F);dcsMultiTrack("WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","Print Listing");return !A}function printAgent(A){window.print();c21Reporting("agent","Printed",A);dcsMultiTrack("WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","Print Agent")}function printAgentUpdated(D){if(window.location.href.search("directions.jsp")>=0){var A=document.forms.directionsform.faddress.value;var F=document.forms.directionsform.fcity.value;var E=document.forms.directionsform.fstate.value;
var C=document.forms.directionsform.fzip.value;var B=getDirectionErrors(A,F,E,C);if(B!=""){alert(B);return true}else{button=document.getElementById("print_button");button.href=button.href+"&faddress="+A+"&fcity="+F+"&fstate="+E+"&fzip="+C}}else{window.print()}c21Reporting("agent","Printed",D);dcsMultiTrack("WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","Print Agent");return false}function printOffice(A){c21Reporting("office","Printed",A);dcsMultiTrack("WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","Print Office");
window.print()}function printOfficeUpdated(D){if(window.location.href.search("directions.jsp")>=0){var A=document.forms.directionsform.faddress.value;var F=document.forms.directionsform.fcity.value;var E=document.forms.directionsform.fstate.value;var C=document.forms.directionsform.fzip.value;var B=getDirectionErrors(A,F,E,C);if(B!=""){alert(B);return false}else{button=document.getElementById("print_button");button.href=button.href+"&faddress="+A+"&fcity="+F+"&fstate="+E+"&fzip="+C}}else{window.print()}c21Reporting("office","Printed",D);
dcsMultiTrack("WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","Print Office");return false}function printTeam(A){window.print()}function printTeamUpdated(E){if(window.location.href.search("directions.jsp")>=0){var A=document.forms.directionsform.faddress.value;var F=document.forms.directionsform.fcity.value;var D=document.forms.directionsform.fstate.value;var C=document.forms.directionsform.fzip.value;var B=getDirectionErrors(A,F,D,C);if(B!=""){alert(B);return true}else{button=document.getElementById("print_button");
button.href=button.href+"&faddress="+A+"&fcity="+F+"&fstate="+D+"&fzip="+C}}else{window.print()}return false}function getDirectionErrors(A,F,E,D){var C="";var B=false;if(A==""||F==""||E==""||D==""){B=true}if(B){C="Please correct the following problems to go to the print view:\n";if(A==""){C+="\nPlease fill in an address."}if(F==""){C+="\nPlease fill in a city."}if(E==""){C+="\nPlease fill in a state."}if(D==""){C+="\nPlease fill in a zip code."}}return C}function savePressReleaseToMyC21(B,A){loginMyC21AccountAndPerformAction(this.savePressReleaseToMyC21Body,arguments)
}function savePressReleaseToMyC21Body(B){var C=B[0];var A=B[1];displayMyC21SaveItemPopup(C,"type=R&pr_id="+escape(A),"this_pr_save");dcsMultiTrack("WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","Save Press Release");return false}function savePropertyToMyC21(C,B,A){loginMyC21AccountAndPerformAction(this.savePropertyToMyC21Body,arguments)}function savePropertyToMyC21Body(A){var E=A[0];var D=A[1];var B="save_img";try{B=A[2]}catch(C){B="save_img"}if(B==null||B==""){B="save_img"}if(B!="option_save_icon"){B=B+D
}displayMyC21SaveItemPopup(E,"type=P&tr_key="+escape(D),B);dcsMultiTrack("WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","Save Property");return false}function savePropertySearchToMyC21(D,B,A,C){loginMyC21AccountAndPerformAction(this.savePropertySearchToMyC21Body,arguments)}function saveSearchToMyC21(C,B,A){loginMyC21AccountAndPerformAction(this.saveSearchToMyC21Body,arguments)}function updateSearchToMyC21(E){var F=E.parentNode.parentNode.parentNode;var B=F.cells[2].getElementsByTagName("SELECT")[0];
var C=F.cells[3].getElementsByTagName("INPUT")[0];if(!C.value.match(/\d{2}\/\d{2}\/\d{4}/)){alert("Please enter a date in the correct format MM/DD/YYYY");return }else{if(Math.ceil(((new Date(C.value)).getTime()-(new Date()).getTime())/(1000*60*60*24))<=0||1*B.options[B.selectedIndex].value>Math.ceil(((new Date(C.value)).getTime()-(new Date()).getTime())/(1000*60*60*24))){alert("The entered frequency will never be triggered with the current end date. Please enter another end date or frequency.");return }}var A="/ajaxservlet/myc21/saveitem?type=S&search_type=P&itemid="+E.getAttribute("itemid")+"&freq="+B.options[B.selectedIndex].value+"&notifyend="+escape(C.value)+"&r="+(new Date()).getTime();
var D=function(H){if(H.readyState==4&&H.status==200){var G=GetNodeValue(H.responseXML,"results");if(G&&G=="success"){alert("Search Update Saved.");E.getElementsByTagName("img")[0].src="/images/myc21/save_but_on.gif"}else{alert("Error saving updates, please try again.")}}};g_AjaxQueue.schedule("myc21update",A,D);return false}function saveSearchToMyC21Body(C){var E=C[0];var B=C[1];var A=C[2];var D=A;displayMyC21SaveItemPopup(E,"type=S&search_type="+escape(B)+"&query="+escape(D),"option_save_icon");document.getElementById("additempopupcallout").style.height="270px";
SetInnerHtml("additemadditional",sAdditionalHtml.join(""));dcsMultiTrack("WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","Save Search");return false}function savePropertySearchToMyC21Body(C){var F=C[0];var B=C[1];var A=C[2];var E=C[3];var D=A;displayMyC21SaveSearchPopup(F,"type=S&search_type="+escape(B)+"&query="+escape(D),"option_save_icon",E);dcsMultiTrack("WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","Save Search");return false}function saveCalculatorToMyC21(C,A,B){loginMyC21AccountAndPerformAction(this.saveCalculatorToMyC21Body,arguments)
}function saveCalculatorToMyC21Body(A){var D=A[0];var B=A[1];var C=A[2];displayMyC21SaveItemPopup(D,"type=C&calc_type="+escape(B)+"&url="+escape(C),"save_img");return false}function saveDirectionsToMyC21(A){loginMyC21AccountAndPerformAction(this.saveDirectionsToMyC21Body,arguments)}function saveDirectionsToMyC21Body(d){var a=d[0];var V=document.getElementById("endAddress");var g=document.getElementById("endCity");var X=document.getElementById("endState");var J=document.getElementById("endZip");var Q=document.getElementById("endLat");
var A=document.getElementById("endLong");var C=document.getElementById("endProvince");var M=document.getElementById("endCountry");var H=document.getElementById("startAddress");var Z=document.getElementById("startCity");var e=document.getElementById("startState");var h=document.getElementById("startZip");var D=document.getElementById("startLat");var b=document.getElementById("startLong");var F=document.getElementById("startProvince");var E=document.getElementById("startCountry");var T=document.getElementById("distance");
if(V&&g&&X&&J&&Q&&A&&C&&M&&H&&Z&&e&&h&&D&&b&&F&&E&&T){var B=V.value;var I=g.value;var O=X.value;var f=J.value;var U=Q.value;var Y=A.value;var W=C.value;var j=M.value;var N=H.value;var i=Z.value;var P=e.value;var c=h.value;var S=D.value;var L=b.value;var R=F.value;var K=E.value;var G=T.value;displayMyC21SaveItemPopup(a,"type=D&endaddress="+escape(B)+"&endcity="+escape(I)+"&endstate="+escape(O)+"&endzip="+escape(f)+"&endlat="+escape(U)+"&endlong="+escape(Y)+"&endprovince="+escape(W)+"&endcountry="+escape(j)+"&startaddress="+escape(N)+"&startcity="+escape(i)+"&startstate="+escape(P)+"&startzip="+escape(c)+"&startlat="+escape(S)+"&startlong="+escape(L)+"&startprovince="+escape(R)+"&startcountry="+escape(K)+"&distance="+escape(G)+"","save_directions_button");
dcsMultiTrack("WT.cg_n","Engage","WT.z_engage_type","Engage","WT.z_engage_event","Save Directions")}else{alert("We could not save your directions.  Please try again later.")}return false}function updateStateDisplayForCountry(){var C=document.getElementById("country");if(C){var B=document.getElementById("provincefield");var A=document.getElementById("statedropdown");if(B&&A){if(C.value!="US"){B.style.display="";A.style.display="none"}else{var D=document.getElementById("province");if(D){D.value=""}B.style.display="none";
A.style.display=""}}}}function processUserTypeChange(){var C=document.getElementById("usertypeselect");var A=document.getElementById("emailoptin_section");var B=document.getElementById("emailoptin");if(C&&B){if(C.options[C.selectedIndex].value=="O"){B.checked=false;A.style.visibility="hidden"}else{A.style.visibility="visible"}}}function toggleEmailUsername(){var B=document.getElementById("emailusername");if(B){if(B.checked){var C=document.getElementById("email");var A=document.getElementById("username");if(C&&A){A.value=C.value
}}}}function clearEmailUsernameCb(){var A=document.getElementById("emailusername");if(A){A.checked=false}}function DisplayNotes(E,B){var C=document.getElementById("notespopup");if(C){try{positionPopup(E,C);C.style.left=(parseInt(C.style.left)-100)+"px"}catch(D){}try{var A=document.getElementById("notescontent");if(A){A.innerHTML=B}}catch(D){}C.style.display="block";C.style.zIndex=50000}return false}function DisplayRegisterPopup(E){var C="";if(typeof (E)!="undefined"){C="&email="+escape(E)}var F=document.getElementById("myc21popup");
if(F){F.style.top="60px";try{if(window.innerWidth){F.style.left=(window.innerWidth/2)-321+"px"}else{if(document.body&&document.body.clientWidth){F.style.left=(document.body.clientWidth/2)-321+"px"}else{F.style.left="150px"}}}catch(G){}ShowModal();F.style.display="block";F.style.zIndex=50000;var D=(new Date()).getTime();var B=document.getElementById("myc21frame");if(B){B.src="/myc21/forms/register.jsp?rid="+escape(D)+C}var A=document.getElementById("header_2010_logo");if(A){A.scrollIntoView()}}return false}function HidePopup(A){if(typeof A=="string"){A=document.getElementById(A)
}if(A){A.style.display="none";A.style.zIndex=0}HideModal();return false}function ShowPopup(D,B,A){if(typeof B=="string"){B=document.getElementById(B)}if(B){try{positionPopup(D,B);B.style.left=(parseInt(B.style.left)+A)+"px"}catch(C){}B.style.display="block";B.style.zIndex=50000}return false}function resizeDialog(C,D,A){var E=document.getElementById(C+"outer");if(E){E.style.height=(D+99)+"px";E.style.width=(A+51)+"px"}var B=document.getElementById(C+"inner");if(B){B.style.height=(D+48)+"px"}var B=document.getElementById(C+"frame");
if(B){B.style.height="100%"}};
function ShowTutorial(A){var B=document.getElementById("PopupWrapper");if(B){strHtml='<div id="PopupMask"></div><div id="TutorialFrameContainer" style="background-color:#000000;">   <iframe id="TutorialIframe" src="/flash/tutorials/blank.html" width="730" height="540" scrolling="no" frameborder="0"></iframe></div>';B.innerHTML=strHtml;setTimeout(function(){writeTutorial(A)},100)}}function writeTutorial(D){var E=document.getElementById("PopupWrapper");if(E){var A=document.getElementById("TutorialIframe");StopHeroes("homepageheroes");
if(A){A.src="/tutorials/maptool/"}var B=document.getElementById("TutorialFrameContainer");if(B){B.style.zIndex="99999999";B.style.background="#000000";B.style.position="absolute";B.style.top="100px";B.style.left="50%";B.style.marginLeft="-395px";setTimeout(function(){TutorialBackgroundFixup(0,"homepageheroes")},500)}var C=document.getElementById("PopupMask");if(C){C.style.position="absolute";C.style.top="0";C.style.left="0";C.style.width="100%";C.style.height="100%";C.style.zIndex="99999999";C.style.background="#000000"
}RemoveClass(E,"hide")}}function TutorialBackgroundFixup(C,B){var A=document.getElementById("TutorialFrameContainer");if(A){A.style.zIndex="99999999";A.style.background="#000000";if(B){StopHeroes(B)}if(C!=null&&C<10){setTimeout(function(){TutorialBackgroundFixup((C+1),"homepageheroes")},500)}}}function CloseTutorial(){var A=document.getElementById("TutorialIframe");if(A){A.src="/flash/tutorials/blank.html"}var B=document.getElementById("PopupWrapper");if(B){B.innerHTML="";AddClass(B,"hide")}};
var g_aPOIs=new Array();g_aPOIs.coffee=new Array();g_aPOIs.school=new Array();g_aPOIs.transportation=new Array();g_aPOIs.park=new Array();g_aPOIs.restaurant=new Array();function setOpenHousePopupSrc(A){var B=document.getElementById("ohppopupcontent");if(B){B.src=A}}function displayOpenHousePopup(){ShowModal();RemoveClass("ohppopup","hide");var A="/openhouse/popup/listplans.jsp";setOpenHousePopupSrc(A);return false}function displaySavedOpenHousePopup(C,E,D,A){ShowModal();RemoveClass("ohppopup","hide");var B="/openhouse/popup/listplans.jsp?planid="+escape(C)+"&starttime="+escape(E)+"&endtime="+escape(D);
if(A!=null&&A!=""){B+="&address="+escape(A)}setOpenHousePopupSrc(B);return false}function closeOpenHousePopup(){HideModal();AddClass("ohppopup","hide");return false};


