//Minimized ValueMap Top Files
function addCssClass(elem,newClass){if((typeof (elem)!="undefined")&&(elem!=null)){if(typeof (elem.className)=="undefined"){elem.className=newClass;}else{if(elem.className.length>0){elem.className=elem.className+" "+newClass;}else{elem.className=newClass;}}}}function removeCssClass(elem,oldClass){if((typeof (elem)!="undefined")&&(elem!=null)){var newClassName=elem.className;if(newClassName!="undefined"){var regTmp=new RegExp(oldClass,"gi");newClassName=newClassName.replace(regTmp,"");}elem.className=newClassName;}}function swapCssClass(elem,oldClass,newClass){if((typeof (elem)!="undefined")&&(elem!=null)){var newClassName=elem.className;if(newClassName!="undefined"){var regTmp=new RegExp(oldClass,"gi");newClassName=newClassName.replace(regTmp,newClass);elem.className=newClassName;}}}function showElement(ID,isVisible){var eItem=$get(ID);if(eItem!=null){eItem.style.display=(isVisible?"":"none");}}function safeString(value,defval){if(defval==null){defval="";}if(value==null){return defval;}else{return value;}}function safeNumber(value){if((value==undefined)||(value=="")){return 0;}if(!isNaN(value)){return value;}if((value.length==undefined)||(value.length==0)){return 0;}var tmpN=""+value;tmpN=tmpN.replace(/\$|\%|\,/g,"");tmpN=Number(tmpN);if(isNaN(tmpN)){return 0;}else{return tmpN;}}function isNumber(value){if(value.length==0){return false;}var tmpN=""+value;tmpN=tmpN.replace(/\$|\%|\,/g,"");if(isNaN(tmpN)){return false;}else{return true;}}function numberToText(value){var tmpNbr=Math.round(value/1000);if(tmpNbr<1000){return tmpNbr.toString()+"K";}else{if(tmpNbr<10000){return decimalRound(tmpNbr/1000,3)+"M";}else{if(tmpNbr<100000){return decimalRound(tmpNbr/1000,2)+"M";}else{if(tmpNbr<1000000){return decimalRound(tmpNbr/1000,1)+"M";}else{return"----";}}}}}function decimalRound(num,places){return Math.round(num*Math.pow(10,places))/Math.pow(10,places);}function decimalFixed(num,places){if(String(num).indexOf(".")>0){return num.toFixed(places);}else{return num;}}function TRZ(N){return String(N).replace(/^(-?\d+)$/,"$1.0");}function formatCurrency(num){num=num.toString().replace(/\$|\,/g,"");if(isNaN(num)){num="0";}sign=(num==(num=Math.abs(num)));num=Math.floor(num*100+0.50000000001);cents=num%100;num=Math.floor(num/100).toString();for(var i=0;i<Math.floor((num.length-(1+i))/3);i++){num=num.substring(0,num.length-(4*i+3))+","+num.substring(num.length-(4*i+3));}return(((sign)?"":"-")+"$"+num);}function formatNumber(val,useCommas,nullAsDashes){if(nullAsDashes&&(isNaN(val)||val==null)){return"--";}var num=val.toString().replace(/\$|\,/g,"");if(isNaN(num)){num="0";}sign=(num==(num=Math.abs(num)));num=Math.floor(num*100+0.50000000001);var dec=num%100;num=Math.floor(num/100).toString();dec="0"+dec;for(var i=0;i<Math.floor((num.length-(1+i))/3);i++){num=num.substring(0,num.length-(4*i+3))+","+num.substring(num.length-(4*i+3));}return(((sign)?"":"-")+num);}function formatCityStateZip(city,state,zip){var addressString="";if(city!=null){addressString=city;}if(state!=null||zip!=null){addressString+=", ";}if(state!=null){addressString+=state;}if(zip!=null){addressString+=" "+zip;}return addressString;}function formatCityStateZipCounty(city,state,zip,countyName){var addressString="";if(city!=null){addressString=city;}if((countyName!=null)&&(countyName!="")){addressString+=", "+countyName+" County";}if(state!=null||zip!=null){addressString+=", ";}if(state!=null){addressString+=state;}if(zip!=null){addressString+=" "+zip;}return addressString;}function getOptionText(elemSelect){for(var i=0;i<elemSelect.options.length;i++){if(elemSelect.options[i].value==elemSelect.value){return elemSelect.options[i].text;}}return"";}function getPos(obj,attrib){try{var returnValue;switch(attrib){case"left":returnValue=obj.offsetLeft;while((obj=obj.offsetParent)!=null){if(obj.tagName!="HTML"){returnValue+=obj.offsetLeft;}}return returnValue;break;case"top":returnValue=obj.offsetTop;while((obj=obj.offsetParent)!=null){if(obj.tagName!="HTML"){returnValue+=obj.offsetTop;}}return returnValue;break;}}catch(ex){}}var MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");var DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");function LZ(x){return(x<0||x>9?"":"0")+x;}function formatDate(date,format){format=format+"";var result="";var i_format=0;var c="";var token="";var y=date.getYear()+"";var M=date.getMonth()+1;var d=date.getDate();var E=date.getDay();var H=date.getHours();var m=date.getMinutes();var s=date.getSeconds();var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;var value=new Object();if(y.length<4){y=""+(y-0+1900);}value["y"]=""+y;value["yyyy"]=y;value["yy"]=y.substring(2,4);value["M"]=M;value["MM"]=LZ(M);value["MMM"]=MONTH_NAMES[M-1];value["NNN"]=MONTH_NAMES[M+11];value["d"]=d;value["dd"]=LZ(d);value["E"]=DAY_NAMES[E+7];value["EE"]=DAY_NAMES[E];value["H"]=H;value["HH"]=LZ(H);if(H==0){value["h"]=12;}else{if(H>12){value["h"]=H-12;}else{value["h"]=H;}}value["hh"]=LZ(value["h"]);if(H>11){value["K"]=H-12;}else{value["K"]=H;}value["k"]=H+1;value["KK"]=LZ(value["K"]);value["kk"]=LZ(value["k"]);if(H>11){value["a"]="PM";}else{value["a"]="AM";}value["m"]=m;value["mm"]=LZ(m);value["s"]=s;value["ss"]=LZ(s);while(i_format<format.length){c=format.charAt(i_format);token="";while((format.charAt(i_format)==c)&&(i_format<format.length)){token+=format.charAt(i_format++);}if(value[token]!=null){result=result+value[token];}else{result=result+token;}}return result;}function getNextSibling(startBrother){endBrother=startBrother.nextSibling;while(endBrother.nodeType!=1){endBrother=endBrother.nextSibling;}return endBrother;}function getFirstChild(parent){var firstChild=parent.firstChild;while(firstChild.nodeType!=1){firstChild=firstChild.nextSibling;}return firstChild;}function getLastChild(parent){var lastChild=parent.lastChild;while(lastChild.nodeType!=1){lastChild=lastChild.prevSibling;}return lastChild;}function getBrowserType(){if(document.getElementById&&!document.all){return"NS6";}else{if(document.getElementById&&document.all){return"IE6";}else{return"???";}}}function getCookie(cookieName){var start=document.cookie.indexOf(cookieName+"=");var len=start+cookieName.length+1;if((!start)&&(cookieName!=document.cookie.substring(0,cookieName.length))){return null;}if(start==-1){return null;}var end=document.cookie.indexOf(";",len);if(end==-1){end=document.cookie.length;}return unescape(document.cookie.substring(len,end));}function setCookie(cookieName,value,expires,path,domain,secure){var today=new Date();today.setTime(today.getTime());if(expires){expires=expires*1000*60*60*24;}var expires_date=new Date(today.getTime()+(expires));document.cookie=cookieName+"="+escape(value)+((expires)?";expires="+expires_date.toGMTString():"")+((path)?";path="+path:"")+((domain)?";domain="+domain:"")+((secure)?";secure":"");}function deleteCookie(cookieName,path,domain){setCookie(cookieName,"cookieDeleted",-1);}function getQueryValue(id){var qStr=unescape(location.search);qStr=qStr.substring(1,qStr.length);var parms=qStr.split("&");for(var idx=0;idx<parms.length;idx++){var pos=parms[idx].indexOf("=");if(pos>0){if(parms[idx].substring(0,pos)==id){return parms[idx].substring(pos+1);}}}return"";}function popUpErrorMessage(msgArray,msgTitle,dlgType,dlgWidth,dlgHeight,bWidth){var buttonWidth;var buttonOneLeftPos=10;var totalHeight=dlgHeight+40;if((bWidth==undefined)||(bWidth==null)||(bWidth=="")){buttonWidth=100;}else{buttonWidth=bWidth;}if(dlgType=="ERROR"){buttonOneLeftPos=dlgWidth/2-buttonWidth/2;}var title="<div class='msgDlgErrorTitleBar' style='width:  "+dlgWidth+"px; margin-bottom: 20px;'"+">"+msgTitle+"</div>";var buttonPanel="<div style='margin-top: 20px; margin-bottom: 20px; width: "+dlgWidth+"px'"+">"+"<input style='position: relative; width: "+buttonWidth+"px; "+"left:"+buttonOneLeftPos+"px' type='button' onclick='$.nyroModalRemove();' value='Ok' />"+"</div>";var msg="<div style='z-index: 301'>"+title+msgArray.join(" ")+buttonPanel+"</div>";$.fn.nyroModalManual({bgColor:"#CFCFCF",content:msg,height:totalHeight,width:dlgWidth,minHeight:totalHeight*0.75,minWidth:dlgWidth*0.75});}function isEmptyOrNull(val){if((val!=undefined)&&(val!=null)&&(val.length>0)){return false;}else{return true;}}function logException(exception){if(typeof (console)!="undefined"){console.error("Exception Caught: ",exception);console.trace();}}function logDebug(debugMessage){if(typeof (console)!="undefined"){console.error("Debug: ",debugMessage);}}function ismaxlength(obj){var mlength=obj.getAttribute?parseInt(obj.getAttribute("maxlength")):"";if(obj.getAttribute&&obj.value.length>mlength){obj.value=obj.value.substring(0,mlength);}}Date.prototype.format=function(format){var returnStr="";var replace=Date.replaceChars;for(var i=0;i<format.length;i++){var curChar=format.charAt(i);if(replace[curChar]){returnStr+=replace[curChar].call(this);}else{returnStr+=curChar;}}return returnStr;};Date.replaceChars={shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longMonths:["January","February","March","April","May","June","July","August","September","October","November","December"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d:function(){return(this.getDate()<10?"0":"")+this.getDate();},D:function(){return Date.replaceChars.shortDays[this.getDay()];},j:function(){return this.getDate();},l:function(){return Date.replaceChars.longDays[this.getDay()];},N:function(){return this.getDay()+1;},S:function(){return(this.getDate()%10==1&&this.getDate()!=11?"st":(this.getDate()%10==2&&this.getDate()!=12?"nd":(this.getDate()%10==3&&this.getDate()!=13?"rd":"th")));},w:function(){return this.getDay();},z:function(){return"Not Yet Supported";},W:function(){return"Not Yet Supported";},F:function(){return Date.replaceChars.longMonths[this.getMonth()];},m:function(){return(this.getMonth()<9?"0":"")+(this.getMonth()+1);},M:function(){return Date.replaceChars.shortMonths[this.getMonth()];},n:function(){return this.getMonth()+1;},t:function(){return"Not Yet Supported";},L:function(){return"Not Yet Supported";},o:function(){return"Not Supported";},Y:function(){return this.getFullYear();},y:function(){return(""+this.getFullYear()).substr(2);},a:function(){return this.getHours()<12?"am":"pm";},A:function(){return this.getHours()<12?"AM":"PM";},B:function(){return"Not Yet Supported";},g:function(){return this.getHours()%12||12;},G:function(){return this.getHours();},h:function(){return((this.getHours()%12||12)<10?"0":"")+(this.getHours()%12||12);},H:function(){return(this.getHours()<10?"0":"")+this.getHours();},i:function(){return(this.getMinutes()<10?"0":"")+this.getMinutes();},s:function(){return(this.getSeconds()<10?"0":"")+this.getSeconds();},e:function(){return"Not Yet Supported";},I:function(){return"Not Supported";},O:function(){return(-this.getTimezoneOffset()<0?"-":"+")+(Math.abs(this.getTimezoneOffset()/60)<10?"0":"")+(Math.abs(this.getTimezoneOffset()/60))+"00";},T:function(){var m=this.getMonth();this.setMonth(0);var result=this.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/,"$1");this.setMonth(m);return result;},Z:function(){return -this.getTimezoneOffset()*60;},c:function(){return"Not Yet Supported";},r:function(){return this.toString();},U:function(){return this.getTime()/1000;}};function vmVEUtils_CLASS(){this.SplitScreenToolBar=null;this.NoBirdsEyeAvailable=null;this.BirdsEyeLoading=null;this.FaqPanel=null;}vmVEUtils_CLASS.prototype.Init=function(){this.buildSplitScreenToolBar();this.buildBirdsEyeNotAvailable();this.buildBirdsEyeLoading();};vmVEUtils_CLASS.prototype.addShim=function(el){var shim=document.createElement("iframe");shim.id="myShim";shim.frameBorder="0";shim.style.position="absolute";shim.style.zIndex="1";shim.style.top=el.offsetTop;shim.style.left=el.offsetLeft;shim.width=el.offsetWidth;shim.height=el.offsetHeight;el.shimElement=shim;el.parentNode.insertBefore(shim,el);};vmVEUtils_CLASS.prototype.buildSplitScreenToolBar=function(){if(this.SplitScreenToolBar==null){var topToolBar=document.createElement("div");topToolBar.id="VM_MapTwo_ToolBar";topToolBar.className="MSVE_Dashboard_V6 notraffic MSVE_OrthoView";topToolBar.style.width="100%";var navBackGround=document.createElement("div");navBackGround.id="VM_MapTwo_navBackground";navBackGround.className="MSVE_navAction_background";navBackGround.style.zIndex="100";topToolBar.appendChild(navBackGround);var buttonsPanel=document.createElement("div");buttonsPanel.className="MSVE_Dashboard MSVE_Dashboard_V6 MSVE_FlatlandMapMode";topToolBar.appendChild(buttonsPanel);var WestButton=document.createElement("div");WestButton.id="VM_MapTwo_ViewW";WestButton.className="MSVE_MapStyle";WestButton.onclick=new Function("handleOrientationEvent('W');");WestButton.onmouseover=new Function("hoverExtn_Dashboard_VM_Directions('VM_MapTwo_ViewW', 'enable');");WestButton.onmouseout=new Function("hoverExtn_Dashboard_VM_Directions('VM_MapTwo_ViewW', 'disable');");WestButton.title="View to the West.";WestButton.innerHTML="W";buttonsPanel.appendChild(WestButton);var EastButton=document.createElement("div");EastButton.id="VM_MapTwo_ViewE";EastButton.className="MSVE_MapStyle";EastButton.onclick=new Function("handleOrientationEvent('E');");EastButton.onmouseover=new Function("hoverExtn_Dashboard_VM_Directions('VM_MapTwo_ViewE', 'enable');");EastButton.onmouseout=new Function("hoverExtn_Dashboard_VM_Directions('VM_MapTwo_ViewE', 'disable');");EastButton.title="View to the East.";EastButton.innerHTML="E";buttonsPanel.appendChild(EastButton);var SouthButton=document.createElement("div");SouthButton.id="VM_MapTwo_ViewS";SouthButton.className="MSVE_MapStyle";SouthButton.onclick=new Function("handleOrientationEvent('S');");SouthButton.onmouseover=new Function("hoverExtn_Dashboard_VM_Directions('VM_MapTwo_ViewS', 'enable');");SouthButton.onmouseout=new Function("hoverExtn_Dashboard_VM_Directions('VM_MapTwo_ViewS', 'disable');");SouthButton.title="View to the South.";SouthButton.innerHTML="S";buttonsPanel.appendChild(SouthButton);var NorthButton=document.createElement("div");NorthButton.id="VM_MapTwo_ViewN";NorthButton.className="MSVE_MapStyle";NorthButton.onclick=new Function("handleOrientationEvent('N');");NorthButton.onmouseover=new Function("hoverExtn_Dashboard_VM_Directions('VM_MapTwo_ViewN', 'enable');");NorthButton.onmouseout=new Function("hoverExtn_Dashboard_VM_Directions('VM_MapTwo_ViewN', 'disable');");NorthButton.title="View to the North.";NorthButton.innerHTML="N";buttonsPanel.appendChild(NorthButton);this.SplitScreenToolBar=topToolBar;}};vmVEUtils_CLASS.prototype.buildBirdsEyeNotAvailable=function(){var noBirdsEyeAvailable=document.createElement("div");noBirdsEyeAvailable.id="VM_MapTwo_BE_Not_Available";noBirdsEyeAvailable.style.width="100%";noBirdsEyeAvailable.style.height="100%";noBirdsEyeAvailable.style.zIndex="200";noBirdsEyeAvailable.style.background="#2B4D7B url('img/mapImg/mglass_overlay.jpg') no-repeat center scroll";this.NoBirdsEyeAvailable=noBirdsEyeAvailable;};vmVEUtils_CLASS.prototype.buildBirdsEyeLoading=function(){var bELoading=document.createElement("div");bELoading.id="VM_MapTwo_BE_Loading";bELoading.style.width="100%";bELoading.style.height="100%";bELoading.style.zIndex="200";bELoading.style.background="#2B4D7B url('img/mapImg/loader_gray.gif') no-repeat center scroll";this.BirdsEyeLoading=bELoading;};function hoverExtn_Dashboard_VM_Directions(buttonId,state){var buttonControl=$get(buttonId);if(state=="enable"){buttonControl.className="MSVE_MapStyle ms_pseudoHover";}else{if(state=="disable"){buttonControl.className="MSVE_MapStyle";}}}function handleOrientationEvent(dir){try{VMM2.setOrientation(dir);setBirdsToolBarButtonState(VMM2);}catch(ex){alert("Error occurred Handling Split View Orientation");}}function setBirdsToolBarButtonState(vmMap){var northButton=$get("VM_MapTwo_ViewN");var southButton=$get("VM_MapTwo_ViewS");var eastButton=$get("VM_MapTwo_ViewE");var westButton=$get("VM_MapTwo_ViewW");northButton.style.background="";southButton.style.background="";eastButton.style.background="";westButton.style.background="";switch(vmMap.Orientation){case VEOrientation.North:northButton.style.background="url(img/mapImg/nav_select.gif) no-repeat center bottom";break;case VEOrientation.South:southButton.style.background="url(img/mapImg/nav_select.gif) no-repeat center bottom";break;case VEOrientation.East:eastButton.style.background="url(img/mapImg/nav_select.gif) no-repeat center bottom";break;case VEOrientation.West:westButton.style.background="url(img/mapImg/nav_select.gif) no-repeat center bottom";break;default:northButton.style.background="url(img/mapImg/nav_select.gif) no-repeat center bottom";break;}}function isBirdEyeStyle(map){var isBirdsEye=false;if((map!=undefined)||(map!=null)){var mapStyle=map.GetMapStyle();if((mapStyle==VEMapStyle.BirdseyeHybrid)||(mapStyle==VEMapStyle.Birdseye)||(mapStyle==VEMapStyle.Oblique)){isBirdsEye=true;}}return isBirdsEye;}function isMapStyleBirdEye(mapStyle){var isBirdsEye=false;if((mapStyle==VEMapStyle.BirdseyeHybrid)||(mapStyle==VEMapStyle.Birdseye)||(mapStyle==VEMapStyle.Oblique)){isBirdsEye=true;}return isBirdsEye;}//Third Party Compressed Files
/*
 * jQuery JavaScript Library v1.4.1
 * http://jquery.com/
 *
 * Copyright 2010, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 * Copyright 2010, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Mon Jan 25 19:43:33 2010 -0500
 */
(function(z,v){function la(){if(!c.isReady){try{r.documentElement.doScroll("left");}catch(a){setTimeout(la,1);return ;}c.ready();}}function Ma(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b);}function X(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var n in b){X(a,n,b[n],f,e,d);}return a;}if(d!==v){f=!i&&f&&c.isFunction(d);for(n=0;n<j;n++){e(a[n],b,f?d.call(a[n],n,e(a[n],b)):d,i);}return a;}return j?e(a[0],b):null;}function J(){return(new Date).getTime();}function Y(){return false;}function Z(){return true;}function ma(a,b,d){d[0].type=a;return c.event.handle.apply(b,d);}function na(a){var b,d=[],f=[],e=arguments,i,j,n,o,m,s,x=c.extend({},c.data(this,"events").live);if(!(a.button&&a.type==="click")){for(o in x){j=x[o];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector);}else{delete x[o];}}i=c(a.target).closest(f,a.currentTarget);m=0;for(s=i.length;m<s;m++){for(o in x){j=x[o];n=i[m].elem;f=null;if(i[m].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave"){f=c(a.relatedTarget).closest(j.selector)[0];}if(!f||f!==n){d.push({elem:n,fn:j});}}}}m=0;for(s=d.length;m<s;m++){i=d[m];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,e)===false){b=false;break;}}return b;}}function oa(a,b){return"live."+(a?a+".":"")+b.replace(/\./g,"`").replace(/ /g,"&");}function pa(a){return !a||!a.parentNode||a.parentNode.nodeType===11;}function qa(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var i in f){for(var j in f[i]){c.event.add(this,i,f[i][j],f[i][j].data);}}}}});}function ra(a,b,d){var f,e,i;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&a[0].indexOf("<option")<0&&(c.support.checkClone||!sa.test(a[0]))){e=true;if(i=c.fragments[a[0]]){if(i!==1){f=i;}}}if(!f){b=b&&b[0]?b[0].ownerDocument||b[0]:r;f=b.createDocumentFragment();c.clean(a,b,f,d);}if(e){c.fragments[a[0]]=i?f:1;}return{fragment:f,cacheable:e};}function K(a,b){var d={};c.each(ta.concat.apply([],ta.slice(0,b)),function(){d[this]=a;});return d;}function ua(a){return"scrollTo" in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false;}var c=function(a,b){return new c.fn.init(a,b);},Na=z.jQuery,Oa=z.$,r=z.document,S,Pa=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Qa=/^.[^:#\[\.,]*$/,Ra=/\S/,Sa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Ta=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,O=navigator.userAgent,va=false,P=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,Q=Array.prototype.slice,wa=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a){return this;}if(a.nodeType){this.context=this[0]=a;this.length=1;return this;}if(typeof a==="string"){if((d=Pa.exec(a))&&(d[1]||!b)){if(d[1]){f=b?b.ownerDocument||b:r;if(a=Ta.exec(a)){if(c.isPlainObject(b)){a=[r.createElement(a[1])];c.fn.attr.call(a,b,true);}else{a=[f.createElement(a[1])];}}else{a=ra([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes;}}else{if(b=r.getElementById(d[2])){if(b.id!==d[2]){return S.find(a);}this.length=1;this[0]=b;}this.context=r;this.selector=a;return this;}}else{if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=r;a=r.getElementsByTagName(a);}else{return !b||b.jquery?(b||S).find(a):c(b).find(a);}}}else{if(c.isFunction(a)){return S.ready(a);}}if(a.selector!==v){this.selector=a.selector;this.context=a.context;}return c.isArray(a)?this.setArray(a):c.makeArray(a,this);},selector:"",jquery:"1.4.1",length:0,size:function(){return this.length;},toArray:function(){return Q.call(this,0);},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a];},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find"){a.selector=this.selector+(this.selector?" ":"")+d;}else{if(b){a.selector=this.selector+"."+b+"("+d+")";}}return a;},setArray:function(a){this.length=0;ba.apply(this,a);return this;},each:function(a,b){return c.each(this,a,b);},ready:function(a){c.bindReady();if(c.isReady){a.call(r,c);}else{P&&P.push(a);}return this;},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1);},first:function(){return this.eq(0);},last:function(){return this.eq(-1);},slice:function(){return this.pushStack(Q.apply(this,arguments),"slice",Q.call(arguments).join(","));},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b);}));},end:function(){return this.prevObject||c(null);},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,n;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2;}if(typeof a!=="object"&&!c.isFunction(a)){a={};}if(d===b){a=this;--b;}for(;b<d;b++){if((e=arguments[b])!=null){for(i in e){j=a[i];n=e[i];if(a!==n){if(f&&n&&(c.isPlainObject(n)||c.isArray(n))){j=j&&(c.isPlainObject(j)||c.isArray(j))?j:c.isArray(n)?[]:{};a[i]=c.extend(f,j,n);}else{if(n!==v){a[i]=n;}}}}}}return a;};c.extend({noConflict:function(a){z.$=Oa;if(a){z.jQuery=Na;}return c;},isReady:false,ready:function(){if(!c.isReady){if(!r.body){return setTimeout(c.ready,13);}c.isReady=true;if(P){for(var a,b=0;a=P[b++];){a.call(r,c);}P=null;}c.fn.triggerHandler&&c(r).triggerHandler("ready");}},bindReady:function(){if(!va){va=true;if(r.readyState==="complete"){return c.ready();}if(r.addEventListener){r.addEventListener("DOMContentLoaded",L,false);z.addEventListener("load",c.ready,false);}else{if(r.attachEvent){r.attachEvent("onreadystatechange",L);z.attachEvent("onload",c.ready);var a=false;try{a=z.frameElement==null;}catch(b){}r.documentElement.doScroll&&a&&la();}}}},isFunction:function(a){return $.call(a)==="[object Function]";},isArray:function(a){return $.call(a)==="[object Array]";},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval){return false;}if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,"isPrototypeOf")){return false;}var b;for(b in a){}return b===v||aa.call(a,b);},isEmptyObject:function(a){for(var b in a){return false;}return true;},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a){return null;}if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return z.JSON&&z.JSON.parse?z.JSON.parse(a):(new Function("return "+a))();}else{c.error("Invalid JSON: "+a);}},noop:function(){},globalEval:function(a){if(a&&Ra.test(a)){var b=r.getElementsByTagName("head")[0]||r.documentElement,d=r.createElement("script");d.type="text/javascript";if(c.support.scriptEval){d.appendChild(r.createTextNode(a));}else{d.text=a;}b.insertBefore(d,b.firstChild);b.removeChild(d);}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase();},each:function(a,b,d){var f,e=0,i=a.length,j=i===v||c.isFunction(a);if(d){if(j){for(f in a){if(b.apply(a[f],d)===false){break;}}}else{for(;e<i;){if(b.apply(a[e++],d)===false){break;}}}}else{if(j){for(f in a){if(b.call(a[f],f,a[f])===false){break;}}}else{for(d=a[0];e<i&&b.call(d,e,d)!==false;d=a[++e]){}}}return a;},trim:function(a){return(a||"").replace(Sa,"");},makeArray:function(a,b){b=b||[];if(a!=null){a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);}return b;},inArray:function(a,b){if(b.indexOf){return b.indexOf(a);}for(var d=0,f=b.length;d<f;d++){if(b[d]===a){return d;}}return -1;},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number"){for(var e=b.length;f<e;f++){a[d++]=b[f];}}else{for(;b[f]!==v;){a[d++]=b[f++];}}a.length=d;return a;},grep:function(a,b,d){for(var f=[],e=0,i=a.length;e<i;e++){!d!==!b(a[e],e)&&f.push(a[e]);}return f;},map:function(a,b,d){for(var f=[],e,i=0,j=a.length;i<j;i++){e=b(a[i],i,d);if(e!=null){f[f.length]=e;}}return f.concat.apply([],f);},guid:1,proxy:function(a,b,d){if(arguments.length===2){if(typeof b==="string"){d=a;a=d[b];b=v;}else{if(b&&!c.isFunction(b)){d=b;b=v;}}}if(!b&&a){b=function(){return a.apply(d||this,arguments);};}if(a){b.guid=a.guid=a.guid||b.guid||c.guid++;}return b;},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"};},browser:{}});O=c.uaMatch(O);if(O.browser){c.browser[O.browser]=true;c.browser.version=O.version;}if(c.browser.webkit){c.browser.safari=true;}if(wa){c.inArray=function(a,b){return wa.call(b,a);};}S=c(r);if(r.addEventListener){L=function(){r.removeEventListener("DOMContentLoaded",L,false);c.ready();};}else{if(r.attachEvent){L=function(){if(r.readyState==="complete"){r.detachEvent("onreadystatechange",L);c.ready();}};}}(function(){c.support={};var a=r.documentElement,b=r.createElement("script"),d=r.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:r.createElement("select").appendChild(r.createElement("option")).selected,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(r.createTextNode("window."+f+"=1;"));}catch(j){}a.insertBefore(b,a.firstChild);if(z[f]){c.support.scriptEval=true;delete z[f];}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function n(){c.support.noCloneEvent=false;d.detachEvent("onclick",n);});d.cloneNode(true).fireEvent("onclick");}d=r.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=r.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var n=r.createElement("div");n.style.width=n.style.paddingLeft="1px";r.body.appendChild(n);c.boxModel=c.support.boxModel=n.offsetWidth===2;r.body.removeChild(n).style.display="none";});a=function(n){var o=r.createElement("div");n="on"+n;var m=n in o;if(!m){o.setAttribute(n,"return;");m=typeof o[n]==="function";}return m;};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null;}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ua=0,xa={},Va={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var f=a[G],e=c.cache;if(!b&&!f){return null;}f||(f=++Ua);if(typeof b==="object"){a[G]=f;e=e[f]=c.extend(true,{},b);}else{e=e[f]?e[f]:typeof d==="undefined"?Va:(e[f]={});}if(d!==v){a[G]=f;e[b]=d;}return typeof b==="string"?e[b]:e;}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a);}}else{try{delete a[G];}catch(i){a.removeAttribute&&a.removeAttribute(G);}delete f[d];}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length){return c.data(this[0]);}else{if(typeof a==="object"){return this.each(function(){c.data(this,a);});}}var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===v){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===v&&this.length){f=c.data(this[0],a);}return f===v&&d[1]?this.data(d[0]):f;}else{return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b);});}},removeData:function(a){return this.each(function(){c.removeData(this,a);});}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d){return f||[];}if(!f||c.isArray(d)){f=c.data(a,b,c.makeArray(d));}else{f.push(d);}return f;}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress"){f=d.shift();}if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b);});}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx";}if(b===v){return c.queue(this[0],a);}return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a);});},dequeue:function(a){return this.each(function(){c.dequeue(this,a);});},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b);},a);});},clearQueue:function(a){return this.queue(a||"fx",[]);}});var ya=/[\n\t]/g,ca=/\s+/,Wa=/\r/g,Xa=/href|src|style/,Ya=/(button|input)/i,Za=/(button|input|object|select|textarea)/i,$a=/^(a|area)$/i,za=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr);},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a);});},addClass:function(a){if(c.isFunction(a)){return this.each(function(o){var m=c(this);m.addClass(a.call(this,o,m.attr("class")));});}if(a&&typeof a==="string"){for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1){if(e.className){for(var i=" "+e.className+" ",j=0,n=b.length;j<n;j++){if(i.indexOf(" "+b[j]+" ")<0){e.className+=" "+b[j];}}}else{e.className=a;}}}}return this;},removeClass:function(a){if(c.isFunction(a)){return this.each(function(o){var m=c(this);m.removeClass(a.call(this,o,m.attr("class")));});}if(a&&typeof a==="string"||a===v){for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className){if(a){for(var i=(" "+e.className+" ").replace(ya," "),j=0,n=b.length;j<n;j++){i=i.replace(" "+b[j]+" "," ");}e.className=i.substring(1,i.length-1);}else{e.className="";}}}}return this;},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a)){return this.each(function(e){var i=c(this);i.toggleClass(a.call(this,e,i.attr("class"),b),b);});}return this.each(function(){if(d==="string"){for(var e,i=0,j=c(this),n=b,o=a.split(ca);e=o[i++];){n=f?n:!j.hasClass(e);j[n?"addClass":"removeClass"](e);}}else{if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||"";}}});},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++){if((" "+this[b].className+" ").replace(ya," ").indexOf(a)>-1){return true;}}return false;},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option")){return(b.attributes.value||{}).specified?b.value:b.text;}if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0){return null;}var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b){return a;}f.push(a);}}return f;}if(za.test(b.type)&&!c.support.checkOn){return b.getAttribute("value")===null?"on":b.value;}return(b.value||"").replace(Wa,"");}return v;}var n=c.isFunction(a);return this.each(function(o){var m=c(this),s=a;if(this.nodeType===1){if(n){s=a.call(this,o,m.val());}if(typeof s==="number"){s+="";}if(c.isArray(s)&&za.test(this.type)){this.checked=c.inArray(m.val(),s)>=0;}else{if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0;});if(!x.length){this.selectedIndex=-1;}}else{this.value=s;}}}});}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8){return v;}if(f&&b in c.attrFn){return c(a)[b](d);}f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==v;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Xa.test(b);if(b in a&&f&&!i){if(e){b==="type"&&Ya.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");a[b]=d;}if(c.nodeName(a,"form")&&a.getAttributeNode(b)){return a.getAttributeNode(b).nodeValue;}if(b==="tabIndex"){return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Za.test(a.nodeName)||$a.test(a.nodeName)&&a.href?0:v;}return a[b];}if(!c.support.style&&f&&b==="style"){if(e){a.style.cssText=""+d;}return a.style.cssText;}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?v:a;}return c.style(a,b,d);}});var ab=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b;});};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==z&&!a.frameElement){a=z;}if(!d.guid){d.guid=c.guid++;}if(f!==v){d=c.proxy(d);d.data=f;}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):v;};i=c.data(a,"handle",j);}if(i){i.elem=a;b=b.split(/\s+/);for(var n,o=0;n=b[o++];){var m=n.split(".");n=m.shift();if(o>1){d=c.proxy(d);if(f!==v){d.data=f;}}d.type=m.slice(0).sort().join(".");var s=e[n],x=this.special[n]||{};if(!s){s=e[n]={};if(!x.setup||x.setup.call(a,f,m,d)===false){if(a.addEventListener){a.addEventListener(n,i,false);}else{a.attachEvent&&a.attachEvent("on"+n,i);}}}if(x.add){if((m=x.add.call(a,d,f,m,s))&&c.isFunction(m)){m.guid=m.guid||d.guid;m.data=m.data||d.data;m.type=m.type||d.type;d=m;}}s[d.guid]=d;this.global[n]=true;}a=null;}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===v||typeof b==="string"&&b.charAt(0)==="."){for(i in f){this.remove(a,i+(b||""));}}else{if(b.type){d=b.handler;b=b.type;}b=b.split(/\s+/);for(var n=0;i=b[n++];){var o=i.split(".");i=o.shift();var m=!o.length,s=c.map(o.slice(0).sort(),ab);s=new RegExp("(^|\\.)"+s.join("\\.(?:.*\\.)?")+"(\\.|$)");var x=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid];}else{for(var A in f[i]){if(m||s.test(f[i][A].type)){delete f[i][A];}}}x.remove&&x.remove.call(a,o,j);for(e in f[i]){break;}if(!e){if(!x.teardown||x.teardown.call(a,o)===false){if(a.removeEventListener){a.removeEventListener(i,c.data(a,"handle"),false);}else{a.detachEvent&&a.detachEvent("on"+i,c.data(a,"handle"));}}e=null;delete f[i];}}}}for(e in f){break;}if(!e){if(A=c.data(a,"handle")){A.elem=null;}c.removeData(a,"events");c.removeData(a,"handle");}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true;}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem);});}if(!d||d.nodeType===3||d.nodeType===8){return v;}a.result=v;a.target=d;b=c.makeArray(b);b.unshift(a);}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){if(d["on"+e]&&d["on"+e].apply(d,b)===false){a.result=false;}}}catch(i){}if(!a.isPropagationStopped()&&f){c.event.trigger(a,b,f,true);}else{if(!a.isDefaultPrevented()){d=a.target;var j;if(!(c.nodeName(d,"a")&&e==="click")&&!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){try{if(d[e]){if(j=d["on"+e]){d["on"+e]=null;}this.triggered=true;d[e]();}}catch(n){}if(j){d["on"+e]=j;}this.triggered=false;}}}},handle:function(a){var b,d;a=arguments[0]=c.event.fix(a||z.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==v){a.result=i;if(i===false){a.preventDefault();a.stopPropagation();}}if(a.isImmediatePropagationStopped()){break;}}}return a.result;},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[G]){return a;}var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f];}if(!a.target){a.target=a.srcElement||r;}if(a.target.nodeType===3){a.target=a.target.parentNode;}if(!a.relatedTarget&&a.fromElement){a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;}if(a.pageX==null&&a.clientX!=null){b=r.documentElement;d=r.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0);}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode)){a.which=a.charCode||a.keyCode;}if(!a.metaKey&&a.ctrlKey){a.metaKey=a.ctrlKey;}if(!a.which&&a.button!==v){a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;}return a;},guid:100000000,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;b.liveProxy=a;c.event.add(this,b.live,na,b);},remove:function(a){if(a.length){var b=0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++;});b<1&&c.event.remove(this,a[0],na);}},special:{}},beforeunload:{setup:function(a,b,d){if(this.setInterval){this.onbeforeunload=d;}return false;},teardown:function(a,b){if(this.onbeforeunload===b){this.onbeforeunload=null;}}}}};c.Event=function(a){if(!this.preventDefault){return new c.Event(a);}if(a&&a.type){this.originalEvent=a;this.type=a.type;}else{this.type=a;}this.timeStamp=J();this[G]=true;};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false;}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true;}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation();},isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y};var Aa=function(a){for(var b=a.relatedTarget;b&&b!==this;){try{b=b.parentNode;}catch(d){break;}}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments);}},Ba=function(a){a.type=a.data;c.event.handle.apply(this,arguments);};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ba:Aa,a);},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ba:Aa);}};});if(!c.support.submitBubbles){c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length){return ma("submit",this,arguments);}});c.event.add(this,"keypress.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13){return ma("submit",this,arguments);}});}else{return false;}},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this,"keypress.specialSubmit"+(b?"."+b.guid:""));}};}if(!c.support.changeBubbles){var da=/textarea|input|select/i;function Ca(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox"){d=a.checked;}else{if(b==="select-multiple"){d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected;}).join("-"):"";}else{if(a.nodeName.toLowerCase()==="select"){d=a.selectedIndex;}}}return d;}function ea(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Ca(d);if(a.type!=="focusout"||d.type!=="radio"){c.data(d,"_change_data",e);}if(!(f===v||e===f)){if(f!=null||e){a.type="change";return c.event.trigger(a,b,d);}}}}c.event.special.change={filters:{focusout:ea,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select"){return ea.call(this,a);}},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple"){return ea.call(this,a);}},beforeactivate:function(a){a=a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Ca(a));}},setup:function(a,b,d){for(var f in T){c.event.add(this,f+".specialChange."+d.guid,T[f]);}return da.test(this.nodeName);},remove:function(a,b){for(var d in T){c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),T[d]);}return da.test(this.nodeName);}};var T=c.event.special.change.filters;}r.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f);}c.event.special[b]={setup:function(){this.addEventListener(a,d,true);},teardown:function(){this.removeEventListener(a,d,true);}};});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d){this[b](i,f,d[i],e);}return this;}if(c.isFunction(f)){e=f;f=v;}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments);}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f);});};});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault){for(var d in a){this.unbind(d,a[d]);}return this;}return this.each(function(){c.event.remove(this,a,b);});},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this);});},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result;}},toggle:function(a){for(var b=arguments,d=1;d<b.length;){c.proxy(a,b[d++]);}return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false;}));},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a);}});c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e){var i,j=0;if(c.isFunction(f)){e=f;f=v;}for(d=(d||"").split(/\s+/);(i=d[j++])!=null;){i=i==="focus"?"focusin":i==="blur"?"focusout":i==="hover"?d.push("mouseleave")&&"mouseenter":i;b==="live"?c(this.context).bind(oa(i,this.selector),{data:f,selector:this.selector,live:i},e):c(this.context).unbind(oa(i,this.selector),e?{guid:e.guid+this.selector+i}:null);}return this;};});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b);};if(c.attrFn){c.attrFn[b]=true;}});z.attachEvent&&!z.addEventListener&&z.attachEvent("onunload",function(){for(var a in c.cache){if(c.cache[a].handle){try{c.event.remove(c.cache[a].handle.elem);}catch(b){}}}});(function(){function a(g){for(var h="",k,l=0;g[l];l++){k=g[l];if(k.nodeType===3||k.nodeType===4){h+=k.nodeValue;}else{if(k.nodeType!==8){h+=a(k.childNodes);}}}return h;}function b(g,h,k,l,q,p){q=0;for(var u=l.length;q<u;q++){var t=l[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===k){y=l[t.sizset];break;}if(t.nodeType===1&&!p){t.sizcache=k;t.sizset=q;}if(t.nodeName.toLowerCase()===h){y=t;break;}t=t[g];}l[q]=y;}}}function d(g,h,k,l,q,p){q=0;for(var u=l.length;q<u;q++){var t=l[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===k){y=l[t.sizset];break;}if(t.nodeType===1){if(!p){t.sizcache=k;t.sizset=q;}if(typeof h!=="string"){if(t===h){y=true;break;}}else{if(o.filter(h,[t]).length>0){y=t;break;}}}t=t[g];}l[q]=y;}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,i=Object.prototype.toString,j=false,n=true;[0,0].sort(function(){n=false;return 0;});var o=function(g,h,k,l){k=k||[];var q=h=h||r;if(h.nodeType!==1&&h.nodeType!==9){return[];}if(!g||typeof g!=="string"){return k;}for(var p=[],u,t,y,R,H=true,M=w(h),I=g;(f.exec(""),u=f.exec(I))!==null;){I=u[3];p.push(u[1]);if(u[2]){R=u[3];break;}}if(p.length>1&&s.exec(g)){if(p.length===2&&m.relative[p[0]]){t=fa(p[0]+p[1],h);}else{for(t=m.relative[p[0]]?[h]:o(p.shift(),h);p.length;){g=p.shift();if(m.relative[g]){g+=p.shift();}t=fa(g,t);}}}else{if(!l&&p.length>1&&h.nodeType===9&&!M&&m.match.ID.test(p[0])&&!m.match.ID.test(p[p.length-1])){u=o.find(p.shift(),h,M);h=u.expr?o.filter(u.expr,u.set)[0]:u.set[0];}if(h){u=l?{expr:p.pop(),set:A(l)}:o.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=u.expr?o.filter(u.expr,u.set):u.set;if(p.length>0){y=A(t);}else{H=false;}for(;p.length;){var D=p.pop();u=D;if(m.relative[D]){u=p.pop();}else{D="";}if(u==null){u=h;}m.relative[D](y,u,M);}}else{y=[];}}y||(y=t);y||o.error(D||g);if(i.call(y)==="[object Array]"){if(H){if(h&&h.nodeType===1){for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g]))){k.push(t[g]);}}}else{for(g=0;y[g]!=null;g++){y[g]&&y[g].nodeType===1&&k.push(t[g]);}}}else{k.push.apply(k,y);}}else{A(y,k);}if(R){o(R,q,k,l);o.uniqueSort(k);}return k;};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j){for(var h=1;h<g.length;h++){g[h]===g[h-1]&&g.splice(h--,1);}}}return g;};o.matches=function(g,h){return o(g,null,null,h);};o.find=function(g,h,k){var l,q;if(!g){return[];}for(var p=0,u=m.order.length;p<u;p++){var t=m.order[p];if(q=m.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");l=m.find[t](q,h,k);if(l!=null){g=g.replace(m.match[t],"");break;}}}}l||(l=h.getElementsByTagName("*"));return{set:l,expr:g};};o.filter=function(g,h,k,l){for(var q=g,p=[],u=h,t,y,R=h&&h[0]&&w(h[0]);g&&h.length;){for(var H in m.filter){if((t=m.leftMatch[H].exec(g))!=null&&t[2]){var M=m.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(u===p){p=[];}if(m.preFilter[H]){if(t=m.preFilter[H](t,u,k,p,l,R)){if(t===true){continue;}}else{y=I=true;}}if(t){for(var U=0;(D=u[U])!=null;U++){if(D){I=M(D,t,U,u);var Da=l^!!I;if(k&&I!=null){if(Da){y=true;}else{u[U]=false;}}else{if(Da){p.push(D);y=true;}}}}}if(I!==v){k||(u=p);g=g.replace(m.match[H],"");if(!y){return[];}break;}}}}if(g===q){if(y==null){o.error(g);}else{break;}}q=g;}return u;};o.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var m=o.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href");}},relative:{"+":function(g,h){var k=typeof h==="string",l=k&&!/\W/.test(h);k=k&&!l;if(l){h=h.toLowerCase();}l=0;for(var q=g.length,p;l<q;l++){if(p=g[l]){for(;(p=p.previousSibling)&&p.nodeType!==1;){}g[l]=k||p&&p.nodeName.toLowerCase()===h?p||false:p===h;}}k&&o.filter(h,g,true);},">":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var l=0,q=g.length;l<q;l++){var p=g[l];if(p){k=p.parentNode;g[l]=k.nodeName.toLowerCase()===h?k:false;}}}else{l=0;for(q=g.length;l<q;l++){if(p=g[l]){g[l]=k?p.parentNode:p.parentNode===h;}}k&&o.filter(h,g,true);}},"":function(g,h,k){var l=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b;}q("parentNode",h,l,g,p,k);},"~":function(g,h,k){var l=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b;}q("previousSibling",h,l,g,p,k);}},find:{ID:function(g,h,k){if(typeof h.getElementById!=="undefined"&&!k){return(g=h.getElementById(g[1]))?[g]:[];}},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var k=[];h=h.getElementsByName(g[1]);for(var l=0,q=h.length;l<q;l++){h[l].getAttribute("name")===g[1]&&k.push(h[l]);}return k.length===0?null:k;}},TAG:function(g,h){return h.getElementsByTagName(g[1]);}},preFilter:{CLASS:function(g,h,k,l,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p){return g;}p=0;for(var u;(u=h[p])!=null;p++){if(u){if(q^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0)){k||l.push(u);}else{if(k){h[p]=false;}}}}return false;},ID:function(g){return g[1].replace(/\\/g,"");},TAG:function(g){return g[1].toLowerCase();},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0;}g[0]=e++;return g;},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h]){g[1]=m.attrMap[h];}if(g[2]==="~="){g[4]=" "+g[4]+" ";}return g;},PSEUDO:function(g,h,k,l,q){if(g[1]==="not"){if((f.exec(g[3])||"").length>1||/^\w/.test(g[3])){g[3]=o(g[3],null,null,h);}else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false;}}else{if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0])){return true;}}return g;},POS:function(g){g.unshift(true);return g;}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden";},disabled:function(g){return g.disabled===true;},checked:function(g){return g.checked===true;},selected:function(g){return g.selected===true;},parent:function(g){return !!g.firstChild;},empty:function(g){return !g.firstChild;},has:function(g,h,k){return !!o(k[3],g).length;},header:function(g){return/h\d/i.test(g.nodeName);},text:function(g){return"text"===g.type;},radio:function(g){return"radio"===g.type;},checkbox:function(g){return"checkbox"===g.type;},file:function(g){return"file"===g.type;},password:function(g){return"password"===g.type;},submit:function(g){return"submit"===g.type;},image:function(g){return"image"===g.type;},reset:function(g){return"reset"===g.type;},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button";},input:function(g){return/input|select|textarea|button/i.test(g.nodeName);}},setFilters:{first:function(g,h){return h===0;},last:function(g,h,k,l){return h===l.length-1;},even:function(g,h){return h%2===0;},odd:function(g,h){return h%2===1;},lt:function(g,h,k){return h<k[3]-0;},gt:function(g,h,k){return h>k[3]-0;},nth:function(g,h,k){return k[3]-0===h;},eq:function(g,h,k){return k[3]-0===h;}},filter:{PSEUDO:function(g,h,k,l){var q=h[1],p=m.filters[q];if(p){return p(g,k,h,l);}else{if(q==="contains"){return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;}else{if(q==="not"){h=h[3];k=0;for(l=h.length;k<l;k++){if(h[k]===g){return false;}}return true;}else{o.error("Syntax error, unrecognized expression: "+q);}}}},CHILD:function(g,h){var k=h[1],l=g;switch(k){case"only":case"first":for(;l=l.previousSibling;){if(l.nodeType===1){return false;}}if(k==="first"){return true;}l=g;case"last":for(;l=l.nextSibling;){if(l.nodeType===1){return false;}}return true;case"nth":k=h[2];var q=h[3];if(k===1&&q===0){return true;}h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var u=0;for(l=p.firstChild;l;l=l.nextSibling){if(l.nodeType===1){l.nodeIndex=++u;}}p.sizcache=h;}g=g.nodeIndex-q;return k===0?g===0:g%k===0&&g/k>=0;}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h;},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h;},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1;},ATTR:function(g,h){var k=h[1];g=m.attrHandle[k]?m.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var l=h[2];h=h[4];return g==null?l==="!=":l==="="?k===h:l==="*="?k.indexOf(h)>=0:l==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:l==="!="?k!==h:l==="^="?k.indexOf(h)===0:l==="$="?k.substr(k.length-h.length)===h:l==="|="?k===h||k.substr(0,h.length+1)===h+"-":false;},POS:function(g,h,k,l){var q=m.setFilters[h[2]];if(q){return q(g,k,h,l);}}}},s=m.match.POS;for(var x in m.match){m.match[x]=new RegExp(m.match[x].source+/(?![^\[]*\])(?![^\(]*\))/.source);m.leftMatch[x]=new RegExp(/(^(?:.|\r|\n)*?)/.source+m.match[x].source.replace(/\\(\d+)/g,function(g,h){return"\\"+(h-0+1);}));}var A=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h;}return g;};try{Array.prototype.slice.call(r.documentElement.childNodes,0);}catch(B){A=function(g,h){h=h||[];if(i.call(g)==="[object Array]"){Array.prototype.push.apply(h,g);}else{if(typeof g.length==="number"){for(var k=0,l=g.length;k<l;k++){h.push(g[k]);}}else{for(k=0;g[k];k++){h.push(g[k]);}}}return h;};}var C;if(r.documentElement.compareDocumentPosition){C=function(g,h){if(!g.compareDocumentPosition||!h.compareDocumentPosition){if(g==h){j=true;}return g.compareDocumentPosition?-1:1;}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0){j=true;}return g;};}else{if("sourceIndex" in r.documentElement){C=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h){j=true;}return g.sourceIndex?-1:1;}g=g.sourceIndex-h.sourceIndex;if(g===0){j=true;}return g;};}else{if(r.createRange){C=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h){j=true;}return g.ownerDocument?-1:1;}var k=g.ownerDocument.createRange(),l=h.ownerDocument.createRange();k.setStart(g,0);k.setEnd(g,0);l.setStart(h,0);l.setEnd(h,0);g=k.compareBoundaryPoints(Range.START_TO_END,l);if(g===0){j=true;}return g;};}}}(function(){var g=r.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var k=r.documentElement;k.insertBefore(g,k.firstChild);if(r.getElementById(h)){m.find.ID=function(l,q,p){if(typeof q.getElementById!=="undefined"&&!p){return(q=q.getElementById(l[1]))?q.id===l[1]||typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id").nodeValue===l[1]?[q]:v:[];}};m.filter.ID=function(l,q){var p=typeof l.getAttributeNode!=="undefined"&&l.getAttributeNode("id");return l.nodeType===1&&p&&p.nodeValue===q;};}k.removeChild(g);k=g=null;})();(function(){var g=r.createElement("div");g.appendChild(r.createComment(""));if(g.getElementsByTagName("*").length>0){m.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var l=0;k[l];l++){k[l].nodeType===1&&h.push(k[l]);}k=h;}return k;};}g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#"){m.attrHandle.href=function(h){return h.getAttribute("href",2);};}g=null;})();r.querySelectorAll&&function(){var g=o,h=r.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){o=function(l,q,p,u){q=q||r;if(!u&&q.nodeType===9&&!w(q)){try{return A(q.querySelectorAll(l),p);}catch(t){}}return g(l,q,p,u);};for(var k in g){o[k]=g[k];}h=null;}}();(function(){var g=r.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){m.order.splice(1,0,"CLASS");m.find.CLASS=function(h,k,l){if(typeof k.getElementsByClassName!=="undefined"&&!l){return k.getElementsByClassName(h[1]);}};g=null;}}})();var E=r.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16;}:function(g,h){return g!==h&&(g.contains?g.contains(h):true);},w=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false;},fa=function(g,h){var k=[],l="",q;for(h=h.nodeType?[h]:h;q=m.match.PSEUDO.exec(g);){l+=q[0];g=g.replace(m.match.PSEUDO,"");}g=m.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++){o(g,h[q],k);}return o.filter(l,k);};c.find=o;c.expr=o.selectors;c.expr[":"]=c.expr.filters;c.unique=o.uniqueSort;c.getText=a;c.isXMLDoc=w;c.contains=E;})();var bb=/Until$/,cb=/^(?:parents|prevUntil|prevAll)/,db=/,/;Q=Array.prototype.slice;var Ea=function(a,b,d){if(c.isFunction(b)){return c.grep(a,function(e,i){return !!b.call(e,i,e)===d;});}else{if(b.nodeType){return c.grep(a,function(e){return e===b===d;});}else{if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1;});if(Qa.test(b)){return c.filter(b,f,!d);}else{b=c.filter(b,f);}}}}return c.grep(a,function(e){return c.inArray(e,b)>=0===d;});};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;c.find(a,this[f],b);if(f>0){for(var i=d;i<b.length;i++){for(var j=0;j<d;j++){if(b[j]===b[i]){b.splice(i--,1);break;}}}}}return b;},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++){if(c.contains(this,b[d])){return true;}}});},not:function(a){return this.pushStack(Ea(this,a,false),"not",a);},filter:function(a){return this.pushStack(Ea(this,a,true),"filter",a);},is:function(a){return !!a&&c.filter(a,this).length>0;},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i={},j;if(f&&a.length){e=0;for(var n=a.length;e<n;e++){j=a[e];i[j]||(i[j]=c.expr.match.POS.test(j)?c(j,b||this.context):j);}for(;f&&f.ownerDocument&&f!==b;){for(j in i){e=i[j];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j];}}f=f.parentNode;}}return d;}var o=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(m,s){for(;s&&s.ownerDocument&&s!==b;){if(o?o.index(s)>-1:c(s).is(a)){return s;}s=s.parentNode;}return null;});},index:function(a){if(!a||typeof a==="string"){return c.inArray(this[0],a?c(a):this.parent().children());}return c.inArray(a.jquery?a[0]:a,this);},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(pa(a[0])||pa(b[0])?b:c.unique(b));},andSelf:function(){return this.add(this.prevObject);}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null;},parents:function(a){return c.dir(a,"parentNode");},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d);},next:function(a){return c.nth(a,2,"nextSibling");},prev:function(a){return c.nth(a,2,"previousSibling");},nextAll:function(a){return c.dir(a,"nextSibling");},prevAll:function(a){return c.dir(a,"previousSibling");},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d);},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d);},siblings:function(a){return c.sibling(a.parentNode.firstChild,a);},children:function(a){return c.sibling(a.firstChild);},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes);}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);bb.test(a)||(f=d);if(f&&typeof f==="string"){e=c.filter(f,e);}e=this.length>1?c.unique(e):e;if((this.length>1||db.test(f))&&cb.test(a)){e=e.reverse();}return this.pushStack(e,a,Q.call(arguments).join(","));};});c.extend({filter:function(a,b,d){if(d){a=":not("+a+")";}return c.find.matches(a,b);},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===v||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&f.push(a);a=a[b];}return f;},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d]){if(a.nodeType===1&&++f===b){break;}}return a;},sibling:function(a,b){for(var d=[];a;a=a.nextSibling){a.nodeType===1&&a!==b&&d.push(a);}return d;}});var Fa=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ga=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/<tbody/i,gb=/<|&\w+;/,sa=/checked\s*(?:[^=]|=\s*.checked.)/i,Ia=function(a,b,d){return eb.test(d)?a:b+"></"+d+">";},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize){F._default=[1,"div<div>","</div>"];}c.fn.extend({text:function(a){if(c.isFunction(a)){return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()));});}if(typeof a!=="object"&&a!==v){return this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a));}return c.getText(this);},wrapAll:function(a){if(c.isFunction(a)){return this.each(function(d){c(this).wrapAll(a.call(this,d));});}if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;){d=d.firstChild;}return d;}).append(this);}return this;},wrapInner:function(a){if(c.isFunction(a)){return this.each(function(b){c(this).wrapInner(a.call(this,b));});}return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a);});},wrap:function(a){return this.each(function(){c(this).wrapAll(a);});},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes);}).end();},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a);});},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild);});},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this);});}else{if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments);}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling);});}else{if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a;}}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML;}return c.clean([d.replace(Fa,"").replace(V,"")],f)[0];}else{return this.cloneNode(true);}});if(a===true){qa(this,b);qa(this.find("*"),b.find("*"));}return b;},html:function(a){if(a===v){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Fa,""):null;}else{if(typeof a==="string"&&!/<script/i.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(Ha.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ga,Ia);try{for(var b=0,d=this.length;b<d;b++){if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a;}}}catch(f){this.empty().append(a);}}else{c.isFunction(a)?this.each(function(e){var i=c(this),j=i.html();i.empty().append(function(){return a.call(this,e,j);});}):this.empty().append(a);}}return this;},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a)){return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f));});}else{a=c(a).detach();}return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a);});}else{return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a);}},detach:function(a){return this.remove(a,true);},domManip:function(a,b,d){function f(s){return c.nodeName(s,"table")?s.getElementsByTagName("tbody")[0]||s.appendChild(s.ownerDocument.createElement("tbody")):s;}var e,i,j=a[0],n=[];if(!c.support.checkClone&&arguments.length===3&&typeof j==="string"&&sa.test(j)){return this.each(function(){c(this).domManip(a,b,d,true);});}if(c.isFunction(j)){return this.each(function(s){var x=c(this);a[0]=j.call(this,s,b?x.html():v);x.domManip(a,b,d);});}if(this[0]){e=a[0]&&a[0].parentNode&&a[0].parentNode.nodeType===11?{fragment:a[0].parentNode}:ra(a,this,n);if(i=e.fragment.firstChild){b=b&&c.nodeName(i,"tr");for(var o=0,m=this.length;o<m;o++){d.call(b?f(this[o],i):this[o],e.cacheable||this.length>1||o>0?e.fragment.cloneNode(true):e.fragment);}}n&&c.each(n,Ma);}return this;}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);for(var e=0,i=d.length;e<i;e++){var j=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),j);f=f.concat(j);}return this.pushStack(f,a,d.selector);};});c.each({remove:function(a,b){if(!a||c.filter(a,[this]).length){if(!b&&this.nodeType===1){c.cleanData(this.getElementsByTagName("*"));c.cleanData([this]);}this.parentNode&&this.parentNode.removeChild(this);}},empty:function(){for(this.nodeType===1&&c.cleanData(this.getElementsByTagName("*"));this.firstChild;){this.removeChild(this.firstChild);}}},function(a,b){c.fn[a]=function(){return this.each(b,arguments);};});c.extend({clean:function(a,b,d,f){b=b||r;if(typeof b.createElement==="undefined"){b=b.ownerDocument||b[0]&&b[0].ownerDocument||r;}var e=[];c.each(a,function(i,j){if(typeof j==="number"){j+="";}if(j){if(typeof j==="string"&&!gb.test(j)){j=b.createTextNode(j);}else{if(typeof j==="string"){j=j.replace(Ga,Ia);var n=(Ha.exec(j)||["",""])[1].toLowerCase(),o=F[n]||F._default,m=o[0];i=b.createElement("div");for(i.innerHTML=o[1]+j+o[2];m--;){i=i.lastChild;}if(!c.support.tbody){m=fb.test(j);n=n==="table"&&!m?i.firstChild&&i.firstChild.childNodes:o[1]==="<table>"&&!m?i.childNodes:[];for(o=n.length-1;o>=0;--o){c.nodeName(n[o],"tbody")&&!n[o].childNodes.length&&n[o].parentNode.removeChild(n[o]);}}!c.support.leadingWhitespace&&V.test(j)&&i.insertBefore(b.createTextNode(V.exec(j)[0]),i.firstChild);j=c.makeArray(i.childNodes);}}if(j.nodeType){e.push(j);}else{e=c.merge(e,j);}}});if(d){for(a=0;e[a];a++){if(f&&c.nodeName(e[a],"script")&&(!e[a].type||e[a].type.toLowerCase()==="text/javascript")){f.push(e[a].parentNode?e[a].parentNode.removeChild(e[a]):e[a]);}else{e[a].nodeType===1&&e.splice.apply(e,[a+1,0].concat(c.makeArray(e[a].getElementsByTagName("script"))));d.appendChild(e[a]);}}}return e;},cleanData:function(a){for(var b=0,d;(d=a[b])!=null;b++){c.event.remove(d);c.removeData(d);}}});var hb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Ja=/alpha\([^)]*\)/,Ka=/opacity=([^)]*)/,ga=/float/i,ha=/-([a-z])/ig,ib=/([A-Z])/g,jb=/^-?\d+(?:px)?$/i,kb=/^-?\d/,lb={position:"absolute",visibility:"hidden",display:"block"},mb=["Left","Right"],nb=["Top","Bottom"],ob=r.defaultView&&r.defaultView.getComputedStyle,La=c.support.cssFloat?"cssFloat":"styleFloat",ia=function(a,b){return b.toUpperCase();};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===v){return c.curCSS(d,f);}if(typeof e==="number"&&!hb.test(f)){e+="px";}c.style(d,f,e);});};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8){return v;}if((b==="width"||b==="height")&&parseFloat(d)<0){d=v;}var f=a.style||a,e=d!==v;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=Ja.test(a)?a.replace(Ja,b):b;}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Ka.exec(f.filter)[1])/100+"":"";}if(ga.test(b)){b=La;}b=b.replace(ha,ia);if(e){f[b]=d;}return f[b];},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,i=b==="width"?mb:nb;function j(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(i,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin"){e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;}else{e-=parseFloat(c.curCSS(a,"border"+this+"Width",true))||0;}});}a.offsetWidth!==0?j():c.swap(a,lb,j);return Math.max(0,Math.round(e));}return c.curCSS(a,b,d);},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Ka.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f;}if(ga.test(b)){b=La;}if(!d&&e&&e[b]){f=e[b];}else{if(ob){if(ga.test(b)){b="float";}b=b.replace(ib,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e){return null;}if(a=e.getComputedStyle(a,null)){f=a.getPropertyValue(b);}if(b==="opacity"&&f===""){f="1";}}else{if(a.currentStyle){d=b.replace(ha,ia);f=a.currentStyle[b]||a.currentStyle[d];if(!jb.test(f)&&kb.test(f)){b=e.left;var i=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=i;}}}}return f;},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e];}d.call(a);for(e in b){a.style[e]=f[e];}}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none";};c.expr.filters.visible=function(a){return !c.expr.filters.hidden(a);};}var pb=J(),qb=/<script(.|\s)*?\/script>/gi,rb=/select|textarea/i,sb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ja=/\?/,tb=/(\?|&)_=.*?(&|$)/,ub=/^(\w+:)?\/\/([^\/?#]+)/,vb=/%20/g;c.fn.extend({_load:c.fn.load,load:function(a,b,d){if(typeof a!=="string"){return this._load(a);}else{if(!this.length){return this;}}var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f);}f="GET";if(b){if(c.isFunction(b)){d=b;b=null;}else{if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST";}}}var i=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(j,n){if(n==="success"||n==="notmodified"){i.html(e?c("<div />").append(j.responseText.replace(qb,"")).find(e):j.responseText);}d&&i.each(d,[j.responseText,n,j]);}});return this;},serialize:function(){return c.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||rb.test(this.nodeName)||sb.test(this.type));}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d};}):{name:b.name,value:a};}).get();}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d);};});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null;}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f});},getScript:function(a,b){return c.get(a,null,b,"script");},getJSON:function(a,b,d){return c.get(a,b,d,"json");},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={};}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f});},ajaxSetup:function(a){c.extend(c.ajaxSettings,a);},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:z.XMLHttpRequest&&(z.location.protocol!=="file:"||!z.ActiveXObject)?function(){return new z.XMLHttpRequest;}:function(){try{return new z.ActiveXObject("Microsoft.XMLHTTP");}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(o,n,j,w);e.global&&f("ajaxSuccess",[w,e]);}function d(){e.complete&&e.complete.call(o,w,j);e.global&&f("ajaxComplete",[w,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop");}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p);}var e=c.extend(true,{},c.ajaxSettings,a),i,j,n,o=a&&a.context||e,m=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string"){e.data=c.param(e.data,e.traditional);}if(e.dataType==="jsonp"){if(m==="GET"){N.test(e.url)||(e.url+=(ja.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");}else{if(!e.data||!N.test(e.data)){e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";}}e.dataType="json";}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){i=e.jsonpCallback||"jsonp"+pb++;if(e.data){e.data=(e.data+"").replace(N,"="+i+"$1");}e.url=e.url.replace(N,"="+i+"$1");e.dataType="script";z[i]=z[i]||function(q){n=q;b();d();z[i]=v;try{delete z[i];}catch(p){}A&&A.removeChild(B);};}if(e.dataType==="script"&&e.cache===null){e.cache=false;}if(e.cache===false&&m==="GET"){var s=J(),x=e.url.replace(tb,"$1_="+s+"$2");e.url=x+(x===e.url?(ja.test(e.url)?"&":"?")+"_="+s:"");}if(e.data&&m==="GET"){e.url+=(ja.test(e.url)?"&":"?")+e.data;}e.global&&!c.active++&&c.event.trigger("ajaxStart");s=(s=ub.exec(e.url))&&(s[1]&&s[1]!==location.protocol||s[2]!==location.host);if(e.dataType==="script"&&m==="GET"&&s){var A=r.getElementsByTagName("head")[0]||r.documentElement,B=r.createElement("script");B.src=e.url;if(e.scriptCharset){B.charset=e.scriptCharset;}if(!i){var C=false;B.onload=B.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;b();d();B.onload=B.onreadystatechange=null;A&&B.parentNode&&A.removeChild(B);}};}A.insertBefore(B,A.firstChild);return v;}var E=false,w=e.xhr();if(w){e.username?w.open(m,e.url,e.async,e.username,e.password):w.open(m,e.url,e.async);try{if(e.data||a&&a.contentType){w.setRequestHeader("Content-Type",e.contentType);}if(e.ifModified){c.lastModified[e.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&w.setRequestHeader("If-None-Match",c.etag[e.url]);}s||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default);}catch(fa){}if(e.beforeSend&&e.beforeSend.call(o,w,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");w.abort();return false;}e.global&&f("ajaxSend",[w,e]);var g=w.onreadystatechange=function(q){if(!w||w.readyState===0||q==="abort"){E||d();E=true;if(w){w.onreadystatechange=c.noop;}}else{if(!E&&w&&(w.readyState===4||q==="timeout")){E=true;w.onreadystatechange=c.noop;j=q==="timeout"?"timeout":!c.httpSuccess(w)?"error":e.ifModified&&c.httpNotModified(w,e.url)?"notmodified":"success";var p;if(j==="success"){try{n=c.httpData(w,e.dataType,e);}catch(u){j="parsererror";p=u;}}if(j==="success"||j==="notmodified"){i||b();}else{c.handleError(e,w,j,p);}d();q==="timeout"&&w.abort();if(e.async){w=null;}}}};try{var h=w.abort;w.abort=function(){w&&h.call(w);g("abort");};}catch(k){}e.async&&e.timeout>0&&setTimeout(function(){w&&!E&&g("timeout");},e.timeout);try{w.send(m==="POST"||m==="PUT"||m==="DELETE"?e.data:null);}catch(l){c.handleError(e,w,null,l);d();}e.async||g();return w;}},handleError:function(a,b,d,f){if(a.error){a.error.call(a.context||a,b,d,f);}if(a.global){(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f]);}},active:0,httpSuccess:function(a){try{return !a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0;}catch(b){}return false;},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d){c.lastModified[b]=d;}if(f){c.etag[b]=f;}return a.status===304||a.status===0;},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter){a=d.dataFilter(a,b);}if(typeof a==="string"){if(b==="json"||!b&&f.indexOf("json")>=0){a=c.parseJSON(a);}else{if(b==="script"||!b&&f.indexOf("javascript")>=0){c.globalEval(a);}}}return a;},param:function(a,b){function d(j,n){if(c.isArray(n)){c.each(n,function(o,m){b?f(j,m):d(j+"["+(typeof m==="object"||c.isArray(m)?o:"")+"]",m);});}else{!b&&n!=null&&typeof n==="object"?c.each(n,function(o,m){d(j+"["+o+"]",m);}):f(j,n);}}function f(j,n){n=c.isFunction(n)?n():n;e[e.length]=encodeURIComponent(j)+"="+encodeURIComponent(n);}var e=[];if(b===v){b=c.ajaxSettings.traditional;}if(c.isArray(a)||a.jquery){c.each(a,function(){f(this.name,this.value);});}else{for(var i in a){d(i,a[i]);}}return e.join("&").replace(vb,"+");}});var ka={},wb=/toggle|show|hide/,xb=/^([+-]=)?([\d+-.]+)(.*)$/,W,ta=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0){return this.animate(K("show",3),a,b);}else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(ka[d]){f=ka[d];}else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none"){f="block";}e.remove();ka[d]=f;}c.data(this[a],"olddisplay",f);}}a=0;for(b=this.length;a<b;a++){this[a].style.display=c.data(this[a],"olddisplay")||"";}return this;}},hide:function(a,b){if(a||a===0){return this.animate(K("hide",3),a,b);}else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],"olddisplay",c.css(this[a],"display"));}a=0;for(b=this.length;a<b;a++){this[a].style.display="none";}return this;}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b)){this._toggle.apply(this,arguments);}else{a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]();}):this.animate(K("toggle",3),a,b);}return this;},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d);},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a)){return this.each(e.complete);}return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,n=this.nodeType===1&&c(this).is(":hidden"),o=this;for(j in a){var m=j.replace(ha,ia);if(j!==m){a[m]=a[j];delete a[j];j=m;}if(a[j]==="hide"&&n||a[j]==="show"&&!n){return i.complete.call(this);}if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow;}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0];}}if(i.overflow!=null){this.style.overflow="hidden";}i.curAnim=c.extend({},a);c.each(a,function(s,x){var A=new c.fx(o,i,s);if(wb.test(x)){A[x==="toggle"?n?"show":"hide":x](a);}else{var B=xb.exec(x),C=A.cur(true)||0;if(B){x=parseFloat(B[2]);var E=B[3]||"px";if(E!=="px"){o.style[s]=(x||1)+E;C=(x||1)/A.cur(true)*C;o.style[s]=C+E;}if(B[1]){x=(B[1]==="-="?-1:1)*x+C;}A.custom(C,x,E);}else{A.custom(C,x,"");}}});return true;});},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--){if(d[f].elem===this){b&&d[f](true);d.splice(f,1);}}});b||this.dequeue();return this;}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f);};});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this);};return f;},easing:{linear:function(a,b,d,f){return d+f*a;},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d;}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig){b.orig={};}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style){this.elem.style.display="block";}},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop];}return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0;},custom:function(a,b,d){function f(i){return e.step(i);}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W){W=setInterval(c.fx.tick,13);}},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show();},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim){if(this.options.curAnim[f]!==true){d=false;}}if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none"){this.elem.style.display="block";}}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show){for(var e in this.options.curAnim){c.style(this.elem,e,this.options.orig[e]);}}this.options.complete.call(this.elem);}return false;}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update();}return true;}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++){a[b]()||a.splice(b--,1);}a.length||c.fx.stop();},stop:function(){clearInterval(W);W=null;},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now);},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null){a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;}else{a.elem[a.prop]=a.now;}}}});if(c.expr&&c.expr.filters){c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem;}).length;};}c.fn.offset="getBoundingClientRect" in r.documentElement?function(a){var b=this[0];if(a){return this.each(function(e){c.offset.setOffset(this,a,e);});}if(!b||!b.ownerDocument){return null;}if(b===b.ownerDocument.body){return c.offset.bodyOffset(b);}var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)};}:function(a){var b=this[0];if(a){return this.each(function(s){c.offset.setOffset(this,a,s);});}if(!b||!b.ownerDocument){return null;}if(b===b.ownerDocument.body){return c.offset.bodyOffset(b);}c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,i,j=e.documentElement,n=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var o=b.offsetTop,m=b.offsetLeft;(b=b.parentNode)&&b!==n&&b!==j;){if(c.offset.supportsFixedPosition&&f.position==="fixed"){break;}i=e?e.getComputedStyle(b,null):b.currentStyle;o-=b.scrollTop;m-=b.scrollLeft;if(b===d){o+=b.offsetTop;m+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){o+=parseFloat(i.borderTopWidth)||0;m+=parseFloat(i.borderLeftWidth)||0;}f=d;d=b.offsetParent;}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){o+=parseFloat(i.borderTopWidth)||0;m+=parseFloat(i.borderLeftWidth)||0;}f=i;}if(f.position==="relative"||f.position==="static"){o+=n.offsetTop;m+=n.offsetLeft;}if(c.offset.supportsFixedPosition&&f.position==="fixed"){o+=Math.max(j.scrollTop,n.scrollTop);m+=Math.max(j.scrollLeft,n.scrollLeft);}return{top:o,left:m};};c.offset={initialize:function(){var a=r.body,b=r.createElement("div"),d,f,e,i=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i;a.removeChild(b);c.offset.initialize=c.noop;},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0;}return{top:b,left:d};},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position"))){a.style.position="relative";}var f=c(a),e=f.offset(),i=parseInt(c.curCSS(a,"top",true),10)||0,j=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b)){b=b.call(a,d,e);}d={top:b.top-e.top+i,left:b.left-e.left+j};"using" in b?b.using.call(a,d):f.css(d);}};c.fn.extend({position:function(){if(!this[0]){return null;}var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left};},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||r.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";){a=a.offsetParent;}return a;});}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e){return null;}if(f!==v){return this.each(function(){if(i=ua(this)){i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());}else{this[d]=f;}});}else{return(i=ua(e))?"pageXOffset" in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d];}};});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null;};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null;};c.fn[d]=function(f){var e=this[0];if(!e){return f==null?null:this;}if(c.isFunction(f)){return this.each(function(i){var j=c(this);j[d](f.call(this,i,j[d]()));});}return"scrollTo" in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===v?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px");};});z.jQuery=z.$=c;})(window);(function($){var $cluetip,$cluetipInner,$cluetipOuter,$cluetipTitle,$cluetipArrows,$dropShadow,imgCount;$.fn.cluetip=function(options){var opts=$.extend({},$.fn.cluetip.defaults,options);if(options&&options.ajaxSettings){$.extend(opts.ajaxSettings,options.ajaxSettings);delete options.ajaxSettings;}if(options&&options.hoverIntent){$.extend(opts.hoverIntent,options.hoverIntent);delete options.hoverIntent;}if(options&&options.fx){$.extend(opts.fx,options.fx);delete options.fx;}return this.each(function(index){var cluetipContents=false;var cluezIndex=parseInt(opts.cluezIndex,10)-1;var isActive=false,closeOnDelay=0;if(!$cluetip){$cluetipInner=$('<div id="cluetip-inner"></div>');$cluetipTitle=$('<h3 id="cluetip-title"></h3>');$cluetipOuter=$('<div id="cluetip-outer"></div>').append($cluetipInner).prepend($cluetipTitle);$cluetip=$('<div id="cluetip"></div>').css({zIndex:opts.cluezIndex}).append($cluetipOuter).append('<div id="cluetip-extra"></div>')[insertionType](insertionElement).hide();$('<div id="cluetip-waitimage"></div>').css({position:"absolute",zIndex:cluezIndex-1}).insertBefore("#cluetip").hide();$cluetip.css({position:"absolute",zIndex:cluezIndex});$cluetipOuter.css({position:"relative",zIndex:cluezIndex+1});$cluetipArrows=$('<div id="cluetip-arrows" class="cluetip-arrows"></div>').css({zIndex:cluezIndex+1}).appendTo("#cluetip");}var dropShadowSteps=(opts.dropShadow)?+opts.dropShadowSteps:0;if(!$dropShadow){$dropShadow=$([]);for(var i=0;i<dropShadowSteps;i++){$dropShadow=$dropShadow.add($("<div></div>").css({zIndex:cluezIndex-i-1,opacity:0.1,top:1+i,left:1+i}));}$dropShadow.css({position:"absolute",backgroundColor:"#000"}).prependTo($cluetip);}var $this=$(this);var tipAttribute=$this.attr(opts.attribute),ctClass=opts.cluetipClass;if(!tipAttribute&&!opts.splitTitle){return true;}if(opts.local&&opts.hideLocal){$(tipAttribute+":first").hide();}var tOffset=parseInt(opts.topOffset,10),lOffset=parseInt(opts.leftOffset,10);var tipHeight,wHeight;var defHeight=isNaN(parseInt(opts.height,10))?"auto":(/\D/g).test(opts.height)?opts.height:opts.height+"px";var sTop,linkTop,posY,tipY,mouseY,baseline;var tipInnerWidth=isNaN(parseInt(opts.width,10))?275:parseInt(opts.width,10);var tipWidth=tipInnerWidth+(parseInt($cluetip.css("paddingLeft"))||0)+(parseInt($cluetip.css("paddingRight"))||0)+dropShadowSteps;var linkWidth=this.offsetWidth;var linkLeft,posX,tipX,mouseX,winWidth;var tipParts;var tipTitle=(opts.attribute!="title")?$this.attr(opts.titleAttribute):"";if(opts.splitTitle){if(tipTitle==undefined){tipTitle="";}tipParts=tipTitle.split(opts.splitTitle);tipTitle=tipParts.shift();}var localContent;var activate=function(event){if(!opts.onActivate($this)){return false;}isActive=true;$cluetip.removeClass().css({width:tipInnerWidth});if(tipAttribute==$this.attr("href")){$this.css("cursor",opts.cursor);}$this.attr("title","");if(opts.hoverClass){$this.addClass(opts.hoverClass);}linkTop=posY=$this.offset().top;linkLeft=$this.offset().left;mouseX=event.pageX;mouseY=event.pageY;if($this[0].tagName.toLowerCase()!="area"){sTop=$(document).scrollTop();winWidth=$(window).width();}if(opts.positionBy=="fixed"){posX=linkWidth+linkLeft+lOffset;$cluetip.css({left:posX});}else{posX=(linkWidth>linkLeft&&linkLeft>tipWidth)||linkLeft+linkWidth+tipWidth+lOffset>winWidth?linkLeft-tipWidth-lOffset:linkWidth+linkLeft+lOffset;if($this[0].tagName.toLowerCase()=="area"||opts.positionBy=="mouse"||linkWidth+tipWidth>winWidth){if(mouseX+20+tipWidth>winWidth){$cluetip.addClass(" cluetip-"+ctClass);posX=(mouseX-tipWidth-lOffset)>=0?mouseX-tipWidth-lOffset-parseInt($cluetip.css("marginLeft"),10)+parseInt($cluetipInner.css("marginRight"),10):mouseX-(tipWidth/2);}else{posX=mouseX+lOffset;}}var pY=posX<0?event.pageY+tOffset:event.pageY;$cluetip.css({left:(posX>0&&opts.positionBy!="bottomTop")?posX:(mouseX+(tipWidth/2)>winWidth)?winWidth/2-tipWidth/2:Math.max(mouseX-(tipWidth/2),0)});}wHeight=$(window).height();if(tipParts){var tpl=tipParts.length;for(var i=0;i<tpl;i++){if(i==0){$cluetipInner.html(tipParts[i]);}else{$cluetipInner.append('<div class="split-body">'+tipParts[i]+"</div>");}}cluetipShow(pY);}else{if(!opts.local&&tipAttribute.indexOf("#")!=0){if(cluetipContents&&opts.ajaxCache){$cluetipInner.html(cluetipContents);cluetipShow(pY);}else{var ajaxSettings=opts.ajaxSettings;ajaxSettings.url=tipAttribute;ajaxSettings.beforeSend=function(){$cluetipOuter.children().empty();if(opts.waitImage){$("#cluetip-waitimage").css({top:mouseY+20,left:mouseX+20}).show();}};ajaxSettings.error=function(){if(isActive){$cluetipInner.html("<i>sorry, the contents could not be loaded</i>");}};ajaxSettings.success=function(data){cluetipContents=opts.ajaxProcess(data);if(isActive){$cluetipInner.html(cluetipContents);}};ajaxSettings.complete=function(){imgCount=$("#cluetip-inner img").length;if(imgCount){$("#cluetip-inner img").load(function(){imgCount--;if(imgCount<1){$("#cluetip-waitimage").hide();if(isActive){cluetipShow(pY);}}});}else{$("#cluetip-waitimage").hide();if(isActive){cluetipShow(pY);}}};$.ajax(ajaxSettings);}}else{if(opts.local){var $localContent=$(tipAttribute+":first");var localCluetip=$.fn.wrapInner?$localContent.wrapInner("<div></div>").children().clone(true):$localContent.html();$.fn.wrapInner?$cluetipInner.empty().append(localCluetip):$cluetipInner.html(localCluetip);cluetipShow(pY);}}}};var cluetipShow=function(bpY){$cluetip.addClass("cluetip-"+ctClass);if(opts.truncate){var $truncloaded=$cluetipInner.text().slice(0,opts.truncate)+"...";$cluetipInner.html($truncloaded);}function doNothing(){}tipTitle?$cluetipTitle.show().html(tipTitle):(opts.showTitle)?$cluetipTitle.show().html("&nbsp;"):$cluetipTitle.hide();if(opts.sticky){var $closeLink=$('<div id="cluetip-close"><a href="#">'+opts.closeText+"</a></div>");(opts.closePosition=="bottom")?$closeLink.appendTo($cluetipInner):(opts.closePosition=="title")?$closeLink.prependTo($cluetipTitle):$closeLink.prependTo($cluetipInner);$closeLink.click(function(){cluetipClose();return false;});if(opts.mouseOutClose){if($.fn.hoverIntent&&opts.hoverIntent){$cluetip.hoverIntent({over:doNothing,timeout:opts.hoverIntent.timeout,out:function(){$closeLink.trigger("click");}});}else{$cluetip.hover(doNothing,function(){$closeLink.trigger("click");});}}else{$cluetip.unbind("mouseout");}}var direction="";$cluetipOuter.css({overflow:defHeight=="auto"?"visible":"auto",height:defHeight});tipHeight=defHeight=="auto"?$cluetip.outerHeight():parseInt(defHeight,10);tipY=posY;baseline=sTop+wHeight;if(opts.positionBy=="fixed"){tipY=posY-opts.dropShadowSteps+tOffset;}else{if((posX<mouseX&&Math.max(posX,0)+tipWidth>mouseX)||opts.positionBy=="bottomTop"){if(posY+tipHeight+tOffset>baseline&&mouseY-sTop>tipHeight+tOffset){tipY=mouseY-tipHeight-tOffset;direction="top";}else{tipY=mouseY+tOffset;direction="bottom";}}else{if(posY+tipHeight+tOffset>baseline){tipY=(tipHeight>=wHeight)?sTop:baseline-tipHeight-tOffset;}else{if($this.css("display")=="block"||$this[0].tagName.toLowerCase()=="area"||opts.positionBy=="mouse"){tipY=bpY-tOffset;}else{tipY=posY-opts.dropShadowSteps;}}}}if(direction==""){posX<linkLeft?direction="left":direction="right";}$cluetip.css({top:tipY+"px"}).removeClass().addClass("clue-"+direction+"-"+ctClass).addClass(" cluetip-"+ctClass);if(opts.arrows){var bgY=(posY-tipY-opts.dropShadowSteps);$cluetipArrows.css({top:(/(left|right)/.test(direction)&&posX>=0&&bgY>0)?bgY+"px":/(left|right)/.test(direction)?0:""}).show();}else{$cluetipArrows.hide();}$dropShadow.hide();$cluetip.hide()[opts.fx.open](opts.fx.open!="show"&&opts.fx.openSpeed);if(opts.dropShadow){$dropShadow.css({height:tipHeight,width:tipInnerWidth}).show();}if($.fn.bgiframe){$cluetip.bgiframe();}if(opts.delayedClose>0){closeOnDelay=setTimeout(cluetipClose,opts.delayedClose);}opts.onShow($cluetip,$cluetipInner);};var inactivate=function(){isActive=false;$("#cluetip-waitimage").hide();if(!opts.sticky||(/click|toggle/).test(opts.activation)){cluetipClose();clearTimeout(closeOnDelay);}if(opts.hoverClass){$this.removeClass(opts.hoverClass);}$(".cluetip-clicked").removeClass("cluetip-clicked");};var cluetipClose=function(){$cluetipOuter.parent().hide().removeClass().end().children().empty();if(tipTitle){$this.attr("title",tipTitle);}$this.css("cursor","");if(opts.arrows){$cluetipArrows.css({top:""});}};if((/click|toggle/).test(opts.activation)){$this.click(function(event){if($cluetip.is(":hidden")||!$this.is(".cluetip-clicked")){activate(event);$(".cluetip-clicked").removeClass("cluetip-clicked");$this.addClass("cluetip-clicked");}else{inactivate(event);}this.blur();return false;});}else{if(opts.activation=="focus"){$this.focus(function(event){activate(event);});$this.blur(function(event){inactivate(event);});}else{$this.click(function(){if($this.attr("href")&&$this.attr("href")==tipAttribute&&!opts.clickThrough){return false;}});var mouseTracks=function(evt){if(opts.tracking==true){var trackX=posX-evt.pageX;var trackY=tipY?tipY-evt.pageY:posY-evt.pageY;$this.mousemove(function(evt){$cluetip.css({left:evt.pageX+trackX,top:evt.pageY+trackY});});}};if($.fn.hoverIntent&&opts.hoverIntent){$this.mouseover(function(){$this.attr("title","");}).hoverIntent({sensitivity:opts.hoverIntent.sensitivity,interval:opts.hoverIntent.interval,over:function(event){activate(event);mouseTracks(event);},timeout:opts.hoverIntent.timeout,out:function(event){inactivate(event);$this.unbind("mousemove");}});}else{$this.hover(function(event){activate(event);mouseTracks(event);},function(event){inactivate(event);$this.unbind("mousemove");});}}}});};$.fn.cluetip.defaults={width:275,height:"auto",cluezIndex:97,positionBy:"auto",topOffset:15,leftOffset:15,local:false,hideLocal:true,attribute:"rel",titleAttribute:"title",splitTitle:"",showTitle:true,cluetipClass:"default",hoverClass:"",waitImage:true,cursor:"help",arrows:false,dropShadow:true,dropShadowSteps:6,sticky:false,mouseOutClose:false,activation:"hover",clickThrough:false,tracking:false,delayedClose:0,closePosition:"top",closeText:"Close",truncate:0,fx:{open:"show",openSpeed:""},hoverIntent:{sensitivity:3,interval:50,timeout:0},onActivate:function(e){return true;},onShow:function(ct,c){},ajaxCache:true,ajaxProcess:function(data){data=data.replace(/<s(cript|tyle)(.|\s)*?\/s(cript|tyle)>/g,"").replace(/<(link|title)(.|\s)*?\/(link|title)>/g,"");return data;},ajaxSettings:{dataType:"html"}};var insertionType="appendTo",insertionElement="body";$.cluetip={};$.cluetip.setup=function(options){if(options&&options.insertionType&&(options.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)){insertionType=options.insertionType;}if(options&&options.insertionElement){insertionElement=options.insertionElement;}};})(jQuery);(function($){var height=$.fn.height,width=$.fn.width;$.fn.extend({height:function(){if(!this[0]){error();}if(this[0]==window){if($.browser.opera||($.browser.safari&&parseInt($.browser.version)>520)){return self.innerHeight-(($(document).height()>self.innerHeight)?getScrollbarWidth():0);}else{if($.browser.safari){return self.innerHeight;}else{return $.boxModel&&document.documentElement.clientHeight||document.body.clientHeight;}}}if(this[0]==document){return Math.max(($.boxModel&&document.documentElement.scrollHeight||document.body.scrollHeight),document.body.offsetHeight);}return height.apply(this,arguments);},width:function(){if(!this[0]){error();}if(this[0]==window){if($.browser.opera||($.browser.safari&&parseInt($.browser.version)>520)){return self.innerWidth-(($(document).width()>self.innerWidth)?getScrollbarWidth():0);}else{if($.browser.safari){return self.innerWidth;}else{return $.boxModel&&document.documentElement.clientWidth||document.body.clientWidth;}}}if(this[0]==document){if($.browser.mozilla){var scrollLeft=self.pageXOffset;self.scrollTo(99999999,self.pageYOffset);var scrollWidth=self.pageXOffset;self.scrollTo(scrollLeft,self.pageYOffset);return document.body.offsetWidth+scrollWidth;}else{return Math.max((($.boxModel&&!$.browser.safari)&&document.documentElement.scrollWidth||document.body.scrollWidth),document.body.offsetWidth);}}return width.apply(this,arguments);},innerHeight:function(){if(!this[0]){error();}return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight-num(this,"borderTopWidth")-num(this,"borderBottomWidth"):this.height()+num(this,"paddingTop")+num(this,"paddingBottom");},innerWidth:function(){if(!this[0]){error();}return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth-num(this,"borderLeftWidth")-num(this,"borderRightWidth"):this.width()+num(this,"paddingLeft")+num(this,"paddingRight");},outerHeight:function(options){if(!this[0]){error();}options=$.extend({margin:false},options||{});return this[0]==window||this[0]==document?this.height():this.is(":visible")?this[0].offsetHeight+(options.margin?(num(this,"marginTop")+num(this,"marginBottom")):0):this.height()+num(this,"borderTopWidth")+num(this,"borderBottomWidth")+num(this,"paddingTop")+num(this,"paddingBottom")+(options.margin?(num(this,"marginTop")+num(this,"marginBottom")):0);},outerWidth:function(options){if(!this[0]){error();}options=$.extend({margin:false},options||{});return this[0]==window||this[0]==document?this.width():this.is(":visible")?this[0].offsetWidth+(options.margin?(num(this,"marginLeft")+num(this,"marginRight")):0):this.width()+num(this,"borderLeftWidth")+num(this,"borderRightWidth")+num(this,"paddingLeft")+num(this,"paddingRight")+(options.margin?(num(this,"marginLeft")+num(this,"marginRight")):0);},scrollLeft:function(val){if(!this[0]){error();}if(val!=undefined){return this.each(function(){if(this==window||this==document){window.scrollTo(val,$(window).scrollTop());}else{this.scrollLeft=val;}});}if(this[0]==window||this[0]==document){return self.pageXOffset||$.boxModel&&document.documentElement.scrollLeft||document.body.scrollLeft;}return this[0].scrollLeft;},scrollTop:function(val){if(!this[0]){error();}if(val!=undefined){return this.each(function(){if(this==window||this==document){window.scrollTo($(window).scrollLeft(),val);}else{this.scrollTop=val;}});}if(this[0]==window||this[0]==document){return self.pageYOffset||$.boxModel&&document.documentElement.scrollTop||document.body.scrollTop;}return this[0].scrollTop;},position:function(returnObject){return this.offset({margin:false,scroll:false,relativeTo:this.offsetParent()},returnObject);},offset:function(options,returnObject){if(!this[0]){error();}var x=0,y=0,sl=0,st=0,elem=this[0],parent=this[0],op,parPos,elemPos=$.css(elem,"position"),mo=$.browser.mozilla,ie=$.browser.msie,oa=$.browser.opera,sf=$.browser.safari,sf3=$.browser.safari&&parseInt($.browser.version)>520,absparent=false,relparent=false,options=$.extend({margin:true,border:false,padding:false,scroll:true,lite:false,relativeTo:document.body},options||{});if(options.lite){return this.offsetLite(options,returnObject);}if(options.relativeTo.jquery){options.relativeTo=options.relativeTo[0];}if(elem.tagName=="BODY"){x=elem.offsetLeft;y=elem.offsetTop;if(mo){x+=num(elem,"marginLeft")+(num(elem,"borderLeftWidth")*2);y+=num(elem,"marginTop")+(num(elem,"borderTopWidth")*2);}else{if(oa){x+=num(elem,"marginLeft");y+=num(elem,"marginTop");}else{if((ie&&jQuery.boxModel)){x+=num(elem,"borderLeftWidth");y+=num(elem,"borderTopWidth");}else{if(sf3){x+=num(elem,"marginLeft")+num(elem,"borderLeftWidth");y+=num(elem,"marginTop")+num(elem,"borderTopWidth");}}}}}else{do{parPos=$.css(parent,"position");x+=parent.offsetLeft;y+=parent.offsetTop;if((mo&&!parent.tagName.match(/^t[d|h]$/i))||ie||sf3){x+=num(parent,"borderLeftWidth");y+=num(parent,"borderTopWidth");if(mo&&parPos=="absolute"){absparent=true;}if(ie&&parPos=="relative"){relparent=true;}}op=parent.offsetParent||document.body;if(options.scroll||mo){do{if(options.scroll){sl+=parent.scrollLeft;st+=parent.scrollTop;}if(oa&&($.css(parent,"display")||"").match(/table-row|inline/)){sl=sl-((parent.scrollLeft==parent.offsetLeft)?parent.scrollLeft:0);st=st-((parent.scrollTop==parent.offsetTop)?parent.scrollTop:0);}if(mo&&parent!=elem&&$.css(parent,"overflow")!="visible"){x+=num(parent,"borderLeftWidth");y+=num(parent,"borderTopWidth");}parent=parent.parentNode;}while(parent!=op);}parent=op;if(parent==options.relativeTo&&!(parent.tagName=="BODY"||parent.tagName=="HTML")){if(mo&&parent!=elem&&$.css(parent,"overflow")!="visible"){x+=num(parent,"borderLeftWidth");y+=num(parent,"borderTopWidth");}if(((sf&&!sf3)||oa)&&parPos!="static"){x-=num(op,"borderLeftWidth");y-=num(op,"borderTopWidth");}break;}if(parent.tagName=="BODY"||parent.tagName=="HTML"){if(((sf&&!sf3)||(ie&&$.boxModel))&&elemPos!="absolute"&&elemPos!="fixed"){x+=num(parent,"marginLeft");y+=num(parent,"marginTop");}if(sf3||(mo&&!absparent&&elemPos!="fixed")||(ie&&elemPos=="static"&&!relparent)){x+=num(parent,"borderLeftWidth");y+=num(parent,"borderTopWidth");}break;}}while(parent);}var returnValue=handleOffsetReturn(elem,options,x,y,sl,st);if(returnObject){$.extend(returnObject,returnValue);return this;}else{return returnValue;}},offsetLite:function(options,returnObject){if(!this[0]){error();}var x=0,y=0,sl=0,st=0,parent=this[0],offsetParent,options=$.extend({margin:true,border:false,padding:false,scroll:true,relativeTo:document.body},options||{});if(options.relativeTo.jquery){options.relativeTo=options.relativeTo[0];}do{x+=parent.offsetLeft;y+=parent.offsetTop;offsetParent=parent.offsetParent||document.body;if(options.scroll){do{sl+=parent.scrollLeft;st+=parent.scrollTop;parent=parent.parentNode;}while(parent!=offsetParent);}parent=offsetParent;}while(parent&&parent.tagName!="BODY"&&parent.tagName!="HTML"&&parent!=options.relativeTo);var returnValue=handleOffsetReturn(this[0],options,x,y,sl,st);if(returnObject){$.extend(returnObject,returnValue);return this;}else{return returnValue;}},offsetParent:function(){if(!this[0]){error();}var offsetParent=this[0].offsetParent;while(offsetParent&&(offsetParent.tagName!="BODY"&&$.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent;}return $(offsetParent);}});var error=function(){throw"Dimensions: jQuery collection is empty";};var num=function(el,prop){return parseInt($.css(el.jquery?el[0]:el,prop))||0;};var handleOffsetReturn=function(elem,options,x,y,sl,st){if(!options.margin){x-=num(elem,"marginLeft");y-=num(elem,"marginTop");}if(options.border&&(($.browser.safari&&parseInt($.browser.version)<520)||$.browser.opera)){x+=num(elem,"borderLeftWidth");y+=num(elem,"borderTopWidth");}else{if(!options.border&&!(($.browser.safari&&parseInt($.browser.version)<520)||$.browser.opera)){x-=num(elem,"borderLeftWidth");y-=num(elem,"borderTopWidth");}}if(options.padding){x+=num(elem,"paddingLeft");y+=num(elem,"paddingTop");}if(options.scroll&&(!$.browser.opera||elem.offsetLeft!=elem.scrollLeft&&elem.offsetTop!=elem.scrollLeft)){sl-=elem.scrollLeft;st-=elem.scrollTop;}return options.scroll?{top:y-st,left:x-sl,scrollTop:st,scrollLeft:sl}:{top:y,left:x};};var scrollbarWidth=0;var getScrollbarWidth=function(){if(!scrollbarWidth){var testEl=$("<div>").css({width:100,height:100,overflow:"auto",position:"absolute",top:-1000,left:-1000}).appendTo("body");scrollbarWidth=100-testEl.append("<div>").find("div").css({width:"100%",height:200}).width();testEl.remove();}return scrollbarWidth;};})(jQuery);(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);(function($){$.facebox=function(data,klass){$.facebox.init();$.facebox.loading();$.isFunction(data)?data.call($):$.facebox.reveal(data,klass);};$.facebox.settings={loading_image:"img/jquery/facebox/loading.gif",close_image:"img/jquery/facebox/closelabel.gif",image_types:["png","jpg","jpeg","gif"],facebox_html:'  <div id="facebox" style="display:none;">     <div class="popup">       <table>         <tbody>           <tr>             <td class="tl"/><td class="b"/><td class="tr"/>           </tr>           <tr>             <td class="b"/>             <td class="body">               <div class="content">               </div>               <div class="footer">                 <a href="#" class="close">                   <img src="img/jquery/facebox/closelabel.gif" title="close" class="close_image" />                 </a>               </div>             </td>             <td class="b"/>           </tr>           <tr>             <td class="bl"/><td class="b"/><td class="br"/>           </tr>         </tbody>       </table>     </div>   </div>'};$.facebox.loading=function(){if($("#facebox .loading").length==1){return true;}$("#facebox .content").empty();$("#facebox .body").children().hide().end().append('<div class="loading"><img src="'+$.facebox.settings.loading_image+'"/></div>');var pageScroll=$.facebox.getPageScroll();$("#facebox").css({top:pageScroll[1]+($.facebox.getPageHeight()/10),left:pageScroll[0]}).show();$(document).bind("keydown.facebox",function(e){if(e.keyCode==27){$.facebox.close();}});};$.facebox.reveal=function(data,klass){if(klass){$("#facebox .content").addClass(klass);}$("#facebox .content").append(data);$("#facebox .loading").remove();$("#facebox .body").children().fadeIn("normal");};$.facebox.close=function(){$(document).trigger("close.facebox");return false;};$(document).bind("close.facebox",function(){$(document).unbind("keydown.facebox");$("#facebox").fadeOut(function(){$("#facebox .content").removeClass().addClass("content");});});$.fn.facebox=function(settings){$.facebox.init(settings);var image_types=$.facebox.settings.image_types.join("|");image_types=new RegExp("."+image_types+"$","i");function click_handler(){$.facebox.loading(true);var klass=this.rel.match(/facebox\[\.(\w+)\]/);if(klass){klass=klass[1];}if(this.href.match(/#/)){var url=window.location.href.split("#")[0];var target=this.href.replace(url,"");$.facebox.reveal($(target).clone().show(),klass);}else{if(this.href.match(image_types)){var image=new Image();image.onload=function(){$.facebox.reveal('<div class="image"><img src="'+image.src+'" /></div>',klass);};image.src=this.href;}else{$.get(this.href,function(data){$.facebox.reveal(data,klass);});}}return false;}this.click(click_handler);return this;};$.facebox.init=function(settings){if($.facebox.settings.inited){return true;}else{$.facebox.settings.inited=true;}if(settings){$.extend($.facebox.settings,settings);}$("body").append($.facebox.settings.facebox_html);var preload=[new Image(),new Image()];preload[0].src=$.facebox.settings.close_image;preload[1].src=$.facebox.settings.loading_image;$("#facebox").find(".b:first, .bl, .br, .tl, .tr").each(function(){preload.push(new Image());preload.slice(-1).src=$(this).css("background-image").replace(/url\((.+)\)/,"$1");});$("#facebox .close").click($.facebox.close);$("#facebox .close_image").attr("src",$.facebox.settings.close_image);};$.facebox.getPageScroll=function(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else{if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else{if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}}}return new Array(xScroll,yScroll);};$.facebox.getPageHeight=function(){var windowHeight;if(self.innerHeight){windowHeight=self.innerHeight;}else{if(document.documentElement&&document.documentElement.clientHeight){windowHeight=document.documentElement.clientHeight;}else{if(document.body){windowHeight=document.body.clientHeight;}}}return windowHeight;};})(jQuery);/*
 * jQuery corner plugin: simple corner rounding
 * Examples and documentation at: http://jquery.malsup.com/corner/
 * version 2.03 (05-DEC-2009)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
(function($){var ua=navigator.userAgent;var moz=$.browser.mozilla&&/gecko/i.test(ua);var webkit=$.browser.safari&&/Safari\/[5-9]/.test(ua);var expr=$.browser.msie&&(function(){var div=document.createElement("div");try{div.style.setExpression("width","0+0");div.style.removeExpression("width");}catch(e){return false;}return true;})();function sz(el,p){return parseInt($.css(el,p))||0;}function hex2(s){var s=parseInt(s).toString(16);return(s.length<2)?"0"+s:s;}function gpc(node){for(;node&&node.nodeName.toLowerCase()!="html";node=node.parentNode){var v=$.css(node,"backgroundColor");if(v=="rgba(0, 0, 0, 0)"){continue;}if(v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex2(rgb[0])+hex2(rgb[1])+hex2(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}function getWidth(fx,i,width){switch(fx){case"round":return Math.round(width*(1-Math.cos(Math.asin(i/width))));case"cool":return Math.round(width*(1+Math.cos(Math.asin(i/width))));case"sharp":return Math.round(width*(1-Math.cos(Math.acos(i/width))));case"bite":return Math.round(width*(Math.cos(Math.asin((width-i-1)/width))));case"slide":return Math.round(width*(Math.atan2(i,width/i)));case"jut":return Math.round(width*(Math.atan2(width,(width-i-1))));case"curl":return Math.round(width*(Math.atan(i)));case"tear":return Math.round(width*(Math.cos(i)));case"wicked":return Math.round(width*(Math.tan(i)));case"long":return Math.round(width*(Math.sqrt(i)));case"sculpt":return Math.round(width*(Math.log((width-i-1),width)));case"dog":return(i&1)?(i+1):width;case"dog2":return(i&2)?(i+1):width;case"dog3":return(i&3)?(i+1):width;case"fray":return(i%2)*width;case"notch":return width;case"bevel":return i+1;}}$.fn.corner=function(options){if(this.length==0){if(!$.isReady&&this.selector){var s=this.selector,c=this.context;$(function(){$(s,c).corner(options);});}return this;}return this.each(function(index){var $this=$(this);var o=[options||"",$this.attr($.fn.corner.defaults.metaAttr)||""].join(" ").toLowerCase();var keep=/keep/.test(o);var cc=((o.match(/cc:(#[0-9a-f]+)/)||[])[1]);var sc=((o.match(/sc:(#[0-9a-f]+)/)||[])[1]);var width=parseInt((o.match(/(\d+)px/)||[])[1])||10;var re=/round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;var fx=((o.match(re)||["round"])[0]);var edges={T:0,B:1};var opts={TL:/top|tl|left/.test(o),TR:/top|tr|right/.test(o),BL:/bottom|bl|left/.test(o),BR:/bottom|br|right/.test(o)};if(!opts.TL&&!opts.TR&&!opts.BL&&!opts.BR){opts={TL:1,TR:1,BL:1,BR:1};}if($.fn.corner.defaults.useNative&&fx=="round"&&(moz||webkit)&&!cc&&!sc){if(opts.TL){$this.css(moz?"-moz-border-radius-topleft":"-webkit-border-top-left-radius",width+"px");}if(opts.TR){$this.css(moz?"-moz-border-radius-topright":"-webkit-border-top-right-radius",width+"px");}if(opts.BL){$this.css(moz?"-moz-border-radius-bottomleft":"-webkit-border-bottom-left-radius",width+"px");}if(opts.BR){$this.css(moz?"-moz-border-radius-bottomright":"-webkit-border-bottom-right-radius",width+"px");}return ;}var strip=document.createElement("div");strip.style.overflow="hidden";strip.style.height="1px";strip.style.backgroundColor=sc||"transparent";strip.style.borderStyle="solid";var pad={T:parseInt($.css(this,"paddingTop"))||0,R:parseInt($.css(this,"paddingRight"))||0,B:parseInt($.css(this,"paddingBottom"))||0,L:parseInt($.css(this,"paddingLeft"))||0};if(typeof this.style.zoom!=undefined){this.style.zoom=1;}if(!keep){this.style.border="none";}strip.style.borderColor=cc||gpc(this.parentNode);var cssHeight=$.curCSS(this,"height");for(var j in edges){var bot=edges[j];if((bot&&(opts.BL||opts.BR))||(!bot&&(opts.TL||opts.TR))){strip.style.borderStyle="none "+(opts[j+"R"]?"solid":"none")+" none "+(opts[j+"L"]?"solid":"none");var d=document.createElement("div");$(d).addClass("jquery-corner");var ds=d.style;bot?this.appendChild(d):this.insertBefore(d,this.firstChild);if(bot&&cssHeight!="auto"){if($.css(this,"position")=="static"){this.style.position="relative";}ds.position="absolute";ds.bottom=ds.left=ds.padding=ds.margin="0";if(expr){ds.setExpression("width","this.parentNode.offsetWidth");}else{ds.width="100%";}}else{if(!bot&&$.browser.msie){if($.css(this,"position")=="static"){this.style.position="relative";}ds.position="absolute";ds.top=ds.left=ds.right=ds.padding=ds.margin="0";if(expr){var bw=sz(this,"borderLeftWidth")+sz(this,"borderRightWidth");ds.setExpression("width","this.parentNode.offsetWidth - "+bw+'+ "px"');}else{ds.width="100%";}}else{ds.position="relative";ds.margin=!bot?"-"+pad.T+"px -"+pad.R+"px "+(pad.T-width)+"px -"+pad.L+"px":(pad.B-width)+"px -"+pad.R+"px -"+pad.B+"px -"+pad.L+"px";}}for(var i=0;i<width;i++){var w=Math.max(0,getWidth(fx,i,width));var e=strip.cloneNode(false);e.style.borderWidth="0 "+(opts[j+"R"]?w:0)+"px 0 "+(opts[j+"L"]?w:0)+"px";bot?d.appendChild(e):d.insertBefore(e,d.firstChild);}}}});};$.fn.uncorner=function(){if(moz||webkit){this.css(moz?"-moz-border-radius":"-webkit-border-radius",0);}$("div.jquery-corner",this).remove();return this;};$.fn.corner.defaults={useNative:true,metaAttr:"data-corner"};})(jQuery);(function($){$.modal=function(data,options){return $.modal.impl.init(data,options);};$.modal.close=function(){$.modal.impl.close(true);};$.fn.modal=function(options){return $.modal.impl.init(this,options);};$.modal.defaults={overlay:50,overlayId:"modalOverlay",overlayCss:{},containerId:"modalContainer",containerCss:{},close:true,closeTitle:"Close",closeClass:"modalClose",persist:false,onOpen:null,onShow:null,onClose:null};$.modal.impl={opts:null,dialog:{},init:function(data,options){if(this.dialog.data){return false;}this.opts=$.extend({},$.modal.defaults,options);if(typeof data=="object"){data=data instanceof jQuery?data:$(data);if(data.parent().parent().size()>0){this.dialog.parentNode=data.parent();if(!this.opts.persist){this.dialog.original=data.clone(true);}}}else{if(typeof data=="string"||typeof data=="number"){data=$("<div>").html(data);}else{if(console){console.log("SimpleModal Error: Unsupported data type: "+typeof data);}return false;}}this.dialog.data=data.addClass("modalData");data=null;this.create();this.open();if($.isFunction(this.opts.onShow)){this.opts.onShow.apply(this,[this.dialog]);}return this;},create:function(){this.dialog.overlay=$("<div>").attr("id",this.opts.overlayId).addClass("modalOverlay").css($.extend(this.opts.overlayCss,{opacity:this.opts.overlay/100,height:"100%",width:"100%",position:"fixed",left:0,top:0,zIndex:3000})).hide().appendTo("body");this.dialog.container=$("<div>").attr("id",this.opts.containerId).addClass("modalContainer").css($.extend(this.opts.containerCss,{position:"fixed",zIndex:3100})).append(this.opts.close?'<a class="modalCloseImg '+this.opts.closeClass+'" title="'+this.opts.closeTitle+'"></a>':"").hide().appendTo("body");if($.browser.msie&&($.browser.version<7)){this.fixIE();}this.dialog.container.append(this.dialog.data.hide());},bindEvents:function(){var modal=this;$("."+this.opts.closeClass).click(function(e){e.preventDefault();modal.close();});},unbindEvents:function(){$("."+this.opts.closeClass).unbind("click");},fixIE:function(){var wHeight=$(document.body).height()+"px";var wWidth=$(document.body).width()+"px";this.dialog.overlay.css({position:"absolute",height:wHeight,width:wWidth});this.dialog.container.css({position:"absolute"});this.dialog.iframe=$('<iframe src="javascript:false;">').css($.extend(this.opts.iframeCss,{opacity:0,position:"absolute",height:wHeight,width:wWidth,zIndex:1000,width:"100%",top:0,left:0})).hide().appendTo("body");},open:function(){if(this.dialog.iframe){this.dialog.iframe.show();}if($.isFunction(this.opts.onOpen)){this.opts.onOpen.apply(this,[this.dialog]);}else{this.dialog.overlay.show();this.dialog.container.show();this.dialog.data.show();}this.bindEvents();},close:function(external){if(!this.dialog.data){return false;}if($.isFunction(this.opts.onClose)&&!external){this.opts.onClose.apply(this,[this.dialog]);}else{if(this.dialog.parentNode){if(this.opts.persist){this.dialog.data.hide().appendTo(this.dialog.parentNode);}else{this.dialog.data.remove();this.dialog.original.appendTo(this.dialog.parentNode);}}else{this.dialog.data.remove();}this.dialog.container.remove();this.dialog.overlay.remove();if(this.dialog.iframe){this.dialog.iframe.remove();}this.dialog={};}this.unbindEvents();}};})(jQuery);eval(function(p,a,c,k,e,r){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36));};if(!"".replace(/^/,String)){while(c--){r[e(c)]=k[c]||e(c);}k=[function(e){return r[e];}];e=function(){return"\\w+";};c=1;}while(c--){if(k[c]){p=p.replace(new RegExp("\\b"+e(c)+"\\b","g"),k[c]);}}return p;}("4I(b($){c 2p=($.2q.4J&&3L($.2q.3M.4K(0,1))<7);c Z=$('Z');c 3;c 1L=n;c 1w;c 1W;c 4={1a:n,10:n,P:n,1b:n,11:n,1c:n,1x:C,V:C,D:C,g:C,j:C,z:C,u:C,2r:1X 31()};c 1d={6:n,8:n};$.1M.1j=b(f){5(!F)r n;r F.32(b(){5(F.2s.33()=='1y'){$(F).4L(b(e){5(F.3N=='3O/1y-G'){1k($.M(f,{l:F}));r y}e.1l();1k($.M(f,{l:F}));r n})}q{$(F).1e(b(e){e.1l();1k($.M(f,{l:F}));r n})}})};$.1M.1N=b(f){5(!F.S)1k(f);r F.32(b(){1k($.M(f,{l:F}))})};$.1N=b(f){1k(f)};$.4M=b(f,1m,1Y){T(f,1m,1Y);5(!1m&&4.1a){5(f.1Z)3.2t(4,3,b(){});5((4.10&&!4.P&&!4.11)&&(f.6||f.8)){2u(y);5(1L)4.j.k({X:''});3.2v(4,3,b(){5(1L)4.j.k({X:'21'});5($.1z(3.34))3.34(4,3)})}}};$.4N=b(){1n()};$.22=b(){5(3.t=='E'){c E=$('[1o=\"'+3.l.1o+'\"]');c 12=E.35(3.l);5(12<E.S-1){r E.1A(12+1).1N(3)}}r n};$.23=b(){5(3.t=='E'){c E=$('[1o=\"'+3.l.1o+'\"]');c 12=E.35(3.l);5(12>0){r E.1A(12-1).1N(3)}}r n};$.1M.1j.f={v:n,4:n,t:'',l:'',24:'',36:C,2w:'4O',2x:'1j',j:C,1Z:'#4P',1p:{},6:C,8:C,3P:1O,3Q:3R,4Q:y,3a:y,17:20,3S:'4R|4S|4T|4U|4V|4W',3b:'3c',3T:y,k:{V:{2y:26,X:'21',2z:0,2A:0,8:'26%',6:'26%'},z:{2y:4X,X:'21',2z:'50%',2A:'50%'},28:{},j:{1B:'1C'},D:{2y:4Y,X:'21',2z:'50%',2A:'50%',K:'-2B',L:'-2B'}},29:{m:'<m U=\"z\"></m>',1p:'<m U=\"z\"></m>',1y:'<m U=\"z\"></m>',3d:'<m U=\"z\"></m>',1q:'<m U=\"3U\"></m>',E:'<m U=\"3U\"><a J=\"#\" U=\"23\">4Z</a><a J=\"#\"  U=\"22\">51</a></m>',1P:'<m U=\"52\"></m>',Q:'<m U=\"53\"></m>',3V:'<m U=\"z\"></m>'},3W:'<a J=\"#\" U=\"2C\" 1f=\"54\" 1D=\"55\">3X</a>',3e:'.1j',2D:'.2C',3Y:'<a J=\"#\" U=\"2C\">56</a>',3Z:'1c',41:'57 58 j 59 5a 5b.<3f />5c 5d 5e 5f.<3f /><a J=\"#\" U=\"2C\">3X</a>',3g:C,2E:2E,2a:2a,3h:C,2F:2F,1E:C,2G:2G,2H:2H,2I:2I,2J:2J,2b:2b,2v:2v,34:C,2t:2t,1F:C};b 1k(f){5(4.1b||4.11||4.P)r;v('1k');3i(f);4.1c=n;4.10=n;4.2r=1X 31();3.t=42();5($.1z(3.36))3.36(3);l=3.l;5(3.t=='1P'){3.3j=n;3.j='<43 5g=\"5h:5i-5j-5k-5l-5m\" 6=\"'+3.6+'\" 8=\"'+3.8+'\"><2K 13=\"5n\" 1Q=\"'+3.A+'\"></2K><2K 13=\"44\" 1Q=\"45\"></2K><46 1G=\"'+3.A+'\" t=\"5o/x-5p-5q\" 44=\"45\" 6=\"'+3.6+'\" 8=\"'+3.8+'\"></46></43>'}5(l){5(3.t=='1y'){3.N=2c(l.18);c A=l.18.1g(0,l.18.S-3.N.S);c G=$(l).5r();G.2L({13:3.2x,1Q:1});5(3.N)G.2L({13:3.2w,1Q:3.N.1g(1)});$.1p($.M({},3.1p,{A:A,G:G,t:l.5s,47:3k,1c:14}));v('48 49 2d: '+l.18);1h()}q 5(3.t=='3d'){1r();l.3l='3m';3.N=2c(l.18);c A=l.18.1g(0,l.18.S-3.N.S);l.18=A;$(l).2M('<3n t=\"1R\" 13=\"'+3.2x+'\" 1Q=\"1\" />');5(3.N)$(l).2M('<3n t=\"1R\" 13=\"'+3.2w+'\" 1Q=\"'+3.N.1g(1)+'\" />');4.g.H('<Q 4a=\"0\" 4b=\"0\" 13=\"3m\"></Q>');$('Q',4.g).k({6:3.6,8:3.8}).1c(14).2N(3o);v('48 5t 2d: '+l.18);1h();15()}q 5(3.t=='1q'||3.t=='E'){c 1D=l.1D||3.3b;1r();4.g.H('<2e 1f=\"4c\" 3p=\"'+1D+'\" />');v('3c 2d: '+l.J);$('2e',4.g).1c(14).2N(b(){v('3c 5u: '+F.1G);$(F).3q('2N');c w=4.g.6();c h=4.g.8();T({6:w,8:h,2O:w,2P:h});4.10=y;5(4.1b||4.11)15()}).1s('1G',l.J);1h()}q 5(3.t=='Q'){1r();4.g.H('<Q 4a=\"0\" 4b=\"0\" 1G=\"'+l.J+'\" 13=\"3m\"></Q>');v('5v 2d: '+l.J);$('Q',4.g).1A(0).k({6:'26%',8:'26%'});3.3a=n;4.10=y;1h()}q 5(3.t){v('4d: '+3.t);1r();4.g.H(3.j);c w=4.g.6();c h=4.g.8();c m=$(3.t);5(m.S){T({t:'m'});w=m.6();h=m.8();5(1w)1W=1w;1w=m;4.g.1t(m.1H())}T({6:w,8:h});5(4.g.H())4.10=y;q 14();1h();15()}q{v('49 2d: '+3.A);T({t:'1p'});c G={};5(3.N){G=3.1p.G||{};G[3.2w]=3.N.1g(1)}$.1p($.M({},3.1p,{A:3.A.1g(0,3.A.S-3.N.S),47:3k,1c:14,G:G}));1h()}}q 5(3.j){v('4d: '+3.t);T({t:'3V'});1r();4.g.H($('<m/>').H(3.j).1H());5(4.g.H())4.10=y;q 14();1h()}q{}}b 3i(f){v('3i');3=$.M({},$.1M.1j.f,f);3.N='',3.3r=0,3.3s=0,3.3j=y;3t()}b T(f,1m,1Y){5(1m&&1Y){$.M(3[1m][1Y],f)}q 5(1m){$.M(3[1m],f)}q{$.M(3,f)}}b 4e(){5(2p){5(1I.3u){3.1u=1I.3u.4f;3.1v=1I.3u.2Q}q{3.1u=1I.Z.4f;3.1v=1I.Z.2Q}}q{3.1u=0;3.1v=0}}b 3t(){4e();3.L=-(3.6+3.3r)/2+3.1u;3.K=-(3.8+3.3s)/2+3.1v}b 1r(){v('1r');5(!4.1x){5(3.v)T({5w:'5x'},'k','V');c 3v='';5(2p){Z.k({8:Z.8()+'o',6:Z.6()+'o',X:'5y',1B:'1R'});$('H').k({1B:'1R'});T({X:'3w',8:'4g%',6:'4g%',2z:3.1v+'o',2A:3.1u+'o'},'k','V');T({X:'3w'},'k','D');T({X:'3w'},'k','z');3v=$('<Q 1f=\"5z\"></Q>').k($.M({},3.k.V,{1i:0,2y:50,16:'5A'}))}Z.1t($('<m 1f=\"4h\"><m 1f=\"4i\"></m><m 1f=\"4j\"><m 1f=\"4k\"></m></m><m 1f=\"4l\"></m><m 1f=\"4m\"></m></m>').Y());4.1x=$('#4h').1J();4.V=$('#4i').k($.M({2R:3.1Z},3.k.V)).5B(3v);5(!3.4)4.V.1e(1n);4.D=$('#4m').k(3.k.D).Y();4.u=$('#4j').k(3.k.z).Y();4.j=$('#4k');4.g=$('#4l').Y();5($.1z($.1M.4n)){4.j.4n(b(e,d){c 2f=4.j.4o(0);5((d>0&&2f.2Q==0)||(d<0&&2f.5C-2f.2Q==2f.5D)){e.1l();e.5E()}})}$(1I).4p(3x);4.j.k({6:'1C',8:'1C'});4.u.k({6:'1C',8:'1C'})}}b 1h(){v('1h');5(!4.1a){1r();4.P=y;3.2E(4,3,3y)}q{4.P=y;4.11=y;3.2H(4,3,b(){2S();4.P=n;15()})}}b 3x(e){5(e.2g==27){5(!3.4)1n()}q 5(3.t=='E'&&4.1a&&4.10&&!4.P&&!4.11){5(e.2g==39||e.2g==40){e.1l();$('.22',4.j).1A(0).4q('1e');r n}q 5(e.2g==37||e.2g==38){e.1l();$('.23',4.j).1A(0).4q('1e');r n}}}b 42(){c l=3.l;c A=3.A;5(l&&l.2s){5(l.2s.33()=='1y'){5(l.3N=='3O/1y-G')r'3d';r'1y'}5(l.5F=='4')3.4=y;c 1q=1X 4r('[^\\.]\\.('+3.3S+')\\s*$','i');5(1q.4s(l.J)){5(l.1o)r'E';q r'1q'}c 1P=1X 4r('[^\\.]\\.(1P)\\s*$','i');5(1P.4s(l.J))r'1P';5(l.3l.33()=='5G'||(l.4t.3z(/:\\d*$/,'')!=1S.2T.4t.3z(/:\\d*$/,'')))r'Q';A=l.J}5(A){5(l)3.A=A;q 3.l=y;c 24=2c(A);c 4u=2c(1S.2T.J);c 4v=1S.2T.J.1g(0,1S.2T.J.S-4u.S);c 4w=A.1g(0,A.S-24.S);5(4w==4v)r 24;q 3.N=24}}b 14(){v('14');4.1c=y;5(!4.1a)r;5($.1z(3.3g))3.3g(4,3);4.D.5H(3.3Z).H(3.41);$(3.2D,4.D).1e(1n)}b 2U(){v('2U');5(!4.g.H())r;4.j.H(4.g.1H());4.g.3A();3B();5($.1z(3.3h))3.3h(4,3);4.j.1t(4.2r);c 2V=$.M({},3);5(1d.6)2V.6=C;5(1d.8)2V.8=C;$(3.2D,4.u).1e(1n);$(3.3e,4.u).1j(2V)}b 3B(){v('3B');c 29=$(3.29[3.t]);4.j.1t(29.3C().2h());4.u.5I(29);5(3.t=='E'){c E=$('[1o=\"'+3.l.1o+'\"]');c 12=E.35(3.l);5(12>0){c 3D=E.1A(12-1);$('.23',4.u).1s('J',3D.1s('J')).1e(b(e){e.1l();3D.1N(3);r n})}q{$('.23',4.u).2h()}5(12<E.S-1){c 3E=E.1A(12+1);$('.22',4.u).1s('J',3E.1s('J')).1e(b(e){e.1l();3E.1N(3);r n})}q{$('.22',4.u).2h()}}2u()}b 2u(4x){v('2u');5(!4.z)4.z=4.u.3C(':5J');1d.6=n;1d.8=n;5(3.3a&&(!3.6||!3.8)){4.u.k({1i:0}).1J();c g={6:'1C',8:'1C'};5(3.6)g.6=3.6;5(3.8)g.8=3.8;4.j.k(g);5(!3.6){3.6=4.j.6();1d.6=y}5(!3.8){3.8=4.j.8();1d.8=y}4.u.Y().k({1i:1})}3.6=1K.4y(3.6,3.3P);3.8=1K.4y(3.8,3.3Q);c 2i=2j(4.u);c 2k=2j(4.z);c 19=2j(4.j);c g={j:{6:3.6,8:3.8},28:{6:3.6+19.w.R,8:3.8+19.h.R},z:{6:3.6+19.w.R+2k.w.R,8:3.8+19.h.R+2k.h.R}};5(3.3j){c 2W=$(1S).8()-3.17*2-2i.h.16-(g.z.8-3.8);c 2X=$(1S).6()-3.17*2-2i.w.16-(g.z.6-3.6);5(g.j.8>2W||g.j.6>2X){5(3.t=='1q'||3.t=='E'){c 2l=g.j.6-3.2O;c 2m=g.j.8-3.2P;5(2m<0)2m=0;5(2l<0)2l=0;c 2n=2W-2m;c 2o=2X-2l;c 3F=1K.3G(2n/3.2P,2o/3.2O);2n=1K.4z(3.2P*3F);2o=1K.4z(3.2O*3F);$('2e#4c',4.j).k({8:2n+'o',6:2o+'o'});g.j.8=2n+2m;g.j.6=2o+2l}q{g.j.8=1K.3G(g.j.8,2W);g.j.6=1K.3G(g.j.6,2X)}g.28={6:g.j.6+19.w.R,8:g.j.8+19.h.R};g.z={6:g.j.6+19.w.R+2k.w.R,8:g.j.8+19.h.R+2k.h.R}}}4.j.k($.M({},g.j,3.k.j));4.z.k($.M({},g.28,3.k.28));5(!4x){4.u.k($.M({},g.z,3.k.z));5(3.t=='1q'||3.t=='E'){c 1D=$('2e',4.j).1s('3p');$('2e',4.j).4A('3p');5(1D!=3.3b){c 2Y=$('<m>'+1D+'</m>');4.j.1t(2Y);5(3.3T){c 4B=2j(2Y);2Y.k({6:(g.j.6+19.w.17-4B.w.R)+'o'})}}}5(!3.4)4.u.2M(3.3W)}g.z.3r=2i.w.16;g.z.3s=2i.h.16;T(g.z);3t()}b 1n(e){v('1n');5(e)e.1l();5(4.1x&&4.1a){4.1a=n;4.P=y;5(4.1b||4.11){3.2b(4,3,b(){4.D.Y();4.1b=n;4.11=n;3.2a(4,3,1F)})}q{5(1L)4.j.k({X:''});4.z.k({1B:'1R'});4.j.k({1B:'1R'});3.2G(4,3,b(){2S();3.2a(4,3,1F)})}}5(e)r n}b 15(){v('15');5(4.1a&&!4.P){5(4.10){5(4.g.H()){4.P=y;5(4.11){2U();3.2I(4,3,b(){4.D.Y();4.11=n;4.1b=n;1E()})}q{3.2b(4,3,b(){4.D.Y();4.1b=n;2U();3.2F(4,$.M({},3),1E)})}}}q 5(!4.1b&&!4.11){4.P=y;4.1b=y;5(4.1c)14();q 4.D.H(3.3Y);$(3.2D,4.D).1e(1n);3.2J(4,3,b(){4.P=n;15()})}}}b 3k(G){v('5K: '+F.A);4.g.H(3.N?3H($('<m>'+G+'</m>').4C(3.N).1H()):3H(G));5(4.g.H()){4.10=y;15()}q 14()}b 3o(){v('3o');3.l.18+=3.N;3.l.3l='';$('3n[13='+3.2x+']',3.l).2h();c Q=4.g.3C('Q');c 4D=Q.3q('2N').1H().4C(3.N||'Z').5L('4E[1G]');Q.1s('1G','5M:5N');4.g.H(4D.H());5(4.g.H()){4.10=y;15()}q 14()}b 2S(){v('2S');4.P=n;5(1W){1W.1t(4.j.1H());1W=C}q 5(1w){1w.1t(4.j.1H());1w=C}4.j.3A();4.u.3A().4A('5O').Y().k(3.k.z).1t(4.j);15()}b 1F(){v('1F');$(1I).3q('4p',3x);4.P=n;4.1x.2h();4.1x=C;5(2p){Z.k({8:'',6:'',X:'',1B:''});$('H').k({1B:''})}5($.1z(3.1F))3.1F(4,3)}b 3y(){v('3y');4.1a=y;4.P=n;15()}b 1E(){v('1E');4.P=n;4.u.k({1i:''});1L=$.2q.5P&&5Q($.2q.3M)<1.9&&3.t!='E'&&3.t!='1q';5(1L)4.j.k({X:'21'});5($.1z(3.1E))3.1E(4,3);5(1d.6)T({6:C});5(1d.8)T({8:C})}b 2c(A){c 3I=A.5R('#');5(3I>-1)r A.1g(3I);r''}b 3H(G){5(5S G=='5T')G=G.3z(/<\\/?(H|5U|Z)([^>]*)>/5V,'');c g=1X 31();$.32($.5W({0:G},F.5X),b(){5($.2s(F,\"4E\")){5(!F.1G||$(F).1s('1o')=='5Y')4.2r.2L(F)}q g.2L(F)});r g}b 2j(O){O=O.4o(0);c B={h:{2Z:W(O,'K')+W(O,'5Z'),16:W(O,'60')+W(O,'61'),17:W(O,'62')+W(O,'63')},w:{2Z:W(O,'L')+W(O,'64'),16:W(O,'65')+W(O,'66'),17:W(O,'67')+W(O,'68')}};B.h.30=B.h.2Z+B.h.16;B.w.30=B.w.2Z+B.w.16;B.h.4F=B.h.17+B.h.16;B.w.4F=B.w.17+B.w.16;B.h.R=B.h.30+B.h.17;B.w.R=B.w.30+B.w.17;r B}b W(O,13){c B=3L($.69(O,13,y));5(6a(B))B=0;r B}b v(4G){5(3&&3.v&&4.1x)4.V.2M(4G+'<3f />')}b 2E(p,f,I){p.V.k({1i:0}).4H(6b,0.6c,I)}b 2a(p,f,I){p.V.3J(3R,I)}b 2J(p,f,I){c h=p.D.8();c w=p.D.6();p.D.k({8:h+'o',6:w+'o',K:(-h/2+f.1v)+'o',L:(-w/2+f.1u)+'o',1i:0}).1J().1T({1i:1},{1U:I,1V:1O})}b 2b(p,f,I){I()}b 2F(p,f,I){c h=p.D.8();c w=p.D.6();p.D.k({8:h+'o',6:w+'o',K:(-h/2+f.1v)+'o',L:(-w/2+f.1u)+'o'}).1J().1T({6:f.6+'o',8:f.8+'o',K:(f.K)+'o',L:(f.L)+'o'},{1V:3K,1U:b(){p.u.k({6:f.6+'o',8:f.8+'o',K:(f.K)+'o',L:(f.L)+'o'}).1J();p.D.3J(6d,I)}})}b 2G(p,f,I){p.u.1T({8:'2B',6:'2B',K:25+f.1v+'o',L:25+f.1u+'o'},{1V:3K,1U:b(){p.u.Y();I()}})}b 2H(p,f,I){p.D.k({K:p.u.k('K'),L:p.u.k('L'),8:p.u.k('8'),6:p.u.k('6'),1i:0}).1J().4H(1O,1,b(){p.u.Y();I()})}b 2I(p,f,I){p.u.k({6:f.6+'o',L:(f.L)+'o',8:f.8+'o',K:(f.K)+'o',1i:1});p.D.1T({6:f.6+'o',L:(f.L)+'o',8:f.8+'o',K:(f.K)+'o'},{1U:b(){p.u.1J();p.D.3J(1O,b(){p.D.Y();I()})},1V:3K})}b 2v(p,f,I){p.u.1T({6:f.6+'o',L:(f.L)+'o',8:f.8+'o',K:(f.K)+'o'},{1U:I,1V:1O})}b 2t(p,f,I){5(!$.6e.6f.2R){p.V.k({2R:f.1Z});I()}q p.V.1T({2R:f.1Z},{1U:I,1V:1O})}$($.1M.1j.f.3e).1j()});",62,388,"|||currentSettings|modal|if|width||height|||function|var|||settings|tmp|||content|css|from|div|false|px|elts|else|return||type|contentWrapper|debug|||true|wrapper|url|ret|null|loading|gallery|this|data|html|callback|href|marginTop|marginLeft|extend|selector|elm|anim|iframe|total|length|setCurrentSettings|class|bg|getCurCSS|position|hide|body|dataReady|transition|currentIndex|name|loadingError|showContentOrLoading|border|padding|action|outerContent|ready|loadingShown|error|resized|click|id|substring|showModal|opacity|nyroModal|processModal|preventDefault|deep1|removeModal|rel|ajax|image|initModal|attr|append|marginScrollLeft|marginScrollTop|contentElt|full|form|isFunction|eq|overflow|auto|title|endShowContent|endRemove|src|contents|document|show|Math|fixFF|fn|nyroModalManual|400|swf|value|hidden|window|animate|complete|duration|contentEltLast|new|deep2|bgColor||fixed|nyroModalNext|nyroModalPrev|hash||100||wrapper2|wrap|hideBackground|hideLoading|getHash|Load|img|elt|keyCode|remove|outerWrapper|getOuter|outerWrapper2|diffW|diffH|calcH|calcW|isIE6|browser|scripts|nodeName|updateBgColor|calculateSize|resize|selIndicator|formIndicator|zIndex|top|left|50px|nyroModalClose|closeSelector|showBackground|showContent|hideContent|showTransition|hideTransition|showLoading|param|push|prepend|load|imgWidth|imgHeight|scrollTop|backgroundColor|endHideContent|location|fillContent|currentSettingsNew|maxHeight|maxWidth|divTitle|margin|outer|Array|each|toLowerCase|endResize|index|processHandler||||autoSizable|defaultImgAlt|Image|formData|openSelector|br|handleError|endFillContent|setDefaultCurrentSettings|resizable|ajaxLoaded|target|nyroModalIframe|input|formDataLoaded|alt|unbind|borderW|borderH|setMargin|documentElement|iframeHideIE|absolute|keyHandler|endBackground|replace|empty|wrapContent|children|linkPrev|linkNext|ratio|min|filterScripts|hashPos|fadeOut|350|parseInt|version|enctype|multipart|minWidth|minHeight|300|extImg|setWidthImgTitle|wrapperImg|manual|closeButton|Close|contentLoading|errorClass||contentError|fileType|object|wmode|transparent|embed|success|Form|Ajax|frameborder|hspace|nyroModalImg|Content|setMarginScroll|scrollLeft|110|nyroModalFull|nyroModalBg|nyroModalWrapper|nyroModalContent|nyrModalTmp|nyroModalLoading|mousewheel|get|keydown|trigger|RegExp|test|hostname|hashLoc|curLoc|req|resizing|max|floor|removeAttr|outerDivTitle|find|iframeContent|script|inner|msg|fadeTo|jQuery|msie|substr|submit|nyroModalSettings|nyroModalRemove|nyroModalSel|000000|resizeable|jpg|jpeg|png|tiff|gif|bmp|101|102|Prev||Next|wrapperSwf|wrapperIframe|closeBut|close|Cancel|The|requested|cannot|be|loaded|Please|try|again|later|classid|clsid|D27CDB6E|AE6D|11cf|96B8|444553540000|movie|application|shockwave|flash|serializeArray|method|Data|Loaded|Iframe|color|white|static|nyroModalIframeHideIe|none|before|scrollHeight|clientHeight|stopPropagation|rev|_blank|addClass|wrapInner|first|AjaxLoaded|not|about|blank|style|mozilla|parseFloat|indexOf|typeof|string|head|gi|clean|ownerDocument|forceLoad|marginBottom|borderTopWidth|borderBottomWidth|paddingTop|paddingBottom|marginRight|borderLeftWidth|borderRightWidth|paddingLeft|paddingRight|curCSS|isNaN|500|75|200|fx|step".split("|"),0,{}));jQuery(function($){$.fn.nyroModal.settings.showBackground=function(elts,settings,callback){elts.bg.css({opacity:0.75});callback();};$.fn.nyroModal.settings.hideBackground=function(elts,settings,callback){elts.bg.hide();callback();};$.fn.nyroModal.settings.showContent=function(elts,settings,callback){elts.contentWrapper.css({width:settings.width+"px",marginLeft:(settings.marginLeft)+"px",height:settings.height+"px",marginTop:(settings.marginTop)+"px"}).show();callback();};$.fn.nyroModal.settings.hideContent=function(elts,settings,callback){elts.contentWrapper.hide();callback();};$.fn.nyroModal.settings.showLoading=function(elts,settings,callback){var h=elts.loading.height();var w=elts.loading.width();elts.loading.css({height:h+"px",width:w+"px",marginTop:(-h/2+settings.marginScrollTop)+"px",marginLeft:(-w/2+settings.marginScrollLeft)+"px"}).show();callback();};$.fn.nyroModal.settings.hideLoading=function(elts,settings,callback){elts.loading.hide();callback();};$.fn.nyroModal.settings.showTransition=function(elts,settings,callback){elts.loading.css({marginTop:elts.contentWrapper.css("marginTop"),marginLeft:elts.contentWrapper.css("marginLeft"),height:elts.contentWrapper.css("height"),width:elts.contentWrapper.css("width")}).show();elts.contentWrapper.hide();callback();};$.fn.nyroModal.settings.hideTransition=function(elts,settings,callback){elts.contentWrapper.css({width:settings.width+"px",marginLeft:(settings.marginLeft)+"px",height:settings.height+"px",marginTop:(settings.marginTop)+"px"}).show();elts.loading.hide();callback();};$.fn.nyroModal.settings.resize=function(elts,settings,callback){elts.contentWrapper.css({width:settings.width+"px",marginLeft:(settings.marginLeft)+"px",height:settings.height+"px",marginTop:(settings.marginTop)+"px"});callback();};$.fn.nyroModal.settings.updateBgColor=function(elts,settings,callback){elts.bg.css({backgroundColor:settings.bgColor});callback();};});(function(a){var k="function",i="password",c="maxLength",e="type",b=true,d=false,s="watermark",t,m=s,h="watermarkClass",p="watermarkFocus",j="watermarkSubmit",l="watermarkMaxLength",g="watermarkPassword",f="watermarkText",r=":data("+m+")",n=":text,:password,:search,textarea",o=["Page_ClientValidate"],q=d;a.extend(a.expr[":"],{search:function(a){return"search"===a.type;},data:function(f,h,g){var e,c=/^((?:[^=!^$*]|[!^$*](?!=))+)(?:([!^$*]?=)(.*))?$/.exec(g[3]);if(c){e=a(f).data(c[1]);if(e!==t){if(c[2]){e=""+e;switch(c[2]){case"=":return e==c[3];case"!=":return e!=c[3];case"^=":return e.slice(0,c[3].length)==c[3];case"$=":return e.slice(-c[3].length)==c[3];case"*=":return e.indexOf(c[3])!==-1;}}return b;}}return d;}});a.watermark={version:"3.0.4",options:{className:s,useNative:b},hide:function(b){a(b).filter(r).each(function(){a.watermark._hide(a(this));});},_hide:function(a,i){if(a.val()==a.data(f)){a.val("");if(a.data(g)){if(a.attr(e)==="text"){var d=a.data(g),b=a.parent();b[0].removeChild(a[0]);b[0].appendChild(d[0]);a=d;}}if(a.data(l)){a.attr(c,a.data(l));a.removeData(l);}if(i){a.attr("autocomplete","off");window.setTimeout(function(){a.select();},0);}}a.removeClass(a.data(h));},show:function(b){a(b).filter(r).each(function(){a.watermark._show(a(this));});},_show:function(d){var r=d.val(),j=d.data(f),m=d.attr(e);if((r.length==0||r==j)&&!d.data(p)){q=b;if(d.data(g)){if(m===i){var o=d.data(g),n=d.parent();n[0].removeChild(d[0]);n[0].appendChild(o[0]);d=o;d.attr(c,j.length);}}if(m==="text"||m==="search"){var k=d.attr(c);if(k>0&&j.length>k){d.data(l,k);d.attr(c,j.length);}}d.addClass(d.data(h));d.val(j);}else{a.watermark._hide(d);}},hideAll:function(){if(q){a.watermark.hide(n);q=d;}},showAll:function(){a.watermark.show(n);}};a.fn.watermark=function(q,l){var o="string",s=typeof q===o,r;if(typeof l==="object"){r=typeof l.className===o;l=a.extend({},a.watermark.options,l);}else{if(typeof l===o){r=b;l=a.extend({},a.watermark.options,{className:l});}else{l=a.watermark.options;}}if(typeof l.useNative!==k){l.useNative=l.useNative?function(){return b;}:function(){return d;};}return this.each(function(){var u="dragleave",t="dragenter",w=this,d=a(w);if(!d.is(n)){return ;}if(d.data(m)){if(s||r){a.watermark._hide(d);s&&d.data(f,q);r&&d.data(h,l.className);}}else{if(l.useNative.call(w,d)){if((""+d.css("-webkit-appearance")).replace("undefined","")!==""&&d.attr("tagName")!=="TEXTAREA"){s&&d.attr("placeholder",q);return ;}}d.data(f,s?q:"");d.data(h,l.className);d.data(m,1);if(d.attr(e)===i){var x=d.wrap("<span>").parent(),k=a(x.html().replace(/type=["']?password["']?/i,'type="text"'));k.data(f,d.data(f));k.data(h,d.data(h));k.data(m,1);k.attr(c,q.length);k.focus(function(){a.watermark._hide(k,b);}).bind(t,function(){a.watermark._hide(k);}).bind("dragend",function(){window.setTimeout(function(){k.blur();},1);});d.blur(function(){a.watermark._show(d);}).bind(u,function(){a.watermark._show(d);});k.data(g,d);d.data(g,k);}else{d.focus(function(){d.data(p,1);a.watermark._hide(d,b);}).blur(function(){d.data(p,0);a.watermark._show(d);}).bind(t,function(){a.watermark._hide(d);}).bind(u,function(){a.watermark._show(d);}).bind("dragend",function(){window.setTimeout(function(){a.watermark._show(d);},1);}).bind("drop",function(b){var a=b.originalEvent.dataTransfer.getData("Text");d.val().replace(a,"")===d.data(f)&&d.val(a);d.focus();});}if(w.form){var o=w.form,v=a(o);if(!v.data(j)){v.submit(a.watermark.hideAll);if(o.submit){v.data(j,o.submit);o.submit=function(c,b){return function(){var d=b.data(j);a.watermark.hideAll();if(d.apply){d.apply(c,Array.prototype.slice.call(arguments));}else{d();}};}(o,v);}else{v.data(j,1);o.submit=function(b){return function(){a.watermark.hideAll();delete b.submit;b.submit();};}(o);}}}}a.watermark._show(d);}).end();};o.length&&a(function(){for(var b,c,d=o.length-1;d>=0;d--){b=o[d];c=window[b];if(typeof c===k){window[b]=function(b){return function(){a.watermark.hideAll();b.apply(null,Array.prototype.slice.call(arguments));};}(c);}}});})(jQuery);//Minimized ValueMap bottom Files
var m_isSplit=false;var m_isMiniMap=false;function vmPREFS_CLASS(){this.LicenseCode="";this.LicenseType="";this.ToolTip={AutoDisplaySP:false,ShowLinks:true,SearchProperty:false,afterDisplay:""};this.afterSearch="";this.emailSubject="";this.AutoSearch=false;this.broker=false;this.agent=false;this.linkBackPage="ValueMap.aspx";this.soldData="";this.cssFilepath="";this.homeSoldPriceSource="";this.Tab={Tab0:true,Tab1:true,Tab2:true,Tab3:true,Tab4:true,Tab5:true,Tab6:false};this.ParentCode="";this.EstimatedLabel="";}vmPREFS_CLASS.prototype.Init=function(settings){this.LicenseCode=settings.LicenseCode;this.LicenseType=settings.LicenseType;this.ToolTip.AutoDisplaySP=Boolean(settings.TT_AutoDisplaySP);this.ToolTip.ShowLinks=Boolean(settings.TT_ShowLinks);this.ToolTip.SearchProperty=Boolean(settings.TT_SrchProperty);this.ToolTip.afterDisplay=settings.TT_AfterDisplay;this.afterSearch=settings.afterSearch;this.emailSubject=settings.emailSubject;this.AutoSearch=settings.AutoSearch;this.PropTicker=settings.PropTicker;this.contactAgent=settings.contactAgent;this.enableParcels=settings.enableParcels;this.enableParcelValues=settings.enableParcelValues;this.broker=settings.broker;this.agent=settings.agent;this.soldData=settings.soldData;this.cssFilepath=settings.cssFilepath;this.homeSoldPriceSource=settings.homeSoldPriceSource;this.Tab.Tab0=settings.Tab0;this.Tab.Tab1=settings.Tab1;this.Tab.Tab2=settings.Tab2;this.Tab.Tab3=settings.Tab3;this.Tab.Tab4=settings.Tab4;this.Tab.Tab5=settings.Tab5;this.Tab.Tab6=settings.Tab6;this.ParentCode=settings.ParentCode;this.EstimatedLabel=settings.EstimatedLabel;};function vmPAGE_CLASS(){this.HomeValuePanel="hvPanel0";this.SideBar="hidden";this.CurrentTab="sbTab0";this.CurrentPanel="sbPanel0";this.Birdseye={Mode:"sbs",isVisible:false};this.ChangeViewCntr=0;this.SearchType=SEARCH_TYPE_NEW;this.TileURL="{1}.valuemap.corelogic.com/Handlers/GetParcelLayer.ashx";this.ReportURL="handlers/GetReTrendsReport.ashx";this.ImprvmntTotal=0;this.MapSize={height:0,width:0};this.CurrentWidth=0;this.CurrentHeight=0;this.MaxWidth=1110;this.TabIds=["sbTab0","sbTab1","sbTab2","sbTab3","sbTab4","sbTab5","sbTab6"];this.ButtonIds=["ActionButton1_Icon","ActionButton2_Icon","ActionButton3_Icon","ActionButton4_Icon","ActionButton5_Icon","ActionButton6_Icon","ActionButton7_Icon"];this.ButtonClasses=["abIcon1","abIcon2","abIcon3","abIcon4","abIcon5","abIcon6","abIcon7"];this.pageType="WIDE";this.userButtonConfigSettings=null;}vmPAGE_CLASS.prototype.toggleSideBar=function(mode){var eSideBar01=$get("tdSideBar01");var eSideBar02=$get("tdSideBar02");var eSlideBtn=$get("imgSlideBtn");var eLegend=$get("tblLegend");if((mode!=undefined)||(mode>"")){this.SideBar=mode;}else{if(this.SideBar=="maximized"){this.SideBar="minimized";}else{this.SideBar="maximized";}}if(this.SideBar=="hidden"&&eLegend.className!="miscHidden"){eLegend.className="miscHidden";}else{if(this.SideBar!="hidden"&&eLegend.className=="miscHidden"){eLegend.className="Default";}}switch(this.SideBar){case"hidden":eSideBar01.style.display="none";eSideBar02.style.display="none";break;case"maximized":eSideBar01.style.display="";eSideBar02.style.display="";eSlideBtn.className="Slider_ToRight";break;case"minimized":eSideBar01.style.display="";eSideBar02.style.display="none";eSlideBtn.className="Slider_ToLeft";break;}resizePage();};vmPAGE_CLASS.prototype.switchTab=function(newTab,newPanel,source){var browser=navigator.appName;if((typeof (source)=="undefined")||(source==null)){source="TabSwitch";}if(this.activateButton(newTab,newPanel,source)){this.processExpandContractEvent("TabView");}if(newTab==this.CurrentTab){return false;}else{var eOld=$get(this.CurrentPanel);var eNew=$get(newPanel);eOld.style.display="none";eOld.style.visibility="hidden";eNew.style.display="";eNew.style.visibility="visible";if(($get(newTab)!=null)&&$get(newTab).style.display!="none"){eTab=$get(this.CurrentTab);if(eTab!=null){eTab.className=(this.CurrentTab=="sbTab0"?"SideBarTab2_Inactive":"SideBarTab2_Inactive");}eTab=$get(newTab);eTab.className=(newTab=="sbTab0"?"SideBarTab2_Active":"SideBarTab2_Active");}this.CurrentTab=newTab;this.CurrentPanel=newPanel;switch(newTab){case"sbTab2":displayReport();break;case"sbTab3":if(browser=="Netscape"){$get("hvSubTab3").style.overflow="";}break;}}switch(newTab){case"sbTab0":PageTracker("/Tab/Calculator");break;case"sbTab1":PageTracker("/Tab/Contact Me");break;case"sbTab2":PageTracker("/Tab/Market Trends");break;case"sbTab3":PageTracker("/Tab/Recent Sales");break;case"sbTab4":PageTracker("/Tab/Notify Me");break;case"sbTab5":PageTracker("/Tab/My Favorite");break;case"sbTab6":PageTracker("/Tab/Property Detail");break;}};vmPAGE_CLASS.prototype.activateButton=function(tabId,panelId,source){var switchTab=true;var buttonId=null;for(i=0;i<this.TabIds.length;i++){if(tabId!=null){if(tabId==this.TabIds[i]){buttonId=this.ButtonIds[i];break;}}}if(buttonId==null){return ;}if((tabId==this.CurrentTab)&&(source=="ButtonAction")){this.processExpandContractEvent();switchTab=false;}for(i=0;i<this.ButtonClasses.length;i++){var button=$get(this.ButtonIds[i]);if(button!=null){if(buttonId==this.ButtonIds[i]){if(button.className.indexOf("Active")==-1){button.className="ActionButton "+this.ButtonClasses[i]+"Active"+" ActionButtonSelect";}else{button.className="ActionButton "+this.ButtonClasses[i];}}else{button.className="ActionButton "+this.ButtonClasses[i];}}}return switchTab;};vmPAGE_CLASS.prototype.switchHomeValue=function(newPanel){if(newPanel!=this.HomeValuePanel){var eOld=$get(this.HomeValuePanel);var eNew=$get(newPanel);eOld.style.display="none";eNew.style.display="";this.HomeValuePanel=newPanel;}};vmPAGE_CLASS.prototype.showLightBox=function(isVisible,showProgress){var eLIGHTBOX=$get("divLightBox");var ePROGRESS=$get("divProgress");if(isVisible){eLIGHTBOX.style.top="0px";eLIGHTBOX.style.left="0px";eLIGHTBOX.style.width="100%";if(this.pageType=="WIDE"){ePROGRESS.style.left="100px";}else{ePROGRESS.style.left="10px";}ePROGRESS.style.width=document.getElementById("divPageContainer").offsetWidth-200;var ySize=document.documentElement.scrollHeight+safeNumber(window.scrollMaxY);eLIGHTBOX.style.height=ySize+"px";var App=$get("bdyMain");addCssClass(App,"HideSelect");eLIGHTBOX.style.display="";if(showProgress!=false){var yPos=(document.documentElement.scrollTop>0)?document.documentElement.scrollTop:window.pageYOffset;$get("divProgress").style.top=((document.documentElement.clientHeight/2)-25)+(safeNumber(yPos))+"px";ePROGRESS.style.display="";}}else{var App=$get("bdyMain");removeCssClass(App,"HideSelect");eLIGHTBOX.style.display="none";ePROGRESS.style.display="none";$get("divLightBox").className="Lightbox_Backdrop";$get("divProgress").className="Lightbox_Progress";$get("divInitMsg").style.display="none";$get("lblSearchProgressBar").style.display="";}};vmPAGE_CLASS.prototype.processExpandContractEvent=function(mode){if((mode!=undefined)||(mode!=null)){if(mode=="TabView"){this.toggleBirdseye("sbs",false);}}else{if(this.SideBar=="minimized"){this.toggleBirdseye("sbs",false);}else{this.toggleSideBar();}}};function hoverExtn_Dashboard_VM_miniMap(val){var m_VM_miniMap=document.getElementById("VM_miniMap");if(val==1){m_VM_miniMap.className="MSVE_MapStyle ms_pseudoHover";}else{if(val==2){m_VM_miniMap.className="MSVE_MapStyle";}}}function hoverExtn_Dashboard_VM_splitScreen(val){var m_VM_splitScreen=document.getElementById("VM_splitScreen");if(val==1){m_VM_splitScreen.className="MSVE_MapStyle ms_pseudoHover";}else{if(val==2){m_VM_splitScreen.className="MSVE_MapStyle";}}}vmPAGE_CLASS.prototype.toggleMiniMap=function(){var m_VM_miniMap=document.getElementById("VM_miniMap");if(this.m_isMiniMap==true){this.m_isMiniMap=false;TMAP.VEMap.HideMiniMap();m_VM_miniMap.style.fontWeight="normal";m_VM_miniMap.style.background="";}else{this.m_isMiniMap=true;TMAP.VEMap.ShowMiniMap(55,55);m_VM_miniMap.style.fontWeight="bold";m_VM_miniMap.style.background="url(img/mapImg/nav_select.gif) no-repeat center bottom";}};vmPAGE_CLASS.prototype.toggleBirdseye=function(mode,isVisible){if((mode!=undefined)||(mode!=null)||(mode!="")){this.Birdseye.Mode=mode;this.Birdseye.isVisible=isVisible;}else{if(isVisible!="undefined"){this.Birdseye.isVisible=isVisible;}else{this.Birdseye.isVisible=!this.Birdseye.isVisible;}}var eMap02=$get("divArea02");var eMSpcr=$get("divMapSpcr");var m_VM_splitScreen=document.getElementById("VM_splitScreen");if(this.Birdseye.isVisible==true){this.toggleSideBar("minimized");eMSpcr.style.display=(this.Birdseye.Mode=="sbs"?"":"none");eMap02.style.display="";if(VMM2==null){VMM2=new vmMAP_CLASS("VMM2","divMap02",VEMapStyle.Birdseye);}VMM2.LatLong=TMAP.VEMap.GetCenter();if(VMM2.Map==null){$get("divNoBirdsEye").appendChild(VEUTILS.NoBirdsEyeAvailable);$get("divLoadingBirdsEye").appendChild(VEUTILS.BirdsEyeLoading);VMM2.init(SplitViewPostProcessing);}if((TMAP.VEMap.GetMapStyle()==VEMapStyle.BirdseyeHybrid)||(TMAP.VEMap.GetMapStyle()==VEMapStyle.Hybrid)){VMM2.setMapStyle(VEMapStyle.BirdseyeHybrid);}else{VMM2.setMapStyle(VEMapStyle.Birdseye);}VMPAGE.displayBirdsEyeStatus("LoadingBirdsEye");if(m_VM_splitScreen!=null){m_VM_splitScreen.style.fontWeight="bold";m_VM_splitScreen.style.background="url(img/mapImg/nav_select.gif) no-repeat center bottom";}window.setTimeout("VMM2.syncMap();",1000);VMPAGE.pinBirdseye();PageTracker("/Map/MapView/SplitOptionClick");}else{showElement("divMapSpcr",false);showElement("divArea02",false);showElement("divArea03",false);showElement("divArea04",false);this.toggleSideBar("maximized");resizePage();if(m_VM_splitScreen!=null){m_VM_splitScreen.style.fontWeight="normal";m_VM_splitScreen.style.background="";}}};vmPAGE_CLASS.prototype.displayBirdsEyeStatus=function(displayIt){if(displayIt=="NoBirdsEye"){showElement("divArea02",false);showElement("divArea03",true);showElement("divArea04",false);}else{if(displayIt=="LoadingBirdsEye"){showElement("divArea02",false);showElement("divArea03",false);showElement("divArea04",true);}else{showElement("divArea02",true);showElement("divArea03",false);showElement("divArea04",false);}}};vmPAGE_CLASS.prototype.pinBirdseye=function(){var oCoords=new VELatLong(PIR.SubjectProperty.Geocode.Latitude,PIR.SubjectProperty.Geocode.Longitude);var oPin=new VEShape(VEShapeType.Pushpin,oCoords);oPin.SetCustomIcon(GetPushpin(0,"PushPin_SP","PinIconSP","SUBJECT_PROPERTY",0,-15));VMM2.Map.SetShapesAccuracy(VEShapeAccuracy.Pushpin);VMM2.Map.AddShape(oPin);resizePage();};function vmMAP_CLASS(id,container,mapStyle){this.Container=container;this.ID=id;this.Map=null;this.LatLong=null;this.Orientation=VEOrientation.North;this.isLinked=false;this.HideDashboard=true;this.MapStyle=mapStyle;this.CustomControl=null;}vmMAP_CLASS.prototype.init=function(postProcessing){this.Map=new VEMap(this.Container);if(this.HideDashboard){this.Map.HideDashboard();}if((postProcessing!=undefined)&&(postProcessing!=null)&&(postProcessing!="")){this.Map.onLoadMap=postProcessing;}this.Map.LoadMap(this.LatLong,18,this.MapStyle,false,VEMapMode.Mode2D,false,0);};vmMAP_CLASS.prototype.setOrientation=function(dir){switch(dir){case"N":this.Orientation=VEOrientation.North;break;case"S":this.Orientation=VEOrientation.South;break;case"E":this.Orientation=VEOrientation.East;break;case"W":this.Orientation=VEOrientation.West;break;default:this.Orientation=VEOrientation.North;break;}VMM2.Map.SetBirdseyeOrientation(this.Orientation);VMM2.Orientation=this.Orientation;};vmMAP_CLASS.prototype.syncMap=function(){VMM2.LatLong=TMAP.VEMap.GetCenter();var tmpBE1;var tmpBE2;var teMapStyle=TMAP.VEMap.GetMapStyle();if(TMAP.VEMap.IsBirdseyeAvailable()){VMPAGE.displayBirdsEyeStatus("BirdsEye");}else{VMPAGE.displayBirdsEyeStatus("NoBirdsEye");}if((teMapStyle==VEMapStyle.BirdseyeHybrid)||(teMapStyle==VEMapStyle.Hybrid)){VMM2.setMapStyle(VEMapStyle.BirdseyeHybrid);}else{VMM2.setMapStyle(VEMapStyle.Birdseye);}if(isMapStyleBirdEye(VMM2.MapStyle)){try{tmpBE1=TMAP.VEMap.GetBirdseyeScene().GetID();}catch(ex){return false;}try{tmpBE2=VMM2.Map.GetBirdseyeScene().GetID();}catch(ex){tmpBE2=null;}if(tmpBE1!=tmpBE2){try{var centerPoint=TMAP.VEMap.GetCenter();var zoomLevel=VMM2.Map.GetZoomLevel();VMM2.Map.SetBirdseyeScene(centerPoint,VMM2.Orientation,zoomLevel,SplitScreenViewCallBack);}catch(ex){alert("Exception Setting Right getting BirdEyeScene. "+ex.message);}}else{try{VMM2.Map.SetCenter(VMM2.LatLong);}catch(ex){alert("Exception Setting Right maps center point. "+ex.message);}}}else{try{VMM2.Map.SetCenter(VMM2.LatLong);}catch(ex){}}};vmMAP_CLASS.prototype.setMapStyle=function(mapStyle){this.MapStyle=mapStyle;this.Map.SetMapStyle(mapStyle);};function SplitScreenViewCallBack(){}function SplitViewPostProcessing(){if(TMAP.VEMap.IsBirdseyeAvailable()){$get("divMap02").appendChild(VEUTILS.SplitScreenToolBar);VMPAGE.displayBirdsEyeStatus("BirdsEye");setBirdsToolBarButtonState(VMM2);}resizePage();}function vmTOOLTIP_CLASS(){this.TimerID=false;this.DisplayElem="";this.Rendering=false;this.Property={Address:"",Zip:""};this.nullDateYear=1753;}vmTOOLTIP_CLASS.prototype.Display=vmtooltip_prototype_display;vmTOOLTIP_CLASS.prototype.Cancel=vmtooltip_prototype_cancel;vmTOOLTIP_CLASS.prototype.Hide=vmtooltip_prototype_hide;vmTOOLTIP_CLASS.prototype.Initiate=vmtooltip_prototype_initiate;vmTOOLTIP_CLASS.prototype.SwitchTab=vmtooltip_prototype_switchtab;vmTOOLTIP_CLASS.prototype.searchProperty=vmtooltip_prototype_searchproperty;vmTOOLTIP_CLASS.prototype.getSoldDate=vmtooltip_prototype_getSoldDate;function vmtooltip_prototype_switchtab(index){try{$get("ToolTipTab1").className=(index==1?"ToolTipTab1_Active":"ToolTipTab1_Inactive");}catch(ex){}try{$get("ToolTipTab2").className=(index==2?"ToolTipTab2_Active":"ToolTipTab2_Inactive");}catch(ex){}try{$get("ToolTipTab3").className=(index==3?"ToolTipTab3_Active":"ToolTipTab3_Inactive");}catch(ex){}try{$get("ToolTipPanel1").style.display=(index==1?"":"none");}catch(ex){}try{$get("ToolTipPanel2").style.display=(index==2?"":"none");}catch(ex){}try{$get("ToolTipPanel3").style.display=(index==3?"":"none");}catch(ex){}}function vmtooltip_prototype_initiate(elem,propIndex,propType,xOffset,yOffset){if(VMHOVER.TimerID!=false){self.clearTimeout(VMHOVER.TimerID);VMHOVER.TimerID=false;}VMHOVER.X=getPos(elem,"left")+(isNaN(xOffset)?0:xOffset);VMHOVER.Y=getPos(elem,"top")+(isNaN(yOffset)?0:yOffset);VMHOVER.Index=propIndex;VMHOVER.Type=propType;VMHOVER.TimerID=self.setTimeout("VMHOVER.Display()",100);}function vmtooltip_prototype_cancel(){if(this.TimerID!=false){self.clearTimeout(this.TimerID);this.TimerID=false;}}function getPropCharText(prop){var chars=new Array();if(prop.BedroomCount>0){chars.push(formatNumber(prop.BedroomCount,false,true)+" beds");}if(prop.BathroomCount>0){try{chars.push(safeNumber(prop.BathroomCount,false,true)+" baths");}catch(ex){}}else{if(prop.Baths!=null&&prop.Baths.length>0){chars.push(safeString(prop.Baths,false,true)+" baths");}}if(typeof prop.LivingArea!="undefined"){if(isNaN(prop.LivingArea)){if((prop.LivingArea!=null)&&(prop.LivingArea!="")){chars.push(prop.LivingArea+" sq. ft.");}}else{if(prop.LivingArea>0){chars.push(formatNumber(prop.LivingArea,true,false)+" sq ft");}}}return chars.join(" / ");}function vmtooltip_prototype_display(){var appContent=document.getElementById("divAppContent");var buffer="<table class='Default ToolTip_Content' style='width:100%'>";var tmpObj=null;var propHeader="";var priceDescr="";var propValue=appContent.getAttribute("NoValuation");var propDetail="";var soldDate="";var yOffset=21;var yOffset2=0;var initCmd="";var boldPrice=false;var unit="";switch(this.Type){case SUBJECT_PROPERTY:var valuelbl=appContent.getAttribute("ValueDescr");if(PIR.SubjectProperty.IsListing==true&&VMPREFS.EstimatedLabel!=""){valuelbl=VMPREFS.EstimatedLabel;}priceDescr="<b>"+valuelbl+":</b>";boldPrice=true;prop=PIR.SubjectProperty;if(prop.DisplayPrice>0){propValue=formatCurrency(prop.DisplayPrice);}propDetail=getPropCharText(PIR.SubjectProperty);var tmpObj=$get("divToolTipContainer");var tmplt;tmplt=(VMTMPLT["SP"]!=null?VMTMPLT["SP"]:VMTMPLT["STD"]);tmpObj.innerHTML=tmplt;var tmpCtl=$get("fldToolTipOffest");yOffset=(tmpCtl!=null?parseInt(tmpCtl.value):21);soldDate=vmtooltip_prototype_getSoldDate(prop);break;case PARCEL:priceDescr=appContent.getAttribute("hoverboxsalepricekey_subject");prop=PARCELS[this.Index.replace(/\%7C/g,"|")];if(prop.Value>0){propValue=(prop.MinValue==prop.MaxValue?formatCurrency(prop.Value):"Units from "+formatCurrency(prop.MinValue)+" to "+formatCurrency(prop.MaxValue));}propHeader="";yOffset2=5;var tmpObj=$get("divToolTipContainer");var tmplt;tmplt=(VMTMPLT["PCL"]!=null?VMTMPLT["PCL"]:VMTMPLT["STD"]);tmpObj.innerHTML=tmplt;var tmpCtl=$get("fldToolTipOffest");yOffset=(tmpCtl!=null?parseInt(tmpCtl.value):21);soldDate="";break;case MLS_LISTING:propHeader=appContent.getAttribute("HoverBoxHeaderKey_Listing");priceDescr=appContent.getAttribute("HoverBoxSalePriceKey_Listing");prop=PIR.NearbyListings[this.Index];if(prop.DisplayPrice>0){propValue=formatCurrency(prop.DisplayPrice);}propDetail=getPropCharText(prop);var tmpObj=$get("divToolTipContainer");var tmplt;tmplt=(VMTMPLT["MLS"]!=null?VMTMPLT["MLS"]:VMTMPLT["STD"]);tmpObj.innerHTML=tmplt;var tmpCtl=$get("fldToolTipOffest");yOffset=(tmpCtl!=null?parseInt(tmpCtl.value):21);PageTracker("/Map/HomePopup/HomeForSalePopupClick");soldDate="";break;case COMPARABLE_SALE:propHeader=appContent.getAttribute("HoverBoxHeaderKey_Comparable");priceDescr=appContent.getAttribute("HoverBoxSalePriceKey_Comparable");prop=PIR.ComparableSales[this.Index];if(prop.DisplayPrice>0){propValue=formatCurrency(prop.DisplayPrice);}propDetail=getPropCharText(prop);var tmpObj=$get("divToolTipContainer");var tmplt;tmplt=(VMTMPLT["CS"]!=null?VMTMPLT["CS"]:VMTMPLT["STD"]);tmpObj.innerHTML=tmplt;var tmpCtl=$get("fldToolTipOffest");yOffset=(tmpCtl!=null?parseInt(tmpCtl.value):21);PageTracker("/Map/HomePopup/RecentSalesPopupClick");soldDate=vmtooltip_prototype_getSoldDate(prop);break;}if(prop.StreetLine1!=null){if(prop.Unit==null){unit="";}else{unit=prop.Unit;}}if(this.Type==PARCEL&&(prop.MinValue!=prop.MaxValue)){unit="";}var str_street="";if(prop.StreetLine1!=null&&unit!=""){var split_arr=prop.StreetLine1.split(" ");if(split_arr.length>0){for(var cnt=0;cnt<split_arr.length;cnt++){if(cnt==0||cnt==1||cnt==2){continue;}else{str_street+=split_arr[cnt]+" ";}}}var pos=str_street.indexOf(unit);if(pos==-1){unit=prop.Unit;}else{unit="";}}buffer+="<tr><td>"+propHeader+"</td><td style='width:15px' align='right'>"+"<img onclick='VMHOVER.Hide();' class='Close_Button' src='img/1x1.gif'>"+"</td></tr>";yOffset+=12;if(propHeader>""){buffer+="<tr style='height:4px;'><td><img src='img/1x1.gif'/></td></tr>";yOffset+=4;}var propSpan="<span class='ToolTip_Content_Large'>";var propOffset=16;if(this.Type==PARCEL){propSpan="<span>";propOffset=12;}if(prop.StreetLine1!=null){if(this.Type!=MLS_LISTING){buffer+="<tr><td colspan='2'>"+propSpan+prop.StreetLine1+" "+unit+"</span></td></tr>";}else{buffer+="<tr><td colspan='2'>"+propSpan+prop.StreetLine1+"</span></td></tr>";}yOffset+=propOffset;}var strCityStateZip=formatCityStateZip(prop.City,prop.State,prop.ZIP);buffer+="<tr><td colspan='2'>"+propSpan+strCityStateZip+"</span></td></tr>";yOffset+=propOffset;if(strCityStateZip.length>32){yOffset+=propOffset;}if((prop.CountyName!=null)&&(prop.CountyName!="")){buffer+="<tr><td colspan='2'>"+propSpan+"County: "+prop.CountyName+"</span></td></tr>";yOffset+=propOffset;}if(!((VMPREFS.soldData.toUpperCase()=="TRUE")&&(this.Type==COMPARABLE_SALE))){if(VMPREFS.Tab.Tab0=="true"){buffer+="</td></tr>"+"<tr style='hieght:10px'><td colspan='2' "+(boldPrice==true?"style='font-weight:bold'":"")+">"+propSpan+(this.Type==SUBJECT_PROPERTY?'<a title="'+$get("lblEstValueTitle").innerText+"\" onclick=\"if (VMPAGE.CurrentTab == 'sbTab0') { alert('You can adjust the property value using the selected panel on the right side of the screen');} VMPAGE.switchTab('sbTab0', 'sbPanel0'); HV_setActivePanel($get('HVPanel0'),'hvSubTab0', true);PageTracker('/Map/HomePopup/ProjectedValueClick');\" style=\"color:blue\">":"")+priceDescr+'&nbsp;<span id="lblTooltipValue">'+propValue+"</span>"+(this.Type==SUBJECT_PROPERTY?"</a>":"")+"</span></td></tr>";}else{buffer+="</td></tr>"+"<tr style='hieght:10px'><td colspan='2' "+(boldPrice==true?"style='font-weight:bold'":"")+">"+propSpan+priceDescr+'&nbsp;<span id="lblTooltipValue">'+propValue+"</span>"+"</span></td></tr>";}yOffset+=propOffset;}if(this.Type==COMPARABLE_SALE){if(soldDate>""){buffer+="<tr><td colspan='2'>"+propSpan+soldDate+"</span></td></tr>";yOffset+=propOffset;}}if(propDetail>""){buffer+="<tr><td colspan='2'>"+propSpan+"<span id='lblTooltipPropDetail'>"+propDetail+"</span></span></td></tr>";yOffset+=propOffset;}if(this.Type==SUBJECT_PROPERTY){if(soldDate>""){buffer+="<tr><td colspan='2'>"+propSpan+soldDate+"</span></td></tr>";yOffset+=propOffset;}}if(this.Type==MLS_LISTING){var strOfferedBy="";if(VMPREFS.broker=="true"){strOfferedBy=prop.Broker;}else{if(VMPREFS.broker=="false"&&VMPREFS.agent=="true"){strOfferedBy=prop.ListingAgent;}}if(strOfferedBy!=""){buffer+="<tr><td colspan='2'>"+"Offered By : "+strOfferedBy+"</td></tr>";}else{buffer+="<tr><td colspan='2'>"+"&nbsp;&nbsp;"+"</td></tr>";}yOffset+=12;if(strOfferedBy.length>30){yOffset+=10;}}if(VMPREFS.ToolTip.ShowLinks==true&&this.Type==SUBJECT_PROPERTY){buffer+="<tr style='height:8px;'><td><img src='img/1x1.gif'></td></tr>";yOffset+=8;if(PIR.NearbyListings.length>0){tmpObj='<a style="color:blue" onclick="filterPropertyList(\'MLS\');return false;">'+document.getElementById("lblHomesForSale").innerText+"</a>";buffer+="<tr><td colspan='2' align='left'><div id='homeforSale'>"+tmpObj+"</div></td></tr>";tmpObj=null;yOffset+=12;}if(PIR.ComparableSales.length>0&&VMPREFS.Tab.Tab3=="true"){tmpObj='<a style="color:blue" onclick="filterPropertyList(\'CS\');return false;">'+document.getElementById("lblRecentSalesLink").innerText+"</a>";buffer+="<tr><td colspan='2' align='left'><div id='recentlysold'>"+tmpObj+"</div></td></tr>";yOffset+=12;tmpObj=null;}}if(VMPREFS.ToolTip.SearchProperty==true&&this.Type!=SUBJECT_PROPERTY){buffer+="<tr style='height:8px;'><td><img src='img/1x1.gif'></td></tr>";yOffset+=8;if(this.Type!=MLS_LISTING){this.Property.Address=prop.StreetLine1+""+unit;}else{this.Property.Address=prop.StreetLine1;}this.Property.Zip=prop.ZIP;tmpObj='<div class="applyLink"><a style="color:blue" onclick="openEquityLink();">'+$get("lblApplyLink").innerText+" "+$get("lblEquityLink").innerText+"</a></div>";buffer+="<tr><td colspan='2' align='left'>"+tmpObj+"</td></tr>";yOffset+=12;buffer+="<tr><td colspan='2' align='left'>"+"&nbsp;"+"</td></tr>";tmpObj='<a style="color:blue; font-size: 10pt; font-weight: bold;" onclick="VMHOVER.searchProperty();return false;PageTracker(\'/Map/HomePopup/SearchPropertyLinkClick\');">'+document.getElementById("lblSearchProp").innerText+"</a>";buffer+="<tr><td colspan='2' align='left'>"+tmpObj+"</td></tr>";yOffset+=16;tmpObj=null;}else{if(VMPREFS.Tab.Tab4=="true"){buffer+="<tr><td colspan='2' align='left'><div id='notifyMe'><a style=\"color:blue\" onclick=\"VMPAGE.switchTab('sbTab4', 'sbPanel4');PageTracker('/Map/HomePopup/NotifyMeLinkClick');\">"+document.getElementById("lblNotifySales").innerText+"</a></div></td></tr>";}if(VMPREFS.Tab.Tab6=="true"){if(VMPAGE.pageType=="WIDE"){yOffset+=12;buffer+="<tr><td colspan='2' align='left'><div id='propDetail'><a style=\"color:blue\" onclick=\"VMPAGE.switchTab('sbTab6', 'sbPanel6');PageTracker('/Map/HomePopup/PropertyDetailLink');\">"+document.getElementById("lblPropDetail").innerText+"</a></div></td></tr>";}else{if(VMPREFS.ParentCode==""){yOffset+=12;buffer+="<tr><td colspan='2' align='left'><div id='propDetail'><a style=\"color:blue\" onclick=\"VMPAGE.switchTab('sbTab6', 'sbPanel6');PageTracker('/Map/HomePopup/PropertyDetailLink');\">"+document.getElementById("lblPropDetail").innerText+"</a></div></td></tr>";}}}}yOffset+=12;tmpObj=$get("divToolTipContent");tmpObj.innerHTML=buffer;if(this.Type==SUBJECT_PROPERTY){try{$get("ToolTip_fldSubject").value=prop.StreetLine1+" "+unit;}catch(ex){}try{$get("ctlEmailAgent_fldSubject").value=prop.StreetLine1+" "+unit;}catch(ex){}}this.Rendering=true;if((!isNaN(this.X))&&(!isNaN(this.Y))){tmpObj=$get("divToolTip");tmpObj.style.left=this.X-9;tmpObj.style.top=this.Y-yOffset-yOffset2;try{tmpObj=$get("ToolTip_ContentRow");tmpObj.style.height=yOffset-39;}catch(ex){}showElement("divToolTip",true);var tmpX=getPos(document.getElementById("divToolTip"),"left");var tmpY=getPos(document.getElementById("divToolTip"),"top");tmpObj=$get("divToolTip_Arrow");tmpObj.style.left=(tmpX+25)+"px";tmpObj.style.top=tmpY+yOffset-9;showElement("divToolTip_Arrow",true);}this.DisplayElem="";this.Rendering=false;if(typeof (THEME_afterDisplay)=="function"){THEME_afterDisplay();}}function vmtooltip_prototype_hide(){if(this.Rendering==false&&document.getElementById("divToolTip")!=null){this.Cancel();showElement("divToolTip",false);showElement("divToolTip_Arrow",false);}}function vmtooltip_prototype_searchproperty(){if(this.Property.Address>""){if(TWOFLDS==true){$get("txtStreetAddress").value=this.Property.Address;$get("txtCityStateZip").value=this.Property.Zip;performSearch(SEARCH_TYPE_NEW,null);}else{$get("txtStreetAddress").value=this.Property.Address+","+this.Property.Zip;performSearch(SEARCH_TYPE_NEW,null);}switch(this.Type){case MLS_LISTING:PageTracker("/Map/Home_For_Sale_Popup/SearchPropertyLinkClick");break;case COMPARABLE_SALE:PageTracker("/Map/Home_Recent_Sold_Popup/SearchPropertyLinkClick");break;case PARCEL:PageTracker("/Map/Pacel_Value_Popup/SearchPropertyLinkClick");break;}}}function vmtooltip_prototype_getSoldDate(prop){var appContent=document.getElementById("divAppContent");var soldDate="";try{if(prop.MostRecentSaleDate.getFullYear()!=this.nullDateYear&&prop.MostRecentSaleDate.getFullYear()!=1){soldDate=appContent.getAttribute("HoverBoxSoldDateKey")+"&nbsp;"+MONTH_NAMES[prop.MostRecentSaleDate.getMonth()+12]+"-"+prop.MostRecentSaleDate.getFullYear();}else{soldDate="";}}catch(error){var strReplaceAll=prop.MostRecentSaleDate;var intIndexOfMatch=strReplaceAll.indexOf("@");while(intIndexOfMatch!=-1){strReplaceAll=strReplaceAll.replace("@","");intIndexOfMatch=strReplaceAll.indexOf("@");}var mostRecentSaleDate=new Date(parseInt(strReplaceAll));soldDate=appContent.getAttribute("HoverBoxSoldDateKey")+"&nbsp;"+MONTH_NAMES[mostRecentSaleDate.getMonth()+12]+"-"+mostRecentSaleDate.getFullYear();}return soldDate;}function vmTIMER_CLASS(){var currentSearch=null;var searches=new Array();var debugOn=false;this.startSearch=function startSearch(searchType,streetAddress,cityStateZip){if(debugOn){currentSearch={searchType:"",streetAddress:"",cityStateZip:"",startTime:null,endTime:null,steps:null};currentSearch.searchType=searchType;currentSearch.streetAddress=streetAddress;currentSearch.cityStateZip=cityStateZip;currentSearch.startTime=new Date();currentSearch.steps=new Array();searches.push(currentSearch);}};this.reset=function reset(){searches=new Array();updateDebugConsole();};this.searchStep=function searchStep(notes){if(debugOn){var step={timestamp:null,notes:""};step.notes=notes;step.timestamp=new Date();currentSearch.endTime=step.timestamp;currentSearch.steps.push(step);}};this.getElapsedTime=function getElapsedTime(fromDateTime,toDateTime){var time=Math.abs(toDateTime.getTime()-fromDateTime.getTime());return(time);};this.currentSearchElapsedTime=function currentStepElapsedTime(){return getElapsedTime(currentSearch.startTime,new Date());};this.getReportHTML=function getReportHTML(){var report="<table border='1' cellspacing='2'>";var totalSearchTime=0;report+="<tr>";report+="<td>Type</td>";report+="<td>Street</td>";report+="<td>CityStateZIP</td>";report+="<td>Start</td>";report+="<td>End</td>";report+="<td>Elapsed Time</td>";report+="<td>Steps</td>";report+="</tr>";for(var i=0;i<searches.length;i++){report+="<tr>";report+="<td>"+searches[i].searchType+"</td>";report+="<td>"+searches[i].streetAddress+"</td>";report+="<td>"+searches[i].cityStateZip+"</td>";report+="<td>"+searches[i].startTime+"</td>";report+="<td>"+searches[i].endTime+"</td>";var searchTime=getElapsedTime(searches[i].startTime,searches[i].endTime);totalSearchTime+=searchTime;report+="<td>"+searchTime.toString()+"ms.</td>";report+="<td><table border='1'>";for(var j=0;j<searches[i].steps.length;j++){report+="<tr>";report+="<td>"+searches[i].steps[j].notes+"</td>";report+="<td>"+searches[i].steps[j].timestamp.toString()+"</td>";report+="</tr>";}report+="</table></td>";report+="</tr>";}report+="</table>";report+="<br>Number of Searches: "+searches.length.toString();report+="<br>Total Elapsed Time: "+totalSearchTime.toString()+" ms.";report+="<br>Average Search Time: "+(totalSearchTime/searches.length).toString()+" ms.";return report;};this.toggleDebugConsole=function toggleDebugConsole(){var layer=$get("debugConsole");if(layer.style.display!=null&&layer.style.display=="none"){this.updateDebugConsole();showElement("debugConsole",true);debugOn=true;}else{showElement("debugConsole",false);debugOn=false;}};this.updateDebugConsole=function updateDebugConsole(){if(debugOn){$get("debugContents").innerHTML=VMTIMER.getReportHTML();}};}

function sendMail(ctlname,toField,emailCode){var emailType;var fldTo;var fldToName;if((toField!=undefined)){fldTo=toField;emailType="AGENT";}else{fldTo=$get(ctlname+"_fldTo").value;fldToName=$get(ctlname+"_fldToName").value;emailType="PROPERTY";}var fldFrom1=$get(ctlname+"_fldFrom1").value;var fldFrom2=$get(ctlname+"_fldFrom2").value;var fldCCMyself=$get(ctlname+"_fldCCMyself").checked;var fldSubject=$get(ctlname+"_fldSubject").value;var fldComment=$get(ctlname+"_fldComment").value;if(fldTo==""||fldTo==null){alert("Please enter recipient's email address.");$get(ctlname+"_fldTo").focus();return false;}else{switch(emailType){case"PROPERTY":ValueMapService.EmailProperty(VMPREFS.LicenseCode,fldToName,PIR.RequestID,fldTo,fldFrom2,fldFrom1,PIR.SubjectProperty,fldCCMyself,fldSubject,fldComment,VMPREFS.linkBackPage,emailCode,sendMail_Handler_Success,sendMail_Handler_Failure);break;case"AGENT":ValueMapService.EmailAgent(VMPREFS.LicenseCode,PIR.RequestID,fldTo,fldFrom2,fldFrom1,PIR.SubjectProperty,fldCCMyself,fldSubject,fldComment,toField,VMPREFS.linkBackPage,emailCode,sendMail_Agent_Handler_Success,sendMail_Agent_Handler_Failure);break;default:alert("Invalid Email Type.  Email Not Sent");return false;}var bufferH="[";var bufferI="";try{if($get(ctlname+"_fldSaveInfo").checked){bufferI="{"+" ID: '"+VMPREFS.LicenseCode+"'"+",fldTo: '"+fldTo+"'"+",fldToName: '"+fldToName+"'"+",fldFrom1:'"+fldFrom1+"'"+",fldFrom2: '"+fldFrom2+"'"+",fldCCMyself: '"+fldCCMyself+"'"+",fldSubject: '"+fldSubject+"'"+",SearchDate: '"+new Date()+"'"+"}";bufferH+=bufferI;bufferH+="]";}else{bufferI="{"+" ID: '"+VMPREFS.LicenseCode+"'"+",fldTo: 'n/a'"+",fldToName: 'n/a'"+",fldFrom1:'n/a'"+",fldFrom2: 'n/a'"+",fldCCMyself: 'n/a'"+",fldSubject: 'n/a'"+",SearchDate: '"+new Date()+"'"+"}";bufferH+=bufferI;bufferH+="]";}setCookie("VM_EMAIL_INFO_"+ctlname,bufferH,180,"","",false);}catch(err){}initEmail();}PageTracker("/Tab/Contact Me/Email Report");}function previewMail(ctlname,toField){var emailType;var fldTo;var fldToName;if((toField!=undefined)){fldTo=toField;emailType="AGENT";}else{fldTo=$get(ctlname+"_fldTo").value;fldToName=$get(ctlname+"_fldToName").value;emailType="PROPERTY";}var fldFrom1=$get(ctlname+"_fldFrom1").value;var fldFrom2=$get(ctlname+"_fldFrom2").value;var fldCCMyself=$get(ctlname+"_fldCCMyself").checked;var fldSubject=$get(ctlname+"_fldSubject").value;var fldComment=$get(ctlname+"_fldComment").value;switch(emailType){case"PROPERTY":ValueMapService.EmailPropertyPreview(VMPREFS.LicenseCode,fldToName,fldTo,fldFrom2,fldFrom1,PIR.SubjectProperty,fldCCMyself,fldSubject,fldComment,previewMail_Handler_Success,previewMail_Handler_Failure);break;case"AGENT":ValueMapService.EmailAgentPreview(VMPREFS.LicenseCode,fldTo,fldFrom2,fldFrom1,PIR.SubjectProperty,fldCCMyself,fldSubject,fldComment,toField,previewMail_Handler_Success,previewMail_Handler_Failure);break;default:alert("Invalid Email Type.  Email Not Sent");return false;}}function sendMail_Handler_Success(resp){alert("Thank you, your email has been sent.");initEmail();toggleTooltipEmailView();}function sendMail_Handler_Failure(resp){alert("I'm sorry, but there was a problem sending your email.\n"+resp._message);}function sendMail_Agent_Handler_Success(resp){alert("Thank you, your email has been sent.");if($get("ctlEmailAgent_fldSaveInfo").checked==false){$get("ctlEmailAgent_fldFrom1").value="";$get("ctlEmailAgent_fldFrom2").value="";$get("ctlEmailAgent_fldComment").value="";}}function sendMail_Agent_Handler_Failure(resp){alert("I'm sorry, but there was a problem sending your email.\n"+resp._message);}var Browser={Version:function(){var version=999;if(navigator.appVersion.indexOf("MSIE")!=-1){version=parseFloat(navigator.appVersion.split("MSIE")[1]);}return version;}};var BrowserName={Name:function(){return navigator.appName;}};function previewMail_Handler_Success(resp){VMPAGE.showLightBox(true,false);var elem=$get("divEmailPreview");var e2=$get("divEmailContent");e2.innerHTML=resp;try{if(PIR.OriginalSubjectProperty.CurrentValue<=0){$get("previewValueDescr").innerHTML=$get("divAppContent").getAttribute("ValueDescr");}else{$get("previewValueDescr").innerHTML=$get("lblValueLabel").innerText;}}catch(ex){}elem.style.top=((document.documentElement.clientHeight/2)-150)+"px";elem.style.display="";if(VMPAGE.pageType=="MINI"){if(BrowserName.Name()=="Microsoft Internet Explorer"){if(Browser.Version()>7){elem.style.marginLeft="40%";}}else{elem.style.marginLeft="30%";}}else{if(BrowserName.Name()=="Microsoft Internet Explorer"){if(Browser.Version()>7){elem.style.marginLeft="40%";}}else{elem.style.marginLeft="30%";}}}function previewMail_Handler_Failure(resp){}function closeEmailPreview(){$get("divEmailPreview").style.display="none";$get("PreviewDescr").style.display="";VMPAGE.showLightBox(false);}function initEmail(){var buffer=(VMPREFS.emailSubject==""?"@SUBJECT":VMPREFS.emailSubject);var appContent=document.getElementById("divAppContent");buffer=buffer.replace(/@SUBJECT/gi,PIR.SubjectProperty.StreetLine1);var valuelbl=appContent.getAttribute("ValueDescr");var prop=PIR.SubjectProperty;var displayPrice;if(prop.DisplayPrice==0){displayPrice="Not Available";}else{displayPrice=formatCurrency(prop.DisplayPrice);}if(PIR.SubjectProperty.IsListing==true&&VMPREFS.EstimatedLabel!=""){valuelbl=VMPREFS.EstimatedLabel;}var tmpAddr=prop.StreetLine1+" "+(prop.Unit==null?"":prop.Unit)+"<br>"+formatCityStateZip(prop.City,prop.State,prop.ZIP)+"<br>"+valuelbl+" : "+displayPrice+"<br>"+getPropCharText(prop)+"<br><br>";$get("ctlNotifyMe_AddressView").innerHTML=tmpAddr;}function subscribeNearbySalesNotifications(){if($get("ctlNotifyMe_fldEmail").value==""||$get("ctlNotifyMe_fldEmail").value==null){alert("Please enter an email address.");$get("ctlNotifyMe_fldEmail").focus();return false;}else{ValueMapService.SubscribeToSalesNotifications(VMPREFS.LicenseCode,$get("ctlNotifyMe_fldEmail").value,$get("ctlNotifyMe_fldMyName").value,PIR.SubjectProperty,VMPAGE.pageType,subscribe_Handler_Success,subscribe_Handler_Failure);}PageTracker("/Tab/Notify Me/Subscribe");}function subscribe_Handler_Success(resp){alert("Thank you for subscribing.Please check your email to activate your subscription.");}function subscribe_Handler_Failure(resp){alert(resp._message);}function toggleTooltipEmailView(){var tbl=$get("tblTooltipEmail");var arrow=$get("divToolTip_Arrow");tbl.style.display=(tbl.style.display=="none"?"":"none");arrow.style.display=(arrow.style.display=="none"?"":"none");var idx=VMPREFS.LicenseCode;var EMISENDTO=null;var emiTooltip=getCookie("VM_EMAIL_INFO_ToolTip");if(emiTooltip!=null){EMISENDTO=eval(emiTooltip);if(idx!="null|null"&&EMISENDTO!=null){for(var cnt=0;cnt<EMISENDTO.length;cnt++){if(EMISENDTO[cnt].ID==idx){$get("ToolTip_fldToName").value=(EMISENDTO[cnt].fldToName=="n/a"?"":EMISENDTO[cnt].fldToName);$get("ToolTip_fldTo").value=(EMISENDTO[cnt].fldTo=="n/a"?"":EMISENDTO[cnt].fldTo);$get("Tooltip_fldFrom1").value=(EMISENDTO[cnt].fldFrom1=="n/a"?"":EMISENDTO[cnt].fldFrom1);$get("Tooltip_fldFrom2").value=(EMISENDTO[cnt].fldFrom2=="n/a"?"":EMISENDTO[cnt].fldFrom2);$get("Tooltip_fldCCMyself").checked=(EMISENDTO[cnt].fldCCMyself=="n/a"?"":EMISENDTO[cnt].fldCCMyself);$get("Tooltip_fldSaveInfo").checked=(EMISENDTO[cnt].fldFrom1=="n/a"?false:true);$get("ToolTip_fldComment").value="";}else{$get("ToolTip_fldToName").value="";$get("ToolTip_fldTo").value="";$get("ToolTip_fldFrom1").value="";$get("ToolTip_fldFrom2").value="";$get("ToolTip_fldCCMyself").checked=true;$get("ToolTip_fldSaveInfo").checked=true;$get("ToolTip_fldComment").value="";}}}}}

var VMPAGE=null;var POINTS=new Array;var TMAP=null;var VMM2=null;var VEUTILS=null;var PIR=null;var VMHOVER=null;var VMTIMER=null;var VMPREFS=null;var VMGUIDES={ValuationX:0,LoginStatusX:0};var TICKER=null;var TWOFLDS=true;var VMTMPLT=new Object();var splitScreenHieght="456px";function initialize(){VMPAGE=new vmPAGE_CLASS();VEUTILS=new vmVEUtils_CLASS();VMM2=new vmMAP_CLASS("VMM2","divMap02",VEMapStyle.Birdseye);VMHOVER=new vmTOOLTIP_CLASS();VMTIMER=new vmTIMER_CLASS();TICKER=new textScroller("TickerMsg",3000);var tmpData=eval("("+$get("sysPrefs").value+");");VMPREFS=new vmPREFS_CLASS();VMPREFS.Init(tmpData);if(VMPREFS.PropTicker=="false"){$get("TickerContainer").style.display="none";}VEUTILS.Init();$get("divContentWrapper").style.display="";var lghtbox=$get("divLightBox");var prgress=$get("divProgress");lghtbox.className="PageLoad_LightBox";prgress.className="PageLoad_Progress";$get("divInitMsg").style.display="";$get("lblSearchProgressBar").style.display="none";VMPAGE.showLightBox(true);if($get("lblPageMainHeader").innerText.length==0){$get("pageTitleFirstRow").style.height="0px";$get("pageTitleSecondRow").style.height="0px";}if(VMPREFS.enableParcelValues=="false"){enableLegendControl($get("ctlLegend_chkLegendShowAllProperties"),false,"imgText_Register");}window.setTimeout("initialize_step2()",300);document.title=LicenseeName;}function initialize_step2(){VMGUIDES.ValuationX=$get("dvXOffset").clientWidth;VMGUIDES.LoginStatusX=$get("dvLoginOffset").clientWidth;$get("divPositionGuides").style.display="none";resizePage();initPushPinStyles();updateReportDescr();if(setTWOFLDS==false){TWOFLDS=setTWOFLDS;$get("txtCityStateZip").style.visibility="hidden";$get("lblCityStateZip").style.visibility="hidden";$get("SampleCityState").style.visibility="hidden";$get("txtCityStateZip").style.display="none";$get("lblCityStateZip").style.display="none";$get("SampleCityState").innerText="";var x=document.getElementById("tblHeaderArea").rows[3].cells;x[0].colSpan="4";x[1].colSpan="1";x[2].colSpan="1";var y=document.getElementById("tblHeaderArea").rows[4].cells;y[0].colSpan="3";y[1].colSpan="1";y[2].colSpan="1";y[3].colSpan="1";$get("txtStreetAddress").style.width="460px";}$get("txtStreetAddress").onkeydown=captureFieldHotKey;if(TWOFLDS==true){$get("txtCityStateZip").onkeydown=captureFieldHotKey;$get("txtCityStateZip").style.display="";}initTemplates();TICKER.Content[0]="&nbsp;";TICKER.Content[1]="&nbsp;";TICKER.state=="stopped";TICKER.Initialize();if(doSearch==true){performSearch(SEARCH_TYPE_NEW,null);}else{if(VMPREFS.AutoSearch==true){searchPropertyHistory(0,true);}else{VMPAGE.showLightBox(false);$get("divLightBox").className="Lightbox_Backdrop";$get("divProgress").className="Lightbox_Progress";$get("divInitMsg").style.display="none";$get("lblSearchProgressBar").style.display="";}}if(typeof (THEME_Init)=="function"){THEME_Init();}VMPAGE.userButtonConfigSettings=parseUserDefinedConfiguration(UDBC1);if(VMPAGE.userButtonConfigSettings.displayButton.toLowerCase()=="no"){$get("UserJumpButton1").style.display="none";}initToolTipExtras();}function resizePage(){var eArea1=$get("tdMapContainer");var eMap01=$get("divMap01");var eMap02=$get("divMap02");var eMap03=$get("divNoBirdsEye");var eMap04=$get("divLoadingBirdsEye");var eMap05=$get("divFAQ");var eArea2=$get("divArea02");var eArea3=$get("divArea03");var eArea4=$get("divArea04");var eBEP;var yPos=(document.documentElement.scrollTop>0)?document.documentElement.scrollTop:window.pageYOffset;VMPAGE.CurrentWidth=document.body.clientWidth;VMPAGE.CurrentHeight=document.body.clientHeight;var mainC=$get("divPageContainer");var pageC=$get("divContentWrapper");var eMain=$get("divContent01");if(eMain.offsetWidth>VMPAGE.MaxWidth){eMain.style.width=VMPAGE.MaxWidth+"px";}try{$get("hdrContainer").style.width=eMain.style.width;}catch(ex){}var iWidth=eArea1.offsetWidth;if(VMPAGE.Birdseye.isVisible==false){eMap01.style.width=(eArea1.offsetWidth-8)+"px";}else{eMap01.style.width=((eArea1.offsetWidth/2)-12)+"px";eArea2.style.position="relative";eArea2.style.top="0px";eArea2.style.left="0px";eMap02.style.width=((eArea1.offsetWidth/2)-12)+"px";eMap02.style.height=eMap01.style.height;if(eMap02.style.height==""){eMap02.style.height=splitScreenHieght;}eArea3.style.position="relative";eArea3.style.top="0px";eArea3.style.left="0px";eMap03.style.width=((eArea1.offsetWidth/2)-12)+"px";eMap03.style.height=eMap01.style.height;if(eMap03.style.height==""){eMap03.style.height=splitScreenHieght;}eArea4.style.position="relative";eArea4.style.top="0px";eArea4.style.left="0px";eMap04.style.width=((eArea1.offsetWidth/2)-12)+"px";eMap04.style.height=eMap01.style.height;if(eMap04.style.height==""){eMap04.style.height=splitScreenHieght;}}if(eMap05!=null){eMap05.style.width=((eArea1.offsetWidth)-12)+"px";}$get("divContent02").style.width=$get("divContent01").offsetWidth;if(VMPAGE.MapSize.height!=eMap01.clientHeight||VMPAGE.MapSize.width!=eMap01.clientWidth){if(TMAP!=null){TMAP.VEMap.Resize(eMap01.clientWidth,eMap01.clientHeight);if(minimap_State==false){HideMiniMap(null);}else{ShowMiniMap(VEMiniMapSize.Small);}}if(VMPAGE.Birdseye.isVisible==true&&VMM2.Map!=null){VMM2.Map.Resize(eMap02.clientWidth,eMap02.clientHeight);}VMPAGE.MapSize.height=eMap01.clientHeight;VMPAGE.MapSize.width=eMap01.clientWidth;}$get("divProgress").style.top=((document.documentElement.clientHeight/2)-25)+(safeNumber(yPos))+"px";var frame=$get("propertyLinkedListFrame");if(frame.style.display==""){var elem=$get("txtStreetAddress");frame.style.left=(getPos(elem,"left")-16)+"px";}var anc=$get("ancTopRht");var bnd=$get("imgBranding01");if((anc!=null)&&(bnd!=null)){bnd.style.top=getPos(anc,"top")-28;bnd.style.left=getPos(anc,"left")-bnd.clientWidth+2;}var bnd=$get("divBranding02");if(bnd!=null){bnd.style.left=getPos($get("divContent01"),"left");}var elem=$get("divValuation");var pos1=getPos($get("divContent01"),"left");elem.style.left=pos1+VMGUIDES.ValuationX;var anc=$get("ancTopRht");var bnd=$get("divLoginStatus");if((anc!=null)&&(bnd!=null)){bnd.style.left=(getPos(anc,"left")-bnd.clientWidth+2)-VMGUIDES.LoginStatusX;}try{VMHOVER.Hide();}catch(ex){}if(minimap_State==false){HideMiniMap(null);}else{ShowMiniMap(VEMiniMapSize.Small);}if(TMAP!=null){TMAP.VEMap.Resize();}}function handleOnResizeEvent(){if((VMPAGE.CurrentWidth==document.body.clientWidth)&&(VMPAGE.CurrentHeight==document.body.clientHeight)){return ;}resizePage();}function scrollPage(){var yPos=(document.documentElement.scrollTop)?document.documentElement.scrollTop:window.pageYOffset;$get("divProgress").style.top=((document.documentElement.clientHeight/2)-25)+(safeNumber(yPos))+"px";$get("divEmailPreview").style.top=((document.documentElement.clientHeight/2)-125)+(safeNumber(yPos))+"px";}function displayParcelLayer(isVisible){if(isVisible){TMAP.SetParcelsEnabled(true);}else{TMAP.SetParcelsEnabled(false);}}function setFocusExt(option,target){switch(option){case"activate_value_tab":VMPAGE.switchTab("tab1","sbPanel1");VMPAGE.switchHomeValue("hvPanel0");break;default:break;}try{$get(target).focus();}catch(e){}}function changeMapStyle(styleID){TMAP.VEMap.SetMapStyle(styleID);}function captureFieldHotKey(e){var objSource=("undefined"==typeof (e))?event.srcElement:e.srcElement;var keyPressed=("undefined"==typeof (e))?event.keyCode:e.keyCode;if(keyPressed==13){try{$get("ancFoo").focus();}catch(e){}performSearch(SEARCH_TYPE_NEW,null);return false;}if(keyPressed==119){VMTIMER.toggleDebugConsole();return false;}}function initToolTipExtras(){var idx=VMPREFS.LicenseCode;var EMICONTACT=null;var EMISENDTO=null;var emiContact=getCookie("VM_EMAIL_INFO_ctlEmailAgent");var emiTooltip=getCookie("VM_EMAIL_INFO_ToolTip");try{if(emiContact!=null){EMICONTACT=eval(emiContact);if(idx!="null|null"&&EMICONTACT!=null){var bufferH="[";bufferI="{"+" ID: '"+VMPREFS.LicenseCode+"'"+",fldTo: 'n/a'"+",fldToName: 'n/a'"+",fldFrom1:'n/a'"+",fldFrom2: 'n/a'"+",fldCCMyself: 'n/a'"+",fldSubject: 'n/a'"+",SearchDate: '"+new Date()+"'"+"}";bufferH+=bufferI;bufferH+="]";setCookie("VM_EMAIL_INFO_ctlEmailAgent",bufferH,180,"","",false);}}if(emiTooltip!=null){EMISENDTO=eval(emiTooltip);if(idx!="null|null"&&EMISENDTO!=null){var bufferH="[";bufferI="{"+" ID: 'n/a'"+",fldTo: 'n/a'"+",fldToName: 'n/a'"+",fldFrom1:'n/a'"+",fldFrom2: 'n/a'"+",fldCCMyself: 'n/a'"+",fldSubject: 'n/a'"+",SearchDate: '"+new Date()+"'"+"}";bufferH+=bufferI;bufferH+="]";setCookie("VM_EMAIL_INFO_ToolTip",bufferH,180,"","",false);}}}catch(err){alert(err);}}function calcAvailEquity(ctlname){var isValid=true;try{isValid=Template_Validate();}catch(ex){}var propValue=safeNumber($get(ctlname+"_ecHomeValue").innerText);var loan1=safeNumber($get(ctlname+"_ecLoan1").value);var loan2=safeNumber($get(ctlname+"_ecLoan2").value);var loan3=safeNumber($get(ctlname+"_ecLoan3").value);var loanTTL=loan1+loan2+loan3;var at80;var at90;var at100;$get(ctlname+"_ecLoanTotal").innerText=formatNumber(loanTTL,true,true);if(loanTTL>propValue){loanTTL=propValue;at80=0;at90=0;at100=0;}else{at80=(0.8*propValue)-(loanTTL);at90=(0.9*propValue)-(loanTTL);at100=propValue-loanTTL;}citiMORTBAL=loanTTL;citiPROPVALUE=propValue;$get(ctlname+"_ecAvailAt80").innerText=formatNumber(Math.round(Math.floor(at80/1000)),true,true)+"k";$get(ctlname+"_ecAvailAt90").innerText=formatNumber(Math.round(Math.floor(at90/1000)),true,true)+"k";$get(ctlname+"_ecAvailAt100").innerText=formatNumber(Math.round(Math.floor(at100/1000)),true,true)+"k";try{if(!(propValue>0)){$get("CustomSidebarNote").innerHTML="<br/><div class='Title4'>"+"Unfortunately we don't have a value for this home.</div><br/>"+"<div class='Title5'>Give us a call to learn more about your home equity and our great rates.</div>";}else{if(at100<10000||isValid==false){$get("CustomSidebarNote").innerHTML="<div class='Title2'>"+"Go from equity in<br />"+"your home to cash in<br />"+"your hand."+"</div>"+"<br />"+"<div class='Title7'>Apply online or call us to take advantage of our low rates.</div>";}else{$get("CustomSidebarNote").innerHTML="<div class='Title3'>"+"Did you realize that"+"<br/>you have up to"+"<br/>$"+formatNumber(Math.round(Math.floor(at100)),true,true)+"<br/>in home equity?</div><br/>";}}}catch(ex){}}var HI_MARGINS={SqFt:0,Bed:0,Bath:0,Room:0};function improveHome(){if(HI_MARGINS.SqFt==0){ValueMapService.GetMarginalPrices(LicenseCode,PIR.RequestID,PIR.SubjectProperty.CurrentValue,improveHome_Handler,improveHome_Error);}}function improveHome_Error(err){alert("We're sorry, but an error has occurred while attempting to process your request.  Please try again later");}function improveHome_Handler(resp){HI_MARGINS.SqFt=resp[0];HI_MARGINS.Bed=resp[1];HI_MARGINS.Bath=resp[2];HI_MARGINS.Room=resp[3];$get("ecValuePer").value=HI_MARGINS.SqFt;}function calcAddition(){var sqft=safeNumber($get("ecSQFT").value);var costPer=safeNumber($get("ecCostPer").value);var valuePer=safeNumber($get("ecValuePer").value);var costTTL=sqft*costPer;var valueTTL=sqft*valuePer;if($get("ecChkAddBed").checked){valueTTL+=HI_MARGINS.Bed;}if($get("ecChkAddBath").checked){valueTTL+=HI_MARGINS.Bath;}if($get("ecChkAdd").checked){valueTTL+=HI_MARGINS.Room;}var netValue=valueTTL-costTTL;$get("ecValueTTL").innerText=formatNumber(valueTTL);$get("ecCostTTL").innerText=formatNumber(costTTL);$get("ecNetValue").innerText=formatNumber(netValue);eqParms.loanamount=costTTL;}function calcAddition2(ctlname){var sqft=safeNumber($get(ctlname+"_ecSQFT").value);var costPer=safeNumber($get(ctlname+"_ecCostPer").value);var valuePer=safeNumber($get(ctlname+"_ecValuePer").value);var costTTL=sqft*costPer;var valueTTL=sqft*valuePer;var netValue=valueTTL-costTTL;$get(ctlname+"_ecValueTTL").innerText=formatNumber(valueTTL);$get(ctlname+"_ecCostTTL").innerText=formatNumber(costTTL);$get(ctlname+"_ecNetValue").innerText=formatNumber(netValue);eqParms.loanamount=costTTL;try{$get(ctlname+"_ecAddLoan").innerText=formatNumber(Math.ceil(costTTL/1000),true,true)+"k";}catch(ex){}}var eqParms={loanamount:0};var citiPROPVALUE;var citiMORTBAL;function tabDeselect(elem){if(elem.className=="SideBarTab2_Selected"){elem.className="SideBarTab2_Inactive";}else{if(elem.className=="SideBarTab1_Selected"){elem.className="SideBarTab1_Inactive";}}}function tabSelect(elem){if(elem.className=="SideBarTab2_Inactive"){elem.className="SideBarTab2_Selected";}else{if(elem.className=="SideBarTab1_Inactive"){elem.className="SideBarTab1_Selected";}}}function GoToSelection(elem){window.open("ValueMapHelp.aspx?Section="+elem.value,"Help","height=600,width=600,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes");}function initTemplates(){var tmplt="";tmplt=$get("tooltipTemplate_STD");if(tmplt!=null){VMTMPLT["STD"]=tmplt.innerHTML;tmplt.innerHTML="";}tmplt=$get("tooltipTemplate_SP");if(tmplt!=null){VMTMPLT["SP"]=tmplt.innerHTML;tmplt.innerHTML="";}tmplt=$get("tooltipTemplate_MLS");if(tmplt!=null){VMTMPLT["MLS"]=tmplt.innerHTML;tmplt.innerHTML="";}tmplt=$get("tooltipTemplate_CS");if(tmplt!=null){VMTMPLT["CS"]=tmplt.innerHTML;tmplt.innerHTML="";}tmplt=$get("tooltipTemplate_PCL");if(tmplt!=null){VMTMPLT["PCL"]=tmplt.innerHTML;tmplt.innerHTML="";}}function openDisclaimer(){var latitude;var longitude;if((TMAP==null)||(TMAP.VEMap==null)){return ;}if(isBirdEyeStyle(TMAP.VEMap)){alert("No additional disclaimers are available based on the current map view style (BirdsEye).");}else{var center=TMAP.VEMap.GetCenter();latitude=center.Latitude;longitude=center.Longitude;var url="Disclaimer.aspx"+"?lat="+latitude+"&lon="+longitude;window.open(url,"Disclaimer","height=500,width=700,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,modal=no");}}function toggleMapLegend(state){var expandButton=$get("MaximizeLegendButton");var legendPanel=$get("MapLegendPanel");if(expandButton){if(state=="open"){expandButton.style.display="none";legendPanel.style.display="block";}else{expandButton.style.display="block";legendPanel.style.display="none";}}}function showMapLegend(showIt){var expandButton=$get("MaximizeLegendButton");var legendPanel=$get("MapLegendPanel");if(expandButton!=null){if(showIt){if((expandButton.style.display=="none")&&(legendPanel.style.display=="none")){expandButton.style.display="block";}}else{expandButton.style.display="none";legendPanel.style.display="none";}}}

var COMPARABLE_SALE="ComparableSale";var MLS_LISTING="MLSListing";var PARCEL="Parcel";var SUBJECT_PROPERTY="SubjectProperty";var ALL="All";var SEARCH_TYPE_NEW="New";var PARCEL_LAYER_NAME="parcel";var SEARCH_TYPE_UPDATE="Update";var PINSTYLES=new Array();var PARCELS=new Array;var disableGetPriceAdjustmentBeforeRender=true;var boolPrint=false;var standardAddress="";var regex=/Enter/;function updateSearchParms(CTL,parmType){var appContent=$get("divAppContent");if(parmType=="address"){if(CTL.value==appContent.getAttribute("StreetAddress")){CTL.value="";CTL.style.color="black";}else{if(CTL.value.length<=0){CTL.value=appContent.getAttribute("StreetAddress");CTL.style.color="gray";}}}else{if(parmType=="citystatezip"){if(CTL.value==appContent.getAttribute("CityStateZip")){CTL.value="";CTL.style.color="black";}else{if(CTL.value.length<=0){CTL.value=appContent.getAttribute("CityStateZip");CTL.style.color="gray";}}}}}function CenterMap(latitude,longitude,listingType){showElement("HoverBox",false);try{TMAP.VEMap.SetCenter(new VELatLong(latitude,longitude));}catch(e){alert("Exception caught while centering the Map. "+e+".  >>>"+latitude+", "+longitude);}if(minimap_State==false){HideMiniMap(null);}else{ShowMiniMap(VEMiniMapSize.Small);}switch(listingType){case"SP Icon":PageTracker("/Grid/Subject Property Icon");break;case"SP Adr":PageTracker("/Grid/Subject Property Address");break;case"MLS Icon":PageTracker("/Grid/Home For Sale Icon");break;case"MLS Adr":PageTracker("/Grid/Home For Sale Address");break;case"CS Icon":PageTracker("/Grid/Home Recently Sold Icon");break;case"CS Adr":PageTracker("/Grid/Home Recently Sold Address");break;}}function onStartZoomHandler(objEvent){if(TMAP!=null&&TMAP.VEMap!=null){VMHOVER.Hide();showPushPins(ALL,false);if(minimap_State==false){HideMiniMap(null);}else{ShowMiniMap(VEMiniMapSize.Small);}}}function onChangeMapStyleHandler(objEvent){VMHOVER.Hide();if(minimap_State==false){HideMiniMap(null);}else{ShowMiniMap(VEMiniMapSize.Small);}switch(TMAP.VEMap.GetMapStyle()){case"a":PageTracker("/Map/MapView/AerialOptionClick");break;case"b":PageTracker("/Map/MapView/BirdsEye-LabelOptionClick");break;case"h":PageTracker("/Map/MapView/Aerial-LabelOptionClick");break;case"o":PageTracker("/Map/MapView/BirdsEyeOptionClick");break;case"r":PageTracker("/Map/MapView/RoadOptionClick");break;}}function onStartContinuousPanHandler(objEvent){VMHOVER.Hide();if(minimap_State==false){HideMiniMap(null);}else{ShowMiniMap(VEMiniMapSize.Small);}}function onChangeViewHandler(objEvent){VMHOVER.Hide();if(minimap_State==false){HideMiniMap(null);}else{ShowMiniMap(VEMiniMapSize.Small);}if(TMAP!=null&&TMAP.VEMap!=null&&objEvent!=null){var chkSubjectProperty=$get("ctlLegend_chkLegendSubjectProperty");var chkMLSListings=$get("ctlLegend_chkLegendMLSListings");var chkComparableSales=$get("ctlLegend_chkLegendComparableSales");var chkShowAllProperties=$get("ctlLegend_chkLegendShowAllProperties");var chkLotLines=$get("ctlLegend_chkParcelLines");if((chkSubjectProperty!=null)){showPushPins(SUBJECT_PROPERTY,chkSubjectProperty.checked);}if((chkMLSListings!=null)){showPushPins(MLS_LISTING,chkMLSListings.checked);}if((chkComparableSales!=null)){showPushPins(COMPARABLE_SALE,chkComparableSales.checked);}if(VMPREFS.enableParcelValues!="false"){if(chkShowAllProperties!=null&&objEvent.zoomLevel>=18){enableLegendControl(chkShowAllProperties,true);showPushPins(PARCEL,chkShowAllProperties.checked);}else{enableLegendControl(chkShowAllProperties,false,"imgText_ZoomIn");showPushPins(PARCEL,false);}}VMPAGE.ChangeViewCntr++;if(VMPREFS.enableParcels!="false"){if(objEvent.zoomLevel>=17){checkAvailableLayers();}else{enableLegendControl(chkLotLines,false,"imgText_ZoomIn");}}else{enableLegendControl(chkLotLines,false,"imgText_Register");}}if(isMapStyleBirdEye(TMAP.VEMap.GetMapStyle())){var orientation=TMAP.VEMap.GetBirdseyeScene().GetOrientation();TMAP.Orientation=orientation;}if(VMPAGE.Birdseye.isVisible==true){window.setTimeout("VMM2.syncMap();",2000);}if(minimap_State==false){HideMiniMap(null);}else{ShowMiniMap(VEMiniMapSize.Small);}}function onEndContinuousPanHandler(){if(VMHOVER.DisplayElem>""){self.setTimeout("VMHOVER.Initiate($get('pushpinSP'), '',SUBJECT_PROPERTY,0,0);",100);}}function enableLegendControl(ctl,enabled,altImg){var eITM;if((typeof (ctl)=="undefined")||(typeof (ctl.parentElement)=="undefined")){return ;}if(enabled==false){ctl.disabled=true;eITM=ctl.parentElement;addCssClass(eITM,"miscVisible35");eITM=getNextSibling(eITM);addCssClass(eITM,"LegendDisabled");if(altImg>""){eITM.removeAttribute("style");addCssClass(eITM,"zoom_in");}else{eITM.removeAttribute("style");addCssClass(eITM,"not_available");}if(ctl.id=="ctlLegend_chkParcelLines"){if(!ctl.disabled){TMAP.SetParcelsEnabled(ctl.checked);}}}else{ctl.disabled=false;eITM=ctl.parentElement;removeCssClass(eITM,"miscVisible35");eITM=getNextSibling(eITM);removeCssClass(eITM,"LegendDisabled");eITM.style.background="";removeCssClass(eITM,"zoom_in");removeCssClass(eITM,"not_available");if(ctl.id=="ctlLegend_chkParcelLines"){if(!ctl.disabled){TMAP.SetParcelsEnabled(ctl.checked);removeCssClass(eITM,"zoom_in");removeCssClass(eITM,"not_available");}}}}function checkAvailableLayers(){if(PIR!=null&&VMPREFS.enableParcels!="false"){var ScreenRes=72;var vemap=TMAP.VEMap;var zoomlevel=parseInt(vemap.GetZoomLevel());var mapView=vemap.GetMapView();var topLeftLatLong=mapView.TopLeftLatLong;var centerLatLong=TMAP.VEMap.GetCenter();var scale=Math.round((ScreenRes*39.37*156543.04*Math.cos(centerLatLong.Latitude*(Math.PI/180))/(Math.pow(2,zoomlevel))));var topleftPixel=vemap.LatLongToPixel(topLeftLatLong);var centerPixel=vemap.LatLongToPixel(centerLatLong);try{var height=Math.floor(2*(centerPixel.y-topleftPixel.y));var width=Math.floor(2*(centerPixel.x-topleftPixel.x));ValueMapService.GetAvailableLayers(LicenseCode,PIR.RequestID,centerLatLong.Latitude,centerLatLong.Longitude,height,width,scale,getAvailableLayers_Handler,getAvailableLayers_Error);}catch(ex){}}else{if(VMPREFS.enableParcels=="false"){var ctl=$get("ctlLegend_chkParcelLines");enableLegendControl(ctl,false,"imgText_Register");}}}function pageClosed(){}function getAvailableLayers_Error(result){var ctl=$get("ctlLegend_chkParcelLines");enableLegendControl(ctl,false);}function getAvailableLayers_Handler(result){var vemap=TMAP.VEMap;var objData=result;var isAvailable=false;var zoomlevel=parseInt(vemap.GetZoomLevel());for(var i=0;i<objData.length;i++){if(objData[i]==PARCEL_LAYER_NAME){if(zoomlevel>=17){isAvailable=true;break;}}}var ctl=$get("ctlLegend_chkParcelLines");enableLegendControl(ctl,isAvailable);if(PIR!=null){var prop=PIR.SubjectProperty;ValueMapService.SetStdzdAddresss(prop,OnSuccess,OnError,OnTimeOut);}}function OnSuccess(result){var strAddress=result;var strAddressArray=result.split(",");if(strAddressArray[0].trim()!=""||strAddressArray[1].trim()!=""){if(TWOFLDS==true){$get("txtStreetAddress").value=strAddressArray[0];$get("txtCityStateZip").value=strAddressArray[1];}else{$get("txtStreetAddress").value=result;}standardAddress=result;removeCssClass($get("txtStreetAddress"),$get("txtStreetAddress").className);removeCssClass($get("txtCityStateZip"),$get("txtCityStateZip").className);}}function OnError(result){}function OnTimeOut(result){}function resetSearch(){var streetAddress="";var cityStateZip="";if(PIR!=null){var prop=PIR.OriginalSubjectProperty;if(TWOFLDS==true){streetAddress=(prop.StreetLine1==null?"":prop.StreetLine1)+(prop.Unit==null?"":" "+prop.Unit);if(streetAddress==""){$get("txtStreetAddress").value="";}else{$get("txtStreetAddress").value=streetAddress;}cityStateZip=(PIR.OriginalSubjectProperty.ZIP==null?"":" "+PIR.OriginalSubjectProperty.ZIP);if(cityStateZip==""){$get("txtCityStateZip").value="";}else{$get("txtCityStateZip").value=cityStateZip;}}else{streetAddress=(PIR.OriginalSubjectProperty.StreetLine1==null?"":PIR.OriginalSubjectProperty.StreetLine1)+(prop.Unit==null?"":" "+prop.Unit)+","+(PIR.OriginalSubjectProperty.ZIP==null?"":PIR.OriginalSubjectProperty.ZIP);if(streetAddress==""||streetAddress==","){$get("txtStreetAddress").value="";}else{$get("txtStreetAddress").value=streetAddress;}}}performSearch(SEARCH_TYPE_NEW,null);return ;}function refreshMap(searchType){var numBeds=$get("tbNumBeds").value;var numBaths=$get("tbNumBaths").value;var totalRooms=$get("tbTotalRooms").value;var livingArea=$get("tbLivingArea").value;var yearBuilt=$get("selYearBuilt").value;if(validateHomeFactInput(numBeds,0,document.getElementById(lblCustomClientLocalization).getAttribute("Validation_Num_Bedrooms_Value"),document.getElementById(lblCustomClientLocalization).getAttribute("Validation_Num_Bedrooms"))&&validateHomeFactInput(numBaths,0,document.getElementById(lblCustomClientLocalization).getAttribute("Validation_Num_Bathrooms_Value"),document.getElementById(lblCustomClientLocalization).getAttribute("Validation_Num_Bathrooms"))&&validateHomeFactInput(totalRooms,0,document.getElementById(lblCustomClientLocalization).getAttribute("Validation_Total_Rooms_Value"),document.getElementById(lblCustomClientLocalization).getAttribute("Validation_Total_Rooms"))&&validateHomeFactInput(livingArea,0,document.getElementById(lblCustomClientLocalization).getAttribute("Validation_Square_Footage_Value"),document.getElementById(lblCustomClientLocalization).getAttribute("Validation_Square_Footage"))){GetPriceChange(true);}}function performSearch(srchType,propType){var oAddr={Street:"",CSZ:""};var numBaths=0;var numBeds=0;var ttlArea=0;var ttlRooms=0;var yearBuilt=0;var curValue=0;var regex=/Enter/;var address=$get("txtStreetAddress").value.trim();var citystate=$get("txtCityStateZip").value.trim();if(address.search(regex)==-1){oAddr.Street=$get("txtStreetAddress").value.trim();}if(TWOFLDS==true&&citystate.search(regex)==-1){oAddr.CSZ=$get("txtCityStateZip").value.trim();}if(isEmptyOrNull(oAddr.Street)&&(isEmptyOrNull(oAddr.CSZ))||((oAddr.CSZ.length+oAddr.Street.length)<3)){RunNoLocationScenario("Invalid Address","Address Field is empty or not long enough.");return ;}if((TMAP!=null)&&(TMAP.VEMap!=null)){var mapStyle=TMAP.VEMap.GetMapStyle();if(isBirdEyeStyle(TMAP.VEMap)){var msg="Property searching is not supported while viewing Bird's Eye.\n\nClick OK to switch to Aerial and continue. Press Cancel to abort search.";if(confirm(msg)){TMAP.VEMap.SetMapStyle(VEMapStyle.Hybrid);}else{return ;}}}if(propType==null){propType="";}showElement("propertyLinkedListFrame",false);VMHOVER.Hide();TICKER.Stop();$get("divFactoid").innerHTML="";$get("ReportFootNote").innerHTML="";VMPAGE.SearchType=srchType;disableGetPriceAdjustmentBeforeRender=true;VMPAGE.showLightBox(true);VMTIMER.startSearch(srchType,oAddr.Street,oAddr.CSZ);VMTIMER.searchStep("Starting search");var selectedLanguage=$get("ddlSelectLanguage").value;var searchAddr=oAddr.Street;if(TWOFLDS==true){if(oAddr.Street.length==0){searchAddr=oAddr.CSZ;}else{if(oAddr.CSZ.length==0){searchAddr=oAddr.Street;}else{searchAddr=oAddr.Street+","+oAddr.CSZ;}}}$get("lblValue").innerText="";$get("lblValueLabel").innerText="";ValueMapService.GetPropertyInfoReport(LicenseCode,searchAddr,propType,numBeds,numBaths,ttlRooms,ttlArea,yearBuilt,curValue,selectedLanguage,true,srchType,performSearch_Handler,performSearch_Handler);$get("hv_mortgage_amt").value="";$get("hv_80_equity").innerText="";$get("hv_90_equity").innerText="";$get("hv_100_equity").innerText="";PageTracker("/Header/SearchPerformed");}function performSearch_Handler(response){var tempPIR=PIR;if(typeof response=="object"&&response.__type!=null&&response.__type=="FARES.ValueMap.PropertyBL.PropertyInfoReport"){if(response.MultipleMatches!=null&&response.MultipleMatches.length>0){var selectedLanguage=$get("ddlSelectLanguage").value;ValueMapService.RenderPropertyLists(LicenseCode,LicenseType,response.RequestID,selectedLanguage,response,false,false,true,RenderMultipleMatchHandler,customErrorHandler);}else{PIR=response;try{if(PIR.RedirectToLogin==true){document.location="Login.aspx";}else{if(PIR.SubjectProperty.Geocode.Latitude==0&&PIR.Geocode.Latitude==0){if(minimap_State==false){HideMiniMap(null);}else{ShowMiniMap(VEMiniMapSize.Small);}RunNoLocationScenario("Address Search Error","Based on the input provided, no location could be found.");boolPrint=false;PIR=tempPIR;disableGetPriceAdjustmentBeforeRender=false;}else{clearHomeValueData();if(TMAP!=null){TMAP.VEMap.DeleteAllShapes();}if((VMM2!=null)&&(VMM2.Map!=null)){VMM2.Map.DeleteAllShapes();}showPropertyInfoReport(true);if((PIR.SubjectProperty.Geocode.Latitude!=0)&&(PIR.SubjectProperty.Geocode.Longitude!=0)){CenterMap(PIR.SubjectProperty.Geocode.Latitude,PIR.SubjectProperty.Geocode.Longitude);boolPrint=true;$get("additionalDis").style.visibility="visible";$get("linkSeperator1").style.visibility="visible";}else{boolPrint=false;$get("additionalDis").style.visibility="visible";$get("linkSeperator1").style.visibility="visible";if($get("txtStreetAddress").value.search(regex)!=-1&&TWOFLDS==true){$get("txtStreetAddress").value="";}if($get("txtCityStateZip").value.search(regex)!=-1&&TWOFLDS==true){$get("txtCityStateZip").value="";}}showMapLegend(true);}}}catch(ex){logException(ex);boolPrint=false;$get("additionalDis").style.visibility="visible";$get("linkSeperator1").style.visibility="visible";}}}else{if(typeof response=="object"&&response._exceptionType!=null&&response._exceptionType.match(/FARES\.ValueMap\.Exception.*/)){VMPAGE.showLightBox(false);customErrorHandler(response);boolPrint=false;}else{alert("I'm sorry, but an unexpected error has occured.  Please try again.\n\nMessage:\n"+response._message);VMPAGE.showLightBox(false);boolPrint=false;}}if(VMPAGE.SearchType==SEARCH_TYPE_NEW){initHomeValueData();}if(VMPAGE.ChangeViewCntr==0){labelParcels();}VMPAGE.ChangeViewCntr=0;var ShowDaysOnMarket;ShowDaysOnMarket=$get("lblNotes2Resource1");var DaysOnMarketHeader;DaysOnMarketHeader=$get("plcMain_rptrProperties_ctl00_DaysOnMarketHeader");if(DaysOnMarketHeader==null){ShowDaysOnMarket.style.visibility="hidden";}else{ShowDaysOnMarket.style.visibility="visible";}var ShowType;ShowType=$get("lblNotes1Resource1");var ShowTypeHeader;ShowTypeHeader=$get("plcMain_rptrProperties_ctl00_PropertyTypeHeader");if(ShowTypeHeader==null){ShowType.style.visibility="hidden";}else{ShowType.style.visibility="visible";}if(boolPrint==true){$get("printerFriendly").style.display="block";if($get("container_userJumpbutton")!=null){$get("container_userJumpbutton").style.display="block";}}else{$get("printerFriendly").style.display="none";if($get("container_userJumpbutton")!=null){$get("container_userJumpbutton").style.display="none";}}try{$get("ctlEmailAgent_fldSubject").value=PIR.SubjectProperty.StreetLine1+" "+PIR.SubjectProperty.Unit;}catch(ex){}}function RunNoLocationScenario(title,msg){var errorMsg=new Array();errorMsg.push("<div class='msgDlgPanel msgDlgText'>");errorMsg.push("<div style='font-weight: bold'>"+msg+"</div>");errorMsg.push("<div class='msgDlgBulletPanel'>");errorMsg.push("<div style='margin-bottom: 5px'>Please enter the location in one of the formats below:</div>");errorMsg.push("<ul class='msgDlgBullets'>");errorMsg.push("<li>Address - No Dir Street Mode Quadrant, City, ST ZIP - An address.</li>");errorMsg.push("<li>ZIP Code - 'XXXXX' - 5 digit ZIP code.</li>");errorMsg.push("<li>County- 'County, ST' - County name followed by state abbreviation.</li>");errorMsg.push("<li>City - 'City, ST' - City name followed by state abbreviation.</li>");errorMsg.push("</div>");errorMsg.push("</ul>");errorMsg.push("</div>");popUpErrorMessage(errorMsg,title,"ERROR",550,200,75);VMPAGE.showLightBox(false);TICKER.Stop();}function RenderMultipleMatchHandler(html){VMTIMER.searchStep("Render Multiple Properties Complete");VMTIMER.updateDebugConsole();if(html){$get("propertyLinkedListCell").innerHTML=html[2];var frame=$get("propertyLinkedListFrame");var elem=$get("txtStreetAddress");frame.style.top=(getPos(elem,"top")+18)+"px";frame.style.left=(getPos(elem,"left"))+"px";showElement("propertyLinkedListFrame",true);if($get("propertyLinkedListCell").offsetHeight>230){document.getElementById("divPropertyListContainer").className="MultiplePropertyList";}else{document.getElementById("divPropertyListContainer").className="";}showElement("divProgress",false);PageTracker("/Header/MultipleMatchFound");}else{VMPAGE.showLightBox(false);}}function cancelPropertyList(){showElement("propertyLinkedListFrame",false);VMPAGE.showLightBox(false);}function SelectSingleProperty(addr,cityStateZip){if(TWOFLDS==true){$get("txtStreetAddress").value=addr;$get("txtCityStateZip").value=cityStateZip;}else{$get("txtStreetAddress").value=addr+","+cityStateZip;}showElement("propertyLinkedListFrame",false);performSearch(SEARCH_TYPE_NEW,null);}function initHomeValueData(){try{$get("tbNumBeds").value=PIR.SubjectProperty.BedroomCount;$get("tbNumBaths").value=PIR.SubjectProperty.BathroomCount;$get("tbTotalRooms").value=PIR.SubjectProperty.TotalRoomCount;$get("tbLivingArea").value=PIR.SubjectProperty.LivingArea;$get("selYearBuilt").value=PIR.SubjectProperty.YearBuilt;if(PIR.SubjectProperty.CurrentValue==0){$get("tdOrigValue").innerText="Not Available";}else{$get("tdOrigValue").innerText=formatCurrency(PIR.SubjectProperty.CurrentValue);}$get("tdHFUpdate").innerText="";$get("tdHomeImps").innerText="";$get("tdTotalPriceChange").innerText="";$get("tdNewValEstimate").innerText="";$get("tdHighLow").innerText="";VMPAGE.ImprvmntTotal=0;VMPAGE.OtherTotal=0;if(PIR.SubjectProperty.CurrentValue>0){$get("lblValue").innerText=formatCurrency(PIR.SubjectProperty.CurrentValue);if(PIR.SubjectProperty.IsListing==true&&VMPREFS.EstimatedLabel!=""){$get("lblValueLabel").innerText=VMPREFS.EstimatedLabel;}else{$get("lblValueLabel").innerText=$get("lblEstValueLabel").innerText;}citiPROPVALUE=PIR.SubjectProperty.CurrentValue;}$get("tdTitleBarProp").innerText=PIR.SubjectProperty.StreetLine1+" "+(PIR.SubjectProperty.Unit==null?"":PIR.SubjectProperty.Unit)+" "+formatCityStateZip(PIR.SubjectProperty.City,PIR.SubjectProperty.State,PIR.SubjectProperty.ZIP);if(PIR.SubjectProperty.IsListing==true&&VMPREFS.EstimatedLabel!=""&&VMPREFS.EstimatedLabel!="Estimated Value"){$get("trEstimateLabel").style.visibility="visible";if(PIR.OriginalSubjectProperty.CurrentValue<=0){$get("tdEstimateValue").innerText="Not Available";}else{if(ShowPublic=="true"){if(PIR.SubjectProperty.ShowPublic=="1"){$get("tdEstimateValue").innerText=formatCurrency(PIR.OriginalSubjectProperty.CurrentValue);}else{$get("tdEstimateValue").innerText="Not Available";}}else{$get("tdEstimateValue").innerText=formatCurrency(PIR.OriginalSubjectProperty.CurrentValue);}}}else{$get("trEstimateLabel").style.visibility="hidden";}$get("tdPropType").innerText=safeString(PIR.SubjectProperty.PropertyType)==0?"":safeString(PIR.SubjectProperty.PropertyType);$get("tdBedVal").innerText=safeString(PIR.SubjectProperty.BedroomCount)==0?"":safeString(PIR.SubjectProperty.BedroomCount);$get("tdBathVal").innerText=safeString(PIR.SubjectProperty.BathroomCount)==0?"":safeString(PIR.SubjectProperty.BathroomCount);$get("tdSqfVal").innerText=safeString(PIR.SubjectProperty.TotalSquareFeet)==0?"":formatNumber(PIR.SubjectProperty.TotalSquareFeet,true,false)+" sq ft";$get("tdLSqFtVal").innerText=safeString(PIR.SubjectProperty.LivingArea)==0?"":formatNumber(PIR.SubjectProperty.LivingArea,true,false)+" sq ft";$get("tdLSize").innerText=PIR.SubjectProperty.LotArea==0?"":decimalFixed(PIR.SubjectProperty.LotArea,4);$get("tdYearVal").innerText=safeString(PIR.SubjectProperty.YearBuilt)==0?"":safeString(PIR.SubjectProperty.YearBuilt);$get("tdStyleVal").innerText=safeString(PIR.SubjectProperty.Style);$get("tdBasementVal").innerText=safeString(PIR.SubjectProperty.Basement);$get("tdPrakingVal").innerText=safeString(PIR.SubjectProperty.Parking);$get("tdSubdivVal").innerText=safeString(PIR.SubjectProperty.Subdivision);$get("tdSchoolVal").innerText=safeString(PIR.SubjectProperty.SchoolDistrict);$get("tdSaleDateVal").innerText=PIR.OriginalSubjectProperty.MostRecentSaleDate.format("m/d/Y")=="01/01/1"?"":PIR.OriginalSubjectProperty.MostRecentSaleDate.format("m/d/Y");$get("tdSalePriceVal").innerText=formatCurrency(PIR.OriginalSubjectProperty.MostRecentSalePrice)=="$0"?"":formatCurrency(PIR.OriginalSubjectProperty.MostRecentSalePrice);if(PIR.SubjectProperty.IsListing==true){$get("tdMlsNo").innerText=safeString(PIR.SubjectProperty.ListingNumber);$get("tdListingStatus").innerText=safeString(PIR.SubjectProperty.ListingStatus);$get("tdDOMVal").innerText=safeString(PIR.SubjectProperty.DaysOnMarket);$get("tdListpriceVal").innerText=formatCurrency(PIR.SubjectProperty.MostRecentSalePrice);}else{if(PIR.NearbyListings.length>0){for(var i=0;i<PIR.NearbyListings.length;i++){if(PIR.NearbyListings[i].Geocode.Latitude==PIR.SubjectProperty.Geocode.Latitude&&PIR.NearbyListings[i].Geocode.Longitude==PIR.SubjectProperty.Geocode.Longitude){$get("tdMlsNo").innerText=safeString(PIR.NearbyListings[i].ListingNumber);$get("tdListingStatus").innerText=safeString(PIR.NearbyListings[i].ListingStatus);$get("tdDOMVal").innerText=safeString(PIR.NearbyListings[i].DaysOnMarket);$get("tdListpriceVal").innerText=formatCurrency(PIR.NearbyListings[i].ListPrice);break;}}}}}catch(err){}return ;}function clearHomeValueData(){try{$get("tbNumBeds").value=0;$get("tbNumBaths").value=0;$get("tbTotalRooms").value=0;$get("tbLivingArea").value=0;$get("selYearBuilt").value=0;$get("tdOrigValue").innerText=0;$get("tdNewValEstimate").innerText="0";$get("tdMlsNo").innerText="";$get("tdListingStatus").innerText="";$get("tdDOMVal").innerText="";$get("tdListpriceVal").innerText="";VMPAGE.ImprvmntTotal=0;VMPAGE.OtherTotal=0;var tbl=document.getElementById("improvementList");var rowcount=tbl.rows.length-1;for(var idx=rowcount;idx>0;idx--){tbl.deleteRow(idx);}}catch(ex){}}function showPropertyInfoReport(updatePropLists){VMTIMER.searchStep("Rendering Property Info Report");updateActionPanel(true);if($get("sbTab0")!=null){$get("sbTab0").style.display=(PIR.GeocodeType=="A"?"":"none");}if($get("sbTab1")!=null){$get("sbTab1").style.display=(PIR.GeocodeType=="A"?"":"none");}if($get("sbTab3")!=null){$get("sbTab3").style.display=(PIR.GeocodeType=="A"?"":"none");}if($get("sbTab4")!=null){$get("sbTab4").style.display=(PIR.GeocodeType=="A"?"":"none");}if($get("sbTab5")!=null){if(VMPREFS.Tab.Tab4=="true"){$get("sbTab4").style.display=(PIR.GeocodeType=="A"?"":"none");}}if($get("sbTab6")!=null){$get("sbTab6").style.display=(PIR.GeocodeType=="A"?"":"none");}if(PIR.GeocodeType!="A"){if(VMPREFS.Tab.Tab2=="true"){VMPAGE.switchTab("sbTab2","sbPanel2");}try{eval("THEME_afterSearch();");}catch(ex){}}var chkSubject=$get("ctlLegend_chkLegendSubjectProperty");var chkShowAllProperties=$get("ctlLegend_chkLegendShowAllProperties");var chkMLS=$get("ctlLegend_chkLegendMLSListings");var chkCS=$get("ctlLegend_chkLegendComparableSales");enableLegendControl(chkSubject,(PIR.OriginalSubjectProperty.PropertyType==null?false:true));enableLegendControl(chkShowAllProperties,(PIR.OriginalSubjectProperty.PropertyType==null?false:true));enableLegendControl(chkMLS,(PIR.NearbyListings.length<=0?false:true));enableLegendControl(chkCS,(PIR.ComparableSales.length<=0?false:true));showElement("tblLegend",true);var displayListings=(chkMLS.disabled==false&&chkMLS.checked==true?true:false);var displayComps=(chkCS.disabled==false&&chkCS.checked==true?true:false);if(VMPAGE.SideBar=="hidden"){VMPAGE.toggleSideBar("maximized");}var estArea=$get("EstimateValueArea");if(estArea!=null){estArea.style.display="block";}showElement("divValuation",true);if(PIR.OriginalSubjectProperty.CurrentValue<=0){$get("lblValue").innerText=$get("divAppContent").getAttribute("LabelValue");$get("lblValueLabel").innerText="";}if(TMAP==null){var leftInnerMap=$get("leftMapInner");var divFaq=$get("divFAQ");if((leftInnerMap!=null)&&($get("divFAQ")!=null)){leftInnerMap.removeChild(divFaq);}$get("divMap01").className="MapArea";TMAP=new vmTILEMAP_CLASS();TMAP.VEMap=new VEMap("divMap01");TMAP.VEMap.SetDashboardSize(VEDashboardSize.Normal);TMAP.VEMap.SetTileBuffer(1);if(PIR.GeocodeType=="A"){TMAP.VEMap.LoadMap(new VELatLong(PIR.SubjectProperty.Geocode.Latitude,PIR.SubjectProperty.Geocode.Longitude),PIR.InitialZoomLevel,VEMapStyle.Hybrid,false,VEMapMode.Mode2D,false,0);}else{TMAP.VEMap.LoadMap(new VELatLong(PIR.Geocode.Latitude,PIR.Geocode.Longitude),PIR.InitialZoomLevel,VEMapStyle.Hybrid,false,VEMapMode.Mode2D,false,0);}$get("MSVE_obliqueNotification").style.visibility="hidden";TMAP.VEMap.SetMouseWheelZoomToCenter(false);VMPAGE.showLightBox(false);POINTS.push(new VELatLong(PIR.SubjectProperty.Geocode.Latitude,PIR.SubjectProperty.Geocode.Longitude));TMAP.VEMap.AttachEvent("onchangeview",onChangeViewHandler);TMAP.VEMap.AttachEvent("onstartzoom",onStartZoomHandler);TMAP.VEMap.AttachEvent("onchangemapstyle",onChangeMapStyleHandler);TMAP.VEMap.AttachEvent("onstartpan",onStartContinuousPanHandler);TMAP.VEMap.AttachEvent("onendpan",onEndContinuousPanHandler);VEPushpin.ShowDetailOnMouseOver=false;window.setTimeout("checkAvailableLayers()",500);var ieversion=null;if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ieversion=new Number(RegExp.$1);}var dash_NavActionCont=$get("MSVE_navAction_topBackground");var dash_ToggleGlyph=$get("MSVE_navAction_toggleGlyphWrapper");var inHtml=new Array();inHtml.push("<div id='VM_topBar_extension'></div>");inHtml.push("<div id='VM_splitScreen'  style='width:auto' class='MSVE_MapStyle' title='Toggle split screen view.' onclick='isSplit();'  onmouseout='hoverExtn_Dashboard_VM_splitScreen(2)' onmouseover='hoverExtn_Dashboard_VM_splitScreen(1)'>Split-Screen</div>");divElem=document.createElement("div");divElem.innerHTML=inHtml.join(" ");TMAP.VEMap.AddControl(divElem);var eTopBar=$get("MSVE_navAction_topBar");var eTopExt=$get("VM_topBar_extension");var navContainer=$get("MSVE_navAction_container");navContainer.className="MSVE_Dashboard_V6 notraffic MSVE_OrthoView VM_Nav";eTopBar.appendChild(eTopExt);eTopExt.style.display="";var eVM_splitScreen=$get("VM_splitScreen");eTopExt.appendChild(eVM_splitScreen);eVM_splitScreen.style.width="6em";if(VMPAGE.pageType=="WIDE"){dash_NavActionCont.style.width=340+"px";eTopBar.style.width=350+"px";if(ieversion!=null&&ieversion>6){dash_ToggleGlyph.style.right="10px";}else{if(ieversion!=null&&ieversion<=6){dash_ToggleGlyph.style.right="-3px";}else{dash_ToggleGlyph.style.right="10px";}}}else{if(VMPAGE.pageType=="MINI"){dash_NavActionCont.style.width=275+"px";eTopBar.style.width=350+"px";if(ieversion!=null&&ieversion>6){dash_ToggleGlyph.style.right="2.5px";}else{if(ieversion!=null&&ieversion<=6){dash_ToggleGlyph.style.right="-3px";}else{dash_ToggleGlyph.style.right="2.5px";}}}}TMAP.VEMap.SetShapesAccuracy(VEShapeAccuracy.Pushpin);}else{var adjCenterPoint;if(PIR.GeocodeType=="A"){adjCenterPoint=new VELatLong(PIR.SubjectProperty.Geocode.Latitude,PIR.SubjectProperty.Geocode.Longitude);}else{adjCenterPoint=new VELatLong(PIR.Geocode.Latitude,PIR.Geocode.Longitude);}TMAP.VEMap.SetCenterAndZoom(adjCenterPoint,PIR.InitialZoomLevel);}TMAP.VEMap.SetMapStyle(PIR.InitialMapStyle);VMTIMER.searchStep("Centering complete");pinProperties();VMTIMER.searchStep("Pinning complete");newItem={ID:PIR.SubjectProperty.APN+"|"+PIR.SubjectProperty.FIPSCode,Address:PIR.SubjectProperty.StreetLine1+" "+safeString(PIR.SubjectProperty.StreetLine2),ZIP:PIR.SubjectProperty.ZIP,Rank:6,SearchDate:new Date()};updateSearchHistory(newItem);initEmail();document.getElementById("ddlSideBar_Reports").value="00";if(VMPAGE.CurrentTab=="sbTab2"){displayReport();}if(PIR.GeocodeType=="A"){if(VMPREFS.Tab.Tab6=="true"){if(VMPAGE.pageType!="MINI"){VMPAGE.switchTab("sbTab6","sbPanel6");}}try{eval("THEME_afterSearch();");}catch(ex){}}if(updatePropLists){updatePropLists_Handler(PIR.PropListHTML);}if(VMPREFS.ToolTip.AutoDisplaySP==true&&TMAP.VEMap.GetMapMode()!=VEMapMode.Mode3D&&PIR.GeocodeType=="A"){VMHOVER.DisplayElem="pushpinSP";self.setTimeout("VMHOVER.Initiate($get('pushpinSP'), '',SUBJECT_PROPERTY,0,0);",50);}VMTIMER.searchStep("Render Property Report complete");VMTIMER.updateDebugConsole();if(minimap_State==false){HideMiniMap(null);}else{ShowMiniMap(VEMiniMapSize.Small);}}function renderPropertyListsErr_Handler(response){if(VMPAGE.CurrentTab=="sbTab2"){displayReport();}VMPAGE.showLightBox(false);}function updatePropLists_Handler(response){if(response){$get("tdSideBarPropList").innerHTML=response[0];$get("divMasterPropList").innerHTML=response[1];$get("divContent02").style.display="";$get("divContentSpcr").style.display="";$get("divContent02").style.display=(PIR.GeocodeType=="A"?"":"none");try{var tmp=$get("tdSideBarPropList");var grd=getFirstChild(tmp);grd.style.width="100%";var cel=getFirstChild(grd.rows[0]);cel.className="First";}catch(ex){logException("Exception: ",ex);}}VMPAGE.showLightBox(false);disableGetPriceAdjustmentBeforeRender=false;if(VMPAGE.CurrentTab=="sbTab2"){displayReport();}if(VMPAGE.SearchType!=SEARCH_TYPE_NEW){}}function getVideoLink_Response(response){}function percentEquity_Error(response){$get("divFactoid").innerHTML="";$get("ReportFootNote").innerHTML="";}function percentEquity_Response(response){$get("divFactoid").innerHTML="<br>";$get("ReportFootNote").innerHTML="<br>";}function pinProperties(){var chkMLS=$get("ctlLegend_chkLegendMLSListings");var chkCS=$get("ctlLegend_chkLegendComparableSales");var displayListings=chkMLS.disabled==false&&chkMLS.checked==true;var displayComps=chkCS.disabled==false&&chkCS.checked==true;var pinCnt=(displayListings?PIR.NearbyListings.length:0)+(displayComps?PIR.ComparableSales.length:0)+(PIR.GeocodeType=="A"?1:0);if(pinCnt==0){return ;}var pinIndex=0;var propPins=new Array(pinCnt);if(displayListings){for(var i=0;i<PIR.NearbyListings.length;i++){var oCoords=new VELatLong(PIR.NearbyListings[i].Geocode.Latitude,PIR.NearbyListings[i].Geocode.Longitude);var oPin=new VEShape(VEShapeType.Pushpin,oCoords);oPin.SetCustomIcon(GetPushpin(i+1,"PushPin_MLS","PinIconMLS","MLS_LISTING",0,-15));propPins[pinIndex++]=oPin;}}if(displayComps){for(var i=0;i<PIR.ComparableSales.length;i++){var oCoords=new VELatLong(PIR.ComparableSales[i].Geocode.Latitude,PIR.ComparableSales[i].Geocode.Longitude);var oPin=new VEShape(VEShapeType.Pushpin,oCoords);oPin.SetCustomIcon(GetPushpin(i+1,"PushPin_CS","PinIconCS","COMPARABLE_SALE",0,-15));propPins[pinIndex++]=oPin;}}if(PIR.GeocodeType=="A"){var oCoords=new VELatLong(PIR.SubjectProperty.Geocode.Latitude,PIR.SubjectProperty.Geocode.Longitude);var oPin=new VEShape(VEShapeType.Pushpin,oCoords);oPin.SetCustomIcon(GetPushpin(0,"PushPin_SP","PinIconSP","SUBJECT_PROPERTY",0,-15));propPins[pinIndex++]=oPin;}if(isMapStyleBirdEye(TMAP.VEMap.GetMapStyle())){TMAP.VEMap.DeleteAllShapes();}TMAP.VEMap.AddShape(propPins);setPushPinVisibility(".PushPin_MLS",displayListings);setPushPinVisibility(".PushPin_CS",displayComps);if(VMPAGE.Birdseye.isVisible==true){VMPAGE.pinBirdseye();}}function labelPin(id,num,className){try{var lbl=(num=="0"?"*":num);var ePin=$get(id.toString());var newPin="<div class='PushPin0 "+className+"'>"+ePin.innerHTML+"<span class='PushPin1 "+className+"'>"+lbl+"</span></div>";ePin.innerHTML=newPin;}catch(ex){alert("I'm sorry, but an error occured when labeling pins.\n\n"+ex);}}function GetPushpin(num,className,cssClass,pinType,xOffset,yOffset){try{var xOff=(isNaN(xOffset)?0:xOff);var yOff=(isNaN(yOffset)?0:yOff);var pinTxt=(num=="0"?"&nbsp;":num);return"<div class='PushPin0 "+className+"' "+(pinType=="SUBJECT_PROPERTY"?"id='pushpinSP' ":"")+"onmouseout='VMHOVER.Cancel();' "+"onmouseover='VMHOVER.Initiate(this, \""+(num-1).toString()+'", '+pinType+", "+xOff+","+yOff+");' "+"><img class='"+cssClass+"' src='img/1x1.gif'>"+"<span class='PushPin1 "+className+"'>"+pinTxt+"</span>"+"</div>";}catch(ex){alert("I'm sorry, but an error occured when labeling pins.\n\n"+ex._message);}}function labelParcels(){var chkShowAll=$get("ctlLegend_chkLegendShowAllProperties");if(TMAP!=null&&chkShowAll!=null&&PIR!=null){if(chkShowAll.checked&&(!isMapStyleBirdEye(TMAP.VEMap.GetMapStyle()))&&parseInt(TMAP.VEMap.GetZoomLevel())>17&&VMPREFS.enableParcelValues!="false"){var View=TMAP.VEMap.GetMapView();var TL=View.TopLeftLatLong;var BR=View.BottomRightLatLong;ValueMapService.GetVisibleParcels(LicenseCode,LicenseType,PIR.RequestID,TL.Latitude,TL.Longitude,BR.Latitude,BR.Longitude,labelParcels_Handler,labelParcels_ErrHandler);}}return false;}function labelParcels_ErrHandler(response){}function labelParcels_Handler(response){var pins=new Array();PARCELS=null;PARCELS=new Array();for(var i=0;i<response.length;i++){var parcel=response[i];if(isPropertyReportMember(parcel)==false){if(parcel.Value>0){var strKey=parcel.APN+"|"+parcel.FIPSCode;PARCELS[strKey]=parcel;var oCoords=new VELatLong(parcel.Geocode.Latitude,parcel.Geocode.Longitude);var oPin=new VEShape(VEShapeType.Pushpin,oCoords);var propVal="";if(parcel.MinValue!=parcel.MaxValue){propVal=textToImg(numberToText(parcel.MinValue))+ellipsis()+textToImg(numberToText(parcel.MaxValue));}else{propVal=textToImg(numberToText(parcel.Value));}var pinContent="<div id='"+parcel.ID+"' class='PushPin_PV' style='white-space:nowrap;text-align:center' "+"onmouseout='VMHOVER.Cancel();' "+"onmouseover='VMHOVER.Initiate(this, \""+strKey+"\", PARCEL);' "+">"+propVal+"</div>";oPin.SetCustomIcon(pinContent);pins.push(oPin);}}else{if(isSubjectProperty(parcel)==true&&isMLSListing(parcel)==false){if(parcel.MinValue==parcel.MaxValue){PIR.SubjectProperty.CurrentValue=parcel.Value;PIR.SubjectProperty.DisplayPrice=parcel.Value;PIR.SubjectProperty.HighValue=parcel.HighValue;PIR.SubjectProperty.LowValue=parcel.LowValue;PIR.OriginalSubjectProperty.CurrentValue=parcel.Value;PIR.OriginalSubjectProperty.DisplayPrice=parcel.Value;PIR.OriginalSubjectProperty.HighValue=parcel.HighValue;PIR.OriginalSubjectProperty.LowValue=parcel.LowValue;if(PIR.SubjectProperty.CurrentValue==0){$get("tdOrigValue").innerText="Not Available";}else{$get("tdOrigValue").innerText=formatCurrency(PIR.SubjectProperty.CurrentValue);}citiPROPVALUE=PIR.SubjectProperty.CurrentValue;initEmail();if(PIR.SubjectProperty.CurrentValue<=0){$get("lblValue").innerText=$get("divAppContent").getAttribute("LabelValue");$get("lblValueLabel").innerText="";}else{$get("lblValue").innerText=formatCurrency(PIR.SubjectProperty.CurrentValue);$get("lblValueLabel").innerText=$get("lblEstValueLabel").innerText;}}}}}TMAP.VEMap.DeleteAllShapes();if(pins.length>0){TMAP.VEMap.AddShape(pins);}pinProperties();}function ellipsis(){var buffer="";for(var i=0;i<3;i++){buffer+="<img src='img/text/point.gif'/>";}return buffer;}function textToImg(value){var buffer="";var cPos;for(var i=0;i<value.length;i++){cPos=value.substring(i,i+1);switch(cPos){case"$":buffer+="<img class='sprite-B' src='img/1x1.gif'/>";break;case".":buffer+="<img class='sprite-point' src='img/1x1.gif'/>";break;default:buffer+="<img class='sprite-"+cPos+"' src='img/1x1.gif'/>";break;}}return buffer;}function isPropertyReportMember(parcel){var retVal=false;try{if(isSubjectProperty(parcel)||isMLSListing(parcel)||isComp(parcel)){retVal=true;}}catch(err){}return retVal;}function isSubjectProperty(parcel){try{if(PIR.SubjectProperty.Geocode.Latitude==parcel.Geocode.Latitude&&PIR.SubjectProperty.Geocode.Longitude==parcel.Geocode.Longitude){return true;}else{return false;}}catch(ex){return false;}}function isMLSListing(parcel){var props=PIR.NearbyListings;for(var i=0;i<props.length;i++){if(props[i].Geocode.Latitude==parcel.Geocode.Latitude&&props[i].Geocode.Longitude==parcel.Geocode.Longitude){return true;}}return false;}function isComp(parcel){var props=PIR.ComparableSales;for(var i=0;i<props.length;i++){if(props[i].Geocode.Latitude==parcel.Geocode.Latitude&&props[i].Geocode.Longitude==parcel.Geocode.Longitude){return true;}}return false;}function initPushPinStyles(){var tmpCSS=document.styleSheets["cssPushPins"];var rules;if(tmpCSS==null){for(var i=0;i<document.styleSheets.length;i++){var CSS=document.styleSheets[i];var RLS=null;try{RLS=CSS.cssRules;}catch(e){}if(RLS!=null){if(RLS.length>0&&RLS[0].selectorText==".PushPin_SP"){tmpCSS=CSS;rules=RLS;break;}}}}else{rules=tmpCSS.rules;}if(typeof (rules)!="undefined"){for(var i=0;i<rules.length;i++){PINSTYLES[rules[i].selectorText]=rules[i].style;}}}function showPushPins(pinType,isVisible){switch(pinType){case SUBJECT_PROPERTY:setPushPinVisibility(".PushPin_SP",isVisible);break;case COMPARABLE_SALE:setPushPinVisibility(".PushPin_CS",isVisible);pinProperties();break;case MLS_LISTING:setPushPinVisibility(".PushPin_MLS",isVisible);pinProperties();break;case PARCEL:setPushPinVisibility(".PushPin_PV",isVisible);if(isVisible){labelParcels();}break;case ALL:setPushPinVisibility(".PushPin_SP",isVisible);setPushPinVisibility(".PushPin_CS",isVisible);setPushPinVisibility(".PushPin_MLS",isVisible);setPushPinVisibility(".PushPin_PV",isVisible);break;}}function setPushPinVisibility(styleID,isVisible){if(PINSTYLES[styleID]!=null){PINSTYLES[styleID].display=(isVisible?"":"none");}}function getHomeImprovementDesc(){var impType=document.getElementById("ctlHomeValue_ddlImprovementType").value;if(impType!=""){ValueMapService.GetHomeImprovementDescription(impType,getHomeImprovementDesc_Reponse,getHomeImprovementDesc_Error);}}function getHomeImprovementDesc_Error(response){}function getHomeImprovementDesc_Reponse(result){alert(result);}function addHomeImprovement(){var ddlImprovementType=document.getElementById("ctlHomeValue_ddlImprovementType");var ddlMonth=document.getElementById("ctlHomeValue_ddlMonth");var ddlYear=document.getElementById("ctlHomeValue_ddlYear");var txtCost=document.getElementById("txtCost");var cost=safeNumber(txtCost.value);if(ddlImprovementType.value==""){alert("Please select an improvement type.");return ;}if(ddlMonth.value==""){alert("Please enter a valid month.");return ;}if(ddlYear.value==""){alert("Please enter a valid year.");return ;}if(isNumber(txtCost.value)==false){alert("I'm sorry, but valid numeric amount must be entered.");}else{if(cost<=0){alert("I'm sorry, but you must enter a non-zero amount for cost.");return false;}else{ValueMapService.GetHomeImprovementValueAtSale("2",0,ddlImprovementType.value,ddlMonth.value,ddlYear.value,cost,addHomeImprovement_Handler,addHomeImprovement_Error);}}}function addHomeImprovement_Error(response){}function addHomeImprovement_Handler(result){var ddlImprovementType=document.getElementById("ctlHomeValue_ddlImprovementType");var ddlMonth=document.getElementById("ctlHomeValue_ddlMonth");var ddlYear=document.getElementById("ctlHomeValue_ddlYear");var txtCost=document.getElementById("txtCost");var noCommaCost=safeNumber(txtCost.value);var tbl=document.getElementById("improvementList");var lastRow=tbl.rows.length;var newRow=tbl.insertRow(lastRow);newRow.insertCell(0).appendChild(document.createTextNode(getOptionText(ddlImprovementType)));newRow.insertCell(1).appendChild(document.createTextNode(ddlMonth.value+"/"+ddlYear.value));newRow.insertCell(2).appendChild(document.createTextNode(formatCurrency(noCommaCost)));newRow.insertCell(3).appendChild(document.createTextNode(formatCurrency(result.toString())));var elem=newRow.insertCell(4).appendChild(document.createElement("TD"));elem.outerHTML="<TD align='center'><img src='./img/buttons/delete.gif' onclick='deleteImprovementRow("+lastRow+","+result+");'></TD>";ddlImprovementType.value=null;ddlMonth.value=null;ddlYear.value=null;txtCost.value="";VMPAGE.ImprvmntTotal+=result;$get("tdHomeImps").innerText=formatCurrency(VMPAGE.ImprvmntTotal);GetPriceChange(false);}function deleteImprovementRow(index,value){document.getElementById("improvementList").deleteRow(index);VMPAGE.ImprvmntTotal-=value;$get("tdHomeImps").innerText=formatCurrency(VMPAGE.ImprvmntTotal);GetPriceChange(false);}function updateOtherTotal(value){if(isNumber(value)==false){alert("I'm sorry, but valid numeric amount must be entered.");}else{if(safeNumber(value)<=0){alert("I'm sorry, but you must enter a non-zero amount for cost.");return false;}}VMPAGE.OtherTotal=safeNumber(value);$get("tdOtherVal").innerText=formatCurrency(value);GetPriceChange();}function GetPriceChange(IsUpdateMapClick){if(disableGetPriceAdjustmentBeforeRender==false&&PIR.SubjectProperty.APN!=null){try{var propertyType="";var numBeds=$get("tbNumBeds").value;var numBaths=$get("tbNumBaths").value;var totalRooms=$get("tbTotalRooms").value;var livingArea=$get("tbLivingArea").value;var yearBuilt=$get("selYearBuilt").value;if(yearBuilt==null||yearBuilt==""){yearBuilt=0;}if(IsUpdateMapClick){HI_MARGINS.SqFt=0;ValueMapService.GetPriceAdjustment(LicenseCode,PIR.RequestID,PIR.SubjectProperty,numBaths,numBeds,livingArea,totalRooms,yearBuilt,AdjustPriceHandlerPostUpdateValues,AdjustPriceHandler_Error);}else{ValueMapService.GetPriceAdjustment(LicenseCode,PIR.RequestID,PIR.SubjectProperty,numBaths,numBeds,livingArea,totalRooms,yearBuilt,AdjustPriceHandler,AdjustPriceHandler_Error);}}catch(err){alert(err.description);}}else{var appContent=document.getElementById("divAppContent");var valuelbl=appContent.getAttribute("ValueDescr");var tCMD=new Array();tCMD[0]="VMPAGE.switchTab('sbTab1','sbPanel1');return false;";tCMD[1]="VMPAGE.switchTab('sbTab2','sbPanel2');return false;";tCMD[2]="VMPAGE.switchTab('sbTab0','sbPanel0');return false;";tCMD[3]="VMPAGE.switchTab('sbTab3','sbPanel3');return false;";TICKER.Content[1]=valuelbl+" : Not Available"+"&nbsp;&nbsp;&diams;&nbsp;&nbsp;"+'<a href="#" onclick="'+tCMD[1]+'">Look at Market Trends</a>'+"&nbsp;&nbsp;&diams;&nbsp;&nbsp;"+'<a href="#" onclick="'+tCMD[2]+'">Improve My Home</a>'+"&nbsp;&nbsp;&diams;&nbsp;&nbsp;"+'<a href="#" onclick="'+tCMD[3]+'">Comps & Listings</a>';TICKER.Content[0]="&nbsp;";TICKER.Restart();}}function AdjustPriceHandler_Error(response){}var adjustedCurrentValue;var adjustedLowValue;var adjustedHighValue;function AdjustPriceHandlerPostUpdateValues(result){AdjustPriceHandler(result);PIR.SubjectProperty.BedroomCount=$get("tbNumBeds").value;PIR.SubjectProperty.BathroomCount=$get("tbNumBaths").value;PIR.SubjectProperty.LivingArea=$get("tbLivingArea").value;PIR.SubjectProperty.CurrentValue=adjustedCurrentValue;PIR.SubjectProperty.DisplayPrice=adjustedCurrentValue;PIR.SubjectProperty.HighValue=adjustedHighValue;PIR.SubjectProperty.LowValue=adjustedLowValue;$get("lblValue").innerText=formatCurrency(adjustedCurrentValue);if($get("lblTooltipValue")&&VMHOVER.Type==SUBJECT_PROPERTY){$get("lblTooltipValue").innerText=formatCurrency(adjustedCurrentValue);}if($get("lblTooltipPropDetail")&&VMHOVER.Type==SUBJECT_PROPERTY){$get("lblTooltipPropDetail").innerText=getPropCharText(PIR.SubjectProperty);}citiPROPVALUE=adjustedCurrentValue;initEmail();}function AdjustPriceHandler(result){try{var prices=result;var adjustment=0;var deviation=0;adjustment=prices[0];deviation=prices[1];adjustedCurrentValue=PIR.OriginalSubjectProperty.CurrentValue+adjustment+VMPAGE.ImprvmntTotal+VMPAGE.OtherTotal;adjustedLowValue=adjustedCurrentValue*(1-deviation);adjustedHighValue=adjustedCurrentValue*(1+deviation);$get("tdTotalPriceChange").innerText=formatCurrency(adjustment+VMPAGE.ImprvmntTotal+VMPAGE.OtherTotal);$get("tdNewValEstimate").innerHTML=formatCurrency(adjustedCurrentValue);$get("tdHighLow").innerText="( "+formatCurrency(adjustedLowValue)+" - "+formatCurrency(adjustedHighValue)+" )";$get("tdHomeImps").innerText=formatCurrency(VMPAGE.ImprvmntTotal);$get("tdOtherVal").innerText=formatCurrency(VMPAGE.OtherTotal);$get("tdHFUpdate").innerText=formatCurrency(adjustment);if(VMPREFS.PropTicker!="true"||PIR.GeocodeType!="A"){TICKER.Stop();}else{var tCMD=new Array();tCMD[0]="VMPAGE.switchTab('sbTab0','sbPanel0');return false;";tCMD[1]="VMPAGE.switchTab('sbTab2','sbPanel2');return false;";tCMD[2]="VMPAGE.switchTab('sbTab0','sbPanel0');return false;";tCMD[3]="VMPAGE.switchTab('sbTab3','sbPanel3');return false;";TICKER.Content[0]="My home is worth "+numberToText(adjustedLowValue)+" - "+numberToText(adjustedHighValue)+"&nbsp;&nbsp;&diams;&nbsp;&nbsp;"+'<a href="#" onclick="'+tCMD[0]+"\">Don't Agree? Change My Home's Value</a>";if(VMPREFS.PropTicker!=""){var appContent=document.getElementById("divAppContent");var valuelbl=appContent.getAttribute("ValueDescr");TICKER.Content[1]=valuelbl+" : "+formatCurrency(adjustedCurrentValue)+"&nbsp;&nbsp;&diams;&nbsp;&nbsp;"+'<a href="#" onclick="'+tCMD[1]+'">Look at Market Trends</a>'+"&nbsp;&nbsp;&diams;&nbsp;&nbsp;"+'<a href="#" onclick="'+tCMD[2]+'">Improve My Home</a>'+"&nbsp;&nbsp;&diams;&nbsp;&nbsp;"+'<a href="#" onclick="'+tCMD[3]+'">Comps & Listings</a>';}else{TICKER.Content[1]="";}TICKER.Restart();}}catch(err){alert(err.description);}}var lastHVTab=null;var lastHVPanel=null;function HV_setActivePanel(panel,tabId,forceVisible){$get("hv_est_value").innerText=formatCurrency(PIR.SubjectProperty.CurrentValue);if(tabId=="hvSubTab1"){improveHome();}if(lastHVTab==null){lastHVTab=$get("hvSubTab0");lastHVPanel=getFirstChild($get("HVPanel0")).rows[0];}var selTab=$get(tabId);var tr=getFirstChild(panel).rows[0];var isVisible=(forceVisible?false:selTab.style.display!="none");var newClass=(isVisible?"OpenSubHeader":"CloseSubHeader");removeCssClass(tr,tr.className);addCssClass(tr,newClass);lastHVTab.style.display="none";selTab.style.display=(isVisible?"none":"");lastHVTab=selTab;if(lastHVPanel!=tr){removeCssClass(lastHVPanel,"CloseSubHeader");addCssClass(lastHVPanel,"OpenSubHeader");}lastHVPanel=tr;switch(tabId){case"hvSubTab0":PageTracker("/Tab/Calculator/Change Your Value");break;case"hvSubTab1":PageTracker("/Tab/Calculator/Home Improvement");break;case"hvSubTab2":PageTracker("/Tab/Calculator/Determine Your Equity");break;}}function HV_updateEquity(mb,eqRate1,eqRate2,eqRate3){if(mb.value.length<=3){return ;}var eq1=eqRate1/100;var eq2=eqRate2/100;var eq3=eqRate3/100;var val=safeNumber(mb.value);if(val>0){$get("hv_80_equity").innerText=formatCurrency(eq1*(PIR.SubjectProperty.CurrentValue-val));$get("hv_90_equity").innerText=formatCurrency(eq2*(PIR.SubjectProperty.CurrentValue-val));$get("hv_100_equity").innerText=formatCurrency(eq3*(PIR.SubjectProperty.CurrentValue-val));mb.value=formatCurrency(mb.value);}}var GROUPS={SP:true,MLS:true,CS:true};function filterPropertyList(listingType){VMPAGE.switchTab("sbTab3","sbPanel3");displayListingGroup("SP",(listingType=="SP"));displayListingGroup("MLS",(listingType=="MLS"));displayListingGroup("CS",(listingType=="CS"));if(listingType=="MLS"){PageTracker("/Map/HomePopup/HomeForSaleLinkClick");}else{if(listingType=="CS"){PageTracker("/Map/HomePopup/RecentlySalesLinkClick");}}}function toggleListingGroup(btn,ID){if(GROUPS[ID]==true){displayListingGroup(ID,false);}else{displayListingGroup(ID,true);}}function displayListingGroup(ID,isVisible){GROUPS[ID]=isVisible;var classOld=(isVisible?"NodeOpen":"NodeClose");var classNew=(isVisible?"NodeClose":"NodeOpen");var elem=document.getElementById("divMasterPropList");var gridItem;try{gridItem=getFirstChild(elem);}catch(ex){return false;}for(var x=0;x<gridItem.rows.length;x++){var rowItem=gridItem.rows[x];if(rowItem.getAttribute("groupHeader")==ID){removeCssClass(rowItem,classOld);addCssClass(rowItem,classNew);}else{if(rowItem.getAttribute("listingtype")==ID){if(isVisible==false){rowItem.style.display="none";}else{rowItem.style.display="";}}}}var elem=document.getElementById("tdSideBarPropList");try{gridItem=getFirstChild(elem);}catch(ex){return false;}for(var x=0;x<gridItem.rows.length;x++){var rowItem=gridItem.rows[x];if(rowItem.getAttribute("groupHeader")==ID){removeCssClass(rowItem,classOld);addCssClass(rowItem,classNew);}else{if(rowItem.getAttribute("listingtype")==ID){if(isVisible==false){rowItem.style.display="none";}else{rowItem.style.display="";}}}}}function validateHomeFactInput(ctl,min,max,msg){var val=safeNumber(ctl.value);max=parseInt(max);if(val<min||val>max){alert(msg);ctl.focus();return false;}return true;}function customErrorHandler(e){switch(e._exceptionType){case"FARES.ValueMap.Exception.GplGeocoderException":case"FARES.ValueMap.Exception.DataAccessException":case"FARES.ValueMap.Exception.InvalidEntryException":case"FARES.ValueMap.Exception.LicenseDomainException":case"FARES.ValueMap.Exception.PropertyTypeXrefNotSupportedException":case"FARES.ValueMap.Exception.PriceAdjustmentException":case"FARES.ValueMap.Exception.AddressNotFoundException":case"FARES.ValueMap.Exception.UnhandledException":case"FARES.ValueMap.Exception.SmtpEmailException":alert(e._message);break;case"FARES.ValueMap.Exception.UsageCapsExceededException":window.location.href="./Invalid.aspx?msg="+e._message;break;}}var HISTORY=null;var tempArray=new Array();function searchPropertyHistory(idx,refresh){if(refresh==true){var ckData=getCookie("VM_SEARCH_HISTORY_WITH_RANK");var doAppend=true;if(ckData!=null){HISTORY=eval(ckData);}}if(HISTORY!=null&&HISTORY.length>0){for(var cnt=0;cnt<HISTORY.length;cnt++){var itm=HISTORY[cnt];tempArray.push(itm.Rank);}tempArray.bubblesort();for(var loop=0;loop<HISTORY.length;loop++){var tmpItem=HISTORY[loop];if(tmpItem!=null&&tmpItem.Rank==tempArray[idx]){if(TWOFLDS==true){$get("txtStreetAddress").value=tmpItem.Address;$get("txtCityStateZip").value=tmpItem.ZIP;}else{$get("txtStreetAddress").value=tmpItem.Address+","+tmpItem.ZIP;}PageTracker("/Tab/My Favorite/Favorite Proprty Search");performSearch(SEARCH_TYPE_NEW,null);break;}}}else{VMPAGE.showLightBox(false);}}Array.prototype.bubblesort=function(){for(i=0;i<this.length;i++){for(j=i+1;j<this.length;j++){if(Number(this[i])>Number(this[j])){tempValue=this[j];this[j]=this[i];this[i]=tempValue;}}}};function searchProperty(idx,refresh){if(refresh==true){var ckData=getCookie("VM_SEARCH_HISTORY_WITH_RANK");var doAppend=true;if(ckData!=null){HISTORY=eval(ckData);}}if(HISTORY!=null&&HISTORY.length>0){var tmpItem=HISTORY[idx];if(tmpItem!=null){if(TWOFLDS==true){$get("txtStreetAddress").value=tmpItem.Address;$get("txtCityStateZip").value=tmpItem.ZIP;}else{$get("txtStreetAddress").value=tmpItem.Address+","+tmpItem.ZIP;}performSearch(SEARCH_TYPE_NEW,null);}}else{VMPAGE.showLightBox(false);}}function updateSearchHistory(newItem){var ckData=getCookie("VM_SEARCH_HISTORY_WITH_RANK");var doAppend=true;if(ckData!=null){HISTORY=eval(ckData);if(newItem.ID!="null|null"){for(var idx=0;idx<HISTORY.length;idx++){if(HISTORY[idx].ID==newItem.ID){HISTORY[idx].SearchDate=newItem.SearchDate;doAppend=false;break;}}if(doAppend==true){if(HISTORY.length>11){HISTORY=HISTORY.slice(0,-1);}HISTORY.push(newItem);}HISTORY=HISTORY.sort(historySort);}}else{if(newItem.ID!="null|null"){HISTORY=new Array();HISTORY.push(newItem);}}updateSearchGrid();saveSearchHistory();}function updateSearchGrid(){var grid=document.getElementById("tblSearchHistory");var rcnt=grid.rows.length-1;for(var idx=rcnt;idx>0;idx--){grid.deleteRow(idx);}if(HISTORY!=null){for(var idx=0;idx<HISTORY.length;idx++){var rowCnt=grid.rows.length;var newRow=grid.insertRow(rowCnt);var item=HISTORY[idx];var td=null;var rank="";var tmpFn="setPropertyRank('"+item.ID+"'";var remFn="removeProperty('"+item.ID+"');return false;";var proFn="promoteProperty('"+item.ID+"');return false;";rank='<a href="#" class="'+(item.Rank==1?"Rank1":"Rank0")+'" onclick="'+tmpFn+',1);return false;"><div>1</div></a>'+'<a href="#" class="'+(item.Rank==2?"Rank1":"Rank0")+'" onclick="'+tmpFn+',2);return false;"><div>2</div></a>'+'<a href="#" class="'+(item.Rank==3?"Rank1":"Rank0")+'" onclick="'+tmpFn+',3);return false;"><div>3</div></a>'+'<a href="#" class="'+(item.Rank==4?"Rank1":"Rank0")+'" onclick="'+tmpFn+',4);return false;"><div>4</div></a>'+'<a href="#" class="'+(item.Rank==5?"Rank1":"Rank0")+'" onclick="'+tmpFn+',5);return false;"><div>5</div></a>'+'<a href="#" class="ProProperty" onclick="'+proFn+'" title="Click here to make this the top ranked property..."><img src="img/1x1.gif"></a>';if(item.Rank<6){rank+='<a href="#" class="RemProperty" onclick="'+remFn+'" title="Click here to un-rank the property."><img src="img/1x1.gif"></a>';}else{rank+='<a href="#" class="DelProperty" onclick="'+remFn+'" title="Click here to delete the property from your favorites."><img src="img/1x1.gif"></a>';}newRow.className="DataEntry";td=newRow.insertCell(0);td.innerHTML="<a title='Search this property.' href='#' onclick='searchProperty("+idx+");return false;'>"+item.Address+"<div class='miscHidden'>"+item.ZIP+"</div></a>";td=newRow.insertCell(1);td.innerHTML=rank;td["align"]="center";td=newRow.insertCell(2);td.innerText=formatDate(item.SearchDate,"MM/dd/yy");td.title=item.SearchDate.toString();td["align"]="center";}}}function historySort(a,b){if(a.Rank>b.Rank){return 1;}else{if(a.Rank<b.Rank){return -1;}else{if(a.SearchDate>b.SearchDate){return -1;}else{return 1;}}}}function refreshSearchGrid(){if(HISTORY!=null){HISTORY=HISTORY.sort(historySort);updateSearchGrid();}}function setPropertyRank(id,newRank){for(var idx=0;idx<HISTORY.length;idx++){if(HISTORY[idx].ID==id){HISTORY[idx].Rank=newRank;updateSearchGrid();saveSearchHistory();}}}function saveSearchHistory(){if(HISTORY!=null){var bufferH="[";for(var idx=0;idx<HISTORY.length;idx++){var bufferI="";var item=HISTORY[idx];bufferI="{"+" ID: '"+item.ID+"'"+",Address: '"+item.Address+"'"+",ZIP:'"+item.ZIP+"'"+",Rank: "+item.Rank+",SearchDate: new Date('"+item.SearchDate.toString()+"')"+"}";bufferH+=(idx>0?",":"")+bufferI;}bufferH+="]";setCookie("VM_SEARCH_HISTORY_WITH_RANK",bufferH,180,"","",false);}}function removeProperty(id){for(var idx=0;idx<HISTORY.length;idx++){if(HISTORY[idx].ID==id){if(HISTORY[idx].Rank<6){HISTORY[idx].Rank=6;break;}else{HISTORY.splice(idx,1);}}}HISTORY=HISTORY.sort(historySort);updateSearchGrid();saveSearchHistory();}function promoteProperty(id){for(var idx=0;idx<HISTORY.length;idx++){if(HISTORY[idx].ID==id){HISTORY[idx].Rank=1;HISTORY[idx].SearchDate=new Date();}}HISTORY=HISTORY.sort(historySort);updateSearchGrid();saveSearchHistory();}function viewFlyover(zip,apn){VMPAGE.showLightBox(true,false);var elem=$get("divEmailPreview");var e2=$get("divEmailContent");e2.innerHTML="<iframe scrolling='no' frameborder='no' style='width:340;height:260;' src='video/Player.aspx?zip="+zip+"&apn="+apn+"'>";$get("PreviewDescr").style.display="none";elem.style.top=((document.documentElement.clientHeight/2)-150)+"px";elem.style.display="";}function updateActionPanel(display){if(display){if($get("ButtonPanel")){$get("ButtonPanel").style.display="block";}if($get("ActionButton1")!=null){$get("ActionButton1").style.display=(PIR.GeocodeType=="A"?"":"none");}if($get("ActionButton2")!=null){$get("ActionButton2").style.display=(PIR.GeocodeType=="A"?"":"none");}if($get("ActionButton4")!=null){$get("ActionButton4").style.display=(PIR.GeocodeType=="A"?"":"none");}if($get("ActionButton5")!=null){$get("ActionButton5").style.display=(PIR.GeocodeType=="A"?"":"none");}if($get("ActionButton7")!=null){$get("ActionButton7").style.display=(PIR.GeocodeType=="A"?"":"none");}}else{if($get("ButtonPanel")){$get("ButtonPanel").style.display="none";}}}function processJumpButton(textButtonName){var buttonName="Button";if(typeof (textButtonName)!="undefined"){buttonName=textButtonName;}if(PIR.SubjectProperty){var userParams=CustomQueryParms;var url=PIR.userDefinedUrl1;if(url!=null){if(url!=""){var clientParamter="adjvalue=";if(url.indexOf("?")==-1){clientParamter="?"+clientParamter;}else{clientParamter="&"+clientParamter;}if((typeof (PIR.SubjectProperty.CurrentValue)!="undefined")&&(PIR.SubjectProperty.CurrentValue!=null)){url=url+clientParamter+PIR.SubjectProperty.CurrentValue;}window.open(url+userParams,"UDBC1_Window","scrollbars,resizable,location,toolbar,status,menubar,directories"+buildWindowSettings(VMPAGE.userButtonConfigSettings));}else{alert("An Error occurred while trying to execute "+buttonName+" request.\r\nIf error occurs again, contact customer support.");}}else{alert("Not enough information available to process request.\r\nReason: Subject Property not available.");}}else{alert("Not enough information available to process request.\r\nReason: Subject Property not available.");}}function parseUserDefinedConfiguration(userParams){var jumpConfiguration=new Object();jumpConfiguration.displayButton="yes";jumpConfiguration.windowWidth=null;jumpConfiguration.windowHeight=null;if(userParams!=null){var values=userParams.split(",");var SupportedParamList=new Array();SupportedParamList[0]={name:"display",paramType:"string",varValue:"jumpConfiguration.displayButton"};SupportedParamList[1]={name:"width",paramType:"int",varValue:"jumpConfiguration.windowWidth"};SupportedParamList[2]={name:"height",paramType:"int",varValue:"jumpConfiguration.windowHeight"};if(values.length>1){for(var i=0;i<SupportedParamList.length;i++){if(SupportedParamList[i].paramType=="int"){var convertedValue=parseInt(values[i]);if(!isNaN(convertedValue)){eval(SupportedParamList[i].varValue+"="+convertedValue);}}if(SupportedParamList[i].paramType=="string"){eval(SupportedParamList[i].varValue+'= "'+values[i]+'"');}}}}return jumpConfiguration;}function buildWindowSettings(jumpConfiguration){var returnValue="";var SupportedParamList=new Array();SupportedParamList[0]={name:"width",varValue:jumpConfiguration.windowWidth};SupportedParamList[1]={name:"height",varValue:jumpConfiguration.windowHeight};for(var i=0;i<SupportedParamList.length;i++){if(SupportedParamList[i].varValue!=null){returnValue=returnValue+",";returnValue=returnValue+SupportedParamList[i].name+"="+SupportedParamList[i].varValue;}}return(returnValue);}function vmPrintPopup(){if($get("RadioA").checked==true||$get("RadioB").checked==true){var cssBlock=unescape($get("cssText").value);var cssFolder=VMPREFS.cssFilepath;vmMapPrint(cssBlock,cssFolder,styleToSelect);if($get("RadioA").checked==true){$get("RadioA").checked=false;}if($get("RadioB").checked==true){$get("RadioB").checked=false;}}}function vmMapPrint(cssBlock,cssFolder,styleToSelect){var txt="";var bHome=$get("ctlLegend_chkLegendSubjectProperty");var bMLS=$get("ctlLegend_chkLegendMLSListings");var bCS=$get("ctlLegend_chkLegendComparableSales");var bParcels=$get("ctlLegend_chkParcelLines");try{if(TMAP.VEMap.GetMapStyle()=="b"||TMAP.VEMap.GetMapStyle()=="o"){alert("Printer friendly version is not avilable for Bird's eye view.");}else{if(VMPAGE.CurrentTab=="sbTab2"){getPrint(cssBlock,"sbPanel2","divContent02",bHome.checked,bMLS.checked,bCS.checked,bParcels.checked,cssFolder,styleToSelect);}else{getPrint(cssBlock,"sbPanel0","divContent02",bHome.checked,bMLS.checked,bCS.checked,bParcels.checked,cssFolder,styleToSelect);}}}catch(err){txt="There was an error on this page.\n\n";txt+="Error description: "+err.description+"\n\n";txt+="Click OK to continue.\n\n";alert(txt);}}function vmPrintMinPopup(){if($get("RadioA").checked==true||$get("RadioB").checked==true){var cssBlock=unescape($get("cssText").value);var cssFolder=VMPREFS.cssFilepath;vmMinPrint(cssBlock,cssFolder,styleToSelect);if($get("RadioA").checked==true){$get("RadioA").checked=false;}if($get("RadioB").checked==true){$get("RadioB").checked=false;}}}function vmMinPrint(cssBlock,cssFolder,styleOption){var txt="";var bHome=$get("ctlLegend_chkLegendSubjectProperty");var bMLS=$get("ctlLegend_chkLegendMLSListings");var bCS=$get("ctlLegend_chkLegendComparableSales");var bParcels=$get("ctlLegend_chkParcelLines");try{if(TMAP.VEMap.GetMapStyle()=="b"||TMAP.VEMap.GetMapStyle()=="o"){alert("Printer friendly version is not avilable for Bird's eye view.");}else{var bButtonVisibility=false;for(i=0;i<VMPAGE.TabIds.length;i++){var button=$get(VMPAGE.ButtonIds[i]);if(button!=null){if(VMPAGE.CurrentTab==VMPAGE.TabIds[i]){if(button.className.indexOf("Active")>-1){bButtonVisibility=true;}}}}if(VMPAGE.CurrentTab=="sbTab2"&&bButtonVisibility==true){getMinPrint(cssBlock,"divContent02",bHome.checked,bMLS.checked,bCS.checked,bParcels.checked,cssFolder,true,styleOption);}else{getMinPrint(cssBlock,"divContent02",bHome.checked,bMLS.checked,bCS.checked,bParcels.checked,cssFolder,false,styleOption);}}}catch(err){txt="There was an error on this page.\n\n";txt+="Error description: "+err.description+"\n\n";txt+="Click OK to continue.\n\n";alert(txt);}}var minimap=null;var minimap_Show=null;var minimap_Hide=null;var minimap_State=false;function RealignMiniMap(){if(TMAP!=null&&TMAP.VEMap!=null){if(document.getElementById("MSVE_minimap")!=null){minimap=document.getElementById("MSVE_minimap");var xoffset=(GetMapWidth()-minimap.offsetWidth);TMAP.VEMap.ShowMiniMap(xoffset,0,MiniMapSize);document.getElementById("MSVE_minimap_resize").style.display="none";}}}function GetMapTop(){return document.getElementById("divMap01").offsetTop;}function GetMapLeft(){return document.getElementById("divMap01").offsetLeft;}function GetMapWidth(){return document.getElementById("divMap01").offsetWidth;}function GetMapHeight(){return document.getElementById("divMap01").offsetHeight;}function SetMiniMapSize(s){MiniMapSize=s;TMAP.VEMap.ShowMiniMap(0,0,s);RealignMiniMap();}function HideMiniMap(s){if(TMAP!=null&&TMAP.VEMap!=null){MiniMapSize=s;if(MiniMapSize==null){TMAP.VEMap.HideMiniMap();minimap_Hide=$get("MiniMapHide");minimap_Show=$get("MiniMapShow");if(minimap_Show!=null){if(VMPAGE.pageType=="WIDE"){minimap_Show.style.top=GetMapTop();}else{minimap_Show.style.top=GetMapTop();}minimap_Show.style.left=GetMapWidth()-15;minimap_Show.style.display="block";}if(minimap_Hide!=null){minimap_Hide.style.display="none";TMAP.VEMap.AddControl(minimap_Show);}minimap_State=false;}RealignMiniMap();}}function ShowMiniMap(s){if(TMAP!=null&&TMAP.VEMap!=null){MiniMapSize=s;if(MiniMapSize!=null){TMAP.VEMap.ShowMiniMap(0,0,s);minimap_Show=$get("MiniMapShow");minimap_Show.style.display="none";document.getElementById("MSVE_minimap").style.zIndex=99;minimap_Hide=$get("MiniMapHide");minimap_Hide.style.top=document.getElementById("MSVE_minimap").offsetHeight-15;minimap_Hide.style.left=GetMapWidth()-document.getElementById("MSVE_minimap").offsetWidth;minimap_Hide.style.display="block";minimap=document.getElementById("MSVE_minimap");TMAP.VEMap.AddControl(minimap_Hide);minimap_State=true;}RealignMiniMap();}}function PageTracker(pathName){var returnPath;if(VMPAGE.pageType!="WIDE"){returnPath="/ValuemapMin"+pathName;}else{returnPath="/Valuemap"+pathName;}if(pageTracker!=null){pageTracker._trackPageview(returnPath);}}

function refreshReport(){$get("imgSideBarGraph").src="../../img/misc/reportSpinner.gif";refreshReportHandler(PIR.OriginalSubjectProperty.StateCode);PageTracker("/Tab/Market Trends/Update ZipCode");}function refreshReport_Error(response){}function refreshReportHandler(xrefValues){var xref={StateCode:""};xref.StateCode=xrefValues;var reportID=document.getElementById("ddlSideBar_Reports").value;var Report=$get("RptInfo"+reportID).innerText;var RptHeader=$get("RptHeader"+reportID).innerHTML;var Parms="?";var ParmCount=0;var RptInfo="";var startDate=new Date();startDate.setFullYear(startDate.getFullYear()-1,startDate.getMonth(),startDate.getDay());var endDate=new Date();Report=eval("("+Report+")");for(var itm in Report){if(Report[itm].editable==true){Report[itm].value=$get("parm"+itm).value;}switch(Report[itm].value){case"@ZIPCODE":if(PIR.GeocodeType=="Z"){Report[itm].value=$get("txtStreetAddress").value;}else{Report[itm].value=PIR.OriginalSubjectProperty.ZIP;}break;case"@STARTDATE":Report[itm].value=formatDate(startDate,Report[itm].format);break;case"@ENDDATE":Report[itm].value=formatDate(endDate,Report[itm].format);break;case"@STATE":Report[itm].value=PIR.OriginalSubjectProperty.State;break;case"@STATECODE":Report[itm].value=xref.StateCode;break;}var regTMP=new RegExp("@"+itm,"gi");RptHeader=RptHeader.replace(regTMP,Report[itm].value);if(itm.substring(0,1)!="_"){if(ParmCount>0){Parms+="&";}Parms+=itm+"="+Report[itm].value;ParmCount++;}}$get("rptSideBar_Header").innerHTML=RptHeader;$get("imgSideBarGraph").src=VMPAGE.ReportURL+Parms;}function displayReport(){displayReportHandler(PIR.OriginalSubjectProperty.StateCode);}function displayReport_Error(response){if(PIR.GeocodeType="Z"){displayReportHandler("");}$get("imgSideBarGraph").src="img/1x1.gif";}var lastReportParms="";function displayReportHandler(xrefValues){var xref={StateCode:""};xref.StateCode=xrefValues;var reportID=document.getElementById("ddlSideBar_Reports").value;var Report=$get("RptInfo"+reportID).innerText;var RptHeader=$get("RptHeader"+reportID).innerHTML;var Parms="?";var ParmCount=0;var RptEdit="";var startDate=new Date();startDate.setFullYear(startDate.getFullYear()-1,startDate.getMonth(),startDate.getDay());var endDate=new Date();Report=eval("("+Report+")");for(var itm in Report){switch(Report[itm].value){case"@ZIPCODE":if(PIR.GeocodeType=="Z"){Report[itm].value=$get("txtStreetAddress").value;}else{Report[itm].value=PIR.OriginalSubjectProperty.ZIP;}break;case"@STARTDATE":Report[itm].value=formatDate(startDate,Report[itm].format);break;case"@ENDDATE":Report[itm].value=formatDate(endDate,Report[itm].format);break;case"@STATE":Report[itm].value=PIR.OriginalSubjectProperty.State;break;case"@STATECODE":Report[itm].value=xref.StateCode;break;}if(itm.substring(0,1)!="_"){if(ParmCount>0){Parms+="&";}Parms+=itm+"="+Report[itm].value;ParmCount++;if(Report[itm].editable==true){RptEdit+="<tr><td align='left' valign='middle' style='padding-left: 4px;padding-top: 3px;'>"+Report[itm].descr+"</td><td valign='middle' align='center' style='padding-top: 3px;'>:</td>"+"<td align='left' valign='middle' style='padding-right: 4px;'><input id='parm"+itm+"' class='UserInput' type='textbox' onkeypress='doClick(rptUpdateButton,event)' value='"+Report[itm].value+"' /></td></tr>";}}var regTMP=new RegExp("@"+itm,"gi");RptHeader=RptHeader.replace(regTMP,Report[itm].value);}$get("rptSideBar_Header").innerHTML=RptHeader;if(Parms!=lastReportParms){$get("imgSideBarGraph").src="../../img/misc/reportSpinner.gif";$get("imgSideBarGraph").src=VMPAGE.ReportURL+Parms;lastReportParms=Parms;}$get("divSideBar_ReportDescr").style.display="none";if(RptEdit>""){var editHTML=$get("rptTemplate_Edit").innerHTML;var regTMP=new RegExp("@CONTENT","gi");editHTML=editHTML.replace(regTMP,RptEdit);editHTML=editHTML.replace(/@REPORTID/gi,reportID);$get("rptSideBar_Edit").innerHTML=editHTML;}else{$get("rptSideBar_Edit").innerHTML="";}}function updateReportDescr(){if(document.getElementById("ddlSideBar_Reports")!=null){var rptID=document.getElementById("ddlSideBar_Reports").value;var descr=$get("RptDescr"+rptID).innerHTML;$get("divSideBar_ReportDescr").innerHTML=descr;$get("divSideBar_ReportDescr").style.display="";$get("rptSideBar_Header").innerHTML="";$get("imgSideBarGraph").src="img/1x1.gif";$get("rptSideBar_Edit").innerHTML="";}}function resetReport(){$get("imgSideBarGraph").src="img/1x1.gif";$get("divSideBar_ReportDescr").style.display="";}function doClick(buttonName,e){var code;if(!e){var e=window.event;}if(e.keyCode){code=e.keyCode;}else{if(e.which){code=e.which;}}if(code==13){var btn=$get("rptUpdateButton");if(btn!=null){refreshReport();}}}

function textScroller(divID,delay){this.Content=new Array();this.tickerID=divID;this.delay=delay;this.isMouseOver=false;this.hiddenMsgIdx=1;this.state="active";var tickerInstance=this;}textScroller.prototype.Initialize=textscroller_prototype_initialize;textScroller.prototype.getCssPadding=textscroller_prototype_getcsspadding;textScroller.prototype.getInLine=textscroller_prototype_getinline;textScroller.prototype.animateUp=textscroller_prototype_animateup;textScroller.prototype.swapDivs=textscroller_prototype_swapdivs;textScroller.prototype.setMessage=textscroller_prototype_setmessage;textScroller.prototype.Restart=textscroller_prototype_restart;textScroller.prototype.Stop=textscroller_prototype_stop;function textscroller_prototype_initialize(){if(this.state!="disabled"){var buffer="";buffer="<div class='innerDiv' style='position: absolute; width: 100%' id='"+this.tickerID+"_V'>"+this.Content[0]+"</div>"+"<div class='innerDiv' style='position: absolute; width: 100%; visibility: hidden' id='"+this.tickerID+"_H'>"+this.Content[1]+"</div>";document.getElementById(this.tickerID).innerHTML=buffer;this.tickerDiv=document.getElementById(this.tickerID);this.visibleDiv=document.getElementById(this.tickerID+"_V");this.hiddenDiv=document.getElementById(this.tickerID+"_H");this.vdivTop=parseInt(this.getCssPadding(this.tickerDiv));var tickerInstance=this;this.visibleDiv.style.height=this.hiddenDiv.style.height=this.tickerDiv.offsetHeight-(this.vdivTop*2)+"px";this.getInLine(this.visibleDiv,this.hiddenDiv);this.hiddenDiv.style.visibility="visible";document.getElementById(this.tickerID).onmouseover=function(){tickerInstance.isMouseOver=true;};document.getElementById(this.tickerID).onmouseout=function(){tickerInstance.isMouseOver=false;};if(window.attachEvent){window.attachEvent("onunload",function(){tickerInstance.tickerDiv.onmouseover=tickerInstance.tickerDiv.onmouseout=null;});}if(this.state=="active"){setTimeout(function(){tickerInstance.animateUp();},this.delay);}}}function textscroller_prototype_restart(){if(this.state!="disabled"){this.visibleDiv.innerHTML=this.Content[0];this.hiddenDiv.innerHTML=this.Content[1];this.visibleDiv=document.getElementById(this.tickerID+"_V");this.hiddenDiv=document.getElementById(this.tickerID+"_H");this.hiddenMsgIdx=1;if(this.state=="stopped"){this.state="active";var tickerInstance=this;this.getInLine(this.visibleDiv,this.hiddenDiv);if(this.Content[1]!=""){setTimeout(function(){tickerInstance.animateUp();},this.delay);}}}}function textscroller_prototype_stop(){if(this.state!="disabled"){this.visibleDiv.style.top="30px";this.hiddenDiv.style.top="30px";this.state="stopped";}}function textscroller_prototype_animateup(){if(this.state=="active"){var tickerInstance=this;if(parseInt(this.hiddenDiv.style.top)>(this.vdivTop+1)){this.visibleDiv.style.top=parseInt(this.visibleDiv.style.top)-1+"px";this.hiddenDiv.style.top=parseInt(this.hiddenDiv.style.top)-1+"px";setTimeout(function(){tickerInstance.animateUp();},30);}else{this.getInLine(this.hiddenDiv,this.visibleDiv);this.swapDivs();setTimeout(function(){tickerInstance.setMessage();},this.delay);}}}function textscroller_prototype_getinline(div1,div2){div1.style.top=this.vdivTop+"px";div2.style.top=Math.max(div1.parentNode.offsetHeight,div1.offsetHeight)+"px";}function textscroller_prototype_swapdivs(){var tmpElem=this.visibleDiv;this.visibleDiv=this.hiddenDiv;this.hiddenDiv=tmpElem;}function textscroller_prototype_setmessage(){var tickerInstance=this;if(this.isMouseOver==true){setTimeout(function(){tickerInstance.setMessage();},3000);}else{var idx=this.hiddenMsgIdx;var mxx=this.Content.length;this.hiddenMsgIdx=((idx+1>mxx-1)?0:idx+1);this.hiddenDiv.innerHTML=this.Content[this.hiddenMsgIdx];if(this.state=="active"){this.animateUp();}}}function textscroller_prototype_getcsspadding(tickerobj){if(tickerobj.currentStyle){return tickerobj.currentStyle["paddingTop"];}else{if(window.getComputedStyle){return window.getComputedStyle(tickerobj,"").getPropertyValue("padding-top");}else{return 0;}}}

function vmTILEMAP_CLASS(){this.VEMap=null;this.tileURL="http://%1?x=%2&y=%3&z=%4";this.parcelTileLayer=null;this.showParcels=false;}vmTILEMAP_CLASS.prototype.SetParcelsEnabled=vmtilemap_prototype_setparcelsenabled;function vmtilemap_prototype_setparcelsenabled(isEnabled,forceit){var numServers=4;if(isEnabled==this.showParcels&&forceit!=true){return ;}if(isEnabled==true){if(this.parcelTileLayer==null){var parceLUrl=m_host+"%2.valuemap.facorelogic.com/Handlers/GetParcelLayer.ashx?quadkey=%4";this.parcelTileLayer=new VETileSourceSpecification("gpl",parceLUrl);this.parcelTileLayer.NumServers=numServers;this.parcelTileLayer.MinZoomLevel=17;this.parcelTileLayer.MaxZoomLevel=19;this.VEMap.AddTileLayer(this.parcelTileLayer,true);}else{this.VEMap.ShowTileLayer("gpl");}this.tileSourceAdded=true;this.showParcels=true;}else{if(this.tileSourceAdded==true){if(this.parcelTileLayer!=null){this.VEMap.HideTileLayer("gpl");}}this.showParcels=false;}}

function getPrint(print_area0,print_area1,print_area3,myHome,homeForSale,homeRecentlySold,showParcels,cssFolder,styleOption){try{var params="directories=no";params+=", location=no";params+=", menubar=no";params+=", resizable=no";params+=", scrollbars=yes";params+=", status=yes";params+=", toolbar=no";params+=", width=788";params+=", height=655";params+=", top=0";params+=", left=200";var pp="";var str="";var browser=navigator.appName;var b_version=navigator.appVersion;var version=parseFloat(b_version);pp=window.open("","",params);var prop=PIR.SubjectProperty;var propValue=prop.DisplayPrice;var streetAddress=(PIR.OriginalSubjectProperty.StreetLine1==null?"":PIR.OriginalSubjectProperty.StreetLine1)+(prop.Unit==null?"":" "+prop.Unit)+","+(PIR.OriginalSubjectProperty.ZIP==null?"":PIR.OriginalSubjectProperty.ZIP);str="<HTML><HEAD><title>Printer Friendly View</title>";str+=print_area0;str+='<link href="style/ValueMapPrint.css" media="print" rel="stylesheet" type="text/css" />';str+='<base target="_self"></HEAD>';str+='<style type="text/css">body{ margin:0; } td{ padding-top: 2px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; }</style>';str+='<body class="body" align="center" id="bdyMainPrint" marginwidth="0" marginheight="0">';str+='<form id="printerVM"  method="post">';str+='<table class="Default"  style="width: 770px" >';var propValue="";if(PIR.OriginalSubjectProperty.CurrentValue<=0){propValue="Not Available";}else{propValue=formatCurrency(PIR.OriginalSubjectProperty.CurrentValue)+" Estimated Value";}if(propValue!=$get("lblValue").innerText){propValue=$get("lblValue").innerText+" "+$get("lblValueLabel").innerText;}str+='<tr><td  colspan="2" valign="top" style="width: 100%"><div style="font: bold 11pt Arial;color: Black;"> ADDRESS:&nbsp;&nbsp;'+(standardAddress==""?streetAddress:standardAddress)+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+propValue+"</div></td></tr>";str+='<tr><td  colspan="2" id="tdMapContainer" valign="top" style="width: 100%">';var streetAddress=(PIR.OriginalSubjectProperty.StreetLine1==null?"":PIR.OriginalSubjectProperty.StreetLine1)+(prop.Unit==null?"":" "+prop.Unit)+","+(PIR.OriginalSubjectProperty.ZIP==null?"":PIR.OriginalSubjectProperty.ZIP);var center=TMAP.VEMap.GetCenter();var mapCenterlat=center.Latitude;var mapCenterlng=center.Longitude;var mapZoomLevel=TMAP.VEMap.GetZoomLevel();var style="Hybrid";if(showParcels==true){if(mapZoomLevel==17||mapZoomLevel==18||mapZoomLevel==19){showParcels=true;}else{showParcels=false;}}if(TMAP.VEMap.GetMapStyle()=="a"){style="Aerial";}else{if(TMAP.VEMap.GetMapStyle()=="r"){style="Road";}else{style="Hybrid";}}var querystr="?licenseCode="+LicenseCode+"&address="+streetAddress+"&zip="+(PIR.OriginalSubjectProperty.ZIP==null?"":PIR.OriginalSubjectProperty.ZIP)+"&home="+myHome+"&homeForSale="+homeForSale+"&homeRecentlySold="+homeRecentlySold+"&showParcels="+showParcels+"&mapcentlat="+mapCenterlat+"&mapcentlng="+mapCenterlng+"&z="+mapZoomLevel+"&style="+style;str+='<img id="testimager" src="Handlers/GetImagerServiceMap.ashx'+querystr+'"/>';str+="<br /></td></tr>";if(styleOption=="B"){var printArea1HTML=document.getElementById(print_area1).innerHTML;printArea1HTML=printArea1HTML.replace("HV_setActivePanel(this, 'hvSubTab0');","");printArea1HTML=printArea1HTML.replace("HV_setActivePanel(this, 'hvSubTab1');","");printArea1HTML=printArea1HTML.replace("HV_setActivePanel(this, 'hvSubTab2');","");printArea1HTML=printArea1HTML.replace("VMPAGE.switchTab('sbTab5','sbPanel5','ButtonAction');","");printArea1HTML=printArea1HTML.replace("VMPAGE.switchTab('sbTab4','sbPanel4','ButtonAction');","");printArea1HTML=printArea1HTML.replace("VMPAGE.switchTab('sbTab3','sbPanel3','ButtonAction');","");printArea1HTML=printArea1HTML.replace("VMPAGE.switchTab('sbTab3','sbPanel3','ButtonAction');","");printArea1HTML=printArea1HTML.replace(/searchPropertyHistory/g,"");printArea1HTML=printArea1HTML.replace(/setPropertyRank/g,"");printArea1HTML=printArea1HTML.replace(/promoteProperty/g,"");printArea1HTML=printArea1HTML.replace(/removeProperty/g,"");printArea1HTML=printArea1HTML.replace("refreshSearchGrid();","");printArea1HTML=printArea1HTML.replace("class=CmdBtn id=ctlNotifyMe_btnSubscribe style='WIDTH: 110px' onclick=subscribeNearbySalesNotifications();","");printArea1HTML=printArea1HTML.replace(/javascript:CenterMap/g,"");printArea1HTML=printArea1HTML.replace("toggleListingGroup(this, 'SP');","");printArea1HTML=printArea1HTML.replace("toggleListingGroup(this, 'CS');","");printArea1HTML=printArea1HTML.replace("toggleListingGroup(this, 'MLS');","");for(var i=0;i<6;i++){printArea1HTML=printArea1HTML.replace("calcAddition();","''");}printArea1HTML=printArea1HTML.replace(/CalcEquity(this)/g,"");printArea1HTML=printArea1HTML.replace(">Update Values<","");printArea1HTML=printArea1HTML.replace(">Reset<","");printArea1HTML=printArea1HTML.replace(/Icon1/g,"");printArea1HTML=printArea1HTML.replace(/CmdBtn/g,"");printArea1HTML=printArea1HTML.replace("if (validateHomeFactInput(this,0, document.getElementById( lblCustomClientLocalization ).getAttribute( 'Validation_Num_Bedrooms_Value' ), document.getElementById( lblCustomClientLocalization ).getAttribute( 'Validation_Num_Bedrooms' ) )) GetPriceChange( false );","");printArea1HTML=printArea1HTML.replace("if (validateHomeFactInput(this,0, document.getElementById( lblCustomClientLocalization ).getAttribute( 'Validation_Num_Bathrooms_Value' ), document.getElementById( lblCustomClientLocalization ).getAttribute( 'Validation_Num_Bathrooms' ) )) GetPriceChange( false );","");printArea1HTML=printArea1HTML.replace("if (validateHomeFactInput(this,0, document.getElementById( lblCustomClientLocalization ).getAttribute( 'Validation_Total_Rooms_Value' ), document.getElementById( lblCustomClientLocalization ).getAttribute( 'Validation_Total_Rooms' ) )) GetPriceChange( false );","");printArea1HTML=printArea1HTML.replace("if (validateHomeFactInput(this,0, document.getElementById( lblCustomClientLocalization ).getAttribute( 'Validation_Square_Footage_Value' ), document.getElementById( lblCustomClientLocalization ).getAttribute( 'Validation_Square_Footage' ) )) GetPriceChange( false );","");printArea1HTML=printArea1HTML.replace("refreshMap('Update');return false;","");printArea1HTML=printArea1HTML.replace("resetSearch();","");printArea1HTML=printArea1HTML.replace("subscribeNearbySalesNotifications();","''");printArea1HTML=printArea1HTML.replace(/Subscribe/g,"");printArea1HTML=printArea1HTML.replace('<IMG class= src="img/1x1.gif">',"");printArea1HTML=printArea1HTML.replace('<IMG class=Icon src="img/1x1.gif">',"");printArea1HTML=printArea1HTML.replace("Sort","");printArea1HTML=printArea1HTML.replace("CalcEquity(this);","''");printArea1HTML=printArea1HTML.replace("CalcEquity(this);","''");printArea1HTML=printArea1HTML.replace("You can make changes to your home value by entering revised values for the attributes of your home below.","");printArea1HTML=printArea1HTML.replace('Click "Update Values" to see the effect of your changes on the map, or "Reset" to restore the original values on your home.',"");printArea1HTML=printArea1HTML.replace("Email Preview","");printArea1HTML=printArea1HTML.replace("Email Report","");printArea1HTML=printArea1HTML.replace("sendMail","");printArea1HTML=printArea1HTML.replace("previewMail","");PageTracker("/Header/Print/MyMap-Neighborhood-Property Trend");if(print_area1!="sbPanel2"){str+='<tr id="tabs" valign="top"><td>';if(print_area1=="sbPanel0"){var hvSubTab2=$get("hvSubTab2");var strCalc='<table class="SideBarMenu" style="width: 100%; height: 100%; background-color: #EFEFEF;" >';strCalc+='<tr class="DataEntryPrint"><td colspan="2" width="*" class="L1" style="font-family: Tahoma,Arial,Sans-Serif; font-size: 9px; font-weight: bold; font-style: normal;">Property Value</td></tr>';if(cssFolder=="CTBNK-UB"){strCalc+='<tr valign="top">';}else{if(browser=="Microsoft Internet Explorer"){strCalc+='<tr valign="top" height="100%">';}else{strCalc+='<tr valign="top" height="243px">';}}strCalc+='<td style="height: 100%">';if(browser=="Microsoft Internet Explorer"){if(cssFolder=="CTBNK-UB"){strCalc+='<table class="SideBarMenu" style="width: 100%; height: 90; border-color: #EFEFEF;" >';}else{strCalc+='<table class="SideBarMenu" style="width: 100%; height: 233; border-color: #EFEFEF;" >';}}else{strCalc+='<table class="SideBarMenu" style="width: 100%; height: 100%; border-color: #EFEFEF;" >';}strCalc+='<tr><td colspan="3" class="hvSubTitle" style="font-family: Tahoma,Arial,Sans-Serif; font-size: 9px; font-weight: bold; font-style: normal;">Adjusted Property Value:<br /></td></tr>';strCalc+='<tr class="DataEntryPrint"><td></td><td></td><td></td></tr><tr class="DataEntryPrint"><td>&nbsp;No. Bedrooms:</td><td></td>';strCalc+="<td>"+$get("tbNumBeds").value;strCalc+='</td></tr><tr class="DataEntryPrint"><td>&nbsp;No. Bathrooms:</td><td></td><td>'+$get("tbNumBaths").value;strCalc+='</td></tr><tr class="DataEntryPrint"><td>&nbsp;Total Rooms:</td><td></td><td>'+$get("tbTotalRooms").value;strCalc+='</td></tr><tr class="DataEntryPrint"><td>&nbsp;Square Footage:</td><td></td><td>'+$get("tbLivingArea").value;strCalc+='</td></tr><tr class="DataEntryPrint"><td>&nbsp;Year Built:</td><td></td><td>'+$get("selYearBuilt").value;strCalc+='</td></tr><tr><td colspan="3"><hr /></td></tr><tr class="DataEntryPrint"><td><b>&nbsp;Adjusted Value:</b></td><td></td>';var ValEstimate=$get("tdNewValEstimate").innerText;var tdOrigValue=$get("tdOrigValue").innerText;var tdNewValEstimate=$get("tdNewValEstimate").innerText;strCalc+="<td><b>"+(ValEstimate==""?tdOrigValue:tdNewValEstimate);strCalc+='</b></td></tr></table></td><td style="height: 100%">';if(cssFolder=="CHASE_CUSTSERV"||cssFolder=="CHASE_LOANCENTER1"||cssFolder=="CHASE_LOANCENTER2"||cssFolder=="CHASE_CUSTSERV2"||cssFolder=="CHASE_RB"||cssFolder=="Central_Coast"){}else{strCalc+='<table class="SideBarMenu" style="width: 100%; height: 100%; border-color: #EFEFEF;" >';strCalc+='<tr class="DataEntryPrint"><td class="hvSubTitle"  style="font-family: Tahoma,Arial,Sans-Serif; font-size: 9px; font-weight: bold; font-style: normal;">Home Improvements:<br /></td></tr>';strCalc+='<tr class="DataEntryPrint"><td></td></tr>';var ecValuePer;var ecSQFT;var ecValuePer;var ecChkAddBed=$get("ecChkAddBed");var ecChkAddBath=$get("ecChkAddBath");var ecChkAdd=$get("ecChkAdd");var ecChkExpand=$get("ecChkExpand");if(ecChkAddBed.checked==true){strCalc+='<tr class="DataEntryPrint"><td>&nbsp;&nbsp;Added 1 Bedroom ('+$get("ecSQFT").value+' sqft)</td></tr><tr><td><hr /></td></tr><tr class="DataEntryPrint">';strCalc+="<td>&nbsp;Cost&nbsp; (Based on $"+$get("ecCostPer").value+"/sqft) = $"+$get("ecCostTTL").innerText;strCalc+='</td></tr><tr class="DataEntryPrint">';ecValuePer=$get("ecValuePer").value;ecSQFT=$get("ecSQFT").value;ecValuePer=$get("ecValuePer").value;strCalc+="<td>&nbsp;Value (Based on $"+(ecValuePer=="0"?ecSQFT:ecValuePer)+"/sqft) = $"+$get("ecValueTTL").innerText;strCalc+='</td></tr><tr style="font-family: Tahoma,Arial,Sans-Serif; font-size: 6px; font-style: normal;"><td> &nbsp;</td></tr><tr><td><hr /></td></tr><tr class="DataEntryPrint">';strCalc+="<td><b>&nbsp;Net Value Created is $"+$get("ecNetValue").innerText;strCalc+="</b></td></tr>";}else{if(ecChkAddBath.checked==true){strCalc+='<tr class="DataEntryPrint"><td>&nbsp;&nbsp;Added 1 Bathroom ('+$get("ecSQFT").value+' sqft)</td></tr><tr><td><hr /></td></tr><tr class="DataEntryPrint">';strCalc+="<td>&nbsp;Cost&nbsp; (Based on $"+$get("ecCostPer").value+"/sqft) = $"+$get("ecCostTTL").innerText;strCalc+='</td></tr><tr class="DataEntryPrint">';ecValuePer=$get("ecValuePer").value;ecSQFT=$get("ecSQFT").value;ecValuePer=$get("ecValuePer").value;strCalc+="<td>&nbsp;Value (Based on $"+(ecValuePer=="0"?ecSQFT:ecValuePer)+"/sqft) = $"+$get("ecValueTTL").innerText;strCalc+='</td></tr><tr style="font-family: Tahoma,Arial,Sans-Serif; font-size: 6px; font-style: normal;"><td> &nbsp;</td></tr><tr><td><hr /></td></tr><tr class="DataEntryPrint">';strCalc+="<td><b>&nbsp;Net Value Created is $"+$get("ecNetValue").innerText;strCalc+="</b></td></tr>";}else{if(ecChkAdd.checked==true){strCalc+='<tr class="DataEntryPrint"><td>&nbsp;&nbsp;Added 1 Other Room ('+$get("ecSQFT").value+' sqft)</td></tr><tr><td><hr /></td></tr><tr class="DataEntryPrint">';strCalc+="<td>&nbsp;Cost&nbsp; (Based on $"+$get("ecCostPer").value+"/sqft) = $"+$get("ecCostTTL").innerText;strCalc+='</td></tr><tr class="DataEntryPrint">';ecValuePer=$get("ecValuePer").value;ecSQFT=$get("ecSQFT").value;ecValuePer=$get("ecValuePer").value;strCalc+="<td>&nbsp;Value (Based on $"+(ecValuePer=="0"?ecSQFT:ecValuePer)+"/sqft) = $"+$get("ecValueTTL").innerText;strCalc+='</td></tr><tr style="font-family: Tahoma,Arial,Sans-Serif; font-size: 6px; font-style: normal;"><td> &nbsp;</td></tr><tr><td><hr /></td></tr><tr class="DataEntryPrint">';strCalc+="<td><b>&nbsp;Net Value Created is $"+$get("ecNetValue").innerText;strCalc+="</b></td></tr>";}else{if(ecChkExpand.checked==true){strCalc+='<tr class="DataEntryPrint"><td>&nbsp;&nbsp;Expand Existing Room ('+$get("ecSQFT").value+" sqft)";strCalc+='</td></tr><tr><td><hr /></td></tr><tr class="DataEntryPrint">';strCalc+="<td>&nbsp;Cost&nbsp; (Based on $"+$get("ecCostPer").value+"/sqft) = $"+$get("ecCostTTL").innerText;strCalc+='</td></tr><tr class="DataEntryPrint">';ecValuePer=$get("ecValuePer").value;ecSQFT=$get("ecSQFT").value;ecValuePer=$get("ecValuePer").value;strCalc+="<td>&nbsp;Value (Based on $"+(ecValuePer=="0"?ecSQFT:ecValuePer)+"/sqft) = $"+$get("ecValueTTL").innerText;strCalc+='</td></tr><tr style="font-family: Tahoma,Arial,Sans-Serif; font-size: 6px; font-style: normal;"><td> &nbsp;</td></tr><tr><td><hr /></td></tr><tr class="DataEntryPrint">';strCalc+="<td><b>&nbsp;Net Value Created is $"+$get("ecNetValue").innerText;strCalc+="</b></td></tr>";}}}}strCalc+="</table>";}strCalc+="</td>";strCalc+="</tr>";if(cssFolder=="CTBNK-UB"){if(hvSubTab2!=null){var hv_est_value=$get("hv_est_value").innerText;if(hv_est_value!=""){strCalc+='<tr><td align="left">';if(browser=="Microsoft Internet Explorer"){strCalc+='<table class="SideBarMenu" style="width: 100%; height: 35; border-color: #EFEFEF;"><tr>';}else{strCalc+='<table class="SideBarMenu" style="width: 100%; height: 100%; border-color: #EFEFEF;"><tr>';}strCalc+='<td colspan="2" class="hvSubTitle" style="font-family: Tahoma,Arial,Sans-Serif; font-size: 9px; font-weight: bold; font-style: normal;">Home Equity</td>';strCalc+="</tr><tr><td>Home Value</td><td>"+$get("hv_est_value").innerText+"</td>";strCalc+="</tr><tr><td>Mortgage Balance</td><td>"+$get("hv_mortgage_amt").value+"</td>";strCalc+='</tr><tr><td colspan="2" height="1"><hr /></td></tr><tr><td><b>80% Equity</b></td>';strCalc+="<td><b>"+$get("hv_80_equity").innerText+"</b></td>";strCalc+="</tr><tr><td><b>90% Equity</b></td><td><b>"+$get("hv_90_equity").innerText+"</b></td>";strCalc+="</tr><tr><td><b>100% Equity</b></td><td><b>"+$get("hv_100_equity").innerText+"</b></td>";strCalc+="</tr></table></td></tr>";}}}strCalc+='<tr height="*"><td colspan="2"></td></tr>';strCalc+="</table>";str+=strCalc;}else{str+=printArea1HTML;}str+="</td>";str+="<td>";}else{str+='<td colspan="2" valign="top" align="center" style="width: 100%">';}var xref={StateCode:""};xref.StateCode=PIR.OriginalSubjectProperty.StateCode;var reportID=(document.getElementById("ddlSideBar_Reports")==null?frames[0].document.getElementById("ddlSideBar_Reports").value:document.getElementById("ddlSideBar_Reports").value);var Report=$get("RptInfo"+reportID).innerText;var RptHeader=$get("RptHeader"+reportID).innerHTML;var Parms="?";var ParmCount=0;var RptInfo="";var startDate=new Date();startDate.setFullYear(startDate.getFullYear()-1,startDate.getMonth(),startDate.getDay());var endDate=new Date();Report=eval("("+Report+")");var startDate1="";var endDate1="";var zipCodePrint=$get("parmregionCode");for(var itm in Report){switch(Report[itm].value){case"@ZIPCODE":if(PIR.GeocodeType=="Z"){Report[itm].value=zipCodePrint;}else{if(zipCodePrint!=null){Report[itm].value=zipCodePrint.value;}else{Report[itm].value=PIR.OriginalSubjectProperty.ZIP;}}break;case"@STARTDATE":Report[itm].value=formatDate(startDate,Report[itm].format);startDate1=formatDate(startDate,Report[itm].format);break;case"@ENDDATE":Report[itm].value=formatDate(endDate,Report[itm].format);endDate1=formatDate(endDate,Report[itm].format);break;case"@STATE":Report[itm].value=PIR.OriginalSubjectProperty.State;break;case"@STATECODE":Report[itm].value=xref.StateCode;break;}var regTMP=new RegExp("@"+itm,"gi");RptHeader=RptHeader.replace(regTMP,Report[itm].value);if(itm.substring(0,1)!="_"){if(ParmCount>0){Parms+="&";}Parms+=itm+"="+Report[itm].value;ParmCount++;}}if((cssFolder=="CHASE_CUSTSERV")||(cssFolder=="CHASE_LOANCENTER1")||(cssFolder=="CHASE_LOANCENTER2")||(cssFolder=="CHASE_CUSTSERV2")||(cssFolder=="CHASE_RB")){str+='<table style="width: 200px;"><tr><td></td></tr><tr><td></td></tr></table></td></tr>';}else{if(cssFolder=="CTBNK-UB"){if(browser=="Microsoft Internet Explorer"){str+='<table class="SideBarMenu" style="width: 100%; height: 278.5; border-color: #EFEFEF;" ><tr><td width="*" class="L1" id="ctlTrends_tdTitleBar" style="font-family: Tahoma,Arial,Sans-Serif; font-size: 9px; font-weight: bold; font-style: normal;">Market Trends</td></tr>';}else{str+='<table class="SideBarMenu" style="width: 100%; height: 286; border-color: #EFEFEF;" ><tr><td width="*" class="L1" id="ctlTrends_tdTitleBar" style="font-family: Tahoma,Arial,Sans-Serif; font-size: 9px; font-weight: bold; font-style: normal;">Market Trends</td></tr>';}}else{str+='<table class="SideBarMenu" style="width: 100%; border-color: #EFEFEF;" ><tr><td width="*" class="L1" id="ctlTrends_tdTitleBar" style="font-family: Tahoma,Arial,Sans-Serif; font-size: 9px; font-weight: bold; font-style: normal;">Market Trends</td></tr>';}str+='<tr><td><div style="text-align: center;">';str+='<span style="font-family: Tahoma,Arial,Sans-Serif; font-size: 9px; font-weight: bold; font-style: normal;">Median Sales Price For '+(zipCodePrint!=null?zipCodePrint.value:PIR.OriginalSubjectProperty.ZIP)+"</span>";str+="<br/>From "+startDate1+" To "+endDate1+"</div>";str+='</td></tr><tr><td align="center">';str+='<img id="testimager2" src="Handlers/GetReTrendsReport.ashx'+Parms+'"/>';str+="</td></tr></table></td></tr>";}}if(styleOption=="A"){PageTracker("/Header/Print/MyMap-Neighborhood");}str+='<tr><td colspan="2" style="width: 100%" align="center" valign="top">';var printArea3HTML=document.getElementById(print_area3).innerHTML;printArea3HTML=printArea3HTML.replace("toggleListingGroup(this, 'SP');","");printArea3HTML=printArea3HTML.replace("toggleListingGroup(this, 'CS');","");printArea3HTML=printArea3HTML.replace("toggleListingGroup(this, 'MLS');","");printArea3HTML=printArea3HTML.replace(/javascript:CenterMap/g,"");printArea3HTML=printArea3HTML.replace(/Click to center map at /g,"");str+=printArea3HTML+"<br>";str+='</td></tr><tr><td colspan="2" style="width: 788px;"  valign="top" style="white-space: nowrap; text-align: left;"><span style="font-weight: bolder; font-size: 8pt; text-transform: uppercase;text-align: left;">';var printDisclaimer="Disclaimer: The data and valuations are provided AS IS without warranty or guarantee of any kind, either express or implied,<br>";printDisclaimer+=" including without limitation, any warranties of merchantability or fitness for a particular purpose. The existence of the ";printDisclaimer+="subject property and the accuracy of the valuations are estimated based on available data and do not constitute an ";printDisclaimer+="appraisal of the subject property and should not be relied upon in lieu of underwriting or an appraisal.";printDisclaimer=printDisclaimer.replace("<br>","");str+=printDisclaimer+"</span><br>";str+="</td></tr>";str+='<tr><td align="left" style="width:50%">'+$get("copyrights").innerHTML+'</td><td align="right" style="width:50%"><INPUT ID="PRINT" type="button" value="Print" onclick="javascript:window.print();" class="NonPrintable"><INPUT ID="CLOSE" type="button" value="Close" onclick="window.close();" class="NonPrintable"></td></tr>';str+="</table>";str+="</form>";str+="</body></HTML>";pp.document.write(str);pp.document.close();}catch(err){txt="There was an error on this page.\n\n";txt+="Error description: "+err.description+"\n\n";txt+="Click OK to continue.\n\n";alert(txt);}}

function getMinPrint(print_area0,print_area1,myHome,homeForSale,homeRecentlySold,showParcels,cssFolder,bGraph,printOption){try{var params="directories=no";params+=", location=no";params+=", menubar=no";params+=", resizable=no";params+=", scrollbars=yes";params+=", status=yes";params+=", toolbar=no";params+=", width=790";params+=", height=655";params+=", top=0";params+=", left=200";var pp="";var str="";var browser=navigator.appName;var b_version=navigator.appVersion;var version=parseFloat(b_version);pp=window.open("","",params);var prop=PIR.SubjectProperty;var propValue=prop.DisplayPrice;var streetAddress=(PIR.OriginalSubjectProperty.StreetLine1==null?"":PIR.OriginalSubjectProperty.StreetLine1)+(prop.Unit==null?"":" "+prop.Unit)+","+(PIR.OriginalSubjectProperty.ZIP==null?"":PIR.OriginalSubjectProperty.ZIP);str="<HTML><HEAD><title>Printer Friendly View</title>";str+=print_area0;str+='<link href="style/ValueMapPrint.css" media="print" rel="stylesheet" type="text/css" />';str+='<base target="_self"></HEAD>';str+='<style type="text/css">body{ margin:0; } td{ padding-top: 2px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; }</style>';str+='<body class="Default HideSelect" align="center" id="bdyMainPrint" onLoad="self.focus()" marginwidth="0" marginheight="0">';str+='<form id="printerVM"  method="post">';str+='<table class="Default" cellpadding="0" cellspacing="0" style="width: 770px" >';var propValue="";if(PIR.OriginalSubjectProperty.CurrentValue<=0){propValue="Not Available";}else{propValue=formatCurrency(PIR.OriginalSubjectProperty.CurrentValue)+" Estimated Value";}if(propValue!=$get("lblValue").innerText){propValue=$get("lblValue").innerText+" "+$get("lblValueLabel").innerText;}str+='<tr><td  colspan="2" valign="top" style="width: 100%"><div style="font: bold 11pt Arial;color: Black;"> ADDRESS:&nbsp;&nbsp;'+(standardAddress==""?streetAddress:standardAddress)+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+propValue+"</div></td></tr>";str+='<tr align="left"><td  colspan="2" valign="top" style="width: 100%">';var streetAddress=(PIR.OriginalSubjectProperty.StreetLine1==null?"":PIR.OriginalSubjectProperty.StreetLine1)+(prop.Unit==null?"":" "+prop.Unit)+","+(PIR.OriginalSubjectProperty.ZIP==null?"":PIR.OriginalSubjectProperty.ZIP);var center=TMAP.VEMap.GetCenter();var mapCenterlat=center.Latitude;var mapCenterlng=center.Longitude;var mapZoomLevel=TMAP.VEMap.GetZoomLevel();var style="Hybrid";if(showParcels==true){if(mapZoomLevel==17||mapZoomLevel==18||mapZoomLevel==19){showParcels=true;}else{showParcels=false;}}if(TMAP.VEMap.GetMapStyle()=="a"){style="Aerial";}else{if(TMAP.VEMap.GetMapStyle()=="r"){style="Road";}else{style="Hybrid";}}var querystr="?licenseCode="+LicenseCode+"&address="+streetAddress+"&zip="+(PIR.OriginalSubjectProperty.ZIP==null?"":PIR.OriginalSubjectProperty.ZIP)+"&home="+myHome+"&homeForSale="+homeForSale+"&homeRecentlySold="+homeRecentlySold+"&showParcels="+showParcels+"&mapcentlat="+mapCenterlat+"&mapcentlng="+mapCenterlng+"&z="+mapZoomLevel+"&style="+style;str+='<img id="testimager" src="Handlers/GetImagerServiceMap.ashx'+querystr+'"/>';str+="<br /></td></tr>";if(printOption=="B"){PageTracker("/Header/PrintMin/MyMap-Neighborhood-Property Trend");if(bGraph==false){str+='<tr valign="top"><td>';var hvSubTab2=$get("hvSubTab2");var strCalc='<table class="SideBarMenu" style="width: 100%; height: 100%; background-color: #EFEFEF;" cellpadding="0" cellspacing="0">';strCalc+='<tr class="DataEntryPrint"><td colspan="2" width="*" class="L1"  style="font-family: Tahoma,Arial,Sans-Serif; font-size: 9px; font-weight: bold; font-style: normal;">Property Value</td></tr>';if(browser=="Microsoft Internet Explorer"){strCalc+='<tr valign="top" height="100%">';}else{strCalc+='<tr valign="top" height="243px">';}strCalc+='<td style="height: 100%">';if(browser=="Microsoft Internet Explorer"){strCalc+='<table class="SideBarMenu" style="width: 100%; height: 235; border-color: #EFEFEF;" >';}else{strCalc+='<table class="SideBarMenu" style="width: 100%; height: 100%; border-color: #EFEFEF;" >';}strCalc+='<tr><td colspan="3" class="hvSubTitle" style="font-family: Tahoma,Arial,Sans-Serif; font-size: 9px; font-weight: bold; font-style: normal;">Adjusted Property Value:<br /></td></tr>';strCalc+='<tr class="DataEntryPrint"><td></td><td></td><td></td></tr><tr class="DataEntryPrint"><td>&nbsp;No. Bedrooms:</td><td></td>';strCalc+="<td>"+$get("tbNumBeds").value;strCalc+='</td></tr><tr class="DataEntryPrint"><td>&nbsp;No. Bathrooms:</td><td></td><td>'+$get("tbNumBaths").value;strCalc+='</td></tr><tr class="DataEntryPrint"><td>&nbsp;Total Rooms:</td><td></td><td>'+$get("tbTotalRooms").value;strCalc+='</td></tr><tr class="DataEntryPrint"><td>&nbsp;Square Footage:</td><td></td><td>'+$get("tbLivingArea").value;strCalc+='</td></tr><tr class="DataEntryPrint"><td>&nbsp;Year Built:</td><td></td><td>'+$get("selYearBuilt").value;strCalc+='</td></tr><tr><td colspan="3"><hr /></td></tr><tr class="DataEntryPrint"><td>&nbsp;Adjusted Value:</td><td></td>';var ValEstimate=$get("tdNewValEstimate").innerText;var tdOrigValue=$get("tdOrigValue").innerText;var tdNewValEstimate=$get("tdNewValEstimate").innerText;strCalc+="<td><b>"+(ValEstimate==""?tdOrigValue:tdNewValEstimate);strCalc+='</b></td></tr></table></td><td style="height: 100%">';if(cssFolder=="CHASE_CUSTSERV"||cssFolder=="CHASE_LOANCENTER1"||cssFolder=="CHASE_LOANCENTER2"){}else{strCalc+='<table class="SideBarMenu" style="width: 100%; height: 100%; border-color: #EFEFEF;" >';strCalc+='<tr class="DataEntryPrint"><td class="hvSubTitle" style="font-family: Tahoma,Arial,Sans-Serif; font-size: 9px; font-weight: bold; font-style: normal;">Home Improvements:<br /></td></tr>';strCalc+='<tr class="DataEntryPrint"><td></td></tr>';var ecValuePer;var ecSQFT;var ecValuePer;var ecChkAddBed=$get("ecChkAddBed");var ecChkAddBath=$get("ecChkAddBath");var ecChkAdd=$get("ecChkAdd");var ecChkExpand=$get("ecChkExpand");if(ecChkAddBed.checked==true){strCalc+='<tr class="DataEntryPrint"><td>&nbsp;&nbsp;Added 1 Bedroom ('+$get("ecSQFT").value+' sqft)</td></tr><tr><td><hr /></td></tr><tr class="DataEntryPrint">';strCalc+="<td>&nbsp;Cost&nbsp; (Based on $"+$get("ecCostPer").value+"/sqft) = $"+$get("ecCostTTL").innerText;strCalc+='</td></tr><tr class="DataEntryPrint">';ecValuePer=$get("ecValuePer").value;ecSQFT=$get("ecSQFT").value;ecValuePer=$get("ecValuePer").value;strCalc+="<td>&nbsp;Value (Based on $"+(ecValuePer=="0"?ecSQFT:ecValuePer)+"/sqft) = $"+$get("ecValueTTL").innerText;strCalc+='</td></tr><tr style="font-family: Tahoma,Arial,Sans-Serif; font-size: 6px; font-style: normal;"><td> &nbsp;</td></tr><tr><td><hr /></td></tr><tr class="DataEntryPrint">';strCalc+="<td><b>&nbsp;Net Value Created is $"+$get("ecNetValue").innerText;strCalc+="</b></td></tr>";}else{if(ecChkAddBath.checked==true){strCalc+='<tr class="DataEntryPrint"><td>&nbsp;&nbsp;Added 1 Bathroom ('+$get("ecSQFT").value+' sqft)</td></tr><tr><td><hr /></td></tr><tr class="DataEntryPrint">';strCalc+="<td>&nbsp;Cost&nbsp; (Based on $"+$get("ecCostPer").value+"/sqft) = $"+$get("ecCostTTL").innerText;strCalc+='</td></tr><tr class="DataEntryPrint">';ecValuePer=$get("ecValuePer").value;ecSQFT=$get("ecSQFT").value;ecValuePer=$get("ecValuePer").value;strCalc+="<td>&nbsp;Value (Based on $"+(ecValuePer=="0"?ecSQFT:ecValuePer)+"/sqft) = $"+$get("ecValueTTL").innerText;strCalc+='</td></tr><tr style="font-family: Tahoma,Arial,Sans-Serif; font-size: 6px; font-style: normal;"><td> &nbsp;</td></tr><tr><td><hr /></td></tr><tr class="DataEntryPrint">';strCalc+="<td><b>&nbsp;Net Value Created is $"+$get("ecNetValue").innerText;strCalc+="</b></td></tr>";}else{if(ecChkAdd.checked==true){strCalc+='<tr class="DataEntryPrint"><td>&nbsp;&nbsp;Added 1 Other Room ('+$get("ecSQFT").value+' sqft)</td></tr><tr><td><hr /></td></tr><tr class="DataEntryPrint">';strCalc+="<td>&nbsp;Cost&nbsp; (Based on $"+$get("ecCostPer").value+"/sqft) = $"+$get("ecCostTTL").innerText;strCalc+='</td></tr><tr class="DataEntryPrint">';ecValuePer=$get("ecValuePer").value;ecSQFT=$get("ecSQFT").value;ecValuePer=$get("ecValuePer").value;strCalc+="<td>&nbsp;Value (Based on $"+(ecValuePer=="0"?ecSQFT:ecValuePer)+"/sqft) = $"+$get("ecValueTTL").innerText;strCalc+='</td></tr><tr style="font-family: Tahoma,Arial,Sans-Serif; font-size: 6px; font-style: normal;"><td> &nbsp;</td></tr><tr><td><hr /></td></tr><tr class="DataEntryPrint">';strCalc+="<td><b>&nbsp;Net Value Created is $"+$get("ecNetValue").innerText;strCalc+="</b></td></tr>";}else{if(ecChkExpand.checked==true){strCalc+='<tr class="DataEntryPrint"><td>&nbsp;&nbsp;Expand Existing Room ('+$get("ecSQFT").value+" sqft)";strCalc+='</td></tr><tr><td><hr /></td></tr><tr class="DataEntryPrint">';strCalc+="<td>&nbsp;Cost&nbsp; (Based on $"+$get("ecCostPer").value+"/sqft) = $"+$get("ecCostTTL").innerText;strCalc+='</td></tr><tr class="DataEntryPrint">';ecValuePer=$get("ecValuePer").value;ecSQFT=$get("ecSQFT").value;ecValuePer=$get("ecValuePer").value;strCalc+="<td>&nbsp;Value (Based on $"+(ecValuePer=="0"?ecSQFT:ecValuePer)+"/sqft) = $"+$get("ecValueTTL").innerText;strCalc+='</td></tr><tr style="font-family: Tahoma,Arial,Sans-Serif; font-size: 6px; font-style: normal;"><td> &nbsp;</td></tr><tr><td><hr /></td></tr><tr class="DataEntryPrint">';strCalc+="<td><b>&nbsp;Net Value Created is $"+$get("ecNetValue").innerText;strCalc+="</b></td></tr>";}}}}strCalc+="</table>";}strCalc+="</td>";strCalc+="</tr>";strCalc+="</table>";str+=strCalc;str+="</td>";str+="<td>";}else{str+='<td colspan="2" valign="top" align="center" style="width: 100%">';}var xref={StateCode:""};xref.StateCode=PIR.OriginalSubjectProperty.StateCode;var reportID=(document.getElementById("ddlSideBar_Reports")==null?frames[0].document.getElementById("ddlSideBar_Reports").value:document.getElementById("ddlSideBar_Reports").value);var Report=$get("RptInfo"+reportID).innerText;var RptHeader=$get("RptHeader"+reportID).innerHTML;var Parms="?";var ParmCount=0;var RptInfo="";var startDate=new Date();startDate.setFullYear(startDate.getFullYear()-1,startDate.getMonth(),startDate.getDay());var endDate=new Date();Report=eval("("+Report+")");var startDate1="";var endDate1="";var zipCodePrint=$get("parmregionCode");for(var itm in Report){switch(Report[itm].value){case"@ZIPCODE":if(PIR.GeocodeType=="Z"){Report[itm].value=zipCodePrint;}else{if(zipCodePrint!=null){Report[itm].value=zipCodePrint.value;}else{Report[itm].value=PIR.OriginalSubjectProperty.ZIP;}}break;case"@STARTDATE":Report[itm].value=formatDate(startDate,Report[itm].format);startDate1=formatDate(startDate,Report[itm].format);break;case"@ENDDATE":Report[itm].value=formatDate(endDate,Report[itm].format);endDate1=formatDate(endDate,Report[itm].format);break;case"@STATE":Report[itm].value=PIR.OriginalSubjectProperty.State;break;case"@STATECODE":Report[itm].value=xref.StateCode;break;}var regTMP=new RegExp("@"+itm,"gi");RptHeader=RptHeader.replace(regTMP,Report[itm].value);if(itm.substring(0,1)!="_"){if(ParmCount>0){Parms+="&";}Parms+=itm+"="+Report[itm].value;ParmCount++;}}str+='<table class="SideBarMenu" style="width: 100%; border-color: #EFEFEF;" ><tr><td width="*" class="L1" id="ctlTrends_tdTitleBar" style="font-family: Tahoma,Arial,Sans-Serif; font-size: 9px; font-weight: bold; font-style: normal;">Market Trends</td></tr>';str+='<tr><td><div style="text-align: center;">';str+='<span style="font-family: Tahoma,Arial,Sans-Serif; font-size: 9px; font-weight: bold; font-style: normal;">Median Sales Price For '+(zipCodePrint!=null?zipCodePrint.value:PIR.OriginalSubjectProperty.ZIP)+"</span>";str+="<br/>From "+startDate1+" To "+endDate1+"</div>";str+='</td></tr><tr><td align="center">';str+='<img id="testimager2" src="Handlers/GetReTrendsReport.ashx'+Parms+'"/>';str+="</td></tr></table></td></tr>";}if(printOption=="A"){PageTracker("/Header/PrintMin/MyMap-Neighborhood");}str+='<tr><td colspan="2" style="width: 100%" align="center" valign="top">';var printArea1HTML=document.getElementById(print_area1).innerHTML;printArea1HTML=printArea1HTML.replace("toggleListingGroup(this, 'SP');","");printArea1HTML=printArea1HTML.replace("toggleListingGroup(this, 'CS');","");printArea1HTML=printArea1HTML.replace("toggleListingGroup(this, 'MLS');","");printArea1HTML=printArea1HTML.replace(/javascript:CenterMap/g,"");printArea1HTML=printArea1HTML.replace(/Click to center map at /g,"");str+=printArea1HTML+"";str+='</td></tr><tr><td colspan="2" style="width: 788px;"  valign="top" style="white-space: nowrap; text-align: left;"><span style="font-weight: bolder; font-size: 8pt; text-transform: uppercase;text-align: left;">';var printDisclaimer="Disclaimer: The data and valuations are provided AS IS without warranty or guarantee of any kind, either express or implied, ";printDisclaimer+="including without limitation, any warranties of merchantability or fitness for a particular purpose. The existence of the ";printDisclaimer+="subject property and the accuracy of the valuations are estimated based on available data and do not constitute an ";printDisclaimer+="appraisal of the subject property and should not be relied upon in lieu of underwriting or an appraisal.";printDisclaimer=printDisclaimer.replace("<br>","");str+=printDisclaimer+"</span>";str+="</td></tr>";str+='<tr><td align="left" style="width:50%">'+$get("lblCopyRight").innerHTML+'</td><td align="right" style="width:50%"><INPUT ID="PRINT" type="button" value="Print" onclick="javascript:window.print();" class="NonPrintable"><INPUT ID="CLOSE" type="button" value="Close" onclick="window.close();" class="NonPrintable"></td></tr>';str+="</table>";str+="</form>";str+='<script type="text/javascript" src="script/VMTop.min.js"><\/script>';str+='<script type="text/javascript" src="script/jquery/VMThirdParty.min.js"><\/script>';str+='<script type="text/javascript" src="script/VMBottom.min.js"><\/script>';str+='<script type="text/javascript" src="script/ValueMapMin.Page.js"><\/script>';str+="</body></HTML>";pp.document.write(str);pp.document.close();}catch(err){txt="There was an error on this page.\n\n";txt+="Error description: "+err.description+"\n\n";txt+="Click OK to continue.\n\n";alert(txt);}}

// JScript File
function initmin() {
    VMPAGE = new vmPAGE_CLASS();
    VEUTILS = new vmVEUtils_CLASS();
    VMM2 = null; // Not needed 
    VMHOVER = new vmTOOLTIP_CLASS();
    VMTIMER = new vmTIMER_CLASS();
    TICKER = new textScroller('TickerMsg', 3000);
    TICKER.state = "disabled";

    //load application preferences
    var tmpData = eval("(" + $get("sysPrefs").value + ");");
    VMPREFS = new vmPREFS_CLASS();
    VMPREFS.Init(tmpData);
    VMPREFS.linkBackPage = "ValueMapMin.aspx";

    VEUTILS.Init();

    //$get("divContentWrapper").style.display = "";

    // -- 2007/04/25 CDC : added new display routines to fix "flicker"
    // display lightbox with alernate class.
    var lghtbox = $get("divLightBox");
    var prgress = $get("divProgress");
    lghtbox.className = "PageLoad_LightBox";
    prgress.className = "PageLoad_Progress";
    $get("divInitMsg").style.display = "";
    $get("lblSearchProgressBar").style.display = "none";
    VMPAGE.showLightBox(true);

    VMPAGE.MaxWidth = 680;
    VMPAGE.pageType = "MINI";

    if (VMPREFS.enableParcelValues == "false") {
        enableLegendControl($get('ctlLegend_chkLegendShowAllProperties'), false, "imgText_Register");
    }
    window.setTimeout("initmin_step2()", 300);
    document.title = LicenseeName;
}


function initmin_step2() {
    VMGUIDES.ValuationX = $get("dvXOffset").clientWidth;
    VMGUIDES.LoginStatusX = $get("dvLoginOffset").clientWidth;

    $get("divPositionGuides").style.display = "none";

    resizePage();

    //populate an array with the pushpin styles
    initPushPinStyles();

    //update the report description
    updateReportDescr()


    //bind keydown to handle the "Enter" key.
    $get("txtStreetAddress").onkeydown = captureFieldHotKey;

    //initialize the tooltip templates.
    initTemplates();

    if (doSearch == true) {
        performSearch(SEARCH_TYPE_NEW, null);
        showMapLegend(true);
    } else if (VMPREFS.AutoSearch == true) {
        searchPropertyHistory(0, true);
        showMapLegend(true);
    } else {
        showMapLegend(false);
        //Restore LightBox
        VMPAGE.showLightBox(false);
        $get("divLightBox").className = "Lightbox_Backdrop";
        $get("divProgress").className = "Lightbox_Progress";
        $get("divInitMsg").style.display = "none";
        $get("lblSearchProgressBar").style.display = "";
    }

    TWOFLDS = "false";
    $get("txtCityStateZip").style.visibility = "hidden";
    $get("lblCityStateZip").style.visibility = "hidden";
    $get("SampleCityState").style.visibility = "hidden";
    $get("txtCityStateZip").style.display = "none";
    $get("lblCityStateZip").style.display = "none";
    $get("SampleCityState").innerText = "";

    if (typeof (THEME_Init_Min) == 'function')
        THEME_Init_Min();

    VMPAGE.toggleSideBar("minimized");

    VMPAGE.userButtonConfigSettings = parseUserDefinedConfiguration(UDBC1);
    if (VMPAGE.userButtonConfigSettings.displayButton.toLowerCase() == "no") {
        $get("UserJumpButton1").style.display = "none";
    }
    initToolTipExtras();
}

vmPAGE_CLASS.prototype.toggleSideBar = function (mode) {
    var eSideBar01 = $get('tdSideBar01');
    var eSideBar02 = $get('tdSideBar02');
    var mapPanel = $get('MapControlPanel');
    var mapControl = $get('tdMapContainer');

    if ((mode != undefined) || (mode > "")) {
        this.SideBar = mode;
    } else {
        if (this.SideBar == "maximized") { this.SideBar = "minimized" } else { this.SideBar = "maximized" };
    }

    switch (this.SideBar) {
        case "hidden":
            eSideBar01.style.display = "none";
            eSideBar02.style.display = "none";
            break;
        case "maximized":
            eSideBar01.style.display = "";
            eSideBar02.style.display = "";
            mapControl.style.width = "328px";
            break;
        case "minimized":
            eSideBar01.style.display = "";
            eSideBar02.style.display = "none";
            mapControl.style.width = "670px";
            break;
    }


    resizePage();
}

function resizePage() {
    try {
        var eArea1 = $get('tdMapContainer');
        var eMap01 = $get('divMap01');
        var eMap02 = $get('divMap02');
        var eMap03 = $get('divNoBirdsEye');
        var eMap04 = $get('divLoadingBirdsEye');
        var eMap05 = $get('divFAQ');


        var eArea2 = $get('divArea02');
        var eArea3 = $get('divArea03');
        var eArea4 = $get('divArea04');
        var eBEP;
        var yPos = (document.documentElement.scrollTop > 0) ? document.documentElement.scrollTop : window.pageYOffset;

        VMPAGE.CurrentWidth = document.body.clientWidth;
        VMPAGE.CurrentHeight = document.body.clientHeight;

        var mainC = $get("divPageContainer");
        var pageC = $get("divContentWrapper");

        //added to support IE6 lack of MAX-WIDTH style tag.
        var eMain = $get('divContent01');
        if (eMain.offsetWidth > VMPAGE.MaxWidth) {
            eMain.style.width = VMPAGE.MaxWidth + "px";
        }

        try {
            $get('hdrContainer').style.width = eMain.style.width;
        } catch (ex) { };

        //eMap01.style.width = (iWidth - 320 - 4) + "px";

        if (VMPAGE.SideBar != "minimized") {
            eMap01.style.width = ($get("MapControlPanel").offsetWidth - $get("tdSideBar02").offsetWidth - 4) + "px";
        }
        else {
            eMap01.style.width = (eArea1.offsetWidth - 4) + "px";
        }

        if (eMap05 != null) {
            eMap05.style.width = ((eArea1.offsetWidth) - 12) + "px";
        }


        //fix the datagrid content area width...
        $get('divContent02').style.width = $get('divContent01').offsetWidth;

        //resize the maps
        if (VMPAGE.MapSize.height != eMap01.clientHeight || VMPAGE.MapSize.width != eMap01.clientWidth) {
            if (TMAP != null)
                TMAP.VEMap.Resize(eMap01.clientWidth, eMap01.clientHeight);

            VMPAGE.MapSize.height = eMap01.clientHeight;
            VMPAGE.MapSize.width = eMap01.clientWidth;
        }

        //show mini map
        if (minimap_State == false)
            HideMiniMap(null);
        else
            ShowMiniMap(VEMiniMapSize.Small);

        //reposition the progress window
        $get('divProgress').style.top = ((document.documentElement.clientHeight / 2) - 25) + (safeNumber(yPos)) + "px";

        //reposition the multiproperty list if necessary.
        var frame = $get("propertyLinkedListFrame");
        if (frame.style.display == "") {
            var elem = $get("txtStreetAddress");
            frame.style.left = (getPos(elem, 'left') - 16) + "px";
        }

        //hide the tooltip
        try { VMHOVER.Hide(); } catch (ex) { }
    }
    catch (ex) {
        alert(ex);
    }

}
function initToolTipExtras() {
    var idx = VMPREFS.LicenseCode;
    var EMICONTACT = null;
    var EMISENDTO = null;
    //		var	propValue  = prop.DisplayPrice

    var emiContact = getCookie("VM_EMAIL_INFO_ctlEmailAgent");
    var emiTooltip = getCookie("VM_EMAIL_INFO_ToolTip");
    try {
        if (emiContact != null) {
            EMICONTACT = eval(emiContact);
            if (idx != "null|null" && EMICONTACT != null) {

                var bufferH = "[";
                bufferI = "{"
			                + " ID: '" + VMPREFS.LicenseCode + "'"
			                + ",fldTo: 'n/a'"
                            + ",fldToName: 'n/a'"
			                + ",fldFrom1:'n/a'"
			                + ",fldFrom2: 'n/a'"
			                + ",fldCCMyself: 'n/a'"
			                + ",fldSubject: 'n/a'"
			                + ",SearchDate: '" + new Date() + "'"
			                + "}"
                bufferH += bufferI;
                bufferH += "]";

                setCookie("VM_EMAIL_INFO_ctlEmailAgent"
				        , bufferH
				        , 180
				        , ""
				        , ""
				        , false);
                //		                for(var cnt=0;cnt<EMICONTACT.length;cnt++)
                //		                {
                //		                    if(EMICONTACT[cnt].ID == idx)
                //		                    {
                //		                        $get("ctlEmailAgent_fldFrom1").value = (EMICONTACT[cnt].fldFrom1=='n/a'?"":EMICONTACT[cnt].fldFrom1);
                //			                    $get("ctlEmailAgent_fldFrom2").value = (EMICONTACT[cnt].fldFrom2=='n/a'?"":EMICONTACT[cnt].fldFrom2);
                //			                    $get("ctlEmailAgent_fldCCMyself").checked = (EMICONTACT[cnt].fldCCMyself=='n/a'?"":EMICONTACT[cnt].fldCCMyself);
                //			                    $get("ctlEmailAgent_fldSubject").value = (EMICONTACT[cnt].fldSubject=='n/a'?"":EMICONTACT[cnt].fldSubject);
                //			                    $get("ctlEmailAgent_fldSaveInfo").checked=(EMICONTACT[cnt].fldFrom1=='n/a'?false:true);
                //			                }
                //			                else
                //			                {
                //			                    $get("ctlEmailAgent_fldFrom1").value = "";
                //			                    $get("ctlEmailAgent_fldFrom2").value = "";
                //			                    $get("ctlEmailAgent_fldCCMyself").checked = true;
                //			                    $get("ctlEmailAgent_fldSubject").value = "";
                //			                    $get("ctlEmailAgent_fldSaveInfo").checked=true;
                //        			            
                //			                }
                //		                }
            }
        }



        //if (VMHOVER.Type == SUBJECT_PROPERTY)
        // {
        if (emiTooltip != null) {
            EMISENDTO = eval(emiTooltip);
            if (idx != "null|null" && EMISENDTO != null) {

                var bufferH = "[";
                bufferI = "{"
			                + " ID: 'n/a'"
			                + ",fldTo: 'n/a'"
                            + ",fldToName: 'n/a'"
			                + ",fldFrom1:'n/a'"
			                + ",fldFrom2: 'n/a'"
			                + ",fldCCMyself: 'n/a'"
			                + ",fldSubject: 'n/a'"
			                + ",SearchDate: '" + new Date() + "'"
			                + "}"
                bufferH += bufferI;
                bufferH += "]";

                setCookie("VM_EMAIL_INFO_ToolTip"
				        , bufferH
				        , 180
				        , ""
				        , ""
				        , false);
            }
        }
        //}
    } catch (err) { alert(err); }



}

