var zDisableSearchFilter=0;var zValues=[];function zInitZValues(a){for(var b=0;b<a;b++){zValues[b]=[]}}var is_webkit=navigator.userAgent.toLowerCase().indexOf("webkit")>-1;function zswfr(h,c,b){var k=h.indexOf(c);if(k!=-1){var a=h.substr(0,k);var d=h.substr(k+c.length,h.length-(k+c.length));return a+b+d}else{return h}}function zswf(a){a=zswfr(a,'zswf="off"','zswf="off" style="display:block;"');document.write(a)}var ie=(document.defaultCharset&&document.getElementById&&!window.home);if(ie&&!is_webkit){document.write('<style type="text/css" id="hideObject">object{display:none;}</style>')}function zswf2(){if(!document.getElementsByTagName){return}var n=[];var u=document.getElementsByTagName("object");for(var l=0;l<u.length;l++){var c=u[l];var m=c.outerHTML;if(m&&m.indexOf('zswf="off"')!=-1){continue}var d="";var a=true;for(var k=0;k<c.childNodes.length;k++){var b=c.childNodes[k];if(b.tagName=="PARAM"){if(b.name=="flashVersion"){a=zswfd(b.value);if(!a){c.id=(c.id=="")?("stripFlash"+l):c.id;n.push(c.id);break}}d+=b.outerHTML}}if(!a){continue}if(!ie){continue}if(c.className.toLowerCase().indexOf("noswap")!=-1){continue}var r=m.split(">")[0]+">";var k=r+d+c.innerHTML+"</OBJECT>";c.outerHTML=k}if(n.length){stripFlash(n)}if(ie&&!is_webkit){document.getElementById("hideObject").disabled=true}}function zswfd(b){if(navigator.plugins&&navigator.plugins.length){var d=navigator.plugins["Shockwave Flash"];if(d==undefined){return false}var a=navigator.plugins["Shockwave Flash"].description.split(" ")[2];return(Number(a)>=Number(b))}else{if(ie&&typeof(ActiveXObject)=="function"){try{var c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+b);return true}catch(h){return false}}}return true}function zswfs(a){if(!document.createElement){return}for(var b=0;b<a.length;b++){var h=document.getElementById(a[b]);var k=h.innerHTML;k=k.replace(/<!--\s/g,"");k=k.replace(/\s-->/g,"");k=k.replace(/<embed/gi,"<span");var c=document.createElement("div");c.innerHTML=k;c.className=h.className;c.id=h.id;h.parentNode.replaceChild(c,h)}}zswf2();function zToggleDisplay(b){var a=document.getElementById(b);if(a.style.display=="none"){a.style.display="block"}else{a.style.display="none"}}var zArrBlink=new Array();function zBlinkId(b,a){var c=document.getElementById(b);if(typeof zArrBlink[b]=="undefined"){zArrBlink[b]=0}if(zArrBlink[b]%2==0){c.style.visibility="visible"}else{c.style.visibility="hidden"}if(zArrBlink[b]<1){zArrBlink[b]=1}else{zArrBlink[b]=0}setTimeout("zBlinkId('"+b+"',"+a+")",a)}function zListingDisplayHelpBox(){document.write('<a href="javascript:zToggleDisplay(\'zListingHelpDiv\');">Need help using search?</a><br /><div id="zListingHelpDiv" style="display:none; border:1px solid #990000; padding:10px; padding-top:0px;"><p style="font-size:14px; font-weight:bold;">Search Directions:</p><p>Click on one of the search options on the sidebar and use the text fields, sliders and check boxes to enter your search data.  After you are done, click "Search MLS" and the results will load on the right. </p><p><strong>City Search:</strong> Start typing a city into the box and our system will automatically show you a list of matching cities.  Select each city you wish to include in the search by using the arrow keys up and down.  Please the enter key or left click with your mouse to confirm the selection.  To remove a city, click the "X" button to the left of the city name. Only cities matching the ones in our system may be selected.</p><p>After typing an entry, click "Update Results" to update your search. </p><p>You can select or type as many options as you want.</p><p>Your search will automatically show the # of matching listings as you update each search field.</p><p>After searching, only the available options will appear.  To reveal more options again, try unselecting or extending the range for your next search.</p></div>')}var GMap=false;function zFindPosition(a){var b=curtop=curwidth=curheight=0;if(a.offsetParent){b=a.offsetLeft;curtop=a.offsetTop;curwidth=a.offsetWidth;curheight=a.offsetHeight;while(a=a.offsetParent){b+=a.offsetLeft;curtop+=a.offsetTop}}return[b,curtop,curwidth,curheight]}function zGetAbsPosition(c){var a=new Object();a.x=0;a.y=0;a.cx=0;a.cy=0;if(c){a.x=c.offsetLeft;a.y=c.offsetTop;if(c.offsetParent){var b=zGetAbsPosition(c.offsetParent);a.x+=b.x;a.y+=b.y}a.cx=c.offsetWidth;a.cy=c.offsetHeight}a.width=a.cx;a.height=a.cy;return a}var zIArrMLink=new Array();var zIArrM=new Array();var zIArrM2=new Array();var zIArrM3=new Array();var zIArrMST=new Array();var zIArrOriginal=new Array();function zImageMouseReset(l,k){var c=document.getElementById(l);var d=zGetAbsPosition(c);var h=document.getElementById(l+"_img");if((zMousePosition.x>d.x)&&(zMousePosition.x<(d.x+d.width))&&(zMousePosition.y>d.y)&&(zMousePosition.y<(d.y+d.height))){return}if(zIImageClickLoad){var b=document.getElementById("zlistingnextimagebutton");var a=document.getElementById("zlistingprevimagebutton");b.style.display="none";a.style.display="none";return}zIArrMST[l]=false;zIArrM5[l]=-1;zIArrM2[l]=new Array();h.style.display="block";zImageForceCloseEnlarger();if(typeof zIArrOriginal[l]!="undefined"){h.src=zIArrOriginal[l]}}function zImageOnError(a){a.src="/z/a/listing/images/image-not-available.gif"}function zClearSelection(){if(document.selection&&document.selection.empty){document.selection.empty()}else{if(window.getSelection){var a=window.getSelection();a.removeAllRanges()}}}var zIArrMOffset=new Array();var zIArrMSize=new Array();var zIArrM5=new Array();var zIImageMaxWidth=540;var zIImageMaxHeight=420;var zICurrentImageIndex=0;var zICurrentImageXYPos=[0,0];var zIImageClickLoad=false;var zILastLoaded="";function zImageMouseMove(a,k,m){var q=document.getElementById(a);var r=zGetAbsPosition(q);var c=document.getElementById(a+"_img");if(zILastLoaded=="id"){return}zIArrOriginal[a]=c.src;if(zIImageClickLoad&&typeof k!="boolean"){zILastLoaded=a;var u=document.getElementById("zlistingnextimagebutton");var t=document.getElementById("zlistingprevimagebutton");if(zIArrM[a].length<=1){u.style.display="none";t.style.display="none"}else{u.style.display="block";t.style.display="block"}if(zICurrentImageXYPos[0]==r.x&&zICurrentImageXYPos[1]==r.y){return}if(typeof zIArrMOffset[a]=="undefined"){zIArrMOffset[a]=0}var h=zGetAbsPosition(u);zICurrentImageIndex=0;zICurrentImageXYPos[0]=r.x;zICurrentImageXYPos[1]=r.y;u.ondblclick=function(){zClearSelection();return false};t.ondblclick=function(){zClearSelection();return false};u.onselectstart=function(){zClearSelection();return false};t.onselectstart=function(){zClearSelection();return false};t.style.top=(r.y)+"px";t.style.left=r.x+"px";u.style.top=(r.y)+"px";u.style.left=((r.x+r.width)-h.width)+"px";u.curId=a;u.curImageDiv=c;t.curId=a;t.curImageDiv=c;u.unselectable=true;t.unselectable=true;u.onclick=function(){var n=zIArrM[this.curId].length;var d=zIArrMOffset[this.curId];d++;if(d>=n){d=0}this.curImageDiv.src=zIArrM[this.curId][d];zIArrMOffset[this.curId]=d;return false};t.onclick=function(){var n=zIArrM[this.curId].length;var d=zIArrMOffset[this.curId];d--;if(d<0){d=n-1}this.curImageDiv.src=zIArrM[this.curId][d];zIArrMOffset[this.curId]=d;return false};c.onload=function(){var d=zGetAbsPosition(this.parentNode);if(d.width==0){var d=zGetAbsPosition(this.parentNode.parentNode)}this.style.marginLeft=Math.max(0,Math.floor((d.width-this.width)/2))+"px";this.style.marginTop=Math.max(0,Math.floor((d.height-this.height)/2))+"px"};return}if(m!=true){var l=k.clientX-r.x;p=(l/r.width);if(zIArrM==null||zIArrM[a]==null){return}}else{p=0}o=Math.min(Math.max(0,Math.floor(zIArrM[a].length*p)),zIArrM[a].length-1);if(zIArrM5[a]==o||zIArrM[a].length==0){if(typeof k!="boolean"){zImageShowEnlarger(a,c,r,zIArrM[a][o])}return}zIArrM5[a]=o;var s=zIArrM[a][o];if(zIArrM[a].length!=0&&o<zIArrM[a].length){if(zIArrM3[a]==false){for(var b=0;b<zIArrM[a].length;b++){if(typeof k!="boolean"||b==0){var v=new Image();v.src=zIArrM[a][b];zIArrMSize[v.src]=[v.width,v.height]}}}if(zIArrM2[a][o]!=1){c.o222=c;c.o333=a;c.onload=function(){zImageStoreLoaded(this.o222,this.o333);var x=zGetAbsPosition(this.parentNode);if(x.width==0){return}if(typeof zIArrMSize[this.src]=="undefined"){return}if(zIArrMSize[this.src]&&zIArrMSize[this.src][1]==0){zIArrMSize[this.src][1]=this.height;zIArrMSize[this.src][0]=this.width;setTimeout("zImageMouseLoadDelayed('"+this.id+"',true)",100);return}if(zIArrMSize[this.src][0]<=x.width&&zIArrMSize[this.src][1]<=x.height){this.width=zIArrMSize[this.src][0];this.height=zIArrMSize[this.src][1]}else{if(zIArrMSize[this.src][0]>x.width){var n=x.width/zIArrMSize[this.src][0];var d=x.width;var w=n*zIArrMSize[this.src][1]}else{w=x.height+1}if(w>x.height){n=x.height/zIArrMSize[this.src][1];d=Math.round(n*zIArrMSize[this.src][0]);w=x.height}if(d==0){this.width=x.width;this.height=x.height}else{this.width=Math.floor(d);this.height=Math.floor(w)}}this.style.cssFloat="left";this.style.marginLeft=Math.max(0,Math.floor((x.width-this.width)/2))+"px";this.style.marginTop=Math.max(0,Math.floor((x.height-this.height)/2))+"px"}}else{c.onload=null}c.style.display="block";if(zIArrM[a][o]!=c.src){if(typeof k!="boolean"){zImageShowEnlarger(a,c,r,zIArrM[a][o])}}}}function zImageForceCloseEnlarger(){var a=document.getElementById("zListingImageEnlargeDiv");if(a!=null){a.style.display="none"}}function zImageShowEnlarger(l,k,a,h){var c=document.getElementById(l);var b=document.getElementById("zListingImageEnlargeDiv");if(b!=null&&typeof mev!="boolean"){if(b.style.display=="none"||zCurEnlargeImageId!=l){zCurEnlargeImageId=l;b.style.left=((a.x+(a.width/2))-(zIImageMaxWidth/2)+148)-zPositionObjSubtractPos[0]+"px";b.style.top=((a.y+(a.height/2))-(zIImageMaxHeight/2))-zPositionObjSubtractPos[1]+"px";b.onmousemove=c.onmousemove;b.onmouseout=c.onmouseout;b.onmouseup=function(){window.location.href=zIArrMLink[l]}}d92=document.getElementById("zListingImageEnlargeImage");d92.onload=function(){var q=document.getElementById("zListingImageEnlargeDiv");q.style.display="block";if(typeof zIArrMSize[this.src]=="undefined"){return}if(zIArrMSize[this.src][0]<=zIImageMaxWidth&&zIArrMSize[this.src][1]<=zIImageMaxHeight-20){this.width=zIArrMSize[this.src][0];this.height=zIArrMSize[this.src][1]}else{if(zIArrMSize[this.src][0]>zIImageMaxWidth){var m=zIImageMaxWidth/zIArrMSize[this.src][0];var d=zIImageMaxWidth;var n=m*zIArrMSize[this.src][1]}else{var d=0;var n=zIImageMaxHeight}if(n>zIImageMaxHeight-20){var m=(zIImageMaxHeight-20)/zIArrMSize[this.src][1];var d=Math.round(m*zIArrMSize[this.src][0]);var n=zIImageMaxHeight-20}if(d==0){this.width=zIImageMaxWidth;this.height=zIImageMaxHeight-20}else{this.width=Math.floor(d);this.height=Math.floor(n)}}this.style.cssFloat="left";this.style.marginLeft=Math.max(0,Math.floor((zIImageMaxWidth-this.width)/2))+"px";this.style.marginTop=Math.max(0,Math.floor((zIImageMaxHeight-this.height)/2))+"px"};if(d92.src!=h){d92.src=h}else{b.style.display="block"}}}function zImageMouseLoadDelayed(b){var a=document.getElementById(b);a.onload()}function zImageStoreLoaded(a,b){a.style.display="block";for(i=0;i<zIArrM[b].length;i++){if(zIArrM[b][i]==a.src){zIArrM2[b][i]=1;return}}}if(arrM==null){var arrM=[];var arrM2=[];var arrM3=[]}var zIgnoreClickBackup=false;function zRenable(){if(zIgnoreClickBackup){zIgnoreClickBackup=false}else{zInputHideDiv()}return true}document.onclick=zRenable;function zFixText(a){a=zMakeEnglish(a);a=zIsAlphabet(a);a=a.toLowerCase();return a}function zFormatTheArray(b){var a=[];for(i=0;i<b.length;i++){a[i]=zFixText(b[i])}return a}function zDisableEnter(b){var a;if(window.event){a=window.event.keyCode}else{a=b.which}if(a==13||a==40||a==38){return false}else{return true}}var selIndex=0;function zKeyboardEvent(s,q,h,u){var x;if(s==null){return}var l;if(!selIndex){selIndex=0}if(window.event){x=s.keyCode}else{x=s.which}if(q.value.length>2){var v=document.getElementById("zTOB");if(x==13||u==true){if(q.value==""){return}if(v.style.display=="block"){var d=document.getElementById("lid"+arrNewLink[selIndex]).innerHTML;var k=d;for(var m=0;m<zArrCityLookup.length;m++){var r=zArrCityLookup[m].split("\t");if(r[0]==d){k=r[1];break}}q.value=d;h.value=k;zInputHideDiv(formName)}else{h.value=q.value}selIndex=-1}else{if(x==40){selIndex++;selIndex=Math.min(selIndex,arrNewLink.length-1)}else{if(x==38){selIndex--;selIndex=Math.max(0,selIndex)}else{if(v.style.display!="block"){h.value=q.value;selIndex=-1}return}}}var w=-1;var a=false;for(m=0;m<arrNewLink.length;m++){var t=document.getElementById("lid"+arrNewLink[m]);if(w==-1&&t.style.display=="block"){}if(t.style.display=="none"){}if(m==selIndex){a=true;t.className="zTOB-selected";var d=t.innerHTML;var k=d;for(var b=0;b<zArrCityLookup.length;b++){var r=zArrCityLookup[b].split("\t");if(r[0]==d){k=r[1];break}}q.value=d;h.value=k}else{t.className="zTOB-link"}}}}function zInputHideDiv(a){var b=document.getElementById("zTOB");if(b!=null){b.style.display="none"}}function zIsAlphabet(b){var a=/^[a-zA-Z0-9 ]+$/;if(b.match(a)){return b}else{return b}}function zInputPutIntoForm(h,c,d,a,b){var l=h.split(", ");var k=new Array();for(i=0;i<l.length;i++){if(i+1!=l.length){k.push(l[i])}}var m=document.getElementById(a);document.getElementById(d).value=h;m.value=c;if(b){zFormOnEnter(null,document.getElementById(d),document.getElementById(d))}return;m.value="";document.getElementById(d).value="";selIndex=0;zCurrentCityLookupLabel=""}function zInputLinkBuildBox(n,m,h){selIndex=0;var k=zFindPosition(n);var c=document.getElementById("zTOB");c.style.position="absolute";c.style.left=(k[0]-zPositionObjSubtractPos[0])+"px";c.style.top=(k[1]+k[3]-zPositionObjSubtractPos[1])+"px";formName=m.id;var d="";var l=document.getElementById("zTOB");l.style.height=(50+(Math.min(10,h.length)*23))+"px";class1='class="zTOB-selected" ';arrNewLink=[];d=d+'<div class="top">Click a city below or use the keyboard up and down arrow keys and press enter to select the city.</div>';for(j=0;j<h.length;j++){var a=h[j].split("\t");d=d+'<a id="lid'+j+'" '+class1+' href="javascript:void(0);" onclick="zInputPutIntoForm(\''+a[0]+"','"+a[1]+"','"+n.id+"', '"+formName+"',true); zInputHideDiv('"+formName+"');\" >"+a[0]+"</a>";class1='class="zTOB-link" ';arrNewLink.push(j)}document.getElementById("zTOB").style.display="block";document.getElementById("zTOB").innerHTML=d;document.getElementById("zTOB").scrollTop="0px"}function zMlsCheckCityLookup(d,c,b,a){var h;if(d==null){return}if(window.event){h=d.keyCode}else{h=d.which}if(c.value.length>2){if(h!=13&&h!=40&&h!=38){zMlsCallCityLookup(c,b,a)}}else{zInputHideDiv()}}var daysToOffset=0;function zMakeEnglish(k){var c=k;var b=/^[a-zA-Z ]+$/;if(k.match(b)){return k}else{var h="A,A,A,A,A,A,AE,C,E,E,E,E,I,I,I,I,ETH,N,O,O,O,O,O,O,U,U,U,U,Y,THORN,s,a,a,a,a,a,a,ae,c,e,e,e,e,i,i,i,i,eth,n,o,o,o,o,o,o,u,u,u,u,y,thorn,y,OE,oe,S,s,Y,f";var l="�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�,�";var a=h.split(",");var d=l.split(",");for(e=0;e<k.length;e++){for(f=0;f<d.length;f++){if(c.charAt(e)==d[f]){myChar=c.charAt(e);if(!(myChar.match(b))){pattern=new RegExp(d[f]);c=c.replace(pattern,a[f])}}}}return c}}var zArrCityLookup=[];var arrNewLink=[];var zCurrentCityLookupLabel="";function zMlsCallCityLookup(obj,obj2,type){var strValue="";arrNewLink=[];var suggCount=0;strValue=obj.value;strValue=zFixText(strValue);if(strValue.length>=3){var arrNew=[];var arrNew2=[];arrNewLink=[];var firstIndex=-1;var resetSelect=false;var m=zGetCityLookupObj();var d1=strValue.substr(0,1);var d2=strValue.substr(1,1);var d3=strValue.substr(2,1);var m2=false;try{eval("var m2=m."+d1+"."+d2+"."+d3+";")}catch(e){zInputHideDiv();return}if(m2==null||m2==false){zInputHideDiv();return}zArrCityLookup=m2;zInputLinkBuildBox(obj,obj2,m2);aN=[];var fb=null;var fbi=-1;var fixB=false;var foundB=false;zCurrentCityLookupLabel="";for(var i=0;i<m2.length;i++){var cb=document.getElementById("lid"+i);if(cb.innerHTML.substr(0,strValue.length).toLowerCase()!=strValue||strValue.length>cb.innerHTML.length){if(fb==null){fb=cb;fbi=i}cb.style.display="none";if(cb.className=="zTOB-selected"){fixB=true;cb.className="box-link"}}else{if(cb.className=="zTOB-selected"){var arrJ=m2[i].split("\t");obj2.value=arrJ[1];zCurrentCityLookupLabel=arrJ[0];foundB=true}}}if(fixB&&fb!=null){fb.className="zTOB-selected";selIndex=fbi}if(!foundB&&m2.length>0){var cb=document.getElementById("lid0");cb.className="zTOB-selected";selIndex=0}var ajaxArrCleanResults=zFormatTheArray(m2);for(i=0;i<ajaxArrCleanResults.length;i++){var aib=document.getElementById("lid"+i);if(ajaxArrCleanResults[i].substr(0,strValue.length)==strValue){arrNew.push(m2[i]);arrNew2.push(i);if(aib!=null){arrNewLink.push(i);if(aib.className=="zTOB-selected"){selIndex=arrNewLink.length-1}aib.style.display="block";if(firstIndex==-1){firstIndex=arrNewLink.length-1}}}else{if(aib!=null){if(aib.className=="zTOB-selected"){resetSelect=true;aib.className="box-link"}aib.style.display="none"}}}if(resetSelect&&firstIndex!=-1){selIndex=arrNew2[0];document.getElementById("lid"+arrNewLink[firstIndex]).className="zTOB-selected"}if(arrNew.length>0){if(arrNewLink.length==0){zInputLinkBuildBox(obj,obj2,arrNew)}else{if(document.getElementById("zTOB").style.display=="none"){document.getElementById("zTOB").style.display="block";for(i=0;i<arrNewLink.length;i++){if(i==0){selIndex=arrNewLink[i];document.getElementById("lid"+arrNewLink[i]).className="zTOB-selected"}else{document.getElementById("lid"+arrNewLink[i]).className="box-link"}}}}}else{zInputHideDiv()}}}function zStringReplaceAll(c,a,b){return c.replace(new RegExp(a,"g"),b)}var zFormData=new Array();function zFormOnKeyUp(b,a){var c=zFormData[b].arrFields[a];var d=document.getElementById(c.id);if(zFormData[b].error){zFormSubmit(b,true,false)}}function zFormOnChange(b,a){var c=zFormData[b].arrFields[a];var d=document.getElementById(c.id);if(zFormData[b].error){zFormSubmit(b,true,false)}if(typeof zFormData[b].onChangeCallback=="undefined"){return}zFormData[b].onChangeCallback(b)}function zFormSetError(c,a){var b=document.getElementById(c+"_container");if(b!=null){if(a){b.className="tr_error"}else{b.className=""}}}var zAjaxData=[];var zAjaxCounter=0;function zAjax(h){var b=null;if(window.XMLHttpRequest){b=new XMLHttpRequest()}else{if(window.ActiveXObject){b=new ActiveXObject("Microsoft.XMLHTTP")}}if(zAjaxData[h.id]==null){zAjaxData[h.id]=new Object();zAjaxData[h.id].requestCount=0;zAjaxData[h.id].requestEndCount=0;zAjaxData[h.id].cacheData=[]}if(h.cache==null){h.cache=false}if(h.method==null){h.method="get"}if(h.debug==null){h.debug=false}if(h.errorCallback==null){h.errorCallback=function(){}}if(h.url==null||h.callback==null){alert("zAjax() Error: obj.url and obj.callback are required")}zAjaxData[h.id].requestCount++;zAjaxData[h.id].cache=h.cache;zAjaxData[h.id].debug=h.debug;zAjaxData[h.id].method=h.method;zAjaxData[h.id].url=h.url;zAjaxData[h.id].ignoreOldRequests=h.ignoreOldRequests;zAjaxData[h.id].callback=h.callback;zAjaxData[h.id].errorCallback=h.errorCallback;if(zAjaxData[h.id].cache&&zAjaxData[h.id].cacheData[h.url]&&zAjaxData[h.id].cacheData[h.url].success){zAjaxData[h.id].callback(zAjaxData[h.id].cacheData[h.url].responseText)}b.onreadystatechange=function(){if(b.readyState==4||b.readystate=="complete"){var k=b.getResponseHeader("x_ajax_id");if(b.status!=200){if(k==null||k==""){document.write(b.responseText)}else{if(zAjaxData[k].debug){document.write("AJAX SERVER ERROR - (Click back and refresh to continue):<br />"+b.responseText)}else{zAjaxData[k].errorCallback(b)}}return}else{if(k==null||k==""){return}}zAjaxData[k].requestEndCount++;if(!zAjaxData[k].ignoreOldRequests||zAjaxData[k].requestCount==zAjaxData[k].requestEndCount){if(b.status==200){if(zAjaxData[k].cache){zAjaxData[k].cacheData[zAjaxData[k].url]=new Object();zAjaxData[k].cacheData[zAjaxData[k].url].responseText=b.responseText;zAjaxData[k].cacheData[zAjaxData[k].url].success=true}zAjaxData[k].callback(b.responseText)}else{if(zAjaxData[k].debug){document.write("AJAX SERVER ERROR - (Click back and refresh to continue):<br />"+b.responseText)}else{zAjaxData[k].errorCallback(b)}}}}};var a=Math.random()*1000;var d="&zFPE=1";if(zAjaxData[h.id].debug){d=""}var c=zAjaxData[h.id].url;if(c.indexOf("x_ajax_id=")!=-1){alert('zAjax() Error: Invalid URL.  "x_ajax_id" can only be added by the system.\nDo not put this CGI variable in the action URL.')}if(zAjaxData[h.id].method.toLowerCase()=="get"){if(c.indexOf("?")==-1){c+="?"+d+"&ztmp="+a}else{c+="&"+d+"&ztmp="+a}c+="&x_ajax_id="+escape(h.id);b.open(zAjaxData[h.id].method,c,true);b.send("")}else{if(zAjaxData[h.id].method.toLowerCase()=="post"){alert("not implemented - use zForm() instead")}}}var zAjaxLastFormName="";var zAjaxOnLoadCallback=function(){};var zAjaxOnErrorCallback=function(){};function zFormSubmit(B,x,C,t){if((x==null||!x)&&C==false){if(zFormData[B].submitContainer!=""){var b=document.getElementById(zFormData[B].submitContainer);if(b!=null){zFormData[B].submitContainerBackup=b.innerHTML;b.innerHTML="Please wait..."}}}var d=new Array();var A=false;var z=false;var s=new Array();for(var D=0;D<zFormData[B].arrFields.length;D++){A=false;var G=zFormData[B].arrFields[D];var w="";if(G.type=="file"&&zFormData[B].ajax){alert("File upload doesn't work with AJAX. Must use iframe and server-side progress bar (php for non-breaking uploads)");return false}else{if(G.type=="text"||G.type=="file"||G.type=="hidden"){var u=document.getElementById(G.id);w=u.value}else{if(G.type=="select"){var u=document.getElementById(G.id);if(u.options[u.selectedIndex].value!=""){w=u.options[u.selectedIndex].value}}else{if(G.type=="radio"){var u=document.getElementById(G.id);var F=document[B][G.id];for(var E=0;E<F.length;E++){if(F[E].checked){w=F[E].value}}}else{if(G.type=="checkbox"){var u=document.getElementById(G.id);if(u.checked){w=u.value}}else{if(G.type=="zExpandingBox"){arrV=new Array();for(var E=0;E<zExpArrMenuBox.length;E++){if(zExpArrMenuBox[E]==G.id){var H=document.getElementById("zExpMenuBoxCount"+E).value;for(var v=0;v<H;v++){var l=document.getElementById("zExpMenuOption"+E+"_"+v);if(l.checked){arrV.push(l.value)}}}}w=arrV.join(",")}}}}}}w=w.replace(/^\s+|\s+$/g,"");d.push(G.id+"="+escape(w));if(w==""){if(G.allowNull!=null&G.allowNull){continue}else{if(G.required!=null&&G.required){s.push(G.friendlyName+" is required.");zFormSetError(G.id,true);A=true;z=true;continue}}}if(G.number!=null&G.number){value2=parseFloat(w);if(w!=value2){s.push(G.friendlyName+" must be a number.");zFormSetError(G.id,true);A=true;z=true;continue}}if(G.email!=null&G.email){var r=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;if(!r.test(w)){s.push(G.friendlyName+" must be a well formatted email address, (ex. johndoe@domain.com).");zFormSetError(G.id,true);A=true;z=true;continue}}zFormSetError(G.id,false)}var h=d.join("&");var q=document.getElementById("zFormMessage_"+B);if(z){q.innerHTML='<table width="100%;" cellpadding="5" cellspacing="0" border="0"><tr><th>Please correct your entry and try again.</th></tr><tr><td>'+s.join("</td></tr><tr><td>")+"</td></tr></table>";q.style.display="block";zFormData[B].error=true}else{zFormData[B].error=false;q.style.display="none"}if(x!=null&&x){return false}if(z){window.location.href="#anchor_"+B;if(zFormData[B].submitContainer!=""){var b=document.getElementById(zFormData[B].submitContainer);if(b!=null){b.innerHTML=zFormData[B].submitContainerBackup}}return false}if(zFormData[B].ajax){if(zFormData[B].ajaxStartCount!=zFormData[B].ajaxEndCount){if(zFormData[B].ajaxSuccess){}}else{var a=null;if(window.XMLHttpRequest){a=new XMLHttpRequest()}else{if(window.ActiveXObject){a=new ActiveXObject("Microsoft.XMLHTTP")}}zAjaxLastFormName=B;zAjaxLastOnLoadCallback=zFormData[B].onLoadCallback;zAjaxLastOnErrorCallback=zFormData[B].onErrorCallback;a.onreadystatechange=function(){if(a.readyState==4||a.readystate=="complete"){zFormData[zAjaxLastFormName].ajaxEndCount++;if(a.status==200){zAjaxLastOnLoadCallback(a.responseText);zFormData[zAjaxLastFormName].ajaxSuccess=true;if(zFormData[zAjaxLastFormName].successMessage!=false){var c=document.getElementById("zFormMessage_"+zAjaxLastFormName);c.style.display="block";c.innerHTML='<div class="successBox">Form submitted successfully.<br />'+a.responseText+"</div>"}}else{zFormData[zAjaxLastFormName].ajaxStartCount=0;zFormData[zAjaxLastFormName].ajaxEndCount=0;zFormData[zAjaxLastFormName].ajaxSuccess=false;if(zFormData[zAjaxLastFormName].debug){document.write("AJAX SERVER ERROR - (Click back and refresh to continue):<br />"+a.responseText)}else{zAjaxLastOnErrorCallback(a.status+": The server failed to process your request.\nPlease try again later.")}}if(zFormData[zAjaxLastFormName].submitContainerBackup!=null&&zFormData[zAjaxLastFormName].submitContainer!=""){var n=document.getElementById(zFormData[zAjaxLastFormName].submitContainer);if(n!=null){n.innerHTML=zFormData[zAjaxLastFormName].submitContainerBackup}}}};zFormData[B].ajaxSuccess=false;zFormData[B].ajaxStartCount++;var m=Math.random()*1000;var y=zFormData[B].action;var k="&zFPE=1";if(zFormData[B].debug){k=""}if(zFormData[B].method.toLowerCase()=="get"){if(y.indexOf("?")==-1){y+="?"+h+k+"&ztmp="+m}else{y+="&"+h+k+"&ztmp="+m}a.open(zFormData[B].method,y,true);a.send("")}else{if(zFormData[B].method.toLowerCase()=="post"){if(y.indexOf("?")==-1){y+=k+"&ztmp="+m}else{y+=k+"&ztmp="+m}h=encodeURI(h);a.open(zFormData[B].method,y,true);a.setRequestHeader("Content-type",zFormData[B].contentType);a.send(h)}}}return false}else{return true}}var zExpArrMenuBox=new Array();var zExpMenuBoxChecked=new Array();var zExpMenuBoxData=new Array();function zExpMenuToggleCheckBox(t,h,b,q,x){var d=document.getElementById("zExpMenuOption"+t+"_"+h);var l=document.getElementById("zExpMenuOptionLink"+t+"_"+h);var u=0;var c=true;if(q==1){c=false}n2=zExpArrMenuBox[zExpMenuLastIgnoreClick];for(var u=0;u<zExpArrMenuBox.length;u++){f=zExpArrMenuBox[u];if(f!=n2){var a=document.getElementById(f+"_expmenu1");var B=document.getElementById(f+"_expmenu2");var A=document.getElementById(f+"_expmenu4");if(A!=null){B.style.display="none";A.innerHTML="More Options &gt;&gt;";A.className="zExpMenuOption"}}}if(b=="radio"){for(var u=0;u<zExpMenuBoxChecked[t].length;u++){var d=document.getElementById("zExpMenuOption"+t+"_"+zExpMenuBoxChecked[t][u]);var l=document.getElementById("zExpMenuOptionLink"+t+"_"+zExpMenuBoxChecked[t][u]);d.checked=false;l.className="zExpMenuOption"}var d=document.getElementById("zExpMenuOption"+t+"_"+h);var l=document.getElementById("zExpMenuOptionLink"+t+"_"+h);var z=document.getElementById("zExpMenuOption"+t+"_"+h+"_2");var w=document.getElementById("zExpMenuOptionLink"+t+"_"+h+"_2");d.checked=true;l.className="zExpMenuOptionOver";zExpMenuBoxChecked[t]=new Array();zExpMenuBoxChecked[t][0]=h;if(z!=null){z.checked=true;w.className="zExpMenuOptionOver";zExpMenuBoxChecked[t][1]=h+"_2"}}else{var s=false;if(x==1){var z=document.getElementById("zExpMenuOption"+t+"_"+h+"_2");var w=document.getElementById("zExpMenuOptionLink"+t+"_"+h+"_2");if(z.checked==c){d.checked=false;l.className="zExpMenuOption";z.checked=false;w.className="zExpMenuOption"}else{s=true;d.checked=true;l.className="zExpMenuOptionOver";z.checked=true;w.className="zExpMenuOptionOver"}}else{var z=document.getElementById("zExpMenuOption"+t+"_"+h+"_2");var w=document.getElementById("zExpMenuOptionLink"+t+"_"+h+"_2");if(d.checked==c){d.checked=false;l.className="zExpMenuOption";if(z!=null){z.checked=false;w.className="zExpMenuOption"}}else{s=true;d.checked=true;l.className="zExpMenuOptionOver";if(z!=null){z.checked=true;w.className="zExpMenuOptionOver"}}}var y=new Array();for(var u=0;u<zExpMenuBoxChecked[t].length;u++){if(s||(!s&&u!=h)){y.push(zExpMenuBoxChecked[t][u])}}zExpMenuBoxChecked[t]=y}if(d.onchange!=null){d.onchange()}}function setPos(c,b,a){c.style.left=b+"px";c.style.top=a+"px"}function zExpMenuToggleMenu(b){if(b!=null){var m=document.getElementById(b+"_expmenu1");var k=document.getElementById(b+"_expmenu2");var d=document.getElementById(b+"_expmenu4");if(m==null){return}if(k.style.display=="block"){k.style.display="none";d.innerHTML="More Options &gt;&gt;";d.className="zExpMenuOption"}else{d.innerHTML="&lt;&lt; Hide Options";d.className="zExpMenuOptionOver";k.style.display="block";var l=zFindPosition(m);setPos(k,(l[0]+l[2]),l[1])}}for(var c=0;c<zExpArrMenuBox.length;c++){f=zExpArrMenuBox[c];if(f!=b){var a=document.getElementById(f+"_expmenu1");var q=document.getElementById(f+"_expmenu2");var h=document.getElementById(f+"_expmenu4");if(h==null){return}q.style.display="none";h.innerHTML="More Options &gt;&gt;";h.className="zExpMenuOption"}}}var zExpMenuIgnoreClick=-1;var zExpMenuLastIgnoreClick=-1;function zExpMenuOnClick(){if(zExpMenuIgnoreClick!=-1){zExpMenuLastIgnoreClick=zExpMenuIgnoreClick;zExpMenuIgnoreClick=-1}else{zExpMenuToggleMenu()}return true}if(document.onclick!=null){var zExpMenuOnClickBackup=document.onclick;document.onclick=function(){zExpMenuOnClickBackup();zExpMenuOnClick()}}else{document.onclick=zExpMenuOnClick}var zMousePosition={x:0,y:0};function zDrag_mouseCoords(d){if(document.layers){var h=window.innerWidth+window.pageXOffset;var a=window.innerHeight+window.pageYOffset}else{if(document.all){var h=document.body.clientWidth+document.body.scrollLeft;var a=document.body.clientHeight+document.body.scrollTop}else{if(document.getElementById){var h=window.innerWidth+window.pageXOffset;var a=window.innerHeight+window.pageYOffset}}}var b=0;var c=0;if(d.pageX){b=d.pageX}else{if(d.clientX){b=d.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft)}}if(d.pageY){c=d.pageY}else{if(d.clientY){c=d.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)}}return{x:b,y:c,pageWidth:h,pageHeight:a}}function zDrag_makeClickable(a){a.onmousedown=function(){zDrag_dragObject=this}}function zDragTableOnMouseUp(){}function zDrag_mouseUp(h){h=h||window.event;zDragTableOnMouseUp(h);var a=zDrag_mouseCoords(h);for(var b=0;b<zDrag_dropTargets.length;b++){var k=zDrag_dropTargets[b];var l=zDrag_getPosition(k);var d=parseInt(k.offsetWidth);var m=parseInt(k.offsetHeight);if((a.x>l.x)&&(a.x<(l.x+d))&&(a.y>l.y)&&(a.y<(l.y+m))){}}if(zDrag_dragObject!=null){var c=zDrag_arrParam[zDrag_dragObject.id];c.callbackFunction(zDrag_dragObject,c,true)}zDrag_dragObject=null}function zDrag_getMouseOffset(d,c){c=c||window.event;var b=zDrag_getPosition(d);var a=zDrag_mouseCoords(c);return{x:a.x-b.x,y:a.y-b.y}}function zDrag_getPosition(c){var b=0;var a=0;while(c.offsetParent){b+=c.offsetLeft;a+=c.offsetTop;c=c.offsetParent}b+=c.offsetLeft;a+=c.offsetTop;return{x:b,y:a}}var zDragTableOnMouseMove=function(){};var zMapMarkerRollOutV3=function(){};function zDrag_mouseMove(b){zDragTableOnMouseMove(b);zOutEditDiv(b);zMapMarkerRollOutV3(false);b=b||window.event;var a=zDrag_mouseCoords(b);zMousePosition=a;if(zDrag_dragObject){var h=zDrag_arrParam[zDrag_dragObject.id];var c=document.getElementById(h.boxObj);var d=zDrag_getPosition(c);if(navigator.userAgent.indexOf("MSIE 6.0")!=-1){if(zDrag_arrParam[zDrag_dragObject.id].zValue+3==zDrag_arrParam[zDrag_dragObject.id].zValueValue){zDrag_dragObject.style.marginRight=(((parseInt(c.style.width)-((a.x-zDrag_mouseOffset.x)-d.x))-parseInt(zDrag_dragObject.style.width))/2)+"px"}else{zDrag_dragObject.style.marginLeft=(((a.x-zDrag_mouseOffset.x)-d.x)/2)+"px"}}else{if(zDrag_arrParam[zDrag_dragObject.id].zValue+3==zDrag_arrParam[zDrag_dragObject.id].zValueValue){zDrag_dragObject.style.marginRight=((parseInt(c.style.width)-((a.x-zDrag_mouseOffset.x)-d.x))-parseInt(zDrag_dragObject.style.width))+"px"}else{zDrag_dragObject.style.marginLeft=((a.x-zDrag_mouseOffset.x)-d.x)+"px"}}zDrag_arrParam[zDrag_dragObject.id].callbackFunction(zDrag_dragObject,zDrag_arrParam[zDrag_dragObject.id]);return false}}function zDrag_makeDraggable(b,a){if(!b){return}zDrag_arrParam[b.id]=a;b.onmousedown=function(c){zDrag_dragObject=this;zDrag_mouseOffset=zDrag_getMouseOffset(this,c);return false};a.callbackFunction(b,a)}function zGoToURL(c){var b=document.getElementById("zOverEditATag");b.setAttribute("href",c);if(b.click){b.click()}else{window.top.location.href=c}}document.write('<style type="text/css">#zOverEditATag,#zOverEditATag:link,#zOverEditATag:visited,#zOverEditATag:active{font-family:verdana, arial, sans-serif;background-color:#000000; color:#FFFFFF; border:3px solid #999999; padding:4px;font-size:11px;display:block;} #zOverEditATag:hover{ background-color:#FFFFFF; color:#000000;}</style><div id="zOverEditDivTag" style="z-index:20001;  position:absolute; background-color:#FF0000; display:none; cursor:pointer; left:0px; top:0px; width:50px; height:32px; text-align:center; font-weight:bold; line-height:18px; " onclick="zOverEditClick();"><a id="zOverEditATag" href="javascript:zOverEditClick();" target="_top" title="Click EDIT to edit this content">EDIT</a></div>');var zCurOverEditLink="";var zOverEditDisableMouseOut=false;var zCurOverEditObj=null;var zOverEditDivTag1=document.getElementById("zOverEditDivTag");function zOverEditClick(){if(zCurOverEditLink!=""){zGoToURL(zCurOverEditLink)}}var zOverEditLastLink="";var zOverEditLastPos={x:0,y:0};function zOverEditDiv(c,d){if(d!=zOverEditLastLink){zOverEditLastLink=d;zCurOverEditObj=document.getElementById(c);zCurOverEditLink=d;zOverEditDivTag1.style.left=(zMousePosition.x+10)+"px";zOverEditDivTag1.style.top=(zMousePosition.y+10)+"px";zOverEditLastPos={x:zMousePosition.x,y:zMousePosition.y};zOverEditDivTag1.style.display="block"}else{var a=Math.abs((zMousePosition.x+10)-zOverEditLastPos.x);var b=Math.abs((zMousePosition.y+10)-zOverEditLastPos.y);if(a<=70&&b<=70){return}else{zCurOverEditObj=document.getElementById(c);zCurOverEditLink=d;zOverEditDivTag1.style.left=(zMousePosition.x+10)+"px";zOverEditDivTag1.style.top=(zMousePosition.y+10)+"px";zOverEditLastPos={x:zMousePosition.x,y:zMousePosition.y};zOverEditDivTag1.style.display="block"}}}function zOutEditDiv(){if(zOverEditDivTag1!=null&&zOverEditDivTag1.style.display=="block"){var a=Math.abs((zMousePosition.x+10)-zOverEditLastPos.x);var b=Math.abs((zMousePosition.y+10)-zOverEditLastPos.y);if(a>300||b>300){zOverEditDivTag1.style.display="none"}}}function zDrag_addDropTarget(a){zDrag_dropTargets.push(a)}if(document.onmousemove!=null){var zDragOnMouseMoveBackup=document.onmousemove;document.onmousemove=function(a){zDragOnMouseMoveBackup(a);zDrag_mouseMove(a)}}else{document.onmousemove=zDrag_mouseMove}if(document.onmouseup!=null){var zDragOnMouseUpBackup=document.onmouseup;document.onmouseup=function(a){zDragOnMouseUpBackup(a);zDrag_mouseUp(a)}}else{document.onmouseup=zDrag_mouseUp}var zDrag_arrParam=new Array();var zDrag_dragObject=null;var zDrag_mouseOffset=null;var zDrag_dropTargets=[];function zExpShowUpdateBar(a,b){var c=document.getElementById("zExpUpdateBar"+a);if(c){c.style.display=b}}var zInputSlideOldValue="";function zInputSlideOnChange(b,k,h,a){var c=document.getElementById(b);if(k==""){k="min"}if(h==""){h="max"}var d=k+"-"+h;if(d!=zInputSlideOldValue){c.value=d;zInputSlideOldValue=d;if(a!=null){zExpOptionSetValue(a,d)}c.onchange()}}function zInputSliderSetValue(c,m,d,n,k){var b=document.getElementById(c);var a=document.getElementById(c+"_label");var l=false;var h=/[^0-9]/;n=n.split(",").join("").split("$").join("");if(n.match(h)&&n!="min"&n!="max"){if(m+3==d){n=zValues[m+5]}else{n=zValues[m+4]}a.value=n;l=true;alert("You may type only numbers 0-9.")}n=n.split(",").join("").split("$").join("");a.value=n;n=parseFloat(n);if(m+3==d){if(parseFloat(zValues[m+2])>parseFloat(n)){n=zValues[m+2];a.value=zValues[m+5];alert("The first value must be smaller than the second value. Your data has been reset.");return}}else{if(parseFloat(n)>parseFloat(zValues[m+3])){n=zValues[m+3];a.value=zValues[m+4];alert("The first value must be smaller than the second value. Your data has been reset.");return}}b.value=n;zValues[d]=n;zInputSlideOnChange("zInputHiddenValues"+m,zValues[m+2],zValues[m+3],k)}function zInputSlideLimit(u,b,l){var h=document.getElementById(b.valueId);var d=document.getElementById(b.labelId);var q=false;if(zDrag_dragObject==null){q=true;if(d.value==""){if(b.constrainLeft){d.value="max";h.value=""}else{d.value="min";h.value=""}}}if(!q){var z=false;if(b.zValue+3==b.zValueValue){z=true}var C=zDrag_getPosition(u);var B=document.getElementById("zInputSliderBox"+b.zValue);var A=zDrag_getPosition(B);if(b.constrainObj){var w=parseInt(B.style.width)-parseInt(u.style.width)}else{var w=parseInt(B.style.width)}var v=parseInt(u.style.width);if(navigator.userAgent.indexOf("MSIE 6.0")!=-1){v/=2;w/=2}var n=A.y;if(z){var r=parseInt(u.style.marginRight)}else{var r=parseInt(u.style.marginLeft)}var k=false;var m=false;if(b.constrainObj){d4=document.getElementById(b.constrainObj);d4.style.zIndex=1;u.style.zIndex=3;if(z){var s=w-(v+parseInt(d4.style.marginLeft))}else{var s=w-(v+parseInt(d4.style.marginRight))}d5=zDrag_getPosition(d4);if(b.constrainLeft){if(r>=s){r=s;if(r>=w-v){k=true}}else{if(r<=0){r=0;if(r<=0){m=true}}}}else{var a=s-0;if(r<=0){r=0;k=true}else{if(r>=s){r=s;if(r+v>=0+w){m=true}}}}}else{if(r<=0){r=0;k=true}else{if(r+v>=0+w){r=((0+w)-v);m=true}}}if(b.zValue+3==b.zValueValue){u.style.marginRight=r+"px";r=w-(r+v);percent=Math.max(0,(r)/(w-v))}else{u.style.marginLeft=r+"px";percent=Math.min(1,Math.max(0,(r)/(w-v)))}var c=zValues[b.zValue];var t=zValues[b.zValue+1];offset=Math.min(c.length-1,Math.round(percent*(c.length-0.5)));if(k){h.value="";d.value="min"}else{if(m){h.value="";d.value="max"}else{h.value=t[offset];d.value=c[offset]}}zValues[b.zValueLabel]=d.value;zValues[b.zValueValue]=h.value}if(l!=null&&l){zInputSlideOnChange("zInputHiddenValues"+b.zValue,zValues[b.zValue+2],zValues[b.zValue+3],b.zExpOptionValue)}}var zExpOptionLabelHTML=[];function zExpOptionSetValue(b,a,c){var d=document.getElementById("zExpOption"+b+"_button");if(c==null){c="none"}if(d!=null){d.innerHTML=zExpOptionLabelHTML[b]+' <span id="zExpOption'+b+'_value" style="display:'+c+';">'+zStringReplaceAll(a,",",", ")+"</span>"}}function zCheckboxOnChange(k,l){var q=true;var d=0;var b=[];var m=[];while(q){d++;var a=document.getElementById(k.name+"label"+d);if(a==null){break}var c=document.getElementById(k.name+d);if(c.checked){m.push(a.innerHTML);b.push(c.value)}}var h=k.name.substr(0,k.name.length-5);var c=document.getElementById(h);c.value=b.join(",");if(l!=-1){zExpOptionSetValue(l,"<br />"+m.join("<br />"))}c.onchange()}function zEnableTextSelection(a){a.onmousedown=function(){return true};a.onselectstart=function(){return true};a.style.MozUserSelect="text"}function zDisableTextSelection(a){if(typeof a.onselectstart!="undefined"){a.onselectstart=function(){return false}}else{if(typeof a.style.MozUserSelect!="undefined"){a.style.MozUserSelect="none"}else{if(a.onmousedown==null){a.onmousedown=function(){return false}}}}}var zMotiontimerlen=10;var zMotionslideAniLen=150;var zMotiontimerID=new Array();var zMotionstartTime=new Array();var zMotionobj=new Array();var zMotionendHeight=new Array();var zMotionmoving=new Array();var zMotiondir=new Array();var zMotionLabel=new Array();var zMotionHOC=new Array();var zMotionObjClicked="";function zMotionOnMouseDown(a){zMotionObjClicked=a;return false}function zMotiontoggleSlide(c,b,a){zMotionLabel[c]=document.getElementById(b);if(a!=""){zMotionHOC[c]=document.getElementById(a)}else{zMotionHOC[c]=""}if(zMotionObjClicked!=c){return}if(document.getElementById(c).style.display=="none"){zMotionHOC[c].style.display="none";zMotionslidedown(c)}else{zMotionslideup(c)}}function zMotionslidedown(a){if(zMotionmoving[a]){return}if(document.getElementById(a).style.display!="none"){return}zMotionmoving[a]=true;zMotiondir[a]="down";zMotionstartslide(a)}function zMotionslideup(a){if(zMotionmoving[a]){return}if(document.getElementById(a).style.display=="none"){return}zMotionmoving[a]=true;zMotiondir[a]="up";zMotionstartslide(a)}function zMotionstartslide(a){zMotionobj[a]=document.getElementById(a);zMotionendHeight[a]=parseInt(zMotionobj[a].style.height);zMotionstartTime[a]=(new Date()).getTime();if(zMotiondir[a]=="down"){zMotionobj[a].style.height="1px"}zMotionobj[a].style.overflow="hidden";zMotionobj[a].style.display="block";zMotiontimerID[a]=setInterval('zMotionslidetick("'+a+'");',zMotiontimerlen)}function zMotionslidetick(c){var a=(new Date()).getTime()-zMotionstartTime[c];if(a>zMotionslideAniLen){zMotionendSlide(c)}else{var b=Math.round(a/zMotionslideAniLen*zMotionendHeight[c]);if(zMotiondir[c]=="up"){b=zMotionendHeight[c]-b}zMotionobj[c].style.height=b+"px"}}function zMotionendSlide(a){clearInterval(zMotiontimerID[a]);if(zMotiondir[a]=="up"){zMotionobj[a].style.display="none";zMotionHOC[a].style.display="inline"}else{zMotionobj[a].style.overflow="auto"}zMotionobj[a].style.height=zMotionendHeight[a]+"px";delete (zMotionHOC[a]);delete (zMotionLabel[a]);delete (zMotionmoving[a]);delete (zMotiontimerID[a]);delete (zMotionstartTime[a]);delete (zMotionendHeight[a]);delete (zMotionobj[a]);delete (zMotiondir[a]);return}function zCLink(a){a.href="javascript:void(0);"}function zSetInput(c,a){var b=document.getElementById(c);b.value=a;if(b.onchange!=null){b.onchange()}}var zFormOnEnterValues=new Array();function zFormOnEnterAdd(b,a){zFormOnEnterValues[b]=a}function zFormOnEnter(e,obj){if(zFormOnEnterValues[obj.id]!=null){if(e==null){eval(zFormOnEnterValues[obj.id])}else{if(window.event){var keynum=e.keyCode}else{var keynum=e.which}if(keynum==13){eval(zFormOnEnterValues[obj.id])}}}}function zInputRemoveOption(a,k){var q=new Array();var m=new Array();var l=new Array();for(var c=0;c<zValues[k].length;c++){if(a!=c){q.push(zValues[k+1][c]);m.push(zValues[k][c]);l.push(zValues[k+2][c])}else{if(zValues[k+2][c]!=""&&zValues[k+6]==false){var h=document.getElementById(zValues[k+2][c]);h.style.display="block"}}}zValues[k+2]=l;zValues[k+1]=q;zValues[k]=m;var n=document.getElementById(zValues[k+4]);var b=document.getElementById(zValues[k+4]+"_zlabel");n.value=zValues[k+1].join(",");b.value=zValues[k].join(",");if(n.type!="select-one"&&n.onchange!=null){n.onchange()}zInputSetSelectedOptions(false,k);if(n.type=="select-one"){n.selectedIndex=0}}function zHasInnerText(){return(document.getElementsByTagName("body")[0].innerText!=undefined)?true:false}var zInputBoxLinkValues=[];function zInputSetSelectedOptions(v,m,c,l,y,k){if(v){var B=document.getElementById(c);var b=document.getElementById(c+"_zlabel");var u=document.getElementById(c+"_zmanual");var h=document.getElementById(c+"_zmanualv");var q=h.value;var a=u.value;var t=u;var d=zHasInnerText()?t.innerText:t.textContent;if(zValues[m+6]==true&&zValues[m+1].length>0&&a!=""){alert("Only one value can be selected for this field");h.value="";u.value="";return}if(y&&a!=""){}else{if(q=="0"){alert("Please make a selection before clicking the add button.");return}else{if(a==""){return}}}for(var C=0;C<zValues[m].length;C++){if(zValues[m+1][C]==q){alert("The option, "+zValues[m][C]+", has already been selected.");return}}for(var C=0;C<zValues[m+3].length;C++){if(zValues[m+3][C]==q){l="zInputLinkBox"+m+"_link"+(C+1);var D=document.getElementById(l);D.style.display="none";break}}if(!y&&q==a){alert("Only valid entries are accepted. Please type an entry that appears in the suggestion box and than select it or press enter.");return}h.value="";u.value="";if(l==null){l=""}zValues[m+2].push(l);zValues[m+1].push(q);zValues[m].push(a);B.value=zValues[m+1].join(",");b.value=zValues[m].join(",");if(B.onchange!=null){B.onchange()}var A=[];for(var C=0;C<zValues[m].length;C++){A[zValues[m][C]]=C}zValues[m].sort();var z=[];var n=[];for(var C=0;C<zValues[m].length;C++){z[C]=zValues[m+1][A[zValues[m][C]]];n[C]=zValues[m+2][A[zValues[m][C]]]}zValues[m+1]=z;zValues[m+2]=n}zExpOptionSetValue(zValues[m+5],"<br />"+zValues[m].join("<br />"));var x=document.getElementById("zInputOptionBlock"+m);var r=new Array();if(zValues[m].length!=0){r.push('<div class="zInputLinkBoxSelected"><div class="zInputLinkBoxSelectedHead">SELECTED:</div>');for(var C=0;C<zValues[m].length;C++){var w="zInputLinkBoxRow1";if(C%2==0){w="zInputLinkBoxRow2"}if(zValues[m+2][C]!=""){var D=document.getElementById(zValues[m+2][C]);D.style.display="none"}r.push('<div style="float:left;" class="'+w+'"><a href="javascript:zInputRemoveOption('+(r.length-1)+","+m+');" style="float:left;text-decoration:none;display:block;" class="zInputLinkBoxSItem '+w+'"><span title="Click the X to remove this option." class="zTOB-closeBox">X</span>'+zValues[m][C]+"</a></div>")}r.push('</div><br style="clear:both;" />')}x.innerHTML=r.join("");if(r.length==0){x.style.display="inline"}else{x.style.display="block"}}function getMLSTemplate(b,c){var a=new Array();a.push('<table cellpadding="0" cellspacing="0" border="0"><tr><td valign="top" width="110" style="font-size:10px; font-style:italic;"><div class="listing-l-img"><a href="##URL##"><img src="##PHOTO1##" alt="##TITLE##" width="100" height="78" class="listing-d-img" border="0"></a></div>ID####MLS_ID##-##LISTING_ID##</td><td valign="top"><h2><a href="##URL##" style="text-decoration:none; ">##TITLE##</a></h2><span>##DESCRIPTION##</span><span class="listing-l-links" style="padding-bottom:0px; "><a href="##URL##">Read More</a><a href="/z/_a/listing/inquiry_property?action=form&mls_id=##MLS_ID##&listing_id=##LISTING_ID##" rel="nofollow">Send An Inquiry</a><a href="/z/_a/listing/sl?saveAct=check&mls_id=##MLS_ID##&listing_id=##LISTING_ID##" rel="nofollow">Save Listing</a>');if(b.VIRTUAL_TOUR[c]!=""){a.push('<a href="##VIRTUAL_TOUR##" target="_blank" rel="nofollow">View Virtual Tour</a>')}a.push('</span></td></tr><tr><td colspan="2" style="border-bottom:1px solid ##999999;">&nbsp;</td></table><br />');return a.join("")}var zDebugMLSAjax=false;function loadMLSResults(r){if(zDebugMLSAjax){document.write(r);return}eval("var myObj="+r+";");var m=myObj;arrD=new Array();setMLSCount(m.COUNT);m.DATA.TITLE=new Array();for(i=0;i<m.COUNT;i++){m.DATA.TITLE[i]="Test title";var t=getMLSTemplate(m.DATA,i);for(g in m.DATA){t=zStringReplaceAll(t,"##"+g+"##",m.DATA[g][i])}arrD.push(t)}var r2=document.getElementById("mlsResults");r2.innerHTML="";r2.innerHTML+=arrD.join("<hr />")}var zUpdateMapMarkersV3=null;function displayMLSCount2(b,a){displayMLSCount(b,a,true)}function displayMLSCount(r,skipParse,newForm){if(zDebugMLSAjax){document.write(r);return}eval("var myObj="+r+";");if(myObj.success){if(typeof myObj.disableSetCount=="undefined"){if(typeof newForm!="undefined"&&newForm){setMLSCount2(myObj.COUNT)}else{setMLSCount(myObj.COUNT)}}if(zUpdateMapMarkersV3!=null){zUpdateMapMarkersV3(myObj)}}else{alert(myObj.errorMessage)}}var zSearchFormChanged=false;var zDisableSearchFormSubmit=false;var firstSetMLSCount=true;var zDisableSearchCountBox=false;function setMLSCount2(h){if(zDisableSearchCountBox){return}var b=document.getElementById("resultCountAbsolute");var a=document.getElementById("searchFormTopDiv");if(typeof a=="undefined"||a==null){return}b.style.display="block";var d=h+" Results";if(b!=null){b.innerHTML=d}if(firstSetMLSCount){firstSetMLSCount=false}}function setMLSCount(h){if(zDisableSearchCountBox){return}var d='<span style="font-size:21px;line-height:26px;">'+h+'</span><br /><span style="font-size:12px;">listings match your <br />search criteria<br />&nbsp;</span></span>';var b=document.getElementById("resultCountAbsolute");var a=document.getElementById("searchFormTopDiv");if(typeof a=="undefined"||a==null){return}a.style.height="110px";b.style.display="block";var d='<span style="font-size:21px;line-height:26px;">'+h+'</span><br /><span style="font-size:12px;">matching listings';if(zSearchFormChanged&&zDisableSearchFormSubmit==false){d+='<br /><button onclick="document.zMLSSearchForm.submit();" style="font-size:13px; font-weight:normal; background-image:url(/z/a/listing/images/mlsbg1.jpg); background-repeat:repeat-x; background-color:none; border:1px solid #999; margin-top:7px; width:130px; padding:3px; text-decoration:none; cursor:pointer;" name="sfbut1">Show Results</button>'}d+="</span></span>";if(b!=null){b.innerHTML=d}if(firstSetMLSCount){firstSetMLSCount=false}}var zMapCoorUpdateV3=null;function getMLSCount2(a){getMLSCount(a,true)}function getMLSCount(c,b){zSearchFormChanged=true;var k=document.getElementById("search_map_lat_blocks");if(zMapCoorUpdateV3&&k&&k.value==""){return"0"}var d=zFormData[c].action;var a=zFormData[c].onLoadCallback;var h=zFormData[c].ajax;zFormData[c].ajax=true;zFormData[c].ignoreOldRequests=true;if(typeof b!="undefined"&&b){zFormData[c].onLoadCallback=displayMLSCount2}else{zFormData[c].onLoadCallback=displayMLSCount}zFormData[c].successMessage=false;zFormData[c].action="/z/_a/listing/search-form?action=ajaxCount";if(zDisableSearchFilter==1){zFormData[c].action+="&zDisableSearchFilter=1"}zFormSubmit(c,false,true);zFormData[c].ajax=h;zFormData[c].action=d;zFormData[c].onLoadCallback=a;return"1"}var zSearchFormTimeoutId=0;var zSearchFormFloaterAbsoluteFix=false;var zSearchFormFloaterDisplayed=false;var zWindowIsLoaded=false;function updateCountPosition(l,c){r111=zModalLockPosition(l);if(1==0&&typeof c=="undefined"){clearTimeout(zSearchFormTimeoutId);zSearchFormTimeoutId=setTimeout("updateCountPosition(null,true);",300);return}var d=document.getElementById("resultCountAbsolute");var b=document.getElementById("searchFormTopDiv");if(b==null){return}var k=zFindPosition(b);var h=document.body.scrollTop+document.documentElement.scrollTop;h=Math.max(h,k[1]);zSearchFormFloaterDisplayed=true;d.style.top=(h-zPositionObjSubtractPos[1])+"px";var a=getWindowSize();d.style.left=(k[0]-zPositionObjSubtractPos[0])+"px";clearTimeout(zSearchFormTimeoutId);zSearchFormChanged=false;if(r111==false){return false}}function zJumpToId(h,d){var a=document.getElementById(h);if(a==null){return}var c=zFindPosition(a);var b=navigator.userAgent.toLowerCase().indexOf("webkit")>-1;if(!d||d==null){d=0}if(b){document.body.scrollTop=c[1]+d}else{document.documentElement.scrollTop=c[1]+d}}function jumpToSearchForm(){var a=document.getElementById("mlsResults");if(a==null){return}var c=zFindPosition(a);var b=navigator.userAgent.toLowerCase().indexOf("webkit")>-1;if(b){document.body.scrollTop=Math.max(0,c[1]-70)}else{document.documentElement.scrollTop=Math.max(0,c[1]-70)}}function getWindowSize(){var b=0,a=0;if(typeof(window.innerWidth)=="number"){b=window.innerWidth;a=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){b=document.documentElement.clientWidth;a=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){b=document.body.clientWidth;a=document.body.clientHeight}}}return{width:b,heigh:a}}if(window.onscroll!=null){var zMLSonScrollBackup=window.onscroll;window.onscroll=function(){zMLSonScrollBackup();r111=updateCountPosition();return r111}}else{window.onscroll=updateCountPosition}if(window.onmousewheel!=null){var zMLSonScrollBackup2=window.onmousewheel;window.onmousewheel=function(){zMLSonScrollBackup2();r111=updateCountPosition();return r111}}else{window.onmousewheel=updateCountPosition}function zWindowOnResize(){zResizeModal();zWindowOnLoad();updateCountPosition()}if(window.onresize!=null){var zMLSonResizeBackup=window.onresize;window.onresize=function(){zMLSonResizeBackup();zWindowOnResize()}}else{window.onresize=zWindowOnResize}var zPositionObjSubtractId=false;var zPositionObjSubtractPos=new Array(0,0);var zArrLoadFunctions=new Array();function zWindowOnLoad(){if(zWindowIsLoaded){return}for(var b=0;b<zArrLoadFunctions.length;b++){var a=zArrLoadFunctions[b];if(typeof a=="object"){if(typeof a.arguments=="undefined"||a.arguments.length==0){a.functionName()}else{if(a.arguments.length==1){a.functionName(a.arguments[0])}else{if(a.arguments.length==2){a.functionName(a.arguments[0],a.arguments[1])}else{if(a.arguments.length==3){a.functionName(a.arguments[0],a.arguments[1],a.arguments[2])}else{if(a.arguments.length==4){a.functionName(a.arguments[0],a.arguments[1],a.arguments[2],a.arguments[3])}}}}}}else{a()}}if(zPositionObjSubtractId!=false){var c=document.getElementById(zPositionObjSubtractId);zPositionObjSubtractPos=zFindPosition(c)}zWindowIsLoaded=true;if(zo("zMenuClearUniqueId")||zo("zMenuAdminClearUniqueId")){zMenuInit()}updateCountPosition()}if(window.onload!=null){var zMLSonloadBackup=window.onload;window.onload=function(){zMLSonloadBackup();zWindowOnLoad()}}else{window.onload=zWindowOnLoad}var zMLSMessageBgColor="0x990000";var zMLSMessageTextColor="0xFFFFFF";var zMLSMessageOutputId=0;function zMLSShowFlashMessage(a){zMLSMessageOutputId++;a=zStringReplaceAll(a,"\r","");if(a==""){document.write('<img src="/z/a/images/s.gif" width="100%" height="100%">')}else{zswf('<object zswf="off" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="221" height="161" id="zMLSMessage'+zMLSMessageOutputId+'" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="/z/a/listing/images/message.swf?messageText='+escape(a)+"&bgColor="+zMLSMessageBgColor+"&textColor="+zMLSMessageTextColor+'" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="wmode" value="transparent" /><param name="salign" value="TL" /><param name="bgcolor" value="#ffffff" />	<embed src="/z/a/listing/images/message.swf?messageText='+escape(a)+"&bgColor="+zMLSMessageBgColor+"&textColor="+zMLSMessageTextColor+'" quality="high" scale="noscale" wmode="transparent" bgcolor="#ffffff" width="221" height="161" name="zMLSMessage'+zMLSMessageOutputId+'" salign="TL" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /></object>')}}function zAjaxWalkscore(b){var a={};a.id="zAjaxWalkScore";a.url="/z/_a/util/walkscore?latitude="+b.latitude+"&longitude="+b.longitude;a.cache=false;a.callback=zAjaxWalkscoreCallback;a.ignoreOldRequests=false;zAjax(a)}var zWalkscoreIndex=0;function zAjaxWalkscoreCallback(r){var d1=document.getElementById("walkscore-div");var json=eval("("+r+")");if(json&&json.status==1){var htmlStr="Walk Score&#8482;: "+json.walkscore+" Description: "+json.description}else{if(json&&json.status==2){var htmlStr=""}else{d1=false}}zWalkscoreIndex++;if(d1){htmlStr=htmlStr+getWalkScoreInfoHtml(zWalkscoreIndex);d1.innerHTML=htmlStr}}function toggleWalkScoreInfo(a){var b=document.getElementById("walkscore-api-info"+a);if(b&&b.style.display=="block"){b.style.display="none"}else{if(b){b.style.display="block"}}}function getWalkScoreInfoHtml(a){return'<span id="walkscore-api-info'+a+'" class="walkscore-api-info" style="font-size:12px; padding-top:10px; display:block; float:left; clear:both;">Walk Score measures how walkable an address is based on the distance to nearby amenities. A score of 100 represents the most walkable area compared to other areas.<hr /></span></span>'}function zMenuInit(){if(navigator.appVersion.indexOf("MSIE")==-1){return}var d,b,h,s,a=/\s*zMenuHvr/,q="",m,l="zMenuHvr",n="zMenuDiv";s=document.getElementsByTagName("LI");if(s){for(b=0;b<s.length;b++){if(s[b].parentNode.id.indexOf("zMenuDiv")!=-1){s[b].onmouseover=function(){var r=zGetAbsPosition(this);var k=document.getElementById(this.id+"_menu");m=this.className;cl=(m)?m+" "+l:l;if(k){k.style.position="absolute";var c=zo(this.id.split("_")[0]+"Vertical");if(c){k.style.top=(r.y)+"px";k.style.left=(r.x+r.width)+"px"}else{k.style.top=(r.y+r.height)+"px";k.style.left=r.x+"px"}}this.className=cl};s[b].onmouseout=function(){m=this.className;this.className=(m)?m.replace(a,""):""}}}}q=d+1}function zo(variable){if(typeof(window[variable])=="undefined"){return false}else{return eval(variable)}}document.write('<div id="zModalOverlayDiv"><div id="zModalOverlayDiv2"></div></div>');var zModalObjectHidden=new Array();var zModalScrollPosition=new Array();function zModalLockPosition(b){var a=document.getElementById("zModalOverlayDiv");if(a&&a.style.visibility=="visible"){window.scrollTo(zModalScrollPosition[0],zModalScrollPosition[1]);return false}else{return true}}function zGetClientWindowSize(){var b=0,a=0;if(typeof(window.innerWidth)=="number"){b=window.innerWidth;a=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){b=document.documentElement.clientWidth;a=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){b=document.body.clientWidth;a=document.body.clientHeight}}}return{width:b,height:a}}function zResizeModal(){var c=document.getElementById("zModalOverlayDiv");if(c.style.visibility!="visible"){return}var b=zGetClientWindowSize();c.style.top=zModalScrollPosition[1]+"px";c.style.left=zModalScrollPosition[0]+"px";if(navigator.userAgent.indexOf("MSIE ")!=-1){c.style.width=(b.width)+"px"}else{c.style.width=(b.width-18)+"px"}c.style.height=b.height+"px";var a=document.getElementById("zModalOverlayDiv2");if(!zModalDisableResize){a.style.width=(b.width-100)+"px";a.style.height=(b.height-100)+"px"}var k=zGetAbsPosition(a);var h=(b.width/2)-((k.width/2));var d=(b.height/2)-((k.height/2));a.style.left=h+"px";a.style.top=d+"px"}var zModalDisableResize=false;var zModelCancelFirst=false;function zShowModal(m,h){if(typeof h.disableResize!="undefined"){zModalDisableResize=h.disableResize}zModalScrollPosition=[self.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,self.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop];if(navigator.userAgent.indexOf("MSIE 6.0")!=-1){var l=document.getElementsByTagName("select");for(var k=0;k<l.length;k++){if(l[k].style.visibility==""||l[k].style.visibility=="visible"){l[k].style.visibility="hidden";zModalObjectHidden.push(l[k])}}var d=document.getElementById("zModalOverlayDiv");d.style.backgroundImage="url(/z/a/images/bg-checker.gif)"}var a=document.getElementById("zModalOverlayDiv");var q=zGetClientWindowSize();a.style.top=zModalScrollPosition[1]+"px";a.style.left=zModalScrollPosition[0]+"px";if(navigator.userAgent.indexOf("MSIE ")!=-1){a.style.width=(q.width)+"px"}else{a.style.width=(q.width-18)+"px"}a.style.height=q.height+"px";var c=(q.width/2)-((h.width/2)+15);var n=(q.height/2)-((h.height/2)+15);a.style.visibility=(a.style.visibility=="visible")?"hidden":"visible";var b=document.getElementById("zModalOverlayDiv2");b.style.left=c+"px";b.style.top=n+"px";b.style.width=h.width+"px";b.style.height=h.height+"px";b.innerHTML='<div style="width:80px; text-align:right; font-weight:bold; float:right;"><a href="javascript:void(0);" onclick="zCloseModal();">X Close</a></div><br style="clear:both;" /> '+m+"<div>"}function zCloseModal(){var b=document.getElementById("zModalOverlayDiv");b.style.visibility="hidden";for(var a=0;a<zModalObjectHidden.length;a++){zModalObjectHidden[a].style.visibility="visible"}}function zModalSaveSearch(b){var a='<iframe src="/z/_a/listing/property/save-search?searchId='+b+'" frameborder="0" scrolling="no" width="100%" height="95%" style="margin:0px;"></iframe>';zShowModal(a,{width:520,height:410,disableResize:true})}function zShowInquiryPop(){var a='<iframe src="/z/_a/listing/inquiry-pop" frameborder="0" scrolling="no" width="100%" height="95%" style="margin:0px;"></iframe>';zShowModal(a,{width:520,height:438,disableResize:true})}function forceTypeKitDesignModeOn(a){doc=tinyMCE.get(a).getDoc();doc.designMode="on"}var isMSIE=
/*@cc_on!@*/
false;var isTypeKitGlobalLoaded=false;function forceTypeKitLoading(a){doc=tinyMCE.get(a.editorId).getDoc();if(navigator.userAgent.indexOf("MSIE ")==-1){doc.designMode="off"}head=doc.getElementsByTagName("head")[0];script=doc.createElement("script");script.src=zTypeKitURL;script.type="text/javascript";head.appendChild(script);script=doc.createElement("script");script.type="text/javascript";script.src="/z/javascript/zTypeKitOnLoad.js";head.appendChild(script);if(navigator.userAgent.indexOf("MSIE ")==-1){setTimeout('forceTypeKitDesignModeOn("'+a.editorId+'");',2000)}};
