/*
	This is a compiled version of Dojo, built for deployment and not for
	development. To get an editable version, please visit: 
		http://dojotoolkit.org

	for documentation and information on getting the source.
*/

if(typeof dojo=="undefined"){var dj_global=this;var dj_currentContext=this;function dj_undef(_1,_2){return (typeof (_2||dj_currentContext)[_1]=="undefined");}if(dj_undef("djConfig",this)){var djConfig={};}if(dj_undef("dojo",this)){var dojo={};}dojo.global=function(){return dj_currentContext;};dojo.locale=djConfig.locale;dojo.version={major:0,minor:4,patch:1,flag:"wtl",revision:Number("$Rev: 6986 $".match(/[0-9]+/)[0]),toString:function(){with(dojo.version){return major+"."+minor+"."+patch+flag+" ("+revision+")";}}};dojo.getObject=function(_3,_4,_5,_6){var _7,_8;if(typeof _3!="string"){return undefined;}_7=_5;if(!_7){_7=dojo.global();}var _9=_3.split("."),i=0,_b,_c,_d;do{_b=_7;_d=_9[i];_c=_7[_9[i]];if((_4)&&(!_c)){_c=_7[_9[i]]={};}_7=_c;i++;}while(i<_9.length&&_7);_8=_7;_7=_b;return (_6)?{obj:_7,prop:_d}:_8;};dojo.exists=function(_e,_f){if(typeof _f=="string"){dojo.deprecated("dojo.exists(obj, name)","use dojo.exists(name, obj, /*optional*/create)","0.6");var tmp=_e;_e=_f;_f=tmp;}return (!!dojo.getObject(_e,false,_f));};dojo.evalProp=function(_11,_12,_13){dojo.deprecated("dojo.evalProp","just use hash syntax. Sheesh.","0.6");return _12[_11]||(_13?(_12[_11]={}):undefined);};dojo.parseObjPath=function(_14,_15,_16){dojo.deprecated("dojo.parseObjPath","use dojo.getObject(path, create, context, true)","0.6");return dojo.getObject(_14,_16,_15,true);};dojo.evalObjPath=function(_17,_18){dojo.deprecated("dojo.evalObjPath","use dojo.getObject(path, create)","0.6");return dojo.getObject(_17,_18);};dojo.errorToString=function(_19){return (_19["message"]||_19["description"]||_19);};dojo.raise=function(_1a,_1b){if(_1b){_1a=_1a+": "+dojo.errorToString(_1b);}else{_1a=dojo.errorToString(_1a);}try{if(djConfig.isDebug){dojo.hostenv.println("FATAL exception raised: "+_1a);}}catch(e){}throw _1b||Error(_1a);};dojo.debug=function(){};dojo.debugShallow=function(obj){};dojo.profile={start:function(){},end:function(){},stop:function(){},dump:function(){}};function dj_eval(_1d){return dj_global.eval?dj_global.eval(_1d):eval(_1d);}dojo.unimplemented=function(_1e,_1f){var _20="'"+_1e+"' not implemented";if(_1f!=null){_20+=" "+_1f;}dojo.raise(_20);};dojo.deprecated=function(_21,_22,_23){var _24="DEPRECATED: "+_21;if(_22){_24+=" "+_22;}if(_23){_24+=" -- will be removed in version: "+_23;}dojo.debug(_24);};dojo.render=(function(){function vscaffold(_25,_26){var tmp={capable:false,support:{builtin:false,plugin:false},prefixes:_25};for(var i=0;i<_26.length;i++){tmp[_26[i]]=false;}return tmp;}return {name:"",ver:dojo.version,os:{win:false,linux:false,osx:false},html:vscaffold(["html"],["ie","opera","khtml","safari","moz"]),svg:vscaffold(["svg"],["corel","adobe","batik"]),vml:vscaffold(["vml"],["ie"]),swf:vscaffold(["Swf","Flash","Mm"],["mm"]),swt:vscaffold(["Swt"],["ibm"])};})();dojo.hostenv=(function(){var _29={isDebug:false,allowQueryConfig:false,baseScriptUri:"",baseRelativePath:"",libraryScriptUri:"",iePreventClobber:false,ieClobberMinimal:true,preventBackButtonFix:true,delayMozLoadingFix:false,searchIds:[],parseWidgets:true};if(typeof djConfig=="undefined"){djConfig=_29;}else{for(var _2a in _29){if(typeof djConfig[_2a]=="undefined"){djConfig[_2a]=_29[_2a];}}}return {name_:"(unset)",version_:"(unset)",getName:function(){return this.name_;},getVersion:function(){return this.version_;},getText:function(uri){dojo.unimplemented("getText","uri="+uri);}};})();dojo.hostenv.getBaseScriptUri=function(){if(djConfig.baseScriptUri.length){return djConfig.baseScriptUri;}var uri=new String(djConfig.libraryScriptUri||djConfig.baseRelativePath);if(!uri){dojo.raise("Nothing returned by getLibraryScriptUri(): "+uri);}djConfig.baseScriptUri=djConfig.baseRelativePath;return djConfig.baseScriptUri;};(function(){var _2d={pkgFileName:"__package__",loading_modules_:{},loaded_modules_:{},addedToLoadingCount:[],removedFromLoadingCount:[],inFlightCount:0,modulePrefixes_:{dojo:{name:"dojo",value:"src"}},registerModulePath:function(_2e,_2f){this.modulePrefixes_[_2e]={name:_2e,value:_2f};},moduleHasPrefix:function(_30){var mp=this.modulePrefixes_;return Boolean(mp[_30]&&mp[_30].value);},getModulePrefix:function(_32){if(this.moduleHasPrefix(_32)){return this.modulePrefixes_[_32].value;}return _32;},getTextStack:[],loadUriStack:[],loadedUris:[],post_load_:false,modulesLoadedListeners:[],unloadListeners:[],loadNotifying:false};for(var _33 in _2d){dojo.hostenv[_33]=_2d[_33];}})();dojo.hostenv.loadPath=function(_34,_35,cb){var uri;if(_34.charAt(0)=="/"||_34.match(/^\w+:/)){uri=_34;}else{uri=this.getBaseScriptUri()+_34;}if(djConfig.cacheBust&&dojo.render.html.capable){uri+="?"+String(djConfig.cacheBust).replace(/\W+/g,"");}try{return !_35?this.loadUri(uri,cb):this.loadUriAndCheck(uri,_35,cb);}catch(e){dojo.debug(e);return false;}};dojo.hostenv.loadUri=function(uri,cb){if(this.loadedUris[uri]){return true;}var _3a=this.getText(uri,null,true);if(!_3a){return false;}this.loadedUris[uri]=true;if(cb){_3a="("+_3a+")";}var _3b=dj_eval(_3a);if(cb){cb(_3b);}return true;};dojo.hostenv.loadUriAndCheck=function(uri,_3d,cb){var ok=true;try{ok=this.loadUri(uri,cb);}catch(e){dojo.debug("failed loading ",uri," with error: ",e);}return Boolean(ok&&this.findModule(_3d,false));};dojo.loaded=function(){};dojo.unloaded=function(){};dojo.hostenv.loaded=function(){this.loadNotifying=true;this.post_load_=true;var mll=this.modulesLoadedListeners;for(var x=0;x<mll.length;x++){mll[x]();}this.modulesLoadedListeners=[];this.loadNotifying=false;dojo.loaded();};dojo.hostenv.unloaded=function(){var mll=this.unloadListeners;while(mll.length){(mll.pop())();}dojo.unloaded();};dojo.addOnLoad=function(obj,_44){var dh=dojo.hostenv;if(arguments.length==1){dh.modulesLoadedListeners.push(obj);}else{if(arguments.length>1){dh.modulesLoadedListeners.push(function(){obj[_44]();});}}if(dh.post_load_&&dh.inFlightCount==0&&!dh.loadNotifying){dh.callLoaded();}};dojo.addOnUnload=function(obj,_47){var dh=dojo.hostenv;if(arguments.length==1){dh.unloadListeners.push(obj);}else{if(arguments.length>1){dh.unloadListeners.push(function(){obj[_47]();});}}};dojo.hostenv.modulesLoaded=function(){if(this.post_load_){return;}if(this.loadUriStack.length==0&&this.getTextStack.length==0){if(this.inFlightCount>0){dojo.debug("files still in flight!");return;}dojo.hostenv.callLoaded();}};dojo.hostenv.callLoaded=function(){if(typeof setTimeout=="object"){setTimeout("dojo.hostenv.loaded();",0);}else{dojo.hostenv.loaded();}};dojo.hostenv.getModuleSymbols=function(_49){var _4a=_49.split(".");for(var i=_4a.length;i>0;i--){var _4c=_4a.slice(0,i).join(".");if((i==1)&&!this.moduleHasPrefix(_4c)){_4a[0]="../"+_4a[0];}else{var _4d=this.getModulePrefix(_4c);if(_4d!=_4c){_4a.splice(0,i,_4d);break;}}}return _4a;};dojo.hostenv._global_omit_module_check=false;dojo.hostenv.loadModule=function(_4e,_4f,_50){if(!_4e){return;}_50=this._global_omit_module_check||_50;var _51=this.findModule(_4e,false);if(_51){return _51;}if(dj_undef(_4e,this.loading_modules_)){this.addedToLoadingCount.push(_4e);}this.loading_modules_[_4e]=1;var _52=_4e.replace(/\./g,"/")+".js";var _53=_4e.split(".");var _54=this.getModuleSymbols(_4e);var _55=((_54[0].charAt(0)!="/")&&!_54[0].match(/^\w+:/));var _56=_54[_54.length-1];var ok;if(_56=="*"){_4e=_53.slice(0,-1).join(".");while(_54.length){_54.pop();_54.push(this.pkgFileName);_52=_54.join("/")+".js";if(_55&&_52.charAt(0)=="/"){_52=_52.slice(1);}ok=this.loadPath(_52,!_50?_4e:null);if(ok){break;}_54.pop();}}else{_52=_54.join("/")+".js";_4e=_53.join(".");var _58=!_50?_4e:null;ok=this.loadPath(_52,_58);if(!ok&&!_4f){_54.pop();while(_54.length){_52=_54.join("/")+".js";ok=this.loadPath(_52,_58);if(ok){break;}_54.pop();_52=_54.join("/")+"/"+this.pkgFileName+".js";if(_55&&_52.charAt(0)=="/"){_52=_52.slice(1);}ok=this.loadPath(_52,_58);if(ok){break;}}}if(!ok&&!_50){dojo.raise("Could not load '"+_4e+"'; last tried '"+_52+"'");}}if(!_50&&!this["isXDomain"]){_51=this.findModule(_4e,false);if(!_51){dojo.raise("symbol '"+_4e+"' is not defined after loading '"+_52+"'");}}return _51;};dojo.hostenv.startPackage=function(_59){var _5a=String(_59);var _5b=_5a;var _5c=_59.split(/\./);if(_5c[_5c.length-1]=="*"){_5c.pop();_5b=_5c.join(".");}var _5d=dojo.getObject(_5b,true);this.loaded_modules_[_5a]=_5d;this.loaded_modules_[_5b]=_5d;return _5d;};dojo.hostenv.findModule=function(_5e,_5f){var lmn=String(_5e);if(this.loaded_modules_[lmn]){return this.loaded_modules_[lmn];}if(_5f){dojo.raise("no loaded module named '"+_5e+"'");}return null;};dojo.kwCompoundRequire=function(_61){var _62=_61["common"]||[];var _63=_61[dojo.hostenv.name_]?_62.concat(_61[dojo.hostenv.name_]||[]):_62.concat(_61["default"]||[]);for(var x=0;x<_63.length;x++){var _65=_63[x];if(_65.constructor==Array){dojo.hostenv.loadModule.apply(dojo.hostenv,_65);}else{dojo.hostenv.loadModule(_65);}}};dojo.require=function(_66){dojo.hostenv.loadModule.apply(dojo.hostenv,arguments);};dojo.requireIf=function(_67,_68){var _69=arguments[0];if((_69===true)||(_69=="common")||(_69&&dojo.render[_69].capable)){var _6a=[];for(var i=1;i<arguments.length;i++){_6a.push(arguments[i]);}dojo.require.apply(dojo,_6a);}};dojo.requireAfterIf=dojo.requireIf;dojo.provide=function(_6c){return dojo.hostenv.startPackage.apply(dojo.hostenv,arguments);};dojo.registerModulePath=function(_6d,_6e){return dojo.hostenv.registerModulePath(_6d,_6e);};dojo.hostenv.normalizeLocale=function(_6f){var _70=_6f?_6f.toLowerCase():dojo.locale;if(_70=="root"){_70="ROOT";}return _70;};dojo.hostenv.searchLocalePath=function(_71,_72,_73){_71=dojo.hostenv.normalizeLocale(_71);var _74=_71.split("-");var _75=[];for(var i=_74.length;i>0;i--){_75.push(_74.slice(0,i).join("-"));}_75.push(false);if(_72){_75.reverse();}for(var j=_75.length-1;j>=0;j--){var loc=_75[j]||"ROOT";var _79=_73(loc);if(_79){break;}}};dojo.hostenv.localesGenerated=["ROOT","es-es","es","it-it","pt-br","de","fr-fr","zh-cn","pt","en-us","zh","fr","zh-tw","it","en-gb","xx","de-de","ko-kr","ja-jp","ko","en","ja"];dojo.hostenv.registerNlsPrefix=function(){dojo.registerModulePath("nls","nls");};dojo.hostenv.preloadLocalizations=function(){if(dojo.hostenv.localesGenerated){dojo.hostenv.registerNlsPrefix();function preload(_7a){_7a=dojo.hostenv.normalizeLocale(_7a);dojo.hostenv.searchLocalePath(_7a,true,function(loc){for(var i=0;i<dojo.hostenv.localesGenerated.length;i++){if(dojo.hostenv.localesGenerated[i]==loc){dojo["require"]("nls.dojo_"+loc);return true;}}return false;});}preload();var _7d=djConfig.extraLocale||[];for(var i=0;i<_7d.length;i++){preload(_7d[i]);}}dojo.hostenv.preloadLocalizations=function(){};};dojo.requireLocalization=function(_7f,_80,_81,_82){dojo.hostenv.preloadLocalizations();var _83=dojo.hostenv.normalizeLocale(_81);var _84=[_7f,"nls",_80].join(".");var _85="";if(_82){var _86=_82.split(",");for(var i=0;i<_86.length;i++){if(_83.indexOf(_86[i])==0){if(_86[i].length>_85.length){_85=_86[i];}}}if(!_85){_85="ROOT";}}var _88=_82?_85:_83;var _89=dojo.hostenv.findModule(_84);var _8a=null;if(_89){if(djConfig.localizationComplete&&_89._built){return;}var _8b=_88.replace("-","_");var _8c=_84+"."+_8b;_8a=dojo.hostenv.findModule(_8c);}if(!_8a){_89=dojo.hostenv.startPackage(_84);var _8d=dojo.hostenv.getModuleSymbols(_7f);var _8e=_8d.concat("nls").join("/");var _8f;dojo.hostenv.searchLocalePath(_88,_82,function(loc){var _91=loc.replace("-","_");var _92=_84+"."+_91;var _93=false;if(!dojo.hostenv.findModule(_92)){dojo.hostenv.startPackage(_92);var _94=[_8e];if(loc!="ROOT"){_94.push(loc);}_94.push(_80);var _95=_94.join("/")+".js";_93=dojo.hostenv.loadPath(_95,null,function(_96){var _97=function(){};_97.prototype=_8f;_89[_91]=new _97();for(var j in _96){_89[_91][j]=_96[j];}});}else{_93=true;}if(_93&&_89[_91]){_8f=_89[_91];}else{_89[_91]=_8f;}if(_82){return true;}});}if(_82&&_83!=_85){_89[_83.replace("-","_")]=_89[_85.replace("-","_")];}};(function(){var _99=djConfig.extraLocale;if(_99){if(!_99 instanceof Array){_99=[_99];}var req=dojo.requireLocalization;dojo.requireLocalization=function(m,b,_9d,_9e){req(m,b,_9d,_9e);if(_9d){return;}for(var i=0;i<_99.length;i++){req(m,b,_99[i],_9e);}};}})();}if(typeof window!="undefined"){(function(){if(djConfig.allowQueryConfig){var _a0=document.location.toString();var _a1=_a0.split("?",2);if(_a1.length>1){var _a2=_a1[1];var _a3=_a2.split("&");for(var x in _a3){var sp=_a3[x].split("=");if((sp[0].length>9)&&(sp[0].substr(0,9)=="djConfig.")){var opt=sp[0].substr(9);try{djConfig[opt]=eval(sp[1]);}catch(e){djConfig[opt]=sp[1];}}}}}if(((djConfig["baseScriptUri"]=="")||(djConfig["baseRelativePath"]==""))&&(document&&document.getElementsByTagName)){var _a7=document.getElementsByTagName("script");var _a8=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i;for(var i=0;i<_a7.length;i++){var src=_a7[i].getAttribute("src");if(!src){continue;}var m=src.match(_a8);if(m){var _ac=src.substring(0,m.index);if(src.indexOf("bootstrap1")>-1){_ac+="../";}if(!this["djConfig"]){djConfig={};}if(djConfig["baseScriptUri"]==""){djConfig["baseScriptUri"]=_ac;}if(djConfig["baseRelativePath"]==""){djConfig["baseRelativePath"]=_ac;}break;}}}var dr=dojo.render;var drh=dojo.render.html;var drs=dojo.render.svg;var dua=(drh.UA=navigator.userAgent);var dav=(drh.AV=navigator.appVersion);var t=true;var f=false;drh.capable=t;drh.support.builtin=t;dr.ver=parseFloat(drh.AV);dr.os.mac=dav.indexOf("Macintosh")>=0;dr.os.win=dav.indexOf("Windows")>=0;dr.os.linux=dav.indexOf("X11")>=0;drh.opera=dua.indexOf("Opera")>=0;drh.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0);drh.safari=dav.indexOf("Safari")>=0;var _b4=dua.indexOf("Gecko");drh.mozilla=drh.moz=(_b4>=0)&&(!drh.khtml);if(drh.mozilla){drh.geckoVersion=dua.substring(_b4+6,_b4+14);}drh.ie=(document.all)&&(!drh.opera);drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0;drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0;drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0;drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0;drh.ie80=drh.ie&&dav.indexOf("MSIE 8.0")>=0;var cm=document["compatMode"];drh.quirks=(cm=="BackCompat")||(cm=="QuirksMode")||drh.ie55||drh.ie50;dojo.locale=dojo.locale||(drh.ie?navigator.userLanguage:navigator.language).toLowerCase();dr.vml.capable=drh.ie;drs.capable=f;drs.support.plugin=f;drs.support.builtin=f;var _b6=window["document"];var tdi=_b6["implementation"];if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0"))){drs.capable=t;drs.support.builtin=t;drs.support.plugin=f;}if(drh.safari){var tmp=dua.split("AppleWebKit/")[1];var ver=parseFloat(tmp.split(" ")[0]);if(ver>=420){drs.capable=t;drs.support.builtin=t;drs.support.plugin=f;}}else{}})();dojo.hostenv.startPackage("dojo.hostenv");dojo.render.name=dojo.hostenv.name_="browser";dojo.hostenv.searchIds=[];dojo.hostenv._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];dojo.hostenv.getXmlhttpObject=function(){var _ba=null;var _bb=null;try{_ba=new XMLHttpRequest();}catch(e){}if(!_ba){for(var i=0;i<3;++i){var _bd=dojo.hostenv._XMLHTTP_PROGIDS[i];try{_ba=new ActiveXObject(_bd);}catch(e){_bb=e;}if(_ba){dojo.hostenv._XMLHTTP_PROGIDS=[_bd];break;}}}if(!_ba){return dojo.raise("XMLHTTP not available",_bb);}return _ba;};dojo.hostenv._blockAsync=false;dojo.hostenv.getText=function(uri,_bf,_c0){if(!_bf){this._blockAsync=true;}var _c1=this.getXmlhttpObject();function isDocumentOk(_c2){var _c3=_c2["status"];return Boolean((!_c3)||((200<=_c3)&&(300>_c3))||(_c3==304));}if(_bf){var _c4=this,_c5=null,gbl=dojo.global();var xhr=dojo.getObject("dojo.io.XMLHTTPTransport");_c1.onreadystatechange=function(){if(_c5){gbl.clearTimeout(_c5);_c5=null;}if(_c4._blockAsync||(xhr&&xhr._blockAsync)){_c5=gbl.setTimeout(function(){_c1.onreadystatechange.apply(this);},10);}else{if(4==_c1.readyState){if(isDocumentOk(_c1)){_bf(_c1.responseText);}}}};}_c1.open("GET",uri,_bf?true:false);try{_c1.send(null);if(_bf){return null;}if(!isDocumentOk(_c1)){var err=Error("Unable to load "+uri+" status:"+_c1.status);err.status=_c1.status;err.responseText=_c1.responseText;throw err;}}catch(e){this._blockAsync=false;if((_c0)&&(!_bf)){return null;}else{throw e;}}this._blockAsync=false;return _c1.responseText;};dojo.hostenv.defaultDebugContainerId="dojoDebug";dojo.hostenv._println_buffer=[];dojo.hostenv._println_safe=false;dojo.hostenv.println=function(_c9){if(!dojo.hostenv._println_safe){dojo.hostenv._println_buffer.push(_c9);}else{try{var _ca=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId);if(!_ca){_ca=dojo.body();}var div=document.createElement("div");div.appendChild(document.createTextNode(_c9));_ca.appendChild(div);}catch(e){try{document.write("<div>"+_c9+"</div>");}catch(e2){window.status=_c9;}}}};dojo.addOnLoad(function(){dojo.hostenv._println_safe=true;while(dojo.hostenv._println_buffer.length>0){dojo.hostenv.println(dojo.hostenv._println_buffer.shift());}});function dj_addNodeEvtHdlr(_cc,_cd,fp){var _cf=_cc["on"+_cd]||function(){};_cc["on"+_cd]=function(){fp.apply(_cc,arguments);_cf.apply(_cc,arguments);};return true;}function dj_load_init(e){var _d1=(e&&e.type)?e.type.toLowerCase():"load";if(arguments.callee.initialized||(_d1!="domcontentloaded"&&_d1!="load")){return;}arguments.callee.initialized=true;if(typeof (_timer)!="undefined"){clearInterval(_timer);delete _timer;}var _d2=function(){if(dojo.render.html.ie){dojo.hostenv.makeWidgets();}};if(dojo.hostenv.inFlightCount==0){_d2();dojo.hostenv.modulesLoaded();}else{dojo.hostenv.modulesLoadedListeners.unshift(_d2);}}if(document.addEventListener){if(dojo.render.html.opera||(dojo.render.html.moz&&(djConfig["enableMozDomContentLoaded"]===true))){document.addEventListener("DOMContentLoaded",dj_load_init,null);}window.addEventListener("load",dj_load_init,null);}if(dojo.render.html.ie&&dojo.render.os.win){document.write("<scr"+"ipt defer src=\"//:\" "+"onreadystatechange=\"if(this.readyState=='complete'){dj_load_init();}\">"+"</scr"+"ipt>");}if(/(WebKit|khtml)/i.test(navigator.userAgent)){var _timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){dj_load_init();}},10);}if(dojo.render.html.ie){dj_addNodeEvtHdlr(window,"beforeunload",function(){dojo.hostenv._unloading=true;window.setTimeout(function(){dojo.hostenv._unloading=false;},0);});}dj_addNodeEvtHdlr(window,"unload",function(){if((!dojo.render.html.ie)||(dojo.render.html.ie&&dojo.hostenv._unloading)){dojo.hostenv.unloaded();}});dojo.hostenv.makeWidgets=function(){var _d3=[];if(djConfig.searchIds&&djConfig.searchIds.length>0){_d3=_d3.concat(djConfig.searchIds);}if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){_d3=_d3.concat(dojo.hostenv.searchIds);}if((djConfig.parseWidgets)||(_d3.length>0)){if(dojo.getObject("dojo.widget.Parse")){var _d4=new dojo.xml.Parse();if(_d3.length>0){for(var x=0;x<_d3.length;x++){var _d6=document.getElementById(_d3[x]);if(!_d6){continue;}var _d7=_d4.parseElement(_d6,null,true);dojo.widget.getParser().createComponents(_d7);}}else{if(djConfig.parseWidgets){var _d7=_d4.parseElement(dojo.body(),null,true);dojo.widget.getParser().createComponents(_d7);}}}}};dojo.addOnLoad(function(){if(!dojo.render.html.ie){dojo.hostenv.makeWidgets();}});try{if(dojo.render.html.ie){document.namespaces.add("v","urn:schemas-microsoft-com:vml");document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)");}}catch(e){}dojo.hostenv.writeIncludes=function(){};if(!dj_undef("document",this)){dj_currentDocument=this.document;}dojo.doc=function(){return dj_currentDocument;};dojo.body=function(){return dojo.doc().body||dojo.doc().getElementsByTagName("body")[0];};dojo.byId=function(id,doc){if((id)&&((typeof id=="string")||(id instanceof String))){if(!doc){doc=dj_currentDocument;}var ele=doc.getElementById(id);if(ele&&(ele.id!=id)&&doc.all){ele=null;eles=doc.all[id];if(eles){if(eles.length){for(var i=0;i<eles.length;i++){if(eles[i].id==id){ele=eles[i];break;}}}else{ele=eles;}}}return ele;}return id;};dojo.setContext=function(_dc,_dd){dj_currentContext=_dc;dj_currentDocument=_dd;};dojo._fireCallback=function(_de,_df,_e0){if((_df)&&((typeof _de=="string")||(_de instanceof String))){_de=_df[_de];}return (_df?_de.apply(_df,_e0||[]):_de());};dojo.withGlobal=function(_e1,_e2,_e3,_e4){var _e5;var _e6=dj_currentContext;var _e7=dj_currentDocument;try{dojo.setContext(_e1,_e1.document);_e5=dojo._fireCallback(_e2,_e3,_e4);}finally{dojo.setContext(_e6,_e7);}return _e5;};dojo.withDoc=function(_e8,_e9,_ea,_eb){var _ec;var _ed=dj_currentDocument;try{dj_currentDocument=_e8;_ec=dojo._fireCallback(_e9,_ea,_eb);}finally{dj_currentDocument=_ed;}return _ec;};}(function(){if(typeof dj_usingBootstrap!="undefined"){return;}var _ee=false;var _ef=false;var _f0=false;if((typeof this["load"]=="function")&&((typeof this["Packages"]=="function")||(typeof this["Packages"]=="object"))){_ee=true;}else{if(typeof this["load"]=="function"){_ef=true;}else{if(window.widget){_f0=true;}}}var _f1=[];if((this["djConfig"])&&((djConfig["isDebug"])||(djConfig["debugAtAllCosts"]))){_f1.push("debug.js");}if((this["djConfig"])&&(djConfig["debugAtAllCosts"])&&(!_ee)&&(!_f0)){_f1.push("browser_debug.js");}var _f2=djConfig["baseScriptUri"];if((this["djConfig"])&&(djConfig["baseLoaderUri"])){_f2=djConfig["baseLoaderUri"];}for(var x=0;x<_f1.length;x++){var _f4=_f2+"src/"+_f1[x];if(_ee||_ef){load(_f4);}else{try{document.write("<scr"+"ipt type='text/javascript' src='"+_f4+"'></scr"+"ipt>");}catch(e){var _f5=document.createElement("script");_f5.src=_f4;document.getElementsByTagName("head")[0].appendChild(_f5);}}}})();dojo.provide("dojo.string.common");dojo.string.trim=function(str,wh){if(!str.replace){return str;}if(!str.length){return str;}var re=(wh>0)?(/^\s+/):(wh<0)?(/\s+$/):(/^\s+|\s+$/g);return str.replace(re,"");};dojo.string.trimStart=function(str){return dojo.string.trim(str,1);};dojo.string.trimEnd=function(str){return dojo.string.trim(str,-1);};dojo.string.repeat=function(str,_fc,_fd){var out="";for(var i=0;i<_fc;i++){out+=str;if(_fd&&i<_fc-1){out+=_fd;}}return out;};dojo.string.pad=function(str,len,c,dir){var out=String(str);if(!c){c="0";}if(!dir){dir=1;}while(out.length<len){if(dir>0){out=c+out;}else{out+=c;}}return out;};dojo.string.padLeft=function(str,len,c){return dojo.string.pad(str,len,c,1);};dojo.string.padRight=function(str,len,c){return dojo.string.pad(str,len,c,-1);};dojo.provide("dojo.string");dojo.provide("dojo.lang.common");dojo.lang.inherits=function(_10b,_10c){if(!dojo.lang.isFunction(_10c)){dojo.raise("dojo.inherits: superclass argument ["+_10c+"] must be a function (subclass: ["+_10b+"']");}_10b.prototype=new _10c();_10b.prototype.constructor=_10b;_10b.superclass=_10c.prototype;_10b["super"]=_10c.prototype;};dojo.lang._mixin=function(obj,_10e){var tobj={};for(var x in _10e){if((typeof tobj[x]=="undefined")||(tobj[x]!=_10e[x])){obj[x]=_10e[x];}}if(dojo.render.html.ie&&(typeof (_10e["toString"])=="function")&&(_10e["toString"]!=obj["toString"])&&(_10e["toString"]!=tobj["toString"])){obj.toString=_10e.toString;}return obj;};dojo.lang.mixin=function(obj,_112){for(var i=1,l=arguments.length;i<l;i++){dojo.lang._mixin(obj,arguments[i]);}return obj;};dojo.lang.extend=function(_115,_116){for(var i=1,l=arguments.length;i<l;i++){dojo.lang._mixin(_115.prototype,arguments[i]);}return _115;};dojo.lang._delegate=function(obj,_11a){function TMP(){}TMP.prototype=obj;var tmp=new TMP();if(_11a){dojo.lang.mixin(tmp,_11a);}return tmp;};dojo.inherits=dojo.lang.inherits;dojo.mixin=dojo.lang.mixin;dojo.extend=dojo.lang.extend;dojo.lang.find=function(_11c,_11d,_11e,_11f){var _120=dojo.lang.isString(_11c);if(_120){_11c=_11c.split("");}if(_11f){var step=-1;var i=_11c.length-1;var end=-1;}else{var step=1;var i=0;var end=_11c.length;}if(_11e){while(i!=end){if(_11c[i]===_11d){return i;}i+=step;}}else{while(i!=end){if(_11c[i]==_11d){return i;}i+=step;}}return -1;};dojo.lang.indexOf=dojo.lang.find;dojo.lang.findLast=function(_124,_125,_126){return dojo.lang.find(_124,_125,_126,true);};dojo.lang.lastIndexOf=dojo.lang.findLast;dojo.lang.inArray=function(_127,_128){return dojo.lang.find(_127,_128)>-1;};dojo.lang.isObject=function(it){if(typeof it=="undefined"){return false;}return (typeof it=="object"||it===null||dojo.lang.isArray(it)||dojo.lang.isFunction(it));};dojo.lang.isArray=function(it){return (it&&it instanceof Array||typeof it=="array");};dojo.lang.isArrayLike=function(it){if((!it)||(dojo.lang.isUndefined(it))){return false;}if(dojo.lang.isString(it)){return false;}if(dojo.lang.isFunction(it)){return false;}if(dojo.lang.isArray(it)){return true;}if((it.tagName)&&(it.tagName.toLowerCase()=="form")){return false;}if(dojo.lang.isNumber(it.length)&&isFinite(it.length)){return true;}return false;};dojo.lang.isFunction=function(it){return (it instanceof Function||typeof it=="function");};(function(){if((dojo.render.html.capable)&&(dojo.render.html["safari"])){dojo.lang.isFunction=function(it){if((typeof (it)=="function")&&(it=="[object NodeList]")){return false;}return (it instanceof Function||typeof it=="function");};}})();dojo.lang.isString=function(it){return (typeof it=="string"||it instanceof String);};dojo.lang.isAlien=function(it){if(!it){return false;}return !dojo.lang.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));};dojo.lang.isBoolean=function(it){return (it instanceof Boolean||typeof it=="boolean");};dojo.lang.isNumber=function(it){return (it instanceof Number||typeof it=="number");};dojo.lang.isUndefined=function(it){return ((typeof (it)=="undefined")&&(it==undefined));};dojo.provide("dojo.lang.extras");dojo.lang.setTimeout=function(func,_134){var _135=window,_136=2;if(!dojo.lang.isFunction(func)){_135=func;func=_134;_134=arguments[2];_136++;}if(dojo.lang.isString(func)){func=_135[func];}var args=[];for(var i=_136;i<arguments.length;i++){args.push(arguments[i]);}return dojo.global().setTimeout(function(){func.apply(_135,args);},_134);};dojo.lang.clearTimeout=function(_139){dojo.global().clearTimeout(_139);};dojo.lang.getNameInObj=function(ns,item){if(!ns){ns=dj_global;}for(var x in ns){if(ns[x]===item){return new String(x);}}return null;};dojo.lang.shallowCopy=function(obj,deep){var i,ret;if(obj===null){return null;}if(dojo.lang.isObject(obj)){ret=new obj.constructor();for(i in obj){if(dojo.lang.isUndefined(ret[i])){ret[i]=deep?dojo.lang.shallowCopy(obj[i],deep):obj[i];}}}else{if(dojo.lang.isArray(obj)){ret=[];for(i=0;i<obj.length;i++){ret[i]=deep?dojo.lang.shallowCopy(obj[i],deep):obj[i];}}else{ret=obj;}}return ret;};dojo.lang.firstValued=function(){for(var i=0;i<arguments.length;i++){if(typeof arguments[i]!="undefined"){return arguments[i];}}return undefined;};dojo.lang.getObjPathValue=function(_142,_143,_144){dojo.deprecated("dojo.lang.getObjPathValue","use dojo.getObject","0.6");with(dojo.parseObjPath(_142,_143,_144)){return dojo.evalProp(prop,obj,_144);}};dojo.lang.setObjPathValue=function(_145,_146,_147,_148){dojo.deprecated("dojo.lang.setObjPathValue","use dojo.parseObjPath and the '=' operator","0.6");if(arguments.length<4){_148=true;}with(dojo.parseObjPath(_145,_147,_148)){if(obj&&(_148||(prop in obj))){obj[prop]=_146;}}};dojo.provide("dojo.io.common");dojo.io.transports=[];dojo.io.hdlrFuncNames=["load","error","timeout"];dojo.io.Request=function(url,_14a,_14b,_14c){if((arguments.length==1)&&(arguments[0].constructor==Object)){this.fromKwArgs(arguments[0]);}else{this.url=url;if(_14a){this.mimetype=_14a;}if(_14b){this.transport=_14b;}if(arguments.length>=4){this.changeUrl=_14c;}}};dojo.lang.extend(dojo.io.Request,{url:"",mimetype:"text/plain",method:"GET",content:undefined,transport:undefined,changeUrl:undefined,formNode:undefined,sync:false,bindSuccess:false,useCache:false,preventCache:false,load:function(type,data,_14f,_150){},error:function(type,_152,_153,_154){},timeout:function(type,_156,_157,_158){},handle:function(type,data,_15b,_15c){},timeoutSeconds:0,abort:function(){},fromKwArgs:function(_15d){if(_15d["url"]){_15d.url=_15d.url.toString();}if(_15d["formNode"]){_15d.formNode=dojo.byId(_15d.formNode);}if(!_15d["method"]&&_15d["formNode"]&&_15d["formNode"].method){_15d.method=_15d["formNode"].method;}if(!_15d["handle"]&&_15d["handler"]){_15d.handle=_15d.handler;}if(!_15d["load"]&&_15d["loaded"]){_15d.load=_15d.loaded;}if(!_15d["changeUrl"]&&_15d["changeURL"]){_15d.changeUrl=_15d.changeURL;}_15d.encoding=dojo.lang.firstValued(_15d["encoding"],djConfig["bindEncoding"],"");_15d.sendTransport=dojo.lang.firstValued(_15d["sendTransport"],djConfig["ioSendTransport"],false);var _15e=dojo.lang.isFunction;for(var x=0;x<dojo.io.hdlrFuncNames.length;x++){var fn=dojo.io.hdlrFuncNames[x];if(_15d[fn]&&_15e(_15d[fn])){continue;}if(_15d["handle"]&&_15e(_15d["handle"])){_15d[fn]=_15d.handle;}}dojo.lang.mixin(this,_15d);}});dojo.io.Error=function(msg,type,num){this.message=msg;this.type=type||"unknown";this.number=num||0;};dojo.io.transports.addTransport=function(name){this.push(name);this[name]=dojo.io[name];};dojo.io.bind=function(_165){if(!(_165 instanceof dojo.io.Request)){try{_165=new dojo.io.Request(_165);}catch(e){dojo.debug(e);}}var _166="";if(_165["transport"]){_166=_165["transport"];if(!this[_166]){dojo.io.sendBindError(_165,"No dojo.io.bind() transport with name '"+_165["transport"]+"'.");return _165;}if(!this[_166].canHandle(_165)){dojo.io.sendBindError(_165,"dojo.io.bind() transport with name '"+_165["transport"]+"' cannot handle this type of request.");return _165;}}else{for(var x=0;x<dojo.io.transports.length;x++){var tmp=dojo.io.transports[x];if((this[tmp])&&(this[tmp].canHandle(_165))){_166=tmp;break;}}if(_166==""){dojo.io.sendBindError(_165,"None of the loaded transports for dojo.io.bind()"+" can handle the request.");return _165;}}this[_166].bind(_165);_165.bindSuccess=true;return _165;};dojo.io.sendBindError=function(_169,_16a){if((typeof _169.error=="function"||typeof _169.handle=="function")&&(typeof setTimeout=="function"||typeof setTimeout=="object")){var _16b=new dojo.io.Error(_16a);setTimeout(function(){_169[(typeof _169.error=="function")?"error":"handle"]("error",_16b,null,_169);},50);}else{dojo.raise(_16a);}};dojo.io.queueBind=function(_16c){if(!(_16c instanceof dojo.io.Request)){try{_16c=new dojo.io.Request(_16c);}catch(e){dojo.debug(e);}}var _16d=_16c.load;_16c.load=function(){dojo.io._queueBindInFlight=false;var ret=_16d.apply(this,arguments);dojo.io._dispatchNextQueueBind();return ret;};var _16f=_16c.error;_16c.error=function(){dojo.io._queueBindInFlight=false;var ret=_16f.apply(this,arguments);dojo.io._dispatchNextQueueBind();return ret;};dojo.io._bindQueue.push(_16c);dojo.io._dispatchNextQueueBind();return _16c;};dojo.io._dispatchNextQueueBind=function(){if(!dojo.io._queueBindInFlight){dojo.io._queueBindInFlight=true;if(dojo.io._bindQueue.length>0){dojo.io.bind(dojo.io._bindQueue.shift());}else{dojo.io._queueBindInFlight=false;}}};dojo.io._bindQueue=[];dojo.io._queueBindInFlight=false;dojo.io.argsFromMap=function(map,_172,last){var enc=/utf/i.test(_172||"")?encodeURIComponent:dojo.string.encodeAscii;var _175=[];var _176=new Object();for(var name in map){var _178=function(elt){var val=enc(name)+"="+enc(elt);_175[(last==name)?"push":"unshift"](val);};if(!_176[name]){var _17b=map[name];if(dojo.lang.isArray(_17b)){dojo.lang.forEach(_17b,_178);}else{_178(_17b);}}}return _175.join("&");};dojo.io.setIFrameSrc=function(_17c,src,_17e){try{var r=dojo.render.html;if(!_17e){if(r.safari){_17c.location=src;}else{frames[_17c.name].location=src;}}else{var idoc;if(r.ie){idoc=_17c.contentWindow.document;}else{if(r.safari){idoc=_17c.document;}else{idoc=_17c.contentWindow;}}if(!idoc){_17c.location=src;return;}else{idoc.location.replace(src);}}}catch(e){dojo.debug(e);dojo.debug("setIFrameSrc: "+e);}};dojo.provide("dojo.lang.array");dojo.lang.mixin(dojo.lang,{has:function(obj,name){try{return typeof obj[name]!="undefined";}catch(e){return false;}},isEmpty:function(obj){if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){return obj.length===0;}else{if(dojo.lang.isObject(obj)){var tmp={};for(var x in obj){if(obj[x]&&(!tmp[x])){return false;}}return true;}}},map:function(arr,obj,_188){var _189=dojo.lang.isString(arr);if(_189){arr=arr.split("");}if(dojo.lang.isFunction(obj)&&(!_188)){_188=obj;obj=dj_global;}else{if(dojo.lang.isFunction(obj)&&_188){var _18a=obj;obj=_188;_188=_18a;}}if(Array.map){var _18b=Array.map(arr,_188,obj);}else{var _18b=[];for(var i=0;i<arr.length;++i){_18b.push(_188.call(obj,arr[i]));}}if(_189){return _18b.join("");}else{return _18b;}},reduce:function(arr,_18e,obj,_190){var _191=_18e;if(arguments.length==1){dojo.debug("dojo.lang.reduce called with too few arguments!");return false;}else{if(arguments.length==2){_190=_18e;_191=arr.shift();}else{if(arguments.lenght==3){if(dojo.lang.isFunction(obj)){_190=obj;obj=null;}}else{if(dojo.lang.isFunction(obj)){var tmp=_190;_190=obj;obj=tmp;}}}}var ob=obj?obj:dj_global;dojo.lang.map(arr,function(val){_191=_190.call(ob,_191,val);});return _191;},forEach:function(_195,_196,_197){if(dojo.lang.isString(_195)){_195=_195.split("");}if(Array.forEach){Array.forEach(_195,_196,_197);}else{if(!_197){_197=dj_global;}for(var i=0,l=_195.length;i<l;i++){_196.call(_197,_195[i],i,_195);}}},_everyOrSome:function(_19a,arr,_19c,_19d){if(dojo.lang.isString(arr)){arr=arr.split("");}if(Array.every){return Array[_19a?"every":"some"](arr,_19c,_19d);}else{if(!_19d){_19d=dj_global;}for(var i=0,l=arr.length;i<l;i++){var _1a0=_19c.call(_19d,arr[i],i,arr);if(_19a&&!_1a0){return false;}else{if((!_19a)&&(_1a0)){return true;}}}return Boolean(_19a);}},every:function(arr,_1a2,_1a3){return this._everyOrSome(true,arr,_1a2,_1a3);},some:function(arr,_1a5,_1a6){return this._everyOrSome(false,arr,_1a5,_1a6);},filter:function(arr,_1a8,_1a9){var _1aa=dojo.lang.isString(arr);if(_1aa){arr=arr.split("");}var _1ab;if(Array.filter){_1ab=Array.filter(arr,_1a8,_1a9);}else{if(!_1a9){if(arguments.length>=3){dojo.raise("thisObject doesn't exist!");}_1a9=dj_global;}_1ab=[];for(var i=0;i<arr.length;i++){if(_1a8.call(_1a9,arr[i],i,arr)){_1ab.push(arr[i]);}}}if(_1aa){return _1ab.join("");}else{return _1ab;}},unnest:function(){var out=[];for(var i=0;i<arguments.length;i++){if(dojo.lang.isArrayLike(arguments[i])){var add=dojo.lang.unnest.apply(this,arguments[i]);out=out.concat(add);}else{out.push(arguments[i]);}}return out;},toArray:function(_1b0,_1b1){var _1b2=[];for(var i=_1b1||0;i<_1b0.length;i++){_1b2.push(_1b0[i]);}return _1b2;}});dojo.provide("dojo.lang.func");dojo.lang.hitch=function(_1b4,_1b5){var args=[];for(var x=2;x<arguments.length;x++){args.push(arguments[x]);}var fcn=(dojo.lang.isString(_1b5)?_1b4[_1b5]:_1b5)||function(){};return function(){var ta=args.concat([]);for(var x=0;x<arguments.length;x++){ta.push(arguments[x]);}return fcn.apply(_1b4,ta);};};dojo.lang.anonCtr=0;dojo.lang.anon={};dojo.lang.nameAnonFunc=function(_1bb,_1bc,_1bd){var isIE=(dojo.render.html.capable&&dojo.render.html["ie"]);var jpn="$joinpoint";var nso=(_1bc||dojo.lang.anon);if(isIE){var cn=_1bb["__dojoNameCache"];if(cn&&nso[cn]===_1bb){return _1bb["__dojoNameCache"];}else{if(cn){var _1c2=cn.indexOf(jpn);if(_1c2!=-1){return cn.substring(0,_1c2);}}}}if((_1bd)||((dj_global["djConfig"])&&(djConfig["slowAnonFuncLookups"]==true))){for(var x in nso){try{if(nso[x]===_1bb){if(isIE){_1bb["__dojoNameCache"]=x;var _1c2=x.indexOf(jpn);if(_1c2!=-1){x=x.substring(0,_1c2);}}return x;}}catch(e){}}}var ret="__"+dojo.lang.anonCtr++;while(typeof nso[ret]!="undefined"){ret="__"+dojo.lang.anonCtr++;}nso[ret]=_1bb;return ret;};dojo.lang.forward=function(_1c5){return function(){return this[_1c5].apply(this,arguments);};};dojo.lang.curry=function(_1c6,func){var _1c8=[];_1c6=_1c6||dj_global;if(dojo.lang.isString(func)){func=_1c6[func];}for(var x=2;x<arguments.length;x++){_1c8.push(arguments[x]);}var _1ca=(func["__preJoinArity"]||func.length)-_1c8.length;function gather(_1cb,_1cc,_1cd){var _1ce=_1cd;var _1cf=_1cc.slice(0);for(var x=0;x<_1cb.length;x++){_1cf.push(_1cb[x]);}_1cd=_1cd-_1cb.length;if(_1cd<=0){var res=func.apply(_1c6,_1cf);_1cd=_1ce;return res;}else{return function(){return gather(arguments,_1cf,_1cd);};}}return gather([],_1c8,_1ca);};dojo.lang.curryArguments=function(_1d2,func,args,_1d5){var _1d6=[];var x=_1d5||0;for(x=_1d5;x<args.length;x++){_1d6.push(args[x]);}return dojo.lang.curry.apply(dojo.lang,[_1d2,func].concat(_1d6));};dojo.lang.tryThese=function(){for(var x=0;x<arguments.length;x++){try{if(typeof arguments[x]=="function"){var ret=(arguments[x]());if(ret){return ret;}}}catch(e){dojo.debug(e);}}};dojo.lang.delayThese=function(farr,cb,_1dc,_1dd){if(!farr.length){if(typeof _1dd=="function"){_1dd();}return;}if((typeof _1dc=="undefined")&&(typeof cb=="number")){_1dc=cb;cb=function(){};}else{if(!cb){cb=function(){};if(!_1dc){_1dc=0;}}}setTimeout(function(){(farr.shift())();cb();dojo.lang.delayThese(farr,cb,_1dc,_1dd);},_1dc);};dojo.provide("dojo.string.extras");dojo.string.substituteParams=function(_1de,hash){var map=(typeof hash=="object")?hash:dojo.lang.toArray(arguments,1);return _1de.replace(/\%\{(\w+)\}/g,function(_1e1,key){if(typeof (map[key])!="undefined"&&map[key]!=null){return map[key];}dojo.raise("Substitution not found: "+key);});};dojo.string.capitalize=function(str){if(!dojo.lang.isString(str)){return "";}return str.replace(/[^\s]+/g,function(word){return word.substring(0,1).toUpperCase()+word.substring(1);});};dojo.string.isBlank=function(str){if(!dojo.lang.isString(str)){return true;}return (dojo.string.trim(str).length==0);};dojo.string.encodeAscii=function(str){if(!dojo.lang.isString(str)){return str;}var ret="";var _1e8=escape(str);var _1e9,re=/%u([0-9A-F]{4})/i;while((_1e9=_1e8.match(re))){var num=Number("0x"+_1e9[1]);var _1ec=escape("&#"+num+";");ret+=_1e8.substring(0,_1e9.index)+_1ec;_1e8=_1e8.substring(_1e9.index+_1e9[0].length);}ret+=_1e8.replace(/\+/g,"%2B");return ret;};dojo.string.escape=function(type,str){var args=dojo.lang.toArray(arguments,1);switch(type.toLowerCase()){case "xml": case "html": case "xhtml": return dojo.string.escapeXml.apply(this,args);case "sql": return dojo.string.escapeSql.apply(this,args);case "regexp": case "regex": return dojo.string.escapeRegExp.apply(this,args);case "javascript": case "jscript": case "js": return dojo.string.escapeJavaScript.apply(this,args);case "ascii": return dojo.string.encodeAscii.apply(this,args);default: return str;}};dojo.string.escapeXml=function(str,_1f1){str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");if(!_1f1){str=str.replace(/'/gm,"&#39;");}return str;};dojo.string.escapeSql=function(str){return str.replace(/'/gm,"''");};dojo.string.escapeRegExp=function(str,_1f4){return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g,function(ch){if(_1f4&&_1f4.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};dojo.string.escapeJavaScript=function(str){return str.replace(/(["'\f\b\n\t\r])/gm,"\\$1");};dojo.string.escapeString=function(str){return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");};dojo.string.summary=function(str,len){if(!len||str.length<=len){return str;}return str.substring(0,len).replace(/\.+$/,"")+"...";};dojo.string.endsWith=function(str,end,_1fc){if(_1fc){str=str.toLowerCase();end=end.toLowerCase();}if((str.length-end.length)<0){return false;}return str.lastIndexOf(end)==str.length-end.length;};dojo.string.endsWithAny=function(str){for(var i=1;i<arguments.length;i++){if(dojo.string.endsWith(str,arguments[i])){return true;}}return false;};dojo.string.startsWith=function(str,_200,_201){if(_201){str=str.toLowerCase();_200=_200.toLowerCase();}return str.indexOf(_200)==0;};dojo.string.startsWithAny=function(str){for(var i=1;i<arguments.length;i++){if(dojo.string.startsWith(str,arguments[i])){return true;}}return false;};dojo.string.has=function(str){for(var i=1;i<arguments.length;i++){if(str.indexOf(arguments[i])>-1){return true;}}return false;};dojo.string.normalizeNewlines=function(text,_207){if(_207=="\n"){text=text.replace(/\r\n/g,"\n");text=text.replace(/\r/g,"\n");}else{if(_207=="\r"){text=text.replace(/\r\n/g,"\r");text=text.replace(/\n/g,"\r");}else{text=text.replace(/([^\r])\n/g,"$1\r\n").replace(/\r([^\n])/g,"\r\n$1");}}return text;};dojo.string.splitEscaped=function(str,_209){var _20a=[];for(var i=0,_20c=0;i<str.length;i++){if(str.charAt(i)=="\\"){i++;continue;}if(str.charAt(i)==_209){_20a.push(str.substring(_20c,i));_20c=i+1;}}_20a.push(str.substr(_20c));return _20a;};dojo.provide("dojo.dom");dojo.dom.ELEMENT_NODE=1;dojo.dom.ATTRIBUTE_NODE=2;dojo.dom.TEXT_NODE=3;dojo.dom.CDATA_SECTION_NODE=4;dojo.dom.ENTITY_REFERENCE_NODE=5;dojo.dom.ENTITY_NODE=6;dojo.dom.PROCESSING_INSTRUCTION_NODE=7;dojo.dom.COMMENT_NODE=8;dojo.dom.DOCUMENT_NODE=9;dojo.dom.DOCUMENT_TYPE_NODE=10;dojo.dom.DOCUMENT_FRAGMENT_NODE=11;dojo.dom.NOTATION_NODE=12;dojo.dom.dojoml="http://www.dojotoolkit.org/2004/dojoml";dojo.dom.xmlns={svg:"http://www.w3.org/2000/svg",smil:"http://www.w3.org/2001/SMIL20/",mml:"http://www.w3.org/1998/Math/MathML",cml:"http://www.xml-cml.org",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml",xul:"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",xbl:"http://www.mozilla.org/xbl",fo:"http://www.w3.org/1999/XSL/Format",xsl:"http://www.w3.org/1999/XSL/Transform",xslt:"http://www.w3.org/1999/XSL/Transform",xi:"http://www.w3.org/2001/XInclude",xforms:"http://www.w3.org/2002/01/xforms",saxon:"http://icl.com/saxon",xalan:"http://xml.apache.org/xslt",xsd:"http://www.w3.org/2001/XMLSchema",dt:"http://www.w3.org/2001/XMLSchema-datatypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",dc:"http://purl.org/dc/elements/1.1/",dcq:"http://purl.org/dc/qualifiers/1.0","soap-env":"http://schemas.xmlsoap.org/soap/envelope/",wsdl:"http://schemas.xmlsoap.org/wsdl/",AdobeExtensions:"http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"};dojo.dom.isNode=function(wh){if(typeof Element=="function"){try{return wh instanceof Element;}catch(e){}}else{return wh&&!isNaN(wh.nodeType);}};dojo.dom.getUniqueId=function(){var _20e=dojo.doc();do{var id="dj_unique_"+(++arguments.callee._idIncrement);}while(_20e.getElementById(id));return id;};dojo.dom.getUniqueId._idIncrement=0;dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(_210,_211){var node=_210.firstChild;while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){node=node.nextSibling;}if(_211&&node&&node.tagName&&node.tagName.toLowerCase()!=_211.toLowerCase()){node=dojo.dom.nextElement(node,_211);}return node;};dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_213,_214){var node=_213.lastChild;while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){node=node.previousSibling;}if(_214&&node&&node.tagName&&node.tagName.toLowerCase()!=_214.toLowerCase()){node=dojo.dom.prevElement(node,_214);}return node;};dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(node,_217){if(!node){return null;}do{node=node.nextSibling;}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);if(node&&_217&&_217.toLowerCase()!=node.tagName.toLowerCase()){return dojo.dom.nextElement(node,_217);}return node;};dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(node,_219){if(!node){return null;}if(_219){_219=_219.toLowerCase();}do{node=node.previousSibling;}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);if(node&&_219&&_219.toLowerCase()!=node.tagName.toLowerCase()){return dojo.dom.prevElement(node,_219);}return node;};dojo.dom.moveChildren=function(_21a,_21b,trim){var _21d=0;if(trim){while(_21a.hasChildNodes()&&_21a.firstChild.nodeType==dojo.dom.TEXT_NODE){_21a.removeChild(_21a.firstChild);}while(_21a.hasChildNodes()&&_21a.lastChild.nodeType==dojo.dom.TEXT_NODE){_21a.removeChild(_21a.lastChild);}}while(_21a.hasChildNodes()){_21b.appendChild(_21a.firstChild);_21d++;}return _21d;};dojo.dom.copyChildren=function(_21e,_21f,trim){var _221=_21e.cloneNode(true);return this.moveChildren(_221,_21f,trim);};dojo.dom.replaceChildren=function(node,_223){var _224=[];if(dojo.render.html.ie){for(var i=0;i<node.childNodes.length;i++){_224.push(node.childNodes[i]);}}dojo.dom.removeChildren(node);node.appendChild(_223);for(var i=0;i<_224.length;i++){dojo.dom.destroyNode(_224[i]);}};dojo.dom.removeChildren=function(node){var _227=node.childNodes.length;while(node.hasChildNodes()){dojo.dom.removeNode(node.firstChild);}return _227;};dojo.dom.replaceNode=function(node,_229){return node.parentNode.replaceChild(_229,node);};dojo.dom.destroyNode=function(node){if(node.parentNode){node=dojo.dom.removeNode(node);}if(node.nodeType!=3){if(dojo.exists("dojo.event.browser.clean")){dojo.event.browser.clean(node);}if(dojo.render.html.ie){node.outerHTML="";}}};dojo.dom.removeNode=function(node){if(node&&node.parentNode){return node.parentNode.removeChild(node);}};dojo.dom.getAncestors=function(node,_22d,_22e){var _22f=[];var _230=(_22d&&(_22d instanceof Function||typeof _22d=="function"));while(node){if(!_230||_22d(node)){_22f.push(node);}if(_22e&&_22f.length>0){return _22f[0];}node=node.parentNode;}if(_22e){return null;}return _22f;};dojo.dom.getAncestorsByTag=function(node,tag,_233){tag=tag.toLowerCase();return dojo.dom.getAncestors(node,function(el){return ((el.tagName)&&(el.tagName.toLowerCase()==tag));},_233);};dojo.dom.getFirstAncestorByTag=function(node,tag){return dojo.dom.getAncestorsByTag(node,tag,true);};dojo.dom.isDescendantOf=function(node,_238,_239){if(_239&&node){node=node.parentNode;}while(node){if(node==_238){return true;}node=node.parentNode;}return false;};dojo.dom.innerXML=function(node){if(node.innerXML){return node.innerXML;}else{if(node.xml){return node.xml;}else{if(typeof XMLSerializer!="undefined"){return (new XMLSerializer()).serializeToString(node);}}}};dojo.dom.createDocument=function(){var doc=null;var _23c=dojo.doc();if(!dj_undef("ActiveXObject")){var _23d=["MSXML2","Microsoft","MSXML","MSXML3"];for(var i=0;i<_23d.length;i++){try{doc=new ActiveXObject(_23d[i]+".XMLDOM");}catch(e){}if(doc){break;}}}else{if((_23c.implementation)&&(_23c.implementation.createDocument)){doc=_23c.implementation.createDocument("","",null);}}return doc;};dojo.dom.createDocumentFromText=function(str,_240){if(!_240){_240="text/xml";}if(!dj_undef("DOMParser")){var _241=new DOMParser();return _241.parseFromString(str,_240);}else{if(!dj_undef("ActiveXObject")){var _242=dojo.dom.createDocument();if(_242){_242.async=false;_242.loadXML(str);return _242;}else{dojo.debug("toXml didn't work?");}}else{var _243=dojo.doc();if(_243.createElement){var tmp=_243.createElement("xml");tmp.innerHTML=str;if(_243.implementation&&_243.implementation.createDocument){var _245=_243.implementation.createDocument("foo","",null);for(var i=0;i<tmp.childNodes.length;i++){_245.importNode(tmp.childNodes.item(i),true);}return _245;}return ((tmp.document)&&(tmp.document.firstChild?tmp.document.firstChild:tmp));}}}return null;};dojo.dom.prependChild=function(node,_248){if(_248.firstChild){_248.insertBefore(node,_248.firstChild);}else{_248.appendChild(node);}return true;};dojo.dom.insertBefore=function(node,ref,_24b){if((_24b!=true)&&(node===ref||node.nextSibling===ref)){return false;}var _24c=ref.parentNode;_24c.insertBefore(node,ref);return true;};dojo.dom.insertAfter=function(node,ref,_24f){var pn=ref.parentNode;if(ref==pn.lastChild){if((_24f!=true)&&(node===ref)){return false;}pn.appendChild(node);}else{return this.insertBefore(node,ref.nextSibling,_24f);}return true;};dojo.dom.insertAtPosition=function(node,ref,_253){if((!node)||(!ref)||(!_253)){return false;}switch(_253.toLowerCase()){case "before": return dojo.dom.insertBefore(node,ref);case "after": return dojo.dom.insertAfter(node,ref);case "first": if(ref.firstChild){return dojo.dom.insertBefore(node,ref.firstChild);}else{ref.appendChild(node);return true;}break;default: ref.appendChild(node);return true;}};dojo.dom.insertAtIndex=function(node,_255,_256){var _257=_255.childNodes;if(!_257.length||_257.length==_256){_255.appendChild(node);return true;}if(_256==0){return dojo.dom.prependChild(node,_255);}return dojo.dom.insertAfter(node,_257[_256-1]);};dojo.dom.textContent=function(node,text){if(arguments.length>1){var _25a=dojo.doc();dojo.dom.replaceChildren(node,_25a.createTextNode(text));return text;}else{if(node.textContent!=undefined){return node.textContent;}var _25b="";if(node==null){return _25b;}for(var i=0;i<node.childNodes.length;i++){switch(node.childNodes[i].nodeType){case 1: case 5: _25b+=dojo.dom.textContent(node.childNodes[i]);break;case 3: case 2: case 4: _25b+=node.childNodes[i].nodeValue;break;default: break;}}return _25b;}};dojo.dom.hasParent=function(node){return Boolean(node&&node.parentNode&&dojo.dom.isNode(node.parentNode));};dojo.dom.isTag=function(node){if(node&&node.tagName){for(var i=1;i<arguments.length;i++){if(node.tagName==String(arguments[i])){return String(arguments[i]);}}}return "";};dojo.dom.setAttributeNS=function(elem,_261,_262,_263){if(elem==null||((elem==undefined)&&(typeof elem=="undefined"))){dojo.raise("No element given to dojo.dom.setAttributeNS");}if(!((elem.setAttributeNS==undefined)&&(typeof elem.setAttributeNS=="undefined"))){elem.setAttributeNS(_261,_262,_263);}else{var _264=elem.ownerDocument;var _265=_264.createNode(2,_262,_261);_265.nodeValue=_263;elem.setAttributeNode(_265);}};dojo.provide("dojo.undo.browser");try{if((!djConfig["preventBackButtonFix"])&&(!dojo.hostenv.post_load_)){document.write("<iframe style='border: 0px; width: 1px; height: 1px; position: absolute; bottom: 0px; right: 0px; visibility: visible;' name='djhistory' id='djhistory' src='"+(djConfig["dojoIframeHistoryUrl"]||dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"'></iframe>");}}catch(e){}if(dojo.render.html.opera){dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work.");}dojo.undo.browser={initialHref:(!dj_undef("window"))?window.location.href:"",initialHash:(!dj_undef("window"))?window.location.hash:"",moveForward:false,historyStack:[],forwardStack:[],historyIframe:null,bookmarkAnchor:null,locationTimer:null,setInitialState:function(args){this.initialState=this._createState(this.initialHref,args,this.initialHash);},addToHistory:function(args){this.forwardStack=[];var hash=null;var url=null;if(!this.historyIframe){if(djConfig["useXDomain"]&&!djConfig["dojoIframeHistoryUrl"]){dojo.debug("dojo.undo.browser: When using cross-domain Dojo builds,"+" please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"+" to the path on your domain to iframe_history.html");}this.historyIframe=window.frames["djhistory"];}if(!this.bookmarkAnchor){this.bookmarkAnchor=document.createElement("a");dojo.body().appendChild(this.bookmarkAnchor);this.bookmarkAnchor.style.display="none";}if(args["changeUrl"]){hash="#"+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());if(this.historyStack.length==0&&this.initialState.urlHash==hash){this.initialState=this._createState(url,args,hash);return;}else{if(this.historyStack.length>0&&this.historyStack[this.historyStack.length-1].urlHash==hash){this.historyStack[this.historyStack.length-1]=this._createState(url,args,hash);return;}}this.changingUrl=true;setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;",1);this.bookmarkAnchor.href=hash;if(dojo.render.html.ie){url=this._loadIframeHistory();var _26a=args["back"]||args["backButton"]||args["handle"];var tcb=function(_26c){if(window.location.hash!=""){setTimeout("window.location.href = '"+hash+"';",1);}_26a.apply(this,[_26c]);};if(args["back"]){args.back=tcb;}else{if(args["backButton"]){args.backButton=tcb;}else{if(args["handle"]){args.handle=tcb;}}}var _26d=args["forward"]||args["forwardButton"]||args["handle"];var tfw=function(_26f){if(window.location.hash!=""){window.location.href=hash;}if(_26d){_26d.apply(this,[_26f]);}};if(args["forward"]){args.forward=tfw;}else{if(args["forwardButton"]){args.forwardButton=tfw;}else{if(args["handle"]){args.handle=tfw;}}}}else{if(dojo.render.html.moz){if(!this.locationTimer){this.locationTimer=setInterval("dojo.undo.browser.checkLocation();",200);}}}}else{url=this._loadIframeHistory();}this.historyStack.push(this._createState(url,args,hash));},checkLocation:function(){if(!this.changingUrl){var hsl=this.historyStack.length;if((window.location.hash==this.initialHash||window.location.href==this.initialHref)&&(hsl==1)){this.handleBackButton();return;}if(this.forwardStack.length>0){if(this.forwardStack[this.forwardStack.length-1].urlHash==window.location.hash){this.handleForwardButton();return;}}if((hsl>=2)&&(this.historyStack[hsl-2])){if(this.historyStack[hsl-2].urlHash==window.location.hash){this.handleBackButton();return;}}}},iframeLoaded:function(evt,_272){if(!dojo.render.html.opera){var _273=this._getUrlQuery(_272.href);if(_273==null){if(this.historyStack.length==1){this.handleBackButton();}return;}if(this.moveForward){this.moveForward=false;return;}if(this.historyStack.length>=2&&_273==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){this.handleBackButton();}else{if(this.forwardStack.length>0&&_273==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){this.handleForwardButton();}}}},handleBackButton:function(){var _274=this.historyStack.pop();if(!_274){return;}var last=this.historyStack[this.historyStack.length-1];if(!last&&this.historyStack.length==0){last=this.initialState;}if(last){if(last.kwArgs["back"]){last.kwArgs["back"]();}else{if(last.kwArgs["backButton"]){last.kwArgs["backButton"]();}else{if(last.kwArgs["handle"]){last.kwArgs.handle("back");}}}}this.forwardStack.push(_274);},handleForwardButton:function(){var last=this.forwardStack.pop();if(!last){return;}if(last.kwArgs["forward"]){last.kwArgs.forward();}else{if(last.kwArgs["forwardButton"]){last.kwArgs.forwardButton();}else{if(last.kwArgs["handle"]){last.kwArgs.handle("forward");}}}this.historyStack.push(last);},_createState:function(url,args,hash){return {"url":url,"kwArgs":args,"urlHash":hash};},_getUrlQuery:function(url){var _27b=url.split("?");if(_27b.length<2){return null;}else{return _27b[1];}},_loadIframeHistory:function(){var url=(djConfig["dojoIframeHistoryUrl"]||dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"?"+(new Date()).getTime();this.moveForward=true;dojo.io.setIFrameSrc(this.historyIframe,url,false);return url;}};dojo.provide("dojo.io.BrowserIO");if(!dj_undef("window")){dojo.io.checkChildrenForFile=function(node){var _27e=false;var _27f=node.getElementsByTagName("input");dojo.lang.forEach(_27f,function(_280){if(_27e){return;}if(_280.getAttribute("type")=="file"){_27e=true;}});return _27e;};dojo.io.formHasFile=function(_281){return dojo.io.checkChildrenForFile(_281);};dojo.io.updateNode=function(node,_283){node=dojo.byId(node);var args=_283;if(dojo.lang.isString(_283)){args={url:_283};}args.mimetype="text/html";args.load=function(t,d,e){while(node.firstChild){dojo.dom.destroyNode(node.firstChild);}node.innerHTML=d;};dojo.io.bind(args);};dojo.io.formFilter=function(node){var type=(node.type||"").toLowerCase();return !node.disabled&&node.name&&!dojo.lang.inArray(["file","submit","image","reset","button"],type);};dojo.io.encodeForm=function(_28a,_28b,_28c){if((!_28a)||(!_28a.tagName)||(!_28a.tagName.toLowerCase()=="form")){dojo.raise("Attempted to encode a non-form element.");}if(!_28c){_28c=dojo.io.formFilter;}var enc=/utf/i.test(_28b||"")?encodeURIComponent:dojo.string.encodeAscii;var _28e=[];for(var i=0;i<_28a.elements.length;i++){var elm=_28a.elements[i];if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_28c(elm)){continue;}var name=enc(elm.name);var type=elm.type.toLowerCase();if(type=="select-multiple"){for(var j=0;j<elm.options.length;j++){if(elm.options[j].selected){_28e.push(name+"="+enc(elm.options[j].value));}}}else{if(dojo.lang.inArray(["radio","checkbox"],type)){if(elm.checked){_28e.push(name+"="+enc(elm.value));}}else{_28e.push(name+"="+enc(elm.value));}}}var _294=_28a.getElementsByTagName("input");for(var i=0;i<_294.length;i++){var _295=_294[i];if(_295.type.toLowerCase()=="image"&&_295.form==_28a&&_28c(_295)){var name=enc(_295.name);_28e.push(name+"="+enc(_295.value));_28e.push(name+".x=0");_28e.push(name+".y=0");}}return _28e.join("&")+"&";};dojo.io.FormBind=function(args){this.bindArgs={};if(args&&args.formNode){this.init(args);}else{if(args){this.init({formNode:args});}}};dojo.lang.extend(dojo.io.FormBind,{form:null,bindArgs:null,clickedButton:null,init:function(args){var form=dojo.byId(args.formNode);if(!form||!form.tagName||form.tagName.toLowerCase()!="form"){throw new Error("FormBind: Couldn't apply, invalid form");}else{if(this.form==form){return;}else{if(this.form){throw new Error("FormBind: Already applied to a form");}}}dojo.lang.mixin(this.bindArgs,args);this.form=form;this.connect(form,"onsubmit","submit");for(var i=0;i<form.elements.length;i++){var node=form.elements[i];if(node&&node.type&&dojo.lang.inArray(["submit","button"],node.type.toLowerCase())){this.connect(node,"onclick","click");}}var _29b=form.getElementsByTagName("input");for(var i=0;i<_29b.length;i++){var _29c=_29b[i];if(_29c.type.toLowerCase()=="image"&&_29c.form==form){this.connect(_29c,"onclick","click");}}},onSubmit:function(form){return true;},submit:function(e){e.preventDefault();if(this.onSubmit(this.form)){dojo.io.bind(dojo.lang.mixin(this.bindArgs,{formFilter:dojo.lang.hitch(this,"formFilter")}));}},click:function(e){var node=e.currentTarget;if(node.disabled){return;}this.clickedButton=node;},formFilter:function(node){var type=(node.type||"").toLowerCase();var _2a3=false;if(node.disabled||!node.name){_2a3=false;}else{if(dojo.lang.inArray(["submit","button","image"],type)){if(!this.clickedButton){this.clickedButton=node;}_2a3=node==this.clickedButton;}else{_2a3=!dojo.lang.inArray(["file","submit","reset","button"],type);}}return _2a3;},connect:function(_2a4,_2a5,_2a6){if(dojo.evalObjPath("dojo.event.connect")){dojo.event.connect(_2a4,_2a5,this,_2a6);}else{var fcn=dojo.lang.hitch(this,_2a6);_2a4[_2a5]=function(e){if(!e){e=window.event;}if(!e.currentTarget){e.currentTarget=e.srcElement;}if(!e.preventDefault){e.preventDefault=function(){window.event.returnValue=false;};}fcn(e);};}}});dojo.io.XMLHTTPTransport=new function(){var _2a9=this;var _2aa={};this.useCache=false;this.preventCache=false;function getCacheKey(url,_2ac,_2ad){return url+"|"+_2ac+"|"+_2ad.toLowerCase();}function addToCache(url,_2af,_2b0,http){_2aa[getCacheKey(url,_2af,_2b0)]=http;}function getFromCache(url,_2b3,_2b4){return _2aa[getCacheKey(url,_2b3,_2b4)];}this.clearCache=function(){_2aa={};};function doLoad(_2b5,http,url,_2b8,_2b9){if(((http.status>=200)&&(http.status<300))||(http.status==304)||(location.protocol=="file:"&&(http.status==0||http.status==undefined))||(location.protocol=="chrome:"&&(http.status==0||http.status==undefined))){var ret;if(_2b5.method.toLowerCase()=="head"){var _2bb=http.getAllResponseHeaders();ret={};ret.toString=function(){return _2bb;};var _2bc=_2bb.split(/[\r\n]+/g);for(var i=0;i<_2bc.length;i++){var pair=_2bc[i].match(/^([^:]+)\s*:\s*(.+)$/i);if(pair){ret[pair[1]]=pair[2];}}}else{if(_2b5.mimetype=="text/javascript"){try{ret=dj_eval(http.responseText);}catch(e){dojo.debug(e);dojo.debug(http.responseText);ret=null;}}else{if(_2b5.mimetype=="text/json"||_2b5.mimetype=="application/json"){try{ret=dj_eval("("+http.responseText+")");}catch(e){dojo.debug(e);dojo.debug(http.responseText);ret=false;}}else{if((_2b5.mimetype=="application/xml")||(_2b5.mimetype=="text/xml")){ret=http.responseXML;if(!ret||typeof ret=="string"||!http.getResponseHeader("Content-Type")){ret=dojo.dom.createDocumentFromText(http.responseText);}}else{ret=http.responseText;}}}}if(_2b9){addToCache(url,_2b8,_2b5.method,http);}_2b5[(typeof _2b5.load=="function")?"load":"handle"]("load",ret,http,_2b5);}else{var _2bf=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText);_2b5[(typeof _2b5.error=="function")?"error":"handle"]("error",_2bf,http,_2b5);}}function setHeaders(http,_2c1){if(_2c1["headers"]){for(var _2c2 in _2c1["headers"]){if(_2c2.toLowerCase()=="content-type"&&!_2c1["contentType"]){_2c1["contentType"]=_2c1["headers"][_2c2];}else{http.setRequestHeader(_2c2,_2c1["headers"][_2c2]);}}}}this.inFlight=[];this.inFlightTimer=null;this.startWatchingInFlight=function(){if(!this.inFlightTimer){this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10);}};this.watchInFlight=function(){var now=null;if(!dojo.hostenv._blockAsync&&!_2a9._blockAsync){for(var x=this.inFlight.length-1;x>=0;x--){try{var tif=this.inFlight[x];if(!tif||tif.http._aborted||!tif.http.readyState){this.inFlight.splice(x,1);continue;}if(4==tif.http.readyState){this.inFlight.splice(x,1);doLoad(tif.req,tif.http,tif.url,tif.query,tif.useCache);}else{if(tif.startTime){if(!now){now=(new Date()).getTime();}if(tif.startTime+(tif.req.timeoutSeconds*1000)<now){if(typeof tif.http.abort=="function"){tif.http.abort();}this.inFlight.splice(x,1);tif.req[(typeof tif.req.timeout=="function")?"timeout":"handle"]("timeout",null,tif.http,tif.req);}}}}catch(e){try{var _2c6=new dojo.io.Error("XMLHttpTransport.watchInFlight Error: "+e);tif.req[(typeof tif.req.error=="function")?"error":"handle"]("error",_2c6,tif.http,tif.req);}catch(e2){dojo.debug("XMLHttpTransport error callback failed: "+e2);}}}}clearTimeout(this.inFlightTimer);if(this.inFlight.length==0){this.inFlightTimer=null;return;}this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10);};var _2c7=dojo.hostenv.getXmlhttpObject()?true:false;this.canHandle=function(_2c8){return _2c7&&dojo.lang.inArray(["text/plain","text/html","application/xml","text/xml","text/javascript","text/json","application/json"],(_2c8["mimetype"].toLowerCase()||""))&&!(_2c8["formNode"]&&dojo.io.formHasFile(_2c8["formNode"]));};this.multipartBoundary="45309FFF-BD65-4d50-99C9-36986896A96F";this.bind=function(_2c9){var url=_2c9.url;var _2cb="";if(_2c9["formNode"]){var ta=_2c9.formNode.getAttribute("action");if((ta)&&(!_2c9["url"])){url=ta;}var tp=_2c9.formNode.getAttribute("method");if((tp)&&(!_2c9["method"])){_2c9.method=tp;}_2cb+=dojo.io.encodeForm(_2c9.formNode,_2c9.encoding,_2c9["formFilter"]);}if(url.indexOf("#")>-1){dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url);url=url.split("#")[0];}if(_2c9["file"]){_2c9.method="post";}if(!_2c9["method"]){_2c9.method="get";}if(_2c9.method.toLowerCase()=="get"){_2c9.multipart=false;}else{if(_2c9["file"]){_2c9.multipart=true;}else{if(!_2c9["multipart"]){_2c9.multipart=false;}}}if(_2c9["backButton"]||_2c9["back"]||_2c9["changeUrl"]){dojo.undo.browser.addToHistory(_2c9);}var _2ce=_2c9["content"]||{};if(_2c9.sendTransport){_2ce["dojo.transport"]="xmlhttp";}do{if(_2c9.postContent){_2cb=_2c9.postContent;break;}if(_2ce){_2cb+=dojo.io.argsFromMap(_2ce,_2c9.encoding);}if(_2c9.method.toLowerCase()=="get"||!_2c9.multipart){break;}var t=[];if(_2cb.length){var q=_2cb.split("&");for(var i=0;i<q.length;++i){if(q[i].length){var p=q[i].split("=");t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+p[0]+"\"","",p[1]);}}}if(_2c9.file){if(dojo.lang.isArray(_2c9.file)){for(var i=0;i<_2c9.file.length;++i){var o=_2c9.file[i];t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+o.name+"\"; filename=\""+("fileName" in o?o.fileName:o.name)+"\"","Content-Type: "+("contentType" in o?o.contentType:"application/octet-stream"),"",o.content);}}else{var o=_2c9.file;t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+o.name+"\"; filename=\""+("fileName" in o?o.fileName:o.name)+"\"","Content-Type: "+("contentType" in o?o.contentType:"application/octet-stream"),"",o.content);}}if(t.length){t.push("--"+this.multipartBoundary+"--","");_2cb=t.join("\r\n");}}while(false);var _2d4=_2c9["sync"]?false:true;var _2d5=_2c9["preventCache"]||(this.preventCache==true&&_2c9["preventCache"]!=false);var _2d6=_2c9["useCache"]==true||(this.useCache==true&&_2c9["useCache"]!=false);if(!_2d5&&_2d6){var _2d7=getFromCache(url,_2cb,_2c9.method);if(_2d7){doLoad(_2c9,_2d7,url,_2cb,false);return;}}var http=dojo.hostenv.getXmlhttpObject(_2c9);var _2d9=false;if(_2d4){var _2da=this.inFlight.push({"req":_2c9,"http":http,"url":url,"query":_2cb,"useCache":_2d6,"startTime":_2c9.timeoutSeconds?(new Date()).getTime():0});this.startWatchingInFlight();}else{_2a9._blockAsync=true;}if(_2c9.method.toLowerCase()=="post"){if(!_2c9.user){http.open("POST",url,_2d4);}else{http.open("POST",url,_2d4,_2c9.user,_2c9.password);}setHeaders(http,_2c9);http.setRequestHeader("Content-Type",_2c9.multipart?("multipart/form-data; boundary="+this.multipartBoundary):(_2c9.contentType||"application/x-www-form-urlencoded"));try{http.send(_2cb);}catch(e){if(typeof http.abort=="function"){http.abort();}doLoad(_2c9,{status:404},url,_2cb,_2d6);}}else{var _2db=url;if(_2cb!=""){_2db+=(_2db.indexOf("?")>-1?"&":"?")+_2cb;}if(_2d5){_2db+=(dojo.string.endsWithAny(_2db,"?","&")?"":(_2db.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf();}if(!_2c9.user){http.open(_2c9.method.toUpperCase(),_2db,_2d4);}else{http.open(_2c9.method.toUpperCase(),_2db,_2d4,_2c9.user,_2c9.password);}setHeaders(http,_2c9);try{http.send(null);}catch(e){if(typeof http.abort=="function"){http.abort();}doLoad(_2c9,{status:404},url,_2cb,_2d6);}}if(!_2d4){doLoad(_2c9,http,url,_2cb,_2d6);_2a9._blockAsync=false;}_2c9.abort=function(){try{http._aborted=true;}catch(e){}return http.abort();};return;};dojo.io.transports.addTransport("XMLHTTPTransport");};}dojo.provide("dojo.io.cookie");dojo.io.cookie.setCookie=function(name,_2dd,days,path,_2e0,_2e1){var _2e2=-1;if((typeof days=="number")&&(days>=0)){var d=new Date();d.setTime(d.getTime()+(days*24*60*60*1000));_2e2=d.toGMTString();}_2dd=escape(_2dd);document.cookie=name+"="+_2dd+";"+(_2e2!=-1?" expires="+_2e2+";":"")+(path?"path="+path:"")+(_2e0?"; domain="+_2e0:"")+(_2e1?"; secure":"");};dojo.io.cookie.set=dojo.io.cookie.setCookie;dojo.io.cookie.getCookie=function(name){var idx=document.cookie.lastIndexOf(name+"=");if(idx==-1){return null;}var _2e6=document.cookie.substring(idx+name.length+1);var end=_2e6.indexOf(";");if(end==-1){end=_2e6.length;}_2e6=_2e6.substring(0,end);_2e6=unescape(_2e6);return _2e6;};dojo.io.cookie.get=dojo.io.cookie.getCookie;dojo.io.cookie.deleteCookie=function(name){dojo.io.cookie.setCookie(name,"-",0);};dojo.io.cookie.setObjectCookie=function(name,obj,days,path,_2ed,_2ee,_2ef){if(arguments.length==5){_2ef=_2ed;_2ed=null;_2ee=null;}var _2f0=[],_2f1,_2f2="";if(!_2ef){_2f1=dojo.io.cookie.getObjectCookie(name);}if(days>=0){if(!_2f1){_2f1={};}for(var prop in obj){if(obj[prop]==null){delete _2f1[prop];}else{if((typeof obj[prop]=="string")||(typeof obj[prop]=="number")){_2f1[prop]=obj[prop];}}}prop=null;for(var prop in _2f1){_2f0.push(escape(prop)+"="+escape(_2f1[prop]));}_2f2=_2f0.join("&");}dojo.io.cookie.setCookie(name,_2f2,days,path,_2ed,_2ee);};dojo.io.cookie.getObjectCookie=function(name){var _2f5=null,_2f6=dojo.io.cookie.getCookie(name);if(_2f6){_2f5={};var _2f7=_2f6.split("&");for(var i=0;i<_2f7.length;i++){var pair=_2f7[i].split("=");var _2fa=pair[1];if(isNaN(_2fa)){_2fa=unescape(pair[1]);}_2f5[unescape(pair[0])]=_2fa;}}return _2f5;};dojo.io.cookie.isSupported=function(){if(typeof navigator.cookieEnabled!="boolean"){dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null);var _2fb=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__");navigator.cookieEnabled=(_2fb=="CookiesAllowed");if(navigator.cookieEnabled){this.deleteCookie("__TestingYourBrowserForCookieSupport__");}}return navigator.cookieEnabled;};if(!dojo.io.cookies){dojo.io.cookies=dojo.io.cookie;}dojo.provide("dojo.io.*");dojo.provide("dojo.io.cookie");dojo.io.cookie.setCookie=function(name,_2fd,days,path,_300,_301){var _302=-1;if((typeof days=="number")&&(days>=0)){var d=new Date();d.setTime(d.getTime()+(days*24*60*60*1000));_302=d.toGMTString();}_2fd=escape(_2fd);document.cookie=name+"="+_2fd+";"+(_302!=-1?" expires="+_302+";":"")+(path?"path="+path:"")+(_300?"; domain="+_300:"")+(_301?"; secure":"");};dojo.io.cookie.set=dojo.io.cookie.setCookie;dojo.io.cookie.getCookie=function(name){var idx=document.cookie.lastIndexOf(name+"=");if(idx==-1){return null;}var _306=document.cookie.substring(idx+name.length+1);var end=_306.indexOf(";");if(end==-1){end=_306.length;}_306=_306.substring(0,end);_306=unescape(_306);return _306;};dojo.io.cookie.get=dojo.io.cookie.getCookie;dojo.io.cookie.deleteCookie=function(name){dojo.io.cookie.setCookie(name,"-",0);};dojo.io.cookie.setObjectCookie=function(name,obj,days,path,_30d,_30e,_30f){if(arguments.length==5){_30f=_30d;_30d=null;_30e=null;}var _310=[],_311,_312="";if(!_30f){_311=dojo.io.cookie.getObjectCookie(name);}if(days>=0){if(!_311){_311={};}for(var prop in obj){if(obj[prop]==null){delete _311[prop];}else{if((typeof obj[prop]=="string")||(typeof obj[prop]=="number")){_311[prop]=obj[prop];}}}prop=null;for(var prop in _311){_310.push(escape(prop)+"="+escape(_311[prop]));}_312=_310.join("&");}dojo.io.cookie.setCookie(name,_312,days,path,_30d,_30e);};dojo.io.cookie.getObjectCookie=function(name){var _315=null,_316=dojo.io.cookie.getCookie(name);if(_316){_315={};var _317=_316.split("&");for(var i=0;i<_317.length;i++){var pair=_317[i].split("=");var _31a=pair[1];if(isNaN(_31a)){_31a=unescape(pair[1]);}_315[unescape(pair[0])]=_31a;}}return _315;};dojo.io.cookie.isSupported=function(){if(typeof navigator.cookieEnabled!="boolean"){dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null);var _31b=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__");navigator.cookieEnabled=(_31b=="CookiesAllowed");if(navigator.cookieEnabled){this.deleteCookie("__TestingYourBrowserForCookieSupport__");}}return navigator.cookieEnabled;};if(!dojo.io.cookies){dojo.io.cookies=dojo.io.cookie;}dojo.provide("dojo.event.common");dojo.event=new function(){this._canTimeout=dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]);function interpolateArgs(args,_31d){var dl=dojo.lang;var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(args.length>2)?args[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false,maxCalls:-1};switch(args.length){case 0: return;case 1: return;case 2: ao.srcFunc=args[0];ao.adviceFunc=args[1];break;case 3: if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){ao.adviceType="after";ao.srcObj=args[0];ao.srcFunc=args[1];ao.adviceFunc=args[2];}else{if((dl.isString(args[1]))&&(dl.isString(args[2]))){ao.srcFunc=args[1];ao.adviceFunc=args[2];}else{if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){ao.adviceType="after";ao.srcObj=args[0];ao.srcFunc=args[1];var _320=dl.nameAnonFunc(args[2],ao.adviceObj,_31d);ao.adviceFunc=_320;}else{if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){ao.adviceType="after";ao.srcObj=dj_global;var _320=dl.nameAnonFunc(args[0],ao.srcObj,_31d);ao.srcFunc=_320;ao.adviceObj=args[1];ao.adviceFunc=args[2];}}}}break;case 4: if((dl.isObject(args[0]))&&(dl.isObject(args[2]))){ao.adviceType="after";ao.srcObj=args[0];ao.srcFunc=args[1];ao.adviceObj=args[2];ao.adviceFunc=args[3];}else{if((dl.isString(args[0]))&&(dl.isString(args[1]))&&(dl.isObject(args[2]))){ao.adviceType=args[0];ao.srcObj=dj_global;ao.srcFunc=args[1];ao.adviceObj=args[2];ao.adviceFunc=args[3];}else{if((dl.isString(args[0]))&&(dl.isFunction(args[1]))&&(dl.isObject(args[2]))){ao.adviceType=args[0];ao.srcObj=dj_global;var _320=dl.nameAnonFunc(args[1],dj_global,_31d);ao.srcFunc=_320;ao.adviceObj=args[2];ao.adviceFunc=args[3];}else{if((dl.isString(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))&&(dl.isFunction(args[3]))){ao.srcObj=args[1];ao.srcFunc=args[2];var _320=dl.nameAnonFunc(args[3],dj_global,_31d);ao.adviceObj=dj_global;ao.adviceFunc=_320;}else{if(dl.isObject(args[1])){ao.srcObj=args[1];ao.srcFunc=args[2];ao.adviceObj=dj_global;ao.adviceFunc=args[3];}else{if(dl.isObject(args[2])){ao.srcObj=dj_global;ao.srcFunc=args[1];ao.adviceObj=args[2];ao.adviceFunc=args[3];}else{ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global;ao.srcFunc=args[1];ao.adviceFunc=args[2];ao.aroundFunc=args[3];}}}}}}break;case 6: ao.srcObj=args[1];ao.srcFunc=args[2];ao.adviceObj=args[3];ao.adviceFunc=args[4];ao.aroundFunc=args[5];ao.aroundObj=dj_global;break;default: ao.srcObj=args[1];ao.srcFunc=args[2];ao.adviceObj=args[3];ao.adviceFunc=args[4];ao.aroundObj=args[5];ao.aroundFunc=args[6];ao.once=args[7];ao.delay=args[8];ao.rate=args[9];ao.adviceMsg=args[10];ao.maxCalls=(!isNaN(parseInt(args[11])))?args[11]:-1;break;}if(dl.isFunction(ao.aroundFunc)){var _320=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,_31d);ao.aroundFunc=_320;}if(dl.isFunction(ao.srcFunc)){ao.srcFunc=dl.getNameInObj(ao.srcObj,ao.srcFunc);}if(dl.isFunction(ao.adviceFunc)){ao.adviceFunc=dl.getNameInObj(ao.adviceObj,ao.adviceFunc);}if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){ao.aroundFunc=dl.getNameInObj(ao.aroundObj,ao.aroundFunc);}if(!ao.srcObj){dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc);}if(!ao.adviceObj){dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc);}if(!ao.adviceFunc){dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc);dojo.debugShallow(ao);}return ao;}this.connect=function(){if(arguments.length==1){var ao=arguments[0];}else{var ao=interpolateArgs(arguments,true);}if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){if(dojo.render.html.ie){ao.srcFunc="onkeydown";this.connect(ao);}ao.srcFunc="onkeypress";}if(dojo.lang.isArray(ao.srcObj)&&ao.srcObj!==""){var _322={};for(var x in ao){_322[x]=ao[x];}var mjps=[];dojo.lang.forEach(ao.srcObj,function(src){if((dojo.render.html.capable)&&(dojo.lang.isString(src))){src=dojo.byId(src);}_322.srcObj=src;mjps.push(dojo.event.connect.call(dojo.event,_322));});return mjps;}var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc);if(ao.adviceFunc){var mjp2=dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj,ao.adviceFunc);}mjp.kwAddAdvice(ao);return mjp;};this.log=function(a1,a2){var _32a;if((arguments.length==1)&&(typeof a1=="object")){_32a=a1;}else{_32a={srcObj:a1,srcFunc:a2};}_32a.adviceFunc=function(){var _32b=[];for(var x=0;x<arguments.length;x++){_32b.push(arguments[x]);}dojo.debug("("+_32a.srcObj+")."+_32a.srcFunc,":",_32b.join(", "));};this.kwConnect(_32a);};this.connectBefore=function(){var args=["before"];for(var i=0;i<arguments.length;i++){args.push(arguments[i]);}return this.connect.apply(this,args);};this.connectAround=function(){var args=["around"];for(var i=0;i<arguments.length;i++){args.push(arguments[i]);}return this.connect.apply(this,args);};this.connectOnce=function(){var ao=interpolateArgs(arguments,true);ao.once=true;return this.connect(ao);};this.connectRunOnce=function(){var ao=interpolateArgs(arguments,true);ao.maxCalls=1;return this.connect(ao);};this._kwConnectImpl=function(_333,_334){var fn=(_334)?"disconnect":"connect";if(typeof _333["srcFunc"]=="function"){_333.srcObj=_333["srcObj"]||dj_global;var _336=dojo.lang.nameAnonFunc(_333.srcFunc,_333.srcObj,true);_333.srcFunc=_336;}if(typeof _333["adviceFunc"]=="function"){_333.adviceObj=_333["adviceObj"]||dj_global;var _336=dojo.lang.nameAnonFunc(_333.adviceFunc,_333.adviceObj,true);_333.adviceFunc=_336;}_333.srcObj=_333["srcObj"]||dj_global;_333.adviceObj=_333["adviceObj"]||_333["targetObj"]||dj_global;_333.adviceFunc=_333["adviceFunc"]||_333["targetFunc"];return dojo.event[fn](_333);};this.kwConnect=function(_337){return this._kwConnectImpl(_337,false);};this.disconnect=function(){if(arguments.length==1){var ao=arguments[0];}else{var ao=interpolateArgs(arguments,true);}if(!ao.adviceFunc){return;}if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){if(dojo.render.html.ie){ao.srcFunc="onkeydown";this.disconnect(ao);}ao.srcFunc="onkeypress";}if(!ao.srcObj[ao.srcFunc]){return null;}var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc,true);mjp.removeAdvice(ao.adviceObj,ao.adviceFunc,ao.adviceType,ao.once);return mjp;};this.kwDisconnect=function(_33a){return this._kwConnectImpl(_33a,true);};};dojo.event.MethodInvocation=function(_33b,obj,args){this.jp_=_33b;this.object=obj;this.args=[];for(var x=0;x<args.length;x++){this.args[x]=args[x];}this.around_index=-1;};dojo.event.MethodInvocation.prototype.proceed=function(){this.around_index++;if(this.around_index>=this.jp_.around.length){return this.jp_.object[this.jp_.methodname].apply(this.jp_.object,this.args);}else{var ti=this.jp_.around[this.around_index];var mobj=ti[0]||dj_global;var meth=ti[1];return mobj[meth].call(mobj,this);}};dojo.event.MethodJoinPoint=function(obj,_343){this.object=obj||dj_global;this.methodname=_343;this.methodfunc=this.object[_343];};dojo.event.MethodJoinPoint.getForMethod=function(obj,_345){if(!obj){obj=dj_global;}var ofn=obj[_345];if(!ofn){ofn=obj[_345]=function(){};if(!obj[_345]){dojo.raise("Cannot set do-nothing method on that object "+_345);}}else{if((typeof ofn!="function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){return null;}}var _347=_345+"$joinpoint";var _348=_345+"$joinpoint$method";var _349=obj[_347];if(!_349){var _34a=false;if(dojo.event["browser"]){if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){_34a=true;dojo.event.browser.addClobberNodeAttrs(obj,[_347,_348,_345]);}}var _34b=ofn.length;obj[_348]=ofn;_349=obj[_347]=new dojo.event.MethodJoinPoint(obj,_348);if(!_34a){obj[_345]=function(){return _349.run.apply(_349,arguments);};}else{obj[_345]=function(){var args=[];if(!arguments.length){var evt=null;try{if(obj.ownerDocument){evt=obj.ownerDocument.parentWindow.event;}else{if(obj.documentElement){evt=obj.documentElement.ownerDocument.parentWindow.event;}else{if(obj.event){evt=obj.event;}else{evt=window.event;}}}}catch(e){evt=window.event;}if(evt){args.push(dojo.event.browser.fixEvent(evt,this));}}else{for(var x=0;x<arguments.length;x++){if((x==0)&&(dojo.event.browser.isEvent(arguments[x]))){args.push(dojo.event.browser.fixEvent(arguments[x],this));}else{args.push(arguments[x]);}}}return _349.run.apply(_349,args);};}obj[_345].__preJoinArity=_34b;}return _349;};dojo.lang.extend(dojo.event.MethodJoinPoint,{squelch:false,unintercept:function(){this.object[this.methodname]=this.methodfunc;this.before=[];this.after=[];this.around=[];},disconnect:dojo.lang.forward("unintercept"),run:function(){var obj=this.object||dj_global;var args=arguments;var _351=[];for(var x=0;x<args.length;x++){_351[x]=args[x];}var _353=function(marr){if(!marr){dojo.debug("Null argument to unrollAdvice()");return;}var _355=marr[0]||dj_global;var _356=marr[1];if(!_355[_356]){dojo.raise("function \""+_356+"\" does not exist on \""+_355+"\"");}var _357=marr[2]||dj_global;var _358=marr[3];var msg=marr[6];var _35a=marr[7];if(_35a>-1){if(_35a==0){return;}marr[7]--;}var _35b;var to={args:[],jp_:this,object:obj,proceed:function(){return _355[_356].apply(_355,to.args);}};to.args=_351;var _35d=parseInt(marr[4]);var _35e=((!isNaN(_35d))&&(marr[4]!==null)&&(typeof marr[4]!="undefined"));if(marr[5]){var rate=parseInt(marr[5]);var cur=new Date();var _361=false;if((marr["last"])&&((cur-marr.last)<=rate)){if(dojo.event._canTimeout){if(marr["delayTimer"]){clearTimeout(marr.delayTimer);}var tod=parseInt(rate*2);var mcpy=dojo.lang.shallowCopy(marr);marr.delayTimer=setTimeout(function(){mcpy[5]=0;_353(mcpy);},tod);}return;}else{marr.last=cur;}}if(_358){_357[_358].call(_357,to);}else{if((_35e)&&((dojo.render.html)||(dojo.render.svg))){dj_global["setTimeout"](function(){if(msg){_355[_356].call(_355,to);}else{_355[_356].apply(_355,args);}},_35d);}else{if(msg){_355[_356].call(_355,to);}else{_355[_356].apply(_355,args);}}}};var _364=function(){if(this.squelch){try{return _353.apply(this,arguments);}catch(e){dojo.debug(e);}}else{return _353.apply(this,arguments);}};if((this["before"])&&(this.before.length>0)){dojo.lang.forEach(this.before.concat(new Array()),_364);}var _365;try{if((this["around"])&&(this.around.length>0)){var mi=new dojo.event.MethodInvocation(this,obj,args);_365=mi.proceed();}else{if(this.methodfunc){_365=this.object[this.methodname].apply(this.object,args);}}}catch(e){if(!this.squelch){dojo.debug(e,"when calling",this.methodname,"on",this.object,"with arguments",args);dojo.raise(e);}}if((this["after"])&&(this.after.length>0)){dojo.lang.forEach(this.after.concat(new Array()),_364);}return (this.methodfunc)?_365:null;},getArr:function(kind){var type="after";if((typeof kind=="string")&&(kind.indexOf("before")!=-1)){type="before";}else{if(kind=="around"){type="around";}}if(!this[type]){this[type]=[];}return this[type];},kwAddAdvice:function(args){this.addAdvice(args["adviceObj"],args["adviceFunc"],args["aroundObj"],args["aroundFunc"],args["adviceType"],args["precedence"],args["once"],args["delay"],args["rate"],args["adviceMsg"],args["maxCalls"]);},addAdvice:function(_36a,_36b,_36c,_36d,_36e,_36f,once,_371,rate,_373,_374){var arr=this.getArr(_36e);if(!arr){dojo.raise("bad this: "+this);}var ao=[_36a,_36b,_36c,_36d,_371,rate,_373,_374];if(once){if(this.hasAdvice(_36a,_36b,_36e,arr)>=0){return;}}if(_36f=="first"){arr.unshift(ao);}else{arr.push(ao);}},hasAdvice:function(_377,_378,_379,arr){if(!arr){arr=this.getArr(_379);}var ind=-1;for(var x=0;x<arr.length;x++){var aao=(typeof _378=="object")?(new String(_378)).toString():_378;var a1o=(typeof arr[x][1]=="object")?(new String(arr[x][1])).toString():arr[x][1];if((arr[x][0]==_377)&&(a1o==aao)){ind=x;}}return ind;},removeAdvice:function(_37f,_380,_381,once){var arr=this.getArr(_381);var ind=this.hasAdvice(_37f,_380,_381,arr);if(ind==-1){return false;}while(ind!=-1){arr.splice(ind,1);if(once){break;}ind=this.hasAdvice(_37f,_380,_381,arr);}return true;}});dojo.provide("dojo.event.topic");dojo.event.topic=new function(){this.topics={};this.getTopic=function(_385){if(!this.topics[_385]){this.topics[_385]=new this.TopicImpl(_385);}return this.topics[_385];};this.registerPublisher=function(_386,obj,_388){var _386=this.getTopic(_386);_386.registerPublisher(obj,_388);};this.subscribe=function(_389,obj,_38b){var _389=this.getTopic(_389);_389.subscribe(obj,_38b);};this.unsubscribe=function(_38c,obj,_38e){var _38c=this.getTopic(_38c);_38c.unsubscribe(obj,_38e);};this.destroy=function(_38f){this.getTopic(_38f).destroy();delete this.topics[_38f];};this.publishApply=function(_390,args){var _390=this.getTopic(_390);_390.sendMessage.apply(_390,args);};this.publish=function(_392,_393){var _392=this.getTopic(_392);var args=[];for(var x=1;x<arguments.length;x++){args.push(arguments[x]);}_392.sendMessage.apply(_392,args);};};dojo.event.topic.TopicImpl=function(_396){this.topicName=_396;this.subscribe=function(_397,_398){var tf=_398||_397;var to=(!_398)?dj_global:_397;return dojo.event.kwConnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});};this.unsubscribe=function(_39b,_39c){var tf=(!_39c)?_39b:_39c;var to=(!_39c)?null:_39b;return dojo.event.kwDisconnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});};this._getJoinPoint=function(){return dojo.event.MethodJoinPoint.getForMethod(this,"sendMessage");};this.setSquelch=function(_39f){this._getJoinPoint().squelch=_39f;};this.destroy=function(){this._getJoinPoint().disconnect();};this.registerPublisher=function(_3a0,_3a1){dojo.event.connect(_3a0,_3a1,this,"sendMessage");};this.sendMessage=function(_3a2){};};dojo.provide("dojo.event.browser");dojo._ie_clobber=new function(){this.clobberNodes=[];function nukeProp(node,prop){try{node[prop]=null;}catch(e){}try{delete node[prop];}catch(e){}try{node.removeAttribute(prop);}catch(e){}}this.clobber=function(_3a5){var na;var tna;if(_3a5){tna=_3a5.all||_3a5.getElementsByTagName("*");na=[_3a5];for(var x=0;x<tna.length;x++){if(tna[x]["__doClobber__"]){na.push(tna[x]);}}}else{try{window.onload=null;}catch(e){}na=(this.clobberNodes.length)?this.clobberNodes:document.all;}tna=null;var _3a9={};for(var i=na.length-1;i>=0;i=i-1){var el=na[i];try{if(el&&el["__clobberAttrs__"]){for(var j=0;j<el.__clobberAttrs__.length;j++){nukeProp(el,el.__clobberAttrs__[j]);}nukeProp(el,"__clobberAttrs__");nukeProp(el,"__doClobber__");}}catch(e){}}na=null;};};if(dojo.render.html.ie){dojo.addOnUnload(function(){dojo._ie_clobber.clobber();try{if((dojo["widget"])&&(dojo.widget["manager"])){dojo.widget.manager.destroyAll();}}catch(e){}if(dojo.widget){for(var name in dojo.widget._templateCache){if(dojo.widget._templateCache[name].node){dojo.dom.destroyNode(dojo.widget._templateCache[name].node);dojo.widget._templateCache[name].node=null;delete dojo.widget._templateCache[name].node;}}}try{window.onload=null;}catch(e){}try{window.onunload=null;}catch(e){}dojo._ie_clobber.clobberNodes=[];});}dojo.event.browser=new function(){var _3ae=0;this.normalizedEventName=function(_3af){switch(_3af){case "CheckboxStateChange": case "DOMAttrModified": case "DOMMenuItemActive": case "DOMMenuItemInactive": case "DOMMouseScroll": case "DOMNodeInserted": case "DOMNodeRemoved": case "RadioStateChange": return _3af;break;default: var lcn=_3af.toLowerCase();return (lcn.indexOf("on")==0)?lcn.substr(2):lcn;break;}};this.clean=function(node){if(dojo.render.html.ie){dojo._ie_clobber.clobber(node);}};this.addClobberNode=function(node){if(!dojo.render.html.ie){return;}if(!node["__doClobber__"]){node.__doClobber__=true;dojo._ie_clobber.clobberNodes.push(node);node.__clobberAttrs__=[];}};this.addClobberNodeAttrs=function(node,_3b4){if(!dojo.render.html.ie){return;}this.addClobberNode(node);for(var x=0;x<_3b4.length;x++){node.__clobberAttrs__.push(_3b4[x]);}};this.removeListener=function(node,_3b7,fp,_3b9){if(!_3b9){var _3b9=false;}_3b7=dojo.event.browser.normalizedEventName(_3b7);if(_3b7=="key"){if(dojo.render.html.ie){this.removeListener(node,"onkeydown",fp,_3b9);}_3b7="keypress";}if(node.removeEventListener){node.removeEventListener(_3b7,fp,_3b9);}};this.addListener=function(node,_3bb,fp,_3bd,_3be){if(!node){return;}if(!_3bd){var _3bd=false;}_3bb=dojo.event.browser.normalizedEventName(_3bb);if(_3bb=="key"){if(dojo.render.html.ie){this.addListener(node,"onkeydown",fp,_3bd,_3be);}_3bb="onkeypress";}if(!_3be){var _3bf=function(evt){if(!evt){evt=window.event;}var ret=fp(dojo.event.browser.fixEvent(evt,this));if(_3bd){dojo.event.browser.stopEvent(evt);}return ret;};}else{_3bf=fp;}if(node.addEventListener){node.addEventListener(_3bb,_3bf,_3bd);return _3bf;}else{_3bb="on"+_3bb;if(typeof node[_3bb]=="function"){var _3c2=node[_3bb];node[_3bb]=function(e){_3c2(e);return _3bf(e);};}else{node[_3bb]=_3bf;}if(dojo.render.html.ie){this.addClobberNodeAttrs(node,[_3bb]);}return _3bf;}};this.isEvent=function(obj){return (typeof obj!="undefined")&&(obj)&&(typeof Event!="undefined")&&(obj.eventPhase);};this.currentEvent=null;this.callListener=function(_3c5,_3c6){if(typeof _3c5!="function"){dojo.raise("listener not a function: "+_3c5);}dojo.event.browser.currentEvent.currentTarget=_3c6;return _3c5.call(_3c6,dojo.event.browser.currentEvent);};this._stopPropagation=function(){dojo.event.browser.currentEvent.cancelBubble=true;};this._preventDefault=function(){dojo.event.browser.currentEvent.returnValue=false;};this.keys={KEY_BACKSPACE:8,KEY_TAB:9,KEY_CLEAR:12,KEY_ENTER:13,KEY_SHIFT:16,KEY_CTRL:17,KEY_ALT:18,KEY_PAUSE:19,KEY_CAPS_LOCK:20,KEY_ESCAPE:27,KEY_SPACE:32,KEY_PAGE_UP:33,KEY_PAGE_DOWN:34,KEY_END:35,KEY_HOME:36,KEY_LEFT_ARROW:37,KEY_UP_ARROW:38,KEY_RIGHT_ARROW:39,KEY_DOWN_ARROW:40,KEY_INSERT:45,KEY_DELETE:46,KEY_HELP:47,KEY_LEFT_WINDOW:91,KEY_RIGHT_WINDOW:92,KEY_SELECT:93,KEY_NUMPAD_0:96,KEY_NUMPAD_1:97,KEY_NUMPAD_2:98,KEY_NUMPAD_3:99,KEY_NUMPAD_4:100,KEY_NUMPAD_5:101,KEY_NUMPAD_6:102,KEY_NUMPAD_7:103,KEY_NUMPAD_8:104,KEY_NUMPAD_9:105,KEY_NUMPAD_MULTIPLY:106,KEY_NUMPAD_PLUS:107,KEY_NUMPAD_ENTER:108,KEY_NUMPAD_MINUS:109,KEY_NUMPAD_PERIOD:110,KEY_NUMPAD_DIVIDE:111,KEY_F1:112,KEY_F2:113,KEY_F3:114,KEY_F4:115,KEY_F5:116,KEY_F6:117,KEY_F7:118,KEY_F8:119,KEY_F9:120,KEY_F10:121,KEY_F11:122,KEY_F12:123,KEY_F13:124,KEY_F14:125,KEY_F15:126,KEY_NUM_LOCK:144,KEY_SCROLL_LOCK:145};this.revKeys=[];for(var key in this.keys){this.revKeys[this.keys[key]]=key;}this.fixEvent=function(evt,_3c9){if(!evt){if(window["event"]){evt=window.event;}}if((evt["type"])&&(evt["type"].indexOf("key")==0)){evt.keys=this.revKeys;for(var key in this.keys){evt[key]=this.keys[key];}if(evt["type"]=="keydown"&&dojo.render.html.ie){switch(evt.keyCode){case evt.KEY_SHIFT: case evt.KEY_CTRL: case evt.KEY_ALT: case evt.KEY_CAPS_LOCK: case evt.KEY_LEFT_WINDOW: case evt.KEY_RIGHT_WINDOW: case evt.KEY_SELECT: case evt.KEY_NUM_LOCK: case evt.KEY_SCROLL_LOCK: case evt.KEY_NUMPAD_0: case evt.KEY_NUMPAD_1: case evt.KEY_NUMPAD_2: case evt.KEY_NUMPAD_3: case evt.KEY_NUMPAD_4: case evt.KEY_NUMPAD_5: case evt.KEY_NUMPAD_6: case evt.KEY_NUMPAD_7: case evt.KEY_NUMPAD_8: case evt.KEY_NUMPAD_9: case evt.KEY_NUMPAD_PERIOD: break;case evt.KEY_NUMPAD_MULTIPLY: case evt.KEY_NUMPAD_PLUS: case evt.KEY_NUMPAD_ENTER: case evt.KEY_NUMPAD_MINUS: case evt.KEY_NUMPAD_DIVIDE: break;case evt.KEY_PAUSE: case evt.KEY_TAB: case evt.KEY_BACKSPACE: case evt.KEY_ENTER: case evt.KEY_ESCAPE: case evt.KEY_PAGE_UP: case evt.KEY_PAGE_DOWN: case evt.KEY_END: case evt.KEY_HOME: case evt.KEY_LEFT_ARROW: case evt.KEY_UP_ARROW: case evt.KEY_RIGHT_ARROW: case evt.KEY_DOWN_ARROW: case evt.KEY_INSERT: case evt.KEY_DELETE: case evt.KEY_F1: case evt.KEY_F2: case evt.KEY_F3: case evt.KEY_F4: case evt.KEY_F5: case evt.KEY_F6: case evt.KEY_F7: case evt.KEY_F8: case evt.KEY_F9: case evt.KEY_F10: case evt.KEY_F11: case evt.KEY_F12: case evt.KEY_F12: case evt.KEY_F13: case evt.KEY_F14: case evt.KEY_F15: case evt.KEY_CLEAR: case evt.KEY_HELP: evt.key=evt.keyCode;break;default: if(evt.ctrlKey||evt.altKey){var _3cb=evt.keyCode;if(_3cb>=65&&_3cb<=90&&evt.shiftKey==false){_3cb+=32;}if(_3cb>=1&&_3cb<=26&&evt.ctrlKey){_3cb+=96;}evt.key=String.fromCharCode(_3cb);}}}else{if(evt["type"]=="keypress"){if(dojo.render.html.opera){if(evt.which==0){evt.key=evt.keyCode;}else{if(evt.which>0){switch(evt.which){case evt.KEY_SHIFT: case evt.KEY_CTRL: case evt.KEY_ALT: case evt.KEY_CAPS_LOCK: case evt.KEY_NUM_LOCK: case evt.KEY_SCROLL_LOCK: break;case evt.KEY_PAUSE: case evt.KEY_TAB: case evt.KEY_BACKSPACE: case evt.KEY_ENTER: case evt.KEY_ESCAPE: evt.key=evt.which;break;default: var _3cb=evt.which;if((evt.ctrlKey||evt.altKey||evt.metaKey)&&(evt.which>=65&&evt.which<=90&&evt.shiftKey==false)){_3cb+=32;}evt.key=String.fromCharCode(_3cb);}}}}else{if(dojo.render.html.ie){if(!evt.ctrlKey&&!evt.altKey&&evt.keyCode>=evt.KEY_SPACE){evt.key=String.fromCharCode(evt.keyCode);}}else{if(dojo.render.html.safari){switch(evt.keyCode){case 25: evt.key=evt.KEY_TAB;evt.shift=true;break;case 63232: evt.key=evt.KEY_UP_ARROW;break;case 63233: evt.key=evt.KEY_DOWN_ARROW;break;case 63234: evt.key=evt.KEY_LEFT_ARROW;break;case 63235: evt.key=evt.KEY_RIGHT_ARROW;break;case 63236: evt.key=evt.KEY_F1;break;case 63237: evt.key=evt.KEY_F2;break;case 63238: evt.key=evt.KEY_F3;break;case 63239: evt.key=evt.KEY_F4;break;case 63240: evt.key=evt.KEY_F5;break;case 63241: evt.key=evt.KEY_F6;break;case 63242: evt.key=evt.KEY_F7;break;case 63243: evt.key=evt.KEY_F8;break;case 63244: evt.key=evt.KEY_F9;break;case 63245: evt.key=evt.KEY_F10;break;case 63246: evt.key=evt.KEY_F11;break;case 63247: evt.key=evt.KEY_F12;break;case 63250: evt.key=evt.KEY_PAUSE;break;case 63272: evt.key=evt.KEY_DELETE;break;case 63273: evt.key=evt.KEY_HOME;break;case 63275: evt.key=evt.KEY_END;break;case 63276: evt.key=evt.KEY_PAGE_UP;break;case 63277: evt.key=evt.KEY_PAGE_DOWN;break;case 63302: evt.key=evt.KEY_INSERT;break;case 63248: case 63249: case 63289: break;default: evt.key=evt.charCode>=evt.KEY_SPACE?String.fromCharCode(evt.charCode):evt.keyCode;}}else{evt.key=evt.charCode>0?String.fromCharCode(evt.charCode):evt.keyCode;}}}}}}if(dojo.render.html.ie){if(!evt.target){evt.target=evt.srcElement;}if(!evt.currentTarget){evt.currentTarget=(_3c9?_3c9:evt.srcElement);}if(!evt.layerX){evt.layerX=evt.offsetX;}if(!evt.layerY){evt.layerY=evt.offsetY;}var doc=(evt.srcElement&&evt.srcElement.ownerDocument)?evt.srcElement.ownerDocument:document;var _3cd=((dojo.render.html.ie55)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;if(!evt.pageX){evt.pageX=evt.clientX+(_3cd.scrollLeft||0);}if(!evt.pageY){evt.pageY=evt.clientY+(_3cd.scrollTop||0);}if(evt.type=="mouseover"){evt.relatedTarget=evt.fromElement;}if(evt.type=="mouseout"){evt.relatedTarget=evt.toElement;}this.currentEvent=evt;evt.callListener=this.callListener;evt.stopPropagation=this._stopPropagation;evt.preventDefault=this._preventDefault;}return evt;};this.stopEvent=function(evt){if(window.event){evt.cancelBubble=true;evt.returnValue=false;}else{evt.preventDefault();evt.stopPropagation();}};};dojo.provide("dojo.event.*");dojo.provide("dojo.gfx.color");dojo.gfx.color.Color=function(r,g,b,a){if(dojo.lang.isArray(r)){this.r=r[0];this.g=r[1];this.b=r[2];this.a=r[3]||1;}else{if(dojo.lang.isString(r)){var rgb=dojo.gfx.color.extractRGB(r);this.r=rgb[0];this.g=rgb[1];this.b=rgb[2];this.a=g||1;}else{if(r instanceof dojo.gfx.color.Color){this.r=r.r;this.b=r.b;this.g=r.g;this.a=r.a;}else{this.r=r;this.g=g;this.b=b;this.a=a;}}}};dojo.gfx.color.Color.fromArray=function(arr){return new dojo.gfx.color.Color(arr[0],arr[1],arr[2],arr[3]);};dojo.extend(dojo.gfx.color.Color,{toRgb:function(_3d5){if(_3d5){return this.toRgba();}else{return [this.r,this.g,this.b];}},toRgba:function(){return [this.r,this.g,this.b,this.a];},toHex:function(){return dojo.gfx.color.rgb2hex(this.toRgb());},toCss:function(){return "rgb("+this.toRgb().join()+")";},toString:function(){return this.toHex();},blend:function(_3d6,_3d7){var rgb=null;if(dojo.lang.isArray(_3d6)){rgb=_3d6;}else{if(_3d6 instanceof dojo.gfx.color.Color){rgb=_3d6.toRgb();}else{rgb=new dojo.gfx.color.Color(_3d6).toRgb();}}return dojo.gfx.color.blend(this.toRgb(),rgb,_3d7);}});dojo.gfx.color.named={white:[255,255,255],black:[0,0,0],red:[255,0,0],green:[0,255,0],lime:[0,255,0],blue:[0,0,255],navy:[0,0,128],gray:[128,128,128],silver:[192,192,192]};dojo.gfx.color.blend=function(a,b,_3db){if(typeof a=="string"){return dojo.gfx.color.blendHex(a,b,_3db);}if(!_3db){_3db=0;}_3db=Math.min(Math.max(-1,_3db),1);_3db=((_3db+1)/2);var c=[];for(var x=0;x<3;x++){c[x]=parseInt(b[x]+((a[x]-b[x])*_3db));}return c;};dojo.gfx.color.blendHex=function(a,b,_3e0){return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a),dojo.gfx.color.hex2rgb(b),_3e0));};dojo.gfx.color.extractRGB=function(_3e1){_3e1=_3e1.toLowerCase();if(_3e1.indexOf("rgb")==0){var _3e2=_3e1.match(/rgba*\((\d+), *(\d+), *(\d+)/i);var ret=_3e2.splice(1,3);return ret;}else{var _3e4=dojo.gfx.color.hex2rgb(_3e1);if(_3e4){return _3e4;}else{return dojo.gfx.color.named[_3e1]||[255,255,255];}}};dojo.gfx.color.hex2rgb=function(hex){var _3e6="0123456789ABCDEF";var rgb=new Array(3);if(hex.indexOf("#")==0){hex=hex.substring(1);}hex=hex.toUpperCase();if(hex.replace(new RegExp("["+_3e6+"]","g"),"")!=""){return null;}if(hex.length==3){rgb[0]=hex.charAt(0)+hex.charAt(0);rgb[1]=hex.charAt(1)+hex.charAt(1);rgb[2]=hex.charAt(2)+hex.charAt(2);}else{rgb[0]=hex.substring(0,2);rgb[1]=hex.substring(2,4);rgb[2]=hex.substring(4);}for(var i=0;i<rgb.length;i++){rgb[i]=_3e6.indexOf(rgb[i].charAt(0))*16+_3e6.indexOf(rgb[i].charAt(1));}return rgb;};dojo.gfx.color.rgb2hex=function(r,g,b){if(dojo.lang.isArray(r)){g=r[1]||0;b=r[2]||0;r=r[0]||0;}var ret=dojo.lang.map([r,g,b],function(x){x=new Number(x);var s=x.toString(16);while(s.length<2){s="0"+s;}return s;});ret.unshift("#");return ret.join("");};dojo.provide("dojo.lfx.Animation");dojo.lfx.Line=function(_3ef,end){this.start=_3ef;this.end=end;if(dojo.lang.isArray(_3ef)){var diff=[];dojo.lang.forEach(this.start,function(s,i){diff[i]=this.end[i]-s;},this);this.getValue=function(n){var res=[];dojo.lang.forEach(this.start,function(s,i){res[i]=(diff[i]*n)+s;},this);return res;};}else{var diff=end-_3ef;this.getValue=function(n){return (diff*n)+this.start;};}};dojo.lfx.easeDefault=function(n){if(dojo.render.html.khtml){return (parseFloat("0.5")+((Math.sin((n+parseFloat("1.5"))*Math.PI))/2));}else{return (0.5+((Math.sin((n+1.5)*Math.PI))/2));}};dojo.lfx.easeIn=function(n){return Math.pow(n,3);};dojo.lfx.easeOut=function(n){return (1-Math.pow(1-n,3));};dojo.lfx.easeInOut=function(n){return ((3*Math.pow(n,2))-(2*Math.pow(n,3)));};dojo.lfx.IAnimation=function(){};dojo.lang.extend(dojo.lfx.IAnimation,{curve:null,duration:1000,easing:null,repeatCount:0,rate:25,handler:null,beforeBegin:null,onBegin:null,onAnimate:null,onEnd:null,onPlay:null,onPause:null,onStop:null,play:null,pause:null,stop:null,connect:function(evt,_3fe,_3ff){if(!_3ff){_3ff=_3fe;_3fe=this;}_3ff=dojo.lang.hitch(_3fe,_3ff);var _400=this[evt]||function(){};this[evt]=function(){var ret=_400.apply(this,arguments);_3ff.apply(this,arguments);return ret;};return this;},fire:function(evt,args){if(this[evt]){this[evt].apply(this,(args||[]));}return this;},repeat:function(_404){this.repeatCount=_404;return this;},_active:false,_paused:false});dojo.lfx.Animation=function(_405,_406,_407,_408,_409,rate){dojo.lfx.IAnimation.call(this);if(dojo.lang.isNumber(_405)||(!_405&&_406.getValue)){rate=_409;_409=_408;_408=_407;_407=_406;_406=_405;_405=null;}else{if(_405.getValue||dojo.lang.isArray(_405)){rate=_408;_409=_407;_408=_406;_407=_405;_406=null;_405=null;}}if(dojo.lang.isArray(_407)){this.curve=new dojo.lfx.Line(_407[0],_407[1]);}else{this.curve=_407;}if(_406!=null&&_406>0){this.duration=_406;}if(_409){this.repeatCount=_409;}if(rate){this.rate=rate;}if(_405){dojo.lang.forEach(["handler","beforeBegin","onBegin","onEnd","onPlay","onStop","onAnimate"],function(item){if(_405[item]){this.connect(item,_405[item]);}},this);}if(_408&&dojo.lang.isFunction(_408)){this.easing=_408;}};dojo.inherits(dojo.lfx.Animation,dojo.lfx.IAnimation);dojo.lang.extend(dojo.lfx.Animation,{_startTime:null,_endTime:null,_timer:null,_percent:0,_startRepeatCount:0,play:function(_40c,_40d){if(_40d){clearTimeout(this._timer);this._active=false;this._paused=false;this._percent=0;}else{if(this._active&&!this._paused){return this;}}this.fire("handler",["beforeBegin"]);this.fire("beforeBegin");if(_40c>0){setTimeout(dojo.lang.hitch(this,function(){this.play(null,_40d);}),_40c);return this;}this._startTime=new Date().valueOf();if(this._paused){this._startTime-=(this.duration*this._percent/100);}this._endTime=this._startTime+this.duration;this._active=true;this._paused=false;var step=this._percent/100;var _40f=this.curve.getValue(step);if(this._percent==0){if(!this._startRepeatCount){this._startRepeatCount=this.repeatCount;}this.fire("handler",["begin",_40f]);this.fire("onBegin",[_40f]);}this.fire("handler",["play",_40f]);this.fire("onPlay",[_40f]);this._cycle();return this;},pause:function(){clearTimeout(this._timer);if(!this._active){return this;}this._paused=true;var _410=this.curve.getValue(this._percent/100);this.fire("handler",["pause",_410]);this.fire("onPause",[_410]);return this;},gotoPercent:function(pct,_412){clearTimeout(this._timer);this._active=true;this._paused=true;this._percent=pct;if(_412){this.play();}return this;},stop:function(_413){clearTimeout(this._timer);var step=this._percent/100;if(_413){step=1;}var _415=this.curve.getValue(step);this.fire("handler",["stop",_415]);this.fire("onStop",[_415]);this._active=false;this._paused=false;return this;},status:function(){if(this._active){return this._paused?"paused":"playing";}else{return "stopped";}return this;},_cycle:function(){clearTimeout(this._timer);if(this._active){var curr=new Date().valueOf();var step=(curr-this._startTime)/(this._endTime-this._startTime);if(step>=1){step=1;this._percent=100;}else{this._percent=step*100;}if((this.easing)&&(dojo.lang.isFunction(this.easing))){step=this.easing(step);}var _418=this.curve.getValue(step);this.fire("handler",["animate",_418]);this.fire("onAnimate",[_418]);if(step<1){this._timer=setTimeout(dojo.lang.hitch(this,"_cycle"),this.rate);}else{this._active=false;this.fire("handler",["end"]);this.fire("onEnd");if(this.repeatCount>0){this.repeatCount--;this.play(null,true);}else{if(this.repeatCount==-1){this.play(null,true);}else{if(this._startRepeatCount){this.repeatCount=this._startRepeatCount;this._startRepeatCount=0;}}}}}return this;}});dojo.lfx.Combine=function(_419){dojo.lfx.IAnimation.call(this);this._anims=[];this._animsEnded=0;var _41a=arguments;if(_41a.length==1&&(dojo.lang.isArray(_41a[0])||dojo.lang.isArrayLike(_41a[0]))){_41a=_41a[0];}dojo.lang.forEach(_41a,function(anim){this._anims.push(anim);anim.connect("onEnd",dojo.lang.hitch(this,"_onAnimsEnded"));},this);};dojo.inherits(dojo.lfx.Combine,dojo.lfx.IAnimation);dojo.lang.extend(dojo.lfx.Combine,{_animsEnded:0,play:function(_41c,_41d){if(!this._anims.length){return this;}this.fire("beforeBegin");if(_41c>0){setTimeout(dojo.lang.hitch(this,function(){this.play(null,_41d);}),_41c);return this;}if(_41d||this._anims[0].percent==0){this.fire("onBegin");}this.fire("onPlay");this._animsCall("play",null,_41d);return this;},pause:function(){this.fire("onPause");this._animsCall("pause");return this;},stop:function(_41e){this.fire("onStop");this._animsCall("stop",_41e);return this;},_onAnimsEnded:function(){this._animsEnded++;if(this._animsEnded>=this._anims.length){this.fire("onEnd");}return this;},_animsCall:function(_41f){var args=[];if(arguments.length>1){for(var i=1;i<arguments.length;i++){args.push(arguments[i]);}}var _422=this;dojo.lang.forEach(this._anims,function(anim){anim[_41f](args);},_422);return this;}});dojo.lfx.Chain=function(_424){dojo.lfx.IAnimation.call(this);this._anims=[];this._currAnim=-1;var _425=arguments;if(_425.length==1&&(dojo.lang.isArray(_425[0])||dojo.lang.isArrayLike(_425[0]))){_425=_425[0];}var _426=this;dojo.lang.forEach(_425,function(anim,i,_429){this._anims.push(anim);if(i<_429.length-1){anim.connect("onEnd",dojo.lang.hitch(this,"_playNext"));}else{anim.connect("onEnd",dojo.lang.hitch(this,function(){this.fire("onEnd");}));}},this);};dojo.inherits(dojo.lfx.Chain,dojo.lfx.IAnimation);dojo.lang.extend(dojo.lfx.Chain,{_currAnim:-1,play:function(_42a,_42b){if(!this._anims.length){return this;}if(_42b||!this._anims[this._currAnim]){this._currAnim=0;}var _42c=this._anims[this._currAnim];this.fire("beforeBegin");if(_42a>0){setTimeout(dojo.lang.hitch(this,function(){this.play(null,_42b);}),_42a);return this;}if(_42c){if(this._currAnim==0){this.fire("handler",["begin",this._currAnim]);this.fire("onBegin",[this._currAnim]);}this.fire("onPlay",[this._currAnim]);_42c.play(null,_42b);}return this;},pause:function(){if(this._anims[this._currAnim]){this._anims[this._currAnim].pause();this.fire("onPause",[this._currAnim]);}return this;},playPause:function(){if(this._anims.length==0){return this;}if(this._currAnim==-1){this._currAnim=0;}var _42d=this._anims[this._currAnim];if(_42d){if(!_42d._active||_42d._paused){this.play();}else{this.pause();}}return this;},stop:function(){var _42e=this._anims[this._currAnim];if(_42e){_42e.stop();this.fire("onStop",[this._currAnim]);}return _42e;},_playNext:function(){if(this._currAnim==-1||this._anims.length==0){return this;}this._currAnim++;if(this._anims[this._currAnim]){this._anims[this._currAnim].play(null,true);}return this;}});dojo.lfx.combine=function(_42f){var _430=arguments;if(dojo.lang.isArray(arguments[0])){_430=arguments[0];}if(_430.length==1){return _430[0];}return new dojo.lfx.Combine(_430);};dojo.lfx.chain=function(_431){var _432=arguments;if(dojo.lang.isArray(arguments[0])){_432=arguments[0];}if(_432.length==1){return _432[0];}return new dojo.lfx.Chain(_432);};dojo.provide("dojo.html.common");dojo.lang.mixin(dojo.html,dojo.dom);dojo.html.getEventTarget=function(evt){if(!evt){evt=dojo.global().event||{};}var t=(evt.srcElement?evt.srcElement:(evt.target?evt.target:null));while((t)&&(t.nodeType!=1)){t=t.parentNode;}return t;};dojo.html.getViewport=function(){var _435=dojo.global();var _436=dojo.doc();var w=0;var h=0;if(dojo.render.html.mozilla){w=_436.documentElement.clientWidth;h=_435.innerHeight;}else{if(!dojo.render.html.opera&&_435.innerWidth){w=_435.innerWidth;h=_435.innerHeight;}else{if(!dojo.render.html.opera&&dojo.exists(_436,"documentElement.clientWidth")){var w2=_436.documentElement.clientWidth;if(!w||w2&&w2<w){w=w2;}h=_436.documentElement.clientHeight;}else{if(dojo.body().clientWidth){w=dojo.body().clientWidth;h=dojo.body().clientHeight;}}}}return {width:w,height:h};};dojo.html.getScroll=function(){var _43a=dojo.global();var _43b=dojo.doc();var top=_43a.pageYOffset||_43b.documentElement.scrollTop||dojo.body().scrollTop||0;var left=_43a.pageXOffset||_43b.documentElement.scrollLeft||dojo.body().scrollLeft||0;return {top:top,left:left,offset:{x:left,y:top}};};dojo.html.getParentByType=function(node,type){var _440=dojo.doc();var _441=dojo.byId(node);type=type.toLowerCase();while((_441)&&(_441.nodeName.toLowerCase()!=type)){if(_441==(_440["body"]||_440["documentElement"])){return null;}_441=_441.parentNode;}return _441;};dojo.html.getAttribute=function(node,attr){node=dojo.byId(node);if((!node)||(!node.getAttribute)){return null;}var ta=typeof attr=="string"?attr:new String(attr);var v=node.getAttribute(ta.toUpperCase());if((v)&&(typeof v=="string")&&(v!="")){return v;}if(v&&v.value){return v.value;}if((node.getAttributeNode)&&(node.getAttributeNode(ta))){return (node.getAttributeNode(ta)).value;}else{if(node.getAttribute(ta)){return node.getAttribute(ta);}else{if(node.getAttribute(ta.toLowerCase())){return node.getAttribute(ta.toLowerCase());}}}return null;};dojo.html.hasAttribute=function(node,attr){return dojo.html.getAttribute(dojo.byId(node),attr)?true:false;};dojo.html.getCursorPosition=function(e){e=e||dojo.global().event;var _449={x:0,y:0};if(e.pageX||e.pageY){_449.x=e.pageX;_449.y=e.pageY;}else{var de=dojo.doc().documentElement;var db=dojo.body();_449.x=e.clientX+((de||db)["scrollLeft"])-((de||db)["clientLeft"]);_449.y=e.clientY+((de||db)["scrollTop"])-((de||db)["clientTop"]);}return _449;};dojo.html.isTag=function(node){node=dojo.byId(node);if(node&&node.tagName){for(var i=1;i<arguments.length;i++){if(node.tagName.toLowerCase()==String(arguments[i]).toLowerCase()){return String(arguments[i]).toLowerCase();}}}return "";};if(dojo.render.html.ie&&!dojo.render.html.ie70){if(window.location.href.substr(0,6).toLowerCase()!="https:"){(function(){var _44e=dojo.doc().createElement("script");_44e.src="javascript:'dojo.html.createExternalElement=function(doc, tag){ return doc.createElement(tag); }'";dojo.doc().getElementsByTagName("head")[0].appendChild(_44e);})();}}else{dojo.html.createExternalElement=function(doc,tag){return doc.createElement(tag);};}dojo.provide("dojo.uri.Uri");dojo.uri=new function(){this.dojoUri=function(uri){return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(),uri);};this.moduleUri=function(_452,uri){var loc=dojo.hostenv.getModuleSymbols(_452).join("/");if(!loc){return null;}if(loc.lastIndexOf("/")!=loc.length-1){loc+="/";}var _455=loc.indexOf(":");var _456=loc.indexOf("/");if(loc.charAt(0)!="/"&&(_455==-1||_455>_456)){loc=dojo.hostenv.getBaseScriptUri()+loc;}return new dojo.uri.Uri(loc,uri);};this.Uri=function(){var uri=arguments[0];for(var i=1;i<arguments.length;i++){if(!arguments[i]){continue;}var _459=new dojo.uri.Uri(arguments[i].toString());var _45a=new dojo.uri.Uri(uri.toString());if((_459.path=="")&&(_459.scheme==null)&&(_459.authority==null)&&(_459.query==null)){if(_459.fragment!=null){_45a.fragment=_459.fragment;}_459=_45a;}else{if(_459.scheme==null){_459.scheme=_45a.scheme;if(_459.authority==null){_459.authority=_45a.authority;if(_459.path.charAt(0)!="/"){var path=_45a.path.substring(0,_45a.path.lastIndexOf("/")+1)+_459.path;var segs=path.split("/");for(var j=0;j<segs.length;j++){if(segs[j]=="."){if(j==segs.length-1){segs[j]="";}else{segs.splice(j,1);j--;}}else{if(j>0&&!(j==1&&segs[0]=="")&&segs[j]==".."&&segs[j-1]!=".."){if(j==segs.length-1){segs.splice(j,1);segs[j-1]="";}else{segs.splice(j-1,2);j-=2;}}}}_459.path=segs.join("/");}}}}uri="";if(_459.scheme!=null){uri+=_459.scheme+":";}if(_459.authority!=null){uri+="//"+_459.authority;}uri+=_459.path;if(_459.query!=null){uri+="?"+_459.query;}if(_459.fragment!=null){uri+="#"+_459.fragment;}}this.uri=uri.toString();var _45e="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";var r=this.uri.match(new RegExp(_45e));this.scheme=r[2]||(r[1]?"":null);this.authority=r[4]||(r[3]?"":null);this.path=r[5];this.query=r[7]||(r[6]?"":null);this.fragment=r[9]||(r[8]?"":null);if(this.authority!=null){_45e="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$";r=this.authority.match(new RegExp(_45e));this.user=r[3]||null;this.password=r[4]||null;this.host=r[5];this.port=r[7]||null;}this.toString=function(){return this.uri;};};};dojo.provide("dojo.html.style");dojo.html.getClass=function(node){node=dojo.byId(node);if(!node){return "";}var cs="";if(node.className){cs=node.className;}else{if(dojo.html.hasAttribute(node,"class")){cs=dojo.html.getAttribute(node,"class");}}return cs.replace(/^\s+|\s+$/g,"");};dojo.html.getClasses=function(node){var c=dojo.html.getClass(node);return (c=="")?[]:c.split(/\s+/g);};dojo.html.hasClass=function(node,_465){return (new RegExp("(^|\\s+)"+_465+"(\\s+|$)")).test(dojo.html.getClass(node));};dojo.html.prependClass=function(node,_467){_467+=" "+dojo.html.getClass(node);return dojo.html.setClass(node,_467);};dojo.html.addClass=function(node,_469){if(dojo.html.hasClass(node,_469)){return false;}_469=(dojo.html.getClass(node)+" "+_469).replace(/^\s+|\s+$/g,"");return dojo.html.setClass(node,_469);};dojo.html.setClass=function(node,_46b){node=dojo.byId(node);var cs=new String(_46b);try{if(typeof node.className=="string"){node.className=cs;}else{if(node.setAttribute){node.setAttribute("class",_46b);node.className=cs;}else{return false;}}}catch(e){dojo.debug("dojo.html.setClass() failed",e);}return true;};dojo.html.removeClass=function(node,_46e,_46f){try{if(!_46f){var _470=dojo.html.getClass(node).replace(new RegExp("(^|\\s+)"+_46e+"(\\s+|$)"),"$1$2");}else{var _470=dojo.html.getClass(node).replace(_46e,"");}dojo.html.setClass(node,_470);}catch(e){dojo.debug("dojo.html.removeClass() failed",e);}return true;};dojo.html.replaceClass=function(node,_472,_473){dojo.html.removeClass(node,_473);dojo.html.addClass(node,_472);};dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2};dojo.html.getElementsByClass=function(_474,_475,_476,_477,_478){_478=false;var _479=dojo.doc();_475=dojo.byId(_475)||_479;var _47a=_474.split(/\s+/g);var _47b=[];if(_477!=1&&_477!=2){_477=0;}var _47c=new RegExp("(\\s|^)(("+_47a.join(")|(")+"))(\\s|$)");var _47d=_47a.join(" ").length;var _47e=[];if(!_478&&_479.evaluate){var _47f=".//"+(_476||"*")+"[contains(";if(_477!=dojo.html.classMatchType.ContainsAny){_47f+="concat(' ',@class,' '), ' "+_47a.join(" ') and contains(concat(' ',@class,' '), ' ")+" ')";if(_477==2){_47f+=" and string-length(@class)="+_47d+"]";}else{_47f+="]";}}else{_47f+="concat(' ',@class,' '), ' "+_47a.join(" ') or contains(concat(' ',@class,' '), ' ")+" ')]";}var _480=_479.evaluate(_47f,_475,null,XPathResult.ANY_TYPE,null);var _481=_480.iterateNext();while(_481){try{_47e.push(_481);_481=_480.iterateNext();}catch(e){break;}}return _47e;}else{if(!_476){_476="*";}_47e=_475.getElementsByTagName(_476);var node,i=0;outer: while(node=_47e[i++]){var _484=dojo.html.getClasses(node);if(_484.length==0){continue outer;}var _485=0;for(var j=0;j<_484.length;j++){if(_47c.test(_484[j])){if(_477==dojo.html.classMatchType.ContainsAny){_47b.push(node);continue outer;}else{_485++;}}else{if(_477==dojo.html.classMatchType.IsOnly){continue outer;}}}if(_485==_47a.length){if((_477==dojo.html.classMatchType.IsOnly)&&(_485==_484.length)){_47b.push(node);}else{if(_477==dojo.html.classMatchType.ContainsAll){_47b.push(node);}}}}return _47b;}};dojo.html.getElementsByClassName=dojo.html.getElementsByClass;dojo.html.toCamelCase=function(_487){var arr=_487.split("-"),cc=arr[0];for(var i=1;i<arr.length;i++){cc+=arr[i].charAt(0).toUpperCase()+arr[i].substring(1);}return cc;};dojo.html.toSelectorCase=function(_48b){return _48b.replace(/([A-Z])/g,"-$1").toLowerCase();};dojo.html.getComputedStyle=function(node,_48d,_48e){node=dojo.byId(node);var _48d=dojo.html.toSelectorCase(_48d);var _48f=dojo.html.toCamelCase(_48d);if(!node||!node.style){return _48e;}else{if(document.defaultView&&dojo.html.isDescendantOf(node,node.ownerDocument)){try{var cs=document.defaultView.getComputedStyle(node,"");if(cs){return cs.getPropertyValue(_48d);}}catch(e){if(node.style.getPropertyValue){return node.style.getPropertyValue(_48d);}else{return _48e;}}}else{if(node.currentStyle){return node.currentStyle[_48f];}}}if(node.style.getPropertyValue){return node.style.getPropertyValue(_48d);}else{return _48e;}};dojo.html.getStyleProperty=function(node,_492){node=dojo.byId(node);return (node&&node.style?node.style[dojo.html.toCamelCase(_492)]:undefined);};dojo.html.getStyle=function(node,_494){var _495=dojo.html.getStyleProperty(node,_494);return (_495?_495:dojo.html.getComputedStyle(node,_494));};dojo.html.setStyle=function(node,_497,_498){node=dojo.byId(node);if(node&&node.style){var _499=dojo.html.toCamelCase(_497);node.style[_499]=_498;}};dojo.html.setStyleText=function(_49a,text){try{_49a.style.cssText=text;}catch(e){_49a.setAttribute("style",text);}};dojo.html.copyStyle=function(_49c,_49d){if(!_49d.style.cssText){_49c.setAttribute("style",_49d.getAttribute("style"));}else{_49c.style.cssText=_49d.style.cssText;}dojo.html.addClass(_49c,dojo.html.getClass(_49d));};dojo.html.getUnitValue=function(node,_49f,_4a0){var s=dojo.html.getComputedStyle(node,_49f);if((!s)||((s=="auto")&&(_4a0))){return {value:0,units:"px"};}var _4a2=s.match(/(\-?[\d.]+)([a-z%]*)/i);if(!_4a2){return dojo.html.getUnitValue.bad;}return {value:Number(_4a2[1]),units:_4a2[2].toLowerCase()};};dojo.html.getUnitValue.bad={value:NaN,units:""};dojo.html.getPixelValue=function(node,_4a4,_4a5){var _4a6=dojo.html.getUnitValue(node,_4a4,_4a5);if(isNaN(_4a6.value)){return 0;}if((_4a6.value)&&(_4a6.units!="px")){return NaN;}return _4a6.value;};dojo.html.setPositivePixelValue=function(node,_4a8,_4a9){if(isNaN(_4a9)){return false;}node.style[_4a8]=Math.max(0,_4a9)+"px";return true;};dojo.html.styleSheet=null;dojo.html.insertCssRule=function(_4aa,_4ab,_4ac){if(!dojo.html.styleSheet){if(document.createStyleSheet){dojo.html.styleSheet=document.createStyleSheet();}else{if(document.styleSheets[0]){dojo.html.styleSheet=document.styleSheets[0];}else{return null;}}}if(arguments.length<3){if(dojo.html.styleSheet.cssRules){_4ac=dojo.html.styleSheet.cssRules.length;}else{if(dojo.html.styleSheet.rules){_4ac=dojo.html.styleSheet.rules.length;}else{return null;}}}if(dojo.html.styleSheet.insertRule){var rule=_4aa+" { "+_4ab+" }";return dojo.html.styleSheet.insertRule(rule,_4ac);}else{if(dojo.html.styleSheet.addRule){return dojo.html.styleSheet.addRule(_4aa,_4ab,_4ac);}else{return null;}}};dojo.html.removeCssRule=function(_4ae){if(!dojo.html.styleSheet){dojo.debug("no stylesheet defined for removing rules");return false;}if(dojo.render.html.ie){if(!_4ae){_4ae=dojo.html.styleSheet.rules.length;dojo.html.styleSheet.removeRule(_4ae);}}else{if(document.styleSheets[0]){if(!_4ae){_4ae=dojo.html.styleSheet.cssRules.length;}dojo.html.styleSheet.deleteRule(_4ae);}}return true;};dojo.html._insertedCssFiles=[];dojo.html.insertCssFile=function(URI,doc,_4b1,_4b2){if(!URI){return;}if(!doc){doc=document;}var _4b3=dojo.hostenv.getText(URI,false,_4b2);if(_4b3===null){return;}_4b3=dojo.html.fixPathsInCssText(_4b3,URI);if(_4b1){var idx=-1,node,ent=dojo.html._insertedCssFiles;for(var i=0;i<ent.length;i++){if((ent[i].doc==doc)&&(ent[i].cssText==_4b3)){idx=i;node=ent[i].nodeRef;break;}}if(node){var _4b8=doc.getElementsByTagName("style");for(var i=0;i<_4b8.length;i++){if(_4b8[i]==node){return;}}dojo.html._insertedCssFiles.shift(idx,1);}}var _4b9=dojo.html.insertCssText(_4b3,doc);dojo.html._insertedCssFiles.push({"doc":doc,"cssText":_4b3,"nodeRef":_4b9});if(_4b9&&djConfig.isDebug){_4b9.setAttribute("dbgHref",URI);}return _4b9;};dojo.html.insertCssText=function(_4ba,doc,URI){if(!_4ba){return;}if(!doc){doc=document;}if(URI){_4ba=dojo.html.fixPathsInCssText(_4ba,URI);}var _4bd=doc.createElement("style");_4bd.setAttribute("type","text/css");var head=doc.getElementsByTagName("head")[0];if(!head){dojo.debug("No head tag in document, aborting styles");return;}else{head.appendChild(_4bd);}if(_4bd.styleSheet){var _4bf=function(){try{_4bd.styleSheet.cssText=_4ba;}catch(e){dojo.debug(e);}};if(_4bd.styleSheet.disabled){setTimeout(_4bf,10);}else{_4bf();}}else{var _4c0=doc.createTextNode(_4ba);_4bd.appendChild(_4c0);}return _4bd;};dojo.html.fixPathsInCssText=function(_4c1,URI){if(!_4c1||!URI){return;}var _4c3,str="",url="",_4c6="[\\t\\s\\w\\(\\)\\/\\.\\\\'\"-:#=&?~]+";var _4c7=new RegExp("url\\(\\s*("+_4c6+")\\s*\\)");var _4c8=/(file|https?|ftps?):\/\//;regexTrim=new RegExp("^[\\s]*(['\"]?)("+_4c6+")\\1[\\s]*?$");if(dojo.render.html.ie55||dojo.render.html.ie60){var _4c9=new RegExp("AlphaImageLoader\\((.*)src=['\"]("+_4c6+")['\"]");while(_4c3=_4c9.exec(_4c1)){url=_4c3[2].replace(regexTrim,"$2");if(!_4c8.exec(url)){url=(new dojo.uri.Uri(URI,url).toString());}str+=_4c1.substring(0,_4c3.index)+"AlphaImageLoader("+_4c3[1]+"src='"+url+"'";_4c1=_4c1.substr(_4c3.index+_4c3[0].length);}_4c1=str+_4c1;str="";}while(_4c3=_4c7.exec(_4c1)){url=_4c3[1].replace(regexTrim,"$2");if(!_4c8.exec(url)){url=(new dojo.uri.Uri(URI,url).toString());}str+=_4c1.substring(0,_4c3.index)+"url("+url+")";_4c1=_4c1.substr(_4c3.index+_4c3[0].length);}return str+_4c1;};dojo.html.setActiveStyleSheet=function(_4ca){var i=0,a,els=dojo.doc().getElementsByTagName("link");while(a=els[i++]){if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")){a.disabled=true;if(a.getAttribute("title")==_4ca){a.disabled=false;}}}};dojo.html.getActiveStyleSheet=function(){var i=0,a,els=dojo.doc().getElementsByTagName("link");while(a=els[i++]){if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")&&!a.disabled){return a.getAttribute("title");}}return null;};dojo.html.getPreferredStyleSheet=function(){var i=0,a,els=dojo.doc().getElementsByTagName("link");while(a=els[i++]){if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("rel").indexOf("alt")==-1&&a.getAttribute("title")){return a.getAttribute("title");}}return null;};dojo.html.applyBrowserClass=function(node){var drh=dojo.render.html;var _4d6={dj_ie:drh.ie,dj_ie55:drh.ie55,dj_ie6:drh.ie60,dj_ie7:drh.ie70,dj_ie8:drh.ie80,dj_iequirks:drh.ie&&drh.quirks,dj_opera:drh.opera,dj_opera8:drh.opera&&(Math.floor(dojo.render.version)==8),dj_opera9:drh.opera&&(Math.floor(dojo.render.version)==9),dj_khtml:drh.khtml,dj_safari:drh.safari,dj_gecko:drh.mozilla};for(var p in _4d6){if(_4d6[p]){dojo.html.addClass(node,p);}}};dojo.provide("dojo.html.display");dojo.html._toggle=function(node,_4d9,_4da){node=dojo.byId(node);_4da(node,!_4d9(node));return _4d9(node);};dojo.html.show=function(node){node=dojo.byId(node);if(dojo.html.getStyleProperty(node,"display")=="none"){var _4dc=dojo.html.getAttribute("djDisplayCache");dojo.html.setStyle(node,"display",(_4dc||""));node.removeAttribute("djDisplayCache");}};dojo.html.hide=function(node){node=dojo.byId(node);var _4de=dojo.html.getAttribute("djDisplayCache");if(_4de==null){var d=dojo.html.getStyleProperty(node,"display");if(d!="none"){node.setAttribute("djDisplayCache",d);}}dojo.html.setStyle(node,"display","none");};dojo.html.setShowing=function(node,_4e1){dojo.html[(_4e1?"show":"hide")](node);};dojo.html.isShowing=function(node){return (dojo.html.getStyleProperty(node,"display")!="none");};dojo.html.toggleShowing=function(node){return dojo.html._toggle(node,dojo.html.isShowing,dojo.html.setShowing);};dojo.html.displayMap={tr:"",td:"",th:"",img:"inline",span:"inline",input:"inline",button:"inline"};dojo.html.suggestDisplayByTagName=function(node){node=dojo.byId(node);if(node&&node.tagName){var tag=node.tagName.toLowerCase();return (tag in dojo.html.displayMap?dojo.html.displayMap[tag]:"block");}};dojo.html.setDisplay=function(node,_4e7){dojo.html.setStyle(node,"display",((_4e7 instanceof String||typeof _4e7=="string")?_4e7:(_4e7?dojo.html.suggestDisplayByTagName(node):"none")));};dojo.html.isDisplayed=function(node){return (dojo.html.getComputedStyle(node,"display")!="none");};dojo.html.toggleDisplay=function(node){return dojo.html._toggle(node,dojo.html.isDisplayed,dojo.html.setDisplay);};dojo.html.setVisibility=function(node,_4eb){dojo.html.setStyle(node,"visibility",((_4eb instanceof String||typeof _4eb=="string")?_4eb:(_4eb?"visible":"hidden")));};dojo.html.isVisible=function(node){return (dojo.html.getComputedStyle(node,"visibility")!="hidden");};dojo.html.toggleVisibility=function(node){return dojo.html._toggle(node,dojo.html.isVisible,dojo.html.setVisibility);};dojo.html.setOpacity=function(node,_4ef,_4f0){node=dojo.byId(node);var h=dojo.render.html;if(!_4f0){if(_4ef>=1){if(h.ie){dojo.html.clearOpacity(node);return;}else{_4ef=0.999999;}}else{if(_4ef<0){_4ef=0;}}}if(h.ie){if(node.nodeName.toLowerCase()=="tr"){var tds=node.getElementsByTagName("td");for(var x=0;x<tds.length;x++){tds[x].style.filter="Alpha(Opacity="+_4ef*100+")";}}node.style.filter="Alpha(Opacity="+_4ef*100+")";}else{if(h.moz){node.style.opacity=_4ef;node.style.MozOpacity=_4ef;}else{if(h.safari){node.style.opacity=_4ef;node.style.KhtmlOpacity=_4ef;}else{node.style.opacity=_4ef;}}}};dojo.html.clearOpacity=function(node){node=dojo.byId(node);var ns=node.style;var h=dojo.render.html;if(h.ie){try{if(node.filters&&node.filters.alpha){ns.filter="";}}catch(e){}}else{if(h.moz){ns.opacity=1;ns.MozOpacity=1;}else{if(h.safari){ns.opacity=1;ns.KhtmlOpacity=1;}else{ns.opacity=1;}}}};dojo.html.getOpacity=function(node){node=dojo.byId(node);var h=dojo.render.html;if(h.ie){var opac=(node.filters&&node.filters.alpha&&typeof node.filters.alpha.opacity=="number"?node.filters.alpha.opacity:100)/100;}else{var opac=node.style.opacity||node.style.MozOpacity||node.style.KhtmlOpacity||1;}return opac>=0.999999?1:Number(opac);};dojo.provide("dojo.html.color");dojo.html.getBackgroundColor=function(node){node=dojo.byId(node);var _4fb;do{_4fb=dojo.html.getStyle(node,"background-color");if(_4fb.toLowerCase()=="rgba(0, 0, 0, 0)"){_4fb="transparent";}if(node==document.getElementsByTagName("body")[0]){node=null;break;}node=node.parentNode;}while(node&&dojo.lang.inArray(["transparent",""],_4fb));if(_4fb=="transparent"){_4fb=[255,255,255,0];}else{_4fb=dojo.gfx.color.extractRGB(_4fb);}return _4fb;};dojo.provide("dojo.html.layout");dojo.html.sumAncestorProperties=function(node,prop){node=dojo.byId(node);if(!node){return 0;}var _4fe=0;while(node){if(dojo.html.getComputedStyle(node,"position")=="fixed"){return 0;}var val=node[prop];if(val){_4fe+=val-0;if(node==dojo.body()){break;}}node=node.parentNode;}return _4fe;};dojo.html.setStyleAttributes=function(node,_501){node=dojo.byId(node);var _502=_501.replace(/(;)?\s*$/,"").split(";");for(var i=0;i<_502.length;i++){var _504=_502[i].split(":");var name=_504[0].replace(/\s*$/,"").replace(/^\s*/,"").toLowerCase();var _506=_504[1].replace(/\s*$/,"").replace(/^\s*/,"");switch(name){case "opacity": dojo.html.setOpacity(node,_506);break;case "content-height": dojo.html.setContentBox(node,{height:_506});break;case "content-width": dojo.html.setContentBox(node,{width:_506});break;case "outer-height": dojo.html.setMarginBox(node,{height:_506});break;case "outer-width": dojo.html.setMarginBox(node,{width:_506});break;default: node.style[dojo.html.toCamelCase(name)]=_506;}}};dojo.html.boxSizing={MARGIN_BOX:"margin-box",BORDER_BOX:"border-box",PADDING_BOX:"padding-box",CONTENT_BOX:"content-box"};dojo.html.getAbsolutePosition=dojo.html.abs=function(node,_508,_509){node=dojo.byId(node);var _50a=dojo.doc();var ret={x:0,y:0};var bs=dojo.html.boxSizing;if(!_509){_509=bs.CONTENT_BOX;}var _50d=2;var _50e;switch(_509){case bs.MARGIN_BOX: _50e=3;break;case bs.BORDER_BOX: _50e=2;break;case bs.PADDING_BOX: default: _50e=1;break;case bs.CONTENT_BOX: _50e=0;break;}var h=dojo.render.html;var db=_50a["body"]||_50a["documentElement"];if(h.ie){with(node.getBoundingClientRect()){ret.x=left-2;ret.y=top-2;}}else{if(_50a["getBoxObjectFor"]){_50d=1;try{var bo=_50a.getBoxObjectFor(node);ret.x=bo.x-dojo.html.sumAncestorProperties(node,"scrollLeft");ret.y=bo.y-dojo.html.sumAncestorProperties(node,"scrollTop");}catch(e){}}else{if(node["offsetParent"]){var _512;if((h.safari)&&(node.style.getPropertyValue("position")=="absolute")&&(node.parentNode==db)){_512=db;}else{_512=db.parentNode;}if(node.parentNode!=db){var nd=node;if(dojo.render.html.opera){nd=db;}ret.x-=dojo.html.sumAncestorProperties(nd,"scrollLeft");ret.y-=dojo.html.sumAncestorProperties(nd,"scrollTop");}var _514=node;do{var n=_514["offsetLeft"];if(!h.opera||n>0){ret.x+=isNaN(n)?0:n;}var m=_514["offsetTop"];ret.y+=isNaN(m)?0:m;_514=_514.offsetParent;}while((_514!=_512)&&(_514!=null));}else{if(node["x"]&&node["y"]){ret.x+=isNaN(node.x)?0:node.x;ret.y+=isNaN(node.y)?0:node.y;}}}}if(_508){var _517=dojo.html.getScroll();ret.y+=_517.top;ret.x+=_517.left;}var _518=[dojo.html.getPaddingExtent,dojo.html.getBorderExtent,dojo.html.getMarginExtent];if(_50d>_50e){for(var i=_50e;i<_50d;++i){ret.y+=_518[i](node,"top");ret.x+=_518[i](node,"left");}}else{if(_50d<_50e){for(var i=_50e;i>_50d;--i){ret.y-=_518[i-1](node,"top");ret.x-=_518[i-1](node,"left");}}}ret.top=ret.y;ret.left=ret.x;return ret;};dojo.html.isPositionAbsolute=function(node){return (dojo.html.getComputedStyle(node,"position")=="absolute");};dojo.html._getComponentPixelValues=function(node,_51c,_51d,_51e){var _51f=["top","bottom","left","right"];var obj={};for(var i in _51f){side=_51f[i];obj[side]=_51d(node,_51c+side,_51e);}obj.width=obj.left+obj.right;obj.height=obj.top+obj.bottom;return obj;};dojo.html.getMargin=function(node){return dojo.html._getComponentPixelValues(node,"margin-",dojo.html.getPixelValue,dojo.html.isPositionAbsolute(node));};dojo.html.getBorder=function(node){return dojo.html._getComponentPixelValues(node,"",dojo.html.getBorderExtent);};dojo.html.getBorderExtent=function(node,side){return (dojo.html.getStyle(node,"border-"+side+"-style")=="none"?0:dojo.html.getPixelValue(node,"border-"+side+"-width"));};dojo.html.getMarginExtent=function(node,side){return dojo.html.getPixelValue(node,"margin-"+side,dojo.html.isPositionAbsolute(node));};dojo.html.getPaddingExtent=function(node,side){return dojo.html.getPixelValue(node,"padding-"+side,true);};dojo.html.getPadding=function(node){return dojo.html._getComponentPixelValues(node,"padding-",dojo.html.getPixelValue,true);};dojo.html.getPadBorder=function(node){var pad=dojo.html.getPadding(node);var _52d=dojo.html.getBorder(node);return {width:pad.width+_52d.width,height:pad.height+_52d.height};};dojo.html.getBoxSizing=function(node){var h=dojo.render.html;var bs=dojo.html.boxSizing;if(((h.ie)||(h.opera))&&node.nodeName!="IMG"){var cm=document["compatMode"];if((cm=="BackCompat")||(cm=="QuirksMode")){return bs.BORDER_BOX;}else{return bs.CONTENT_BOX;}}else{if(arguments.length==0){node=document.documentElement;}var _532=dojo.html.getStyle(node,"-moz-box-sizing");if(!_532){_532=dojo.html.getStyle(node,"box-sizing");}return (_532?_532:bs.CONTENT_BOX);}};dojo.html.isBorderBox=function(node){return (dojo.html.getBoxSizing(node)==dojo.html.boxSizing.BORDER_BOX);};dojo.html.getBorderBox=function(node){node=dojo.byId(node);return {width:node.offsetWidth,height:node.offsetHeight};};dojo.html.getPaddingBox=function(node){var box=dojo.html.getBorderBox(node);var _537=dojo.html.getBorder(node);return {width:box.width-_537.width,height:box.height-_537.height};};dojo.html.getContentBox=function(node){node=dojo.byId(node);var _539=dojo.html.getPadBorder(node);return {width:node.offsetWidth-_539.width,height:node.offsetHeight-_539.height};};dojo.html.setContentBox=function(node,args){node=dojo.byId(node);var _53c=0;var _53d=0;var isbb=dojo.html.isBorderBox(node);var _53f=(isbb?dojo.html.getPadBorder(node):{width:0,height:0});var ret={};if(typeof args.width!="undefined"){_53c=args.width+_53f.width;ret.width=dojo.html.setPositivePixelValue(node,"width",_53c);}if(typeof args.height!="undefined"){_53d=args.height+_53f.height;ret.height=dojo.html.setPositivePixelValue(node,"height",_53d);}return ret;};dojo.html.getMarginBox=function(node){var _542=dojo.html.getBorderBox(node);var _543=dojo.html.getMargin(node);return {width:_542.width+_543.width,height:_542.height+_543.height};};dojo.html.setMarginBox=function(node,args){node=dojo.byId(node);var _546=0;var _547=0;var isbb=dojo.html.isBorderBox(node);var _549=(!isbb?dojo.html.getPadBorder(node):{width:0,height:0});var _54a=dojo.html.getMargin(node);var ret={};if(typeof args.width!="undefined"){_546=args.width-_549.width;_546-=_54a.width;ret.width=dojo.html.setPositivePixelValue(node,"width",_546);}if(typeof args.height!="undefined"){_547=args.height-_549.height;_547-=_54a.height;ret.height=dojo.html.setPositivePixelValue(node,"height",_547);}return ret;};dojo.html.getElementBox=function(node,type){var bs=dojo.html.boxSizing;switch(type){case bs.MARGIN_BOX: return dojo.html.getMarginBox(node);case bs.BORDER_BOX: return dojo.html.getBorderBox(node);case bs.PADDING_BOX: return dojo.html.getPaddingBox(node);case bs.CONTENT_BOX: default: return dojo.html.getContentBox(node);}};dojo.html.toCoordinateObject=dojo.html.toCoordinateArray=function(_54f,_550,_551){if(!_54f.nodeType&&!(_54f instanceof String||typeof _54f=="string")&&("width" in _54f||"height" in _54f||"left" in _54f||"x" in _54f||"top" in _54f||"y" in _54f)){var ret={left:_54f.left||_54f.x||0,top:_54f.top||_54f.y||0,width:_54f.width||0,height:_54f.height||0};}else{var node=dojo.byId(_54f);var pos=dojo.html.abs(node,_550,_551);var _555=dojo.html.getMarginBox(node);var ret={left:pos.left,top:pos.top,width:_555.width,height:_555.height};}ret.x=ret.left;ret.y=ret.top;return ret;};dojo.html.setMarginBoxWidth=dojo.html.setOuterWidth=function(node,_557){return dojo.html._callDeprecated("setMarginBoxWidth","setMarginBox",arguments,"width");};dojo.html.setMarginBoxHeight=dojo.html.setOuterHeight=function(){return dojo.html._callDeprecated("setMarginBoxHeight","setMarginBox",arguments,"height");};dojo.html.getMarginBoxWidth=dojo.html.getOuterWidth=function(){return dojo.html._callDeprecated("getMarginBoxWidth","getMarginBox",arguments,null,"width");};dojo.html.getMarginBoxHeight=dojo.html.getOuterHeight=function(){return dojo.html._callDeprecated("getMarginBoxHeight","getMarginBox",arguments,null,"height");};dojo.html.getTotalOffset=function(node,type,_55a){return dojo.html._callDeprecated("getTotalOffset","getAbsolutePosition",arguments,null,type);};dojo.html.getAbsoluteX=function(node,_55c){return dojo.html._callDeprecated("getAbsoluteX","getAbsolutePosition",arguments,null,"x");};dojo.html.getAbsoluteY=function(node,_55e){return dojo.html._callDeprecated("getAbsoluteY","getAbsolutePosition",arguments,null,"y");};dojo.html.totalOffsetLeft=function(node,_560){return dojo.html._callDeprecated("totalOffsetLeft","getAbsolutePosition",arguments,null,"left");};dojo.html.totalOffsetTop=function(node,_562){return dojo.html._callDeprecated("totalOffsetTop","getAbsolutePosition",arguments,null,"top");};dojo.html.getMarginWidth=function(node){return dojo.html._callDeprecated("getMarginWidth","getMargin",arguments,null,"width");};dojo.html.getMarginHeight=function(node){return dojo.html._callDeprecated("getMarginHeight","getMargin",arguments,null,"height");};dojo.html.getBorderWidth=function(node){return dojo.html._callDeprecated("getBorderWidth","getBorder",arguments,null,"width");};dojo.html.getBorderHeight=function(node){return dojo.html._callDeprecated("getBorderHeight","getBorder",arguments,null,"height");};dojo.html.getPaddingWidth=function(node){return dojo.html._callDeprecated("getPaddingWidth","getPadding",arguments,null,"width");};dojo.html.getPaddingHeight=function(node){return dojo.html._callDeprecated("getPaddingHeight","getPadding",arguments,null,"height");};dojo.html.getPadBorderWidth=function(node){return dojo.html._callDeprecated("getPadBorderWidth","getPadBorder",arguments,null,"width");};dojo.html.getPadBorderHeight=function(node){return dojo.html._callDeprecated("getPadBorderHeight","getPadBorder",arguments,null,"height");};dojo.html.getBorderBoxWidth=dojo.html.getInnerWidth=function(){return dojo.html._callDeprecated("getBorderBoxWidth","getBorderBox",arguments,null,"width");};dojo.html.getBorderBoxHeight=dojo.html.getInnerHeight=function(){return dojo.html._callDeprecated("getBorderBoxHeight","getBorderBox",arguments,null,"height");};dojo.html.getContentBoxWidth=dojo.html.getContentWidth=function(){return dojo.html._callDeprecated("getContentBoxWidth","getContentBox",arguments,null,"width");};dojo.html.getContentBoxHeight=dojo.html.getContentHeight=function(){return dojo.html._callDeprecated("getContentBoxHeight","getContentBox",arguments,null,"height");};dojo.html.setContentBoxWidth=dojo.html.setContentWidth=function(node,_56c){return dojo.html._callDeprecated("setContentBoxWidth","setContentBox",arguments,"width");};dojo.html.setContentBoxHeight=dojo.html.setContentHeight=function(node,_56e){return dojo.html._callDeprecated("setContentBoxHeight","setContentBox",arguments,"height");};dojo.provide("dojo.lfx.html");dojo.lfx.html._byId=function(_56f){if(!_56f){return [];}if(dojo.lang.isArrayLike(_56f)){if(!_56f.alreadyChecked){var n=[];dojo.lang.forEach(_56f,function(node){n.push(dojo.byId(node));});n.alreadyChecked=true;return n;}else{return _56f;}}else{var n=[];n.push(dojo.byId(_56f));n.alreadyChecked=true;return n;}};dojo.lfx.html.propertyAnimation=function(_572,_573,_574,_575,_576){_572=dojo.lfx.html._byId(_572);var _577={"propertyMap":_573,"nodes":_572,"duration":_574,"easing":_575||dojo.lfx.easeDefault};var _578=function(args){if(args.nodes.length==1){var pm=args.propertyMap;if(!dojo.lang.isArray(args.propertyMap)){var parr=[];for(var _57c in pm){pm[_57c].property=_57c;parr.push(pm[_57c]);}pm=args.propertyMap=parr;}dojo.lang.forEach(pm,function(prop){if(dj_undef("start",prop)){if(prop.property!="opacity"){prop.start=parseInt(dojo.html.getComputedStyle(args.nodes[0],prop.property));}else{prop.start=dojo.html.getOpacity(args.nodes[0]);}}});}};var _57e=function(_57f){var _580=[];dojo.lang.forEach(_57f,function(c){_580.push(Math.round(c));});return _580;};var _582=function(n,_584){n=dojo.byId(n);if(!n||!n.style){return;}for(var s in _584){try{if(s=="opacity"){dojo.html.setOpacity(n,_584[s]);}else{n.style[s]=_584[s];}}catch(e){dojo.debug(e);}}};var _586=function(_587){this._properties=_587;this.diffs=new Array(_587.length);dojo.lang.forEach(_587,function(prop,i){if(dojo.lang.isFunction(prop.start)){prop.start=prop.start(prop,i);}if(dojo.lang.isFunction(prop.end)){prop.end=prop.end(prop,i);}if(dojo.lang.isArray(prop.start)){this.diffs[i]=null;}else{if(prop.start instanceof dojo.gfx.color.Color){prop.startRgb=prop.start.toRgb();prop.endRgb=prop.end.toRgb();}else{this.diffs[i]=prop.end-prop.start;}}},this);this.getValue=function(n){var ret={};dojo.lang.forEach(this._properties,function(prop,i){var _58e=null;if(dojo.lang.isArray(prop.start)){}else{if(prop.start instanceof dojo.gfx.color.Color){_58e=(prop.units||"rgb")+"(";for(var j=0;j<prop.startRgb.length;j++){_58e+=Math.round(((prop.endRgb[j]-prop.startRgb[j])*n)+prop.startRgb[j])+(j<prop.startRgb.length-1?",":"");}_58e+=")";}else{_58e=((this.diffs[i])*n)+prop.start+(prop.property!="opacity"?prop.units||"px":"");}}ret[dojo.html.toCamelCase(prop.property)]=_58e;},this);return ret;};};var anim=new dojo.lfx.Animation({beforeBegin:function(){_578(_577);anim.curve=new _586(_577.propertyMap);},onAnimate:function(_591){dojo.lang.forEach(_577.nodes,function(node){_582(node,_591);});}},_577.duration,null,_577.easing);if(_576){for(var x in _576){if(dojo.lang.isFunction(_576[x])){anim.connect(x,anim,_576[x]);}}}return anim;};dojo.lfx.html._makeFadeable=function(_594){var _595=function(node){if(dojo.render.html.ie){if((node.style.zoom.length==0)&&(dojo.html.getStyle(node,"zoom")=="normal")){node.style.zoom="1";}if((node.style.width.length==0)&&(dojo.html.getStyle(node,"width")=="auto")){node.style.width="auto";}}};if(dojo.lang.isArrayLike(_594)){dojo.lang.forEach(_594,_595);}else{_595(_594);}};dojo.lfx.html.fade=function(_597,_598,_599,_59a,_59b){_597=dojo.lfx.html._byId(_597);var _59c={property:"opacity"};if(!dj_undef("start",_598)){_59c.start=_598.start;}else{_59c.start=function(){return dojo.html.getOpacity(_597[0]);};}if(!dj_undef("end",_598)){_59c.end=_598.end;}else{dojo.raise("dojo.lfx.html.fade needs an end value");}var anim=dojo.lfx.propertyAnimation(_597,[_59c],_599,_59a);anim.connect("beforeBegin",function(){dojo.lfx.html._makeFadeable(_597);});if(_59b){anim.connect("onEnd",function(){_59b(_597,anim);});}return anim;};dojo.lfx.html.fadeIn=function(_59e,_59f,_5a0,_5a1){return dojo.lfx.html.fade(_59e,{end:1},_59f,_5a0,_5a1);};dojo.lfx.html.fadeOut=function(_5a2,_5a3,_5a4,_5a5){return dojo.lfx.html.fade(_5a2,{end:0},_5a3,_5a4,_5a5);};dojo.lfx.html.fadeShow=function(_5a6,_5a7,_5a8,_5a9){_5a6=dojo.lfx.html._byId(_5a6);dojo.lang.forEach(_5a6,function(node){dojo.html.setOpacity(node,0);});var anim=dojo.lfx.html.fadeIn(_5a6,_5a7,_5a8,_5a9);anim.connect("beforeBegin",function(){if(dojo.lang.isArrayLike(_5a6)){dojo.lang.forEach(_5a6,dojo.html.show);}else{dojo.html.show(_5a6);}});return anim;};dojo.lfx.html.fadeHide=function(_5ac,_5ad,_5ae,_5af){var anim=dojo.lfx.html.fadeOut(_5ac,_5ad,_5ae,function(){if(dojo.lang.isArrayLike(_5ac)){dojo.lang.forEach(_5ac,dojo.html.hide);}else{dojo.html.hide(_5ac);}if(_5af){_5af(_5ac,anim);}});return anim;};dojo.lfx.html.wipeIn=function(_5b1,_5b2,_5b3,_5b4){_5b1=dojo.lfx.html._byId(_5b1);var _5b5=[];dojo.lang.forEach(_5b1,function(node){var _5b7={};var _5b8,_5b9,_5ba;with(node.style){_5b8=top;_5b9=left;_5ba=position;top="-9999px";left="-9999px";position="absolute";display="";}var _5bb=dojo.html.getBorderBox(node).height;with(node.style){top=_5b8;left=_5b9;position=_5ba;display="none";}var anim=dojo.lfx.propertyAnimation(node,{"height":{start:1,end:function(){return _5bb;}}},_5b2,_5b3);anim.connect("beforeBegin",function(){_5b7.overflow=node.style.overflow;_5b7.height=node.style.height;with(node.style){overflow="hidden";_5bb="1px";}dojo.html.show(node);});anim.connect("onEnd",function(){with(node.style){overflow=_5b7.overflow;_5bb=_5b7.height;}if(_5b4){_5b4(node,anim);}});_5b5.push(anim);});return dojo.lfx.combine(_5b5);};dojo.lfx.html.wipeOut=function(_5bd,_5be,_5bf,_5c0){_5bd=dojo.lfx.html._byId(_5bd);var _5c1=[];dojo.lang.forEach(_5bd,function(node){var _5c3={};var anim=dojo.lfx.propertyAnimation(node,{"height":{start:function(){return dojo.html.getContentBox(node).height;},end:1}},_5be,_5bf,{"beforeBegin":function(){_5c3.overflow=node.style.overflow;_5c3.height=node.style.height;with(node.style){overflow="hidden";}dojo.html.show(node);},"onEnd":function(){dojo.html.hide(node);with(node.style){overflow=_5c3.overflow;height=_5c3.height;}if(_5c0){_5c0(node,anim);}}});_5c1.push(anim);});return dojo.lfx.combine(_5c1);};dojo.lfx.html.slideTo=function(_5c5,_5c6,_5c7,_5c8,_5c9){_5c5=dojo.lfx.html._byId(_5c5);var _5ca=[];var _5cb=dojo.html.getComputedStyle;dojo.lang.forEach(_5c5,function(node){var top=null;var left=null;var init=(function(){var _5d0=node;return function(){var pos=_5cb(_5d0,"position");top=(pos=="absolute"?node.offsetTop:parseInt(_5cb(node,"top"))||0);left=(pos=="absolute"?node.offsetLeft:parseInt(_5cb(node,"left"))||0);if(!dojo.lang.inArray(["absolute","relative"],pos)){var ret=dojo.html.abs(_5d0,true);dojo.html.setStyleAttributes(_5d0,"position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;");top=ret.y;left=ret.x;}};})();init();var anim=dojo.lfx.propertyAnimation(node,{"top":{start:top,end:(_5c6.top||0)},"left":{start:left,end:(_5c6.left||0)}},_5c7,_5c8,{"beforeBegin":init});if(_5c9){anim.connect("onEnd",function(){_5c9(_5c5,anim);});}_5ca.push(anim);});return dojo.lfx.combine(_5ca);};dojo.lfx.html.slideBy=function(_5d4,_5d5,_5d6,_5d7,_5d8){_5d4=dojo.lfx.html._byId(_5d4);var _5d9=[];var _5da=dojo.html.getComputedStyle;dojo.lang.forEach(_5d4,function(node){var top=null;var left=null;var init=(function(){var _5df=node;return function(){var pos=_5da(_5df,"position");top=(pos=="absolute"?node.offsetTop:parseInt(_5da(node,"top"))||0);left=(pos=="absolute"?node.offsetLeft:parseInt(_5da(node,"left"))||0);if(!dojo.lang.inArray(["absolute","relative"],pos)){var ret=dojo.html.abs(_5df,true);dojo.html.setStyleAttributes(_5df,"position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;");top=ret.y;left=ret.x;}};})();init();var anim=dojo.lfx.propertyAnimation(node,{"top":{start:top,end:top+(_5d5.top||0)},"left":{start:left,end:left+(_5d5.left||0)}},_5d6,_5d7).connect("beforeBegin",init);if(_5d8){anim.connect("onEnd",function(){_5d8(_5d4,anim);});}_5d9.push(anim);});return dojo.lfx.combine(_5d9);};dojo.lfx.html.explode=function(_5e3,_5e4,_5e5,_5e6,_5e7){var h=dojo.html;_5e3=dojo.byId(_5e3);_5e4=dojo.byId(_5e4);var _5e9=h.toCoordinateObject(_5e3,true);var _5ea=document.createElement("div");h.copyStyle(_5ea,_5e4);if(_5e4.explodeClassName){_5ea.className=_5e4.explodeClassName;}with(_5ea.style){position="absolute";display="none";var _5eb=h.getStyle(_5e3,"background-color");backgroundColor=_5eb?_5eb.toLowerCase():"transparent";backgroundColor=(backgroundColor=="transparent")?"rgb(221, 221, 221)":backgroundColor;}dojo.body().appendChild(_5ea);with(_5e4.style){visibility="hidden";display="block";}var _5ec=h.toCoordinateObject(_5e4,true);with(_5e4.style){display="none";visibility="visible";}var _5ed={opacity:{start:0.5,end:1}};dojo.lang.forEach(["height","width","top","left"],function(type){_5ed[type]={start:_5e9[type],end:_5ec[type]};});var anim=new dojo.lfx.propertyAnimation(_5ea,_5ed,_5e5,_5e6,{"beforeBegin":function(){h.setDisplay(_5ea,"block");},"onEnd":function(){h.setDisplay(_5e4,"block");_5ea.parentNode.removeChild(_5ea);}});if(_5e7){anim.connect("onEnd",function(){_5e7(_5e4,anim);});}return anim;};dojo.lfx.html.implode=function(_5f0,end,_5f2,_5f3,_5f4){var h=dojo.html;_5f0=dojo.byId(_5f0);end=dojo.byId(end);var _5f6=dojo.html.toCoordinateObject(_5f0,true);var _5f7=dojo.html.toCoordinateObject(end,true);var _5f8=document.createElement("div");dojo.html.copyStyle(_5f8,_5f0);if(_5f0.explodeClassName){_5f8.className=_5f0.explodeClassName;}dojo.html.setOpacity(_5f8,0.3);with(_5f8.style){position="absolute";display="none";backgroundColor=h.getStyle(_5f0,"background-color").toLowerCase();}dojo.body().appendChild(_5f8);var _5f9={opacity:{start:1,end:0.5}};dojo.lang.forEach(["height","width","top","left"],function(type){_5f9[type]={start:_5f6[type],end:_5f7[type]};});var anim=new dojo.lfx.propertyAnimation(_5f8,_5f9,_5f2,_5f3,{"beforeBegin":function(){dojo.html.hide(_5f0);dojo.html.show(_5f8);},"onEnd":function(){_5f8.parentNode.removeChild(_5f8);}});if(_5f4){anim.connect("onEnd",function(){_5f4(_5f0,anim);});}return anim;};dojo.lfx.html.highlight=function(_5fc,_5fd,_5fe,_5ff,_600){_5fc=dojo.lfx.html._byId(_5fc);var _601=[];dojo.lang.forEach(_5fc,function(node){var _603=dojo.html.getBackgroundColor(node);var bg=dojo.html.getStyle(node,"background-color").toLowerCase();var _605=dojo.html.getStyle(node,"background-image");var _606=(bg=="transparent"||bg=="rgba(0, 0, 0, 0)");while(_603.length>3){_603.pop();}var rgb=new dojo.gfx.color.Color(_5fd);var _608=new dojo.gfx.color.Color(_603);var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:rgb,end:_608}},_5fe,_5ff,{"beforeBegin":function(){if(_605){node.style.backgroundImage="none";}node.style.backgroundColor="rgb("+rgb.toRgb().join(",")+")";},"onEnd":function(){if(_605){node.style.backgroundImage=_605;}if(_606){node.style.backgroundColor="transparent";}if(_600){_600(node,anim);}}});_601.push(anim);});return dojo.lfx.combine(_601);};dojo.lfx.html.unhighlight=function(_60a,_60b,_60c,_60d,_60e){_60a=dojo.lfx.html._byId(_60a);var _60f=[];dojo.lang.forEach(_60a,function(node){var _611=new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node));var rgb=new dojo.gfx.color.Color(_60b);var _613=dojo.html.getStyle(node,"background-image");var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:_611,end:rgb}},_60c,_60d,{"beforeBegin":function(){if(_613){node.style.backgroundImage="none";}node.style.backgroundColor="rgb("+_611.toRgb().join(",")+")";},"onEnd":function(){if(_60e){_60e(node,anim);}}});_60f.push(anim);});return dojo.lfx.combine(_60f);};dojo.lang.mixin(dojo.lfx,dojo.lfx.html);dojo.provide("dojo.lfx.*");dojo.provide("dojo.lfx.toggle");dojo.lfx.toggle.plain={show:function(node,_616,_617,_618){dojo.html.show(node);if(dojo.lang.isFunction(_618)){_618();}return null;},hide:function(node,_61a,_61b,_61c){dojo.html.hide(node);if(dojo.lang.isFunction(_61c)){_61c();}return null;}};dojo.lfx.toggle.fade={show:function(node,_61e,_61f,_620){return dojo.lfx.fadeShow(node,_61e,_61f,_620).play();},hide:function(node,_622,_623,_624){return dojo.lfx.fadeHide(node,_622,_623,_624).play();}};dojo.lfx.toggle.wipe={show:function(node,_626,_627,_628){return dojo.lfx.wipeIn(node,_626,_627,_628).play();},hide:function(node,_62a,_62b,_62c){return dojo.lfx.wipeOut(node,_62a,_62b,_62c).play();}};dojo.lfx.toggle.explode={show:function(node,_62e,_62f,_630,_631){return dojo.lfx.explode(_631||{x:0,y:0,width:0,height:0},node,_62e,_62f,_630).play();},hide:function(node,_633,_634,_635,_636){return dojo.lfx.implode(node,_636||{x:0,y:0,width:0,height:0},_633,_634,_635).play();}};dojo.provide("dojo.xml.Parse");dojo.xml.Parse=function(){var isIE=((dojo.render.html.capable)&&(dojo.render.html.ie));function getTagName(node){try{return node.tagName.toLowerCase();}catch(e){return "";}}function getDojoTagName(node){var _63a=getTagName(node);if(!_63a){return "";}if((dojo.widget)&&(dojo.widget.tags[_63a])){return _63a;}var p=_63a.indexOf(":");if(p>=0){return _63a;}if(_63a.substr(0,5)=="dojo:"){return _63a;}if(dojo.render.html.capable&&dojo.render.html.ie&&node.scopeName&&node.scopeName!="HTML"){return node.scopeName.toLowerCase()+":"+_63a;}if(_63a.substr(0,4)=="dojo"){return "dojo:"+_63a.substring(4);}var djt=node.getAttribute("dojoType")||node.getAttribute("dojotype");if(djt){if(djt.indexOf(":")<0){djt="dojo:"+djt;}return djt.toLowerCase();}djt=node.getAttributeNS&&node.getAttributeNS(dojo.dom.dojoml,"type");if(djt){return "dojo:"+djt.toLowerCase();}try{djt=node.getAttribute("dojo:type");}catch(e){}if(djt){return "dojo:"+djt.toLowerCase();}if((dj_global["djConfig"])&&(!djConfig["ignoreClassNames"])){var _63d=node.className||node.getAttribute("class");if((_63d)&&(_63d.indexOf)&&(_63d.indexOf("dojo-")!=-1)){var _63e=_63d.split(" ");for(var x=0,c=_63e.length;x<c;x++){if(_63e[x].slice(0,5)=="dojo-"){return "dojo:"+_63e[x].substr(5).toLowerCase();}}}}return "";}this.parseElement=function(node,_642,_643,_644){var _645=getTagName(node);if(isIE&&_645.indexOf("/")==0){return null;}try{var attr=node.getAttribute("parseWidgets");if(attr&&attr.toLowerCase()=="false"){return {};}}catch(e){}var _647=true;if(_643){var _648=getDojoTagName(node);_645=_648||_645;_647=Boolean(_648);}var _649={};_649[_645]=[];var pos=_645.indexOf(":");if(pos>0){var ns=_645.substring(0,pos);_649["ns"]=ns;if((dojo.ns)&&(!dojo.ns.allow(ns))){_647=false;}}if(_647){var _64c=this.parseAttributes(node);for(var attr in _64c){if((!_649[_645][attr])||(typeof _649[_645][attr]!="array")){_649[_645][attr]=[];}_649[_645][attr].push(_64c[attr]);}_649[_645].nodeRef=node;_649.tagName=_645;_649.index=_644||0;}var _64d=0;for(var i=0;i<node.childNodes.length;i++){var tcn=node.childNodes.item(i);switch(tcn.nodeType){case dojo.dom.ELEMENT_NODE: var ctn=getDojoTagName(tcn)||getTagName(tcn);if(!_649[ctn]){_649[ctn]=[];}_649[ctn].push(this.parseElement(tcn,true,_643,_64d));if((tcn.childNodes.length==1)&&(tcn.childNodes.item(0).nodeType==dojo.dom.TEXT_NODE)){_649[ctn][_649[ctn].length-1].value=tcn.childNodes.item(0).nodeValue;}_64d++;break;case dojo.dom.TEXT_NODE: if(node.childNodes.length==1){_649[_645].push({value:node.childNodes.item(0).nodeValue});}break;default: break;}}return _649;};this.parseAttributes=function(node){var _652={};var atts=node.attributes;var _654,i=0;while((_654=atts[i++])){if(isIE){if(!_654){continue;}if((typeof _654=="object")&&(typeof _654.nodeValue=="undefined")||(_654.nodeValue==null)||(_654.nodeValue=="")){continue;}}var nn=_654.nodeName.split(":");nn=(nn.length==2)?nn[1]:_654.nodeName;_652[nn]={value:_654.nodeValue};}return _652;};};dojo.provide("dojo.lang.declare");dojo.lang.declare=function(_657,_658,init,_65a){if((dojo.lang.isFunction(_65a))||((!_65a)&&(!dojo.lang.isFunction(init)))){if(dojo.lang.isFunction(_65a)){dojo.deprecated("dojo.lang.declare("+_657+"...):","use class, superclass, initializer, properties argument order","0.6");}var temp=_65a;_65a=init;init=temp;}if(_65a&&_65a.initializer){dojo.deprecated("dojo.lang.declare("+_657+"...):","specify initializer as third argument, not as an element in properties","0.6");}var _65c=[];if(dojo.lang.isArray(_658)){_65c=_658;_658=_65c.shift();}if(!init){init=dojo.getObject(_657,false);if((init)&&(!dojo.lang.isFunction(init))){init=null;}}var ctor=dojo.lang.declare._makeConstructor();var scp=(_658?_658.prototype:null);if(scp){scp.prototyping=true;ctor.prototype=new _658();scp.prototyping=false;}ctor.superclass=scp;ctor.mixins=_65c;for(var i=0,l=_65c.length;i<l;i++){dojo.lang.extend(ctor,_65c[i].prototype);}ctor.prototype.initializer=null;ctor.prototype.declaredClass=_657;if(dojo.lang.isArray(_65a)){dojo.lang.extend.apply(dojo.lang,[ctor].concat(_65a));}else{dojo.lang.extend(ctor,(_65a)||{});}dojo.lang.extend(ctor,dojo.lang.declare._common);ctor.prototype.constructor=ctor;ctor.prototype.initializer=(ctor.prototype.initializer)||(init)||(function(){});var _661=dojo.getObject(_657,true,null,true);_661.obj[_661.prop]=ctor;return ctor;};dojo.lang.declare._makeConstructor=function(){return function(){var self=this._getPropContext();var s=self.constructor.superclass;if((s)&&(s.constructor)){if(s.constructor==arguments.callee){this._inherited("constructor",arguments);}else{this._contextMethod(s,"constructor",arguments);}}var ms=(self.constructor.mixins)||([]);for(var i=0,m;(m=ms[i]);i++){(((m.prototype)&&(m.prototype.initializer))||(m)).apply(this,arguments);}if((!this.prototyping)&&(self.initializer)){self.initializer.apply(this,arguments);}};};dojo.lang.declare._common={_getPropContext:function(){return (this.___proto||this);},_contextMethod:function(_667,_668,args){var _66a,_66b=this.___proto;this.___proto=_667;try{_66a=_667[_668].apply(this,(args||[]));}catch(e){throw e;}finally{this.___proto=_66b;}return _66a;},_inherited:function(prop,args){var p=this._getPropContext();do{if((!p.constructor)||(!p.constructor.superclass)){return;}p=p.constructor.superclass;}while(!(prop in p));return (dojo.lang.isFunction(p[prop])?this._contextMethod(p,prop,args):p[prop]);}};dojo.declare=dojo.lang.declare;dojo.provide("dojo.ns");dojo.ns={namespaces:{},failed:{},loading:{},loaded:{},register:function(name,_670,_671,_672){if(!_672||!this.namespaces[name]){this.namespaces[name]=new dojo.ns.Ns(name,_670,_671);}},allow:function(name){if(this.failed[name]){return false;}if((djConfig.excludeNamespace)&&(dojo.lang.inArray(djConfig.excludeNamespace,name))){return false;}return ((name==this.dojo)||(!djConfig.includeNamespace)||(dojo.lang.inArray(djConfig.includeNamespace,name)));},get:function(name){return this.namespaces[name];},require:function(name){var ns=this.namespaces[name];if((ns)&&(this.loaded[name])){return ns;}if(!this.allow(name)){return false;}if(this.loading[name]){dojo.debug("dojo.namespace.require: re-entrant request to load namespace \""+name+"\" must fail.");return false;}var req=dojo.require;this.loading[name]=true;try{if(name=="dojo"){req("dojo.namespaces.dojo");}else{if(!dojo.hostenv.moduleHasPrefix(name)){dojo.registerModulePath(name,"../"+name);}req([name,"manifest"].join("."),false,true);}if(!this.namespaces[name]){this.failed[name]=true;}}finally{this.loading[name]=false;}return this.namespaces[name];}};dojo.ns.Ns=function(name,_679,_67a){this.name=name;this.module=_679;this.resolver=_67a;this._loaded=[];this._failed=[];};dojo.ns.Ns.prototype.resolve=function(name,_67c,_67d){if(!this.resolver||djConfig["skipAutoRequire"]){return false;}var _67e=this.resolver(name,_67c);if((_67e)&&(!this._loaded[_67e])&&(!this._failed[_67e])){var req=dojo.require;req(_67e,false,true);if(dojo.hostenv.findModule(_67e,false)){this._loaded[_67e]=true;}else{if(!_67d){dojo.raise("dojo.ns.Ns.resolve: module '"+_67e+"' not found after loading via namespace '"+this.name+"'");}this._failed[_67e]=true;}}return Boolean(this._loaded[_67e]);};dojo.registerNamespace=function(name,_681,_682){dojo.ns.register.apply(dojo.ns,arguments);};dojo.registerNamespaceResolver=function(name,_684){var n=dojo.ns.namespaces[name];if(n){n.resolver=_684;}};dojo.registerNamespaceManifest=function(_686,path,name,_689,_68a){dojo.registerModulePath(name,path);dojo.registerNamespace(name,_689,_68a);};dojo.registerNamespace("dojo","dojo.widget");dojo.provide("dojo.widget.Manager");dojo.widget.manager=new function(){this.widgets=[];this.widgetIds=[];this.topWidgets={};var _68b={};var _68c=[];this.getUniqueId=function(_68d){var _68e;do{_68e=_68d+"_"+(_68b[_68d]!=undefined?++_68b[_68d]:_68b[_68d]=0);}while(this.getWidgetById(_68e));return _68e;};this.add=function(_68f){this.widgets.push(_68f);if(!_68f.extraArgs["id"]){_68f.extraArgs["id"]=_68f.extraArgs["ID"];}if(_68f.widgetId==""){if(_68f["id"]){_68f.widgetId=_68f["id"];}else{if(_68f.extraArgs["id"]){_68f.widgetId=_68f.extraArgs["id"];}else{_68f.widgetId=this.getUniqueId(_68f.ns+"_"+_68f.widgetType);}}}if(this.widgetIds[_68f.widgetId]){dojo.debug("widget ID collision on ID: "+_68f.widgetId);}this.widgetIds[_68f.widgetId]=_68f;};this.destroyAll=function(){for(var x=this.widgets.length-1;x>=0;x--){try{this.widgets[x].destroy(true);delete this.widgets[x];}catch(e){}}};this.remove=function(_691){if(dojo.lang.isNumber(_691)){var tw=this.widgets[_691].widgetId;delete this.widgetIds[tw];this.widgets.splice(_691,1);}else{this.removeById(_691);}};this.removeById=function(id){if(!dojo.lang.isString(id)){id=id["widgetId"];if(!id){dojo.debug("invalid widget or id passed to removeById");return;}}for(var i=0;i<this.widgets.length;i++){if(this.widgets[i].widgetId==id){this.remove(i);break;}}};this.getWidgetById=function(id){if(dojo.lang.isString(id)){return this.widgetIds[id];}return id;};this.getWidgetsByType=function(type){var lt=type.toLowerCase();var _698=(type.indexOf(":")<0?function(x){return x.widgetType.toLowerCase();}:function(x){return x.getNamespacedType();});var ret=[];dojo.lang.forEach(this.widgets,function(x){if(_698(x)==lt){ret.push(x);}});return ret;};this.getWidgetsByFilter=function(_69d,_69e){var ret=[];dojo.lang.every(this.widgets,function(x){if(_69d(x)){ret.push(x);if(_69e){return false;}}return true;});return (_69e?ret[0]:ret);};this.getAllWidgets=function(){return this.widgets.concat();};this.getWidgetByNode=function(node){var w=this.getAllWidgets();node=dojo.byId(node);for(var i=0;i<w.length;i++){if(w[i].domNode==node){return w[i];}}return null;};this.byId=this.getWidgetById;this.byType=this.getWidgetsByType;this.byFilter=this.getWidgetsByFilter;this.byNode=this.getWidgetByNode;var _6a4={};var _6a5=["dojo.widget"];for(var i=0;i<_6a5.length;i++){_6a5[_6a5[i]]=true;}this.registerWidgetPackage=function(_6a7){if(!_6a5[_6a7]){_6a5[_6a7]=true;_6a5.push(_6a7);}};this.getWidgetPackageList=function(){return dojo.lang.map(_6a5,function(elt){return (elt!==true?elt:undefined);});};this.getImplementation=function(_6a9,_6aa,_6ab,ns){var impl=this.getImplementationName(_6a9,ns);if(impl){var ret=_6aa?new impl(_6aa):new impl();return ret;}};function buildPrefixCache(){for(var _6af in dojo.render){if(dojo.render[_6af]["capable"]===true){var _6b0=dojo.render[_6af].prefixes;for(var i=0;i<_6b0.length;i++){_68c.push(_6b0[i].toLowerCase());}}}}var _6b2=function(_6b3,_6b4){if(!_6b4){return null;}for(var i=0,l=_68c.length,_6b7;i<=l;i++){_6b7=(i<l?_6b4[_68c[i]]:_6b4);if(!_6b7){continue;}for(var name in _6b7){if(name.toLowerCase()==_6b3){return _6b7[name];}}}return null;};var _6b9=function(_6ba,_6bb){var _6bc=dojo.getObject(_6bb,false);return (_6bc?_6b2(_6ba,_6bc):null);};this.getImplementationName=function(_6bd,ns){var _6bf=_6bd.toLowerCase();ns=ns||"dojo";var imps=_6a4[ns]||(_6a4[ns]={});var impl=imps[_6bf];if(impl){return impl;}if(!_68c.length){buildPrefixCache();}var _6c2=dojo.ns.get(ns);if(!_6c2){dojo.ns.register(ns,ns+".widget");_6c2=dojo.ns.get(ns);}if(_6c2){_6c2.resolve(_6bd);}impl=_6b9(_6bf,_6c2.module);if(impl){return (imps[_6bf]=impl);}_6c2=dojo.ns.require(ns);if((_6c2)&&(_6c2.resolver)){_6c2.resolve(_6bd);impl=_6b9(_6bf,_6c2.module);if(impl){return (imps[_6bf]=impl);}}throw new Error("Could not locate widget implementation for \""+_6bd+"\" in \""+_6c2.module+"\" registered to namespace \""+_6c2.name+"\"");};this.resizing=false;this.onWindowResized=function(){if(this.resizing){return;}try{this.resizing=true;for(var id in this.topWidgets){var _6c4=this.topWidgets[id];if(_6c4.checkSize){_6c4.checkSize();}}}catch(e){}finally{this.resizing=false;}};if(typeof window!="undefined"){dojo.addOnLoad(this,"onWindowResized");dojo.event.connect(window,"onresize",this,"onWindowResized");}};(function(){var dw=dojo.widget;var dwm=dw.manager;var h=dojo.lang.curry(dojo.lang,"hitch",dwm);var g=function(_6c9,_6ca){dw[(_6ca||_6c9)]=h(_6c9);};g("add","addWidget");g("destroyAll","destroyAllWidgets");g("remove","removeWidget");g("removeById","removeWidgetById");g("getWidgetById");g("getWidgetById","byId");g("getWidgetsByType");g("getWidgetsByFilter");g("getWidgetsByType","byType");g("getWidgetsByFilter","byFilter");g("getWidgetByNode","byNode");dw.all=function(n){var _6cc=dwm.getAllWidgets.apply(dwm,arguments);if(arguments.length>0){return _6cc[n];}return _6cc;};g("registerWidgetPackage");g("getImplementation","getWidgetImplementation");g("getImplementationName","getWidgetImplementationName");dw.widgets=dwm.widgets;dw.widgetIds=dwm.widgetIds;dw.root=dwm.root;})();dojo.provide("dojo.uri.*");dojo.provide("dojo.a11y");dojo.a11y={imgPath:dojo.uri.moduleUri("dojo","widget/templates/images"),doAccessibleCheck:true,accessible:null,checkAccessible:function(){if(this.accessible===null){this.accessible=false;if(this.doAccessibleCheck==true){this.accessible=this.testAccessible();}}return this.accessible;},testAccessible:function(){this.accessible=false;if(dojo.render.html.ie||dojo.render.html.mozilla){var div=document.createElement("div");div.style.backgroundImage="url(\""+this.imgPath+"/tab_close.gif\")";dojo.body().appendChild(div);var _6ce=null;if(window.getComputedStyle){var _6cf=getComputedStyle(div,"");_6ce=_6cf.getPropertyValue("background-image");}else{_6ce=div.currentStyle.backgroundImage;}var _6d0=false;if(_6ce!=null&&(_6ce=="none"||_6ce=="url(invalid-url:)")){this.accessible=true;}dojo.body().removeChild(div);}return this.accessible;},setAccessible:function(_6d1){this.accessible=_6d1;},setCheckAccessible:function(_6d2){this.doAccessibleCheck=_6d2;},setAccessibleMode:function(){if(this.accessible===null){if(this.checkAccessible()){dojo.render.html.prefixes.unshift("a11y");}}return this.accessible;}};dojo.provide("dojo.widget.Widget");dojo.declare("dojo.widget.Widget",null,function(){this.children=[];this.extraArgs={};},{parent:null,isTopLevel:false,disabled:false,isContainer:false,widgetId:"",widgetType:"Widget",ns:"dojo",getNamespacedType:function(){return (this.ns?this.ns+":"+this.widgetType:this.widgetType).toLowerCase();},toString:function(){return "[Widget "+this.getNamespacedType()+", "+(this.widgetId||"NO ID")+"]";},repr:function(){return this.toString();},enable:function(){this.disabled=false;},disable:function(){this.disabled=true;},onResized:function(){this.notifyChildrenOfResize();},notifyChildrenOfResize:function(){for(var i=0;i<this.children.length;i++){var _6d4=this.children[i];if(_6d4.onResized){_6d4.onResized();}}},create:function(args,_6d6,_6d7,ns){if(ns){this.ns=ns;}this.satisfyPropertySets(args,_6d6,_6d7);this.mixInProperties(args,_6d6,_6d7);this.postMixInProperties(args,_6d6,_6d7);dojo.widget.manager.add(this);this.buildRendering(args,_6d6,_6d7);this.initialize(args,_6d6,_6d7);this.postInitialize(args,_6d6,_6d7);this.postCreate(args,_6d6,_6d7);return this;},destroy:function(_6d9){if(this.parent){this.parent.removeChild(this);}this.destroyChildren();this.uninitialize();this.destroyRendering(_6d9);dojo.widget.manager.removeById(this.widgetId);},destroyChildren:function(){var _6da;var i=0;while(this.children.length>i){_6da=this.children[i];if(_6da instanceof dojo.widget.Widget){this.removeChild(_6da);_6da.destroy();continue;}i++;}},getChildrenOfType:function(type,_6dd){var ret=[];var _6df=dojo.lang.isFunction(type);if(!_6df){type=type.toLowerCase();}for(var x=0;x<this.children.length;x++){if(_6df){if(this.children[x] instanceof type){ret.push(this.children[x]);}}else{if(this.children[x].widgetType.toLowerCase()==type){ret.push(this.children[x]);}}if(_6dd){ret=ret.concat(this.children[x].getChildrenOfType(type,_6dd));}}return ret;},getDescendants:function(){var _6e1=[];var _6e2=[this];var elem;while((elem=_6e2.pop())){_6e1.push(elem);if(elem.children){dojo.lang.forEach(elem.children,function(elem){_6e2.push(elem);});}}return _6e1;},isFirstChild:function(){return this===this.parent.children[0];},isLastChild:function(){return this===this.parent.children[this.parent.children.length-1];},satisfyPropertySets:function(args){return args;},mixInProperties:function(args,frag){if((args["fastMixIn"])||(frag["fastMixIn"])){for(var x in args){this[x]=args[x];}return;}var _6e9;var _6ea=dojo.widget.lcArgsCache[this.widgetType];if(_6ea==null){_6ea={};for(var y in this){_6ea[((new String(y)).toLowerCase())]=y;}dojo.widget.lcArgsCache[this.widgetType]=_6ea;}var _6ec={};for(var x in args){if(!this[x]){var y=_6ea[(new String(x)).toLowerCase()];if(y){args[y]=args[x];x=y;}}if(_6ec[x]){continue;}_6ec[x]=true;if((typeof this[x])!=(typeof _6e9)){if(typeof args[x]!="string"){this[x]=args[x];}else{if(dojo.lang.isString(this[x])){this[x]=args[x];}else{if(dojo.lang.isNumber(this[x])){this[x]=new Number(args[x]);}else{if(dojo.lang.isBoolean(this[x])){this[x]=(args[x].toLowerCase()=="false")?false:true;}else{if(dojo.lang.isFunction(this[x])){if(args[x].search(/[^\w\.]+/i)==-1){this[x]=dojo.getObject(args[x],false);}else{var tn=dojo.lang.nameAnonFunc(new Function(args[x]),this);dojo.event.kwConnect({srcObj:this,srcFunc:x,adviceObj:this,adviceFunc:tn});}}else{if(dojo.lang.isArray(this[x])){this[x]=args[x].split(";");}else{if(this[x] instanceof Date){this[x]=new Date(Number(args[x]));}else{if(typeof this[x]=="object"){if(this[x] instanceof dojo.uri.Uri){this[x]=dojo.uri.dojoUri(args[x]);}else{var _6ee=args[x].split(";");for(var y=0;y<_6ee.length;y++){var si=_6ee[y].indexOf(":");if((si!=-1)&&(_6ee[y].length>si)){this[x][_6ee[y].substr(0,si).replace(/^\s+|\s+$/g,"")]=_6ee[y].substr(si+1);}}}}else{this[x]=args[x];}}}}}}}}}else{this.extraArgs[x.toLowerCase()]=args[x];}}},postMixInProperties:function(args,frag,_6f2){},initialize:function(args,frag,_6f5){return false;},postInitialize:function(args,frag,_6f8){return false;},postCreate:function(args,frag,_6fb){return false;},uninitialize:function(){return false;},buildRendering:function(args,frag,_6fe){dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", ");return false;},destroyRendering:function(){dojo.unimplemented("dojo.widget.Widget.destroyRendering");return false;},addedTo:function(_6ff){},addChild:function(_700){dojo.unimplemented("dojo.widget.Widget.addChild");return false;},removeChild:function(_701){for(var x=0;x<this.children.length;x++){if(this.children[x]===_701){this.children.splice(x,1);_701.parent=null;break;}}return _701;},getPreviousSibling:function(){var idx=this.getParentIndex();if(idx<=0){return null;}return this.parent.children[idx-1];},getSiblings:function(){return this.parent.children;},getParentIndex:function(){return dojo.lang.indexOf(this.parent.children,this,true);},getNextSibling:function(){var idx=this.getParentIndex();if(idx==this.parent.children.length-1){return null;}if(idx<0){return null;}return this.parent.children[idx+1];}});dojo.widget.lcArgsCache={};dojo.widget.tags={};dojo.widget.tags["dojo:propertyset"]=function(_705,_706,_707){var _708=_706.parseProperties(_705["dojo:propertyset"]);};dojo.widget.tags["dojo:connect"]=function(_709,_70a,_70b){var _70c=_70a.parseProperties(_709["dojo:connect"]);};dojo.widget.buildWidgetFromParseTree=function(type,frag,_70f,_710,_711,_712){dojo.a11y.setAccessibleMode();var _713=type.split(":");_713=(_713.length==2)?_713[1]:type;var _714=_712||_70f.parseProperties(frag[frag["ns"]+":"+_713]);var _715=dojo.widget.manager.getImplementation(_713,null,null,frag["ns"]);if(!_715){throw new Error("cannot find \""+type+"\" widget");}else{if(!_715.create){throw new Error("\""+type+"\" widget object has no \"create\" method and does not appear to implement *Widget");}}_714["dojoinsertionindex"]=_711;var ret=_715.create(_714,frag,_710,frag["ns"]);return ret;};dojo.widget.defineWidget=function(_717,_718,_719,init,_71b){if(dojo.lang.isString(arguments[3])){dojo.widget._defineWidget(arguments[0],arguments[3],arguments[1],arguments[4],arguments[2]);}else{var args=[arguments[0]],p=3;if(dojo.lang.isString(arguments[1])){args.push(arguments[1],arguments[2]);}else{args.push("",arguments[1]);p=2;}if(dojo.lang.isFunction(arguments[p])){args.push(arguments[p],arguments[p+1]);}else{args.push(null,arguments[p]);}dojo.widget._defineWidget.apply(this,args);}};dojo.widget.defineWidget.renderers="html|svg|vml";dojo.widget._defineWidget=function(_71e,_71f,_720,init,_722){var _723=_71e.split(".");var type=_723.pop();var regx="\\.("+(_71f?_71f+"|":"")+dojo.widget.defineWidget.renderers+")\\.";var r=_71e.search(new RegExp(regx));_723=(r<0?_723.join("."):_71e.substr(0,r));dojo.widget.manager.registerWidgetPackage(_723);var pos=_723.indexOf(".");var _728=(pos>-1)?_723.substring(0,pos):_723;_722=(_722)||{};_722.widgetType=type;if((!init)&&(_722["classConstructor"])){init=_722.classConstructor;delete _722.classConstructor;}dojo.declare(_71e,_720,init,_722);};dojo.provide("dojo.widget.Parse");dojo.widget.Parse=function(_729){this.propertySetsList=[];this.fragment=_729;this.createComponents=function(frag,_72b){var _72c=[];var _72d=false;try{if(frag&&frag.tagName&&(frag!=frag.nodeRef)){var _72e=dojo.widget.tags;var tna=String(frag.tagName).split(";");for(var x=0;x<tna.length;x++){var ltn=tna[x].replace(/^\s+|\s+$/g,"").toLowerCase();frag.tagName=ltn;var ret;if(_72e[ltn]){_72d=true;ret=_72e[ltn](frag,this,_72b,frag.index);_72c.push(ret);}else{if(ltn.indexOf(":")==-1){ltn="dojo:"+ltn;}ret=dojo.widget.buildWidgetFromParseTree(ltn,frag,this,_72b,frag.index);if(ret){_72d=true;_72c.push(ret);}}}}}catch(e){dojo.debug("dojo.widget.Parse: error:",e);}if(!_72d){_72c=_72c.concat(this.createSubComponents(frag,_72b));}return _72c;};this.createSubComponents=function(_733,_734){var frag,_736=[];for(var item in _733){frag=_733[item];if(frag&&typeof frag=="object"&&(frag!=_733.nodeRef)&&(frag!=_733.tagName)&&(item.indexOf("$")==-1)){_736=_736.concat(this.createComponents(frag,_734));}}return _736;};this.parsePropertySets=function(_738){return [];};this.parseProperties=function(_739){var _73a={};for(var item in _739){if((_739[item]==_739.tagName)||(_739[item]==_739.nodeRef)){}else{var frag=_739[item];if(frag.tagName&&dojo.widget.tags[frag.tagName.toLowerCase()]){}else{if(frag[0]&&frag[0].value!=""&&frag[0].value!=null){try{if(item.toLowerCase()=="dataprovider"){var _73d=this;this.getDataProvider(_73d,frag[0].value);_73a.dataProvider=this.dataProvider;}_73a[item]=frag[0].value;var _73e=this.parseProperties(frag);for(var _73f in _73e){_73a[_73f]=_73e[_73f];}}catch(e){dojo.debug(e);}}}switch(item.toLowerCase()){case "checked": case "disabled": if(typeof _73a[item]!="boolean"){_73a[item]=true;}break;}}}return _73a;};this.getDataProvider=function(_740,_741){dojo.io.bind({url:_741,load:function(type,_743){if(type=="load"){_740.dataProvider=_743;}},mimetype:"text/javascript",sync:true});};this.getPropertySetById=function(_744){for(var x=0;x<this.propertySetsList.length;x++){if(_744==this.propertySetsList[x]["id"][0].value){return this.propertySetsList[x];}}return "";};this.getPropertySetsByType=function(_746){var _747=[];for(var x=0;x<this.propertySetsList.length;x++){var cpl=this.propertySetsList[x];var cpcc=cpl.componentClass||cpl.componentType||null;var _74b=this.propertySetsList[x]["id"][0].value;if(cpcc&&(_74b==cpcc[0].value)){_747.push(cpl);}}return _747;};this.getPropertySets=function(_74c){var ppl="dojo:propertyproviderlist";var _74e=[];var _74f=_74c.tagName;if(_74c[ppl]){var _750=_74c[ppl].value.split(" ");for(var _751 in _750){if((_751.indexOf("..")==-1)&&(_751.indexOf("://")==-1)){var _752=this.getPropertySetById(_751);if(_752!=""){_74e.push(_752);}}else{}}}return this.getPropertySetsByType(_74f).concat(_74e);};this.createComponentFromScript=function(_753,_754,_755,ns){_755.fastMixIn=true;var ltn=(ns||"dojo")+":"+_754.toLowerCase();if(dojo.widget.tags[ltn]){return [dojo.widget.tags[ltn](_755,this,null,null,_755)];}return [dojo.widget.buildWidgetFromParseTree(ltn,_755,this,null,null,_755)];};};dojo.widget._parser_collection={"dojo":new dojo.widget.Parse()};dojo.widget.getParser=function(name){if(!name){name="dojo";}if(!this._parser_collection[name]){this._parser_collection[name]=new dojo.widget.Parse();}return this._parser_collection[name];};dojo.widget.createWidget=function(name,_75a,_75b,_75c){var _75d=false;var _75e=(typeof name=="string");if(_75e){var pos=name.indexOf(":");var ns=(pos>-1)?name.substring(0,pos):"dojo";if(pos>-1){name=name.substring(pos+1);}var _761=name.toLowerCase();var _762=ns+":"+_761;_75d=(dojo.byId(name)&&!dojo.widget.tags[_762]);}if((arguments.length==1)&&(_75d||!_75e)){var xp=new dojo.xml.Parse();var tn=_75d?dojo.byId(name):name;return dojo.widget.getParser().createComponents(xp.parseElement(tn,null,true))[0];}function fromScript(_765,name,_767,ns){_767[_762]={dojotype:[{value:_761}],nodeRef:_765,fastMixIn:true};_767.ns=ns;return dojo.widget.getParser().createComponentFromScript(_765,name,_767,ns);}_75a=_75a||{};var _769=false;var tn=null;var h=dojo.render.html.capable;if(h){tn=document.createElement("span");}if(!_75b){_769=true;_75b=tn;if(h){dojo.body().appendChild(_75b);}}else{if(_75c){dojo.dom.insertAtPosition(tn,_75b,_75c);}else{tn=_75b;}}var _76b=fromScript(tn,name.toLowerCase(),_75a,ns);if((!_76b)||(!_76b[0])||(typeof _76b[0].widgetType=="undefined")){throw new Error("createWidget: Creation of \""+name+"\" widget failed.");}try{if(_769&&_76b[0].domNode.parentNode){_76b[0].domNode.parentNode.removeChild(_76b[0].domNode);}}catch(e){dojo.debug(e);}return _76b[0];};dojo.provide("dojo.widget.DomWidget");dojo.widget._cssFiles={};dojo.widget._cssStrings={};dojo.widget._templateCache={};dojo.widget.defaultStrings={dojoRoot:dojo.hostenv.getBaseScriptUri(),dojoModuleUri:dojo.uri.moduleUri("dojo"),baseScriptUri:dojo.hostenv.getBaseScriptUri()};dojo.widget.fillFromTemplateCache=function(obj,_76d,_76e,_76f){var _770=_76d||obj.templatePath;var _771=dojo.widget._templateCache;if(!_770&&!obj["widgetType"]){do{var _772="__dummyTemplate__"+dojo.widget._templateCache.dummyCount++;}while(_771[_772]);obj.widgetType=_772;}var wt=_770?_770.toString():obj.widgetType;var ts=_771[wt];if(!ts){_771[wt]={"string":null,"node":null};if(_76f){ts={};}else{ts=_771[wt];}}if((!obj.templateString)&&(!_76f)){obj.templateString=_76e||ts["string"];}if(obj.templateString){obj.templateString=this._sanitizeTemplateString(obj.templateString);}if((!obj.templateNode)&&(!_76f)){obj.templateNode=ts["node"];}if((!obj.templateNode)&&(!obj.templateString)&&(_770)){var _775=this._sanitizeTemplateString(dojo.hostenv.getText(_770));obj.templateString=_775;if(!_76f){_771[wt]["string"]=_775;}}if((!ts["string"])&&(!_76f)){ts.string=obj.templateString;}};dojo.widget._sanitizeTemplateString=function(_776){if(_776){_776=_776.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _777=_776.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_777){_776=_777[1];}}else{_776="";}return _776;};dojo.widget._templateCache.dummyCount=0;dojo.widget.attachProperties=["dojoAttachPoint","id"];dojo.widget.eventAttachProperty="dojoAttachEvent";dojo.widget.onBuildProperty="dojoOnBuild";dojo.widget.waiNames=["waiRole","waiState"];dojo.widget.wai={waiRole:{name:"waiRole","namespace":"http://www.w3.org/TR/xhtml2",alias:"x2",prefix:"wairole:"},waiState:{name:"waiState","namespace":"http://www.w3.org/2005/07/aaa",alias:"aaa",prefix:""},setAttr:function(node,ns,attr,_77b){if(dojo.render.html.ie){node.setAttribute(this[ns].alias+":"+attr,this[ns].prefix+_77b);}else{node.setAttributeNS(this[ns]["namespace"],attr,this[ns].prefix+_77b);}},getAttr:function(node,ns,attr){if(dojo.render.html.ie){return node.getAttribute(this[ns].alias+":"+attr);}else{return node.getAttributeNS(this[ns]["namespace"],attr);}},removeAttr:function(node,ns,attr){var _782=true;if(dojo.render.html.ie){_782=node.removeAttribute(this[ns].alias+":"+attr);}else{node.removeAttributeNS(this[ns]["namespace"],attr);}return _782;}};dojo.widget.attachTemplateNodes=function(_783,_784,_785){var _786=dojo.dom.ELEMENT_NODE;function trim(str){return str.replace(/^\s+|\s+$/g,"");}if(!_783){_783=_784.domNode;}if(_783.nodeType!=_786){return;}var _788=_783.all||_783.getElementsByTagName("*");var _789=_784;for(var x=-1;x<_788.length;x++){var _78b=(x==-1)?_783:_788[x];var _78c=[];if(!_784.widgetsInTemplate||!_78b.getAttribute("dojoType")){for(var y=0;y<this.attachProperties.length;y++){var _78e=_78b.getAttribute(this.attachProperties[y]);if(_78e){_78c=_78e.split(";");for(var z=0;z<_78c.length;z++){if(dojo.lang.isArray(_784[_78c[z]])){_784[_78c[z]].push(_78b);}else{_784[_78c[z]]=_78b;}}break;}}var _790=_78b.getAttribute(this.eventAttachProperty);if(_790){var evts=_790.split(";");for(var y=0;y<evts.length;y++){if((!evts[y])||(!evts[y].length)){continue;}var _792=null;var tevt=trim(evts[y]);if(evts[y].indexOf(":")>=0){var _794=tevt.split(":");tevt=trim(_794[0]);_792=trim(_794[1]);}if(!_792){_792=tevt;}var tf=function(){var ntf=new String(_792);return function(evt){if(_789[ntf]){_789[ntf](dojo.event.browser.fixEvent(evt,this));}};}();dojo.event.browser.addListener(_78b,tevt,tf,false,true);}}for(var y=0;y<_785.length;y++){var _798=_78b.getAttribute(_785[y]);if((_798)&&(_798.length)){var _792=null;var _799=_785[y].substr(4);_792=trim(_798);var _79a=[_792];if(_792.indexOf(";")>=0){_79a=dojo.lang.map(_792.split(";"),trim);}for(var z=0;z<_79a.length;z++){if(!_79a[z].length){continue;}var tf=function(){var ntf=new String(_79a[z]);return function(evt){if(_789[ntf]){_789[ntf](dojo.event.browser.fixEvent(evt,this));}};}();dojo.event.browser.addListener(_78b,_799,tf,false,true);}}}}var _79d=_78b.getAttribute(this.templateProperty);if(_79d){_784[_79d]=_78b;}dojo.lang.forEach(dojo.widget.waiNames,function(name){var wai=dojo.widget.wai[name];var val=_78b.getAttribute(wai.name);if(val){if(val.indexOf("-")==-1){dojo.widget.wai.setAttr(_78b,wai.name,"role",val);}else{var _7a1=val.split("-");dojo.widget.wai.setAttr(_78b,wai.name,_7a1[0],_7a1[1]);}}},this);var _7a2=_78b.getAttribute(this.onBuildProperty);if(_7a2){eval("var node = baseNode; var widget = targetObj; "+_7a2);}}};dojo.widget.getDojoEventsFromStr=function(str){var re=/(dojoOn([a-z]+)(\s?))=/gi;var evts=str?str.match(re)||[]:[];var ret=[];var lem={};for(var x=0;x<evts.length;x++){if(evts[x].length<1){continue;}var cm=evts[x].replace(/\s/,"");cm=(cm.slice(0,cm.length-1));if(!lem[cm]){lem[cm]=true;ret.push(cm);}}return ret;};dojo.declare("dojo.widget.DomWidget",dojo.widget.Widget,function(){if((arguments.length>0)&&(typeof arguments[0]=="object")){this.create(arguments[0]);}},{templateNode:null,templateString:null,templateCssString:null,preventClobber:false,domNode:null,containerNode:null,widgetsInTemplate:false,addChild:function(_7aa,_7ab,pos,ref,_7ae){if(typeof _7ae=="undefined"){_7ae=this.children.length;}this.addWidgetAsDirectChild(_7aa,_7ab,pos,ref,_7ae);this.registerChild(_7aa,_7ae);return _7aa;},addWidgetAsDirectChild:function(_7af,_7b0,pos,ref,_7b3){if((!this.containerNode)&&(!_7b0)){this.containerNode=this.domNode;}var cn=(_7b0)?_7b0:this.containerNode;if(!pos){pos="after";}if(!ref){if(!cn){cn=dojo.body();}ref=cn.lastChild;}if(!_7b3){_7b3=0;}_7af.domNode.setAttribute("dojoinsertionindex",_7b3);if(!ref){cn.appendChild(_7af.domNode);}else{if(pos=="insertAtIndex"){dojo.dom.insertAtIndex(_7af.domNode,ref.parentNode,_7b3);}else{if((pos=="after")&&(ref===cn.lastChild)){cn.appendChild(_7af.domNode);}else{dojo.dom.insertAtPosition(_7af.domNode,cn,pos);}}}},registerChild:function(_7b5,_7b6){_7b5.dojoInsertionIndex=_7b6;var idx=-1;for(var i=0;i<this.children.length;i++){if(this.children[i].dojoInsertionIndex<=_7b6){idx=i;}}this.children.splice(idx+1,0,_7b5);_7b5.parent=this;_7b5.addedTo(this,idx+1);delete dojo.widget.manager.topWidgets[_7b5.widgetId];},removeChild:function(_7b9){dojo.dom.removeNode(_7b9.domNode);return dojo.widget.DomWidget.superclass.removeChild.call(this,_7b9);},getFragNodeRef:function(frag){if(!frag){return null;}if(!frag[this.getNamespacedType()]){dojo.raise("Error: no frag for widget type "+this.getNamespacedType()+", id "+this.widgetId+" (maybe a widget has set it's type incorrectly)");}return frag[this.getNamespacedType()]["nodeRef"];},postInitialize:function(args,frag,_7bd){var _7be=this.getFragNodeRef(frag);if(_7bd&&(_7bd.snarfChildDomOutput||!_7be)){_7bd.addWidgetAsDirectChild(this,"","insertAtIndex","",args["dojoinsertionindex"],_7be);}else{if(_7be){if(this.domNode&&(this.domNode!==_7be)){this._sourceNodeRef=dojo.dom.replaceNode(_7be,this.domNode);}}}if(_7bd){_7bd.registerChild(this,args.dojoinsertionindex);}else{dojo.widget.manager.topWidgets[this.widgetId]=this;}if(this.widgetsInTemplate){var _7bf=new dojo.xml.Parse();var _7c0;var _7c1=this.domNode.getElementsByTagName("*");for(var i=0;i<_7c1.length;i++){if(_7c1[i].getAttribute("dojoAttachPoint")=="subContainerWidget"){_7c0=_7c1[i];}if(_7c1[i].getAttribute("dojoType")){_7c1[i].setAttribute("isSubWidget",true);}}if(this.isContainer&&!this.containerNode){if(_7c0){var src=this.getFragNodeRef(frag);if(src){dojo.dom.moveChildren(src,_7c0);frag["dojoDontFollow"]=true;}}else{dojo.debug("No subContainerWidget node can be found in template file for widget "+this);}}var _7c4=_7bf.parseElement(this.domNode,null,true);dojo.widget.getParser().createSubComponents(_7c4,this);var _7c5=[];var _7c6=[this];var w;while((w=_7c6.pop())){for(var i=0;i<w.children.length;i++){var _7c8=w.children[i];if(_7c8._processedSubWidgets||!_7c8.extraArgs["issubwidget"]){continue;}_7c5.push(_7c8);if(_7c8.isContainer){_7c6.push(_7c8);}}}for(var i=0;i<_7c5.length;i++){var _7c9=_7c5[i];if(_7c9._processedSubWidgets){dojo.debug("This should not happen: widget._processedSubWidgets is already true!");return;}_7c9._processedSubWidgets=true;if(_7c9.extraArgs["dojoattachevent"]){var evts=_7c9.extraArgs["dojoattachevent"].split(";");for(var j=0;j<evts.length;j++){var _7cc=null;var tevt=dojo.string.trim(evts[j]);if(tevt.indexOf(":")>=0){var _7ce=tevt.split(":");tevt=dojo.string.trim(_7ce[0]);_7cc=dojo.string.trim(_7ce[1]);}if(!_7cc){_7cc=tevt;}if(dojo.lang.isFunction(_7c9[tevt])){dojo.event.kwConnect({srcObj:_7c9,srcFunc:tevt,targetObj:this,targetFunc:_7cc});}else{alert(tevt+" is not a function in widget "+_7c9);}}}if(_7c9.extraArgs["dojoattachpoint"]){this[_7c9.extraArgs["dojoattachpoint"]]=_7c9;}}}if(this.isContainer&&!frag["dojoDontFollow"]){dojo.widget.getParser().createSubComponents(frag,this);}},buildRendering:function(args,frag){var ts=dojo.widget._templateCache[this.widgetType];if(args["templatecsspath"]){args["templateCssPath"]=args["templatecsspath"];}var _7d2=args["templateCssPath"]||this.templateCssPath;if(_7d2&&!dojo.widget._cssFiles[_7d2.toString()]){if((!this.templateCssString)&&(_7d2)){this.templateCssString=dojo.hostenv.getText(_7d2);this.templateCssPath=null;}dojo.widget._cssFiles[_7d2.toString()]=true;}if((this["templateCssString"])&&(!dojo.widget._cssStrings[this.templateCssString])){dojo.html.insertCssText(this.templateCssString,null,_7d2);dojo.widget._cssStrings[this.templateCssString]=true;}if((!this.preventClobber)&&((this.templatePath)||(this.templateNode)||((this["templateString"])&&(this.templateString.length))||((typeof ts!="undefined")&&((ts["string"])||(ts["node"]))))){this.buildFromTemplate(args,frag);}else{this.domNode=this.getFragNodeRef(frag);}this.fillInTemplate(args,frag);},buildFromTemplate:function(args,frag){var _7d5=false;if(args["templatepath"]){args["templatePath"]=args["templatepath"];}dojo.widget.fillFromTemplateCache(this,args["templatePath"],null,_7d5);var ts=dojo.widget._templateCache[this.templatePath?this.templatePath.toString():this.widgetType];if((ts)&&(!_7d5)){if(!this.templateString.length){this.templateString=ts["string"];}if(!this.templateNode){this.templateNode=ts["node"];}}var _7d7=false;var node=null;var tstr=this.templateString;if((!this.templateNode)&&(this.templateString)){_7d7=this.templateString.match(/\$\{([^\}]+)\}/g);if(_7d7){var hash=this.strings||{};for(var key in dojo.widget.defaultStrings){if(dojo.lang.isUndefined(hash[key])){hash[key]=dojo.widget.defaultStrings[key];}}for(var i=0;i<_7d7.length;i++){var key=_7d7[i];key=key.substring(2,key.length-1);var kval=(key.substring(0,5)=="this.")?dojo.getObject(key.substring(5),false,this):hash[key];var _7de;if((kval)||(dojo.lang.isString(kval))){_7de=new String((dojo.lang.isFunction(kval))?kval.call(this,key,this.templateString):kval);while(_7de.indexOf("\"")>-1){_7de=_7de.replace("\"","&quot;");}tstr=tstr.replace(_7d7[i],_7de);}}}else{this.templateNode=this.createNodesFromText(this.templateString,true)[0];if(!_7d5){ts.node=this.templateNode;}}}if((!this.templateNode)&&(!_7d7)){dojo.debug("DomWidget.buildFromTemplate: could not create template");return false;}else{if(!_7d7){node=this.templateNode.cloneNode(true);if(!node){return false;}}else{node=this.createNodesFromText(tstr,true)[0];}}this.domNode=node;this.attachTemplateNodes();if(this.isContainer&&this.containerNode){var src=this.getFragNodeRef(frag);if(src){dojo.dom.moveChildren(src,this.containerNode);}}},attachTemplateNodes:function(_7e0,_7e1){if(!_7e0){_7e0=this.domNode;}if(!_7e1){_7e1=this;}return dojo.widget.attachTemplateNodes(_7e0,_7e1,dojo.widget.getDojoEventsFromStr(this.templateString));},fillInTemplate:function(){},destroyRendering:function(){try{dojo.dom.destroyNode(this.domNode);delete this.domNode;}catch(e){}if(this._sourceNodeRef){try{dojo.dom.destroyNode(this._sourceNodeRef);}catch(e){}}},createNodesFromText:function(){dojo.unimplemented("dojo.widget.DomWidget.createNodesFromText");}});dojo.provide("dojo.html.util");dojo.html.getElementWindow=function(_7e2){return dojo.html.getDocumentWindow(_7e2.ownerDocument);};dojo.html.getDocumentWindow=function(doc){if(dojo.render.html.safari&&!doc._parentWindow){var fix=function(win){win.document._parentWindow=win;for(var i=0;i<win.frames.length;i++){fix(win.frames[i]);}};fix(window.top);}if(dojo.render.html.ie&&window!==document.parentWindow&&!doc._parentWindow){doc.parentWindow.execScript("document._parentWindow = window;","Javascript");var win=doc._parentWindow;doc._parentWindow=null;return win;}return doc._parentWindow||doc.parentWindow||doc.defaultView;};dojo.html.getAbsolutePositionExt=function(node,_7e9,_7ea,_7eb){var _7ec=dojo.html.getElementWindow(node);var ret=dojo.withGlobal(_7ec,"getAbsolutePosition",dojo.html,arguments);var win=dojo.html.getElementWindow(node);if(_7eb!=win&&win.frameElement){var ext=dojo.html.getAbsolutePositionExt(win.frameElement,_7e9,_7ea,_7eb);ret.x+=ext.x;ret.y+=ext.y;}ret.top=ret.y;ret.left=ret.x;return ret;};dojo.html.gravity=function(node,e){node=dojo.byId(node);var _7f2=dojo.html.getCursorPosition(e);with(dojo.html){var _7f3=getAbsolutePosition(node,true);var bb=getBorderBox(node);var _7f5=_7f3.x+(bb.width/2);var _7f6=_7f3.y+(bb.height/2);}with(dojo.html.gravity){return ((_7f2.x<_7f5?WEST:EAST)|(_7f2.y<_7f6?NORTH:SOUTH));}};dojo.html.gravity.NORTH=1;dojo.html.gravity.SOUTH=1<<1;dojo.html.gravity.EAST=1<<2;dojo.html.gravity.WEST=1<<3;dojo.html.overElement=function(_7f7,e){_7f7=dojo.byId(_7f7);var _7f9=dojo.html.getCursorPosition(e);var bb=dojo.html.getBorderBox(_7f7);var _7fb=dojo.html.getAbsolutePosition(_7f7,true,dojo.html.boxSizing.BORDER_BOX);var top=_7fb.y;var _7fd=top+bb.height;var left=_7fb.x;var _7ff=left+bb.width;return (_7f9.x>=left&&_7f9.x<=_7ff&&_7f9.y>=top&&_7f9.y<=_7fd);};dojo.html.renderedTextContent=function(node){node=dojo.byId(node);var _801="";if(node==null){return _801;}for(var i=0;i<node.childNodes.length;i++){switch(node.childNodes[i].nodeType){case 1: case 5: var _803="unknown";try{_803=dojo.html.getStyle(node.childNodes[i],"display");}catch(E){}switch(_803){case "block": case "list-item": case "run-in": case "table": case "table-row-group": case "table-header-group": case "table-footer-group": case "table-row": case "table-column-group": case "table-column": case "table-cell": case "table-caption": _801+="\n";_801+=dojo.html.renderedTextContent(node.childNodes[i]);_801+="\n";break;case "none": break;default: if(node.childNodes[i].tagName&&node.childNodes[i].tagName.toLowerCase()=="br"){_801+="\n";}else{_801+=dojo.html.renderedTextContent(node.childNodes[i]);}break;}break;case 3: case 2: case 4: var text=node.childNodes[i].nodeValue;var _805="unknown";try{_805=dojo.html.getStyle(node,"text-transform");}catch(E){}switch(_805){case "capitalize": var _806=text.split(" ");for(var i=0;i<_806.length;i++){_806[i]=_806[i].charAt(0).toUpperCase()+_806[i].substring(1);}text=_806.join(" ");break;case "uppercase": text=text.toUpperCase();break;case "lowercase": text=text.toLowerCase();break;default: break;}switch(_805){case "nowrap": break;case "pre-wrap": break;case "pre-line": break;case "pre": break;default: text=text.replace(/\s+/," ");if(/\s$/.test(_801)){text.replace(/^\s/,"");}break;}_801+=text;break;default: break;}}return _801;};dojo.html.createNodesFromText=function(txt,trim){if(trim){txt=txt.replace(/^\s+|\s+$/g,"");}var tn=dojo.doc().createElement("div");tn.style.visibility="hidden";dojo.body().appendChild(tn);var _80a="none";if((/^<t[dh][\s\r\n>]/i).test(txt.replace(/^\s+/))){txt="<table><tbody><tr>"+txt+"</tr></tbody></table>";_80a="cell";}else{if((/^<tr[\s\r\n>]/i).test(txt.replace(/^\s+/))){txt="<table><tbody>"+txt+"</tbody></table>";_80a="row";}else{if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(txt.replace(/^\s+/))){txt="<table>"+txt+"</table>";_80a="section";}}}tn.innerHTML=txt;if(tn["normalize"]){tn.normalize();}var _80b=null;switch(_80a){case "cell": _80b=tn.getElementsByTagName("tr")[0];break;case "row": _80b=tn.getElementsByTagName("tbody")[0];break;case "section": _80b=tn.getElementsByTagName("table")[0];break;default: _80b=tn;break;}var _80c=[];for(var x=0;x<_80b.childNodes.length;x++){_80c.push(_80b.childNodes[x].cloneNode(true));}tn.style.display="none";dojo.html.destroyNode(tn);return _80c;};dojo.html.placeOnScreen=function(node,_80f,_810,_811,_812,_813,_814){if(_80f instanceof Array||typeof _80f=="array"){_814=_813;_813=_812;_812=_811;_811=_810;_810=_80f[1];_80f=_80f[0];}if(_813 instanceof String||typeof _813=="string"){_813=_813.split(",");}if(!isNaN(_811)){_811=[Number(_811),Number(_811)];}else{if(!(_811 instanceof Array||typeof _811=="array")){_811=[0,0];}}var _815=dojo.html.getScroll().offset;var view=dojo.html.getViewport();node=dojo.byId(node);var _817=node.style.display;node.style.display="";var bb=dojo.html.getBorderBox(node);var w=bb.width;var h=bb.height;node.style.display=_817;if(!(_813 instanceof Array||typeof _813=="array")){_813=["TL"];}var _81b,_81c,_81d=Infinity,_81e;for(var _81f=0;_81f<_813.length;++_81f){var _820=_813[_81f];var _821=true;var tryX=_80f-(_820.charAt(1)=="L"?0:w)+_811[0]*(_820.charAt(1)=="L"?1:-1);var tryY=_810-(_820.charAt(0)=="T"?0:h)+_811[1]*(_820.charAt(0)=="T"?1:-1);if(_812){tryX-=_815.x;tryY-=_815.y;}if(tryX<0){tryX=0;_821=false;}if(tryY<0){tryY=0;_821=false;}var x=tryX+w;if(x>view.width){x=view.width-w;_821=false;}else{x=tryX;}x=Math.max(_811[0],x)+_815.x;var y=tryY+h;if(y>view.height){y=view.height-h;_821=false;}else{y=tryY;}y=Math.max(_811[1],y)+_815.y;if(_821){_81b=x;_81c=y;_81d=0;_81e=_820;break;}else{var dist=Math.pow(x-tryX-_815.x,2)+Math.pow(y-tryY-_815.y,2);if(_81d>dist){_81d=dist;_81b=x;_81c=y;_81e=_820;}}}if(!_814){node.style.left=_81b+"px";node.style.top=_81c+"px";}return {left:_81b,top:_81c,x:_81b,y:_81c,dist:_81d,corner:_81e};};dojo.html.placeOnScreenAroundElement=function(node,_828,_829,_82a,_82b,_82c){var best,_82e=Infinity;_828=dojo.byId(_828);var _82f=_828.style.display;_828.style.display="";var mb=dojo.html.getElementBox(_828,_82a);var _831=mb.width;var _832=mb.height;var _833=dojo.html.getAbsolutePosition(_828,true,_82a);_828.style.display=_82f;for(var _834 in _82b){var pos,_836,_837;var _838=_82b[_834];_836=_833.x+(_834.charAt(1)=="L"?0:_831);_837=_833.y+(_834.charAt(0)=="T"?0:_832);pos=dojo.html.placeOnScreen(node,_836,_837,_829,true,_838,true);if(pos.dist==0){best=pos;break;}else{if(_82e>pos.dist){_82e=pos.dist;best=pos;}}}if(!_82c){node.style.left=best.left+"px";node.style.top=best.top+"px";}return best;};dojo.html.scrollIntoView=function(node){if(!node){return;}if(dojo.render.html.ie){if(dojo.html.getBorderBox(node.parentNode).height<=node.parentNode.scrollHeight){node.scrollIntoView(false);}}else{if(dojo.render.html.mozilla){node.scrollIntoView(false);}else{var _83a=node.parentNode;var _83b=_83a.scrollTop+dojo.html.getBorderBox(_83a).height;var _83c=node.offsetTop+dojo.html.getMarginBox(node).height;if(_83b<_83c){_83a.scrollTop+=(_83c-_83b);}else{if(_83a.scrollTop>node.offsetTop){_83a.scrollTop-=(_83a.scrollTop-node.offsetTop);}}}}};dojo.provide("dojo.lfx.toggler");dojo.lfx.toggler.plain=function(){this.stop=function(){};this.show=function(node,_83e,_83f,_840){dojo.html.show(node);if(dojo.lang.isFunction(_840)){_840();}};this.hide=function(node,_842,_843,_844){dojo.html.hide(node);if(dojo.lang.isFunction(_844)){_844();}};};dojo.lfx.toggler.common={stop:function(){if(this.anim&&this.anim.status()!="stopped"){this.anim.stop();}},_act:function(_845,node,_847,_848,_849,_84a){this.stop();this.anim=dojo.lfx[_845](node,_847,_848,_849).play();},show:function(node,_84c,_84d,_84e,_84f){this._act(this.show_action,node,_84c,_84d,_84e,_84f);},hide:function(node,_851,_852,_853,_854){this._act(this.hide_action,node,_851,_852,_853,_854);}};dojo.lfx.toggler.fade=function(){this.anim=null;this.show_action="fadeShow";this.hide_action="fadeHide";};dojo.extend(dojo.lfx.toggler.fade,dojo.lfx.toggler.common);dojo.lfx.toggler.wipe=function(){this.anim=null;this.show_action="wipeIn";this.hide_action="wipeOut";};dojo.extend(dojo.lfx.toggler.wipe,dojo.lfx.toggler.common);dojo.lfx.toggler.explode=function(){this.anim=null;this.show_action="explode";this.hide_action="implode";this.show=function(node,_856,_857,_858,_859){this.stop();this.anim=dojo.lfx.explode(_859||{x:0,y:0,width:0,height:0},node,_856,_857,_858).play();};this.hide=function(node,_85b,_85c,_85d,_85e){this.stop();this.anim=dojo.lfx.implode(node,_85e||{x:0,y:0,width:0,height:0},_85b,_85c,_85d).play();};};dojo.extend(dojo.lfx.toggler.explode,dojo.lfx.toggler.common);dojo.provide("dojo.widget.HtmlWidget");dojo.declare("dojo.widget.HtmlWidget",dojo.widget.DomWidget,{templateCssPath:null,templatePath:null,lang:"",toggle:"plain",toggleDuration:150,initialize:function(args,frag){},postMixInProperties:function(args,frag){if(this.lang===""){this.lang=null;}this.toggleObj=new (dojo.lfx.toggler[this.toggle.toLowerCase()]||dojo.lfx.toggler.plain);},createNodesFromText:function(txt,wrap){return dojo.html.createNodesFromText(txt,wrap);},destroyRendering:function(_865){try{if(this.bgIframe){this.bgIframe.remove();delete this.bgIframe;}if(!_865&&this.domNode){dojo.event.browser.clean(this.domNode);}dojo.widget.HtmlWidget.superclass.destroyRendering.call(this);}catch(e){}},isShowing:function(){return dojo.html.isShowing(this.domNode);},toggleShowing:function(){if(this.isShowing()){this.hide();}else{this.show();}},show:function(){if(this.isShowing()){return;}this.animationInProgress=true;this.toggleObj.show(this.domNode,this.toggleDuration,null,dojo.lang.hitch(this,this.onShow),this.explodeSrc);},onShow:function(){this.animationInProgress=false;this.checkSize();},hide:function(){if(!this.isShowing()){return;}this.animationInProgress=true;this.toggleObj.hide(this.domNode,this.toggleDuration,null,dojo.lang.hitch(this,this.onHide),this.explodeSrc);},onHide:function(){this.animationInProgress=false;},_isResized:function(w,h){if(!this.isShowing()){return false;}var wh=dojo.html.getMarginBox(this.domNode);var _869=w||wh.width;var _86a=h||wh.height;if(this.width==_869&&this.height==_86a){return false;}this.width=_869;this.height=_86a;return true;},checkSize:function(){if(!this._isResized()){return;}this.onResized();},resizeTo:function(w,h){dojo.html.setMarginBox(this.domNode,{width:w,height:h});if(this.isShowing()){this.onResized();}},resizeSoon:function(){if(this.isShowing()){dojo.lang.setTimeout(this,this.onResized,0);}},onResized:function(){dojo.lang.forEach(this.children,function(_86d){if(_86d.checkSize){_86d.checkSize();}});}});dojo.provide("dojo.widget.*");dojo.provide("dojo.html.*");dojo.provide("dojo.html.selection");dojo.html.selectionType={NONE:0,TEXT:1,CONTROL:2};dojo.html.clearSelection=function(){var _86e=dojo.global();var _86f=dojo.doc();try{if(_86e["getSelection"]){if(dojo.render.html.safari){_86e.getSelection().collapse();}else{_86e.getSelection().removeAllRanges();}}else{if(_86f.selection){if(_86f.selection.empty){_86f.selection.empty();}else{if(_86f.selection.clear){_86f.selection.clear();}}}}return true;}catch(e){dojo.debug(e);return false;}};dojo.html.disableSelection=function(_870){_870=dojo.byId(_870)||dojo.body();var h=dojo.render.html;if(h.mozilla){_870.style.MozUserSelect="none";}else{if(h.safari){_870.style.KhtmlUserSelect="none";}else{if(h.ie){_870.unselectable="on";}else{return false;}}}return true;};dojo.html.enableSelection=function(_872){_872=dojo.byId(_872)||dojo.body();var h=dojo.render.html;if(h.mozilla){_872.style.MozUserSelect="";}else{if(h.safari){_872.style.KhtmlUserSelect="";}else{if(h.ie){_872.unselectable="off";}else{return false;}}}return true;};dojo.html.selectInputText=function(_874){var _875=dojo.global();var _876=dojo.doc();_874=dojo.byId(_874);if(_876["selection"]&&dojo.body()["createTextRange"]){var _877=_874.createTextRange();_877.moveStart("character",0);_877.moveEnd("character",_874.value.length);_877.select();}else{if(_875["getSelection"]){var _878=_875.getSelection();_874.setSelectionRange(0,_874.value.length);}}_874.focus();};dojo.lang.mixin(dojo.html.selection,{getType:function(){if(dojo.doc()["selection"]){return dojo.html.selectionType[dojo.doc().selection.type.toUpperCase()];}else{var _879=dojo.html.selectionType.TEXT;var oSel;try{oSel=dojo.global().getSelection();}catch(e){}if(oSel&&oSel.rangeCount==1){var _87b=oSel.getRangeAt(0);if(_87b.startContainer==_87b.endContainer&&(_87b.endOffset-_87b.startOffset)==1&&_87b.startContainer.nodeType!=dojo.dom.TEXT_NODE){_879=dojo.html.selectionType.CONTROL;}}return _879;}},isCollapsed:function(){var _87c=dojo.global();var _87d=dojo.doc();if(_87d["selection"]){return _87d.selection.createRange().text=="";}else{if(_87c["getSelection"]){var _87e=_87c.getSelection();if(dojo.lang.isString(_87e)){return _87e=="";}else{return _87e.isCollapsed||_87e.toString()=="";}}}},getSelectedElement:function(){if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){if(dojo.doc()["selection"]){var _87f=dojo.doc().selection.createRange();if(_87f&&_87f.item){return dojo.doc().selection.createRange().item(0);}}else{var _880=dojo.global().getSelection();return _880.anchorNode.childNodes[_880.anchorOffset];}}},getParentElement:function(){if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){var p=dojo.html.selection.getSelectedElement();if(p){return p.parentNode;}}else{if(dojo.doc()["selection"]){return dojo.doc().selection.createRange().parentElement();}else{var _882=dojo.global().getSelection();if(_882){var node=_882.anchorNode;while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){node=node.parentNode;}return node;}}}},getSelectedText:function(){if(dojo.doc()["selection"]){if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){return null;}return dojo.doc().selection.createRange().text;}else{var _884=dojo.global().getSelection();if(_884){return _884.toString();}}},getSelectedHtml:function(){if(dojo.doc()["selection"]){if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){return null;}return dojo.doc().selection.createRange().htmlText;}else{var _885=dojo.global().getSelection();if(_885&&_885.rangeCount){var frag=_885.getRangeAt(0).cloneContents();var div=document.createElement("div");div.appendChild(frag);return div.innerHTML;}return null;}},hasAncestorElement:function(_888){return (dojo.html.selection.getAncestorElement.apply(this,arguments)!=null);},getAncestorElement:function(_889){var node=dojo.html.selection.getSelectedElement()||dojo.html.selection.getParentElement();while(node){if(dojo.html.selection.isTag(node,arguments).length>0){return node;}node=node.parentNode;}return null;},isTag:function(node,tags){if(node&&node.tagName){for(var i=0;i<tags.length;i++){if(node.tagName.toLowerCase()==String(tags[i]).toLowerCase()){return String(tags[i]).toLowerCase();}}}return "";},selectElement:function(_88e){var _88f=dojo.global();var _890=dojo.doc();_88e=dojo.byId(_88e);if(_890.selection&&dojo.body().createTextRange){try{var _891=dojo.body().createControlRange();_891.addElement(_88e);_891.select();}catch(e){dojo.html.selection.selectElementChildren(_88e);}}else{if(_88f["getSelection"]){var _892=_88f.getSelection();if(_892["removeAllRanges"]){var _891=_890.createRange();_891.selectNode(_88e);_892.removeAllRanges();_892.addRange(_891);}}}},selectElementChildren:function(_893){var _894=dojo.global();var _895=dojo.doc();_893=dojo.byId(_893);if(_895.selection&&dojo.body().createTextRange){var _896=dojo.body().createTextRange();_896.moveToElementText(_893);_896.select();}else{if(_894["getSelection"]){var _897=_894.getSelection();if(_897["setBaseAndExtent"]){_897.setBaseAndExtent(_893,0,_893,_893.innerText.length-1);}else{if(_897["selectAllChildren"]){_897.selectAllChildren(_893);}}}}},getBookmark:function(){var _898;var _899=dojo.doc();if(_899["selection"]){var _89a=_899.selection.createRange();_898=_89a.getBookmark();}else{var _89b;try{_89b=dojo.global().getSelection();}catch(e){}if(_89b){var _89a=_89b.getRangeAt(0);_898=_89a.cloneRange();}else{dojo.debug("No idea how to store the current selection for this browser!");}}return _898;},moveToBookmark:function(_89c){var _89d=dojo.doc();if(_89d["selection"]){var _89e=_89d.selection.createRange();_89e.moveToBookmark(_89c);_89e.select();}else{var _89f;try{_89f=dojo.global().getSelection();}catch(e){}if(_89f&&_89f["removeAllRanges"]){_89f.removeAllRanges();_89f.addRange(_89c);}else{dojo.debug("No idea how to restore selection for this browser!");}}},collapse:function(_8a0){if(dojo.global()["getSelection"]){var _8a1=dojo.global().getSelection();if(_8a1.removeAllRanges){if(_8a0){_8a1.collapseToStart();}else{_8a1.collapseToEnd();}}else{dojo.global().getSelection().collapse(_8a0);}}else{if(dojo.doc().selection){var _8a2=dojo.doc().selection.createRange();_8a2.collapse(_8a0);_8a2.select();}}},remove:function(){if(dojo.doc().selection){var _8a3=dojo.doc().selection;if(_8a3.type.toUpperCase()!="NONE"){_8a3.clear();}return _8a3;}else{var _8a3=dojo.global().getSelection();for(var i=0;i<_8a3.rangeCount;i++){_8a3.getRangeAt(i).deleteContents();}return _8a3;}}});dojo.provide("dojo.widget.html.layout");dojo.widget.html.layout=function(_8a5,_8a6,_8a7){dojo.html.addClass(_8a5,"dojoLayoutContainer");_8a6=dojo.lang.filter(_8a6,function(_8a8,idx){_8a8.idx=idx;return dojo.lang.inArray(["top","bottom","left","right","client","flood"],_8a8.layoutAlign);});if(_8a7&&_8a7!="none"){var rank=function(_8ab){switch(_8ab.layoutAlign){case "flood": return 1;case "left": case "right": return (_8a7=="left-right")?2:3;case "top": case "bottom": return (_8a7=="left-right")?3:2;default: return 4;}};_8a6.sort(function(a,b){return (rank(a)-rank(b))||(a.idx-b.idx);});}var f={top:dojo.html.getPixelValue(_8a5,"padding-top",true),left:dojo.html.getPixelValue(_8a5,"padding-left",true)};dojo.lang.mixin(f,dojo.html.getContentBox(_8a5));dojo.lang.forEach(_8a6,function(_8af){var elm=_8af.domNode;var pos=_8af.layoutAlign;with(elm.style){left=f.left+"px";top=f.top+"px";bottom="auto";right="auto";}dojo.html.addClass(elm,"dojoAlign"+dojo.string.capitalize(pos));if((pos=="top")||(pos=="bottom")){dojo.html.setMarginBox(elm,{width:f.width});var h=dojo.html.getMarginBox(elm).height;f.height-=h;if(pos=="top"){f.top+=h;}else{elm.style.top=f.top+f.height+"px";}if(_8af.onResized){_8af.onResized();}}else{if(pos=="left"||pos=="right"){var w=dojo.html.getMarginBox(elm).width;if(_8af.resizeTo){_8af.resizeTo(w,f.height);}else{dojo.html.setMarginBox(elm,{width:w,height:f.height});}f.width-=w;if(pos=="left"){f.left+=w;}else{elm.style.left=f.left+f.width+"px";}}else{if(pos=="flood"||pos=="client"){if(_8af.resizeTo){_8af.resizeTo(f.width,f.height);}else{dojo.html.setMarginBox(elm,{width:f.width,height:f.height});}}}}});};dojo.html.insertCssText(".dojoLayoutContainer{ position: relative; display: block; overflow: hidden; }\n"+"body .dojoAlignTop, body .dojoAlignBottom, body .dojoAlignLeft, body .dojoAlignRight { position: absolute; overflow: hidden; }\n"+"body .dojoAlignClient { position: absolute }\n"+".dojoAlignClient { overflow: auto; }\n");dojo.provide("dojo.widget.PageContainer");dojo.widget.defineWidget("dojo.widget.PageContainer",dojo.widget.HtmlWidget,{isContainer:true,doLayout:true,templateString:"<div dojoAttachPoint='containerNode'></div>",selectedChild:"",fillInTemplate:function(args,frag){var _8b6=this.getFragNodeRef(frag);dojo.html.copyStyle(this.domNode,_8b6);for(var _8b7=dojo.html.firstElement(this.containerNode);_8b7;_8b7=dojo.html.nextElement(_8b7)){_8b7.style.display="none";}dojo.widget.PageContainer.superclass.fillInTemplate.apply(this,arguments);},postCreate:function(args,frag){if(this.children.length){dojo.lang.forEach(this.children,this._setupChild,this);var _8ba;if(this.selectedChild){this.selectChild(this.selectedChild);}else{for(var i=0;i<this.children.length;i++){if(this.children[i].selected){this.selectChild(this.children[i]);break;}}if(!this.selectedChildWidget){this.selectChild(this.children[0]);}}}},addChild:function(_8bc){dojo.widget.PageContainer.superclass.addChild.apply(this,arguments);this._setupChild(_8bc);this.onResized();if(!this.selectedChildWidget){this.selectChild(_8bc);}},_setupChild:function(page){page.hide();page.domNode.style.position="relative";dojo.event.topic.publish(this.widgetId+"-addChild",page);},removeChild:function(page){dojo.widget.PageContainer.superclass.removeChild.apply(this,arguments);if(this._beingDestroyed){return;}dojo.event.topic.publish(this.widgetId+"-removeChild",page);this.onResized();if(this.selectedChildWidget===page){this.selectedChildWidget=undefined;if(this.children.length>0){this.selectChild(this.children[0],true);}}},selectChild:function(page,_8c0){page=dojo.widget.byId(page);this.correspondingPageButton=_8c0;if(this.selectedChildWidget){this._hideChild(this.selectedChildWidget);}this.selectedChildWidget=page;this.selectedChild=page.widgetId;this._showChild(page);page.isFirstChild=(page==this.children[0]);page.isLastChild=(page==this.children[this.children.length-1]);dojo.event.topic.publish(this.widgetId+"-selectChild",page);},forward:function(){var _8c1=dojo.lang.find(this.children,this.selectedChildWidget);this.selectChild(this.children[_8c1+1]);},back:function(){var _8c2=dojo.lang.find(this.children,this.selectedChildWidget);this.selectChild(this.children[_8c2-1]);},onResized:function(){if(this.doLayout&&this.selectedChildWidget){with(this.selectedChildWidget.domNode.style){top=dojo.html.getPixelValue(this.containerNode,"padding-top",true);left=dojo.html.getPixelValue(this.containerNode,"padding-left",true);}var _8c3=dojo.html.getContentBox(this.containerNode);this.selectedChildWidget.resizeTo(_8c3.width,_8c3.height);}},_showChild:function(page){if(this.doLayout){var _8c5=dojo.html.getContentBox(this.containerNode);page.resizeTo(_8c5.width,_8c5.height);}page.selected=true;page.show();},_hideChild:function(page){page.selected=false;page.hide();},closeChild:function(page){var _8c8=page.onClose(this,page);if(_8c8){this.removeChild(page);page.destroy();}},destroy:function(){this._beingDestroyed=true;dojo.event.topic.destroy(this.widgetId+"-addChild");dojo.event.topic.destroy(this.widgetId+"-removeChild");dojo.event.topic.destroy(this.widgetId+"-selectChild");dojo.widget.PageContainer.superclass.destroy.apply(this,arguments);}});dojo.widget.defineWidget("dojo.widget.PageController",dojo.widget.HtmlWidget,{templateString:"<span wairole='tablist' dojoAttachEvent='onKey'></span>",isContainer:true,containerId:"",buttonWidget:"PageButton","class":"dojoPageController",fillInTemplate:function(){dojo.html.addClass(this.domNode,this["class"]);dojo.widget.wai.setAttr(this.domNode,"waiRole","role","tablist");},postCreate:function(){this.pane2button={};var _8c9=dojo.widget.byId(this.containerId);if(_8c9){dojo.lang.forEach(_8c9.children,this.onAddChild,this);}dojo.event.topic.subscribe(this.containerId+"-addChild",this,"onAddChild");dojo.event.topic.subscribe(this.containerId+"-removeChild",this,"onRemoveChild");dojo.event.topic.subscribe(this.containerId+"-selectChild",this,"onSelectChild");},destroy:function(){dojo.event.topic.unsubscribe(this.containerId+"-addChild",this,"onAddChild");dojo.event.topic.unsubscribe(this.containerId+"-removeChild",this,"onRemoveChild");dojo.event.topic.unsubscribe(this.containerId+"-selectChild",this,"onSelectChild");dojo.widget.PageController.superclass.destroy.apply(this,arguments);},onAddChild:function(page){var _8cb=dojo.widget.createWidget(this.buttonWidget,{label:page.label,closeButton:page.closable});this.addChild(_8cb);this.domNode.appendChild(_8cb.domNode);this.pane2button[page]=_8cb;page.controlButton=_8cb;var _8cc=this;dojo.event.connect(_8cb,"onClick",function(){_8cc.onButtonClick(page);});dojo.event.connect(_8cb,"onCloseButtonClick",function(){_8cc.onCloseButtonClick(page);});},onRemoveChild:function(page){if(this._currentChild==page){this._currentChild=null;}var _8ce=this.pane2button[page];if(_8ce){_8ce.destroy();}this.pane2button[page]=null;},onSelectChild:function(page){if(this._currentChild){var _8d0=this.pane2button[this._currentChild];_8d0.clearSelected();}var _8d1=this.pane2button[page];_8d1.setSelected();this._currentChild=page;},onButtonClick:function(page){var _8d3=dojo.widget.byId(this.containerId);_8d3.selectChild(page,false,this);},onCloseButtonClick:function(page){var _8d5=dojo.widget.byId(this.containerId);_8d5.closeChild(page);},onKey:function(evt){if((evt.keyCode==evt.KEY_RIGHT_ARROW)||(evt.keyCode==evt.KEY_LEFT_ARROW)){var _8d7=0;var next=null;var _8d7=dojo.lang.find(this.children,this.pane2button[this._currentChild]);if(evt.keyCode==evt.KEY_RIGHT_ARROW){next=this.children[(_8d7+1)%this.children.length];}else{next=this.children[(_8d7+(this.children.length-1))%this.children.length];}dojo.event.browser.stopEvent(evt);next.onClick();}}});dojo.widget.defineWidget("dojo.widget.PageButton",dojo.widget.HtmlWidget,{templateString:"<span class='item'>"+"<span dojoAttachEvent='onClick' dojoAttachPoint='titleNode' class='selectButton'>${this.label}</span>"+"<span dojoAttachEvent='onClick:onCloseButtonClick' class='closeButton'>[X]</span>"+"</span>",label:"foo",closeButton:false,onClick:function(){this.focus();},onCloseButtonMouseOver:function(){dojo.html.addClass(this.closeButtonNode,"closeHover");},onCloseButtonMouseOut:function(){dojo.html.removeClass(this.closeButtonNode,"closeHover");},onCloseButtonClick:function(evt){},setSelected:function(){dojo.html.addClass(this.domNode,"current");this.titleNode.setAttribute("tabIndex","0");},clearSelected:function(){dojo.html.removeClass(this.domNode,"current");this.titleNode.setAttribute("tabIndex","-1");},focus:function(){if(this.titleNode.focus){this.titleNode.focus();}}});dojo.lang.extend(dojo.widget.Widget,{label:"",selected:false,closable:false,onClose:function(){return true;}});dojo.provide("dojo.widget.AccordionContainer");dojo.widget.defineWidget("dojo.widget.AccordionContainer",dojo.widget.HtmlWidget,{isContainer:true,labelNodeClass:"label",containerNodeClass:"accBody",duration:250,fillInTemplate:function(){with(this.domNode.style){if(position!="absolute"){position="relative";}overflow="hidden";}},addChild:function(_8da){var _8db=this._addChild(_8da);this._setSizes();return _8db;},_addChild:function(_8dc){if(_8dc.widgetType!="AccordionPane"){var _8dd=dojo.widget.createWidget("AccordionPane",{label:_8dc.label,selected:_8dc.selected,labelNodeClass:this.labelNodeClass,containerNodeClass:this.containerNodeClass,allowCollapse:this.allowCollapse});_8dd.addChild(_8dc);this.addWidgetAsDirectChild(_8dd);this.registerChild(_8dd,this.children.length);return _8dd;}else{dojo.html.addClass(_8dc.containerNode,this.containerNodeClass);dojo.html.addClass(_8dc.labelNode,this.labelNodeClass);this.addWidgetAsDirectChild(_8dc);this.registerChild(_8dc,this.children.length);return _8dc;}},postCreate:function(){var _8de=this.children;this.children=[];dojo.html.removeChildren(this.domNode);dojo.lang.forEach(_8de,dojo.lang.hitch(this,"_addChild"));this._setSizes();},removeChild:function(_8df){dojo.widget.AccordionContainer.superclass.removeChild.call(this,_8df);this._setSizes();},onResized:function(){this._setSizes();},_setSizes:function(){var _8e0=0;var _8e1=0;dojo.lang.forEach(this.children,function(_8e2,idx){_8e0+=_8e2.getLabelHeight();if(_8e2.selected){_8e1=idx;}});var _8e4=dojo.html.getContentBox(this.domNode);var y=0;dojo.lang.forEach(this.children,function(_8e6,idx){var _8e8=_8e6.getLabelHeight();_8e6.resizeTo(_8e4.width,_8e4.height-_8e0+_8e8);_8e6.domNode.style.zIndex=idx+1;_8e6.domNode.style.position="absolute";_8e6.domNode.style.top=y+"px";y+=(idx==_8e1)?dojo.html.getBorderBox(_8e6.domNode).height:_8e8;});},selectChild:function(page){dojo.lang.forEach(this.children,function(_8ea){_8ea.setSelected(_8ea==page);});var y=0;var _8ec=[];dojo.lang.forEach(this.children,function(_8ed,idx){if(_8ed.domNode.style.top!=(y+"px")){_8ec.push(dojo.lfx.html.slideTo(_8ed.domNode,{top:y,left:0},this.duration));}y+=_8ed.selected?dojo.html.getBorderBox(_8ed.domNode).height:_8ed.getLabelHeight();},this);dojo.lfx.combine(_8ec).play();}});dojo.widget.defineWidget("dojo.widget.AccordionPane",dojo.widget.HtmlWidget,{label:"","class":"dojoAccordionPane",labelNodeClass:"label",containerNodeClass:"accBody",selected:false,templateString:"<div dojoAttachPoint=\"domNode\">\r\n<div dojoAttachPoint=\"labelNode\" dojoAttachEvent=\"onclick: onLabelClick\" class=\"${this.labelNodeClass}\">${this.label}</div>\r\n<div dojoAttachPoint=\"containerNode\" style=\"overflow: hidden;\" class=\"${this.containerNodeClass}\"></div>\r\n</div>\r\n",templateCssString:".dojoAccordionPane .label {\r\n\tcolor: #000;\r\n\tfont-weight: bold;\r\n\tbackground: url(\"images/soriaAccordionOff.gif\") repeat-x top left #85aeec;\r\n\tborder:1px solid #d9d9d9;\r\n\tfont-size:0.9em;\r\n}\r\n\r\n.dojoAccordionPane-selected .label {\r\n\tbackground: url(\"images/soriaAccordionSelected.gif\") repeat-x top left #85aeec;\r\n\tborder:1px solid #84a3d1;\r\n}\r\n\r\n.dojoAccordionPane .label:hover {\r\n\tcursor: pointer;\r\n}\r\n\r\n.dojoAccordionPane .accBody {\r\n\tbackground: #fff;\r\n\toverflow: auto;\r\n\tborder:1px solid #84a3d1;\r\n}\r\n",templateCssPath:dojo.uri.moduleUri("dojo","widget/templates/AccordionPane.css"),isContainer:true,fillInTemplate:function(){dojo.html.addClass(this.domNode,this["class"]);dojo.widget.AccordionPane.superclass.fillInTemplate.call(this);dojo.html.disableSelection(this.labelNode);this.setSelected(this.selected);},setLabel:function(_8ef){this.labelNode.innerHTML=_8ef;},resizeTo:function(_8f0,_8f1){if(this.children[0]){dojo.html.setMarginBox(this.domNode,{width:_8f0,height:_8f1});var _8f2=[{domNode:this.labelNode,layoutAlign:"top"},{domNode:this.containerNode,layoutAlign:"client"}];dojo.widget.html.layout(this.domNode,_8f2);var _8f3=dojo.html.getContentBox(this.containerNode);this.children[0].resizeTo(_8f3.width,_8f3.height);}},getLabelHeight:function(){return dojo.html.getMarginBox(this.labelNode).height;},onLabelClick:function(){this.parent.selectChild(this);},setSelected:function(_8f4){this.selected=_8f4;(_8f4?dojo.html.addClass:dojo.html.removeClass)(this.domNode,this["class"]+"-selected");var _8f5=this.children[0];if(_8f5){if(_8f4){if(!_8f5.isShowing()){_8f5.show();}else{_8f5.onShow();}}else{_8f5.onHide();}}}});dojo.lang.extend(dojo.widget.Widget,{open:false});dojo.provide("dojo.widget.ContentPane");dojo.widget.defineWidget("dojo.widget.ContentPane",dojo.widget.HtmlWidget,function(){this._styleNodes=[];this._onLoadStack=[];this._onUnloadStack=[];this._callOnUnload=false;this._ioBindObj;this.scriptScope;this.bindArgs={};},{isContainer:false,adjustPaths:true,href:"",extractContent:true,parseContent:true,cacheContent:true,preload:false,refreshOnShow:false,handler:"",executeScripts:false,scriptSeparation:true,loadingMessage:"Loading...",isLoaded:false,"class":"dojoContentPane",templateCssString:".dojoContentPane {\r\n\tdisplay: block;\r\n\toverflow: auto;\t/* if we don't have this (or overflow:hidden), then Widget.resizeTo() doesn't make sense for ContentPane */\r\n}\r\n",templateCssPath:dojo.uri.moduleUri("dojo","widget/templates/ContentPane.css"),postCreate:function(args,frag,_8f8){dojo.html.addClass(this.domNode,this["class"]);var _8f9=this.getFragNodeRef(frag);if(_8f9!=this.domNode){dojo.html.moveChildren(_8f9,this.containerNode||this.domNode);}if(this.handler!==""){this.setHandler(this.handler);}if(this.isShowing()||this.preload){this._prepareForShow();}},show:function(){if(this.refreshOnShow){this.refresh();}else{this._prepareForShow();}dojo.widget.ContentPane.superclass.show.call(this);},refresh:function(){this.isLoaded=false;this._prepareForShow();},_prepareForShow:function(){if(this.isLoaded){return;}if(dojo.lang.isFunction(this.handler)){this._runHandler();}else{if(this.href!=""){this._downloadExternalContent(this.href,this.cacheContent&&!this.refreshOnShow);}else{if(this.parseContent){this._createSubWidgets();}this.isLoaded=true;}}},setUrl:function(url){this.href=url;this.isLoaded=false;if(this.preload||this.isShowing()){this._prepareForShow();}},abort:function(){var bind=this._ioBindObj;if(!bind||!bind.abort){return;}bind.abort();delete this._ioBindObj;},_downloadExternalContent:function(url,_8fd){this.abort();this._handleDefaults(this.loadingMessage,"onDownloadStart");var self=this;this._ioBindObj=dojo.io.bind(this._cacheSetting({url:url,mimetype:"text/html",handler:function(type,data,xhr){delete self._ioBindObj;if(type=="load"){self.onDownloadEnd.call(self,url,data);}else{var e={responseText:xhr.responseText,status:xhr.status,statusText:xhr.statusText,responseHeaders:xhr.getAllResponseHeaders(),text:"Error loading '"+url+"' ("+xhr.status+" "+xhr.statusText+")"};self._handleDefaults.call(self,e,"onDownloadError");self.onLoad();}}},_8fd));},_cacheSetting:function(_903,_904){for(var x in this.bindArgs){if(dojo.lang.isUndefined(_903[x])){_903[x]=this.bindArgs[x];}}if(dojo.lang.isUndefined(_903.useCache)){_903.useCache=_904;}if(dojo.lang.isUndefined(_903.preventCache)){_903.preventCache=!_904;}if(dojo.lang.isUndefined(_903.mimetype)){_903.mimetype="text/html";}return _903;},onLoad:function(e){this._runStack("_onLoadStack");this.isLoaded=true;},onUnLoad:function(e){dojo.deprecated(this.widgetType+".onUnLoad, use .onUnload (lowercased load)",0.5);},onUnload:function(e){this._runStack("_onUnloadStack");delete this.scriptScope;if(this.onUnLoad!==dojo.widget.ContentPane.prototype.onUnLoad){this.onUnLoad.apply(this,arguments);}},_runStack:function(_909){var st=this[_909];var err="";var _90c=this.scriptScope||window;for(var i=0;i<st.length;i++){try{st[i].call(_90c);}catch(e){err+="\n"+st[i]+" failed: "+e.description;}}this[_909]=[];if(err.length){var name=(_909=="_onLoadStack")?"addOnLoad":"addOnUnLoad";this._handleDefaults(name+" failure\n "+err,"onExecError","debug");}},addOnLoad:function(obj,func){this._pushOnStack(this._onLoadStack,obj,func);},addOnUnload:function(obj,func){this._pushOnStack(this._onUnloadStack,obj,func);},addOnUnLoad:function(){dojo.deprecated(this.widgetType+".addOnUnLoad, use addOnUnload instead. (lowercased Load)",0.5);this.addOnUnload.apply(this,arguments);},_pushOnStack:function(_913,obj,func){if(typeof func=="undefined"){_913.push(obj);}else{_913.push(function(){obj[func]();});}},destroy:function(){this.onUnload();dojo.widget.ContentPane.superclass.destroy.call(this);},onExecError:function(e){},onContentError:function(e){},onDownloadError:function(e){},onDownloadStart:function(e){},onDownloadEnd:function(url,data){data=this.splitAndFixPaths(data,url);this.setContent(data);},_handleDefaults:function(e,_91d,_91e){if(!_91d){_91d="onContentError";}if(dojo.lang.isString(e)){e={text:e};}if(!e.text){e.text=e.toString();}e.toString=function(){return this.text;};if(typeof e.returnValue!="boolean"){e.returnValue=true;}if(typeof e.preventDefault!="function"){e.preventDefault=function(){this.returnValue=false;};}this[_91d](e);if(e.returnValue){switch(_91e){case true: case "alert": alert(e.toString());break;case "debug": dojo.debug(e.toString());break;default: if(this._callOnUnload){this.onUnload();}this._callOnUnload=false;if(arguments.callee._loopStop){dojo.debug(e.toString());}else{arguments.callee._loopStop=true;this._setContent(e.toString());}}}arguments.callee._loopStop=false;},splitAndFixPaths:function(s,url){var _921=[],_922=[],tmp=[];var _924=[],_925=[],attr=[],_927=[];var str="",path="",fix="",_92b="",tag="",_92d="";if(!url){url="./";}if(s){var _92e=/<title[^>]*>([\s\S]*?)<\/title>/i;while(_924=_92e.exec(s)){_921.push(_924[1]);s=s.substring(0,_924.index)+s.substr(_924.index+_924[0].length);}if(this.adjustPaths){var _92f=/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i;var _930=/\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@]+?)\2/i;var _931=/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/;while(tag=_92f.exec(s)){str+=s.substring(0,tag.index);s=s.substring((tag.index+tag[0].length),s.length);tag=tag[0];_92b="";while(attr=_930.exec(tag)){path="";_92d=attr[3];switch(attr[1].toLowerCase()){case "src": case "href": if(_931.exec(_92d)){path=_92d;}else{path=(new dojo.uri.Uri(url,_92d).toString());}break;case "style": path=dojo.html.fixPathsInCssText(_92d,url);break;default: path=_92d;}fix=" "+attr[1]+"="+attr[2]+path+attr[2];_92b+=tag.substring(0,attr.index)+fix;tag=tag.substring((attr.index+attr[0].length),tag.length);}str+=_92b+tag;}s=str+s;}_92e=/(?:<(style)[^>]*>([\s\S]*?)<\/style>|<link ([^>]*rel=['"]?stylesheet['"]?[^>]*)>)/i;while(_924=_92e.exec(s)){if(_924[1]&&_924[1].toLowerCase()=="style"){_927.push(dojo.html.fixPathsInCssText(_924[2],url));}else{if(attr=_924[3].match(/href=(['"]?)([^'">]*)\1/i)){_927.push({path:attr[2]});}}s=s.substring(0,_924.index)+s.substr(_924.index+_924[0].length);}var _92e=/<script([^>]*)>([\s\S]*?)<\/script>/i;var _932=/src=(['"]?)([^"']*)\1/i;var _933=/.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/;var _934=/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g;var _935=/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/;while(_924=_92e.exec(s)){if(this.executeScripts&&_924[1]){if(attr=_932.exec(_924[1])){if(_933.exec(attr[2])){dojo.debug("Security note! inhibit:"+attr[2]+" from  being loaded again.");}else{_922.push({path:attr[2]});}}}if(_924[2]){var sc=_924[2].replace(_934,"");if(!sc){continue;}while(tmp=_935.exec(sc)){_925.push(tmp[0]);sc=sc.substring(0,tmp.index)+sc.substr(tmp.index+tmp[0].length);}if(this.executeScripts){_922.push(sc);}}s=s.substr(0,_924.index)+s.substr(_924.index+_924[0].length);}if(this.extractContent){_924=s.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_924){s=_924[1];}}if(this.executeScripts&&this.scriptSeparation){var _92e=/(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/;var _937=/([\s'";:\(])scriptScope(.*)/;str="";while(tag=_92e.exec(s)){tmp=((tag[3]=="'")?"\"":"'");fix="";str+=s.substring(0,tag.index)+tag[1];while(attr=_937.exec(tag[2])){tag[2]=tag[2].substring(0,attr.index)+attr[1]+"dojo.widget.byId("+tmp+this.widgetId+tmp+").scriptScope"+attr[2];}str+=tag[2];s=s.substr(tag.index+tag[0].length);}s=str+s;}}return {"xml":s,"styles":_927,"titles":_921,"requires":_925,"scripts":_922,"url":url};},_setContent:function(cont){this.destroyChildren();for(var i=0;i<this._styleNodes.length;i++){if(this._styleNodes[i]&&this._styleNodes[i].parentNode){this._styleNodes[i].parentNode.removeChild(this._styleNodes[i]);}}this._styleNodes=[];try{var node=this.containerNode||this.domNode;while(node.firstChild){dojo.html.destroyNode(node.firstChild);}if(typeof cont!="string"){node.appendChild(cont);}else{node.innerHTML=cont;}}catch(e){e.text="Couldn't load content:"+e.description;this._handleDefaults(e,"onContentError");}},setContent:function(data){this.abort();if(this._callOnUnload){this.onUnload();}this._callOnUnload=true;if(!data||dojo.html.isNode(data)){this._setContent(data);this.onResized();this.onLoad();}else{if(typeof data.xml!="string"){this.href="";data=this.splitAndFixPaths(data);}this._setContent(data.xml);for(var i=0;i<data.styles.length;i++){if(data.styles[i].path){this._styleNodes.push(dojo.html.insertCssFile(data.styles[i].path,dojo.doc(),false,true));}else{this._styleNodes.push(dojo.html.insertCssText(data.styles[i]));}}if(this.parseContent){for(var i=0;i<data.requires.length;i++){try{eval(data.requires[i]);}catch(e){e.text="ContentPane: error in package loading calls, "+(e.description||e);this._handleDefaults(e,"onContentError","debug");}}}var _93d=this;function asyncParse(){if(_93d.executeScripts){_93d._executeScripts(data.scripts);}if(_93d.parseContent){_93d._createSubWidgets();}_93d.onResized();_93d.onLoad();}if(dojo.hostenv.isXDomain&&data.requires.length){dojo.addOnLoad(asyncParse);}else{asyncParse();}}},_createSubWidgets:function(){var node=this.containerNode||this.domNode;var _93f=new dojo.xml.Parse();var frag=_93f.parseElement(node,null,true);dojo.widget.getParser().createSubComponents(frag,this);},setHandler:function(_941){var fcn=dojo.lang.isFunction(_941)?_941:window[_941];if(!dojo.lang.isFunction(fcn)){this._handleDefaults("Unable to set handler, '"+_941+"' not a function.","onExecError",true);return;}this.handler=function(){return fcn.apply(this,arguments);};},_runHandler:function(){var ret=true;if(dojo.lang.isFunction(this.handler)){this.handler(this,this.domNode);ret=false;}this.onLoad();return ret;},_executeScripts:function(_944){var self=this;var tmp="",code="";for(var i=0;i<_944.length;i++){if(_944[i].path){dojo.io.bind(this._cacheSetting({"url":_944[i].path,"load":function(type,_94a){dojo.lang.hitch(self,tmp=";"+_94a);},"error":function(type,_94c){_94c.text=type+" downloading remote script";self._handleDefaults.call(self,_94c,"onExecError","debug");},"mimetype":"text/plain","sync":true},this.cacheContent));code+=tmp;}else{code+=_944[i];}}try{if(this.scriptSeparation){delete this.scriptScope;this.scriptScope=new (new Function("_container_",code+"; return this;"))(self);}else{var djg=dojo.global();if(djg.execScript){djg.execScript(code);}else{var djd=dojo.doc();var sc=djd.createElement("script");sc.appendChild(djd.createTextNode(code));(this.containerNode||this.domNode).appendChild(sc);}}}catch(e){e.text="Error running scripts from content:\n"+e.description;this._handleDefaults(e,"onExecError","debug");}}});dojo.provide("dojo.dnd.DragAndDrop");dojo.declare("dojo.dnd.DragSource",null,{type:"",onDragEnd:function(evt){},onDragStart:function(evt){},onSelected:function(evt){},unregister:function(){dojo.dnd.dragManager.unregisterDragSource(this);},reregister:function(){dojo.dnd.dragManager.registerDragSource(this);}});dojo.declare("dojo.dnd.DragObject",null,{type:"",register:function(){var dm=dojo.dnd.dragManager;if(dm["registerDragObject"]){dm.registerDragObject(this);}},onDragStart:function(evt){},onDragMove:function(evt){},onDragOver:function(evt){},onDragOut:function(evt){},onDragEnd:function(evt){},onDragLeave:dojo.lang.forward("onDragOut"),onDragEnter:dojo.lang.forward("onDragOver"),ondragout:dojo.lang.forward("onDragOut"),ondragover:dojo.lang.forward("onDragOver")});dojo.declare("dojo.dnd.DropTarget",null,function(){this.acceptedTypes=[];},{acceptsType:function(type){if(!dojo.lang.inArray(this.acceptedTypes,"*")){if(!dojo.lang.inArray(this.acceptedTypes,type)){return false;}}return true;},accepts:function(_95a){if(!dojo.lang.inArray(this.acceptedTypes,"*")){for(var i=0;i<_95a.length;i++){if(!dojo.lang.inArray(this.acceptedTypes,_95a[i].type)){return false;}}}return true;},unregister:function(){dojo.dnd.dragManager.unregisterDropTarget(this);},onDragOver:function(evt){},onDragOut:function(evt){},onDragMove:function(evt){},onDropStart:function(evt){},onDrop:function(evt){},onDropEnd:function(){}});dojo.dnd.DragEvent=function(){this.dragSource=null;this.dragObject=null;this.target=null;this.eventStatus="success";};dojo.declare("dojo.dnd.DragManager",null,{selectedSources:[],dragObjects:[],dragSources:[],registerDragSource:function(_961){},dropTargets:[],registerDropTarget:function(_962){},lastDragTarget:null,currentDragTarget:null,onKeyDown:function(){},onMouseOut:function(){},onMouseMove:function(){},onMouseUp:function(){}});dojo.provide("dojo.dnd.HtmlDragManager");dojo.declare("dojo.dnd.HtmlDragManager",dojo.dnd.DragManager,{disabled:false,nestedTargets:false,mouseDownTimer:null,dsCounter:0,dsPrefix:"dojoDragSource",dropTargetDimensions:[],currentDropTarget:null,previousDropTarget:null,_dragTriggered:false,selectedSources:[],dragObjects:[],dragSources:[],currentX:null,currentY:null,lastX:null,lastY:null,mouseDownX:null,mouseDownY:null,threshold:7,dropAcceptable:false,cancelEvent:function(e){e.stopPropagation();e.preventDefault();},registerDragSource:function(ds){if(ds["domNode"]){var dp=this.dsPrefix;var _966=dp+"Idx_"+(this.dsCounter++);ds.dragSourceId=_966;this.dragSources[_966]=ds;ds.domNode.setAttribute(dp,_966);if(dojo.render.html.ie){dojo.event.browser.addListener(ds.domNode,"ondragstart",this.cancelEvent);}}},unregisterDragSource:function(ds){if(ds["domNode"]){var dp=this.dsPrefix;var _969=ds.dragSourceId;delete ds.dragSourceId;delete this.dragSources[_969];ds.domNode.setAttribute(dp,null);if(dojo.render.html.ie){dojo.event.browser.removeListener(ds.domNode,"ondragstart",this.cancelEvent);}}},registerDropTarget:function(dt){this.dropTargets.push(dt);},unregisterDropTarget:function(dt){var _96c=dojo.lang.find(this.dropTargets,dt,true);if(_96c>=0){this.dropTargets.splice(_96c,1);}},getDragSource:function(e){var tn=e.target;if(tn===dojo.body()){return;}var ta=dojo.html.getAttribute(tn,this.dsPrefix);while((!ta)&&(tn)){tn=tn.parentNode;if((!tn)||(tn===dojo.body())){return;}ta=dojo.html.getAttribute(tn,this.dsPrefix);}return this.dragSources[ta];},onKeyDown:function(e){},onMouseDown:function(e){if(this.disabled){return;}if(dojo.render.html.ie){if(e.button!=1){return;}}else{if(e.which!=1){return;}}var _972=e.target.nodeType==dojo.html.TEXT_NODE?e.target.parentNode:e.target;if(dojo.html.isTag(_972,"button","textarea","input","select","option")){return;}var ds=this.getDragSource(e);if(!ds){return;}if(!dojo.lang.inArray(this.selectedSources,ds)){this.selectedSources.push(ds);ds.onSelected();}this.mouseDownX=e.pageX;this.mouseDownY=e.pageY;e.preventDefault();dojo.event.connect(document,"onmousemove",this,"onMouseMove");},onMouseUp:function(e,_975){if(this.selectedSources.length==0){return;}this.mouseDownX=null;this.mouseDownY=null;this._dragTriggered=false;e.dragSource=this.dragSource;if((!e.shiftKey)&&(!e.ctrlKey)){if(this.currentDropTarget){this.currentDropTarget.onDropStart();}dojo.lang.forEach(this.dragObjects,function(_976){var ret=null;if(!_976){return;}if(this.currentDropTarget){e.dragObject=_976;var ce=this.currentDropTarget.domNode.childNodes;if(ce.length>0){e.dropTarget=ce[0];while(e.dropTarget==_976.domNode){e.dropTarget=e.dropTarget.nextSibling;}}else{e.dropTarget=this.currentDropTarget.domNode;}if(this.dropAcceptable){ret=this.currentDropTarget.onDrop(e);}else{this.currentDropTarget.onDragOut(e);}}e.dragStatus=this.dropAcceptable&&ret?"dropSuccess":"dropFailure";dojo.lang.delayThese([function(){try{_976.dragSource.onDragEnd(e);}catch(err){var _979={};for(var i in e){if(i=="type"){_979.type="mouseup";continue;}_979[i]=e[i];}_976.dragSource.onDragEnd(_979);}},function(){_976.onDragEnd(e);}]);},this);this.selectedSources=[];this.dragObjects=[];this.dragSource=null;if(this.currentDropTarget){this.currentDropTarget.onDropEnd();}}else{}dojo.event.disconnect(document,"onmousemove",this,"onMouseMove");this.currentDropTarget=null;},onScroll:function(){for(var i=0;i<this.dragObjects.length;i++){if(this.dragObjects[i].updateDragOffset){this.dragObjects[i].updateDragOffset();}}if(this.dragObjects.length){this.cacheTargetLocations();}},_dragStartDistance:function(x,y){if((!this.mouseDownX)||(!this.mouseDownX)){return;}var dx=Math.abs(x-this.mouseDownX);var dx2=dx*dx;var dy=Math.abs(y-this.mouseDownY);var dy2=dy*dy;return parseInt(Math.sqrt(dx2+dy2),10);},cacheTargetLocations:function(){dojo.profile.start("cacheTargetLocations");this.dropTargetDimensions=[];dojo.lang.forEach(this.dropTargets,function(_982){var tn=_982.domNode;if(!tn||!_982.accepts([this.dragSource])){return;}var abs=dojo.html.getAbsolutePosition(tn,true);var bb=dojo.html.getBorderBox(tn);this.dropTargetDimensions.push([[abs.x,abs.y],[abs.x+bb.width,abs.y+bb.height],_982]);},this);dojo.profile.end("cacheTargetLocations");},onMouseMove:function(e){if((dojo.render.html.ie)&&(e.button!=1)){this.currentDropTarget=null;this.onMouseUp(e,true);return;}if((this.selectedSources.length)&&(!this.dragObjects.length)){var dx;var dy;if(!this._dragTriggered){this._dragTriggered=(this._dragStartDistance(e.pageX,e.pageY)>this.threshold);if(!this._dragTriggered){return;}dx=e.pageX-this.mouseDownX;dy=e.pageY-this.mouseDownY;}this.dragSource=this.selectedSources[0];dojo.lang.forEach(this.selectedSources,function(_989){if(!_989){return;}var tdo=_989.onDragStart(e);if(tdo){tdo.onDragStart(e);tdo.dragOffset.y+=dy;tdo.dragOffset.x+=dx;tdo.dragSource=_989;this.dragObjects.push(tdo);}},this);this.previousDropTarget=null;this.cacheTargetLocations();}dojo.lang.forEach(this.dragObjects,function(_98b){if(_98b){_98b.onDragMove(e);}});if(this.currentDropTarget){var c=dojo.html.toCoordinateObject(this.currentDropTarget.domNode,true);var dtp=[[c.x,c.y],[c.x+c.width,c.y+c.height]];}if((!this.nestedTargets)&&(dtp)&&(this.isInsideBox(e,dtp))){if(this.dropAcceptable){this.currentDropTarget.onDragMove(e,this.dragObjects);}}else{var _98e=this.findBestTarget(e);if(_98e.target===null){if(this.currentDropTarget){this.currentDropTarget.onDragOut(e);this.previousDropTarget=this.currentDropTarget;this.currentDropTarget=null;}this.dropAcceptable=false;return;}if(this.currentDropTarget!==_98e.target){if(this.currentDropTarget){this.previousDropTarget=this.currentDropTarget;this.currentDropTarget.onDragOut(e);}this.currentDropTarget=_98e.target;e.dragObjects=this.dragObjects;this.dropAcceptable=this.currentDropTarget.onDragOver(e);}else{if(this.dropAcceptable){this.currentDropTarget.onDragMove(e,this.dragObjects);}}}},findBestTarget:function(e){var _990=this;var _991=new Object();_991.target=null;_991.points=null;dojo.lang.every(this.dropTargetDimensions,function(_992){if(!_990.isInsideBox(e,_992)){return true;}_991.target=_992[2];_991.points=_992;return Boolean(_990.nestedTargets);});return _991;},isInsideBox:function(e,_994){if((e.pageX>_994[0][0])&&(e.pageX<_994[1][0])&&(e.pageY>_994[0][1])&&(e.pageY<_994[1][1])){return true;}return false;},onMouseOver:function(e){},onMouseOut:function(e){}});dojo.dnd.dragManager=new dojo.dnd.HtmlDragManager();(function(){var d=document;var dm=dojo.dnd.dragManager;dojo.event.connect(d,"onkeydown",dm,"onKeyDown");dojo.event.connect(d,"onmouseover",dm,"onMouseOver");dojo.event.connect(d,"onmouseout",dm,"onMouseOut");dojo.event.connect(d,"onmousedown",dm,"onMouseDown");dojo.event.connect(d,"onmouseup",dm,"onMouseUp");dojo.event.connect(window,"onscroll",dm,"onScroll");})();dojo.provide("dojo.html.iframe");dojo.html.iframeContentWindow=function(_999){var win=dojo.html.getDocumentWindow(dojo.html.iframeContentDocument(_999))||dojo.html.iframeContentDocument(_999).__parent__||(_999.name&&document.frames[_999.name])||null;return win;};dojo.html.iframeContentDocument=function(_99b){var doc=_99b.contentDocument||((_99b.contentWindow)&&(_99b.contentWindow.document))||((_99b.name)&&(document.frames[_99b.name])&&(document.frames[_99b.name].document))||null;return doc;};dojo.html.BackgroundIframe=function(node){if(dojo.render.html.ie55||dojo.render.html.ie60){var html="<iframe src='javascript:false'"+" style='position: absolute; left: 0px; top: 0px; width: 100%; height: 100%;"+"z-index: -1; filter:Alpha(Opacity=\"0\");' "+">";this.iframe=dojo.doc().createElement(html);this.iframe.tabIndex=-1;if(node){node.appendChild(this.iframe);this.domNode=node;}else{dojo.body().appendChild(this.iframe);this.iframe.style.display="none";}}};dojo.lang.extend(dojo.html.BackgroundIframe,{iframe:null,onResized:function(){if(this.iframe&&this.domNode&&this.domNode.parentNode){var _99f=dojo.html.getMarginBox(this.domNode);if(_99f.width==0||_99f.height==0){dojo.lang.setTimeout(this,this.onResized,100);return;}this.iframe.style.width=_99f.width+"px";this.iframe.style.height=_99f.height+"px";}},size:function(node){if(!this.iframe){return;}var _9a1=dojo.html.toCoordinateObject(node,true,dojo.html.boxSizing.BORDER_BOX);with(this.iframe.style){width=_9a1.width+"px";height=_9a1.height+"px";left=_9a1.left+"px";top=_9a1.top+"px";}},setZIndex:function(node){if(!this.iframe){return;}if(dojo.dom.isNode(node)){this.iframe.style.zIndex=dojo.html.getStyle(node,"z-index")-1;}else{if(!isNaN(node)){this.iframe.style.zIndex=node;}}},show:function(){if(this.iframe){this.iframe.style.display="block";}},hide:function(){if(this.iframe){this.iframe.style.display="none";}},remove:function(){if(this.iframe){dojo.html.removeNode(this.iframe,true);delete this.iframe;this.iframe=null;}}});dojo.provide("dojo.dnd.HtmlDragAndDrop");dojo.declare("dojo.dnd.HtmlDragSource",dojo.dnd.DragSource,function(node,type){node=dojo.byId(node);this.dragObjects=[];this.constrainToContainer=false;if(node){this.domNode=node;this.dragObject=node;this.type=(type)||(this.domNode.nodeName.toLowerCase());dojo.dnd.DragSource.prototype.reregister.call(this);}},{dragClass:"",onDragStart:function(){var _9a5=new dojo.dnd.HtmlDragObject(this.dragObject,this.type);if(this.dragClass){_9a5.dragClass=this.dragClass;}if(this.constrainToContainer){_9a5.constrainTo(this.constrainingContainer||this.domNode.parentNode);}return _9a5;},setDragHandle:function(node){node=dojo.byId(node);dojo.dnd.dragManager.unregisterDragSource(this);this.domNode=node;dojo.dnd.dragManager.registerDragSource(this);},setDragTarget:function(node){this.dragObject=node;},constrainTo:function(_9a8){this.constrainToContainer=true;if(_9a8){this.constrainingContainer=_9a8;}},onSelected:function(){for(var i=0;i<this.dragObjects.length;i++){dojo.dnd.dragManager.selectedSources.push(new dojo.dnd.HtmlDragSource(this.dragObjects[i]));}},addDragObjects:function(el){for(var i=0;i<arguments.length;i++){this.dragObjects.push(dojo.byId(arguments[i]));}}});dojo.declare("dojo.dnd.HtmlDragObject",dojo.dnd.DragObject,function(node,type){this.domNode=dojo.byId(node);this.type=type;this.constrainToContainer=false;this.dragSource=null;dojo.dnd.DragObject.prototype.register.call(this);},{dragClass:"",opacity:0.5,createIframe:true,disableX:false,disableY:false,createDragNode:function(){var node=this.domNode.cloneNode(true);if(this.dragClass){dojo.html.addClass(node,this.dragClass);}if(this.opacity<1){dojo.html.setOpacity(node,this.opacity);}var ltn=node.tagName.toLowerCase();var isTr=(ltn=="tr");if((isTr)||(ltn=="tbody")){var doc=this.domNode.ownerDocument;var _9b2=doc.createElement("table");if(isTr){var _9b3=doc.createElement("tbody");_9b2.appendChild(_9b3);_9b3.appendChild(node);}else{_9b2.appendChild(node);}var _9b4=((isTr)?this.domNode:this.domNode.firstChild);var _9b5=((isTr)?node:node.firstChild);var _9b6=_9b4.childNodes;var _9b7=_9b5.childNodes;for(var i=0;i<_9b6.length;i++){if((_9b7[i])&&(_9b7[i].style)){_9b7[i].style.width=dojo.html.getContentBox(_9b6[i]).width+"px";}}node=_9b2;}if((dojo.render.html.ie55||dojo.render.html.ie60)&&this.createIframe){with(node.style){top="0px";left="0px";}var _9b9=document.createElement("div");_9b9.appendChild(node);this.bgIframe=new dojo.html.BackgroundIframe(_9b9);_9b9.appendChild(this.bgIframe.iframe);node=_9b9;}node.style.zIndex=999;return node;},onDragStart:function(e){dojo.html.clearSelection();this.scrollOffset=dojo.html.getScroll().offset;this.dragStartPosition=dojo.html.getAbsolutePosition(this.domNode,true);this.dragOffset={y:this.dragStartPosition.y-e.pageY,x:this.dragStartPosition.x-e.pageX};this.dragClone=this.createDragNode();this.containingBlockPosition=this.domNode.offsetParent?dojo.html.getAbsolutePosition(this.domNode.offsetParent,true):{x:0,y:0};if(this.constrainToContainer){this.constraints=this.getConstraints();}with(this.dragClone.style){position="absolute";top=this.dragOffset.y+e.pageY+"px";left=this.dragOffset.x+e.pageX+"px";}dojo.body().appendChild(this.dragClone);dojo.event.topic.publish("dragStart",{source:this});},getConstraints:function(){if(this.constrainingContainer.nodeName.toLowerCase()=="body"){var _9bb=dojo.html.getViewport();var _9bc=_9bb.width;var _9bd=_9bb.height;var _9be=dojo.html.getScroll().offset;var x=_9be.x;var y=_9be.y;}else{var _9c1=dojo.html.getContentBox(this.constrainingContainer);_9bc=_9c1.width;_9bd=_9c1.height;x=this.containingBlockPosition.x+dojo.html.getPixelValue(this.constrainingContainer,"padding-left",true)+dojo.html.getBorderExtent(this.constrainingContainer,"left");y=this.containingBlockPosition.y+dojo.html.getPixelValue(this.constrainingContainer,"padding-top",true)+dojo.html.getBorderExtent(this.constrainingContainer,"top");}var mb=dojo.html.getMarginBox(this.domNode);return {minX:x,minY:y,maxX:x+_9bc-mb.width,maxY:y+_9bd-mb.height};},updateDragOffset:function(){var _9c3=dojo.html.getScroll().offset;if(_9c3.y!=this.scrollOffset.y){var diff=_9c3.y-this.scrollOffset.y;this.dragOffset.y+=diff;this.scrollOffset.y=_9c3.y;}if(_9c3.x!=this.scrollOffset.x){var diff=_9c3.x-this.scrollOffset.x;this.dragOffset.x+=diff;this.scrollOffset.x=_9c3.x;}},onDragMove:function(e){this.updateDragOffset();var x=this.dragOffset.x+e.pageX;var y=this.dragOffset.y+e.pageY;if(this.constrainToContainer){if(x<this.constraints.minX){x=this.constraints.minX;}if(y<this.constraints.minY){y=this.constraints.minY;}if(x>this.constraints.maxX){x=this.constraints.maxX;}if(y>this.constraints.maxY){y=this.constraints.maxY;}}this.setAbsolutePosition(x,y);dojo.event.topic.publish("dragMove",{source:this});},setAbsolutePosition:function(x,y){if(!this.disableY){this.dragClone.style.top=y+"px";}if(!this.disableX){this.dragClone.style.left=x+"px";}},onDragEnd:function(e){switch(e.dragStatus){case "dropSuccess": dojo.html.removeNode(this.dragClone);this.dragClone=null;break;case "dropFailure": var _9cb=dojo.html.getAbsolutePosition(this.dragClone,true);var _9cc={left:this.dragStartPosition.x+1,top:this.dragStartPosition.y+1};var anim=dojo.lfx.slideTo(this.dragClone,_9cc,300);var _9ce=this;dojo.event.connect(anim,"onEnd",function(e){dojo.html.removeNode(_9ce.dragClone);_9ce.dragClone=null;});anim.play();break;}dojo.event.topic.publish("dragEnd",{source:this});},constrainTo:function(_9d0){this.constrainToContainer=true;if(_9d0){this.constrainingContainer=_9d0;}else{this.constrainingContainer=this.domNode.parentNode;}}});dojo.declare("dojo.dnd.HtmlDropTarget",dojo.dnd.DropTarget,function(node,_9d2){if(arguments.length==0){return;}this.domNode=dojo.byId(node);dojo.dnd.DropTarget.call(this);if(_9d2&&dojo.lang.isString(_9d2)){_9d2=[_9d2];}this.acceptedTypes=_9d2||[];dojo.dnd.dragManager.registerDropTarget(this);},{vertical:false,onDragOver:function(e){if(!this.accepts(e.dragObjects)){return false;}this.childBoxes=[];for(var i=0,_9d5;i<this.domNode.childNodes.length;i++){_9d5=this.domNode.childNodes[i];if(_9d5.nodeType!=dojo.html.ELEMENT_NODE){continue;}var pos=dojo.html.getAbsolutePosition(_9d5,true);var _9d7=dojo.html.getBorderBox(_9d5);this.childBoxes.push({top:pos.y,bottom:pos.y+_9d7.height,left:pos.x,right:pos.x+_9d7.width,height:_9d7.height,width:_9d7.width,node:_9d5});}return true;},_getNodeUnderMouse:function(e){for(var i=0,_9da;i<this.childBoxes.length;i++){with(this.childBoxes[i]){if(e.pageX>=left&&e.pageX<=right&&e.pageY>=top&&e.pageY<=bottom){return i;}}}return -1;},createDropIndicator:function(){this.dropIndicator=document.createElement("div");with(this.dropIndicator.style){position="absolute";zIndex=999;if(this.vertical){borderLeftWidth="1px";borderLeftColor="black";borderLeftStyle="solid";height=dojo.html.getBorderBox(this.domNode).height+"px";top=dojo.html.getAbsolutePosition(this.domNode,true).y+"px";}else{borderTopWidth="1px";borderTopColor="black";borderTopStyle="solid";width=dojo.html.getBorderBox(this.domNode).width+"px";left=dojo.html.getAbsolutePosition(this.domNode,true).x+"px";}}},onDragMove:function(e,_9dc){var i=this._getNodeUnderMouse(e);if(!this.dropIndicator){this.createDropIndicator();}var _9de=this.vertical?dojo.html.gravity.WEST:dojo.html.gravity.NORTH;var hide=false;if(i<0){if(this.childBoxes.length){var _9e0=(dojo.html.gravity(this.childBoxes[0].node,e)&_9de);if(_9e0){hide=true;}}else{var _9e0=true;}}else{var _9e1=this.childBoxes[i];var _9e0=(dojo.html.gravity(_9e1.node,e)&_9de);if(_9e1.node===_9dc[0].dragSource.domNode){hide=true;}else{var _9e2=_9e0?(i>0?this.childBoxes[i-1]:_9e1):(i<this.childBoxes.length-1?this.childBoxes[i+1]:_9e1);if(_9e2.node===_9dc[0].dragSource.domNode){hide=true;}}}if(hide){this.dropIndicator.style.display="none";return;}else{this.dropIndicator.style.display="";}this.placeIndicator(e,_9dc,i,_9e0);if(!dojo.html.hasParent(this.dropIndicator)){dojo.body().appendChild(this.dropIndicator);}},placeIndicator:function(e,_9e4,_9e5,_9e6){var _9e7=this.vertical?"left":"top";var _9e8;if(_9e5<0){if(this.childBoxes.length){_9e8=_9e6?this.childBoxes[0]:this.childBoxes[this.childBoxes.length-1];}else{this.dropIndicator.style[_9e7]=dojo.html.getAbsolutePosition(this.domNode,true)[this.vertical?"x":"y"]+"px";}}else{_9e8=this.childBoxes[_9e5];}if(_9e8){this.dropIndicator.style[_9e7]=(_9e6?_9e8[_9e7]:_9e8[this.vertical?"right":"bottom"])+"px";if(this.vertical){this.dropIndicator.style.height=_9e8.height+"px";this.dropIndicator.style.top=_9e8.top+"px";}else{this.dropIndicator.style.width=_9e8.width+"px";this.dropIndicator.style.left=_9e8.left+"px";}}},onDragOut:function(e){if(this.dropIndicator){dojo.html.removeNode(this.dropIndicator);delete this.dropIndicator;}},onDrop:function(e){this.onDragOut(e);var i=this._getNodeUnderMouse(e);var _9ec=this.vertical?dojo.html.gravity.WEST:dojo.html.gravity.NORTH;if(i<0){if(this.childBoxes.length){if(dojo.html.gravity(this.childBoxes[0].node,e)&_9ec){return this.insert(e,this.childBoxes[0].node,"before");}else{return this.insert(e,this.childBoxes[this.childBoxes.length-1].node,"after");}}return this.insert(e,this.domNode,"append");}var _9ed=this.childBoxes[i];if(dojo.html.gravity(_9ed.node,e)&_9ec){return this.insert(e,_9ed.node,"before");}else{return this.insert(e,_9ed.node,"after");}},insert:function(e,_9ef,_9f0){var node=e.dragObject.domNode;if(_9f0=="before"){return dojo.html.insertBefore(node,_9ef);}else{if(_9f0=="after"){return dojo.html.insertAfter(node,_9ef);}else{if(_9f0=="append"){_9ef.appendChild(node);return true;}}}return false;}});dojo.provide("dojo.dnd.*");dojo.provide("dojo.dnd.HtmlDragMove");dojo.declare("dojo.dnd.HtmlDragMoveSource",dojo.dnd.HtmlDragSource,{onDragStart:function(){var _9f2=new dojo.dnd.HtmlDragMoveObject(this.dragObject,this.type);if(this.constrainToContainer){_9f2.constrainTo(this.constrainingContainer);}return _9f2;},onSelected:function(){for(var i=0;i<this.dragObjects.length;i++){dojo.dnd.dragManager.selectedSources.push(new dojo.dnd.HtmlDragMoveSource(this.dragObjects[i]));}}});dojo.declare("dojo.dnd.HtmlDragMoveObject",dojo.dnd.HtmlDragObject,{onDragStart:function(e){dojo.html.clearSelection();this.dragClone=this.domNode;if(dojo.html.getComputedStyle(this.domNode,"position")!="absolute"){this.domNode.style.position="relative";}var left=parseInt(dojo.html.getComputedStyle(this.domNode,"left"));var top=parseInt(dojo.html.getComputedStyle(this.domNode,"top"));this.dragStartPosition={x:isNaN(left)?0:left,y:isNaN(top)?0:top};this.scrollOffset=dojo.html.getScroll().offset;this.dragOffset={y:this.dragStartPosition.y-e.pageY,x:this.dragStartPosition.x-e.pageX};this.containingBlockPosition={x:0,y:0};if(this.constrainToContainer){this.constraints=this.getConstraints();}dojo.event.connect(this.domNode,"onclick",this,"_squelchOnClick");},onDragEnd:function(e){},setAbsolutePosition:function(x,y){if(!this.disableY){this.domNode.style.top=y+"px";}if(!this.disableX){this.domNode.style.left=x+"px";}},_squelchOnClick:function(e){dojo.event.browser.stopEvent(e);dojo.event.disconnect(this.domNode,"onclick",this,"_squelchOnClick");}});dojo.provide("dojo.widget.Slider");dojo.widget.defineWidget("dojo.widget.Slider",dojo.widget.HtmlWidget,{minimumX:0,minimumY:0,maximumX:10,maximumY:10,snapValuesX:0,snapValuesY:0,_snapToGrid:true,isEnableX:true,isEnableY:true,_valueSizeX:0,_valueSizeY:0,_minX:0,_minY:0,_constraintWidth:0,_constraintHeight:0,_clipLeft:0,_clipRight:0,_clipTop:0,_clipBottom:0,_clipXdelta:0,_clipYdelta:0,initialValueX:0,initialValueY:0,flipX:false,flipY:false,clickSelect:true,activeDrag:false,templateCssString:".sliderMain {\r\n  border: 0px !important;\r\n  border-spacing: 0px !important;\r\n  line-height: 0px !important;\r\n  padding: 0px !important;\r\n  display: -moz-inline-table !important;\r\n  display: inline !important;\r\n  -moz-user-focus: normal !important;\r\n}\r\n\r\n.sliderComponent {\r\n  border: 0px;\r\n  padding: 0px;\r\n  margin: 0px;\r\n}\r\n\r\n.sliderHandle { \r\n  top: 0px;\r\n  left: 0px;\r\n  z-index: 1000;\r\n  position: absolute !important;\r\n}\r\n\r\n.sliderOutsetButton { \r\n  border-style: outset;\r\n  border-width: 0px 1px 1px 0px;\r\n  border-color: black;\r\n}\r\n\r\n.sliderInsetButton { \r\n  border-style: inset;\r\n  border-width: 1px 0px 0px 1px;\r\n  border-color: black;\r\n}\r\n\r\n.sliderButtonY {\r\n  margin: 0px;\r\n  padding: 0px;\r\n  z-index: 900;\r\n}\r\n\r\n.sliderButtonX {\r\n  margin: 0px;\r\n  padding: 0px;\r\n  z-index: 900;\r\n}\r\n\r\n.sliderBackground { \r\n  z-index: 0;\r\n  display: block !important;\r\n  position: relative !important;\r\n}\r\n\r\n.sliderProgressBackground { \r\n  z-index: 800;\r\n  position: absolute !important;\r\n  clip: rect(0px,0px,0px,0px);\r\n}\r\n\r\n.sliderBackgroundSizeOnly { \r\n}\r\n",templateCssPath:dojo.uri.moduleUri("dojo","widget/templates/Slider.css"),templateString:"<table _=\"weird end tag formatting is to prevent whitespace from becoming &nbsp;\" \r\n\tclass=\"sliderMain\" \r\n\tdojoAttachPoint=\"focusNode\" \r\n\tdojoAttachEvent=\"onmousedown:_setFocus; onkey:_handleKeyEvents; onkeyup:_buttonReleased; onmouseup:_buttonReleased; onmousewheel:_mouseWheeled;\"\r\n\ttabindex=\"0\" cols=3 cellpadding=0 cellspacing=0 style=\"\">\r\n\t<tr valign=middle align=center>\r\n\t\t<td class=\"sliderComponent\" colspan=3 dojoAttachPoint=topBorderNode style=\"\"\r\n\t\t\t><img class=\"sliderOutsetButton sliderButtonY\"\r\n\t\t\t\tdojoAttachPoint=topButtonNode \r\n\t\t\t\tdojoAttachEvent=\"onmousedown:_topButtonPressed; onmousemove:_discardEvent; ondblclick:_topButtonDoubleClicked;\"\r\n\t\t\t\tsrc=\"${this.topButtonSrc}\" \r\n\t\t\t\tstyle=\"${this.buttonStyleY}\"\r\n\t\t></td>\r\n\t</tr>\r\n\t<tr valign=middle align=center>\r\n\t\t<td class=\"sliderComponent\" dojoAttachPoint=leftBorderNode style=\"\"\r\n\t\t\t><img class=\"sliderOutsetButton sliderButtonX\"\r\n\t\t\t\tdojoAttachPoint=leftButtonNode\r\n\t\t\t\tdojoAttachEvent=\"onmousedown:_leftButtonPressed; onmousemove:_discardEvent; ondblclick:_leftButtonDoubleClicked;\"\r\n\t\t\t\tsrc=\"${this.leftButtonSrc}\" \r\n\t\t\t\tstyle=\"${this.buttonStyleX}\"\r\n\t\t></td>\r\n\t\t<td dojoAttachPoint=constrainingContainerNode \r\n\t\t\tclass=\"sliderComponent sliderBackground\"\r\n\t\t\tstyle=\"${this.backgroundStyle}\"\r\n\t\t\t><img src=\"${this.handleSrc}\" \r\n\t\t\t\tclass=sliderHandle\r\n\t\t\t\tdojoAttachPoint=sliderHandleNode\r\n\t\t\t\tstyle=\"${this.handleStyle}\"\r\n\t\t\t><img src=\"${this.progressBackgroundSrc}\"\r\n\t\t\t\tclass=\"sliderBackgroundSizeOnly sliderProgressBackground\"\r\n\t\t\t\tdojoAttachPoint=progressBackgroundNode\r\n\t\t\t\tstyle=\"${this.backgroundSize}\"\r\n\t\t\t><img src=\"${this.backgroundSrc}\" \r\n\t\t\t\tclass=sliderBackgroundSizeOnly\r\n\t\t\t\tdojoAttachPoint=sliderBackgroundNode\r\n\t\t\t\tstyle=\"${this.backgroundSize}\"\r\n\t\t></td>\r\n\t\t<td class=\"sliderComponent\" dojoAttachPoint=rightBorderNode style=\"\"\r\n\t\t\t><img class=\"sliderOutsetButton sliderButtonX\"\r\n\t\t\t\tdojoAttachPoint=rightButtonNode\r\n\t\t\t\tdojoAttachEvent=\"onmousedown:_rightButtonPressed; onmousemove:_discardEvent; ondblclick:_rightButtonDoubleClicked;\"\r\n\t\t\t\tsrc=\"${this.rightButtonSrc}\" \r\n\t\t\t\tstyle=\"${this.buttonStyleX}\"\r\n\t\t></td>\r\n\t</tr>\r\n\t<tr valign=middle align=center>\r\n\t\t<td class=\"sliderComponent\" colspan=3 dojoAttachPoint=bottomBorderNode style=\"\"\r\n\t\t\t><img class=\"sliderOutsetButton sliderButtonY\"\r\n\t\t\t\tdojoAttachPoint=bottomButtonNode \r\n\t\t\t\tdojoAttachEvent=\"onmousedown:_bottomButtonPressed; onmousemove:_discardEvent; ondblclick:_bottomButtonDoubleClicked;\"\r\n\t\t\t\tsrc=\"${this.bottomButtonSrc}\" \r\n\t\t\t\tstyle=\"${this.buttonStyleY}\"\r\n\t\t></td>\r\n\t</tr>\r\n</table>\r\n",_isDragInProgress:false,bottomButtonSrc:dojo.uri.moduleUri("dojo","widget/templates/images/slider_down_arrow.png"),topButtonSrc:dojo.uri.moduleUri("dojo","widget/templates/images/slider_up_arrow.png"),leftButtonSrc:dojo.uri.moduleUri("dojo","widget/templates/images/slider_left_arrow.png"),rightButtonSrc:dojo.uri.moduleUri("dojo","widget/templates/images/slider_right_arrow.png"),backgroundSrc:dojo.uri.moduleUri("dojo","widget/templates/images/blank.gif"),progressBackgroundSrc:dojo.uri.moduleUri("dojo","widget/templates/images/blank.gif"),backgroundSize:"width:200px;height:200px;",backgroundStyle:"",buttonStyleX:"",buttonStyleY:"",handleStyle:"",handleSrc:dojo.uri.moduleUri("dojo","widget/templates/images/slider-button.png"),showButtons:true,_eventCount:0,_typamaticTimer:null,_typamaticFunction:null,defaultTimeout:500,timeoutChangeRate:0.9,_currentTimeout:this.defaultTimeout,_handleKeyEvents:function(evt){if(!evt.key){return;}if(!evt.ctrlKey&&!evt.altKey){var _9fc=this.isEnableX&&!this.isEnableY;var _9fd=this.isEnableY&&!this.isEnableX;switch(evt.key){case evt.KEY_LEFT_ARROW: dojo.event.browser.stopEvent(evt);if(_9fd){this._bottomButtonPressed(evt);}else{this._leftButtonPressed(evt);}return;case evt.KEY_RIGHT_ARROW: dojo.event.browser.stopEvent(evt);if(_9fd){this._topButtonPressed(evt);}else{this._rightButtonPressed(evt);}return;case evt.KEY_DOWN_ARROW: dojo.event.browser.stopEvent(evt);if(_9fc){this._leftButtonPressed(evt);}else{this._bottomButtonPressed(evt);}return;case evt.KEY_UP_ARROW: dojo.event.browser.stopEvent(evt);if(_9fc){this._rightButtonPressed(evt);}else{this._topButtonPressed(evt);}return;}}this._eventCount++;},_pressButton:function(_9fe){_9fe.className=_9fe.className.replace("Outset","Inset");},_releaseButton:function(_9ff){_9ff.className=_9ff.className.replace("Inset","Outset");},_buttonPressed:function(evt,_a01){this._setFocus();if(typeof evt=="object"){if(this._typamaticTimer!=null){if(this._typamaticNode==_a01){return;}clearTimeout(this._typamaticTimer);}this._buttonReleased(null);this._eventCount++;this._typamaticTimer=null;this._currentTimeout=this.defaultTimeout;dojo.event.browser.stopEvent(evt);}else{if(evt!=this._eventCount){this._buttonReleased(null);return false;}}if(_a01==this.leftButtonNode&&this.isEnableX){this._snapX(dojo.html.getPixelValue(this.sliderHandleNode,"left")-this._valueSizeX);}else{if(_a01==this.rightButtonNode&&this.isEnableX){this._snapX(dojo.html.getPixelValue(this.sliderHandleNode,"left")+this._valueSizeX);}else{if(_a01==this.topButtonNode&&this.isEnableY){this._snapY(dojo.html.getPixelValue(this.sliderHandleNode,"top")-this._valueSizeY);}else{if(_a01==this.bottomButtonNode&&this.isEnableY){this._snapY(dojo.html.getPixelValue(this.sliderHandleNode,"top")+this._valueSizeY);}else{return false;}}}}this._pressButton(_a01);this.notifyListeners();this._typamaticNode=_a01;this._typamaticTimer=dojo.lang.setTimeout(this,"_buttonPressed",this._currentTimeout,this._eventCount,_a01);this._currentTimeout=Math.round(this._currentTimeout*this.timeoutChangeRate);return false;},_bottomButtonPressed:function(evt){return this._buttonPressed(evt,this.bottomButtonNode);},_bottomButtonDoubleClicked:function(evt){var rc=this._bottomButtonPressed(evt);dojo.lang.setTimeout(this,"_buttonReleased",50,null);return rc;},_topButtonPressed:function(evt){return this._buttonPressed(evt,this.topButtonNode);},_topButtonDoubleClicked:function(evt){var rc=this._topButtonPressed(evt);dojo.lang.setTimeout(this,"_buttonReleased",50,null);return rc;},_leftButtonPressed:function(evt){return this._buttonPressed(evt,this.leftButtonNode);},_leftButtonDoubleClicked:function(evt){var rc=this._leftButtonPressed(evt);dojo.lang.setTimeout(this,"_buttonReleased",50,null);return rc;},_rightButtonPressed:function(evt){return this._buttonPressed(evt,this.rightButtonNode);},_rightButtonDoubleClicked:function(evt){var rc=this._rightButtonPressed(evt);dojo.lang.setTimeout(this,"_buttonReleased",50,null);return rc;},_buttonReleased:function(evt){if(typeof evt=="object"&&evt!=null&&typeof evt.keyCode!="undefined"&&evt.keyCode!=null){var _a0f=evt.keyCode;switch(_a0f){case evt.KEY_LEFT_ARROW: case evt.KEY_RIGHT_ARROW: case evt.KEY_DOWN_ARROW: case evt.KEY_UP_ARROW: dojo.event.browser.stopEvent(evt);break;}}this._releaseButton(this.topButtonNode);this._releaseButton(this.bottomButtonNode);this._releaseButton(this.leftButtonNode);this._releaseButton(this.rightButtonNode);this._eventCount++;if(this._typamaticTimer!=null){clearTimeout(this._typamaticTimer);}this._typamaticTimer=null;this._currentTimeout=this.defaultTimeout;},_mouseWheeled:function(evt){var _a11=0;if(typeof evt.wheelDelta=="number"){_a11=evt.wheelDelta;}else{if(typeof evt.detail=="number"){_a11=-evt.detail;}}if(this.isEnableY){if(_a11>0){this._topButtonPressed(evt);this._buttonReleased(evt);}else{if(_a11<0){this._bottomButtonPressed(evt);this._buttonReleased(evt);}}}else{if(this.isEnableX){if(_a11>0){this._rightButtonPressed(evt);this._buttonReleased(evt);}else{if(_a11<0){this._leftButtonPressed(evt);this._buttonReleased(evt);}}}}},_discardEvent:function(evt){dojo.event.browser.stopEvent(evt);},_setFocus:function(){if(this.focusNode.focus){this.focusNode.focus();}},fillInTemplate:function(args,frag){var _a15=this.getFragNodeRef(frag);dojo.html.copyStyle(this.domNode,_a15);var _a16=this.domNode.style.padding;if(dojo.lang.isString(_a16)&&_a16!=""&&_a16!="0px"&&_a16!="0px 0px 0px 0px"){this.topBorderNode.style.padding=this.bottomBorderNode.style.padding=_a16;this.topBorderNode.style.paddingBottom="0px";this.bottomBorderNode.style.paddingTop="0px";this.rightBorderNode.style.paddingRight=this.domNode.style.paddingRight;this.leftBorderNode.style.paddingLeft=this.domNode.style.paddingLeft;this.domNode.style.padding="0px 0px 0px 0px";}var _a17=this.domNode.style.borderWidth;if(dojo.lang.isString(_a17)&&_a17!=""&&_a17!="0px"&&_a17!="0px 0px 0px 0px"){this.topBorderNode.style.borderStyle=this.rightBorderNode.style.borderStyle=this.bottomBorderNode.style.borderStyle=this.leftBorderNode.style.borderStyle=this.domNode.style.borderStyle;this.topBorderNode.style.borderColor=this.rightBorderNode.style.borderColor=this.bottomBorderNode.style.borderColor=this.leftBorderNode.style.borderColor=this.domNode.style.borderColor;this.topBorderNode.style.borderWidth=this.bottomBorderNode.style.borderWidth=_a17;this.topBorderNode.style.borderBottomWidth="0px";this.bottomBorderNode.style.borderTopWidth="0px";this.rightBorderNode.style.borderRightWidth=this.domNode.style.borderRightWidth;this.leftBorderNode.style.borderLeftWidth=this.domNode.style.borderLeftWidth;this.domNode.style.borderWidth="0px 0px 0px 0px";}this._handleMove=new dojo.widget._SliderDragMoveSource(this.sliderHandleNode);this._handleMove.setParent(this);if(this.clickSelect){dojo.event.connect(this.constrainingContainerNode,"onmousedown",this,"_onClick");}if(this.isEnableX){this.setValueX(!isNaN(this.initialValueX)?this.initialValueX:(!isNaN(this.minimumX)?this.minimumX:0));}if(!this.isEnableX||!this.showButtons){this.rightButtonNode.style.width="1px";this.rightButtonNode.style.visibility="hidden";this.leftButtonNode.style.width="1px";this.leftButtonNode.style.visibility="hidden";}if(this.isEnableY){this.setValueY(!isNaN(this.initialValueY)?this.initialValueY:(!isNaN(this.minimumY)?this.minimumY:0));}if(!this.isEnableY||!this.showButtons){this.bottomButtonNode.style.width="1px";this.bottomButtonNode.style.visibility="hidden";this.topButtonNode.style.width="1px";this.topButtonNode.style.visibility="hidden";}if(this.focusNode.addEventListener){this.focusNode.addEventListener("DOMMouseScroll",dojo.lang.hitch(this,"_mouseWheeled"),false);}},_snapX:function(x){if(x<0){x=0;}else{if(x>this._constraintWidth){x=this._constraintWidth;}else{var _a19=Math.round(x/this._valueSizeX);x=Math.round(_a19*this._valueSizeX);}}this.sliderHandleNode.style.left=x+"px";if(this.flipX){this._clipLeft=x+this._clipXdelta;}else{this._clipRight=x+this._clipXdelta;}this.progressBackgroundNode.style.clip="rect("+this._clipTop+"px,"+this._clipRight+"px,"+this._clipBottom+"px,"+this._clipLeft+"px)";},_calc_valueSizeX:function(){var _a1a=dojo.html.getContentBox(this.constrainingContainerNode);var _a1b=dojo.html.getContentBox(this.sliderHandleNode);if(isNaN(_a1a.width)||isNaN(_a1b.width)||_a1a.width<=0||_a1b.width<=0){return false;}this._constraintWidth=_a1a.width+dojo.html.getPadding(this.constrainingContainerNode).width-_a1b.width;if(this.flipX){this._clipLeft=this._clipRight=_a1a.width;}else{this._clipLeft=this._clipRight=0;}this._clipXdelta=_a1b.width>>1;if(!this.isEnableY){this._clipTop=0;this._clipBottom=_a1a.height;}if(this._constraintWidth<=0){return false;}if(this.snapValuesX==0){this.snapValuesX=this._constraintWidth+1;}this._valueSizeX=this._constraintWidth/(this.snapValuesX-1);return true;},setValueX:function(_a1c){if(0==this._valueSizeX){if(this._calc_valueSizeX()==false){dojo.lang.setTimeout(this,"setValueX",100,_a1c);return;}}if(isNaN(_a1c)){_a1c=0;}if(_a1c>this.maximumX){_a1c=this.maximumX;}else{if(_a1c<this.minimumX){_a1c=this.minimumX;}}var _a1d=(_a1c-this.minimumX)/(this.maximumX-this.minimumX);if(this.flipX){_a1d=1-_a1d;}this._snapX(_a1d*this._constraintWidth);this.notifyListeners();},getValueX:function(){var _a1e=dojo.html.getPixelValue(this.sliderHandleNode,"left")/this._constraintWidth;if(this.flipX){_a1e=1-_a1e;}return Math.round(_a1e*(this.snapValuesX-1))*((this.maximumX-this.minimumX)/(this.snapValuesX-1))+this.minimumX;},_snapY:function(y){if(y<0){y=0;}else{if(y>this._constraintHeight){y=this._constraintHeight;}else{var _a20=Math.round(y/this._valueSizeY);y=Math.round(_a20*this._valueSizeY);}}this.sliderHandleNode.style.top=y+"px";if(this.flipY){this._clipTop=y+this._clipYdelta;}else{this._clipBottom=y+this._clipYdelta;}this.progressBackgroundNode.style.clip="rect("+this._clipTop+"px,"+this._clipRight+"px,"+this._clipBottom+"px,"+this._clipLeft+"px)";},_calc_valueSizeY:function(){var _a21=dojo.html.getContentBox(this.constrainingContainerNode);var _a22=dojo.html.getContentBox(this.sliderHandleNode);if(isNaN(_a21.height)||isNaN(_a22.height)||_a21.height<=0||_a22.height<=0){return false;}this._constraintHeight=_a21.height+dojo.html.getPadding(this.constrainingContainerNode).height-_a22.height;if(this.flipY){this._clipTop=this._clipBottom=_a21.height;}else{this._clipTop=this._clipBottom=0;}this._clipYdelta=_a22.height>>1;if(!this.isEnableX){this._clipLeft=0;this._clipRight=_a21.width;}if(this._constraintHeight<=0){return false;}if(this.snapValuesY==0){this.snapValuesY=this._constraintHeight+1;}this._valueSizeY=this._constraintHeight/(this.snapValuesY-1);return true;},setValueY:function(_a23){if(0==this._valueSizeY){if(this._calc_valueSizeY()==false){dojo.lang.setTimeout(this,"setValueY",100,_a23);return;}}if(isNaN(_a23)){_a23=0;}if(_a23>this.maximumY){_a23=this.maximumY;}else{if(_a23<this.minimumY){_a23=this.minimumY;}}var _a24=(_a23-this.minimumY)/(this.maximumY-this.minimumY);if(this.flipY){_a24=1-_a24;}this._snapY(_a24*this._constraintHeight);this.notifyListeners();},getValueY:function(){var _a25=dojo.html.getPixelValue(this.sliderHandleNode,"top")/this._constraintHeight;if(this.flipY){_a25=1-_a25;}return Math.round(_a25*(this.snapValuesY-1))*((this.maximumY-this.minimumY)/(this.snapValuesY-1))+this.minimumY;},_onClick:function(evt){if(this._isDragInProgress){return;}var _a27=dojo.html.getAbsolutePosition(this.constrainingContainerNode,true,dojo.html.boxSizing.MARGIN_BOX);var _a28=dojo.html.getContentBox(this._handleMove.domNode);if(this.isEnableX){var x=evt.pageX-_a27.x-(_a28.width>>1);this._snapX(x);}if(this.isEnableY){var y=evt.pageY-_a27.y-(_a28.height>>1);this._snapY(y);}this.notifyListeners();},notifyListeners:function(){this.onValueChanged(this.getValueX(),this.getValueY());},onValueChanged:function(x,y){}});dojo.widget.defineWidget("dojo.widget.SliderHorizontal",dojo.widget.Slider,{isEnableX:true,isEnableY:false,initialValue:"",snapValues:"",minimum:"",maximum:"",buttonStyle:"",backgroundSize:"height:10px;width:200px;",backgroundSrc:dojo.uri.moduleUri("dojo","widget/templates/images/slider-bg.gif"),flip:false,postMixInProperties:function(){dojo.widget.SliderHorizontal.superclass.postMixInProperties.apply(this,arguments);if(!isNaN(parseFloat(this.initialValue))){this.initialValueX=parseFloat(this.initialValue);}if(!isNaN(parseFloat(this.minimum))){this.minimumX=parseFloat(this.minimum);}if(!isNaN(parseFloat(this.maximum))){this.maximumX=parseFloat(this.maximum);}if(!isNaN(parseInt(this.snapValues))){this.snapValuesX=parseInt(this.snapValues);}if(dojo.lang.isString(this.buttonStyle)&&this.buttonStyle!=""){this.buttonStyleX=this.buttonStyle;}if(dojo.lang.isBoolean(this.flip)){this.flipX=this.flip;}},notifyListeners:function(){this.onValueChanged(this.getValueX());},getValue:function(){return this.getValueX();},setValue:function(_a2d){this.setValueX(_a2d);},onValueChanged:function(_a2e){}});dojo.widget.defineWidget("dojo.widget.SliderVertical",dojo.widget.Slider,{isEnableX:false,isEnableY:true,initialValue:"",snapValues:"",minimum:"",maximum:"",buttonStyle:"",backgroundSize:"width:10px;height:200px;",backgroundSrc:dojo.uri.moduleUri("dojo","widget/templates/images/slider-bg-vert.gif"),flip:false,postMixInProperties:function(){dojo.widget.SliderVertical.superclass.postMixInProperties.apply(this,arguments);if(!isNaN(parseFloat(this.initialValue))){this.initialValueY=parseFloat(this.initialValue);}if(!isNaN(parseFloat(this.minimum))){this.minimumY=parseFloat(this.minimum);}if(!isNaN(parseFloat(this.maximum))){this.maximumY=parseFloat(this.maximum);}if(!isNaN(parseInt(this.snapValues))){this.snapValuesY=parseInt(this.snapValues);}if(dojo.lang.isString(this.buttonStyle)&&this.buttonStyle!=""){this.buttonStyleY=this.buttonStyle;}if(dojo.lang.isBoolean(this.flip)){this.flipY=this.flip;}},notifyListeners:function(){this.onValueChanged(this.getValueY());},getValue:function(){return this.getValueY();},setValue:function(_a2f){this.setValueY(_a2f);},onValueChanged:function(_a30){}});dojo.declare("dojo.widget._SliderDragMoveSource",dojo.dnd.HtmlDragMoveSource,{slider:null,onDragStart:function(evt){this.slider._isDragInProgress=true;var _a32=this.createDragMoveObject();this.slider.notifyListeners();return _a32;},onDragEnd:function(evt){this.slider._isDragInProgress=false;this.slider.notifyListeners();},createDragMoveObject:function(){var _a34=new dojo.widget._SliderDragMoveObject(this.dragObject,this.type);_a34.slider=this.slider;if(this.dragClass){_a34.dragClass=this.dragClass;}return _a34;},setParent:function(_a35){this.slider=_a35;}});dojo.declare("dojo.widget._SliderDragMoveObject",dojo.dnd.HtmlDragMoveObject,{slider:null,onDragMove:function(evt){this.updateDragOffset();if(this.slider.isEnableX){var x=this.dragOffset.x+evt.pageX;this.slider._snapX(x);}if(this.slider.isEnableY){var y=this.dragOffset.y+evt.pageY;this.slider._snapY(y);}if(this.slider.activeDrag){this.slider.notifyListeners();}}});dojo.provide("wtl.AutoComplete");dojo.declare("wtl.AutoComplete",null,function(args){for(var arg in args){this[arg]=args[arg];}this._autoContainer=document.createElement("div");dojo.html.addClass(this._autoContainer,"AutoCompleteContainer");if(this.className){dojo.html.addClass(this._autoContainer,this.className);}dojo.html.setDisplay(this._autoContainer,false);this._autoList=document.createElement("ul");dojo.html.addClass(this._autoList,"AutoList");this._autoContainer.appendChild(this._autoList);this.inputField.parentNode.appendChild(this._autoContainer);this._init();},{inputField:null,_autoContainer:null,_autoList:null,_autoTimer:null,currentItemIndex:-1,_currentItems:null,minChars:3,className:null,autoType:1,AUTOCOMPLETETYPE:{CITYNAME:1},_init:function(){if(this.inputField){dojo.event.connect(this.inputField,"onkeyup",this,"_onInputKeyup");dojo.event.connect(this.inputField,"onblur",this,"_onInputBlur");}if(this._autoList){dojo.event.connect(this._autoList,"onmousedown",this,"_selectResult");}if(this._autoContainer){dojo.event.connect(this._autoContainer,"onmousedown",this,"_focusInput");}},_onInputKeyup:function(evt){if(evt.keyCode>=48&&evt.keyCode<=105){this._updateTimer();}if(evt.keyCode==8||evt.keyCode==46){this._updateTimer();dojo.html.setDisplay(this._autoContainer,false);}if((evt.keyCode==38||evt.keyCode==40)&&this._currentItems.length>0){if(evt.keyCode==38){this._navigateList(-1);}else{if(evt.keyCode==40){this._navigateList(1);}}}},_onInputBlur:function(evt){dojo.html.setDisplay(this._autoContainer,false);},_focusInput:function(evt){dojo.event.browser.stopEvent(evt);},_updateTimer:function(){clearTimeout(this._autoTimer);this._autoTimer=dojo.lang.setTimeout(this,"_performLookup",100);},_navigateList:function(_a3e){if(this._currentItems){var _a3f=this.currentItemIndex;var temp=this.currentItemIndex+_a3e;if(this.currentItemIndex==0&&_a3e==-1){this.currentItemIndex+=_a3e;dojo.html.removeClass(this._currentItems[0],"MatchHover");return;}else{if(temp<this._currentItems.length){this.currentItemIndex+=_a3e;}else{return;}}var _a41=this._currentItems[this.currentItemIndex];if(_a41){if(_a3f!=-1){dojo.html.removeClass(this._currentItems[_a3f],"MatchHover");}this.inputField.value=_a41.getAttribute("match");dojo.html.addClass(_a41,"MatchHover");var obj=this._currentItems[this.currentItemIndex];var _a43=dojo.html.getPaddingBox(obj);var _a44=dojo.html.getPaddingBox(this._autoContainer);var _a45=Math.floor(_a44.height/_a43.height);var t=(this.currentItemIndex-(_a45-1));this._autoContainer.scrollTop=((t>-1?t:0)*_a43.height);}}},_performLookup:function(){if(this.inputField.value==""||this.inputField.value.length<this.minChars){return;}var _a47={actionType:this.autoType,FuzzySearch:this.inputField.value};var _a48=dojo.io.bind({url:"/AutoCompleteHandler.c"+"?rand="+(new Date()).getTime(),method:"get",content:_a47,mimetype:"text/json",transport:"XMLHTTPTransport",load:dojo.lang.hitch(this,"_displayResults")});},_displayResults:function(type,data,evt){this._autoList.innerHTML=data.html;this.currentItemIndex=-1;if(data.totalItems>0){this._currentItems=dojo.html.getElementsByClassName("Match",this._autoList);dojo.html.setDisplay(this._autoContainer,true);}else{dojo.html.setDisplay(this._autoContainer,false);}},_selectResult:function(evt){this.inputField.value=evt.target.getAttribute("match");dojo.html.setDisplay(this._autoContainer,false);}});dojo.provide("wtl.CompareManager");dojo.declare("wtl.CompareManager",null,function(args){for(var arg in args){this[arg]=args[arg];}this._items=[];var _a4f=dojo.io.cookie.getCookie(this.cookieName);if(_a4f&&_a4f.length){dojo.io.bind({url:wtl.util.urlAppend(this.httpHandler,"isCompare=true&rand="+(new Date()).getTime()),method:"get",load:dojo.lang.hitch(this,"_load"),mimetype:"text/json",transport:"XMLHTTPTransport"});}},{httpHandler:"",maxItems:0,cookieName:"",_load:function(type,obj,_a52){if(obj&&obj.length){for(var i=0;i<obj.length&&!this._isFull();i++){this._onAddItem(obj[i],false);}}},toggle:function(_a54,item){var p=this._getExistingItemIndex(item);if(_a54&&p==-1){this._onAddItem(item,true);this._updateCookie();}else{if(!_a54&&p!=-1){this._onRemoveItem(p,item);this._updateCookie();}}},_onAddItem:function(item,_a58){this._items.push(item);this.onToggled(item,true,this._isFull(),_a58);},_onRemoveItem:function(idx,item){this._items.splice(idx,1);this.onToggled(item,false,this._isFull(),false);},onToggled:function(item,_a5c,_a5d,_a5e){},onDisplayCompareable:function(item){this.onUpdateCompareableDisplay(item,this._isCompared(item),this._isFull());},onUpdateCompareableDisplay:function(item,_a61,_a62){},_getExistingItemIndex:function(item){for(var i=0;i<this._items.length;i++){if(wtl.util.listingsEqual(this._items[i],item)){return i;}}return -1;},_isCompared:function(item){return this._getExistingItemIndex(item)!=-1;},_isFull:function(){return this.maxItems!=0&&this._items.length>=this.maxItems;},_updateCookie:function(){if(this._items.length==0){dojo.io.cookie.deleteCookie(this.cookieName);}else{var _a66="";for(var i=0;i<this._items.length;i++){_a66+=(i>0?"|":"")+wtl.util.composeIds(this._items[i]);}dojo.io.cookie.setCookie(this.cookieName,_a66,-1,"/");}},removeAll:function(){for(var i=0;i<this._items.length;i++){this.onToggled(this._items[i],false,false);}this._items=[];this._updateCookie();}});dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(_a69){this.pairs=[];this.returnWrappers=_a69||false;};dojo.lang.extend(dojo.AdapterRegistry,{register:function(name,_a6b,wrap,_a6d,_a6e){var type=(_a6e)?"unshift":"push";this.pairs[type]([name,_a6b,wrap,_a6d]);},match:function(){for(var i=0;i<this.pairs.length;i++){var pair=this.pairs[i];if(pair[1].apply(this,arguments)){if((pair[3])||(this.returnWrappers)){return pair[2];}else{return pair[2].apply(this,arguments);}}}throw new Error("No match found");},unregister:function(name){for(var i=0;i<this.pairs.length;i++){var pair=this.pairs[i];if(pair[0]==name){this.pairs.splice(i,1);return true;}}return false;}});dojo.provide("dojo.json");dojo.json={jsonRegistry:new dojo.AdapterRegistry(),register:function(name,_a76,wrap,_a78){dojo.json.jsonRegistry.register(name,_a76,wrap,_a78);},evalJson:function(json){try{return eval("("+json+")");}catch(e){dojo.debug(e);return json;}},serialize:function(o){var _a7b=typeof (o);if(_a7b=="undefined"){return "undefined";}else{if((_a7b=="number")||(_a7b=="boolean")){return o+"";}else{if(o===null){return "null";}}}if(_a7b=="string"){return dojo.string.escapeString(o);}var me=arguments.callee;var _a7d;if(typeof (o.__json__)=="function"){_a7d=o.__json__();if(o!==_a7d){return me(_a7d);}}if(typeof (o.json)=="function"){_a7d=o.json();if(o!==_a7d){return me(_a7d);}}if(_a7b!="function"&&typeof (o.length)=="number"){var res=[];for(var i=0;i<o.length;i++){var val=me(o[i]);if(typeof (val)!="string"){val="undefined";}res.push(val);}return "["+res.join(",")+"]";}try{window.o=o;_a7d=dojo.json.jsonRegistry.match(o);return me(_a7d);}catch(e){}if(_a7b=="function"){return null;}res=[];for(var k in o){var _a82;if(typeof (k)=="number"){_a82="\""+k+"\"";}else{if(typeof (k)=="string"){_a82=dojo.string.escapeString(k);}else{continue;}}val=me(o[k]);if(typeof (val)!="string"){continue;}res.push(_a82+":"+val);}return "{"+res.join(",")+"}";}};dojo.provide("wtl.util");wtl.util={connectDialogKeyPress:function(_a83){dojo.event.connect(document,"onkeypress",function(evt){if(evt.keyCode==27){_a83.hide();}});},urlAppend:function(s1,s2){return s1+this.urlTokenizer(s1)+s2;},urlTokenizer:function(s){return s.indexOf("?")!=-1?(s.charAt(s.length-1)=="?"?"":"&"):"?";},formatNumber:function(_a88){_a88+="";var _a89=/(\d+)(\d{3})/;while(_a89.test(_a88)){_a88=_a88.replace(_a89,"$1,$2");}return _a88;},formatCurrency:function(_a8a){_a8a+="";var _a8b=/(\d+)(\d{3})/;while(_a8b.test(_a8a)){_a8a=_a8a.replace(_a8b,"$1,$2");}return "$"+_a8a;},composeIds:function(item,type){if(!type){type="listings";}switch(type){case "agents": return item.WTLUserID;case "listings": default: var _a8e=item.ListingID&&item.ListingID>0?item.ListingID:-1;var _a8f=_a8e==-1&&item.MLSProviderID&&item.MLSProviderID>0?item.MLSProviderID:-1;var _a90=_a8e==-1&&item.MLSID&&item.MLSID.length?item.MLSID:"";return _a8e+"~"+_a8f+"~"+_a90;}},decomposeIds:function(s,type){if(!s||!s.length){return null;}if(!type){type="listings";}switch(type){case "agents": return {WTLUserID:parseInt(s)};case "listings": default: var _a93=s.split("~");if(_a93.length==3){var _a94=parseInt(_a93[0]);if(_a94==0){_a94=-1;}var _a95=parseInt(_a93[1]);if(_a95==0||_a94!=-1){_a95=-1;}var _a96=_a94==-1?_a93[2]:"";return {ListingID:_a94,MLSProviderID:_a95,MLSID:_a96};}}return null;},fixPng:function(elem,_a98,w,h){if((dojo.render.html.ie55||dojo.render.html.ie60)&&elem){var _a9b=/url\(\s*([\t\s\w()\/.\\'"-:#=&?]+)\s*\)/i;var _a9c=/^[\s]*(['"]?)([\w()\/.\\'"-:#=&?]*)\1[\s]*?$/;var _a9d=_a9b.exec(dojo.html.getComputedStyle(elem,"background-image"));if(_a9d&&_a9d.length>1){var src=_a9d[1].replace(_a9c,"$2");if(/.png/i.test(src)){elem.style.background="none";elem.runtimeStyle.width=w?w:dojo.html.getComputedStyle(elem,"width");elem.runtimeStyle.height=h?h:dojo.html.getComputedStyle(elem,"height");elem.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"',sizingMethod='"+(_a98?_a98:"crop")+"')";}}}},getQueryStringParam:function(str,_aa0){if(str&&str.length&&_aa0&&_aa0.length){var p=str.indexOf("?");if(p!=-1&&(p+1)<str.length){var _aa2=str.substring(p+1);var vars=_aa2.split("&");for(var i=0;i<vars.length;i++){var pair=vars[i].split("=");if(pair[0].toLowerCase()==_aa0.toLowerCase()){return pair[1];}}}}return null;},getListingKey:function(_aa6){if(!_aa6){return null;}var _aa7=_aa6.ListingID&&parseInt(_aa6.ListingID)>0?parseInt(_aa6.ListingID):-1;var _aa8=_aa7==-1&&_aa6.MLSProviderID&&parseInt(_aa6.MLSProviderID)>0?parseInt(_aa6.MLSProviderID):-1;var _aa9=_aa7==-1&&_aa6.MLSID&&_aa6.MLSID.length?_aa6.MLSID.toString():"";if(_aa7==-1&&_aa8==-1&&_aa9.length==0){return null;}return {ListingID:_aa7,MLSProviderID:_aa8,MLSID:_aa9};},listingsEqual:function(l1,l2){var k1=this.getListingKey(l1);var k2=this.getListingKey(l2);if(!k1&&!k2){return true;}if(!k1||!k2){return false;}return k1.ListingID==k2.ListingID&&k1.MLSProviderID==k2.MLSProviderID&&k1.MLSID==k2.MLSID;},agentsEqual:function(a1,a2){if(!a1&&!a2){return true;}if(!a1||!a2){return false;}return a1.WTLUserID==a2.WTLUserID;},officesEqual:function(o1,o2){if(!o1&&!o2){return true;}if(!o1||!o2){return false;}return o1.OfficeID==o2.OfficeID;},removeFromObjectByKey:function(key,obj){if(dojo.lang.isArray(key)){for(var i=0;i<key.length;i++){delete obj[key[i]];}}else{delete obj[key];}return obj;},phoneFormat:function(obj,_ab6){var s="";if(dojo.lang.isArray(obj)){var len=(_ab6&&_ab6<=obj.length)?_ab6:obj.length;for(var i=0;i<len;i++){s+="<div class=\"ContactNumber\"><i>"+obj[i].Description+":</i> <b>"+obj[i].Number+"</b></div>";}}else{s+="<div class=\"ContactNumber\"><i>"+obj.Description+":</i> <b>"+obj.Number+"</b></div>";}return s;},destroyChildren:function(_aba){var _abb=_aba.childNodes.length;while(_aba.hasChildNodes()){dojo.html.destroyNode(_aba.firstChild);}return _abb;},disconnectAll:function(obj){var reJP=/\$joinpoint$/;var _abe=/\$.+$/;for(var p in obj){if(reJP.test(p)){var jp=obj[p];var _ac1=jp.methodname.replace(_abe,"");obj[_ac1]=jp.methodfunc;jp.unintercept();dojo.debug("disconnectAll: "+_ac1);jp=null;delete obj[p];delete obj[p+"$method"];}}},onPhotoMouseOver:function(evt){dojo.event.browser.stopEvent(evt);var _ac3=evt.target;while(!dojo.html.hasClass(_ac3,"PhotoHolder")){_ac3=_ac3.parentNode;}dojo.html.addClass(_ac3,"Over");},onPhotoMouseOut:function(evt){dojo.event.browser.stopEvent(evt);var _ac5=evt.target;while(!dojo.html.hasClass(_ac5,"PhotoHolder")){_ac5=_ac5.parentNode;}dojo.html.removeClass(_ac5,"Over");},getSavedSearchURL:function(_ac6){return "http://"+window.location.host+"/Search/"+_ac6;},buildPhoneList:function(list,_ac8){if(list.options.length==0){var opt=document.createElement("option");opt.setAttribute("value","");opt.innerHTML="";list.appendChild(opt);for(var i=0;i<_ac8.length;i++){opt=document.createElement("option");opt.setAttribute("value",_ac8[i].Value);opt.innerHTML=_ac8[i].Description;list.appendChild(opt);}}}};dojo.provide("wtl.widget.BalloonItemListing");dojo.widget.defineWidget("wtl.widget.BalloonItemListing",dojo.widget.HtmlWidget,{isContainer:false,widgetType:"BalloonItemListing",templateCssPath:null,templateString:"<tr>\r\n\t<td class=\"BalloonItem\">\r\n\t\t<div class=\"ItemSeparator\" dojoAttachPoint=\"separator\"></div>\r\n\t\t<div class=\"ItemContainer\">\r\n\r\n\t\t\t<div dojoAttachPoint=\"bannerContainer\" class=\"BannerContainer\">\r\n\t\t\t\t<div dojoAttachPoint=\"bannerBody\" class=\"BannerBody\">Listed By ${this.listedByDisplay}</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"InfoThumbRow\" dojoAttachPoint=\"infoThumbRow\">\r\n\t\t\t\t<div class=\"Left\" style=\"position:relative;\"><img alt=\"\" dojoAttachPoint=\"thumb\" /></div>\t\t\t\r\n\t\t\t\t<div class=\"Info\">\r\n\t\t\t\t\t<p class=\"Price\" dojoAttachPoint=\"price\"></p>\r\n\t\t\t\t\t<p dojoAttachPoint=\"address\"></p>\r\n\t\t\t\t\t<p dojoAttachPoint=\"propID\"></p>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"ActiveStatus\" dojoAttachPoint=\"propertyStatus\"></div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"Compare\">\r\n\t\t\t\t<input dojoAttachPoint=\"compareCheckbox\" dojoAttachEvent=\"onclick:_onToggleCompare\" type=\"checkbox\" />\r\n\t\t\t\t<label dojoAttachPoint=\"compareLabel\" class=\"Pointer\">Select to Compare</label>\r\n\t\t\t\t<a href=\"\" dojoAttachPoint=\"previewLink\" class=\"PreviewLink\">Click to Preview</a>\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<div class=\"IDXContainer\" dojoAttachPoint=\"idxContainer\">\r\n\t\t\t\t<div dojoAttachPoint=\"idxText\" class=\"IDXText\"></div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"ListedBy\" dojoAttachPoint=\"listedBy\"></div>\r\n\t\t\t\r\n\t\t</div>\t\r\n\t</td>\r\n</tr>\r\n",currentDeployment:{},balloonClick:null,type:"",item:null,separator:null,showSeparator:false,showCompare:true,infoThumbRow:null,thumb:null,price:null,address:null,propID:null,previewLink:null,compareCheckbox:null,compareLabel:null,bannerContainer:null,bannerBody:null,idxContainer:null,idxText:null,MLSLogo:null,listedByDisplay:null,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/BalloonItemListing.css");}}this.listedByDisplay=this.currentDeployment.showCompanyName?this.item.ListingAgentCompanyName:this.currentDeployment.deploymentName;},fillInTemplate:function(){var uid="BalloonItemCompare"+Math.round(Math.random()*10000000);this.compareCheckbox.id=uid;this.compareLabel.setAttribute("for",uid);dojo.html.setDisplay(this.bannerContainer,(this.item.PropertyID&&this.item.PropertyID>0));this.propertyStatus.className=this.item.ListingStatusCode+"Status";this.price.innerHTML=this.item.PriceDisplay;if(this.item.PriceType&&this.item.PriceType.length>0){this.price.innerHTML+=" "+this.item.PriceType;}this.address.innerHTML=(this.item.Address&&this.item.Address!=""?this.item.Address+"<br />":"")+(this.item.Address2&&this.item.Address2!=""?this.item.Address2+"<br />":"")+this.item.City+", "+this.item.State+" "+this.item.PostalCode;this.propID.innerHTML=this.item.PropertyID&&this.item.PropertyID>0?"Property ID: "+this.item.PropertyID:this.currentDeployment.idxLabel+": "+this.item.MLSID;this.thumb.src=this.item.ThumbImage;dojo.html.setDisplay(this.idxContainer,false);dojo.html.setDisplay(this.listedBy,false);if(this.item.PropertyID<=0){this.idxText.innerHTML=this.item.ListingCourtesy;dojo.html.setDisplay(this.idxContainer,true);dojo.html.addClass(this.idxText,"MLS"+this.item.MLSProviderID);}else{this.listedBy.innerHTML=this.item.ListingCourtesy;dojo.html.setDisplay(this.listedBy,true);}dojo.html.setDisplay(this.separator,this.showSeparator);},postCreate:function(){if(dojo.lang.isFunction(this.balloonClick)){dojo.event.connect([this.previewLink,this.infoThumbRow,this.idxContainer,this.propertyStatus],"onclick",this,"_fireBalloonClick");}},postAttachExternalEvents:function(){this.onDisplayCompareable(this.item);},destroy:function(){if(dojo.lang.isFunction(this.balloonClick)){dojo.event.disconnect([this.previewLink,this.infoThumbRow,this.idxContainer],"onclick",this,"_fireBalloonClick");}wtl.widget.BalloonItemListing.superclass.destroy.call(this);},_fireBalloonClick:function(evt){dojo.event.browser.stopEvent(evt);this.balloonClick(this.type,this.item);},_onToggleCompare:function(evt){this.toggleCompare(evt.target.checked,this.item);},toggleCompare:function(_ace,item){},onDisplayCompareable:function(item){},onCompareItemToggled:function(item,_ad2,_ad3,_ad4){if(wtl.util.listingsEqual(item,this.item)){this.compareCheckbox.checked=_ad2;}this.compareCheckbox.disabled=!this.compareCheckbox.checked&&_ad3;},onUpdateCompareableDisplay:function(item,_ad6,_ad7){if(wtl.util.listingsEqual(item,this.item)){this.compareCheckbox.checked=_ad6;}this.compareCheckbox.disabled=!this.compareCheckbox.checked&&_ad7;}});dojo.provide("wtl.widget.BalloonItemOffice");dojo.widget.defineWidget("wtl.widget.BalloonItemOffice",dojo.widget.HtmlWidget,{isContainer:false,widgetType:"BalloonItemOffice",templateCssPath:null,templateString:"<tr>\r\n\t<td class=\"BalloonItem OfficeItem\">\r\n\t\t<div dojoAttachPoint=\"separator\"></div>\r\n\t\t<div dojoAttachPoint=\"bannerContainer\" class=\"BannerContainer\">\r\n\t\t\t<div dojoAttachPoint=\"bannerBody\" class=\"BannerBody\">${this.listedByDisplay} Office</div>\r\n\t\t</div>\r\n\t\t<div class=\"ItemContainer\">\r\n\t\t    <div class=\"InfoThumbRow\" dojoAttachPoint=\"infoThumbRow\">\r\n\t\t\t\t<div class=\"Left\" style=\"position:relative;\"><img alt=\"\" dojoAttachPoint=\"thumb\" /></div>\t\t\t\r\n\t\t\t\t<div class=\"Info\">\r\n\t\t\t\t\t<p dojoAttachPoint=\"officeName\"></p>\r\n\t\t\t\t\t<p dojoAttachPoint=\"companyName\"></p>\r\n\t\t\t\t\t<p dojoAttachPoint=\"address\"></p>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"Compare\">\r\n\t\t        <a href=\"\" dojoAttachPoint=\"previewLink\">Click to View Sales Associates</a>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</td>\r\n</tr>\r\n",currentDeployment:{},balloonClick:null,type:"",item:null,separator:null,showSeparator:false,showCompare:false,infoThumbRow:null,thumb:null,officeName:null,address:null,previewLink:null,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/BalloonItemListing.css");}}this.listedByDisplay=this.currentDeployment.deploymentName;},fillInTemplate:function(){this.thumb.src=this.item.ThumbImage;this.companyName.innerHTML=this.item.CompanyName;dojo.html.setDisplay(this.companyName,this.currentDeployment.showCompanyName?true:false);this.officeName.innerHTML=this.item.OfficeName;this.address.innerHTML=this.item.Address+"<br/>"+(this.item.Address2&&this.item.Address2!=""?"<br />"+this.item.Address2:"")+this.item.City+", "+this.item.State+" "+this.item.PostalCode;dojo.html.setDisplay(this.separator,this.showSeparator);},postCreate:function(){if(dojo.lang.isFunction(this.balloonClick)){dojo.event.connect([this.previewLink,this.infoThumbRow],"onclick",this,"_fireBalloonClick");}},postAttachExternalEvents:function(){},destroy:function(){if(dojo.lang.isFunction(this.balloonClick)){dojo.event.disconnect([this.previewLink,this.infoThumbRow],"onclick",this,"_fireBalloonClick");}wtl.widget.BalloonItemOffice.superclass.destroy.call(this);},_fireBalloonClick:function(evt){dojo.event.browser.stopEvent(evt);this.balloonClick(this.type,this.item);},toggleCompare:function(_ad9,item){},onDisplayCompareable:function(item){},onCompareItemToggled:function(item,_add,_ade,_adf){},onUpdateCompareableDisplay:function(item,_ae1,_ae2){}});dojo.provide("wtl.widget.Balloon");dojo.widget.defineWidget("wtl.widget.Balloon",dojo.widget.HtmlWidget,function(){this.data=[];this.balloonItemWidgets=[];},{isContainer:false,widgetType:"Balloon",templateCssPath:null,templateString:"<div class=\"Balloon\" style=\"position:absolute;width:100%;height:100%;visibility:hidden;\">\r\n\t<div class=\"Callout\" dojoAttachPoint=\"callout\"><div></div></div>\r\n\t<div class=\"Container\" dojoAttachPoint=\"balloonContainer\">\r\n\t\t<div class=\"Round1\"></div>\r\n\t\t<div class=\"Round2\"></div>\r\n\t\t<div class=\"Round3\"></div>\r\n\t\t<div class=\"Body\" dojoAttachPoint=\"balloonBody\" style=\"height:150px;\">\r\n\t\t\t<table>\r\n\t\t\t\t<tbody dojoAttachPoint=\"tableBody\"></tbody>\r\n\t\t\t</table>\r\n\t\t</div>\r\n\t\t<div class=\"Round4\"></div>\r\n\t\t<div class=\"Round5\"></div>\r\n\t\t<div class=\"Round1\"></div>\r\n\t</div>\r\n</div>\r\n",callout:null,balloonContainer:null,balloonBody:null,tableBody:null,currentDeployment:{},balloonClick:null,mapLeft:0,mapWidth:0,mapTop:0,mapHeight:0,x:0,y:0,markerHoverWidth:12,onCreateCallback:null,onDestroyCallback:null,showCompare:true,type:"",_timer:null,_overMarker:false,_mouseDown:false,_domOffset:500,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/Balloon.css");}}},postCreate:function(){if(!this.data){this.hide();return;}this.domNode.style.left=(-1*this._domOffset)+"px";this.domNode.style.top=(-1*this._domOffset)+"px";if(this.data.length){for(var i=0;i<this.data.length;i++){for(var j=0;j<this.data[i].data.length;j++){this._createItem({type:this.data[i].key,item:this.data[i].data[j]});}}}else{this._createItem({item:this.data});}this.positionBalloon();dojo.html.setVisibility(this.domNode,true);if(this.data.length){dojo.event.connect(document,"onmousemove",this,"_startHide");dojo.event.connect(document,"onmousedown",this,"_onMouseDown");dojo.event.connect(document,"onmouseup",this,"_onMouseUp");}if(dojo.lang.isFunction(this.onCreateCallback)){this.onCreateCallback();}},postAttachExternalEvents:function(){for(var i=0;i<this.balloonItemWidgets.length;i++){var _ae6=this.balloonItemWidgets[i];dojo.event.connect(_ae6,"toggleCompare",this,"toggleCompare");dojo.event.connect(_ae6,"onDisplayCompareable",this,"onDisplayCompareable");dojo.event.connect(this,"onCompareItemToggled",_ae6,"onCompareItemToggled");dojo.event.connect(this,"onUpdateCompareableDisplay",_ae6,"onUpdateCompareableDisplay");_ae6.postAttachExternalEvents();}},_startHide:function(evt){this._overMarker=this._isOverMarker(evt);this.balloonContainer.parentNode.style.cursor=this._overMarker?"pointer":"default";if(this._mouseDown||this._overMarker||dojo.html.overElement(this.balloonContainer,evt)||dojo.html.overElement(this.callout,evt)){clearTimeout(this._timer);this._timer=null;}else{if(this._timer==null){this._timer=setTimeout(dojo.lang.hitch(this,"hide"),300);}}},_onMouseDown:function(evt){this._mouseDown=true;},_onMouseUp:function(evt){this._mouseDown=false;if(dojo.lang.isFunction(this.balloonClick)){if(this._overMarker&&this.data.length){for(var i=0;i<this.data.length;i++){if(this.data[i].data.length){this.balloonClick(this.data[i].key,this.data[i].data[0]);break;}}}}},_isOverMarker:function(evt){var w=this.markerHoverWidth*1.5;var d=parseInt(w/2);var x=this.x-d;var y=this.y-d;return (evt.pageX>=x&&evt.pageX<=x+w&&evt.pageY>=y&&evt.pageY<=y+w);},hide:function(){dojo.html.setDisplay(this.domNode,false);for(var i=0;i<this.balloonItemWidgets.length;i++){this.balloonItemWidgets[i].destroy();}if(this.data.length){dojo.event.disconnect(document,"onmousemove",this,"_startHide");dojo.event.disconnect(document,"onmousedown",this,"_onMouseDown");dojo.event.disconnect(document,"onmouseup",this,"_onMouseUp");}this.destroy();if(dojo.lang.isFunction(this.onDestroyCallback)){this.onDestroyCallback();}},_createItem:function(args){var _af2={currentDeployment:this.currentDeployment,item:args.item,type:args.type,showSeparator:this.balloonItemWidgets.length>0,showCompare:this.showCompare,balloonClick:this.balloonClick};var tr=document.createElement("tr");this.tableBody.appendChild(tr);var _af4=dojo.widget.createWidget("wtl:BalloonItem"+args.type,_af2,tr);this.balloonItemWidgets.push(_af4);},toggleCompare:function(_af5,item){},onDisplayCompareable:function(item){},onCompareItemToggled:function(item,_af9,_afa,_afb){},onUpdateCompareableDisplay:function(item,_afd,_afe){},positionBalloon:function(){this.y--;var _aff=parseInt(dojo.html.getComputedStyle(this.callout,"width"));var _b00=parseInt(dojo.html.getComputedStyle(this.callout,"height"));var mx=this.x-this.mapLeft;var my=this.y-this.mapTop;var _b03=Math.round(this.mapWidth*0.2);var _b04=Math.round(this.mapHeight*0.15);var _b05=dojo.html.getContentBox(this.balloonContainer).height-100;var _b06=dojo.html.getContentBox(this.tableBody.parentNode);var _b07=_b05+_b06.height;var a=this._getSegment(this.y-this.mapTop,_b04,this.mapHeight-_b04);var _b09=dojo.dom.firstElement(this.callout);var _b0a=0;var _b0b=0;var _b0c=0;var _b0d=0;if(a==2){var _b0e=this.mapHeight-10<_b07;if(this.x<=this.mapWidth/2){_b09.className="CalloutInner CalloutLeft";_b0a=this.x;_b0b=this.y-Math.round(_b00/2);if(_b0e){this.balloonContainer.style.width=(_b06.width+28)+"px";this.balloonBody.style.height=(this.mapHeight-10-_b05)+"px";_b0c=this.x+10;_b0d=this.mapTop+5;}else{this.balloonContainer.style.width=(_b06.width+8)+"px";this.balloonBody.style.height=_b06.height+"px";var h=dojo.html.getContentBox(this.balloonContainer).height;_b0c=this.x+10;_b0d=this.y-parseInt(h/2);if(_b0d+h-this.mapTop>this.mapHeight-5){_b0d=this.mapTop+this.mapHeight-5-h;}else{if(_b0d<this.mapTop+5){_b0d=this.mapTop+5;}}}}else{_b09.className="CalloutInner CalloutRight";_b0a=this.x-_aff;_b0b=this.y-Math.round(_b00/2);if(_b0e){var w=_b06.width+28;this.balloonContainer.style.width=w+"px";this.balloonBody.style.height=(this.mapHeight-10-_b05)+"px";_b0c=this.x-w-_aff+1;_b0d=this.mapTop+5;}else{var w=_b06.width+8;this.balloonContainer.style.width=w+"px";this.balloonBody.style.height=_b06.height+"px";var h=dojo.html.getContentBox(this.balloonContainer).height;_b0c=this.x-w-_aff+1;_b0d=this.y-Math.round(h/2);if(_b0d+h-this.mapTop>this.mapHeight-5){_b0d=this.mapTop+this.mapHeight-5-h;}else{if(_b0d<this.mapTop+5){_b0d=this.mapTop+5;}}}}}else{var col=this._getSegment(this.x-this.mapLeft,_b03,this.mapWidth-_b03);if(a==1){switch(col){case 1: _b09.className="CalloutInner CalloutTopLeft";_b0a=this.x;_b0b=this.y;_b0c=this.x+3;_b0d=this.y+3;if(this.mapHeight-10<(_b0d-this.mapTop)+_b07){this.balloonContainer.style.width=(_b06.width+28)+"px";this.balloonBody.style.height=(this.mapHeight-10-(_b0d-this.mapTop))+"px";}else{this.balloonContainer.style.width=(_b06.width+8)+"px";this.balloonBody.style.height=_b06.height+"px";}break;case 2: _b09.className="CalloutInner CalloutTop";_b0a=this.x-Math.round(_aff/2);_b0b=this.y;var w=_b06.width+8;_b0d=this.y+10;if(this.mapHeight-10<(_b0d-this.mapTop)+_b07){w+=20;this.balloonBody.style.height=(this.mapHeight-10-(_b0d-this.mapTop))+"px";}else{this.balloonBody.style.height=_b06.height+"px";}this.balloonContainer.style.width=w+"px";_b0c=this.x-parseInt(w/2);break;default: _b09.className="CalloutInner CalloutTopRight";_b0a=this.x-_aff;_b0b=this.y;var w=_b06.width+8;_b0d=this.y+3;if(this.mapHeight-10<(_b0d-this.mapTop)+_b07){w+=20;this.balloonBody.style.height=(this.mapHeight-10-(_b0d-this.mapTop))+"px";}else{this.balloonBody.style.height=_b06.height+"px";}this.balloonContainer.style.width=w+"px";_b0c=this.x-w-3;}}else{switch(col){case 1: _b09.className="CalloutInner CalloutBottomLeft";_b0a=this.x;_b0b=this.y-_b00;_b0c=this.x+3;if(this.y-16-this.mapTop<_b07){this.balloonContainer.style.width=(_b06.width+28)+"px";this.balloonBody.style.height=(this.y-16-this.mapTop)+"px";_b0d=this.mapTop+5;}else{this.balloonContainer.style.width=(_b06.width+8)+"px";this.balloonBody.style.height=_b06.height+"px";var h=dojo.html.getContentBox(this.balloonContainer).height;_b0d=this.y-3-h;}break;case 2: _b09.className="CalloutInner CalloutBottom";_b0a=this.x-Math.round(_aff/2);_b0b=this.y-_b00;var w=_b06.width+8;if(this.y-23-this.mapTop<_b07){w+=20;this.balloonBody.style.height=(this.y-23-this.mapTop)+"px";_b0d=this.mapTop+5;}else{this.balloonBody.style.height=_b06.height+"px";var h=dojo.html.getContentBox(this.balloonContainer).height;_b0d=this.y-10-h;}this.balloonContainer.style.width=w+"px";_b0c=this.x-Math.round(w/2);break;default: _b09.className="CalloutInner CalloutBottomRight";_b0a=this.x-_aff;_b0b=this.y-_b00;var w=_b06.width+8;if(this.y-16-this.mapTop<_b07){w+=20;this.balloonContainer.style.width=w+"px";this.balloonBody.style.height=(this.y-16-this.mapTop)+"px";_b0d=this.mapTop+5;}else{this.balloonContainer.style.width=w+"px";this.balloonBody.style.height=_b06.height+"px";var h=dojo.html.getContentBox(this.balloonContainer).height;_b0d=this.y-3-h;}this.balloonContainer.style.width=w+"px";_b0c=this.x-3-w;}}}this.callout.style.left=(_b0a+this._domOffset)+"px";this.callout.style.top=(_b0b+this._domOffset)+"px";this.balloonContainer.style.left=(_b0c+this._domOffset)+"px";this.balloonContainer.style.top=(_b0d+this._domOffset)+"px";},_getSegment:function(){if(arguments.length<2){return 0;}var n=arguments[0];for(var i=1;i<arguments.length;i++){if(n<=arguments[i]){return i;}}return arguments.length;}});dojo.provide("wtl.widget.AreaSelector");dojo.widget.defineWidget("wtl.widget.AreaSelector",dojo.widget.HtmlWidget,{isContainer:false,widgetType:"AreaSelector",templateCssPath:null,templateString:"<div class=\"AreaSelector\">\r\n\t<select class=\"SearchType\" dojoAttachPoint=\"searchTypes\" dojoAttachEvent=\"onchange:_onSearchTypeChange\"></select>\r\n\t<select class=\"SearchArea\" dojoAttachPoint=\"searchAreas\" dojoAttachEvent=\"onchange:_onSearchAreaChange\"></select>\r\n</div>\r\n",currentDeployment:{},data:null,selectedAreaID:0,searchType:0,emptySearchType:{},emptySearchArea:{},searchTypes:null,searchAreas:null,_defaultSearchType:0,_defaultSearchArea:0,_currentAreas:[],postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/AreaSelector.css");}}this._defaultSearchType=this.searchType;this._defaultSearchArea=this.selectedAreaID;},fillInTemplate:function(){this._drawOption(this.emptySearchType,this.searchTypes);this._drawOption(this.emptySearchArea,this.searchAreas);this._drawSearchTypes();this._drawSearchAreas();},postCreate:function(){this._publishSearchTypeChange();dojo.event.topic.subscribe("/getSearchTypeCode",this,"_publishSearchTypeChange");},_drawSearchTypes:function(){if(this.searchTypes.options.length>1){this.searchTypes.selectedIndex=0;this.searchTypes.options.length=1;}var a=this.data;for(var i=0;i<a.length;i++){var obj={label:a[i].SearchName,value:a[i].SearchType};this._drawOption(obj,this.searchTypes,obj.value==this.searchType);}if(this.searchTypes.selectedIndex<0){this.searchTypes.selectedIndex=0;}if(a.length<2){dojo.html.setDisplay(this.searchTypes,false);}},_drawSearchAreas:function(){if(this.searchAreas.options.length>1){this.searchAreas.selectedIndex=0;this.searchAreas.options.length=1;}var a=this.data;for(var i=0;i<a.length;i++){if(a[i].SearchType==this.searchType){var b=a[i].SearchAreas;this._currentAreas=b;for(var j=0;j<b.length;j++){var opt=new Option(b[j].Description,b[j].AreaID);this.searchAreas.options[this.searchAreas.options.length]=opt;if(opt.value==this.selectedAreaID){this.searchAreas.selectedIndex=(j+1);}}break;}}if(this.searchAreas.selectedIndex<0){this.searchAreas.selectedIndex=0;}this.searchAreas.disabled=this.searchAreas.options.length<=1;},_drawOption:function(obj,list,_b1e){var opt=document.createElement("option");opt.value=obj.value;opt.innerHTML=obj.label;if(_b1e){opt.selected=true;}list.appendChild(opt);},_buildExtentString:function(area){return area.NELat.toString()+";"+area.SWLng.toString()+";"+area.SWLat.toString()+";"+area.NELng.toString();},_onSearchTypeChange:function(evt){this.searchType=evt.target[evt.target.selectedIndex].value;var _b22="";for(var i=0;i<this.data.length;i++){if(this.data[i].SearchType==this.searchType){_b22=this.data[i].MapExtent;break;}}this.selectedAreaID=0;this._drawSearchAreas();this.onSwitchSearchType(this.searchType,_b22);},onSwitchSearchType:function(_b24,_b25){this._publishSearchTypeChange();},_onSearchAreaChange:function(evt){var area=null;var _b28=parseInt(evt.target[evt.target.selectedIndex].value);if(_b28>0){for(var i=0;i<this._currentAreas.length;i++){if(this._currentAreas[i].AreaID==_b28){area=this._currentAreas[i];break;}}if(area){this.selectedAreaID=area.AreaID;this.onSwitchSearchArea(this._buildExtentString(area),area.AreaID);}}else{this._onSearchTypeChange({target:this.searchTypes});}},onSwitchSearchArea:function(_b2a,_b2b){},onShowLightbox:function(){if(dojo.render.html.ie55||dojo.render.html.ie60){dojo.html.setVisibility(this.searchTypes,false);dojo.html.setVisibility(this.searchAreas,false);}},onHideLightbox:function(){if(dojo.render.html.ie55||dojo.render.html.ie60){dojo.html.setVisibility(this.searchTypes,true);dojo.html.setVisibility(this.searchAreas,true);}},setDisplayFromSavedSearch:function(_b2c,_b2d){var _b2e=this.searchType!=_b2c;this.searchType=_b2c;this.selectedAreaID=_b2d;var opts=this.searchTypes.options;for(var i=0;i<opts.length;i++){if(parseInt(opts[i].value)==_b2c){opts[i].selected=true;if(_b2e){this._publishSearchTypeChange();}this._drawSearchAreas();break;}}},reset:function(){this.selectedAreaID=this._defaultSearchArea;var _b31=false;if(this.searchType!=this._defaultSearchType){_b31=true;this.searchType=this._defaultSearchType;}this._currentAreas=[];this._drawSearchTypes();this._drawSearchAreas();if(_b31){this._onSearchTypeChange({target:this.searchTypes});}},getProvCodeBySearchType:function(){var a=this.data;for(var i=0;i<a.length;i++){if(a[i].SearchType==this.searchType){return a[i].SearchUrlKey.toUpperCase();}}return null;},_publishSearchTypeChange:function(){var _b34=this;setTimeout(function(){dojo.event.topic.publish("/searchTypeChange",_b34.getProvCodeBySearchType());},1000);},debug:function(){}});dojo.provide("wtl.widget.FilmStripFisheyeList");dojo.widget.defineWidget("wtl.widget.FilmStripFisheyeList",dojo.widget.HtmlWidget,function(){this.pos={x:-1,y:-1};this.EDGE={CENTER:0,LEFT:1,RIGHT:2,TOP:3,BOTTOM:4};this.timerScale=1;},{templateString:"<div class=\"dojoHtmlFisheyeListBar\"></div>",templateCssPath:null,isContainer:true,snarfChildDomOutput:true,itemWidth:40,itemHeight:40,itemMaxWidth:150,itemMaxHeight:150,orientation:"horizontal",conservativeTrigger:false,effectUnits:2,itemPadding:10,attachEdge:"center",labelEdge:"bottom",enableCrappySvgSupport:false,currentDeployment:{},isDisabled:false,suspendPositioning:false,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/FilmStripFisheyeList.css");}}},fillInTemplate:function(){dojo.html.disableSelection(this.domNode);this.isHorizontal=(this.orientation=="horizontal");this.selectedNode=-1;this.isOver=false;this.hitX1=-1;this.hitY1=-1;this.hitX2=-1;this.hitY2=-1;this.anchorEdge=this._toEdge(this.attachEdge,this.EDGE.CENTER);this.labelEdge=this._toEdge(this.labelEdge,this.EDGE.TOP);if(this.isHorizontal&&(this.anchorEdge==this.EDGE.LEFT)){this.anchorEdge=this.EDGE.CENTER;}if(this.isHorizontal&&(this.anchorEdge==this.EDGE.RIGHT)){this.anchorEdge=this.EDGE.CENTER;}if(!this.isHorizontal&&(this.anchorEdge==this.EDGE.TOP)){this.anchorEdge=this.EDGE.CENTER;}if(!this.isHorizontal&&(this.anchorEdge==this.EDGE.BOTTOM)){this.anchorEdge=this.EDGE.CENTER;}if(this.labelEdge==this.EDGE.CENTER){this.labelEdge=this.EDGE.TOP;}if(this.isHorizontal&&(this.labelEdge==this.EDGE.LEFT)){this.labelEdge=this.EDGE.TOP;}if(this.isHorizontal&&(this.labelEdge==this.EDGE.RIGHT)){this.labelEdge=this.EDGE.TOP;}if(!this.isHorizontal&&(this.labelEdge==this.EDGE.TOP)){this.labelEdge=this.EDGE.LEFT;}if(!this.isHorizontal&&(this.labelEdge==this.EDGE.BOTTOM)){this.labelEdge=this.EDGE.LEFT;}this.proximityLeft=this.itemWidth*(this.effectUnits-0.5);this.proximityRight=this.itemWidth*(this.effectUnits-0.5);this.proximityTop=this.itemHeight*(this.effectUnits-0.5);this.proximityBottom=this.itemHeight*(this.effectUnits-0.5);if(this.anchorEdge==this.EDGE.LEFT){this.proximityLeft=0;}if(this.anchorEdge==this.EDGE.RIGHT){this.proximityRight=0;}if(this.anchorEdge==this.EDGE.TOP){this.proximityTop=0;}if(this.anchorEdge==this.EDGE.BOTTOM){this.proximityBottom=0;}if(this.anchorEdge==this.EDGE.CENTER){this.proximityLeft/=2;this.proximityRight/=2;this.proximityTop/=2;this.proximityBottom/=2;}},postCreate:function(){this._initializePositioning();if(!this.conservativeTrigger){dojo.event.connect(document.documentElement,"onmousemove",this,"_onMouseMove");dojo.event.connect(document.documentElement,"onmouseout",this,"_onBodyOut");}dojo.event.connect(this,"addChild",this,this._initializePositioning);},update:function(){if(this.suspendPositioning){this.suspendPositioning=false;}this._initializePositioning();},_initializePositioning:function(){if(this.suspendPositioning){return;}this.itemCount=this.children.length;this.barWidth=(this.isHorizontal?this.itemCount:1)*this.itemWidth;this.barHeight=(this.isHorizontal?1:this.itemCount)*this.itemHeight;this.totalWidth=this.proximityLeft+this.proximityRight+this.barWidth;this.totalHeight=this.proximityTop+this.proximityBottom+this.barHeight;for(var i=0;i<this.children.length;i++){this.children[i].posX=this.itemWidth*(this.isHorizontal?i:0);this.children[i].posY=this.itemHeight*(this.isHorizontal?0:i);this.children[i].cenX=this.children[i].posX+(this.itemWidth/2);this.children[i].cenY=this.children[i].posY+(this.itemHeight/2);var isz=this.isHorizontal?this.itemWidth:this.itemHeight;var r=this.effectUnits*isz;var c=this.isHorizontal?this.children[i].cenX:this.children[i].cenY;var lhs=this.isHorizontal?this.proximityLeft:this.proximityTop;var rhs=this.isHorizontal?this.proximityRight:this.proximityBottom;var siz=this.isHorizontal?this.barWidth:this.barHeight;var _b3c=r;var _b3d=r;if(_b3c>c+lhs){_b3c=c+lhs;}if(_b3d>(siz-c+rhs)){_b3d=siz-c+rhs;}this.children[i].effectRangeLeft=_b3c/isz;this.children[i].effectRangeRght=_b3d/isz;}this.domNode.style.width=this.barWidth+"px";this.domNode.style.height=this.barHeight+"px";for(var i=0;i<this.children.length;i++){var itm=this.children[i];var elm=itm.domNode;elm.style.left=itm.posX+"px";elm.style.top=itm.posY+"px";elm.style.width=this.itemWidth+"px";elm.style.height=this.itemHeight+"px";if(itm.svgNode){itm.svgNode.style.position="absolute";itm.svgNode.style.left=this.itemPadding+"%";itm.svgNode.style.top=this.itemPadding+"%";itm.svgNode.style.width=(100-2*this.itemPadding)+"%";itm.svgNode.style.height=(100-2*this.itemPadding)+"%";itm.svgNode.style.zIndex=1;itm.svgNode.setSize(this.itemWidth,this.itemHeight);}else{itm.imgNode.style.left=this.itemPadding+"%";itm.imgNode.style.top=this.itemPadding+"%";itm.imgNode.style.width=(100-2*this.itemPadding)+"%";itm.imgNode.style.height=(100-2*this.itemPadding)+"%";}}this._calcHitGrid();},_onBodyOut:function(e){if(dojo.html.overElement(dojo.body(),e)){return;}this._setDormant(e);},_setDormant:function(e){if(!this.isOver){return;}this.setOff();if(this.conservativeTrigger){dojo.event.disconnect(document.documentElement,"onmousemove",this,"_onMouseMove");}this._onGridMouseMove(-1,-1);},setOver:function(){this.isOver=true;},setOff:function(){this.isOver=false;},_setActive:function(e){if(this.isOver||this.isDisabled){return;}this.setOver();if(this.conservativeTrigger){dojo.event.connect(document.documentElement,"onmousemove",this,"_onMouseMove");this.timerScale=0.8;this._onMouseMove(e);this._expandSlowly();}},disable:function(){this.isDisabled=true;},enable:function(){this.isDisabled=false;},_onMouseMove:function(e){if((e.pageX>=this.hitX1)&&(e.pageX<=this.hitX2)&&(e.pageY>=this.hitY1)&&(e.pageY<=this.hitY2)){if(!this.isOver){this._setActive(e);}this._onGridMouseMove(e.pageX-this.hitX1,e.pageY-this.hitY1);}else{if(this.isOver){this._setDormant(e);}}},onResized:function(){this._calcHitGrid();},_onGridMouseMove:function(x,y){this.pos={x:x,y:y};this._paint();},_paint:function(){var x=this.pos.x;var y=this.pos.y;if(this.itemCount<=0){return;}var pos=this.isHorizontal?x:y;var prx=this.isHorizontal?this.proximityLeft:this.proximityTop;var siz=this.isHorizontal?this.itemWidth:this.itemHeight;var sim=this.isHorizontal?(1-this.timerScale)*this.itemWidth+this.timerScale*this.itemMaxWidth:(1-this.timerScale)*this.itemHeight+this.timerScale*this.itemMaxHeight;var cen=((pos-prx)/siz)-0.5;var _b4d=(sim/siz)-0.5;if(_b4d>this.effectUnits){_b4d=this.effectUnits;}var _b4e=0;if(this.anchorEdge==this.EDGE.BOTTOM){var cen2=(y-this.proximityTop)/this.itemHeight;_b4e=(cen2>0.5)?1:y/(this.proximityTop+(this.itemHeight/2));}if(this.anchorEdge==this.EDGE.TOP){var cen2=(y-this.proximityTop)/this.itemHeight;_b4e=(cen2<0.5)?1:(this.totalHeight-y)/(this.proximityBottom+(this.itemHeight/2));}if(this.anchorEdge==this.EDGE.RIGHT){var cen2=(x-this.proximityLeft)/this.itemWidth;_b4e=(cen2>0.5)?1:x/(this.proximityLeft+(this.itemWidth/2));}if(this.anchorEdge==this.EDGE.LEFT){var cen2=(x-this.proximityLeft)/this.itemWidth;_b4e=(cen2<0.5)?1:(this.totalWidth-x)/(this.proximityRight+(this.itemWidth/2));}if(this.anchorEdge==this.EDGE.CENTER){if(this.isHorizontal){_b4e=y/(this.totalHeight);}else{_b4e=x/(this.totalWidth);}if(_b4e>0.5){_b4e=1-_b4e;}_b4e*=2;}for(var i=0;i<this.itemCount;i++){var _b51=this._weighAt(cen,i);if(_b51<0){_b51=0;}this._setItemSize(i,_b51*_b4e);}var _b52=Math.round(cen);var _b53=0;if(cen<0){_b52=0;}else{if(cen>this.itemCount-1){_b52=this.itemCount-1;}else{_b53=(cen-_b52)*((this.isHorizontal?this.itemWidth:this.itemHeight)-this.children[_b52].sizeMain);}}this._positionElementsFrom(_b52,_b53);},_weighAt:function(cen,i){var dist=Math.abs(cen-i);var _b57=((cen-i)>0)?this.children[i].effectRangeRght:this.children[i].effectRangeLeft;return (dist>_b57)?0:(1-dist/_b57);},_setItemSize:function(p,_b59){_b59*=this.timerScale;var w=Math.round(this.itemWidth+((this.itemMaxWidth-this.itemWidth)*_b59));var h=Math.round(this.itemHeight+((this.itemMaxHeight-this.itemHeight)*_b59));if(this.isHorizontal){this.children[p].sizeW=w;this.children[p].sizeH=h;this.children[p].sizeMain=w;this.children[p].sizeOff=h;var y=0;if(this.anchorEdge==this.EDGE.TOP){y=(this.children[p].cenY-(this.itemHeight/2));}else{if(this.anchorEdge==this.EDGE.BOTTOM){y=(this.children[p].cenY-(h-(this.itemHeight/2)));}else{y=(this.children[p].cenY-(h/2));}}this.children[p].usualX=Math.round(this.children[p].cenX-(w/2));this.children[p].domNode.style.top=y+"px";this.children[p].domNode.style.left=this.children[p].usualX+"px";}else{this.children[p].sizeW=w;this.children[p].sizeH=h;this.children[p].sizeOff=w;this.children[p].sizeMain=h;var x=0;if(this.anchorEdge==this.EDGE.LEFT){x=this.children[p].cenX-(this.itemWidth/2);}else{if(this.anchorEdge==this.EDGE.RIGHT){x=this.children[p].cenX-(w-(this.itemWidth/2));}else{x=this.children[p].cenX-(w/2);}}this.children[p].domNode.style.left=x+"px";this.children[p].usualY=Math.round(this.children[p].cenY-(h/2));this.children[p].domNode.style.top=this.children[p].usualY+"px";}this.children[p].domNode.style.width=w+"px";this.children[p].domNode.style.height=h+"px";if(this.children[p].svgNode){this.children[p].svgNode.setSize(w,h);}},_positionElementsFrom:function(p,_b5f){var pos=0;if(this.isHorizontal){pos=Math.round(this.children[p].usualX+_b5f);this.children[p].domNode.style.left=pos+"px";}else{pos=Math.round(this.children[p].usualY+_b5f);this.children[p].domNode.style.top=pos+"px";}var bpos=pos;for(var i=p-1;i>=0;i--){bpos-=this.children[i].sizeMain;if(this.isHorizontal){this.children[i].domNode.style.left=bpos+"px";}else{this.children[i].domNode.style.top=bpos+"px";}}var apos=pos;for(var i=p+1;i<this.itemCount;i++){apos+=this.children[i-1].sizeMain;if(this.isHorizontal){this.children[i].domNode.style.left=apos+"px";}else{this.children[i].domNode.style.top=apos+"px";}}},_positionLabel:function(itm){if(!itm||!itm.lblNode){return;}var x=0;var y=0;var mb=dojo.html.getMarginBox(itm.lblNode);if(this.labelEdge==this.EDGE.TOP){x=Math.round((itm.sizeW/2)-(mb.width/2));y=-mb.height;}if(this.labelEdge==this.EDGE.BOTTOM){x=Math.round((itm.sizeW/2)-(mb.width/2));y=itm.sizeH;}if(this.labelEdge==this.EDGE.LEFT){x=-mb.width;y=Math.round((itm.sizeH/2)-(mb.height/2));}if(this.labelEdge==this.EDGE.RIGHT){x=itm.sizeW;y=Math.round((itm.sizeH/2)-(mb.height/2));}itm.lblNode.style.left=x+"px";itm.lblNode.style.top=y+"px";},_calcHitGrid:function(){var pos=dojo.html.getAbsolutePosition(this.domNode,true);this.hitX1=pos.x-this.proximityLeft;this.hitY1=pos.y-this.proximityTop;this.hitX2=this.hitX1+this.totalWidth;this.hitY2=this.hitY1+this.totalHeight;},_toEdge:function(inp,def){return this.EDGE[inp.toUpperCase()]||def;},_expandSlowly:function(){if(!this.isOver){return;}this.timerScale+=0.2;this._paint();if(this.timerScale<1){dojo.lang.setTimeout(this,"_expandSlowly",10);}},destroy:function(){if(!this.conservativeTrigger){dojo.event.connect(document.documentElement,"onmouseout",this,"_onBodyOut");}dojo.event.disconnect(this,"addChild",this,this._initializePositioning);dojo.event.disconnect(document.documentElement,"onmousemove",this,"_onMouseMove");wtl.widget.FilmStripFisheyeList.superclass.destroy.call(this);}});dojo.widget.defineWidget("wtl.widget.FilmStripFisheyeListItem",dojo.widget.HtmlWidget,{iconSrc:"",svgSrc:"",caption:"",id:"",_blankImgPath:dojo.uri.dojoUri("src/widget/templates/images/blank.gif"),templateString:"<div class=\"dojoHtmlFisheyeListItem\">"+"  <img class=\"dojoHtmlFisheyeListItemImage\" dojoAttachPoint=\"imgNode\" dojoAttachEvent=\"onMouseOver;onClick\">"+"</div>",fillInTemplate:function(){if(this.svgSrc!=""){this.svgNode=this._createSvgNode(this.svgSrc);this.domNode.appendChild(this.svgNode);this.imgNode.style.display="none";}else{if((this.iconSrc.toLowerCase().substring(this.iconSrc.length-4)==".png")&&(dojo.render.html.ie)&&(!dojo.render.html.ie70)){if(dojo.dom.hasParent(this.imgNode)&&this.id!=""){var _b6b=this.imgNode.parentNode;_b6b.setAttribute("id",this.id);}this.imgNode.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.iconSrc+"', sizingMethod='scale')";this.imgNode.src=this._blankImgPath.toString();}else{if(dojo.dom.hasParent(this.imgNode)&&this.id!=""){var _b6b=this.imgNode.parentNode;_b6b.setAttribute("id",this.id);}this.imgNode.src=this.iconSrc;}}if(this.lblNode){this.lblNode.appendChild(document.createTextNode(this.caption));}dojo.html.disableSelection(this.domNode);},_createSvgNode:function(src){var elm=document.createElement("embed");elm.src=src;elm.type="image/svg+xml";elm.style.width="1px";elm.style.height="1px";elm.loaded=0;elm.setSizeOnLoad=false;elm.onload=function(){this.svgRoot=this.getSVGDocument().rootElement;this.svgDoc=this.getSVGDocument().documentElement;this.zeroWidth=this.svgRoot.width.baseVal.value;this.zeroHeight=this.svgRoot.height.baseVal.value;this.loaded=true;if(this.setSizeOnLoad){this.setSize(this.setWidth,this.setHeight);}};elm.setSize=function(w,h){if(!this.loaded){this.setWidth=w;this.setHeight=h;this.setSizeOnLoad=true;return;}this.style.width=w+"px";this.style.height=h+"px";this.svgRoot.width.baseVal.value=w;this.svgRoot.height.baseVal.value=h;var _b70=w/this.zeroWidth;var _b71=h/this.zeroHeight;for(var i=0;i<this.svgDoc.childNodes.length;i++){if(this.svgDoc.childNodes[i].setAttribute){this.svgDoc.childNodes[i].setAttribute("transform","scale("+_b70+","+_b71+")");}}};return elm;},onMouseOver:function(e){if(!this.parent.isOver){this.parent._setActive(e);}if(this.lblNode&&this.caption!=""){dojo.html.addClass(this.lblNode,"selected");this.parent._positionLabel(this);}},onMouseOut:function(e){if(this.lblNode){dojo.html.removeClass(this.lblNode,"selected");}},onClick:function(e){}});dojo.provide("wtl.widget.FilmStripFisheye");dojo.widget.defineWidget("wtl.widget.FilmStripFisheye",dojo.widget.HtmlWidget,function(){this.items=[];this.data=[];},{isContainer:false,widgetType:"FilmStripFisheye",templateCssPath:null,templateString:"<div class=\"FilmStripFisheye\" dojoAttachPoint=\"filmStripContainer\">\r\n\t<div class=\"FilmStripBody\" dojoAttachPoint=\"filmStripBody\" style=\"position:relative;\">\r\n\t\t<div dojoAttachPoint=\"imagePlaceHolder\" style=\"position:relative;\"></div>\r\n\t</div>\r\n\t<div class=\"FilmStripScrollContainer\">\r\n\t\t<div class=\"FilmStripLeftArrow\" dojoAttachEvent=\"onclick:scrollLeft\"><span>&lt;</span></div>\r\n\t\t<div class=\"FilmStripRightArrow\" dojoAttachEvent=\"onclick:scrollRight\"><span>&gt;</span></div>\r\n\r\n\t\t<div class=\"FilmStripScrollBar\" dojoAttachPoint=\"filmStripScrollBar\">\r\n\t\t\t<div class=\"ScrollTrack\"></div>\r\n\t\t</div>\r\n\t\t<div class=\"FilmStripScroller\" dojoAttachPoint=\"filmStripScroller\">\r\n\t\t\t<a dojoAttachPoint=\"scrollerLabel\"></a>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n",currentDeployment:{},searchType:0,visible:true,imageMinWidth:0,imageMinHeight:0,imageMaxWidth:0,imageMaxHeight:0,scrollIncrement:0,httpHandler:"",httpHandlerParams:{},noItemsLabel:"No items found",imageIdPrefix:"",onMouseOverCallback:null,onMouseOutCallback:null,onItemClickCallback:null,onItemOverCallback:null,onItemOutCallback:null,filmStripContainer:null,filmStripBody:null,filmStripScrollBar:null,imagePlaceHolder:null,filmStripScroller:null,scrollerLabel:null,_imageCount:0,_index:1,_currentIndex:0,_padding:2,_mouseX:0,_scrollerX:0,_scrollerWidth:0,_scrollMargin:2,_request:null,_fisheye:null,_isEnabled:true,_selectedItem:"",_maxImages:0,_officeID:0,_type:"listings",selectItem:false,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/FilmStripFisheye.css");}}},postCreate:function(){this.visible=(this.visible&&(this.httpHandler.length||this.data.length)&&dojo.lang.isNumber(this.imageMinWidth)&&dojo.lang.isNumber(this.imageMinHeight)&&dojo.lang.isNumber(this.imageMaxWidth)&&dojo.lang.isNumber(this.imageMaxHeight));if(!this.visible){dojo.html.setDisplay(this.filmStripContainer,false);return;}this._draw(true);this.filmStripScroller.style.left=this._scrollMargin+"px";dojo.html.disableSelection(this.scrollerLabel);this._scrollerWidth=dojo.html.getMarginBox(this.filmStripScroller).width;dojo.event.connect(this.filmStripScroller,"onmousedown",this,"_onScrollerMouseDown");},searchByOffice:function(_b76){this._officeID=_b76;this.go(true,false);},reset:function(){this._officeID=0;},go:function(_b77,_b78){if(_b77){this._index=1;this._currentIndex=0;this._syncScrollerToIndex();}if(this.imageMinWidth&&this.imageMaxWidth&&this._index!=this._currentIndex){this._updateMaxImages();this._currentIndex=this._index;if(this.httpHandler.length){if(this._request!=null){this._request.abort();}var _b79={start:this._index,end:this._index+this._maxImages-1};for(var i in this.httpHandlerParams){_b79[i]=this.httpHandlerParams[i];}if(this._officeID){_b79.officeID=this._officeID;}var _b7b=this;this._request=dojo.io.bind({url:wtl.util.urlAppend(this.httpHandler,"rand="+(new Date()).getTime()),method:"get",content:_b79,load:function(type,obj,_b7e){if(obj){_b7b._request=null;_b7b._imageCount=obj.Count;_b7b.items=obj.Data;if(obj.Label){_b7b.noItemsLabel="No "+obj.Label+" Found";_b7b.noItemsLabel+="<br>For further assistance, please complete the <a href='javascript:void(0);' onclick='ShowReqInfoForm();'>Request for Information</a> form.";}_b7b._type=obj.Type;_b7b._draw(_b78);if(_b7b.selectItem){_b7b._onItemClick(0);}}},mimetype:"text/json",transport:"XMLHTTPTransport"});}else{if(this.data.length){this._imageCount=this.data.length;this.items=[];for(var i=this._index;i<this.data.length&&i<this._index+this._maxImages;i++){this.items.push(this.data[i]);}this._draw(_b78);}}}},goItem:function(_b7f){this._updateMaxImages();if(this.httpHandler.length&&_b7f){if(this._request!=null){this._request.abort();}var _b80={maxImages:this._maxImages,previousIndex:this._index-1,selectedItem:_b7f};for(var i in this.httpHandlerParams){_b80[i]=this.httpHandlerParams[i];}if(this._officeID){_b80.officeID=this._officeID;}var _b82=this;this._request=dojo.io.bind({url:wtl.util.urlAppend(this.httpHandler,"rand="+(new Date()).getTime()),method:"get",content:_b80,load:function(type,obj,_b85){if(obj){_b82._request=null;_b82._currentIndex=_b82._index=obj.Index;_b82._imageCount=obj.Count;_b82.items=obj.Data;if(obj.Label){_b82.noItemsLabel="No "+obj.Label.toLowerCase()+" found";}_b82._type=obj.Type;_b82._draw();setTimeout(function(){if(obj.FoundSelected){_b82.selectById(_b7f);}_b82._syncScrollerToIndex();},500);}},mimetype:"text/json",transport:"XMLHTTPTransport"});}},selectById:function(id){var imgs=this.imagePlaceHolder.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){imgs[i].className="";}this._selectedItem=id;if(id){var img=dojo.byId(this.imageIdPrefix+id);if(img){img.className="Selected";}else{this.goItem(id);}}},getHeight:function(){return dojo.html.getContentBox(this.domNode).height+dojo.html.getPadding(this.domNode).height+dojo.html.getMargin(this.domNode).height;},_draw:function(_b8a){if(this._fisheye){var c=this._fisheye.children;if(c&&c.length){for(var i=0;i<c.length;i++){this._disconnectItemEvents(c[i]);}}if(dojo.lang.isFunction(this.onMouseOverCallback)){dojo.event.disconnect(this._fisheye,"setOver",this,"onMouseOverCallback");}if(dojo.lang.isFunction(this.onMouseOutCallback)){dojo.event.disconnect(this._fisheye,"setOut",this,"onMouseOutCallback");}this._fisheye.destroy();this._fisheye=null;}wtl.util.destroyChildren(this.imagePlaceHolder);var _b8d=dojo.html.isVisible(this.filmStripScroller);var _b8e=false;var n=this.items.length;this.imagePlaceHolder.style.height=(this.imageMinHeight+this._padding)+"px";if(n){var _b90=document.createElement("div");_b90.style.height=(this.imageMinHeight+this._padding)+"px";this.imagePlaceHolder.appendChild(_b90);var _b91={id:this.id+"FisheyeList",currentDeployment:this.currentDeployment,conservativeTrigger:true,attachEdge:"bottom",itemWidth:this.imageMinWidth,itemHeight:this.imageMinHeight,itemMaxWidth:this.imageMaxWidth,itemMaxHeight:this.imageMaxHeight,itemPadding:3};var w=dojo.widget.createWidget("wtl:FilmStripFisheyeList",_b91,_b90);w.domNode.style.margin="0 auto";w.suspendPositioning=true;this._fisheye=w;if(dojo.lang.isFunction(this.onMouseOverCallback)){dojo.event.connect(this._fisheye,"setOver",this,"onMouseOverCallback");}if(dojo.lang.isFunction(this.onMouseOutCallback)){dojo.event.connect(this._fisheye,"setOff",this,"onMouseOutCallback");}for(var i=0;i<n;i++){var _b93=this.items[i].ThumbImage+"&Make4x3=true";if(this._type=="listings"){_b93+="&stts="+this.items[i].ListingStatusCode;}var item=dojo.widget.createWidget("wtl:FilmStripFisheyeListItem",{iconSrc:_b93});item.imgNode.idx=i;item.imgNode.id=this.imageIdPrefix+wtl.util.composeIds(this.items[i],this._type);if(this._type=="listings"){item.imgNode.title=this.items[i].PriceDisplay+(this.items[i].PriceType.length?" "+this.items[i].PriceType:"");item.imgNode.title+=" - "+(this.items[i].Address&&this.items[i].Address.length?this.items[i].Address+", ":"")+this.items[i].City+", "+this.items[i].State+" "+this.items[i].PostalCode;}else{item.imgNode.title=this.items[i].DisplayName;}this._connectItemEvents(item);w.addChild(item);}w.update();this._updateScrollerLabel();_b8e=this._imageCount>this._maxImages;}else{if(!_b8a){var d=document.createElement("div");d.className="NoImages";d.innerHTML=this.noItemsLabel;this.imagePlaceHolder.appendChild(d);}}dojo.html.setVisibility(this.filmStripScroller,_b8e);},_connectItemEvents:function(item){dojo.event.connect(item.imgNode,"onclick",this,this._onItemClick);dojo.event.connect(item.imgNode,"onmouseover",this,this._onItemOver);dojo.event.connect(item.imgNode,"onmouseout",this,this._onItemOut);},_disconnectItemEvents:function(item){dojo.event.disconnect(item.imgNode,"onclick",this,this._onItemClick);dojo.event.disconnect(item.imgNode,"onmouseover",this,this._onItemOver);dojo.event.disconnect(item.imgNode,"onmouseout",this,this._onItemOut);},enableFisheye:function(){this._isEnabled=true;if(this._fisheye){this._fisheye.enable();}},disableFisheye:function(){this._isEnabled=false;if(this._fisheye){this._fisheye.disable();}},_updateScrollerLabel:function(){if(this._imageCount>this._maxImages){var n=this._index+this.items.length-1;if(n>this._maxImages){n=this._maxImages;}wtl.util.destroyChildren(this.scrollerLabel);var t=wtl.util.formatNumber((this.items.length<this._maxImages)?this._imageCount:this._index+n-1);this.scrollerLabel.appendChild(document.createTextNode(wtl.util.formatNumber(this._index)+(this.items.length?"-"+t:"")+" / "+wtl.util.formatNumber(this._imageCount)));}},_updateMaxImages:function(){this._maxImages=-1;for(var w=dojo.html.getContentBox(this.imagePlaceHolder).width,i=0;w>0;i++,this._maxImages++){if(i==0){w-=parseInt((this.imageMaxWidth-this.imageMinWidth)*0.5)+this.imageMinWidth+this._padding;}else{w-=this.imageMinWidth+this._padding;}}if(this._maxImages<0){this._maxImages=0;}},_syncScrollerToIndex:function(){if(this._imageCount>this._maxImages){var p=(this.items.length<this._maxImages)?1:(this._index-1)/(this._imageCount-this._maxImages);var r=dojo.html.getMarginBox(this.filmStripScrollBar).width-this._scrollerWidth-13;var n=(p*(r-this._scrollMargin))+this._scrollMargin;this.filmStripScroller.style.left=n+"px";this._updateScrollerLabel();}},_onItemClick:function(evt){var idx;if(evt.target){idx=evt.target.idx;}else{idx=evt;}var item=this.items[idx];var imgs=this.imagePlaceHolder.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){imgs[i].className=i==idx?"Selected":"";}if(dojo.lang.isFunction(this.onItemClickCallback)){this.onItemClickCallback(item,idx,this._type);}},_onItemOver:function(evt){if(dojo.lang.isFunction(this.onItemOverCallback)){this.onItemOverCallback(this.items[evt.target.idx],evt.target.idx);}},_onItemOut:function(evt){if(dojo.lang.isFunction(this.onItemOutCallback)){this.onItemOutCallback(this.items[evt.target.idx],evt.target.idx);}},_onScrollerMouseDown:function(evt){this._mouseX=evt.pageX;this._scrollerX=parseInt(dojo.html.getComputedStyle(this.filmStripScroller,"left"));this.disableFisheye();dojo.event.connect(document,"onmousemove",this,"_onScrollerMouseMove");dojo.event.connect(document,"onmouseup",this,"_onScrollerMouseUp");},_onScrollerMouseMove:function(evt){var x=evt.pageX;var _ba9=x-this._mouseX;var n=this._scrollerX+_ba9;if(n<this._scrollMargin){n=this._scrollMargin;}var r=dojo.html.getMarginBox(this.filmStripScrollBar).width-this._scrollerWidth-13;if(n>r){n=r;}this.filmStripScroller.style.left=n+"px";var p=(n-this._scrollMargin)/(r-this._scrollMargin);this._index=parseInt((this._imageCount-this._maxImages)*p)+1;this._updateScrollerLabel();},_onScrollerMouseUp:function(evt){dojo.event.disconnect(document,"onmousemove",this,"_onScrollerMouseMove");dojo.event.disconnect(document,"onmouseup",this,"_onScrollerMouseUp");setTimeout(dojo.lang.hitch(this,"enableFisheye"),500);this.go();},scrollLeft:function(){if(dojo.html.isVisible(this.filmStripScroller)){this._index-=this.scrollIncrement==0?this._maxImages:this.scrollIncrement;if(this._index<1){this._index=1;}this._syncScrollerToIndex();this.go();}},scrollRight:function(){if(dojo.html.isVisible(this.filmStripScroller)){this._index+=this.scrollIncrement==0?this._maxImages:this.scrollIncrement;if(this._index>this._imageCount-this._maxImages+1){this._index=this._imageCount-this._maxImages+1;}this._syncScrollerToIndex();this.go();}},switchSearchType:function(typ){this.searchType=typ;},getType:function(){return this._type;}});dojo.provide("wtl.widget.ContactInfo");dojo.widget.defineWidget("wtl.widget.ContactInfo",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"ContactInfo",templateCssPath:null,templateString:"<div class=\"ContactInfo\">\r\n\r\n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t <tr>\r\n\t\t    <td valign=\"top\">\r\n\t        <div dojoAttachPoint=\"photoContainer\" class=\"PhotoContainer\">\r\n\t\t        <div class=\"PhotoHolder\">\r\n\t\t\t        <a href=\"\" dojoAttachPoint=\"imgLink\"><img class=\"photo\" alt=\"\" dojoAttachPoint=\"photo\" /></a>\r\n\t\t\t        <a href=\"\" dojoAttachPoint=\"siteLink\" class=\"SiteLink\"></a>\r\n                </div>\r\n                <div class=\"ButtonMenu\">\r\n                    <div dojoAttachPoint=\"agentButtons\">\r\n\t\t\t            <a href=\"\" class=\"EmailMe\" dojoAttachEvent=\"onclick:_emailMeClick\">E-mail Me</a>\r\n\t\t\t            <a href=\"\" class=\"WorkWithMeOnline\" dojoAttachPoint=\"workWithMeOnline\" dojoAttachEvent=\"onclick:_workWithMeClick\"\">Work With Me Online</a>\r\n\t\t\t            <a href=\"\" class=\"AgentListings\" dojoAttachPoint=\"listingsButton\" dojoAttachEvent=\"onclick:_viewListingsClick\">My Listings</a>\r\n\t\t\t            <a href=\"\" class=\"AgentSolds\" dojoAttachPoint=\"soldsButton\" dojoAttachEvent=\"onclick:_viewSoldsClick\">My Solds</a>\r\n\t\t\t        </div>\r\n\t\t        </div>\r\n\t        </div>\r\n        </td>\r\n        <td valign=\"top\">\r\n\t        <div class=\"Info\">\r\n\t\t        <div class=\"AgentName\" dojoAttachPoint=\"contactName\"></div>\r\n\t\t        <div class=\"JobTitle\" dojoAttachPoint=\"jobTitle\"></div>\r\n\t\t        <div dojoAttachPoint=\"contactDetails\" class=\"OfficeAddress\"></div>\r\n\t\t        <div dojoAttachPoint=\"phones\" class=\"ContactNumbers\"></div>\r\n\t\t        <div class=\"ButtonMenu\">\r\n\t\t\t        <div class=\"Buttons\" dojoAttachPoint=\"officeButtons\">\r\n\t\t\t\t        <a href=\"\" class=\"MapAndDirections\" dojoAttachPoint=\"mapAndDirsButton\" dojoAttachEvent=\"onClick:_mapAndDirsClick\">Map and Directions</a>\r\n\t\t\t\t        <a href=\"\" class=\"EmailMe\" dojoAttachPoint=\"emailOfficeLink\" dojoAttachEvent=\"onClick:emailOffice\">E-mail Us</a>\r\n\t\t\t        </div>\r\n\t\t        </div>\r\n\t        </div>\r\n\t     </td>\r\n\t     </tr>\r\n</table>    \r\n\t\t\t\r\n</div>\r\n",currentDeployment:{},item:null,viewingListings:false,viewingSolds:false,contactName:null,jobTitle:null,contactDetails:null,phones:null,photoContainer:null,photo:null,imgLink:null,siteLink:null,agentButtons:null,officeButtons:null,workWithMeOnline:null,emailOfficeLink:null,mapAndDirsButton:null,_agent:null,_office:null,_listingsAgentID:0,_imageWidth:130,_workwithMeOnlineID:0,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/ContactInfo.css");}}},fillInTemplate:function(){dojo.event.connect(this.photo,"onmouseover",wtl.util,"onPhotoMouseOver");dojo.event.connect(this.photo,"onmouseout",wtl.util,"onPhotoMouseOut");},populateOffice:function(data){if(data){this._office=data;this.contactName.innerHTML=data.OfficeName;this._populateData(data);var path=(data.PicExists)?"/ResizeImage.c?Image=/Offices/pic"+data.OfficeID+".jpg&Max="+this._imageWidth+"&u="+data.PicTicks:"/ResizeImage.c?Image=/Offices/Default/broker_"+this.currentDeployment.brokerId+"/320px.jpg&Max="+this._imageWidth+"&u="+data.PicTicks;this._populatePhoto(path);this.siteLink.innerHTML="Visit Our Website";dojo.html.setDisplay(this.officeButtons,true);var _bb1=((data.Address&&data.Address.length)||(data.Address2&&data.Address2.length)||(data.City&&data.City.length)||(data.State&&data.State.lenth)||(data.PostalCode&&data.PostalCode.length))?true:false;dojo.html.setDisplay(this.mapAndDirsButton,_bb1);dojo.html.setDisplay(this.agentButtons,false);dojo.html.setDisplay(this.jobTitle,false);this.jobTitle.innerHTML="";}},populateAgent:function(data){if(data){this._agent=data;this._workwithMeOnlineID=this._agent.WTLUserID;this.contactName.innerHTML=this._agent.FirstName+" "+this._agent.LastName+(this._agent.Suffix?" "+this._agent.Suffix:"");dojo.html.setDisplay(this.jobTitle,(this._agent.JobTitle)?true:false);this.jobTitle.innerHTML=this._agent.JobTitle?this._agent.JobTitle:"";this._populateData(this._agent);var path=(this._agent.PicExists)?"/ResizeImage.c?Image=/Users/pic"+this._agent.WTLUserID+".jpg&Width="+this._imageWidth+"&u="+this._agent.PicTicks+"&Make4x3=true&BG=ffffff":"/ResizeImage.c?Image=/Users/Default/broker_"+this.currentDeployment.brokerId+"/320px.jpg&Width="+this._imageWidth;var url="/"+this._agent.AccountName;this._populatePhoto(path,url,"_self");this.siteLink.innerHTML="Visit My Website";dojo.html.setDisplay(this.officeButtons,false);dojo.html.setDisplay(this.agentButtons,true);dojo.html.setDisplay(this.listingsButton,this._agent.ListingCount>0);dojo.html.setDisplay(this.soldsButton,this._agent.SoldCount>0);}},setWorkingOnline:function(_bb5,_bb6){dojo.html.setDisplay(this.workWithMeOnline,!_bb6);this.updateWorkingOnline(_bb5);},updateWorkingOnline:function(_bb7){dojo.html.setDisplay(this.workWithMeOnline,_bb7!=this._agent.WTLUserID);},showWorkingOnline:function(){this._workwithMeOnlineID=0;dojo.html.setDisplay(this.workWithMeOnline,false);},_populateData:function(data){var s=(this.currentDeployment.showCompanyName&&data.CompanyName&&data.CompanyName!=this.contactName.innerHTML)?"<b>"+data.CompanyName+"</b><br />":"";if(data.Address&&data.Address.length){s+=data.Address+"<br />";}else{if(data.Address1&&data.Address1.length){s+=data.Address1+"<br />";}}if(data.Address2&&data.Address2.replace(/^\s*|\s*$/g,"").length){s+=data.Address2+"<br />";}if(data.City&&data.City.length){s+=data.City;}if(data.State&&data.State.length){s+=", "+data.State;}if(data.PostalCode&&data.PostalCode.length){s+=" "+data.PostalCode;}this.contactDetails.innerHTML=s;this.phones.innerHTML=wtl.util.phoneFormat(data.Phones);dojo.html.setDisplay(this.phones,data.Phones.length);},_populatePhoto:function(path,url,_bbc){this.photo.src=path;if(url&&_bbc){this.siteLink.href=this.imgLink.href=url;this.siteLink.target=this.imgLink.target=(_bbc&&_bbc.length?_bbc:"_self");this.siteLink.style.width=(this._imageWidth+2)+"px";dojo.html.setDisplay(this.siteLink,true);}else{dojo.html.setDisplay(this.siteLink,false);this.imgLink.href="#";}},_workWithMeClick:function(evt){dojo.event.browser.stopEvent(evt);this.workWithMeClick(this._workwithMeOnlineID);},workWithMeClick:function(id){},_emailMeClick:function(evt){dojo.event.browser.stopEvent(evt);ShowEmailWin("/Popups/SendEmail.aspx?Type=EmailAgent"+"&AgentID="+this._agent.WTLUserID+"&EmailAddress="+this._agent.EmailAddress+"&Referrer="+self.location.pathname.substring(1)+(this.item.ListingID&&this.item.ListingID>0?"&ListingID="+this.item.ListingID:"")+(this.item.MLSID&&this.item.MLSID.length>0?"&MLSID="+this.item.MLSID:"")+(this.item.MLSProviderID&&this.item.MLSProviderID>0?"&MLSProviderID="+this.item.MLSProviderID:""));},_viewListingsClick:function(evt){dojo.event.browser.stopEvent(evt);this._listingsAgentID=this._agent.WTLUserID;this.viewingListings=true;this.viewingSolds=false;this.viewListingsClick(this._agent);},viewSoldsClick:function(_bc1){},viewListingsClick:function(_bc2){},_viewSoldsClick:function(evt){dojo.event.browser.stopEvent(evt);this._listingsAgentID=this._agent.WTLUserID;this.viewingListings=false;this.viewingSolds=true;this.viewSoldsClick(this._agent);},resetAgentSearch:function(){this._listingsAgentID=0;this.viewingListings=false;this.viewingSolds=false;},_mapAndDirsClick:function(evt){dojo.event.browser.stopEvent(evt);this.mapAndDirs(this._office.OfficeID);},mapAndDirs:function(id){},emailOffice:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(ShowEmailWin)){ShowEmailWin("/Popups/SendEmail.aspx?Type=EmailOffice&OfficeID="+this._office.OfficeID+"&EmailAddress="+this._office.EmailAddress+"&Referrer="+self.location.pathname.substring(1)+"&CustomSubject="+this.label+" E-mail Us"+(this.item.ListingID&&this.item.ListingID>0?"&ListingID="+this.item.ListingID:"")+(this.item.MLSID&&this.item.MLSID.length>0?"&MLSID="+this.item.MLSID:"")+(this.item.MLSProviderID&&this.item.MLSProviderID>0?"&MLSProviderID="+this.item.MLSProviderID:""));}}});dojo.provide("wtl.widget.AgentPreviewPane");dojo.widget.defineWidget("wtl.widget.AgentPreviewPane",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"AgentPreviewPane",templateCssPath:null,templateString:"<div class=\"AgentPreview\">\r\n\r\n\t<div class=\"NoItems\" dojoAttachPoint=\"noAgentContainer\">\r\n\t\t<p>There is no agent selected.</p>\r\n\t\t<p>Please select an agent using the SmartMap.</p>\r\n\t</div>\r\n\r\n\t<div dojoAttachPoint=\"agentContainer\" style=\"display:none;\">\r\n\r\n\t\t<div class=\"PaginationContainer\" dojoAttachPoint=\"paginationContainer\" style=\"display:none;\">\r\n\t\t\t<div class=\"PreviousLink\" dojoAttachPoint=\"previousLink\" style=\"display:none;\"><a dojoAttachEvent=\"onclick:previousClick\" href=\"\">Previous</a></div>\r\n\t\t\t<div class=\"NextLink\" dojoAttachPoint=\"nextLink\" style=\"display:none;\"><a dojoAttachEvent=\"onclick:nextClick\" href=\"\">Next</a></div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"MainInfo ClearFix\">\r\n\t\t   <div dojoAttachPoint=\"agentInfo\"></div>\r\n\t\t</div>\r\n\t\t\r\n\t\t<div class=\"AgentAdditionalInfo\" dojoAttachPoint=\"additionalInfo\">\r\n\t\t\t<div class=\"DesignationList\" dojoAttachPoint=\"designations\"></div>\r\n\r\n\t\t\t<div class=\"AgentLeadLine\" dojoAttachPoint=\"leadLine\"></div>\r\n\t\t\t<div class=\"AgentCaption\" dojoAttachPoint=\"caption\"></div>\r\n\t\t\t<div class=\"AgentSpecialties\" dojoAttachPoint=\"specialties\">\r\n\t\t\t\tSpecialties:\r\n\t\t\t\t<p></p>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n",currentDeployment:{},item:null,label:"Agent Preview",onOpenCallback:null,onCloseCallback:null,onPagingCallback:null,workOnlineCallback:null,noAgentContainer:null,agentContainer:null,agentInfo:null,leadLine:null,caption:null,specialties:null,designations:null,listingsButton:null,soldsButton:null,emailText:null,workOnlineText:null,listingsText:null,soldsText:null,brokerOwner:null,brokerCompanyName:null,additionalInfo:null,_pane:null,_selectedIdx:0,_doNotOpenPane:false,_previousItem:null,_nextItem:null,_listingsAgentID:0,_viewingListings:false,_viewingSolds:false,_agentInfo:null,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/AgentPreviewPane.css");}}this.label=this.currentDeployment.associateLabel+" Preview";},postCreate:function(){this._disableButtonSelections();},_disableButtonSelections:function(){var _bc7=dojo.html.getElementsByClass("Disableable",this.domNode,"div");for(var i=0;i<_bc7.length;i++){dojo.html.disableSelection(_bc7[i]);}},setPane:function(pane){this._pane=pane;},setPagination:function(prev,next,_bcc){this._previousItem=prev?prev:null;dojo.html.setDisplay(this.previousLink,prev?true:false);this._nextItem=next?next:null;dojo.html.setDisplay(this.nextLink,next?true:false);dojo.html.setDisplay(this.paginationContainer,(prev||next)?true:false);if(dojo.lang.isFunction(this.onPagingCallback)){this.onPagingCallback(this.getItemKey());}if(!_bcc){this.superSize();}},previousClick:function(evt){dojo.event.browser.stopEvent(evt);this.openPreview(this._previousItem,true,true);},nextClick:function(evt){dojo.event.browser.stopEvent(evt);this.openPreview(this._nextItem,true,true);},getItem:function(){return this.item;},getItemKey:function(){return this.item&&this.item.WTLUserID?{WTLUserID:this.item.WTLUserID}:null;},openPreview:function(item,_bd0,load){this.item=item;this._selectedIdx=0;this._doNotOpenPane=_bd0;if(load){if(this.item){if(this.httpHandler){dojo.io.bind({url:wtl.util.urlAppend(this.httpHandler,"rand="+(new Date()).getTime()),method:"get",content:{agentID:this.item.WTLUserID},load:dojo.lang.hitch(this,"_populate"),mimetype:"text/json",transport:"XMLHTTPTransport"});}}}else{this._populate(null,item,null);}},_workWithAgent:function(_bd2){this.workWithMeOnline(_bd2,this._agentID);},_workWithAgentClick:function(id){this._agentID=id;this.workWithMeOnline(false,id);},workWithMeOnline:function(_bd4,id){},processWorkWithMe:function(_bd6){this._agentInfo.updateWorkingOnline(_bd6.WTLUserID);},workWithAgent:function(){this.workWithMeOnline(false,this._agentID);},notLoggedIn:function(_bd7,_bd8){},viewSoldsClick:function(_bd9){},viewListingsClick:function(_bda){},resetAgentSearch:function(){},_populate:function(type,data,_bdd){if(data){dojo.html.setDisplay(this.agentContainer,false);this.item=data.Agent;this.setPagination(data.PreviousItem,data.NextItem,true);if(!this._agentInfo){this._agentInfo=dojo.widget.createWidget("wtl:ContactInfo",{item:this.item,currentDeployment:this.currentDeployment,viewingListings:this._viewingListings,viewingSolds:this._viewingSolds},this.agentInfo);dojo.event.connect(this._agentInfo,"viewListingsClick",this,"viewListingsClick");dojo.event.connect(this._agentInfo,"viewSoldsClick",this,"viewSoldsClick");dojo.event.connect(this._agentInfo,"workWithMeClick",this,"_workWithAgentClick");dojo.event.connect(this,"resetAgentSearch",this._agentInfo,"resetAgentSearch");}this._agentInfo.populateAgent(data.Agent);this._agentInfo.setWorkingOnline(data.WorkWithAgent,data.DirectAgentSite?true:false);var _bde=false;dojo.html.removeChildren(this.designations);if(this.item.Designations.length){for(var i=0;i<this.item.Designations.length;i++){var img=document.createElement("img");img.src=this.item.Designations[i].Image;if(this.item.Designations[i].Description.length){img.setAttribute("title",this.item.Designations[i].Description);}this.designations.appendChild(img);}}dojo.html.setDisplay(this.designations,this.item.Designations.length);if(!_bde){_bde=this.item.Designations.length;}s=this.item.Caption?this.item.Caption:"";this.caption.innerHTML=s;dojo.html.setDisplay(this.caption,s.length);if(!_bde){_bde=s.length;}s=this.item.LeadLine?this.item.LeadLine:"";this.leadLine.innerHTML=s;dojo.html.setDisplay(this.leadLine,s.length);if(!_bde){_bde=s.length;}s=this.item.Specialties?this.item.Specialties:"";var p=dojo.html.firstElement(this.specialties,"p");if(p){p.innerHTML=s;if(!_bde){_bde=s.length;}}dojo.html.setDisplay(this.specialties,p&&s.length);dojo.html.setDisplay(this.additionalInfo,_bde);dojo.html.setDisplay(this.noAgentContainer,false);dojo.html.setDisplay(this.agentContainer,true);if(dojo.lang.isFunction(this.onOpenCallback)){this.onOpenCallback(this.item,"agents");}if(this._pane&&!this._doNotOpenPane){this._pane.onLabelClick();}}dojo.lang.setTimeout(this,"superSize",500);},_buildDesignationImg:function(_be2,_be3){var i=document.createElement("img");i.src="/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Designations/"+_be2+".gif";i.alt=_be3;i.title=_be3;return i;},superSize:function(){if(dojo.html.isDisplayed(this.additionalInfo)){this.additionalInfo.style.height="";var _be5=dojo.html.getMarginBox(this.agentContainer).height+5;var _be6=dojo.html.getContentBox(this.additionalInfo).height-5;var _be7=dojo.html.getMarginBox(this._pane.containerNode).height+5;var h=_be6+(_be7-_be5);this.additionalInfo.style.height=(h<20?20:h)+"px";this.additionalInfo.scrollTop=0;}}});dojo.provide("wtl.widget.ComparePropertiesItem");dojo.widget.defineWidget("wtl.widget.ComparePropertiesItem",dojo.widget.HtmlWidget,{isContainer:false,widgetType:"ComparePropertiesItem",templateCssPath:null,templateString:"<div class=\"CompareItem\">\r\n    <div class=\"CompareItemHolder\">\r\n\t    <img alt=\"\" dojoAttachPoint=\"thumb\" dojoAttachEvent=\"onclick:_thumbClick\" />\r\n\t    <div class=\"Delete\"><a dojoAttachPoint=\"removeButton\" href=\"\" title=\"Remove\"></a></div>\r\n\t    <div class=\"Details\">\r\n\t\t    <p class=\"Price\" dojoAttachPoint=\"price\"></p>\r\n\t\t    <p dojoAttachPoint=\"address\"></p>\r\n\t\t    <p dojoAttachPoint=\"propID\" class=\"PropID\"></p>\r\n\t    </div>\r\n   \t\t<div class=\"IDXContainer\" dojoAttachPoint=\"idxContainer\">\r\n\t\t\t<div dojoAttachPoint=\"idxText\" class=\"IDXText\"></div>\r\n\t\t</div>\r\n\t    <div class=\"ListedBy\" dojoAttachPoint=\"listedBy\"></div>\r\n\t    <div class=\"ActiveStatus\" dojoAttachPoint=\"propertyStatus\"></div>\r\n    </div>\t    \r\n</div>\r\n",currentDeployment:{},searchType:0,item:null,removeCallback:null,thumb:null,removeButton:null,price:null,address:null,propID:null,idxContainer:null,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/ComparePropertiesItem.css");}}},postCreate:function(){this.thumb.src="/ResizeImage.c?FindListing=1&Max=100"+(this.item.MLSID?"&MLSID="+this.item.MLSID:"")+(this.item.MLSProviderID?"&MLSProviderID="+this.item.MLSProviderID:"")+(this.item.ListingID?"&ListingID="+this.item.ListingID:"")+(this.item.PropertyID?"&PropertyID="+this.item.PropertyID:"")+(this.item.ShowingCount?"&ShowingCount="+this.item.ShowingCount:"")+"&stts="+this.item.ListingStatusCode;this.price.innerHTML=this.item.PriceDisplay;if(this.item.PriceType&&this.item.PriceType.length>0){this.price.innerHTML+=" "+this.item.PriceType;}this.address.innerHTML=(this.item.Address&&this.item.Address!=""?this.item.Address+"<br />":"")+(this.item.Address2&&this.item.Address2!=""?this.item.Address2+"<br />":"")+this.item.City+", "+this.item.State+" "+this.item.PostalCode;this.propID.innerHTML=(this.item.PropertyID&&this.item.PropertyID>0?"Property ID: "+this.item.PropertyID:this.currentDeployment.idxLabel+": "+this.item.MLSID);dojo.html.setDisplay(this.idxContainer,false);dojo.html.setDisplay(this.listedBy,false);if(this.item.PropertyID<=0){this.idxText.innerHTML=this.item.ListingCourtesy;dojo.html.setDisplay(this.idxContainer,true);dojo.html.addClass(this.idxText,"MLS"+this.item.MLSProviderID);}else{this.listedBy.innerHTML=this.item.ListingCourtesy;dojo.html.setDisplay(this.listedBy,true);}dojo.event.connect(this.removeButton,"onclick",this,"_removeClick");},_thumbClick:function(evt){dojo.event.browser.stopEvent(evt);this.onCompareItemClick(this.item);},onCompareItemClick:function(_bea){},_removeClick:function(evt){dojo.event.browser.stopEvent(evt);if(confirm("Are you sure you want to remove this property?")){this.toggleCompare(false,this.item);}},switchSearchType:function(typ){this.searchType=typ;},toggleCompare:function(_bed,item){},onDisplayCompareable:function(item){},onCompareItemToggled:function(item,_bf1,_bf2,_bf3){},onUpdateCompareableDisplay:function(item,_bf5,_bf6){}});dojo.provide("wtl.widget.ComparePropertiesPane");dojo.widget.defineWidget("wtl.widget.ComparePropertiesPane",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"ComparePropertiesPane",templateCssPath:null,templateString:"<div class=\"CompareProperties\">\r\n\r\n\t<div class=\"Inner\" dojoAttachPoint=\"innerContainer\">\r\n\t\r\n\t\t<div dojoAttachPoint=\"zeroPropertiesPanel\" class=\"NoItems\">\r\n\t\t\t<p>There are no properties selected.</p>\r\n\t\t\t<p>Please select properties using the Compare checkbox.</p>\r\n\t\t\t<!--<div class=\"Buttons\">\r\n\t\t\t\t<div class=\"Button\"><a href=\"\" dojoAttachEvent=\"onclick:launchHelpWindow\">Help</a></div>\r\n\t\t\t</div>-->\r\n\t\t</div>\r\n\t\t\r\n\t\t<div dojoAttachPoint=\"hasPropertiesPanel\">\r\n\t\t\t<p class=\"Title\">Compare Up to ${this.currentDeployment.maxCompareCount} Properties</p>\r\n\t\t\t<div style=\"overflow:auto;\">\r\n\t\t\t    <div dojoAttachPoint=\"propertiesPlaceHolder\" class=\"CompareContainer\"></div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"Buttons\">\r\n\t\t\t\t<div class=\"Button Left\"><a href=\"\" dojoAttachEvent=\"onclick:launchComareWindow\">Compare</a></div>\r\n\t\t\t\t<div class=\"Button Right\"><a href=\"\" dojoAttachEvent=\"onclick:_removeAll\">Remove All</a></div>\r\n\t\t\t\t<!--<div class=\"Button\"><a href=\"\" dojoAttachEvent=\"onclick:launchHelpWindow\">Help</a></div>-->\r\n\t\t\t</div>\r\n\t\t\t<div style=\"clear:both;\"></div>\r\n\t\t</div>\r\n\t\t\r\n\t</div>\r\n\t\r\n</div>\r\n",currentDeployment:{},label:"Compare Properties",searchType:0,compareURL:"",maxCompareLabel:null,zeroPropertiesPanel:null,hasPropertiesPanel:null,propertiesPlaceHolder:null,_pane:null,_iCnt:0,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/ComparePropertiesPane.css");}}},postCreate:function(){dojo.html.setDisplay(this.zeroPropertiesPanel,true);dojo.html.setDisplay(this.hasPropertiesPanel,false);},setPane:function(pane){this._pane=pane;},toggleCompare:function(_bf8,item){},onCompareItemToggled:function(item,_bfb,_bfc,_bfd){if(_bfb){if(_bfd&&this._pane){this._pane.onLabelClick();}if(!dojo.widget.byId("CompareItem_"+wtl.util.composeIds(item))){this._addCompareItem(item);}}else{this._removeCompareItem(item);}dojo.html.setDisplay(this.zeroPropertiesPanel,this._iCnt==0);dojo.html.setDisplay(this.hasPropertiesPanel,this._iCnt>0);},superSize:function(){this.domNode.style.height="";var p=this.propertiesPlaceHolder.parentNode;p.style.overflow="hidden";p.style.position="relative";p.style.height="";var _bff=dojo.html.getMarginBox(this.domNode).height-(dojo.html.getMarginBox(this._pane.containerNode).height-8);if(_bff>0){p.style.overflow="auto";var h=dojo.html.getMarginBox(p).height-_bff;p.style.height=(h<20?20:h)+"px";}},_addCompareItem:function(item){var _c02=this;var div=document.createElement("div");this.propertiesPlaceHolder.appendChild(div);var _c04=dojo.widget.createWidget("wtl:ComparePropertiesItem",{widgetId:"CompareItem_"+wtl.util.composeIds(item),currentDeployment:this.currentDeployment,searchType:this.searchType,item:item},div);dojo.event.connect(_c04,"toggleCompare",this,"toggleCompare");dojo.event.connect(_c04,"onDisplayCompareable",this,"onDisplayCompareable");dojo.event.connect(_c04,"onCompareItemClick",this,"onCompareItemClick");dojo.event.connect(this,"onCompareItemToggled",_c04,"onCompareItemToggled");dojo.event.connect(this,"onUpdateCompareableDisplay",_c04,"onUpdateCompareableDisplay");dojo.event.connect(this,"switchSearchType",_c04,"switchSearchType");this.superSize();this._iCnt++;},_removeCompareItem:function(item){var w=dojo.widget.byId("CompareItem_"+wtl.util.composeIds(item));if(w){w.destroy();this._iCnt--;}},_removeAll:function(evt){dojo.event.browser.stopEvent(evt);if(confirm("Are you sure you want to remove all Compare Properties?")){this.removeAll();}},removeAll:function(){},launchComareWindow:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(ShowWin)){ShowWin("CompareWin",this.compareURL,750,670);}},launchHelpWindow:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(ShowHelp)){ShowHelp("CompareProperties");}},switchSearchType:function(typ){this.searchType=typ;},onCompareItemClick:function(_c0b){},resetAll:function(){this.propertiesPlaceHolder.scrollTop=0;}});dojo.provide("wtl.widget.OfficePreviewPane");dojo.widget.defineWidget("wtl.widget.OfficePreviewPane",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"OfficePreviewPane",templateCssPath:null,templateString:"<div class=\"OfficePreview\">\r\n\r\n\t<div class=\"NoOffice\" dojoAttachPoint=\"noOfficeContainer\">\r\n\t\t<p>There is no office selected.</p>\r\n\t</div>\r\n\r\n\t<div dojoAttachPoint=\"officeContainer\" style=\"display:none;\">\r\n\r\n\t\t<div class=\"PaginationContainer\" dojoAttachPoint=\"paginationContainer\" style=\"display:none;\">\r\n\t\t\t<div class=\"PreviousLink\" dojoAttachPoint=\"previousLink\" style=\"display:none;\"><a dojoAttachEvent=\"onclick:previousClick\" href=\"\">Previous ${this.officeLabel}</a></div>\r\n\t\t\t<div class=\"NextLink\" dojoAttachPoint=\"nextLink\" style=\"display:none;\"><a dojoAttachEvent=\"onclick:nextClick\" href=\"\">Next ${this.officeLabel}</a></div>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"MainInfo\">\r\n\t\t    <div dojoAttachPoint=\"officeInfo\"></div>\r\n\t\t</div>\r\n\t\t\r\n\t\t<div dojoAttachPoint=\"airMilesContainer\" class=\"AirMilesContainer\">\r\n\t\t\tAsk us how to earn AIR MILES&#174; reward miles when you buy or sell a home through us.\r\n\t\t</div>\r\n\t\t\r\n\t\t<div class=\"OfficeAdditionalInfo\" dojoAttachPoint=\"additionalInfo\">\r\n\t\t\t<div class=\"Designations\" dojoAttachPoint=\"designations\"></div>\r\n\t\t\t<div class=\"OfficeLeadline\" dojoAttachPoint=\"leadline\"></div>\r\n\t\t\t<div class=\"OfficeCaption\" dojoAttachPoint=\"caption\"></div>\r\n\t\t</div>\r\n\t\t\r\n\t</div>\r\n</div>\r\n",currentDeployment:{},item:null,label:"Office Preview",onOpenCallback:null,officeLabel:"Office",onCloseCallback:null,onGetDirections:null,noOfficeContainer:null,officeContainer:null,officeInfo:null,name:null,imgLink:null,siteLink:null,photo:null,address:null,hours:null,manager:null,phones:null,leadline:null,caption:null,designations:null,mapAndDirsButton:null,emailButton:null,additionalInfo:null,airMilesContainer:null,_pane:null,_selectedIdx:0,_doNotOpenPane:false,_previousItem:null,_nextItem:null,_contactInfo:null,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/OfficePreviewPane.css");}}this.label=this.officeLabel+" Preview";},fillInTemplate:function(){},postCreate:function(){dojo.html.disableSelection(this.mapAndDirsButton);dojo.html.disableSelection(this.emailButton);},setPane:function(pane){this._pane=pane;},setPagination:function(prev,next,_c0f){this._previousItem=prev?prev:null;dojo.html.setDisplay(this.previousLink,prev?true:false);this._nextItem=next?next:null;dojo.html.setDisplay(this.nextLink,next?true:false);dojo.html.setDisplay(this.paginationContainer,(prev||next)?true:false);if(dojo.lang.isFunction(this.onPagingCallback)){this.onPagingCallback(this.getItemKey());}if(!_c0f){this.superSize();}},previousClick:function(evt){dojo.event.browser.stopEvent(evt);this.openPreview(this._previousItem,true,true);},nextClick:function(evt){dojo.event.browser.stopEvent(evt);this.openPreview(this._nextItem,true,true);},getItem:function(){return this.item;},getItemKey:function(){return this.item&&this.item.OfficeID?{OfficeID:this.item.OfficeID}:null;},openPreview:function(item,_c13,load){this.item=item;this._selectedIdx=0;this._doNotOpenPane=_c13;if(load){if(this.item){if(this.httpHandler){dojo.io.bind({url:wtl.util.urlAppend(this.httpHandler,"rand="+(new Date()).getTime()),method:"get",content:{OfficeID:this.item.OfficeID},load:dojo.lang.hitch(this,"_populate"),mimetype:"text/json",transport:"XMLHTTPTransport"});}}}else{this._populate(null,item,null);}},emailOffice:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(ShowEmailWin)){ShowEmailWin("/Popups/SendEmail.aspx?Type=EmailOffice&OfficeID="+this.item.OfficeID+"&EmailAddress="+this.item.EmailAddress+"&Referrer="+self.location.pathname.substring(1)+"&CustomSubject="+this.label+" E-mail Us");}},emailManager:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(ShowEmailWin)&&this.item.ManagerEmail){ShowEmailWin("/Popups/SendEmail.aspx?Type=EmailManager&EmailAddress="+this.item.ManagerEmail+"&Referrer="+self.location.pathname.substring(1));}},mapAndDirs:function(){if(dojo.lang.isFunction(this.onGetDirections)){this.onGetDirections("OfficeID="+this.item.OfficeID);}},_populate:function(type,data,_c19){if(data){dojo.html.setDisplay(this.officeContainer,false);this.item=data.Office;this.setPagination(data.PreviousItem,data.NextItem,true);if(!this._contactInfo){this._contactInfo=dojo.widget.createWidget("wtl:ContactInfo",{item:this.item,currentDeployment:this.currentDeployment,viewingListings:this._viewingListings,viewingSolds:this._viewingSolds},this.officeInfo);}dojo.event.connect(this._contactInfo,"mapAndDirs",this,"mapAndDirs");this._contactInfo.populateOffice(data.Office);wtl.util.destroyChildren(this.designations);if(this.item.FHE){this.designations.appendChild(this._buildDesignationImg("FHE","This office is designated to work with buyers and sellers interested in up-scale and luxury properties."));}if(this.item.REC){this.designations.appendChild(this._buildDesignationImg("REC","This office specializes in the sale and marketing of recreational properties."));}if(this.item.CIN){this.designations.appendChild(this._buildDesignationImg("CIN","This office specializes in the sale and marketing of commercial investment properties."));}if(this.item.CONS){this.designations.appendChild(this._buildDesignationImg("CONS","New Construction - This office is designated to work with builders representing new construction homes as well as buyers included in purchasing new construction."));}if(this.item.CGRN){this.designations.appendChild(this._buildDesignationImg("CGRN","This office is designated and specifically trained and qualified to handle unique, quality relocation and referral business."));}dojo.html.setDisplay(this.airMilesContainer,this.item.AIR);h=this.item.LeadLine?this.item.LeadLine:"";this.leadline.innerHTML=h;dojo.html.setDisplay(this.leadline,h.length);h=this.item.Caption?this.item.Caption:"";this.caption.innerHTML=h;dojo.html.setDisplay(this.caption,h.length);dojo.html.setDisplay(this.additionalInfo,h.length);dojo.html.setDisplay(this.noOfficeContainer,false);dojo.html.setDisplay(this.officeContainer,true);if(dojo.lang.isFunction(this.onOpenCallback)){this.onOpenCallback(this.item,"offices",true);}if(this._pane&&!this._doNotOpenPane){this._pane.onLabelClick();}}dojo.lang.setTimeout(this,"superSize",500);},_buildDesignationImg:function(_c1a,_c1b){var i=document.createElement("img");i.src="/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Designations/"+_c1a+".gif";i.alt=_c1b;i.title=_c1b;return i;},superSize:function(){if(dojo.html.isDisplayed(this.additionalInfo)){this.additionalInfo.style.height="";var _c1d=dojo.html.getMarginBox(this.officeContainer).height+5;var _c1e=dojo.html.getContentBox(this.additionalInfo).height-5;var _c1f=dojo.html.getMarginBox(this._pane.containerNode).height+5;var h=_c1e+(_c1f-_c1d);this.additionalInfo.style.height=(h<20?20:h)+"px";this.additionalInfo.scrollTop=0;}}});dojo.provide("dojo.widget.Dialog");dojo.declare("dojo.widget.ModalDialogBase",null,{focusElement:"",bgColor:"black",bgOpacity:0.4,followScroll:true,closeOnBackgroundClick:false,trapTabs:function(e){if(e.target==this.tabStartOuter){if(this._fromTrap){this.tabStart.focus();this._fromTrap=false;}else{this._fromTrap=true;this.tabEnd.focus();}}else{if(e.target==this.tabStart){if(this._fromTrap){this._fromTrap=false;}else{this._fromTrap=true;this.tabEnd.focus();}}else{if(e.target==this.tabEndOuter){if(this._fromTrap){this.tabEnd.focus();this._fromTrap=false;}else{this._fromTrap=true;this.tabStart.focus();}}else{if(e.target==this.tabEnd){if(this._fromTrap){this._fromTrap=false;}else{this._fromTrap=true;this.tabStart.focus();}}}}}},clearTrap:function(e){var _c23=this;setTimeout(function(){_c23._fromTrap=false;},100);},_setup:function(){with(this.domNode.style){position="absolute";zIndex=999;display="none";overflow="visible";}var b=dojo.body();b.appendChild(this.domNode);this.bg=document.createElement("div");this.bg.className="dialogUnderlay";with(this.bg.style){position="absolute";left=top="0px";zIndex=998;display="none";}b.appendChild(this.bg);this.setBackgroundColor(this.bgColor);this.bgIframe=new dojo.html.BackgroundIframe();if(this.bgIframe.iframe){with(this.bgIframe.iframe.style){position="absolute";left=top="0px";zIndex=90;display="none";}}if(this.closeOnBackgroundClick){dojo.event.kwConnect({srcObj:this.bg,srcFunc:"onclick",adviceObj:this,adviceFunc:"onBackgroundClick",once:true});}},uninitialize:function(){if(this.bgIframe){this.bgIframe.remove();}if(this.bg){dojo.html.removeNode(this.bg,true);}},setBackgroundColor:function(_c25){if(arguments.length>=3){_c25=new dojo.gfx.color.Color(arguments[0],arguments[1],arguments[2]);}else{_c25=new dojo.gfx.color.Color(_c25);}this.bg.style.backgroundColor=_c25.toString();return this.bgColor=_c25;},setBackgroundOpacity:function(op){if(arguments.length==0){op=this.bgOpacity;}dojo.html.setOpacity(this.bg,op);try{this.bgOpacity=dojo.html.getOpacity(this.bg);}catch(e){this.bgOpacity=op;}return this.bgOpacity;},_sizeBackground:function(){if(this.bgOpacity>0){var _c27=dojo.html.getViewport();var h=_c27.height;var w=_c27.width;with(this.bg.style){width=w+"px";height=h+"px";}var _c2a=dojo.html.getScroll().offset;this.bg.style.top=_c2a.y+"px";this.bg.style.left=_c2a.x+"px";var _c27=dojo.html.getViewport();if(_c27.width!=w){this.bg.style.width=_c27.width+"px";}if(_c27.height!=h){this.bg.style.height=_c27.height+"px";}}this.bgIframe.size(this.bg);},_showBackground:function(){if(this.bgOpacity>0){this.bg.style.display="block";}if(this.bgIframe.iframe){this.bgIframe.iframe.style.display="block";}},placeModalDialog:function(){var _c2b=dojo.html.getScroll().offset;var _c2c=dojo.html.getViewport();var mb;if(this.isShowing()){mb=dojo.html.getMarginBox(this.domNode);}else{dojo.html.setVisibility(this.domNode,false);dojo.html.show(this.domNode);mb=dojo.html.getMarginBox(this.domNode);dojo.html.hide(this.domNode);dojo.html.setVisibility(this.domNode,true);}var x=_c2b.x+(_c2c.width-mb.width)/2;var y=_c2b.y+(_c2c.height-mb.height)/2;with(this.domNode.style){left=x+"px";top=y+"px";}},_onKey:function(evt){if(evt.key){var node=evt.target;while(node!=null){if(node==this.domNode){return;}node=node.parentNode;}if(evt.key!=evt.KEY_TAB){dojo.event.browser.stopEvent(evt);}else{if(!dojo.render.html.opera){try{this.tabStart.focus();}catch(e){}}}}},showModalDialog:function(){if(!this._alreadyInitialized){this._setup();this._alreadyInitialized=true;}if(this.followScroll&&!this._scrollConnected){this._scrollConnected=true;dojo.event.connect(window,"onscroll",this,"_onScroll");}dojo.event.connect("around",document.documentElement,"onkey",this,"_onKey");this.placeModalDialog();this.setBackgroundOpacity();this._sizeBackground();this._showBackground();this._fromTrap=true;setTimeout(dojo.lang.hitch(this,function(){try{this.tabStart.focus();}catch(e){}}),50);},hideModalDialog:function(){if(!this._alreadyInitialized){return;}if(this.focusElement){dojo.byId(this.focusElement).focus();dojo.byId(this.focusElement).blur();}this.bg.style.display="none";this.bg.style.width=this.bg.style.height="1px";if(this.bgIframe.iframe){this.bgIframe.iframe.style.display="none";}dojo.event.disconnect("around",document.documentElement,"onkey",this,"_onKey");if(this._scrollConnected){this._scrollConnected=false;dojo.event.disconnect(window,"onscroll",this,"_onScroll");}},_onScroll:function(){var _c32=dojo.html.getScroll().offset;this.bg.style.top=_c32.y+"px";this.bg.style.left=_c32.x+"px";this.placeModalDialog();},checkSize:function(){if(this.isShowing()){this._sizeBackground();this.placeModalDialog();this.onResized();}},onBackgroundClick:function(){if(this.lifetime-this.timeRemaining>=this.blockDuration){return;}this.hide();}});dojo.widget.defineWidget("dojo.widget.Dialog",[dojo.widget.ContentPane,dojo.widget.ModalDialogBase],{templateString:"<div id=\"${this.widgetId}\" class=\"dojoDialog\" dojoattachpoint=\"wrapper\">\r\n\t<span dojoattachpoint=\"tabStartOuter\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\"\ttabindex=\"0\"></span>\r\n\t<span dojoattachpoint=\"tabStart\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\r\n\t<div dojoattachpoint=\"containerNode\" style=\"position: relative; z-index: 2;\"></div>\r\n\t<span dojoattachpoint=\"tabEnd\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\r\n\t<span dojoattachpoint=\"tabEndOuter\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\r\n</div>\r\n",blockDuration:0,lifetime:0,closeNode:"",postCreate:function(){this.domNode.style.display="none";dojo.widget.Dialog.superclass.postCreate.apply(this,arguments);},show:function(){if(this.closeNode){this.setCloseControl(this.closeNode);}if(this.lifetime){this.timeRemaining=this.lifetime;if(this.timerNode){this.timerNode.innerHTML=Math.ceil(this.timeRemaining/1000);}if(this.blockDuration&&this.closeNode){if(this.lifetime>this.blockDuration){this.closeNode.style.visibility="hidden";}else{this.closeNode.style.display="none";}}if(this.timer){clearInterval(this.timer);}this.timer=setInterval(dojo.lang.hitch(this,"_onTick"),100);}this.showModalDialog();dojo.widget.Dialog.superclass.show.call(this);},onLoad:function(){this.placeModalDialog();dojo.widget.Dialog.superclass.onLoad.call(this);},hide:function(){this.hideModalDialog();dojo.widget.Dialog.superclass.hide.call(this);if(this.timer){clearInterval(this.timer);}},setTimerNode:function(node){this.timerNode=node;},setCloseControl:function(node){this.closeNode=dojo.byId(node);dojo.event.connectOnce(this.closeNode,"onclick",this,"hide");},setShowControl:function(node){node=dojo.byId(node);dojo.event.connect(node,"onclick",this,"show");},_onTick:function(){if(this.timer){this.timeRemaining-=100;if(this.lifetime-this.timeRemaining>=this.blockDuration){if(this.closeNode){this.closeNode.style.visibility="visible";}}if(!this.timeRemaining){clearInterval(this.timer);this.hide();}else{if(this.timerNode){this.timerNode.innerHTML=Math.ceil(this.timeRemaining/1000);}}}}});dojo.provide("wtl.widget.LightBox");dojo.widget.defineWidget("wtl.widget.LightBox",[dojo.widget.HtmlWidget,dojo.widget.Dialog],{isContainer:false,widgetType:"LightBox",templateCssPath:null,templateString:"<div id=\"${this.widgetId}\" class=\"LightBox\" dojoattachpoint=\"wrapper\">\r\n\t<div dojoattachpoint=\"containerNode\" style=\"position: relative; z-index: 2;\" class=\"Container\">\r\n\t\t<div class=\"Inner\" dojoAttachPoint=\"inner\">\r\n\t\t\t<div class=\"Header\">\r\n\t\t\t\t<div class=\"HeaderLeft\"><div class=\"Tagline\"></div></div>\r\n\t\t\t\t<a dojoAttachEvent=\"onclick:closeClick\" href=\"\" class=\"Close\">Close</a>\r\n\t\t\t</div>\r\n\t\t\t<div id=\"PhotoBody\">\r\n\t\t\t\t<div class=\"ButtonMenu\">\r\n\t\t\t\t\t<a class=\"SaveTo\" dojoAttachEvent=\"onclick:_onSaveToMyAccount\">Save to Your Account</a>\r\n\t\t\t\t\t<a class=\"MoreInfo\" dojoAttachEvent=\"onclick:_requestMoreInfo\">Request More Information</a>\r\n\t\t\t\t\t<a class=\"EmailListing\" dojoAttachEvent=\"onclick:_onEmailListingClick\">E-mail Listing</a>\r\n\t\t\t\t\t<a class=\"Showing\" dojoAttachPoint=\"requestShowingLink\" dojoAttachEvent=\"onclick:_requestShowing\">Request a Showing</a>\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t<div class=\"Right\" style=\"width:140px; margin-top:8px; margin-right:10px;\">\r\n\t\t\t\t    <div class=\"Price\" dojoAttachPoint=\"price\"></div>\r\n\t\t\t\t    <div class=\"PropertyID\" dojoAttachPoint=\"propertyID\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t<div class=\"Address\" dojoAttachPoint=\"address\"></div>\r\n \r\n                 <div>&#160;</div>\r\n \r\n\t\t\t\t<div class=\"Photos\">\r\n                    <div class=\"PaginationContainer\">\r\n\t\t\t\t\t\t<div class=\"Description\" dojoAttachPoint=\"description\">&#160;</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div style=\"float:right\">\r\n\t\t\t\t            <div class=\"PreviousLink\" dojoAttachPoint=\"previousphoto\">\r\n\t\t\t\t\t            <a dojoAttachEvent=\"onclick:_previous\" href=\"\">Previous</a>\r\n\t\t\t\t            </div> \r\n\r\n\t\t\t\t            <div class=\"PhotoCount\" dojoAttachPoint=\"photoCount\"></div>\r\n\r\n\t\t\t\t\t        <div class=\"NextLink\" dojoAttachPoint=\"nextphoto\">\r\n\t\t\t\t\t            <a dojoAttachEvent=\"onclick:_next\" href=\"\">Next</a>\r\n\t\t\t\t            </div>\r\n\t\t\t\t\t\t</div>\r\n \r\n\t\t\t        </div>\r\n\t\t\t\t\t<div class=\"PhotoAndDesc\" dojoAttachPoint=\"photoanddesc\">\r\n\t\t\t\t\t\t<div class=\"MainPhoto\" style=\"position:relative;\"><img alt=\"\" dojoAttachPoint=\"mainPhoto\" dojoAttachEvent=\"onclick:_next\" /><div class=\"ActiveStatus\" dojoAttachPoint=\"propertyStatus\"></div></div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"Thumbnails\" dojoAttachPoint=\"thumbnails\"></div>\t\t\t\t\t\r\n\t\t\t\t\t<a class=\"HDPhotoTour\" dojoAttachPoint=\"HDPhotoTour\" dojoAttachEvent=\"onclick:_HDPhotoTourClick\" href=\"\" style=\"display:none;\"></a>\r\n\t\t\t\t\t<div class=\"HDPhotoTour\" dojoAttachPoint=\"ShowcaseHD\" style=\"display:none;\">\r\n\t\t\t\t        <div id=\"FlashShowcaseHD\"></div>\r\n\t\t\t\t    </div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div style=\"clear:both;\"></div>\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<div class=\"Round4\"></div>\r\n\t\t\t<div class=\"Round5\"></div>\r\n\t\t\t<div class=\"Round1\"></div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n",currentDeployment:{},item:null,onDestroyCallback:null,saveToYourAccountCallback:null,requestMoreInfoCallback:null,requestShowingCallback:null,emailListingCallback:null,HDPhotoTourCallback:null,flashShowcase:false,notLoggedIn:null,inner:null,previousphoto:null,nextphoto:null,photoCount:null,price:null,address:null,photos:null,mainPhoto:null,description:null,photoanddesc:null,thumbnails:null,propertyStatus:null,requestShowingLink:null,HDPhotoTour:null,ShowcaseHD:null,selectedIdx:0,_removeMouseWheel:null,_flShowcaseHD:null,_flReqInfoSub:null,_flSaveFavSub:null,_flShowcaseReadySub:null,_flShowcaseClickSub:null,postMixInProperties:function(){wtl.widget.LightBox.superclass.postMixInProperties.apply(this,arguments);if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/LightBox.css");}}wtl.util.connectDialogKeyPress(this);},postCreate:function(){dojo.widget.Dialog.prototype.postCreate.apply(this,arguments);this._flShowcaseReadySub=dojo.event.topic.subscribe("onShowcaseHDReady",this,"_flShowcaseHDReady");dojo.event.topic.subscribe("showcaseHDSaveFavorite",this,"hide");dojo.event.topic.subscribe("showcaseHDRequestInfo",this,"hide");},onShow:function(){if(!this._removeMouseWheel){this._removeMouseWheel=dojo.event.browser.addListener(this.inner,navigator.userAgent.match(/gecko/i)?"DOMMouseScroll":"mousewheel",dojo.lang.hitch(this,"_onMouseWheel"),false,false);}},populate:function(item,idx){this.item=item;if(!this.item.Images||!this.item.Images.length){alert("There are no images, probably bad data");this.hide();return;}this.selectedIdx=idx;dojo.html.setDisplay(this.HDPhotoTour,(this.item.ShowcaseHD==true&&!this.flashShowcase==true));dojo.html.setDisplay(this.ShowcaseHD,(this.item.ShowcaseHD==true&&this.flashShowcase==true));if(this.item.ShowcaseHD==true&&this.flashShowcase==true){this._createShowcaseHD();}this.propertyStatus.className=this.item.ListingStatusCode+"Status";this.price.innerHTML=this.item.PriceDisplay;if(this.item.PriceType&&this.item.PriceType.length>0){this.price.innerHTML+=" "+this.item.PriceType;}this.propertyID.innerHTML=this.item.PropertyID>0?"Property ID: "+this.item.PropertyID:this.currentDeployment.idxLabel+": "+this.item.MLSID;this.address.innerHTML=(this.item.Address&&this.item.Address.length?this.item.Address+" <br />":"")+this.item.City+", "+this.item.State+" "+this.item.PostalCode;dojo.html.setDisplay(this.requestShowingLink,!this.item.IsSold);wtl.util.destroyChildren(this.thumbnails);this._images=[];for(var i=0;i<this.item.Images.length;i++){var _c39=new Image();_c39.src="/ResizeImage.c?MaxHeight=352&MaxWidth=525&Image="+this.item.Prefix+this.item.Images[i].file;this._images.push(_c39);var a=document.createElement("a");a.href="";a.idx=i;var img=document.createElement("img");img.src="/ResizeImage.c?Width=60&Image="+this.item.Prefix+"320px/"+this.item.Images[i].file+"&Make4x3=true";img.idx=i;img.width=60;img.height=45;a.appendChild(img);this.thumbnails.appendChild(a);dojo.event.connect(a,"onclick",this,"_onThumbClick");}if(this.item.Images.length<=1){dojo.html.setDisplay(this.thumbnails,false);dojo.html.setDisplay(this.previousphoto,false);dojo.html.setDisplay(this.nextphoto,false);dojo.html.setDisplay(this.photoCount,false);this.photoanddesc.style.width="100%";this.description.style.width="100%";}else{dojo.html.setDisplay(this.thumbnails,true);dojo.html.setDisplay(this.previousphoto,true);dojo.html.setDisplay(this.nextphoto,true);dojo.html.setDisplay(this.photoCount,true);this.photoanddesc.style.width="";this.description.style.width="";}this._setMainPhoto();dojo.io.bind({url:"/ListingHandler.c?rand="+(new Date()).getTime(),method:"post",content:{IsPropertyShowcase:true,ListingID:this.item.ListingID?this.item.ListingID:0,MLSProviderID:this.item.MLSProviderID?this.item.MLSProviderID:0,MLSID:this.item.MLSID?this.item.MLSID:""},load:null,mimetype:"text/json",transport:"XMLHTTPTransport"});},_setMainPhoto:function(){this.mainPhoto.src=this._images[this.selectedIdx].src;this.photoCount.innerHTML=this.item.Images.length>0?(this.selectedIdx+1)+" of "+this.item.Images.length:"";var img=this.item.Images[this.selectedIdx];this.description.innerHTML=img.desc?img.desc:"";var a=this.thumbnails.getElementsByTagName("a");var len=a.length;for(var i=0;i<len;i++){a[i].className=i==this.selectedIdx?"Selected":"";}},onHide:function(){if(dojo.lang.isFunction(this.onDestroyCallback)){this.onDestroyCallback();}if(this._flShowcaseHD){try{this._flShowcaseHD.Clear();}catch(e){}this._flShowcaseHD=null;}},closeClick:function(evt){if(evt){dojo.event.browser.stopEvent(evt);}this.mainPhoto.src="/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/General/1t.gif";this.hide();},_onThumbClick:function(evt){dojo.event.browser.stopEvent(evt);this.selectedIdx=evt.target.idx;this._setMainPhoto();},_onMouseWheel:function(evt){if(!evt){evt=dojo.event.browser.currentEvent;}var _c43=evt["wheelDelta"]?evt.wheelDelta*(window.opera?-1:1):evt.detail*-40;if(_c43<0){this._next(evt);}else{this._previous(evt);}},_previous:function(evt){dojo.event.browser.stopEvent(evt);this.selectedIdx--;if(this.selectedIdx<0){this.selectedIdx=this.item.Images.length-1;}this._setMainPhoto();},_next:function(evt){dojo.event.browser.stopEvent(evt);this.selectedIdx++;if(this.selectedIdx>=this.item.Images.length){this.selectedIdx=0;}this._setMainPhoto();},_createShowcaseHD:function(){var _c46={deploymentLogo:"/Deployments/"+currentDeployment.deploymentDirectory+"/Branding/Lightbox/HD_logo.gif"};var _c47={allowscriptaccess:"always",allowfullscreen:true};var _c48={};swfobject.embedSWF("/Scripts/showcaseHD.swf","FlashShowcaseHD","146","31","9.0.0","",_c46,_c47,_c48);this._flShowcaseHD=dojo.byId("FlashShowcaseHD");},_flShowcaseHDReady:function(){if(this.item.ShowcaseHD==true&&this._flShowcaseHD){try{this._flShowcaseHD.Clear();this._flShowcaseHD.Load(dojo.json.serialize(this.item));}catch(e){}}},onSaveToMyAccount:function(){},_onSaveToMyAccount:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(this.saveToYourAccountCallback)){this.saveToYourAccountCallback(this.item.ListingID,this.item.MLSProviderID,this.item.MLSID);}},_requestMoreInfo:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(this.requestMoreInfoCallback)){this.requestMoreInfoCallback(this.item.ListingID,this.item.MLSID,this.item.MLSProviderID);}},_requestShowing:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(this.requestShowingCallback)){this.requestShowingCallback(this.item.ListingID,this.item.MLSID,this.item.MLSProviderID);}},_onEmailListingClick:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(this.emailListingCallback)){this.emailListingCallback(this.item.ListingID,this.item.MLSID,this.item.MLSProviderID);}},_HDPhotoTourClick:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(this.HDPhotoTourCallback)){this.HDPhotoTourCallback();}}});dojo.provide("wtl.widget.ShowcaseHD");dojo.widget.defineWidget("wtl.widget.ShowcaseHD",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"ShowcaseHD",templateCssPath:null,templateString:"<div class=\"ShowcaseHD ShowcaseHDPlaying\">\r\n    <div class=\"PropDesc\">\r\n        <table width=\"100%\">\r\n            <tr>\r\n                <td class=\"LeftTD\"><div dojoAttachPoint=\"address\"></div></td>\r\n                <td class=\"CenterTD\"><span dojoAttachPoint=\"description\"></span></td>\r\n                <td class=\"RightTD\"><div dojoAttachPoint=\"price\"></div><a dojoAttachEvent=\"onclick:closeClick\" href=\"\" class=\"Close\"></a></td>\r\n             </tr>\r\n        </table>\r\n        \r\n    </div>\r\n    <div style=\"z-index: 2;\" class=\"Container\">\r\n         <table width=\"100%\" height=\"100%\" dojoattachpoint=\"containerNode\">\r\n            <tr>\r\n                <td align=\"center\" valign=\"middle\"><div class=\"slideShowImageWrapper\" dojoattachpoint=\"largeNode\"></div></td>\r\n            </tr>    \r\n          </table>\r\n    </div>\r\n        \r\n    <div class=\"Controls\">\r\n        <table width=\"100%\">\r\n            <tr>\r\n                <td class=\"Logo\"></td>\r\n                <td class=\"PlayPause\" align=\"right\"><a dojoAttachEvent=\"onclick:_playPauseClick\" href=\"\"></a></td>\r\n                <td class=\"Interval\"><div dojoAttachPoint=\"Slider\"></div></td>\r\n                <td class=\"Paging\" align=\"center\">\r\n                    <div class=\"PagingControls\">\r\n                        <a dojoAttachEvent=\"onclick:_previousClick\" href=\"\" class=\"Previous\"></a>\r\n                        <span dojoAttachPoint=\"imageCount\">1 / 1</span>\r\n                        <a dojoAttachEvent=\"onclick:_nextClick\" href=\"\" class=\"Next\"></a>\r\n                    </div>\r\n                </td>\r\n                <td class=\"RightControl\">\r\n                    <a dojoAttachEvent=\"onclick:accountClick\" href=\"\" class=\"SaveTo\">Save to Your Account</a>\r\n                    <a dojoAttachEvent=\"onclick:rmiClick\" href=\"\" class=\"MoreInfo\">Request More Information</a>\r\n                    <!--<a dojoAttachEvent=\"onclick:infoClick\" href=\"\" class=\"Info\" dojoAttachPoint=\"infoButton\">Show Info</a>-->\r\n                </td>\r\n            </tr>\r\n        </table>        \r\n    </div>    \r\n</div>\r\n",currentDeployment:{},item:null,images:[],saveToYourAccountCallback:null,requestMoreInfoCallback:null,autoStart:true,slideshowInterval:4,imageIndex:0,_isPlaying:false,_resizeImages:false,_tempImgPath:"",_blankImage:null,_orgWidth:0,_orgHeight:0,_imgWidth:0,_imgHeight:0,_preCacheVal:2,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/ShowcaseHD.css");}}this._tempImgPath="/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/General/1t.gif";wtl.util.connectDialogKeyPress(this);},fillInTemplate:function(){dojo.event.connect(window,"onscroll",this,"_onScroll");this._setSizes();var _c4e={initialValue:this.slideshowInterval,minimum:1,maximum:10,snapValues:10,flip:true,backgroundSize:"height:21px;width:61px;",leftButtonSrc:"/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Lightbox/HD_slow.gif",rightButtonSrc:"/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Lightbox/HD_fast.gif",backgroundSrc:"/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Lightbox/HD_sliderBG.gif",handleSrc:"/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Lightbox/HD_slider.gif"};this._slider=dojo.widget.createWidget("SliderHorizontal",_c4e,this.Slider);dojo.event.connect(this._slider,"onValueChanged",this,"sliderChanged");},postCreate:function(){this._blankImage=document.createElement("img");this._blankImage.setAttribute("width",this._imgWidth);this._blankImage.setAttribute("height",this._imgHeight);this._blankImage.setAttribute("src",this._tempImgPath);this._setBlankImage();this.bgIframe=new dojo.html.BackgroundIframe();if(this.bgIframe.iframe){with(this.bgIframe.iframe.style){position="absolute";left=top="0";zIndex=90;display="block";}}},_sizeBackground:function(){var _c4f=dojo.html.getViewport();var h=_c4f.height;var w=_c4f.width;with(this.domNode.style){width=w+"px";height=h+"px";}var _c52=dojo.html.getScroll().offset;this.domNode.style.top=_c52.y+"px";this.domNode.style.left=_c52.x+"px";var _c4f=dojo.html.getViewport();if(_c4f.width!=w){this.domNode.style.width=_c4f.width+"px";}if(_c4f.height!=h){this.domNode.style.height=_c4f.height+"px";}if(this.bgIframe.iframe){with(this.bgIframe.iframe.style){width=w+"px";height=h+"px";}this.bgIframe.iframe.style.display="block";}},_setSizes:function(){var _c53=dojo.html.getViewport();if(_c53.height!=this._orgHeight||_c53.width!=this._orgWidth){this._orgHeight=_c53.height;this._orgWidth=_c53.width;this.containerNode.style.height=(this._orgHeight-66)+"px";this._imgHeight=(this._orgHeight>1600)?1600:this._orgHeight-100;this._imgWidth=(this._orgWidth>1600)?1600:this._orgWidth-50;this._resizeImages=true;}},populate:function(item){this.images=[];this.imageIndex=0;this.item=item;this.maxPhotos=this.item.Images.length;this.price.innerHTML=this.item.PriceDisplay;if(this.item.PriceType&&this.item.PriceType.length>0){this.price.innerHTML+=" "+this.item.PriceType;}this.address.innerHTML=(this.item.Address&&this.item.Address.length?this.item.Address+" ":"")+(this.item.Address2&&this.item.Address2.length?this.item.Address2+" ":"")+this.item.City+", "+this.item.State+" "+this.item.PostalCode;dojo.io.bind({url:"/ListingHandler.c?rand="+(new Date()).getTime(),method:"post",content:{IsPropertyShowcase:true,HD:true,ListingID:this.item.ListingID?this.item.ListingID:0,MLSProviderID:this.item.MLSProviderID?this.item.MLSProviderID:0,MLSID:this.item.MLSID?this.item.MLSID:""},load:null,mimetype:"text/json",transport:"XMLHTTPTransport"});},show:function(){dojo.event.connect(window,"onresize",this,"_resize");this._setSizes();this._sizeBackground();if(this.autoStart){this._isPlaying=true;}var _c55=this;var _c56=function(){if(_c55.autoStart){_c55._startTimer();}};this.showImage(this.imageIndex,_c56);this.domNode.style.display="block";},hide:function(){dojo.event.disconnect(window,"onresize",this,"_resize");this._setBlankImage();if(this._inLoop){this._stop();}this.domNode.style.display="none";if(this.bgIframe.iframe){this.bgIframe.iframe.style.display="none";}},isShowing:function(){return (this.domNode.style.display=="none")?false:true;},sliderChanged:function(x,y){this.slideshowInterval=parseInt(x);},_resize:function(){this._sizeBackground();this._setSizes();this.images=[];var _c59=this;var _c5a=function(){while(_c59.largeNode.firstChild){_c59.largeNode.removeChild(_c59.largeNode.firstChild);}_c59.largeNode.appendChild(_c59.images[_c59.imageIndex]);};this._loadImage(this.imageIndex,_c5a);this._cacheImages(this.imageIndex);},_onScroll:function(){var _c5b=dojo.html.getScroll().offset;this.domNode.style.top=_c5b.y+"px";this.domNode.style.left=_c5b.x+"px";},_previousClick:function(evt){dojo.event.browser.stopEvent(evt);this.imageIndex--;if(this.imageIndex<0){this.imageIndex=this.item.Images.length-1;}if(this._inLoop){this.toggleSlideShow();}this.showImage(this.imageIndex);},_nextClick:function(evt){dojo.event.browser.stopEvent(evt);this.imageIndex++;if(this.imageIndex>=this.item.Images.length){this.imageIndex=0;}if(this._inLoop){this.toggleSlideShow();}this.showImage(this.imageIndex);},_playPauseClick:function(evt){if(evt){dojo.event.browser.stopEvent(evt);}this.toggleSlideShow();},toggleSlideShow:function(){if(this._isPlaying){this._stop();}else{this._timerCancelled=false;this._isPlaying=true;var _c5f=this.showNextImage(true,true);if(!_c5f){this._stop();}}},_stop:function(){if(this._inLoop){clearTimeout(this._inLoop);}this._inLoop=null;this._timerCancelled=true;this._isPlaying=false;dojo.html.removeClass(this.domNode,"ShowcaseHDPlaying");dojo.html.addClass(this.domNode,"ShowcaseHDPaused");},_startTimer:function(){var id=this.widgetId;this._inLoop=setTimeout(function(){dojo.widget.manager.getWidgetById(id).showNextImage(true,true);},this.slideshowInterval*1000);dojo.html.addClass(this.domNode,"ShowcaseHDPlaying");dojo.html.removeClass(this.domNode,"ShowcaseHDPaused");},showNextImage:function(_c61,_c62){if(this.imageIndex+1>=this.maxPhotos){if(_c61&&_c62){this.imageIndex=-1;}else{return false;}}var _c63=this;this.showImage(this.imageIndex+1,function(){if(_c61){_c63._startTimer();}});return true;},closeClick:function(evt){if(evt){dojo.event.browser.stopEvent(evt);}this.hide();},showImage:function(_c65,_c66){var _c67=this;var _c68=this.largeNode.getElementsByTagName("div");this.imageIndex=_c65;var _c69=function(){if(_c67.images[_c65]){while(_c67.largeNode.firstChild){_c67.largeNode.removeChild(_c67.largeNode.firstChild);}_c67.imageCount.innerHTML=(_c65+1)+" / "+_c67.item.Images.length;_c67.description.innerHTML=_c67.item.Images[_c65].desc?_c67.item.Images[_c65].desc:"";_c67.images[_c65].style.opacity=0;_c67.largeNode.appendChild(_c67.images[_c65]);var _c6a=function(){if(_c66&&_c67._isPlaying){_c66();}};dojo.lfx.html.fadeIn(_c67.images[_c65],400,null,_c6a).play();}else{_c67._loadImage(_c65,function(){_c67.showImage(_c65,_c66);});}};if(_c68&&_c68.length>0){dojo.lfx.html.fadeOut(_c68[0],400,null,_c69).play();}else{_c69();}this._cacheImages(_c65);},_cacheImages:function(_c6b){for(var x=1;x<=this._preCacheVal;x++){if(_c6b+x<this.item.Images.length){if(!this.images[_c6b+x]){this._loadImage(_c6b+x);}}else{if(!this.images[(_c6b+x)-this.item.Images.length]){this._loadImage((_c6b+x)-this.item.Images.length);}}}for(var x=1;x<=this._preCacheVal;x++){if(_c6b-x>0){if(!this.images[_c6b-x]){this._loadImage(_c6b-x);}}else{if(!this.images[this.item.Images.length-x]){this._loadImage(this.item.Images.length-x);}}}},_loadImage:function(_c6d,_c6e){if(this.images[_c6d]||!this.item){this._resizeImages=false;return;}if(this.item.Images){var url="/ResizeImage.c?MaxHeight="+this._imgHeight+"&MaxWidth="+this._imgWidth+"&Image="+this.item.Prefix+this.item.Images[_c6d].file;var img=document.createElement("img");var div=document.createElement("div");div.appendChild(img);var _c72=this;dojo.event.connect(img,"onload",function(){if(_c6e){_c6e();}});this.images[_c6d]=div;img.setAttribute("src",url);}},_setBlankImage:function(){while(this.largeNode.firstChild){this.largeNode.removeChild(this.largeNode.firstChild);}this.largeNode.appendChild(this._blankImage);},accountClick:function(evt){if(evt){dojo.event.browser.stopEvent(evt);}if(dojo.lang.isFunction(this.saveToYourAccountCallback)){this.saveToYourAccountCallback(this.item.ListingID,this.item.MLSProviderID,this.item.MLSID);}},rmiClick:function(evt){if(evt){dojo.event.browser.stopEvent(evt);}if(dojo.lang.isFunction(this.requestMoreInfoCallback)){this.requestMoreInfoCallback(this.item.ListingID,this.item.MLSID,this.item.MLSProviderID);}}});dojo.provide("wtl.widget.PropertyPreviewPane");dojo.widget.defineWidget("wtl.widget.PropertyPreviewPane",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"PropertyPreviewPane",templateCssPath:null,templateString:"<div class=\"PropertyPreview\">\r\n\r\n\t<div class=\"NoItems\" dojoAttachPoint=\"noPropertyContainer\">\r\n\t\t<p>There is no property selected.</p>\r\n\t\t<p>Please select a property using the Map or the Property Filmstrip.</p>\r\n\t</div>\r\n\r\n\t<div dojoAttachPoint=\"propertyContainer\" style=\"display:none;\">\r\n\r\n\t\t<div class=\"PaginationContainer\" dojoAttachPoint=\"paginationContainer\" style=\"display:none;\">\r\n\t\t\t<div class=\"PreviousLink\" dojoAttachPoint=\"previousLink\" style=\"display:none;\"><a dojoAttachEvent=\"onclick:previousClick\">Previous</a></div>\r\n\t\t\t<div class=\"NextLink\" dojoAttachPoint=\"nextLink\" style=\"display:none;\"><a dojoAttachEvent=\"onclick:nextClick\">Next</a></div>\r\n\t\t</div>\r\n\t\t\r\n\t\t<div id=\"PropWrap\">\r\n\t\t    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t        <tr>\r\n\t\t            <td colspan=\"2\">\r\n\t\t                <div id=\"PriceIDAddr\">\r\n\t\t\t\t            <div class=\"Address\" dojoAttachPoint=\"address\"></div>\r\n\t\t\t\t            <div class=\"Price\" dojoAttachPoint=\"price\"></div>\r\n\t\t\t\t            <div class=\"CitySTZIP\" dojoAttachPoint=\"citySTZIP\"></div>\r\n\t\t\t\t            <div class=\"PropertyID\" dojoAttachPoint=\"propertyID\"></div>\r\n\t\t\t\t            <div class=\"OpenHouseAlert DataElement\" dojoAttachPoint=\"openHouseContainer\"></div>\r\n\t\t\t            </div>\r\n\t\t            </td>\r\n\t\t        </tr>\r\n\t\t        <tr>\r\n\t\t            <td valign=\"top\" style=\"padding-top:4px;\">\r\n\t\t                <div class=\"PhotoHolder\">\r\n\t\t\t                <a href=\"\" dojoAttachEvent=\"onclick:_showLightBox\"><img alt=\"\" dojoAttachPoint=\"photo\" /></a>\r\n\t\t                    <a href=\"\" dojoAttachPoint=\"lightboxLink\" class=\"SiteLink\" dojoAttachEvent=\"onclick:_showLightBox\">View Photo Tour</a>\r\n\t\t\t\t        </div>\r\n\t\t\t\t    </td>\r\n\t\t            <td valign=\"top\" style=\"padding-top:4px;\" class=\"Nowrap\">\r\n\t\t                <div class=\"ButtonMenu\">\r\n\t\t\t\t\t        <a class=\"Details\" dojoAttachPoint=\"propertyDetailsLink\">Property Details</a>\r\n\t\t\t\t\t        <a class=\"HDShowcase\" dojoAttachEvent=\"onclick:_onShowcaseHDClick\" dojoAttachPoint=\"showcaseHDLink\">Property Showcase</a>\r\n\t\t\t\t\t        <a class=\"MoreInfo\" dojoAttachEvent=\"onclick:_onRequestMoreInfoClick\" href=\"\">Request More Information</a>\r\n\t\t\t\t\t        <a class=\"Showing\" dojoAttachPoint=\"requestShowingLink\" dojoAttachEvent=\"onclick:_onRequestShowingClick\" href=\"\">Request a Showing</a>\r\n\t\t\t\t\t        <!-- <a class=\"Mortgage\" dojoAttachEvent=\"onclick:_onMortgageClick\">Mortgage Calculator</a> -->\r\n\t\t\t\t\t        <a class=\"Brochures\" dojoAttachEvent=\"onclick:_onBrochureClick\" href=\"\">Print Brochures</a>\r\n\t\t\t\t\t        <a class=\"SaveTo\" dojoAttachEvent=\"onclick:_onSaveToHomeFileClick\" href=\"\">Save to Your Account</a>\r\n\t\t\t\t\t        <a class=\"EmailListing\" dojoAttachEvent=\"onclick:_onEmailListingClick\" href=\"\">E-mail Listing</a>\r\n\t\t\t\t\t        <div class=\"CompareCheckbox\" dojoAttachPoint=\"compareCheckboxContainer\">\r\n\t\t\t\t\t            <input dojoAttachEvent=\"onclick:_onCompareChecked\" dojoAttachPoint=\"compareCheckbox\" id=\"${this.widgetId}_compare\" type=\"checkbox\" NAME=\"Checkbox1\"/>\r\n\t\t\t\t\t            <label for=\"${this.widgetId}_compare\" class=\"Pointer\">Select to Compare</label>\r\n\t\t\t                </div>\r\n\t\t\t                <!-- <a class=\"Showcase\" dojoAttachEvent=\"onclick:_showLightBox\">View Property Showcase</a> -->\r\n\t\t\t\t        </div>\r\n\t\t            </td>\r\n\t\t        </tr>\r\n\t\t    </table>\r\n\t\t\t\r\n\t\t\t<div class=\"TabContainer ClearAll\">\t\t\t\r\n\t\t\t\t<div class=\"Disableable Tab Selected\" dojoAttachEvent=\"onclick:_showTab\" dojoAttachPoint=\"agentTab\" id=\"agentTab\">\r\n\t\t\t\t\t<a dojoAttachPoint=\"agentTabText\">${this.agentTabLabel}</a>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"Disableable Tab\" dojoAttachEvent=\"onclick:_showTab\" dojoAttachPoint=\"summaryTab\" id=\"summaryTab\">\r\n\t\t\t\t\t<a>Summary</a>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"Disableable Tab\" dojoAttachEvent=\"onclick:_showTab\" dojoAttachPoint=\"photosTab\" id=\"photosTab\">\r\n\t\t\t\t\t<a>Photos</a>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"TabContent\" dojoAttachPoint=\"tabContainer\">\r\n\t\t\t\t<!--  Agent Tab -->\r\n\t\t\t\t<div dojoAttachPoint=\"agentTabContainer\">\r\n\t\t\t\t    <div dojoAttachPoint=\"agentContainer\"></div>\r\n\t\t\t\t    <div dojoAttachPoint=\"coagentContainer\"></div>\r\n\t\t\t\t</div>    \r\n\t\t\t\t<!--  Summary Tab -->\r\n\t\t\t\t<div class=\"Summary\" dojoAttachPoint=\"summaryTabContainer\" style=\"display:none;\">\r\n\t\t\t\t    <div dojoAttachPoint=\"designations\" class=\"PropDesignations\"></div>\r\n\t\t\t\t    <div dojoAttachPoint=\"leadline\" class=\"Leadline\"></div>\r\n\t\t\t\t\t<div dojoAttachPoint=\"caption\"></div>\r\n\t\t\t\t\t<a href=\"\" target=\"_blank\" class=\"VirtualTour\" dojoAttachPoint=\"virtualTour\" style=\"display:none;\">Virtual Tour</a>\r\n\t\t\t\t\t<table class=\"PropertyFeatures\">\r\n\t\t\t\t\t\t<tbody dojoAttachPoint=\"features\"></tbody>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t</div>\r\n\t\t\t\t<!--  Photos Tab -->\r\n\t\t\t\t<div class=\"Photos\" dojoAttachPoint=\"photosTabContainer\" style=\"display:none;\"></div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"IDXContainer\" dojoAttachPoint=\"idxContainer\">\r\n\t\t\t\t<div dojoAttachPoint=\"idxText\" class=\"IDXText\"></div>\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<div class=\"ListedBy\" dojoAttachPoint=\"listedBy\"></div>\r\n\t\t\t\r\n\t\t\t<div class=\"ActiveStatus\" dojoAttachPoint=\"propertyStatus\" dojoAttachEvent=\"onclick:_showLightBox\"></div>\r\n\t\t</div>\r\n\t\t\t\r\n\t</div>\r\n</div>\r\n",currentDeployment:{},item:null,label:"Property Preview",httpHandler:"",agentHandler:"",imageWidth:108,agentTabLabel:"Listed By",signInMessage:"You must sign in to Save Properties",searchType:0,saveToYourAccountCallback:null,requestMoreInfoCallback:null,requestShowingCallback:null,emailListingCallback:null,onOpenCallback:null,onCloseCallback:null,onGetDirections:null,disableEffectsCallback:null,enableEffectsCallback:null,showLoadingCallback:null,hideLoadingCallback:null,showMessageCallback:null,onPagingCallback:null,noPropertyContainer:null,propertyContainer:null,openHouseContainer:null,showCaseButton:null,compareCheckbox:null,photo:null,lightboxLink:null,price:null,address:null,citySTZIP:null,propertyID:null,designations:null,caption:null,leadline:null,propertyDetailsLink:null,compareCheckboxContainer:null,idxContainer:null,listedBy:null,propertyStatus:null,requestShowingLink:null,tabContainer:null,agentTab:null,agentTabText:null,agentTabContainer:null,agentContainer:null,coagentContainer:null,summaryTab:null,summaryTabContainer:null,photosTab:null,photosTabContainer:null,agentName:null,jobTitle:null,agentDetails:null,agentContact:null,agentPhotoContainer:null,agentPhoto:null,imgLink:null,siteLink:null,paginationContainer:null,previousLink:null,nextLink:null,features:null,virtualTour:null,_pane:null,_agent:null,_selectedIdx:0,_featureCounter:0,_doNotOpenPane:false,_previousListing:null,_nextListing:null,_lightbox:null,_agentID:0,_listingsAgentID:0,_viewingListings:false,_viewingSolds:false,contactType:{AGENT:0,OFFICE:1},_contactInfo:null,_coAgentInfo:null,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/PropertyPreviewPane.css");}}},fillInTemplate:function(){dojo.event.connect(this.photo,"onmouseover",wtl.util,"onPhotoMouseOver");dojo.event.connect(this.photo,"onmouseout",wtl.util,"onPhotoMouseOut");},setPane:function(pane){this._pane=pane;},setPagination:function(prev,next,_c78){this._previousListing=prev?prev:null;dojo.html.setDisplay(this.previousLink,prev?true:false);this._nextListing=next?next:null;dojo.html.setDisplay(this.nextLink,next?true:false);dojo.html.setDisplay(this.paginationContainer,(prev||next)?true:false);if(dojo.lang.isFunction(this.onPagingCallback)){this.onPagingCallback(this.getItemKey());}if(!_c78){this.superSize();}},previousClick:function(evt){dojo.event.browser.stopEvent(evt);this.openPreview(this._previousListing,true);},nextClick:function(evt){dojo.event.browser.stopEvent(evt);this.openPreview(this._nextListing,true);},openPreview:function(item,_c7c){this.item=item;this._selectedIdx=0;this._featureCounter=0;this._doNotOpenPane=_c7c;if(this.item){if(this.httpHandler){dojo.io.bind({url:wtl.util.urlAppend(this.httpHandler,"rand="+(new Date()).getTime()),method:"post",content:{ListingID:this.item.ListingID?this.item.ListingID:0,MLSProviderID:this.item.MLSProviderID?this.item.MLSProviderID:0,MLSID:this.item.MLSID?this.item.MLSID:""},load:dojo.lang.hitch(this,"_populateListing"),mimetype:"text/json",transport:"XMLHTTPTransport"});}}else{dojo.html.setDisplay(this.noPropertyContainer,true);dojo.html.setDisplay(this.propertyContainer,false);}},_populateListing:function(type,data,_c7f){this._selectedIdx=0;if(this._coAgentInfo){this._coAgentInfo.domNode.style.display="none";}if(data&&data.Detail){for(var key in data.Detail){this.item[key]=data.Detail[key];}this.item.Server=data.Server;this.item.Prefix=data.Prefix;this.setPagination(data.PreviousItem,data.NextItem,true);this.propertyStatus.className=data.Detail.ListingStatusCode+"Status";this.agentTabText.innerHTML=data.Detail.DisplayLabel;if(data.Detail.WorkOnlineAgent){this._populateListingContact(data.Detail.WorkOnlineAgent,this.contactType.AGENT);}else{if(data.Detail.DisplayOffice){this._populateListingContact(data.Detail.DisplayOffice,this.contactType.OFFICE);}else{if(data.Detail.ListingAgent){this._populateListingContact(data.Detail.ListingAgent,this.contactType.AGENT);}if(data.Detail.CoListingAgent&&!data.Detail.PresentedBy){this._populateCoAgent(data.Detail.CoListingAgent,this.contactType.AGENT);}}}dojo.html.setDisplay(this.showcaseHDLink,this.item.ShowcaseHD);if(data.Images){this.item.Images=data.Images;dojo.html.setDisplay(this.photosTab,data.Images.length>0);}else{if(/selected/i.test(this.photosTab.className)){this._resetTabContent();dojo.html.setDisplay(this.agentTabContainer,true);this.agentTab.className+=" Selected";}}dojo.html.setDisplay(this.showCaseButton,data.Images);dojo.html.setDisplay(this.photosTab,data.Images);this.price.innerHTML=this.item.PriceDisplay;if(this.item.PriceType&&this.item.PriceType.length>0){this.price.innerHTML+=" "+this.item.PriceType;}this.address.innerHTML="";if(this.item.Address&&this.item.Address!=""){this.address.innerHTML=this.item.Address;}if(this.item.Address2&&this.item.Address2!=""){this.address.innerHTML+="<br />"+this.item.Address2;}this.citySTZIP.innerHTML=this.item.City+", "+this.item.State+" "+this.item.PostalCode;this.propertyID.innerHTML=this.item.PropertyID>0?"Property ID: "+this.item.PropertyID:this.currentDeployment.idxLabel+": "+this.item.MLSID;if(data.OpenHouses&&data.OpenHouses.length){this.openHouseContainer.innerHTML="Open ";for(var i=0;i<data.OpenHouses.length;i++){var oh=data.OpenHouses[i];if(i>0){this.openHouseContainer.innerHTML+="<br />and ";}this.openHouseContainer.innerHTML+=oh.StartDayName+", "+oh.StartMonth+" "+oh.StartDayNum+", "+oh.StartYear+" From "+oh.StartTime+" to "+oh.EndTime;this.openHouseContainer.innerHTML+=" <span class='OHCaption'>"+oh.Caption+"</span>";}dojo.html.setDisplay(this.openHouseContainer,true);}else{dojo.html.setDisplay(this.openHouseContainer,false);}if(data.MissingImage){this.photo.src="/ResizeImage.c?Width=164&Image="+data.MissingImage+"&u="+this.item.PicTicks+"&Make4x3=true";}else{this._setPreviewPhoto();}this.caption.innerHTML=this.item.Caption;dojo.html.setDisplay(this.caption,this.item.Caption.length);s=this.item.LeadLine?this.item.LeadLine:"";this.leadline.innerHTML=s;dojo.html.setDisplay(this.leadline,s.length);wtl.util.destroyChildren(this.designations);if(this.item.FHE){this.designations.appendChild(this._buildDesignationImg("FHE","Fine Homes & Estates"));}if(this.item.REC){this.designations.appendChild(this._buildDesignationImg("REC","Recreational Properties"));}if(this.item.AM){this.designations.appendChild(this._buildDesignationImg("AM","AIR MILES&#174 Properties"));}if(this.item.HIS){this.designations.appendChild(this._buildDesignationImg("HIS","Historic Properties"));}if(this.item.COM){this.designations.appendChild(this._buildDesignationImg("COM","Commercial / Investment"));}if(this.item.IsLuxuryProperty){this.designations.appendChild(this._buildDesignationImg("Previews","Luxury Home"));}dojo.html.setDisplay(this.virtualTour,false);if(this.item.VirtualTourURL&&this.item.VirtualTourURL.length){this.virtualTour.href=this.item.VirtualTourURL;dojo.html.setDisplay(this.virtualTour,true);}dojo.html.setDisplay(this.requestShowingLink,!this.item.IsSold);wtl.util.destroyChildren(this.features);this._addFeature(this.currentDeployment.idxLabel,this.item.MLSID,(this.item.MLSID&&this.item.MLSID.length>9)?true:false);this._addFeature("Year Built",this.item.YearBuilt);this._addFeature("Bedrooms",this.item.Bedrooms);this._addFeature("Bathrooms",this.item.Bathrooms);this._addFeature("Total Square Ft.",this.item.SqFootage);this._addFeature("Above Ground Sq Ft.",this.item.AboveSqFootage);this._addFeature("Foundation Sq Ft.",this.item.FoundationSqFootage);this._addFeature("New Construction",this.item.NewConstruction);this._addFeature("Fireplaces",this.item.Fireplaces);this._addFeature("Acreage",this.item.Acerage);this._addFeature("Style",this.item.Style,true);this._addFeature("Parking Stalls",this.item.Garages,true);this._addFeature("Lot Size",this.item.LotSize,true);this._addFeature("County",this.item.County,true);this._addFeature("Neighborhood",this.item.Neighborhood,true);this._addFeature("School District",this.item.SchoolDistrict,true);this.propertyDetailsLink.href=this._buildListingLink();dojo.html.setDisplay(this.idxContainer,false);dojo.html.setDisplay(this.listedBy,false);if(this.item.PropertyID<=0){this.idxText.innerHTML=this.item.ListingCourtesy;this.idxText.className="IDXText "+("MLS"+this.item.MLSProviderID);dojo.html.setDisplay(this.idxContainer,true);}else{this.listedBy.innerHTML=this.item.ListingCourtesy;dojo.html.setDisplay(this.listedBy,true);}this.onDisplayCompareable(this.item);if(dojo.lang.isFunction(this.onOpenCallback)){this.onOpenCallback(this.item,"listings");}dojo.html.setDisplay(this.noPropertyContainer,false);dojo.html.setDisplay(this.propertyContainer,true);if(this._pane&&!this._doNotOpenPane){this._pane.onLabelClick();}var a=this.photosTabContainer.getElementsByTagName("a");for(var i=0;i<a.length;i++){dojo.event.disconnect(a,"onclick",this,"_onThumbClick");}wtl.util.destroyChildren(this.photosTabContainer);dojo.html.setDisplay(this.lightboxLink,this.item.Images);if(this.item.Images){for(var i=0;i<this.item.Images.length;i++){var a=document.createElement("a");a.href="";a.idx=i;var img=document.createElement("img");img.src=this.item.Server+"/ResizeImage.c?Width=60&Image="+this.item.Prefix+"320px/"+this.item.Images[i].file+"&Make4x3=true";img.idx=i;img.width=60;img.height=45;img.alt=img.title=this.item.Images[i].desc?this.item.Images[i].desc:"";a.appendChild(img);this.photosTabContainer.appendChild(a);dojo.event.connect(a,"onclick",this,"_onThumbClick");}}}setTimeout(dojo.lang.hitch(this,"superSize"),500);},_buildDesignationImg:function(_c85,_c86){var i=document.createElement("img");i.src="/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Designations/"+_c85+".gif";i.alt=_c85;i.title=_c86;return i;},superSize:function(){this.tabContainer.style.height="";var _c88=dojo.html.getMarginBox(this.propertyContainer).height+5;var _c89=dojo.html.getMarginBox(this.tabContainer).height-15;var _c8a=dojo.html.getMarginBox(this._pane.containerNode).height;var h=_c89+(_c8a-_c88);this.tabContainer.style.height=(h<20?20:h)+"px";this.tabContainer.scrollTop=0;},_populateListingContact:function(data,type){if(!this._contactInfo){this._contactInfo=dojo.widget.createWidget("wtl:ContactInfo",{item:this.item,currentDeployment:this.currentDeployment},this.agentContainer);dojo.event.connect(this._contactInfo,"viewListingsClick",this,"viewListingsClick");dojo.event.connect(this._contactInfo,"viewSoldsClick",this,"viewSoldsClick");dojo.event.connect(this._contactInfo,"workWithMeClick",this,"_workWithAgentClick");dojo.event.connect(this,"resetAgentSearch",this._contactInfo,"resetAgentSearch");dojo.event.connect(this._contactInfo,"mapAndDirs",this,"mapAndDirs");}this._contactInfo.item=this.item;if(type==this.contactType.AGENT){this._contactInfo.populateAgent(data);this._contactInfo.setWorkingOnline(this.item.WorkWithAgent,this.item.DirectAgentSite);this._agent=data;}else{this._contactInfo.populateOffice(data);}},_populateCoAgent:function(_c8e){if(!this._coAgentInfo){this._coAgentInfo=dojo.widget.createWidget("wtl:ContactInfo",{item:this.item,currentDeployment:this.currentDeployment},this.coagentContainer);dojo.event.connect(this._coAgentInfo,"viewListingsClick",this,"viewListingsClick");dojo.event.connect(this._coAgentInfo,"viewSoldsClick",this,"viewSoldsClick");dojo.event.connect(this._coAgentInfo,"workWithMeClick",this,"_workWithAgentClick");dojo.event.connect(this,"resetAgentSearch",this._coAgentInfo,"resetAgentSearch");}this._coAgentInfo.populateAgent(_c8e);this._coAgentInfo.domNode.style.display="";},mapAndDirs:function(id){if(dojo.lang.isFunction(this.onGetDirections)){this.onGetDirections("OfficeID="+id);}},agentDetailsClick:function(_c90){},viewSoldsClick:function(_c91){},viewListingsClick:function(_c92){},resetAgentSearch:function(){},_addFeature:function(_c93,_c94,span){if(_c94||_c94.length){if(span){this._featureCounter=0;}var tr=null;if(this._featureCounter++%2==0){tr=document.createElement("tr");this.features.appendChild(tr);}else{tr=dojo.dom.lastElement(this.features,"tr");}var td=document.createElement("td");td.className="Label";td.innerHTML=_c93+":";tr.appendChild(td);var td=document.createElement("td");td.className="Value";td.innerHTML=_c94;if(this._featureCounter%2!=0){td.style.paddingRight="6px";}if(span){td.colSpan=3;this._featureCounter=0;}tr.appendChild(td);}},_onThumbClick:function(evt){dojo.event.browser.stopEvent(evt);this._selectedIdx=evt.target.idx;this._showLightBox(evt);},_setPreviewPhoto:function(){this.photo.src="/ResizeImage.c?Width=164&Image="+this.item.Prefix+"320px/"+this.item.Images[this._selectedIdx].file+"&u="+this.item.PicTicks+"&Make4x3=true";if(this._selectedIdx==0){if(this.item.ShowingCount>=this.currentDeployment.maxCompanyPhotos){this.photo.src+="&MaxPhotos=true";}if(this.item.ShowcaseHD){this.photo.src+="&HDShowcase=true";}}this.lightboxLink.style.width="166px";},_onCompareChecked:function(evt){this.toggleCompare(this.compareCheckbox.checked,this.item);},_onShowcaseHDClick:function(evt){if(evt){dojo.event.browser.stopEvent(evt);}if(!this._showcaseHD){var _c9b=document.createElement("div");dojo.body().appendChild(_c9b);var _c9c={currentDeployment:this.currentDeployment,saveToYourAccountCallback:dojo.lang.hitch(this,"saveToHomeFileClick"),requestMoreInfoCallback:this.requestMoreInfoCallback};this._showcaseHD=dojo.widget.createWidget("wtl:ShowcaseHD",_c9c,_c9b);}this._showcaseHD.populate(this.item);this._showcaseHD.show();},_showHDShowcase:function(){if(this._lightbox&&this._lightbox.isShowing()){this._lightbox.hide();}this._onShowcaseHDClick();},_showLightBox:function(evt){dojo.event.browser.stopEvent(evt);if(!this.item.Images){return;}if(dojo.lang.isFunction(this.disableEffectsCallback)){this.disableEffectsCallback();}if(!this._lightbox){var _c9e=document.createElement("div");dojo.body().appendChild(_c9e);var _c9f={currentDeployment:this.currentDeployment,saveToYourAccountCallback:dojo.lang.hitch(this,"saveToHomeFileClick"),notLoggedIn:dojo.lang.hitch(this,"this.notLoggedInLightbox"),requestMoreInfoCallback:this.requestMoreInfoCallback,requestShowingCallback:this.requestShowingCallback,emailListingCallback:this.emailListingCallback,onDestroyCallback:dojo.lang.hitch(this,"_onLightBoxDestroy"),HDPhotoTourCallback:dojo.lang.hitch(this,"_showHDShowcase")};this._lightbox=dojo.widget.createWidget("wtl:LightBox",_c9f,_c9e);_c9e=null;}this._lightbox.populate(this.item,this._selectedIdx);this._lightbox.show();this.onShowLightbox();},_onLightBoxDestroy:function(){if(dojo.lang.isFunction(this.enableEffectsCallback)){this.enableEffectsCallback();}this.onHideLightbox();},_onRequestMoreInfoClick:function(evt){dojo.event.browser.stopEvent(evt);if(this.item&&dojo.lang.isFunction(this.requestMoreInfoCallback)){this.requestMoreInfoCallback(this.item.ListingID,this.item.MLSID,this.item.MLSProviderID);}},onShowLightbox:function(){},onHideLightbox:function(){},_onRequestShowingClick:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(this.requestShowingCallback)){this.requestShowingCallback(this.item.ListingID,this.item.MLSID,this.item.MLSProviderID);}},_onMortgageClick:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(ShowMortgageCalculatorWin)){ShowMortgageCalculatorWin("/Popups/MortgageCalculator.aspx?Price="+this.item.Price);}},_onBrochureClick:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(ShowPrintBrochuresWin)){ShowPrintBrochuresWin("/Popups/PrintBrochures.aspx?"+this._getUrlIds());}},_getUrlIds:function(){if(this.item.ListingID>0){return "ListingID="+this.item.ListingID;}return "MLSID="+this.item.MLSID+"&MLSProviderID="+this.item.MLSProviderID;},_onEmailListingClick:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(this.emailListingCallback)){this.emailListingCallback(this.item.ListingID,this.item.MLSID,this.item.MLSProviderID);}},_workWithAgent:function(_ca5){this.workWithMeOnline(_ca5,this._agentID);},_workWithAgentClick:function(id){this._agentID=id;this.workWithMeOnline(false,id);},workWithMeOnline:function(_ca7,id){},processWorkWithMe:function(_ca9){if(this._contactInfo){this._contactInfo.updateWorkingOnline(_ca9.WTLUserID);if(this._coAgentInfo){this._coAgentInfo.updateWorkingOnline(_ca9.WTLUserID);}if(_ca9.WTLUserID==0&&this.agentTabText!="Listed By"){this.openPreview(this.item,true);}}},workWithAgent:function(){this.workWithMeOnline(false,this._agentID);},notLoggedIn:function(_caa,_cab){},saveToHomeFileClick:function(){this._saveToHomeFile(this.item.ListingID,this.item.MLSProviderID,this.item.MLSID);},_onSaveToHomeFileClick:function(evt){if(evt){dojo.event.browser.stopEvent(evt);}this._saveToHomeFile(this.item.ListingID,this.item.MLSProviderID,this.item.MLSID);},_saveToHomeFile:function(_cad,_cae,_caf){if(dojo.lang.isFunction(this.showLoadingCallback)){this.showLoadingCallback();}dojo.io.bind({url:"/SaveToHomeFile.c?ListingID="+_cad+"&MLSProviderID="+_cae+"&MLSID="+_caf+"&Page=Search2&rand="+(new Date()).getTime(),method:"post",load:dojo.lang.hitch(this,"_processSaveToHomeFile"),mimetype:"text/json",sync:true,transport:"XMLHTTPTransport"});},_processSaveToHomeFile:function(type,data,_cb2){if(dojo.lang.isFunction(this.hideLoadingCallback)){this.hideLoadingCallback();}if(data&&data.success){this.item.GuestListingID=data.guestListingID;this.onSaveToHomeFile(this.item);}else{if(data&&data.showLogin){if(this._lightbox&&this._lightbox.isShowing()){this._lightbox.hide();}if(this._showcaseHD&&this._showcaseHD.isShowing()){this._showcaseHD.hide();}this.notLoggedIn(this.widgetId,"saveToHomeFileClick");}}},onSaveToHomeFile:function(_cb3){},notLoggedInLightbox:function(){this.notLoggedIn(this.widgetId,"saveToHomeFileClick");},_showTab:function(evt){dojo.event.browser.stopEvent(evt);this._resetTabContent();var e=evt.target;while(!e.id&&e.parentNode){e=e.parentNode;}switch(e.id){case "summaryTab": dojo.html.setDisplay(this.summaryTabContainer,true);this.summaryTab.className+=" Selected";break;case "photosTab": dojo.html.setDisplay(this.photosTabContainer,true);this.photosTab.className+=" Selected";break;default: dojo.html.setDisplay(this.agentTabContainer,true);this.agentTab.className+=" Selected";}},_resetTabContent:function(){this.agentTab.className="Tab";this.summaryTab.className="Tab";this.photosTab.className="Tab";dojo.html.setDisplay(this.agentTabContainer,false);dojo.html.setDisplay(this.summaryTabContainer,false);dojo.html.setDisplay(this.photosTabContainer,false);},getItem:function(){return this.item;},getItemKey:function(){return wtl.util.getListingKey(this.item);},_buildListingLink:function(){if(this.item){return this.item.FriendlyUrl;}return "";},switchSearchType:function(typ){this.searchType=typ;if(this.propertyDetailsLink){this.propertyDetailsLink.href=this._buildListingLink();}},toggleCompare:function(_cb7,item){},onDisplayCompareable:function(item){},onCompareItemToggled:function(item,_cbb,_cbc,_cbd){if(wtl.util.listingsEqual(item,this.item)){this.compareCheckbox.checked=_cbb;}this.compareCheckbox.disabled=!this.compareCheckbox.checked&&_cbc;},onUpdateCompareableDisplay:function(item,_cbf,_cc0){if(wtl.util.listingsEqual(item,this.item)){this.compareCheckbox.checked=_cbf;}this.compareCheckbox.disabled=!this.compareCheckbox.checked&&_cc0;},openPane:function(){if(this._pane){this._pane.onLabelClick();}}});dojo.provide("wtl.widget.ContactInfoCBGL");dojo.widget.defineWidget("wtl.widget.ContactInfoCBGL",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"ContactInfoCBGL",templateCssPath:null,templateString:"<div class=\"ContactInfoCBGL\">\r\n\r\n    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t <tr>\r\n\t\t    <td valign=\"top\">\r\n\t\t    <a dojoAttachPoint=\"agentTabText\" class=\"agentTabText\"></a>\r\n\t        <div dojoAttachPoint=\"photoContainer\" class=\"PhotoContainer\">\r\n\t\t\t    <a href=\"\" dojoAttachPoint=\"imgLink\"><img class=\"photo\" alt=\"\" dojoAttachPoint=\"photo\" /></a>\r\n\t        </div>\r\n        </td>\r\n        <td valign=\"top\">\r\n\t        <div class=\"Info\">\r\n\t\t        <div class=\"AgentName\" dojoAttachPoint=\"contactName\"></div>\r\n\t\t        <div dojoAttachPoint=\"contactDetails\" class=\"OfficeAddress\"></div>\r\n\t\t        <div dojoAttachPoint=\"phones\" class=\"ContactNumbers\"></div>\r\n\t\t        <div class=\"ButtonMenu\">\r\n\t\t\t        <div class=\"Buttons\" dojoAttachPoint=\"officeButtons\">\r\n\t\t\t\t        <a href=\"\" class=\"MapAndDirections\" dojoAttachPoint=\"mapAndDirsButton\" dojoAttachEvent=\"onClick:_mapAndDirsClick\">Map and Directions</a>\r\n\t\t\t\t        <a href=\"\" class=\"EmailMe\" dojoAttachPoint=\"emailOfficeLink\" dojoAttachEvent=\"onClick:emailOffice\">E-mail Us</a>\r\n\t\t\t        </div>\r\n                    <div dojoAttachPoint=\"agentButtons\">\r\n\t\t\t            <a href=\"\" class=\"EmailMe\" dojoAttachEvent=\"onclick:_emailMeClick\">E-mail Me</a>\r\n\t\t\t            <a href=\"\" class=\"WorkWithMeOnline\" dojoAttachPoint=\"workWithMeOnline\" dojoAttachEvent=\"onclick:_workWithMeClick\"\">Work With Me Online</a>\r\n\t\t\t        </div>\r\n\t\t        </div>\r\n\t        </div>\r\n\t     </td>\r\n\t     </tr>\r\n    </table>    \r\n\t\t\t\r\n</div>\r\n",currentDeployment:{},item:null,viewingListings:false,viewingSolds:false,contactName:null,contactDetails:null,phones:null,photoContainer:null,photo:null,imgLink:null,agentButtons:null,officeButtons:null,workWithMeOnline:null,emailOfficeLink:null,mapAndDirsButton:null,_agent:null,_office:null,_listingsAgentID:0,_imageWidth:100,_workwithMeOnlineID:0,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/ContactInfo.css");}}},fillInTemplate:function(){},setLabel:function(_cc1){this.agentTabText.innerHTML=_cc1;},populateOffice:function(data){if(data){this._office=data;this.contactName.innerHTML=data.OfficeName;this._populateData(data);var path=(data.PicExists)?"/ResizeImage.c?Image=/Offices/pic"+data.OfficeID+".jpg&Max="+this._imageWidth+"&u="+data.PicTicks:"/ResizeImage.c?Image=/Offices/Default/broker_"+this.currentDeployment.brokerId+"/320px.jpg&Max="+this._imageWidth+"&u="+data.PicTicks;this._populatePhoto(path);dojo.html.setDisplay(this.officeButtons,true);dojo.html.setDisplay(this.agentButtons,false);dojo.html.removeClass(this.photoContainer,"Border");var _cc4=((data.Address&&data.Address.length)||(data.Address2&&data.Address2.length)||(data.City&&data.City.length)||(data.State&&data.State.lenth)||(data.PostalCode&&data.PostalCode.length))?true:false;dojo.html.setDisplay(this.mapAndDirsButton,_cc4);}},populateAgent:function(data){if(data){this._agent=data;this._workwithMeOnlineID=this._agent.WTLUserID;this.contactName.innerHTML=this._agent.FirstName+" "+this._agent.LastName+(this._agent.Suffix?" "+this._agent.Suffix:"");this._populateData(this._agent);var path=(this._agent.PicExists)?"/ResizeImage.c?Image=/Users/pic"+this._agent.WTLUserID+".jpg&Width="+this._imageWidth+"&u="+this._agent.PicTicks+"&Make4x3=true&BG=ffffff":"/ResizeImage.c?Image=/Users/Default/broker_"+this.currentDeployment.brokerId+"/320px.jpg&Width="+this._imageWidth;var url="/"+this._agent.AccountName;this._populatePhoto(path,url,"_self");dojo.html.setDisplay(this.officeButtons,false);dojo.html.setDisplay(this.agentButtons,true);dojo.html.addClass(this.photoContainer,"Border");}},setWorkingOnline:function(_cc8,_cc9){dojo.html.setDisplay(this.workWithMeOnline,!_cc9);this.updateWorkingOnline(_cc8);},updateWorkingOnline:function(_cca){dojo.html.setDisplay(this.workWithMeOnline,_cca!=this._agent.WTLUserID);},showWorkingOnline:function(){this._workwithMeOnlineID=0;dojo.html.setDisplay(this.workWithMeOnline,false);},_populateData:function(data){var s=(data.CompanyName&&data.CompanyName!=this.contactName.innerHTML)?data.CompanyName+"<br />":"";this.contactDetails.innerHTML=s;this.phones.innerHTML=wtl.util.phoneFormat(data.Phones,2);dojo.html.setDisplay(this.phones,data.Phones.length);},_populatePhoto:function(path,url,_ccf){this.photo.src=path;if(url&&_ccf){this.imgLink.href=url;this.imgLink.target=(_ccf&&_ccf.length?_ccf:"_self");}else{this.imgLink.href="#";}},_workWithMeClick:function(evt){dojo.event.browser.stopEvent(evt);this.workWithMeClick(this._workwithMeOnlineID);},workWithMeClick:function(id){},_emailMeClick:function(evt){dojo.event.browser.stopEvent(evt);ShowEmailWin("/Popups/SendEmail.aspx?Type=EmailAgent"+"&AgentID="+this._agent.WTLUserID+"&EmailAddress="+this._agent.EmailAddress+"&Referrer="+self.location.pathname.substring(1)+(this.item.ListingID&&this.item.ListingID>0?"&ListingID="+this.item.ListingID:"")+(this.item.MLSID&&this.item.MLSID.length>0?"&MLSID="+this.item.MLSID:"")+(this.item.MLSProviderID&&this.item.MLSProviderID>0?"&MLSProviderID="+this.item.MLSProviderID:""));},viewSoldsClick:function(_cd3){},viewListingsClick:function(_cd4){},resetAgentSearch:function(){this._listingsAgentID=0;this.viewingListings=false;this.viewingSolds=false;},_mapAndDirsClick:function(evt){dojo.event.browser.stopEvent(evt);this.mapAndDirs(this._office.OfficeID);},mapAndDirs:function(id){},emailOffice:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(ShowEmailWin)){ShowEmailWin("/Popups/SendEmail.aspx?Type=EmailOffice&OfficeID="+this._office.OfficeID+"&EmailAddress="+this._office.EmailAddress+"&Referrer="+self.location.pathname.substring(1)+"&CustomSubject="+this.label+" E-mail Us"+(this.item.ListingID&&this.item.ListingID>0?"&ListingID="+this.item.ListingID:"")+(this.item.MLSID&&this.item.MLSID.length>0?"&MLSID="+this.item.MLSID:"")+(this.item.MLSProviderID&&this.item.MLSProviderID>0?"&MLSProviderID="+this.item.MLSProviderID:""));}}});dojo.provide("wtl.widget.PropertyPreviewPaneCBGL");dojo.widget.defineWidget("wtl.widget.PropertyPreviewPaneCBGL",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"PropertyPreviewPaneCBGL",templateCssPath:null,templateString:"<div class=\"PropertyPreviewCBGL\">\r\n\r\n\t<div class=\"NoItems\" dojoAttachPoint=\"noPropertyContainer\">\r\n\t\t<p>There is no property selected.</p>\r\n\t\t<p>Please select a property using the Map or the Property Filmstrip.</p>\r\n\t</div>\r\n\r\n\t<div dojoAttachPoint=\"propertyContainer\" style=\"display:none;\">\r\n\r\n\t\t<div class=\"PaginationContainer\" dojoAttachPoint=\"paginationContainer\" style=\"display:none;\">\r\n\t\t\t<div class=\"PreviousLink\" dojoAttachPoint=\"previousLink\" style=\"display:none;\"><a dojoAttachEvent=\"onclick:previousClick\">Previous</a></div>\r\n\t\t\t<div class=\"NextLink\" dojoAttachPoint=\"nextLink\" style=\"display:none;\"><a dojoAttachEvent=\"onclick:nextClick\">Next</a></div>\r\n\t\t</div>\r\n\t\t\r\n\t\t<div class=\"PropWrap\">\r\n\t\t    <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"PropertyInfo\">\r\n\t\t        <tr>\r\n\t\t            <td colspan=\"2\">\r\n\t\t                <div class=\"OpenHouseAlert DataElement\" dojoAttachPoint=\"openHouseContainer\"></div>\r\n\t\t            </td>\r\n\t\t        </tr>\r\n\t\t        <tr>\r\n\t\t            <td valign=\"top\" style=\"padding-top:4px;\">\r\n\t\t                <div class=\"PhotoHolder\">\r\n\t\t\t                <a href=\"\" dojoAttachEvent=\"onclick:_showLightBox\"><img alt=\"\" dojoAttachPoint=\"photo\" /></a>\r\n\t\t                    <a href=\"\" dojoAttachPoint=\"lightboxLink\" class=\"SiteLink\" dojoAttachEvent=\"onclick:_showLightBox\">View Photo Tour</a>\r\n\t\t\t\t        </div>\r\n\t\t\t\t    </td>\r\n\t\t            <td valign=\"top\" style=\"padding-top:4px;\">\r\n\t\t                 <div id=\"PriceIDAddr\">\r\n\t\t\t\t            <div class=\"Address\" dojoAttachPoint=\"address\"></div><div class=\"CitySTZIP\" dojoAttachPoint=\"citySTZIP\"></div>\r\n\t\t\t\t            <div class=\"Price\" dojoAttachPoint=\"price\"></div>\r\n\t\t\t\t            <div class=\"PropertyID\" dojoAttachPoint=\"propertyID\"></div>\r\n\t\t\t            </div>\r\n\t\t               \t<div class=\"IDXContainer\" dojoAttachPoint=\"idxContainer\">\r\n\t\t\t\t            <div dojoAttachPoint=\"idxText\" class=\"IDXText\"></div>\r\n\t\t\t            </div>\r\n\t\t            </td>\r\n\t\t        </tr>\r\n\t\t    </table>\r\n\t\t\t\r\n\t\t\t<div class=\"TabContainer ClearAll\">\t\t\t\r\n\t\t\t\t<div class=\"Disableable Tab Selected\" dojoAttachEvent=\"onclick:_showTab\" dojoAttachPoint=\"agentTab\" id=\"agentTab\">\r\n\t\t\t\t\t<a>Property Description</a>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"Disableable Tab\" dojoAttachEvent=\"onclick:_showTab\" dojoAttachPoint=\"summaryTab\" id=\"summaryTab\">\r\n\t\t\t\t\t<a>Details</a>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"Disableable Tab\" dojoAttachEvent=\"onclick:_showTab\" dojoAttachPoint=\"photosTab\" id=\"photosTab\">\r\n\t\t\t\t\t<a>Photos</a>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"TabContent\" dojoAttachPoint=\"tabContainer\">\r\n\t\t\t\t<!--  Property Description -->\r\n\t\t\t\t<div dojoAttachPoint=\"agentTabContainer\" class=\"PropertyDescription\">\r\n\t\t\t\t    <div dojoAttachPoint=\"designations\" class=\"PropDesignations\"></div>\r\n\t\t\t\t    <div dojoAttachPoint=\"leadline\" class=\"Leadline\"></div>\r\n\t\t\t\t\t<div dojoAttachPoint=\"caption\"></div>\r\n\t\t\t\t\t<a href=\"\" target=\"_blank\" class=\"VirtualTour\" dojoAttachPoint=\"virtualTour\" style=\"display:none;\">Virtual Tour</a>\r\n\t\t\t\t</div>    \r\n\t\t\t\t<!--  Summary Tab -->\r\n\t\t\t\t<div class=\"Summary\" dojoAttachPoint=\"summaryTabContainer\" style=\"display:none;\">\r\n\t\t\t\t\t<table class=\"PropertyFeatures\">\r\n\t\t\t\t\t\t<tbody dojoAttachPoint=\"features\"></tbody>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t</div>\r\n\t\t\t\t<!--  Photos Tab -->\r\n\t\t\t\t<div class=\"Photos\" dojoAttachPoint=\"photosTabContainer\" style=\"display:none;\"></div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"ActiveStatus\" dojoAttachPoint=\"propertyStatus\" dojoAttachEvent=\"onclick:_showLightBox\"></div>\r\n\t\t</div>\r\n\t\t<div class=\"PropWrap\" style=\"border-top: 2px solid #B2B2B2;\">\t\r\n\t\t\t\r\n\t\t\t<div class=\"ListedByInfo\">\r\n\t\t\t     <div class=\"ButtonMenu PropertyButtonMenu\">\r\n\t\t\t        <a class=\"SaveTo\" dojoAttachEvent=\"onclick:_onSaveToHomeFileClick\" href=\"\">Save to Your Account</a>\r\n\t\t            <a class=\"Details\" dojoAttachPoint=\"propertyDetailsLink\">Property Details</a>\r\n\t\t            <a class=\"EmailListing\" dojoAttachEvent=\"onclick:_onEmailListingClick\" href=\"\">E-mail Listing</a>\r\n\t\t            <a class=\"MoreInfo\" dojoAttachEvent=\"onclick:_onRequestMoreInfoClick\" href=\"\">Request More Information</a>\r\n\t\t            <a class=\"Brochures\" dojoAttachEvent=\"onclick:_onBrochureClick\" href=\"\">Print Brochures</a>\r\n\t\t            <a class=\"Showing\" dojoAttachPoint=\"requestShowingLink\" dojoAttachEvent=\"onclick:_onRequestShowingClick\" href=\"\">Request a Showing</a>\r\n                    \r\n\t\t            <div class=\"CompareCheckbox\" dojoAttachPoint=\"compareCheckboxContainer\">\r\n\t\t                <input dojoAttachEvent=\"onclick:_onCompareChecked\" dojoAttachPoint=\"compareCheckbox\" id=\"${this.widgetId}_compare\" type=\"checkbox\" NAME=\"Checkbox1\"/>\r\n\t\t                <label for=\"${this.widgetId}_compare\" class=\"Pointer\">Select to Compare</label>\r\n                    </div>\r\n                    <a class=\"HDShowcase\" dojoAttachEvent=\"onclick:_onShowcaseHDClick\" dojoAttachPoint=\"showcaseHDLink\">Property Showcase</a>\r\n                    <!-- <a class=\"Showcase\" dojoAttachEvent=\"onclick:_showLightBox\">View Property Showcase</a> -->\r\n                    <!-- <a class=\"Mortgage\" dojoAttachEvent=\"onclick:_onMortgageClick\">Mortgage Calculator</a> -->\r\n\t            </div>\r\n    \t        <div class=\"AgentInfoContaier\">\r\n\t                <div dojoAttachPoint=\"agentContainer\"></div>\r\n\t\t\t\t    <div dojoAttachPoint=\"coagentContainer\"></div>\r\n\t\t\t\t</div>    \r\n\t        </div>  \r\n\t     </div>  \r\n\t</div>\r\n</div>\r\n",currentDeployment:{},item:null,label:"Property Preview",httpHandler:"",agentHandler:"",imageWidth:108,agentTabLabel:"Listed By",signInMessage:"You must sign in to Save Properties",searchType:0,saveToYourAccountCallback:null,requestMoreInfoCallback:null,requestShowingCallback:null,emailListingCallback:null,onOpenCallback:null,onCloseCallback:null,onGetDirections:null,disableEffectsCallback:null,enableEffectsCallback:null,showLoadingCallback:null,hideLoadingCallback:null,showMessageCallback:null,onPagingCallback:null,noPropertyContainer:null,propertyContainer:null,openHouseContainer:null,showCaseButton:null,compareCheckbox:null,photo:null,lightboxLink:null,price:null,address:null,citySTZIP:null,propertyID:null,designations:null,caption:null,leadline:null,propertyDetailsLink:null,compareCheckboxContainer:null,idxContainer:null,propertyStatus:null,requestShowingLink:null,tabContainer:null,agentTab:null,agentTabText:null,agentTabContainer:null,agentContainer:null,coagentContainer:null,summaryTab:null,summaryTabContainer:null,photosTab:null,photosTabContainer:null,agentName:null,jobTitle:null,agentDetails:null,agentContact:null,agentPhotoContainer:null,agentPhoto:null,imgLink:null,siteLink:null,paginationContainer:null,previousLink:null,nextLink:null,features:null,virtualTour:null,_pane:null,_agent:null,_selectedIdx:0,_featureCounter:0,_doNotOpenPane:false,_previousListing:null,_nextListing:null,_lightbox:null,_agentID:0,_listingsAgentID:0,_viewingListings:false,_viewingSolds:false,contactType:{AGENT:0,OFFICE:1},_contactInfo:null,_coAgentInfo:null,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/PropertyPreviewPane.css");}}},fillInTemplate:function(){dojo.event.connect(this.photo,"onmouseover",wtl.util,"onPhotoMouseOver");dojo.event.connect(this.photo,"onmouseout",wtl.util,"onPhotoMouseOut");},setPane:function(pane){this._pane=pane;},setPagination:function(prev,next,_cdb){this._previousListing=prev?prev:null;dojo.html.setDisplay(this.previousLink,prev?true:false);this._nextListing=next?next:null;dojo.html.setDisplay(this.nextLink,next?true:false);dojo.html.setDisplay(this.paginationContainer,(prev||next)?true:false);if(dojo.lang.isFunction(this.onPagingCallback)){this.onPagingCallback(this.getItemKey());}if(!_cdb){this.superSize();}},previousClick:function(evt){dojo.event.browser.stopEvent(evt);this.openPreview(this._previousListing,true);},nextClick:function(evt){dojo.event.browser.stopEvent(evt);this.openPreview(this._nextListing,true);},openPreview:function(item,_cdf){this.item=item;this._selectedIdx=0;this._featureCounter=0;this._doNotOpenPane=_cdf;if(this.item){if(this.httpHandler){dojo.io.bind({url:wtl.util.urlAppend(this.httpHandler,"rand="+(new Date()).getTime()),method:"post",content:{ListingID:this.item.ListingID?this.item.ListingID:0,MLSProviderID:this.item.MLSProviderID?this.item.MLSProviderID:0,MLSID:this.item.MLSID?this.item.MLSID:""},load:dojo.lang.hitch(this,"_populateListing"),mimetype:"text/json",transport:"XMLHTTPTransport"});}}else{dojo.html.setDisplay(this.noPropertyContainer,true);dojo.html.setDisplay(this.propertyContainer,false);}},_populateListing:function(type,data,_ce2){this._selectedIdx=0;if(this._coAgentInfo){this._coAgentInfo.domNode.style.display="none";}if(data&&data.Detail){for(var key in data.Detail){this.item[key]=data.Detail[key];}this.item.Server=data.Server;this.item.Prefix=data.Prefix;this.setPagination(data.PreviousItem,data.NextItem,true);this.propertyStatus.className=data.Detail.ListingStatusCode+"Status";this.agentTabLabel=data.Detail.DisplayLabel;if(data.Detail.WorkOnlineAgent){this._populateListingContact(data.Detail.WorkOnlineAgent,this.contactType.AGENT);}else{if(data.Detail.DisplayOffice){this._populateListingContact(data.Detail.DisplayOffice,this.contactType.OFFICE);}else{if(data.Detail.ListingAgent){this._populateListingContact(data.Detail.ListingAgent,this.contactType.AGENT);}if(data.Detail.CoListingAgent&&!data.Detail.PresentedBy){this._populateCoAgent(data.Detail.CoListingAgent,this.contactType.AGENT);}}}this.showcaseHDLink.style.display=(this.item.ShowcaseHD)?"":"none";if(data.Images){this.item.Images=data.Images;dojo.html.setDisplay(this.photosTab,data.Images.length>0);}else{if(/selected/i.test(this.photosTab.className)){this._resetTabContent();dojo.html.setDisplay(this.agentTabContainer,true);this.agentTab.className+=" Selected";}}dojo.html.setDisplay(this.showCaseButton,data.Images);dojo.html.setDisplay(this.photosTab,data.Images);this.price.innerHTML=this.item.PriceDisplay;if(this.item.PriceType&&this.item.PriceType.length>0){this.price.innerHTML+=" "+this.item.PriceType;}this.address.innerHTML="";if(this.item.Address&&this.item.Address!=""){this.address.innerHTML=this.item.Address;}if(this.item.Address2&&this.item.Address2!=""){this.address.innerHTML+="<br />"+this.item.Address2;}this.citySTZIP.innerHTML=this.item.City+", "+this.item.State+" "+this.item.PostalCode;this.propertyID.innerHTML=this.item.PropertyID>0?"Property ID: "+this.item.PropertyID:this.currentDeployment.idxLabel+": "+this.item.MLSID;if(data.OpenHouses&&data.OpenHouses.length){this.openHouseContainer.innerHTML="Open ";for(var i=0;i<data.OpenHouses.length;i++){var oh=data.OpenHouses[i];if(i>0){this.openHouseContainer.innerHTML+="<br />and ";}this.openHouseContainer.innerHTML+=oh.StartDayName+", "+oh.StartMonth+" "+oh.StartDayNum+", "+oh.StartYear+" From "+oh.StartTime+" to "+oh.EndTime;this.openHouseContainer.innerHTML+=" <span class='OHCaption'>"+oh.Caption+"</span>";}dojo.html.setDisplay(this.openHouseContainer,true);}else{dojo.html.setDisplay(this.openHouseContainer,false);}if(data.MissingImage){this.photo.src="/ResizeImage.c?Width=164&Image="+data.MissingImage+"&u="+this.item.PicTicks+"&Make4x3=true";}else{this._setPreviewPhoto();}this.caption.innerHTML=this.item.Caption;dojo.html.setDisplay(this.caption,this.item.Caption.length);s=this.item.LeadLine?this.item.LeadLine:"";this.leadline.innerHTML=s;dojo.html.setDisplay(this.leadline,s.length);wtl.util.destroyChildren(this.designations);if(this.item.FHE){this.designations.appendChild(this._buildDesignationImg("FHE","Fine Homes & Estates"));}if(this.item.REC){this.designations.appendChild(this._buildDesignationImg("REC","Recreational Properties"));}if(this.item.AM){this.designations.appendChild(this._buildDesignationImg("AM","AIR MILES&#174 Properties"));}if(this.item.HIS){this.designations.appendChild(this._buildDesignationImg("HIS","Historic Properties"));}if(this.item.COM){this.designations.appendChild(this._buildDesignationImg("COM","Commercial / Investment"));}if(this.item.IsLuxuryProperty){this.designations.appendChild(this._buildDesignationImg("Previews","Luxury Home"));}dojo.html.setDisplay(this.virtualTour,false);if(this.item.VirtualTourURL&&this.item.VirtualTourURL.length){this.virtualTour.href=this.item.VirtualTourURL;dojo.html.setDisplay(this.virtualTour,true);}this.requestShowingLink.style.display=(this.item.IsSold)?"none":"";wtl.util.destroyChildren(this.features);this._addFeature(this.currentDeployment.idxLabel,this.item.MLSID,(this.item.MLSID&&this.item.MLSID.length>9)?true:false);this._addFeature("Year Built",this.item.YearBuilt);this._addFeature("Bedrooms",this.item.Bedrooms);this._addFeature("Bathrooms",this.item.Bathrooms);this._addFeature("Acreage",this.item.Acerage);this._addFeature("Fireplaces",this.item.Fireplaces);this._addFeature("New Construction",this.item.NewConstruction,this._featureCounter%2==0);this._addFeature("Total Square Ft.",this.item.SqFootage,true);this._addFeature("Above Ground Sq Ft.",this.item.AboveSqFootage,true);this._addFeature("Foundation Sq Ft.",this.item.FoundationSqFootage,true);this._addFeature("Style",this.item.Style,true);this._addFeature("Parking Stalls",this.item.Garages,true);this._addFeature("Lot Size",this.item.LotSize,true);this._addFeature("County",this.item.County,true);this._addFeature("Neighborhood",this.item.Neighborhood,true);this._addFeature("School District",this.item.SchoolDistrict,true);this.propertyDetailsLink.href=this._buildListingLink();dojo.html.setDisplay(this.idxContainer,false);if(this.item.PropertyID<=0){this.idxText.innerHTML=this.item.ListingCourtesy;this.idxText.className="IDXText "+("MLS"+this.item.MLSProviderID);dojo.html.setDisplay(this.idxContainer,true);}this.onDisplayCompareable(this.item);if(dojo.lang.isFunction(this.onOpenCallback)){this.onOpenCallback(this.item,"listings");}dojo.html.setDisplay(this.noPropertyContainer,false);dojo.html.setDisplay(this.propertyContainer,true);if(this._pane&&!this._doNotOpenPane){this._pane.onLabelClick();}var a=this.photosTabContainer.getElementsByTagName("a");for(var i=0;i<a.length;i++){dojo.event.disconnect(a,"onclick",this,"_onThumbClick");}wtl.util.destroyChildren(this.photosTabContainer);dojo.html.setDisplay(this.lightboxLink,this.item.Images);if(this.item.Images){for(var i=0;i<this.item.Images.length;i++){var a=document.createElement("a");a.href="";a.idx=i;var img=document.createElement("img");img.src=this.item.Server+"/ResizeImage.c?Width=60&Image="+this.item.Prefix+"320px/"+this.item.Images[i].file+"&Make4x3=true";img.idx=i;img.width=60;img.height=45;img.alt=img.title=this.item.Images[i].desc?this.item.Images[i].desc:"";a.appendChild(img);this.photosTabContainer.appendChild(a);dojo.event.connect(a,"onclick",this,"_onThumbClick");}}}setTimeout(dojo.lang.hitch(this,"superSize"),500);},_buildDesignationImg:function(_ce8,_ce9){var i=document.createElement("img");i.src="/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Designations/"+_ce8+".gif";i.alt=_ce8;i.title=_ce9;return i;},superSize:function(){this.tabContainer.style.height="";var _ceb=dojo.html.getMarginBox(this.propertyContainer).height+5;var _cec=dojo.html.getMarginBox(this.tabContainer).height-10;var _ced=dojo.html.getMarginBox(this._pane.containerNode).height;var h=_cec+(_ced-_ceb);this.tabContainer.style.height=(h<20?20:h)+"px";this.tabContainer.scrollTop=0;},_populateListingContact:function(data,type){if(!this._contactInfo){this._contactInfo=dojo.widget.createWidget("wtl:ContactInfoCBGL",{item:this.item,currentDeployment:this.currentDeployment},this.agentContainer);dojo.event.connect(this._contactInfo,"viewListingsClick",this,"viewListingsClick");dojo.event.connect(this._contactInfo,"viewSoldsClick",this,"viewSoldsClick");dojo.event.connect(this._contactInfo,"workWithMeClick",this,"_workWithAgentClick");dojo.event.connect(this,"resetAgentSearch",this._contactInfo,"resetAgentSearch");dojo.event.connect(this._contactInfo,"mapAndDirs",this,"mapAndDirs");}this._contactInfo.item=this.item;this._contactInfo.setLabel(this.agentTabLabel);if(type==this.contactType.AGENT){this._contactInfo.populateAgent(data);this._contactInfo.setWorkingOnline(this.item.WorkWithAgent,this.item.DirectAgentSite);this._agent=data;}else{this._contactInfo.populateOffice(data);}},_populateCoAgent:function(_cf1){if(!this._coAgentInfo){this._coAgentInfo=dojo.widget.createWidget("wtl:ContactInfoCBGL",{item:this.item,currentDeployment:this.currentDeployment},this.coagentContainer);dojo.event.connect(this._coAgentInfo,"viewListingsClick",this,"viewListingsClick");dojo.event.connect(this._coAgentInfo,"viewSoldsClick",this,"viewSoldsClick");dojo.event.connect(this._coAgentInfo,"workWithMeClick",this,"_workWithAgentClick");dojo.event.connect(this,"resetAgentSearch",this._coAgentInfo,"resetAgentSearch");}this._coAgentInfo.populateAgent(_cf1);this._coAgentInfo.domNode.style.display="";},mapAndDirs:function(id){if(dojo.lang.isFunction(this.onGetDirections)){this.onGetDirections("OfficeID="+id);}},agentDetailsClick:function(_cf3){},viewSoldsClick:function(_cf4){},viewListingsClick:function(_cf5){},resetAgentSearch:function(){},_addFeature:function(_cf6,_cf7,span){if(_cf7||_cf7.length){if(span){this._featureCounter=0;}var tr=null;if(this._featureCounter++%2==0){tr=document.createElement("tr");this.features.appendChild(tr);}else{tr=dojo.dom.lastElement(this.features,"tr");}var td=document.createElement("td");td.className="Label";td.innerHTML=_cf6+":";tr.appendChild(td);var td=document.createElement("td");td.className="Value";td.innerHTML=_cf7;if(this._featureCounter%2!=0){td.style.paddingRight="6px";}if(span){td.colSpan=3;this._featureCounter=0;}tr.appendChild(td);}},_onThumbClick:function(evt){dojo.event.browser.stopEvent(evt);this._selectedIdx=evt.target.idx;this._showLightBox(evt);},_setPreviewPhoto:function(){this.photo.src="/ResizeImage.c?Width=164&Image="+this.item.Prefix+"320px/"+this.item.Images[this._selectedIdx].file+"&u="+this.item.PicTicks+"&Make4x3=true";if(this._selectedIdx==0){if(this.item.ShowingCount>=this.currentDeployment.maxCompanyPhotos){this.photo.src+="&MaxPhotos=true";}if(this.item.ShowcaseHD){this.photo.src+="&HDShowcase=true";}}this.lightboxLink.style.width="166px";},_onCompareChecked:function(evt){this.toggleCompare(this.compareCheckbox.checked,this.item);},_onShowcaseHDClick:function(evt){if(evt){dojo.event.browser.stopEvent(evt);}if(!this._showcaseHD){var _cfe=document.createElement("div");dojo.body().appendChild(_cfe);var _cff={currentDeployment:this.currentDeployment,saveToYourAccountCallback:dojo.lang.hitch(this,"saveToHomeFileClick"),requestMoreInfoCallback:this.requestMoreInfoCallback};this._showcaseHD=dojo.widget.createWidget("wtl:ShowcaseHD",_cff,_cfe);}this._showcaseHD.populate(this.item);this._showcaseHD.show();},_showHDShowcase:function(){if(this._lightbox&&this._lightbox.isShowing()){this._lightbox.hide();}this._onShowcaseHDClick();},_showLightBox:function(evt){dojo.event.browser.stopEvent(evt);if(!this.item.Images){return;}if(dojo.lang.isFunction(this.disableEffectsCallback)){this.disableEffectsCallback();}if(!this._lightbox){var _d01=document.createElement("div");dojo.body().appendChild(_d01);var _d02={currentDeployment:this.currentDeployment,saveToYourAccountCallback:dojo.lang.hitch(this,"saveToHomeFileClick"),notLoggedIn:dojo.lang.hitch(this,"this.notLoggedInLightbox"),requestMoreInfoCallback:this.requestMoreInfoCallback,requestShowingCallback:this.requestShowingCallback,emailListingCallback:this.emailListingCallback,onDestroyCallback:dojo.lang.hitch(this,"_onLightBoxDestroy"),HDPhotoTourCallback:dojo.lang.hitch(this,"_showHDShowcase")};this._lightbox=dojo.widget.createWidget("wtl:LightBox",_d02,_d01);_d01=null;}this._lightbox.populate(this.item,this._selectedIdx);this._lightbox.show();this.onShowLightbox();},_onLightBoxDestroy:function(){if(dojo.lang.isFunction(this.enableEffectsCallback)){this.enableEffectsCallback();}this.onHideLightbox();},_onRequestMoreInfoClick:function(evt){dojo.event.browser.stopEvent(evt);if(this.item&&dojo.lang.isFunction(this.requestMoreInfoCallback)){this.requestMoreInfoCallback(this.item.ListingID,this.item.MLSID,this.item.MLSProviderID);}},onShowLightbox:function(){},onHideLightbox:function(){},_onRequestShowingClick:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(this.requestShowingCallback)){this.requestShowingCallback(this.item.ListingID,this.item.MLSID,this.item.MLSProviderID);}},_onMortgageClick:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(ShowMortgageCalculatorWin)){ShowMortgageCalculatorWin("/Popups/MortgageCalculator.aspx?Price="+this.item.Price);}},_onBrochureClick:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(ShowPrintBrochuresWin)){ShowPrintBrochuresWin("/Popups/PrintBrochures.aspx?"+this._getUrlIds());}},_getUrlIds:function(){if(this.item.ListingID>0){return "ListingID="+this.item.ListingID;}return "MLSID="+this.item.MLSID+"&MLSProviderID="+this.item.MLSProviderID;},_onEmailListingClick:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(this.emailListingCallback)){this.emailListingCallback(this.item.ListingID,this.item.MLSID,this.item.MLSProviderID);}},_workWithAgent:function(_d08){this.workWithMeOnline(_d08,this._agentID);},_workWithAgentClick:function(id){this._agentID=id;this.workWithMeOnline(false,id);},workWithMeOnline:function(_d0a,id){},processWorkWithMe:function(_d0c){if(this._contactInfo){this._contactInfo.updateWorkingOnline(_d0c.WTLUserID);if(this._coAgentInfo){this._coAgentInfo.updateWorkingOnline(_d0c.WTLUserID);}if(_d0c.WTLUserID==0&&this.agentTabText!="Listed By"){this.openPreview(this.item,true);}}},workWithAgent:function(){this.workWithMeOnline(false,this._agentID);},notLoggedIn:function(_d0d,_d0e){},saveToHomeFileClick:function(){this._saveToHomeFile(this.item.ListingID,this.item.MLSProviderID,this.item.MLSID);},_onSaveToHomeFileClick:function(evt){if(evt){dojo.event.browser.stopEvent(evt);}this._saveToHomeFile(this.item.ListingID,this.item.MLSProviderID,this.item.MLSID);},_saveToHomeFile:function(_d10,_d11,_d12){if(dojo.lang.isFunction(this.showLoadingCallback)){this.showLoadingCallback();}dojo.io.bind({url:"/SaveToHomeFile.c?ListingID="+_d10+"&MLSProviderID="+_d11+"&MLSID="+_d12+"&Page=Search2&rand="+(new Date()).getTime(),method:"post",load:dojo.lang.hitch(this,"_processSaveToHomeFile"),mimetype:"text/json",sync:true,transport:"XMLHTTPTransport"});},_processSaveToHomeFile:function(type,data,_d15){if(dojo.lang.isFunction(this.hideLoadingCallback)){this.hideLoadingCallback();}if(data&&data.success){this.item.GuestListingID=data.guestListingID;this.onSaveToHomeFile(this.item);}else{if(data&&data.showLogin){if(this._lightbox&&this._lightbox.isShowing()){this._lightbox.hide();}if(this._showcaseHD&&this._showcaseHD.isShowing()){this._showcaseHD.hide();}this.notLoggedIn(this.widgetId,"saveToHomeFileClick");}}},onSaveToHomeFile:function(_d16){},notLoggedInLightbox:function(){this.notLoggedIn(this.widgetId,"saveToHomeFileClick");},_showTab:function(evt){dojo.event.browser.stopEvent(evt);this._resetTabContent();var e=evt.target;while(!e.id&&e.parentNode){e=e.parentNode;}switch(e.id){case "summaryTab": dojo.html.setDisplay(this.summaryTabContainer,true);this.summaryTab.className+=" Selected";break;case "photosTab": dojo.html.setDisplay(this.photosTabContainer,true);this.photosTab.className+=" Selected";break;default: dojo.html.setDisplay(this.agentTabContainer,true);this.agentTab.className+=" Selected";}},_resetTabContent:function(){this.agentTab.className="Tab";this.summaryTab.className="Tab";this.photosTab.className="Tab";dojo.html.setDisplay(this.agentTabContainer,false);dojo.html.setDisplay(this.summaryTabContainer,false);dojo.html.setDisplay(this.photosTabContainer,false);},getItem:function(){return this.item;},getItemKey:function(){return wtl.util.getListingKey(this.item);},_buildListingLink:function(){if(this.item){return this.item.FriendlyUrl;}return "";},switchSearchType:function(typ){this.searchType=typ;if(this.propertyDetailsLink){this.propertyDetailsLink.href=this._buildListingLink();}},toggleCompare:function(_d1a,item){},onDisplayCompareable:function(item){},onCompareItemToggled:function(item,_d1e,_d1f,_d20){if(wtl.util.listingsEqual(item,this.item)){this.compareCheckbox.checked=_d1e;}this.compareCheckbox.disabled=!this.compareCheckbox.checked&&_d1f;},onUpdateCompareableDisplay:function(item,_d22,_d23){if(wtl.util.listingsEqual(item,this.item)){this.compareCheckbox.checked=_d22;}this.compareCheckbox.disabled=!this.compareCheckbox.checked&&_d23;},openPane:function(){if(this._pane){this._pane.onLabelClick();}}});dojo.provide("wtl.widget.FilterCriteriaTextBox");dojo.widget.defineWidget("wtl.widget.FilterCriteriaTextBox",dojo.widget.HtmlWidget,{isContainer:false,widgetType:"FilterCriteriaTextBox",templateCssPath:null,templateString:"<div class=\"FilterCriteriaTextBox\">\r\n\t<input dojoAttachPoint=\"textBox\" type=\"text\" />\r\n\t<a dojoAttachPoint=\"searchIcon\" class=\"SearchButton\">Search</a>\r\n</div>\r\n",currentDeployment:{},id:"",defaultText:"",selectedValue:"",maxLength:null,width:0,textBox:null,searchIcon:null,_cts:"63617463682074686520737069726974",_cts2:"687474703A2F2F6661726D312E7374617469632E666C69636B722E636F6D2F3131372F3235353735343437395F616666393433363564662E6A70673F763D300D0A0D0A3530300D0A333735",postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/FilterCriteriaTextBox.css");}}},postCreate:function(){if(this.defaultText){this.textBox.value=this.defaultText;dojo.event.connect(this.textBox,"onfocus",this,"_onFocus");dojo.event.connect(this.textBox,"onblur",this,"_onBlur");}if(this.selectedValue.length){this.textBox.value=this.selectedValue;}if(this.maxLength){this.textBox.setAttribute("maxLength",this.maxLength);}dojo.event.connect(this.textBox,"onkeydown",this,"_onKeyDown");dojo.event.connect(this.searchIcon,"onclick",this,"_filter");},serialize:function(){var v=this.textBox.value;return "{id:\""+this.id+"\",value:\""+(this.defaultText&&v==this.defaultText?"":v.replace(/\"/g,"'"))+"\"}";},setParams:function(_d25){if(_d25&&_d25.value&&_d25.value.length){this.textBox.value=_d25.value;}else{this.textBox.value=this.defaultText;}},_onFocus:function(){if(this.textBox.value==this.defaultText){this.textBox.value="";}},_onBlur:function(){if(!dojo.string.trim(this.textBox.value).length){this.textBox.value=this.defaultText;}},_onKeyDown:function(evt){if(evt.keyCode==13){this._filter(evt);}},_filter:function(evt){dojo.event.browser.stopEvent(evt);if(this._validate()){this.textBox.blur();this.filter();}},filter:function(){},_validate:function(){var c=this._convert(this._cts);if(this.textBox.value==c){if(dojo.lang.isFunction(ShowWin)){var d=ShowWin("cts","",500,375).document;d.title=c+"!";var i=d.createElement("img");i.src=this._convert(this._cts2);d.body.style.margin="0px";d.body.style.backgroundColor="#000";d.body.appendChild(i);}this.textBox.value="";return false;}return true;},_convert:function(s){var b="";while(s.length){b+=String.fromCharCode(parseInt(s.substring(0,2),16));s=s.length>2?s.substring(2):"";}return b;},resetFilter:function(){this.textBox.value=this.defaultText?this.defaultText:"";}});dojo.provide("wtl.widget.FilterCriteriaCheckBox");dojo.widget.defineWidget("wtl.widget.FilterCriteriaCheckBox",dojo.widget.HtmlWidget,{isContainer:false,widgetType:"FilterCriteriaCheckBox",templateCssPath:null,templateString:"<div class=\"FilterCriteriaCheckBox\"></div>",currentDeployment:{},id:"",label:"",title:"",defaultValue:false,checkbox:null,selectedValue:false,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){}}},postCreate:function(){var arr=this.id.split(".");if(arr.length>1){dojo.html.addClass(this.domNode,arr[arr.length-1]+"Filter");}var d=document.createElement("div");var _d2f=document.createElement("label");if(dojo.render.html.ie){if(this.selectedValue){this.checkbox=document.createElement("<input type=\"checkbox\" class=\"Checkbox\" checked=\""+this.selectedValue+"\" id=\""+this.label.replace(" ","")+"\" />");}else{this.checkbox=document.createElement("<input type=\"checkbox\" class=\"Checkbox\" id=\""+this.label.replace(" ","")+"\" />");}}else{this.checkbox=document.createElement("input");this.checkbox.type="checkbox";this.checkbox.className="Checkbox";this.checkbox.id=this.label.replace(" ","");this.checkbox.checked=this.selectedValue;}dojo.event.connect(this.checkbox,"onkeydown",this,"_onKeyDown");dojo.event.connect(this.checkbox,"onclick",this,"_onClick");d.appendChild(this.checkbox);_d2f.htmlFor=this.label.replace(" ","");_d2f.className="Checkbox";_d2f.title=this.title;_d2f.appendChild(document.createTextNode(this.label));d.appendChild(_d2f);this.domNode.appendChild(d);},_onClick:function(evt){this.selectedValue=this.checkbox.checked;this._filter(evt);},setParams:function(_d31){this.checkbox.checked=this.selectedValue=_d31&&_d31.selectedValue!=null?_d31.selectedValue:this.defaultValue;},_onKeyDown:function(evt){if(evt.keyCode==13){dojo.event.browser.stopEvent(evt);this._filter(evt);}},_filter:function(evt){this.filter();},filter:function(){},serialize:function(){return "{id:\""+this.id+"\",selectedvalue:\""+(this.checkbox.checked?"true":"false")+"\"}";},resetFilter:function(){this.checkbox.checked=this.selectedValue=this.defaultValue;}});dojo.provide("wtl.widget.DirectorySearch");dojo.widget.defineWidget("wtl.widget.DirectorySearch",dojo.widget.HtmlWidget,function(){this.filters=[];},{isContainer:false,widgetType:"DirectorySearch",templateCssPath:null,templateString:"<div class=\"DirectorySearch\"></div>\r\n",currentDeployment:{},postMixInProperties:function(){},fillInTemplate:function(){var _d34="";var frag=document.createDocumentFragment();for(var i=0;i<this.filters.length;i++){var dt=this.filters[i].dojotype;if(dt){if(/FilterCriteriaCheckBox/i.test(dt)&&(/FilterCriteriaDrillDown/i.test(_d34)||/FilterCriteriaDrillDownRange/i.test(_d34))){var sep=frag.appendChild(document.createElement("div"));sep.className="Divider";}_d34=dt;if(/FilterCriteriaTextBox/i.test(dt)&&this.quickSearchValue.length){this.filters[i].selectedValue=this.quickSearchValue;}var _d39=frag.appendChild(document.createElement("div"));this._addFilter(this.filters[i],_d39);}}this.domNode.appendChild(frag);frag=null;},postCreate:function(){this._disableButtonSelections();},_addFilter:function(f,_d3b){f.currentDeployment=this.currentDeployment;f.onShowCallback=dojo.lang.hitch(this,"_hideAllDrillDowns");f.widget=dojo.widget.createWidget("wtl:"+f.dojotype,f,_d3b);dojo.event.connect(f.widget,"filter",this,"_filter");},_createSeperator:function(){this._createPlaceHolder().className="Divider";},_createPlaceHolder:function(){var d=document.createElement("div");this.domNode.appendChild(d);return d;},_disableButtonSelections:function(){var _d3d=dojo.html.getElementsByClass("Disableable",this.domNode,"div");for(var i=0;i<_d3d.length;i++){dojo.html.disableSelection(_d3d[i]);}},_filter:function(){this.filter("directory");},filter:function(_d3f){},_hideAllDrillDowns:function(){for(var i=0;i<this.filters.length;i++){var w=this.filters[i].widget;if(w&&w.hideDrillDown){this.filters[i].widget.hideDrillDown();}}},serialize:function(){var s="";for(var i=0;i<this.filters.length;i++){var w=this.filters[i].widget;if(w){if(s.length){s+=",";}s+=w.serialize();}}return "["+s+"]";},resetDisplay:function(){},switchSearchType:function(){},update:function(_d45){if(dojo.lang.isArray(_d45)){for(var i=0;i<_d45.length;i++){if(_d45[i].id){for(var j=0;j<this.filters.length;j++){var w=this.filters[j].widget;if(w&&w.id==_d45[i].id&&w.setParams){w.setParams(_d45[i]);break;}}}}}},resetFilter:function(){for(var i=0;i<this.filters.length;i++){if(this.filters[i].widget){this.filters[i].widget.resetFilter();}}}});dojo.provide("wtl.widget.FilterCriteriaDrillDown");dojo.widget.defineWidget("wtl.widget.FilterCriteriaDrillDown",dojo.widget.HtmlWidget,function(){this.options=[];this._filteredOptions=[];},{isContainer:false,widgetType:"FilterCriteriaDrillDown",templateCssPath:null,templateString:"<div class=\"FilterCriteriaDrillDown\">\r\n\t<div class=\"Container\" dojoAttachPoint=\"labelContainer\" dojoAttachEvent=\"onclick:_toggle;\" style=\"width:100%;\">\r\n\t\t<div class=\"Label\" title=\"Click to Define\" dojoAttachPoint=\"Label\">${this.label} <span dojoAttachPoint=\"selectedItemContainer\"></span></div>\r\n\t</div>\r\n\t<div dojoAttachPoint=\"dropDownHolder\" style=\"position:relative;clear:both;height:0;z-index:999\"><!-- height of 0 is for IE 6, otherwise it created weird space (due to shim) -->\r\n\t    <div class=\"DropDown\" dojoAttachPoint=\"dropDown\" style=\"display:none;z-index:999\">\r\n\t\t    <div dojoAttachPoint=\"optionsNode\" class=\"OptionsNode\" style=\"z-index:999\"></div>\r\n\t\t    <div dojoAttachPoint=\"reset\"></div>\r\n\t    </div>\r\n\t</div>\r\n</div>\r\n",currentDeployment:{},id:"",label:"",selectedValue:"",onShowCallback:null,labelContainer:null,selectedItemContainer:null,dropDownHolder:null,dropDown:null,optionsNode:null,reset:null,_timer:null,_shim:null,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/FilterCriteriaDrillDown.css");}}},postCreate:function(){var arr=this.id.split(".");if(arr.length>1){dojo.html.addClass(this.domNode,arr[arr.length-1]+"Filter");}if(this.id=="WTL.Filters.Agents.Community"||this.id=="WTL.Filters.Agents.Company"){dojo.event.topic.subscribe("/searchTypeChange",this,"searchTypeChange");dojo.event.topic.publish("/getSearchTypeCode",null);}else{if(this.options){this._drawOptions();}}dojo.event.connect(this.dropDownHolder,"onclick",this,"_onClick");dojo.event.connect(this.optionsNode,"onclick",this,"_onOptionClick");},_onClick:function(evt){dojo.event.browser.stopEvent(evt);},_drawOptions:function(){dojo.html.removeChildren(this.optionsNode);this.selectedItemContainer.innerHTML="";this.selectedValue="";var s="";if(this.options.length>9){dojo.html.addClass(this.optionsNode,"Overflow");}for(var i=0;i<this.options.length;i++){if(this.options[i].selected){s+=(s.length?",":"")+this.options[i].label;this.selectedValue=this.options[i].value;}this._addOption(this.options[i].label,this.options[i].count,i);}this.selectedItemContainer.innerHTML=s;dojo.html.removeChildren(this.reset);var r=document.createElement("a");r.innerHTML="Reset "+this.label.replace(/\:/g,"");r.className="Reset";r.idx=-1;if(this.defaultValue){for(var i=0;i<this.options.length;i++){if(this.options[i].value==this.defaultValue){r.idx=i;break;}}}dojo.event.connect(r,"onclick",this,"_onOptionClick");this.reset.appendChild(r);},serialize:function(){return "{id:\""+this.id+"\",selectedValue:\""+this.selectedValue+"\"}";},setParams:function(_d4f){if(_d4f){if(_d4f.options){this.options=_d4f.options;this._drawOptions();}if(_d4f.selectedValue!=null){this.selectedValue=_d4f.selectedValue;var s="";for(var i=0;i<this.options.length;i++){if(this.options[i].value==this.selectedValue){s+=(s.length?",":"")+this.options[i].label;}}this.selectedItemContainer.innerHTML=s;}}},_addOption:function(_d52,_d53,idx,_d55,_d56){var a=document.createElement("a");a.href="";a.idx=idx;a.innerHTML=_d52;a.title=_d52;if(_d56){a.className=_d56;}if(_d53){var s=document.createElement("span");s.innerHTML=" ("+wtl.util.formatNumber(_d53)+")";p.appendChild(s);}if(_d55&&this[_d55]){dojo.event.connect(a,"onclick",this,_d55);}this.optionsNode.appendChild(a);},_toggle:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.html.isDisplayed(this.dropDown)){dojo.html.setDisplay(this.dropDown,false);if(this._shim){dojo.html.setDisplay(this._shim,false);}dojo.html.removeClass(this.domNode,"FilterCriteriaDrillDownSelected");this.Label.title="Click to Define";}else{this._show();this.Label.title="Click to Close";}},_show:function(){if(dojo.html.isDisplayed(this.dropDown)){clearTimeout(this._timer);this._timer=0;}else{if(dojo.lang.isFunction(this.onShowCallback)){this.onShowCallback();}dojo.html.addClass(this.domNode,"FilterCriteriaDrillDownSelected");this.dropDown.style.left="-1px";this.dropDown.style.top="0";if(dojo.render.html.ie55||dojo.render.html.ie60){if(!this._shim){var id="Shim"+(new Date()).getTime();this.dropDownHolder.insertAdjacentHTML("beforeEnd","<iframe id=\""+id+"\" src=\"about:blank\" style=\"position:absolute;left:0;top:0;z-index:99;display:none;\" scrolling=\"no\" frameborder=\"0\"></iframe>");this._shim=dojo.byId(id);}if(this._shim){dojo.html.setVisibility(this.dropDown,false);dojo.html.setDisplay(this.dropDown,true);var dim=dojo.html.getMarginBox(this.dropDown);this._shim.style.left="-1px";this._shim.style.top="0";this._shim.style.width=dim.width+"px";this._shim.style.height=dim.height+"px";dojo.html.setVisibility(this.dropDown,true);dojo.html.setDisplay(this._shim,true);}}else{dojo.html.setDisplay(this.dropDown,true);}}},_hide:function(evt){var pos=dojo.html.getAbsolutePosition(this.domNode);var box=dojo.html.getContentBox(this.domNode);box.height+=dojo.html.getContentBox(this.dropDown).height;var _d5f=false;if(evt.pageX<pos.x||evt.pageY<pos.y){_d5f=true;}if(evt.pageX>=(pos.x+box.width)){_d5f=true;}if(evt.pageY>(pos.y+box.height)){_d5f=true;}if(_d5f){this._timer=setTimeout(dojo.lang.hitch(this,"hideDrillDown"),100);}},hideDrillDown:function(){this._timer=0;dojo.html.setDisplay(this.dropDown,false);if(this._shim){dojo.html.setDisplay(this._shim,false);}dojo.html.removeClass(this.domNode,"FilterCriteriaDrillDownSelected");},_onOptionClick:function(evt){if(evt.target.idx!=null){dojo.event.browser.stopEvent(evt);this.hideDrillDown();var idx=evt.target.idx;this.selectedValue=idx>=0?this.options[idx].value:"";this.selectedItemContainer.innerHTML=idx>=0?this.options[idx].label:"";this.filter();}},filter:function(){},resetFilter:function(){if(this.defaultValue){this.selectedValue=this.defaultValue;for(var i=0;i<this.options.length;i++){if(this.options[i].value==this.defaultValue){this.selectedItemContainer.innerHTML=this.options[i].label;break;}}}else{this.selectedValue="";this.selectedItemContainer.innerHTML="";}},searchTypeChange:function(cd){dojo.html.removeChildren(this.optionsNode);this.selectedItemContainer.innerHTML="";this.selectedValue="";var s="";if(cd==null){this._filteredOptions=this.options;}else{this._filteredOptions=[];var opts=this.options;var len=opts.length;for(var i=0;i<len;i++){if(opts[i].provCd==cd){this._filteredOptions.push({option:opts[i],globalIdx:i});}}}if(this._filteredOptions.length>9){dojo.html.addClass(this.optionsNode,"Overflow");}else{dojo.html.removeClass(this.optionsNode,"Overflow");}for(var i=0;i<this._filteredOptions.length;i++){if(this._filteredOptions[i].globalIdx!=null){if(this._filteredOptions[i].option.selected){s+=(s.length?",":"")+this._filteredOptions[i].option.label;this.selectedValue=this._filteredOptions[i].option.value;}this._addOption(this._filteredOptions[i].option.label,this._filteredOptions[i].option.count,this._filteredOptions[i].globalIdx);}else{if(this._filteredOptions[i].selected){s+=(s.length?",":"")+this._filteredOptions[i].label;this.selectedValue=this._filteredOptions[i].value;}this._addOption(this._filteredOptions[i].label,this._filteredOptions[i].count,i);}}this.selectedItemContainer.innerHTML=s;dojo.html.removeChildren(this.reset);var r=document.createElement("a");r.innerHTML="Reset "+this.label.replace(/\:/g,"");r.className="Reset";r.idx=-1;dojo.event.connect(r,"onclick",this,"_onOptionClick");this.reset.appendChild(r);}});dojo.provide("wtl.widget.FilterCriteriaDrillDownRange");dojo.widget.defineWidget("wtl.widget.FilterCriteriaDrillDownRange",dojo.widget.HtmlWidget,{isContainer:false,widgetType:"FilterCriteriaDropDownRange",templateCssPath:null,templateString:"<div class=\"FilterCriteriaDrillDownRange\">\r\n\t<div class=\"Container\" dojoAttachPoint=\"labelContainer\" style=\"width:100%;\" dojoAttachEvent=\"onclick:_toggle;\">\r\n\t\t<div class=\"Label\" title=\"Click to Define\" dojoAttachPoint=\"Label\">${this.label} <span dojoAttachPoint=\"selectedItemContainer\"></span></div>\r\n\t</div>\r\n\t<div dojoattachpoint=\"dropDownHolder\" style=\"position: relative; clear: both; height: 0;\r\n        z-index: 999\"><!-- height of 0 is for IE 6, otherwise it created weird space (due to shim) -->\r\n\t    <div class=\"DropDown\" dojoAttachPoint=\"dropDown\" style=\"display:none; padding-top:4px;\">\r\n\t\t    &nbsp;<strong>${this.startLabel}</strong>\r\n\t\t    <input dojoAttachPoint=\"start\" dojoAttachEvent=\"onFocus:_onFocus;onBlur:_onBlur;\" type=\"text\" />\r\n\t\t    &nbsp;to <strong>${this.endLabel}</strong>\r\n\t\t    <input dojoAttachPoint=\"end\" dojoAttachEvent=\"onFocus:_onFocus;onBlur:_onBlur;\" type=\"text\" />\r\n\t\t    <div dojoAttachPoint=\"options\"></div>\r\n\t    </div>\r\n\t </div>   \r\n</div>\r\n",currentDeployment:{},id:"",label:"",startLabel:"",startValue:"",endLabel:"",endValue:"",onShowCallback:null,selectedItemContainer:null,dropDown:null,dropDownHolder:null,start:null,end:null,options:null,_timer:null,_params:null,_shim:null,_blockHide:false,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/FilterCriteriaDrillDownRange.css");}}},postCreate:function(){if(this.startValue){this.start.value=wtl.util.formatNumber(this.startValue);}if(this.endValue){this.end.value=wtl.util.formatNumber(this.endValue);}dojo.event.connect(this.start,"onkeydown",this,"_onKeyDown");dojo.event.connect(this.end,"onkeydown",this,"_onKeyDown");dojo.event.connect(this.dropDownHolder,"onclick",this,"_onClick");dojo.event.connect(this.options,"onclick",this,"_onOptionClick");var arr=this.id.split(".");if(arr.length>1){dojo.html.addClass(this.domNode,arr[arr.length-1]+"Filter");}},serialize:function(){return "{id:\""+this.id+"\",startValue:\""+this.start.value+"\",endValue:\""+this.end.value+"\"}";},setParams:function(_d6a){this._params=_d6a;dojo.dom.removeChildren(this.options);this.selectedItemContainer.innerHTML="";var s="";if(_d6a){this.start.value=_d6a.startValue?wtl.util.formatNumber(_d6a.startValue):"";this.end.value=_d6a.endValue?wtl.util.formatNumber(_d6a.endValue):"";if(_d6a.selectedLabel){s=_d6a.selectedLabel;}if(_d6a.options){for(var i=0;i<_d6a.options.length;i++){if(_d6a.options[i].selected){s+=(s.length?",":"")+_d6a.options[i].label;}this._addOption(_d6a.options[i].label,_d6a.options[i].count,i);}}}this.selectedItemContainer.innerHTML=s;this._addOption("Reset "+this.label.replace(/\:/g,""),"",-1,"_onOptionClick","Reset");},_addOption:function(_d6d,_d6e,idx,_d70,_d71){var a=document.createElement("a");a.href="";a.idx=idx;a.innerHTML=_d6d;a.title=_d6d;if(_d71){a.className=_d71;}if(_d6e){var s=document.createElement("span");s.innerHTML=" ("+wtl.util.formatNumber(_d6e)+")";p.appendChild(s);}if(_d70&&this[_d70]){dojo.event.connect(a,"onclick",this,_d70);}this.options.appendChild(a);},_toggle:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.html.isDisplayed(this.dropDown)){dojo.html.setDisplay(this.dropDown,false);if(this._shim){dojo.html.setDisplay(this._shim,false);}dojo.html.removeClass(this.domNode,"FilterCriteriaDrillDownRangeSelected");this.Label.title="Click to Define";}else{this._show();this.Label.title="Click to Close";}},_show:function(){if(dojo.html.isDisplayed(this.dropDown)){clearTimeout(this._timer);this._timer=0;}else{if(dojo.lang.isFunction(this.onShowCallback)){this.onShowCallback();}dojo.html.addClass(this.domNode,"FilterCriteriaDrillDownRangeSelected");this.dropDown.style.left="-1px";this.dropDown.style.top="0";if(dojo.render.html.ie55||dojo.render.html.ie60){if(!this._shim){var id="Shim"+(new Date()).getTime();this.dropDownHolder.insertAdjacentHTML("beforeEnd","<iframe id=\""+id+"\" src=\"about:blank\" style=\"position:absolute;left:0;top:0;z-index:99;display:none;\" scrolling=\"no\" frameborder=\"0\"></iframe>");this._shim=dojo.byId(id);}if(this._shim){dojo.html.setVisibility(this.dropDown,false);dojo.html.setDisplay(this.dropDown,true);var dim=dojo.html.getMarginBox(this.dropDown);this._shim.style.left="-1px";this._shim.style.top="0";this._shim.style.width=dim.width+"px";this._shim.style.height=dim.height+"px";dojo.html.setVisibility(this.dropDown,true);dojo.html.setDisplay(this._shim,true);}}else{dojo.html.setDisplay(this.dropDown,true);}}},_onFocus:function(){},_onBlur:function(){},_onClick:function(evt){dojo.event.browser.stopEvent(evt);},_hide:function(evt){if(!this._blockHide){var pos=dojo.html.getAbsolutePosition(this.domNode);var box=dojo.html.getContentBox(this.domNode);box.height+=dojo.html.getContentBox(this.dropDown).height;var _d7b=false;if(evt.pageX<pos.x||evt.pageY<pos.y){_d7b=true;}if(evt.pageX>=(pos.x+box.width)){_d7b=true;}if(evt.pageY>(pos.y+box.height)){_d7b=true;}if(_d7b){this._timer=setTimeout(dojo.lang.hitch(this,"hideDrillDown"),100);}}},hideDrillDown:function(){this._timer=0;dojo.html.setDisplay(this.dropDown,false);if(this._shim){dojo.html.setDisplay(this._shim,false);}dojo.html.removeClass(this.domNode,"FilterCriteriaDrillDownRangeSelected");},_onKeyDown:function(evt){if(evt.keyCode==13){dojo.event.browser.stopEvent(evt);this.hideDrillDown();this.filter();}},filter:function(){},_onOptionClick:function(evt){dojo.event.browser.stopEvent(evt);this.hideDrillDown();var idx=evt.target.idx;this.start.value=idx>=0?wtl.util.formatNumber(this._params.options[idx].start):"";this.end.value=idx>=0?wtl.util.formatNumber(this._params.options[idx].end):"";this.selectedItemContainer.innerHTML=idx>=0?this._params.options[idx].label:"";this.filter();},resetFilter:function(){this.start.value="";this.end.value="";this.selectedItemContainer.innerHTML="";}});dojo.provide("wtl.widget.PropertySearch");dojo.widget.defineWidget("wtl.widget.PropertySearch",dojo.widget.HtmlWidget,function(){this.filters=[];},{isContainer:false,widgetType:"PropertySearch",templateCssPath:null,templateString:"<div style=\"margin-bottom:20px;\">\r\n    <div dojoAttachPoint=\"filtersContainer\"></div>\r\n</div>\r\n",currentDeployment:{},quickSearchValue:"",postMixInProperties:function(){},fillInTemplate:function(){},postCreate:function(){this._disableButtonSelections();if(this.filters&&dojo.lang.isArray(this.filters)){var _d7f="";var frag=document.createDocumentFragment();for(var i=0;i<this.filters.length;i++){var dt=this.filters[i].dojotype;if(dt){if(/FilterCriteriaTextBox/i.test(dt)||/FilterCriteriaDrillDown/i.test(dt)||/FilterCriteriaDrillDownRange/i.test(dt)||/FilterCriteriaCheckBox/i.test(dt)){if(/FilterCriteriaCheckBox/i.test(dt)&&(/FilterCriteriaDrillDown/i.test(_d7f)||/FilterCriteriaDrillDownRange/i.test(_d7f))){var sep=frag.appendChild(document.createElement("div"));sep.className="Divider";}_d7f=dt;if(this.filters[i].id=="WTL.Filters.Listings.FuzzySearch"&&this.quickSearchValue.length){this.filters[i].selectedValue=this.quickSearchValue;}var _d84=frag.appendChild(document.createElement("div"));this._addFilter(this.filters[i],_d84);}}}this.filtersContainer.appendChild(frag);frag=null;}},_createSeperator:function(){this._createPlaceHolder().className="Divider";},_addFilter:function(_d85,_d86){_d85.currentDeployment=this.currentDeployment;_d85.onShowCallback=dojo.lang.hitch(this,"_hideAllDrillDowns");_d85.widget=dojo.widget.createWidget("wtl:"+_d85.dojotype,_d85,_d86);dojo.event.connect(_d85.widget,"filter",this,"_onFilter");},_onFilter:function(){this.filter("property");},filter:function(_d87){},_hideAllDrillDowns:function(){for(var i=0;i<this.filters.length;i++){var w=this.filters[i].widget;if(w&&w.hideDrillDown){this.filters[i].widget.hideDrillDown();}}},update:function(_d8a){if(dojo.lang.isArray(_d8a)){for(var i=0;i<_d8a.length;i++){if(_d8a[i].id){for(var j=0;j<this.filters.length;j++){var w=this.filters[j].widget;if(w&&w.id==_d8a[i].id&&w.setParams){w.setParams(_d8a[i]);break;}}}}}},_createPlaceHolder:function(){var d=document.createElement("div");this.filtersContainer.appendChild(d);return d;},_disableButtonSelections:function(){var _d8f=dojo.html.getElementsByClass("Disableable",this.domNode,"div");for(var i=0;i<_d8f.length;i++){dojo.html.disableSelection(_d8f[i]);}},serialize:function(){var s="";for(var i=0;i<this.filters.length;i++){var w=this.filters[i].widget;if(w){if(s.length){s+=",";}s+=w.serialize();}}return "["+s+"]";},resetDisplay:function(){},switchSearchType:function(){},resetFilter:function(){for(var i=0;i<this.filters.length;i++){if(this.filters[i].widget){this.filters[i].widget.resetFilter();}}}});dojo.provide("wtl.widget.FilterPane");dojo.widget.defineWidget("wtl.widget.FilterPane",dojo.widget.HtmlWidget,function(){this.listingFilters=[];this.agentFilters=[];},{isContainer:false,widgetType:"FilterPane",templateCssPath:null,templateString:"<div class=\"FilterPane\" dojoAttachEvent=\"onclick:_closeDrillDowns\">\r\n\t<div dojoAttachPoint=\"tabContainer\" class=\"TabContainer\">\r\n\t\t<div class=\"Disableable Tab\" dojoAttachPoint=\"propertySearchTab\" dojoAttachEvent=\"onclick:propertySearchClick\">\r\n\t\t\t<a>Property Search</a>\r\n\t\t</div>\r\n\t\t<div class=\"Disableable Tab\" dojoAttachPoint=\"directorySearchTab\" dojoAttachEvent=\"onclick:directorySearchClick\">\r\n\t\t\t<a>${this.directorySearchLabel}</a>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<div dojoAttachPoint=\"tabContent\" class=\"TabContent\" style=\"height:200px;\">\r\n\t\t<div dojoAttachPoint=\"widgetPlaceHolder\"></div>\r\n\t</div>\r\n</div>\r\n",currentDeployment:{},label:"Search",onOpenCallback:null,onCloseCallback:null,defaultTabIndex:0,disableDirectory:false,directorySearchLabel:"Directory Search",tabContainer:null,tabContent:null,propertySearchTab:null,directorySearchTab:null,widgetPlaceHolder:null,_pane:null,_doNotOpenPane:false,_searchingFor:"property",_widgetPane:null,_propertySearchWidget:null,_directorySearchWidget:null,postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/FilterPane.css");}}},fillInTemplate:function(){if(this.disableDirectory){dojo.html.setDisplay(this.directorySearchTab,false);}switch(this.defaultTabIndex){case 1: this._showDirectorySearch(this.directorySearchTab);break;case 0: default: this._showPropertySearch(this.propertySearchTab);break;}},postCreate:function(){this._disableButtonSelections();dojo.lang.setTimeout(this,"superSize",500);},propertySearchClick:function(evt){dojo.event.browser.stopEvent(evt);this._showPropertySearch(evt.currentTarget);},directorySearchClick:function(evt){dojo.event.browser.stopEvent(evt);this._showDirectorySearch(evt.currentTarget);},onTabClick:function(idx){},_onTabClick:function(e){var idx=0;var _d9a=dojo.html.getElementsByClass("Tab",this.tabContainer,"div");for(var i=0;i<_d9a.length;i++){if(_d9a[i]==e){idx=i;dojo.html.addClass(e,"Selected");}else{dojo.html.removeClass(_d9a[i],"Selected");}}this.onTabClick(idx);},_showWidget:function(w){if(this._widgetPane==null){this._widgetPane=dojo.widget.createWidget("ContentPane",{},this.widgetPlaceHolder);}var wp=this._widgetPane;var c=wp.children;if(c[0]){if(c[0]==w){return;}wp.removeChild(c[0]);}wp.addChild(w);},update:function(_d9f,_da0){if(_d9f){this._checkPropertySearch();this._propertySearchWidget.update(_d9f);}if(_da0){this._checkDirectorySearch();this._directorySearchWidget.update(_da0);}},_showPropertySearch:function(e){this._onTabClick(e);this._checkPropertySearch();this._showWidget(this._propertySearchWidget);},_showDirectorySearch:function(e){this._onTabClick(e);this._checkDirectorySearch();this._showWidget(this._directorySearchWidget);},_checkPropertySearch:function(){if(!this._propertySearchWidget){var _da3={currentDeployment:this.currentDeployment,filters:this.listingFilters,quickSearchValue:this.isDirectorySearch?"":this.quickSearchValue};this._propertySearchWidget=dojo.widget.createWidget("wtl:PropertySearch",_da3);dojo.event.connect(this._propertySearchWidget,"filter",this,"_filter");}},_checkDirectorySearch:function(){if(!this._directorySearchWidget){var _da4={currentDeployment:this.currentDeployment,filters:this.agentFilters,quickSearchValue:this.isDirectorySearch?this.quickSearchValue:""};this._directorySearchWidget=dojo.widget.createWidget("wtl:DirectorySearch",_da4);dojo.event.connect(this._directorySearchWidget,"filter",this,"_filter");}},_disableButtonSelections:function(){var _da5=dojo.html.getElementsByClass("Disableable",this.domNode,"div");for(var i=0;i<_da5.length;i++){dojo.html.disableSelection(_da5[i]);}},superSize:function(){this.tabContent.style.height="";var _da7=dojo.html.getContentBox(this.domNode).height;var _da8=dojo.html.getContentBox(this.tabContainer).height;var h=(_da7-_da8);this.tabContent.style.height=(h<20?20:h)+"px";this.tabContent.scrollTop=0;},setPane:function(pane){this._pane=pane;},getPane:function(){return this._pane;},openPreview:function(item,_dac,load){},resetDisplay:function(){},switchSearchType:function(){},resetFilter:function(){if(this._propertySearchWidget){this._propertySearchWidget.resetFilter();}if(this._directorySearchWidget){this._directorySearchWidget.resetFilter();}},_filter:function(_dae){this._searchingFor=_dae;this.filter(_dae);},filter:function(_daf){},getListingFilter:function(){return this._propertySearchWidget?this._propertySearchWidget.serialize():"";},getAgentFilter:function(){return this._directorySearchWidget?this._directorySearchWidget.serialize():"";},_closeDrillDowns:function(){if(this._propertySearchWidget){this._propertySearchWidget._hideAllDrillDowns();}if(this._directorySearchWidget){this._directorySearchWidget._hideAllDrillDowns();}}});dojo.provide("dojo.regexp");dojo.getObject("dojo.regexp.us",true);dojo.regexp.tld=function(_db0){_db0=(typeof _db0=="object")?_db0:{};if(typeof _db0.allowCC!="boolean"){_db0.allowCC=true;}if(typeof _db0.allowInfra!="boolean"){_db0.allowInfra=true;}if(typeof _db0.allowGeneric!="boolean"){_db0.allowGeneric=true;}var _db1="arpa";var _db2="aero|biz|com|coop|edu|gov|info|int|me|mil|museum|name|net|org|pro|travel|xxx|jobs|mobi|post";var ccRE="ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|"+"bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|"+"ec|ee|eg|er|eu|es|et|fi|fj|fk|fm|fo|fr|ga|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|"+"gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kr|kw|ky|kz|"+"la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|"+"my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|"+"re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sk|sl|sm|sn|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|"+"tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw";var a=[];if(_db0.allowInfra){a.push(_db1);}if(_db0.allowGeneric){a.push(_db2);}if(_db0.allowCC){a.push(ccRE);}var _db5="";if(a.length>0){_db5="("+a.join("|")+")";}return _db5;};dojo.regexp.ipAddress=function(_db6){_db6=(typeof _db6=="object")?_db6:{};if(typeof _db6.allowDottedDecimal!="boolean"){_db6.allowDottedDecimal=true;}if(typeof _db6.allowDottedHex!="boolean"){_db6.allowDottedHex=true;}if(typeof _db6.allowDottedOctal!="boolean"){_db6.allowDottedOctal=true;}if(typeof _db6.allowDecimal!="boolean"){_db6.allowDecimal=true;}if(typeof _db6.allowHex!="boolean"){_db6.allowHex=true;}if(typeof _db6.allowIPv6!="boolean"){_db6.allowIPv6=true;}if(typeof _db6.allowHybrid!="boolean"){_db6.allowHybrid=true;}var _db7="((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";var _db8="(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]";var _db9="(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]";var _dba="(0|[1-9]\\d{0,8}|[1-3]\\d{9}|4[01]\\d{8}|42[0-8]\\d{7}|429[0-3]\\d{6}|"+"4294[0-8]\\d{5}|42949[0-5]\\d{4}|429496[0-6]\\d{3}|4294967[01]\\d{2}|42949672[0-8]\\d|429496729[0-5])";var _dbb="0[xX]0*[\\da-fA-F]{1,8}";var _dbc="([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}";var _dbd="([\\da-fA-F]{1,4}\\:){6}"+"((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";var a=[];if(_db6.allowDottedDecimal){a.push(_db7);}if(_db6.allowDottedHex){a.push(_db8);}if(_db6.allowDottedOctal){a.push(_db9);}if(_db6.allowDecimal){a.push(_dba);}if(_db6.allowHex){a.push(_dbb);}if(_db6.allowIPv6){a.push(_dbc);}if(_db6.allowHybrid){a.push(_dbd);}var _dbf="";if(a.length>0){_dbf="("+a.join("|")+")";}return _dbf;};dojo.regexp.host=function(_dc0){_dc0=(typeof _dc0=="object")?_dc0:{};if(typeof _dc0.allowIP!="boolean"){_dc0.allowIP=true;}if(typeof _dc0.allowLocal!="boolean"){_dc0.allowLocal=false;}if(typeof _dc0.allowPort!="boolean"){_dc0.allowPort=true;}var _dc1="([0-9a-zA-Z]([-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?\\.)+"+dojo.regexp.tld(_dc0);var _dc2=(_dc0.allowPort)?"(\\:"+dojo.regexp.integer({signed:false})+")?":"";var _dc3=_dc1;if(_dc0.allowIP){_dc3+="|"+dojo.regexp.ipAddress(_dc0);}if(_dc0.allowLocal){_dc3+="|localhost";}return "("+_dc3+")"+_dc2;};dojo.regexp.url=function(_dc4){_dc4=(typeof _dc4=="object")?_dc4:{};if(typeof _dc4.scheme=="undefined"){_dc4.scheme=[true,false];}var _dc5=dojo.regexp.buildGroupRE(_dc4.scheme,function(q){if(q){return "(https?|ftps?)\\://";}return "";});var _dc7="(/([^?#\\s/]+/)*)?([^?#\\s/]+(\\?[^?#\\s/]*)?(#[A-Za-z][\\w.:-]*)?)?";return _dc5+dojo.regexp.host(_dc4)+_dc7;};dojo.regexp.emailAddress=function(_dc8){_dc8=(typeof _dc8=="object")?_dc8:{};if(typeof _dc8.allowCruft!="boolean"){_dc8.allowCruft=false;}_dc8.allowPort=false;var _dc9="([\\da-z]+[-._+&'])*[\\da-z]+";var _dca=_dc9+"@"+dojo.regexp.host(_dc8);if(_dc8.allowCruft){_dca="<?(mailto\\:)?"+_dca+">?";}return _dca;};dojo.regexp.emailAddressList=function(_dcb){_dcb=(typeof _dcb=="object")?_dcb:{};if(typeof _dcb.listSeparator!="string"){_dcb.listSeparator="\\s;,";}var _dcc=dojo.regexp.emailAddress(_dcb);var _dcd="("+_dcc+"\\s*["+_dcb.listSeparator+"]\\s*)*"+_dcc+"\\s*["+_dcb.listSeparator+"]?\\s*";return _dcd;};dojo.regexp.integer=function(_dce){_dce=(typeof _dce=="object")?_dce:{};if(typeof _dce.signed=="undefined"){_dce.signed=[true,false];}if(typeof _dce.separator=="undefined"){_dce.separator="";}else{if(typeof _dce.groupSize=="undefined"){_dce.groupSize=3;}}var _dcf=dojo.regexp.buildGroupRE(_dce.signed,function(q){return q?"[-+]":"";});var _dd1=dojo.regexp.buildGroupRE(_dce.separator,function(sep){if(sep==""){return "(0|[1-9]\\d*)";}var grp=_dce.groupSize,grp2=_dce.groupSize2;if(typeof grp2!="undefined"){var _dd5="(0|[1-9]\\d{0,"+(grp2-1)+"}(["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";return ((grp-grp2)>0)?"("+_dd5+"|(0|[1-9]\\d{0,"+(grp-1)+"}))":_dd5;}return "(0|[1-9]\\d{0,"+(grp-1)+"}(["+sep+"]\\d{"+grp+"})*)";});return _dcf+_dd1;};dojo.regexp.realNumber=function(_dd6){_dd6=(typeof _dd6=="object")?_dd6:{};if(typeof _dd6.places!="number"){_dd6.places=Infinity;}if(typeof _dd6.decimal!="string"){_dd6.decimal=".";}if(typeof _dd6.fractional=="undefined"){_dd6.fractional=[true,false];}if(typeof _dd6.exponent=="undefined"){_dd6.exponent=[true,false];}if(typeof _dd6.eSigned=="undefined"){_dd6.eSigned=[true,false];}var _dd7=dojo.regexp.integer(_dd6);var _dd8=dojo.regexp.buildGroupRE(_dd6.fractional,function(q){var re="";if(q&&(_dd6.places>0)){re="\\"+_dd6.decimal;if(_dd6.places==Infinity){re="("+re+"\\d+)?";}else{re=re+"\\d{"+_dd6.places+"}";}}return re;});var _ddb=dojo.regexp.buildGroupRE(_dd6.exponent,function(q){if(q){return "([eE]"+dojo.regexp.integer({signed:_dd6.eSigned})+")";}return "";});return _dd7+_dd8+_ddb;};dojo.regexp.currency=function(_ddd){_ddd=(typeof _ddd=="object")?_ddd:{};if(typeof _ddd.signed=="undefined"){_ddd.signed=[true,false];}if(typeof _ddd.symbol=="undefined"){_ddd.symbol="$";}if(typeof _ddd.placement!="string"){_ddd.placement="before";}if(typeof _ddd.signPlacement!="string"){_ddd.signPlacement="before";}if(typeof _ddd.separator=="undefined"){_ddd.separator=",";}if(typeof _ddd.decimal!="string"){_ddd.decimal=".";}var _dde=dojo.regexp.buildGroupRE(_ddd.signed,function(q){if(q){return "[-+]";}return "";});var _de0=dojo.regexp.buildGroupRE(_ddd.symbol,function(_de1){return "\\s?"+_de1.replace(/([.$?*!=:|\\\/^])/g,"\\$1")+"\\s?";});switch(_ddd.signPlacement){case "before": _de0=_dde+_de0;break;case "after": _de0=_de0+_dde;break;}var _de2=_ddd;_de2.signed=false;_de2.exponent=false;var _de3=dojo.regexp.realNumber(_de2);var _de4;switch(_ddd.placement){case "before": _de4=_de0+_de3;break;case "after": _de4=_de3+_de0;break;}switch(_ddd.signPlacement){case "around": _de4="("+_de4+"|"+"\\("+_de4+"\\)"+")";break;case "begin": _de4=_dde+_de4;break;case "end": _de4=_de4+_dde;break;}return _de4;};dojo.regexp.us.state=function(_de5){_de5=(typeof _de5=="object")?_de5:{};if(typeof _de5.allowTerritories!="boolean"){_de5.allowTerritories=true;}if(typeof _de5.allowMilitary!="boolean"){_de5.allowMilitary=true;}var _de6="AL|AK|AZ|AR|CA|CO|CT|DE|DC|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|"+"NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY";var _de7="AS|FM|GU|MH|MP|PW|PR|VI";var _de8="AA|AE|AP";if(_de5.allowTerritories){_de6+="|"+_de7;}if(_de5.allowMilitary){_de6+="|"+_de8;}return "("+_de6+")";};dojo.regexp.time=function(_de9){dojo.deprecated("dojo.regexp.time","Use dojo.date.parse instead","0.5");_de9=(typeof _de9=="object")?_de9:{};if(typeof _de9.format=="undefined"){_de9.format="h:mm:ss t";}if(typeof _de9.amSymbol!="string"){_de9.amSymbol="AM";}if(typeof _de9.pmSymbol!="string"){_de9.pmSymbol="PM";}var _dea=function(_deb){_deb=_deb.replace(/([.$?*!=:|{}\(\)\[\]\\\/^])/g,"\\$1");var amRE=_de9.amSymbol.replace(/([.$?*!=:|{}\(\)\[\]\\\/^])/g,"\\$1");var pmRE=_de9.pmSymbol.replace(/([.$?*!=:|{}\(\)\[\]\\\/^])/g,"\\$1");_deb=_deb.replace("hh","(0[1-9]|1[0-2])");_deb=_deb.replace("h","([1-9]|1[0-2])");_deb=_deb.replace("HH","([01][0-9]|2[0-3])");_deb=_deb.replace("H","([0-9]|1[0-9]|2[0-3])");_deb=_deb.replace("mm","([0-5][0-9])");_deb=_deb.replace("m","([1-5][0-9]|[0-9])");_deb=_deb.replace("ss","([0-5][0-9])");_deb=_deb.replace("s","([1-5][0-9]|[0-9])");_deb=_deb.replace("t","\\s?("+amRE+"|"+pmRE+")\\s?");return _deb;};return dojo.regexp.buildGroupRE(_de9.format,_dea);};dojo.regexp.numberFormat=function(_dee){_dee=(typeof _dee=="object")?_dee:{};if(typeof _dee.format=="undefined"){_dee.format="###-###-####";}var _def=function(_df0){_df0=dojo.string.escapeRegExp(_df0,"?");_df0=_df0.replace(/\?/g,"\\d?");_df0=_df0.replace(/#/g,"\\d");return _df0;};return dojo.regexp.buildGroupRE(_dee.format,_def);};dojo.regexp.buildGroupRE=function(a,re,_df3){if(!(a instanceof Array)){return re(a);}var b=[];for(var i=0;i<a.length;i++){b.push(re(a[i]));}return dojo.regexp.group(b.join("|"),_df3);};dojo.regexp.group=function(_df6,_df7){return "("+(_df7?"?:":"")+_df6+")";};dojo.provide("dojo.validate.common");dojo.validate.isText=function(_df8,_df9){_df9=(typeof _df9=="object")?_df9:{};if(/^\s*$/.test(_df8)){return false;}if(typeof _df9.length=="number"&&_df9.length!=_df8.length){return false;}if(typeof _df9.minlength=="number"&&_df9.minlength>_df8.length){return false;}if(typeof _df9.maxlength=="number"&&_df9.maxlength<_df8.length){return false;}return true;};dojo.validate.isInteger=function(_dfa,_dfb){var re=new RegExp("^"+dojo.regexp.integer(_dfb)+"$");return re.test(_dfa);};dojo.validate.isRealNumber=function(_dfd,_dfe){var re=new RegExp("^"+dojo.regexp.realNumber(_dfe)+"$");return re.test(_dfd);};dojo.validate.isCurrency=function(_e00,_e01){var re=new RegExp("^"+dojo.regexp.currency(_e01)+"$");return re.test(_e00);};dojo.validate.isInRange=function(_e03,_e04){_e03=_e03.replace(new RegExp(dojo.lang.has(_e04,"separator")?_e04.separator:",","g"),"");_e03=_e03.replace(dojo.lang.has(_e04,"symbol")?_e04.symbol:"$","");if(isNaN(_e03)){return false;}_e04=(typeof _e04=="object")?_e04:{};var max=(typeof _e04.max=="number")?_e04.max:Infinity;var min=(typeof _e04.min=="number")?_e04.min:-Infinity;var dec=(typeof _e04.decimal=="string")?_e04.decimal:".";var _e08="[^"+dec+"\\deE+-]";_e03=_e03.replace(RegExp(_e08,"g"),"");_e03=_e03.replace(/^([+-]?)(\D*)/,"$1");_e03=_e03.replace(/(\D*)$/,"");_e08="(\\d)["+dec+"](\\d)";_e03=_e03.replace(RegExp(_e08,"g"),"$1.$2");_e03=Number(_e03);if(_e03<min||_e03>max){return false;}return true;};dojo.validate.isNumberFormat=function(_e09,_e0a){var re=new RegExp("^"+dojo.regexp.numberFormat(_e0a)+"$","i");return re.test(_e09);};dojo.validate.isValidLuhn=function(_e0c){var sum,_e0e,_e0f;if(typeof _e0c!="string"){_e0c=String(_e0c);}_e0c=_e0c.replace(/[- ]/g,"");_e0e=_e0c.length%2;sum=0;for(var i=0;i<_e0c.length;i++){_e0f=parseInt(_e0c.charAt(i));if(i%2==_e0e){_e0f*=2;}if(_e0f>9){_e0f-=9;}sum+=_e0f;}return !(sum%10);};dojo.provide("dojo.validate.web");dojo.validate.isIpAddress=function(_e11,_e12){var re=new RegExp("^"+dojo.regexp.ipAddress(_e12)+"$","i");return re.test(_e11);};dojo.validate.isUrl=function(_e14,_e15){var re=new RegExp("^"+dojo.regexp.url(_e15)+"$","i");return re.test(_e14);};dojo.validate.isEmailAddress=function(_e17,_e18){var re=new RegExp("^"+dojo.regexp.emailAddress(_e18)+"$","i");return re.test(_e17);};dojo.validate.isEmailAddressList=function(_e1a,_e1b){var re=new RegExp("^"+dojo.regexp.emailAddressList(_e1b)+"$","i");return re.test(_e1a);};dojo.validate.getEmailAddressList=function(_e1d,_e1e){if(!_e1e){_e1e={};}if(!_e1e.listSeparator){_e1e.listSeparator="\\s;,";}if(dojo.validate.isEmailAddressList(_e1d,_e1e)){return _e1d.split(new RegExp("\\s*["+_e1e.listSeparator+"]\\s*"));}return [];};dojo.provide("dojo.date.common");dojo.date.setDayOfYear=function(_e1f,_e20){_e1f.setMonth(0);_e1f.setDate(_e20);return _e1f;};dojo.date.getDayOfYear=function(_e21){var _e22=_e21.getFullYear();var _e23=new Date(_e22-1,11,31);return Math.floor((_e21.getTime()-_e23.getTime())/86400000);};dojo.date.setWeekOfYear=function(_e24,week,_e26){if(arguments.length==2){_e26=0;}dojo.unimplemented("dojo.date.setWeekOfYear");};dojo.date.getWeekOfYear=function(_e27,_e28){if(arguments.length==1){_e28=0;}var _e29=new Date(_e27.getFullYear(),0,1);var day=_e29.getDay();_e29.setDate(_e29.getDate()-day+_e28-(day>_e28?7:0));return Math.floor((_e27.getTime()-_e29.getTime())/604800000);};dojo.date.setIsoWeekOfYear=function(_e2b,week,_e2d){if(arguments.length==2){_e2d=1;}dojo.unimplemented("dojo.date.setIsoWeekOfYear");};dojo.date.getIsoWeekOfYear=function(_e2e,_e2f){if(arguments.length==1){_e2f=1;}dojo.unimplemented("dojo.date.getIsoWeekOfYear");};dojo.date.shortTimezones=["IDLW","BET","HST","MART","AKST","PST","MST","CST","EST","AST","NFT","BST","FST","AT","GMT","CET","EET","MSK","IRT","GST","AFT","AGTT","IST","NPT","ALMT","MMT","JT","AWST","JST","ACST","AEST","LHST","VUT","NFT","NZT","CHAST","PHOT","LINT"];dojo.date.timezoneOffsets=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,540,570,600,630,660,690,720,765,780,840];dojo.date.getDaysInMonth=function(_e30){var _e31=_e30.getMonth();var days=[31,28,31,30,31,30,31,31,30,31,30,31];if(_e31==1&&dojo.date.isLeapYear(_e30)){return 29;}else{return days[_e31];}};dojo.date.isLeapYear=function(_e33){var year=_e33.getFullYear();return (year%400==0)?true:(year%100==0)?false:(year%4==0)?true:false;};dojo.date.getTimezoneName=function(_e35){var str=_e35.toString();var tz="";var _e38;var pos=str.indexOf("(");if(pos>-1){pos++;tz=str.substring(pos,str.indexOf(")"));}else{var pat=/([A-Z\/]+) \d{4}$/;if((_e38=str.match(pat))){tz=_e38[1];}else{str=_e35.toLocaleString();pat=/ ([A-Z\/]+)$/;if((_e38=str.match(pat))){tz=_e38[1];}}}return tz=="AM"||tz=="PM"?"":tz;};dojo.date.getOrdinal=function(_e3b){var date=_e3b.getDate();if(date%100!=11&&date%10==1){return "st";}else{if(date%100!=12&&date%10==2){return "nd";}else{if(date%100!=13&&date%10==3){return "rd";}else{return "th";}}}};dojo.date.compareTypes={DATE:1,TIME:2};dojo.date.compare=function(_e3d,_e3e,_e3f){var dA=_e3d;var dB=_e3e||new Date();var now=new Date();with(dojo.date.compareTypes){var opt=_e3f||(DATE|TIME);var d1=new Date((opt&DATE)?dA.getFullYear():now.getFullYear(),(opt&DATE)?dA.getMonth():now.getMonth(),(opt&DATE)?dA.getDate():now.getDate(),(opt&TIME)?dA.getHours():0,(opt&TIME)?dA.getMinutes():0,(opt&TIME)?dA.getSeconds():0);var d2=new Date((opt&DATE)?dB.getFullYear():now.getFullYear(),(opt&DATE)?dB.getMonth():now.getMonth(),(opt&DATE)?dB.getDate():now.getDate(),(opt&TIME)?dB.getHours():0,(opt&TIME)?dB.getMinutes():0,(opt&TIME)?dB.getSeconds():0);}if(d1.valueOf()>d2.valueOf()){return 1;}if(d1.valueOf()<d2.valueOf()){return -1;}return 0;};dojo.date.dateParts={YEAR:0,MONTH:1,DAY:2,HOUR:3,MINUTE:4,SECOND:5,MILLISECOND:6,QUARTER:7,WEEK:8,WEEKDAY:9};dojo.date.add=function(dt,_e47,incr){if(typeof dt=="number"){dt=new Date(dt);}function fixOvershoot(){if(sum.getDate()<dt.getDate()){sum.setDate(0);}}var sum=new Date(dt);with(dojo.date.dateParts){switch(_e47){case YEAR: sum.setFullYear(dt.getFullYear()+incr);fixOvershoot();break;case QUARTER: incr*=3;case MONTH: sum.setMonth(dt.getMonth()+incr);fixOvershoot();break;case WEEK: incr*=7;case DAY: sum.setDate(dt.getDate()+incr);break;case WEEKDAY: var dat=dt.getDate();var _e4b=0;var days=0;var strt=0;var trgt=0;var adj=0;var mod=incr%5;if(mod==0){days=(incr>0)?5:-5;_e4b=(incr>0)?((incr-5)/5):((incr+5)/5);}else{days=mod;_e4b=parseInt(incr/5);}strt=dt.getDay();if(strt==6&&incr>0){adj=1;}else{if(strt==0&&incr<0){adj=-1;}}trgt=(strt+days);if(trgt==0||trgt==6){adj=(incr>0)?2:-2;}sum.setDate(dat+(7*_e4b)+days+adj);break;case HOUR: sum.setHours(sum.getHours()+incr);break;case MINUTE: sum.setMinutes(sum.getMinutes()+incr);break;case SECOND: sum.setSeconds(sum.getSeconds()+incr);break;case MILLISECOND: sum.setMilliseconds(sum.getMilliseconds()+incr);break;default: break;}}return sum;};dojo.date.diff=function(dtA,dtB,_e53){if(typeof dtA=="number"){dtA=new Date(dtA);}if(typeof dtB=="number"){dtB=new Date(dtB);}var _e54=dtB.getFullYear()-dtA.getFullYear();var _e55=(dtB.getMonth()-dtA.getMonth())+(_e54*12);var _e56=dtB.getTime()-dtA.getTime();var _e57=_e56/1000;var _e58=_e57/60;var _e59=_e58/60;var _e5a=_e59/24;var _e5b=_e5a/7;var _e5c=0;with(dojo.date.dateParts){switch(_e53){case YEAR: _e5c=_e54;break;case QUARTER: var mA=dtA.getMonth();var mB=dtB.getMonth();var qA=Math.floor(mA/3)+1;var qB=Math.floor(mB/3)+1;qB+=(_e54*4);_e5c=qB-qA;break;case MONTH: _e5c=_e55;break;case WEEK: _e5c=parseInt(_e5b);break;case DAY: _e5c=_e5a;break;case WEEKDAY: var days=Math.round(_e5a);var _e62=parseInt(days/7);var mod=days%7;if(mod==0){days=_e62*5;}else{var adj=0;var aDay=dtA.getDay();var bDay=dtB.getDay();_e62=parseInt(days/7);mod=days%7;var _e67=new Date(dtA);_e67.setDate(_e67.getDate()+(_e62*7));var _e68=_e67.getDay();if(_e5a>0){switch(true){case aDay==6: adj=-1;break;case aDay==0: adj=0;break;case bDay==6: adj=-1;break;case bDay==0: adj=-2;break;case (_e68+mod)>5: adj=-2;break;default: break;}}else{if(_e5a<0){switch(true){case aDay==6: adj=0;break;case aDay==0: adj=1;break;case bDay==6: adj=2;break;case bDay==0: adj=1;break;case (_e68+mod)<0: adj=2;break;default: break;}}}days+=adj;days-=(_e62*2);}_e5c=days;break;case HOUR: _e5c=_e59;break;case MINUTE: _e5c=_e58;break;case SECOND: _e5c=_e57;break;case MILLISECOND: _e5c=_e56;break;default: break;}}return Math.round(_e5c);};dojo.provide("dojo.date.supplemental");dojo.date.getFirstDayOfWeek=function(_e69){var _e6a={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,gb:0,sy:4};_e69=dojo.hostenv.normalizeLocale(_e69);var _e6b=_e69.split("-")[1];var dow=_e6a[_e6b];return (typeof dow=="undefined")?1:dow;};dojo.date.getWeekend=function(_e6d){var _e6e={eg:5,il:5,sy:5,"in":0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4};var _e6f={ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6};_e6d=dojo.hostenv.normalizeLocale(_e6d);var _e70=_e6d.split("-")[1];var _e71=_e6e[_e70];var end=_e6f[_e70];if(typeof _e71=="undefined"){_e71=6;}if(typeof end=="undefined"){end=0;}return {start:_e71,end:end};};dojo.date.isWeekend=function(_e73,_e74){var _e75=dojo.date.getWeekend(_e74);var day=(_e73||new Date()).getDay();if(_e75.end<_e75.start){_e75.end+=7;if(day<_e75.start){day+=7;}}return day>=_e75.start&&day<=_e75.end;};dojo.provide("dojo.i18n.common");dojo.i18n.getLocalization=function(_e77,_e78,_e79){dojo.hostenv.preloadLocalizations();_e79=dojo.hostenv.normalizeLocale(_e79);var _e7a=_e79.split("-");var _e7b=[_e77,"nls",_e78].join(".");var _e7c=dojo.hostenv.findModule(_e7b,true);var _e7d;for(var i=_e7a.length;i>0;i--){var loc=_e7a.slice(0,i).join("_");if(_e7c[loc]){_e7d=_e7c[loc];break;}}if(!_e7d){_e7d=_e7c.ROOT;}if(_e7d){var _e80=function(){};_e80.prototype=_e7d;return new _e80();}dojo.raise("Bundle not found: "+_e78+" in "+_e77+" , locale="+_e79);};dojo.i18n.isLTR=function(_e81){var lang=dojo.hostenv.normalizeLocale(_e81).split("-")[0];var RTL={ar:true,fa:true,he:true,ur:true,yi:true};return !RTL[lang];};dojo.provide("dojo.date.format");(function(){dojo.date.format=function(_e84,_e85){if(typeof _e85=="string"){dojo.deprecated("dojo.date.format","To format dates with POSIX-style strings, please use dojo.date.strftime instead","0.5");return dojo.date.strftime(_e84,_e85);}function formatPattern(_e86,_e87){return _e87.replace(/([a-z])\1*/ig,function(_e88){var s;var c=_e88.charAt(0);var l=_e88.length;var pad;var _e8d=["abbr","wide","narrow"];switch(c){case "G": if(l>3){dojo.unimplemented("Era format not implemented");}s=_e8e.eras[_e86.getFullYear()<0?1:0];break;case "y": s=_e86.getFullYear();switch(l){case 1: break;case 2: s=String(s);s=s.substr(s.length-2);break;default: pad=true;}break;case "Q": case "q": s=Math.ceil((_e86.getMonth()+1)/3);switch(l){case 1: case 2: pad=true;break;case 3: case 4: dojo.unimplemented("Quarter format not implemented");}break;case "M": case "L": var m=_e86.getMonth();var _e90;switch(l){case 1: case 2: s=m+1;pad=true;break;case 3: case 4: case 5: _e90=_e8d[l-3];break;}if(_e90){var type=(c=="L")?"standalone":"format";var prop=["months",type,_e90].join("-");s=_e8e[prop][m];}break;case "w": var _e93=0;s=dojo.date.getWeekOfYear(_e86,_e93);pad=true;break;case "d": s=_e86.getDate();pad=true;break;case "D": s=dojo.date.getDayOfYear(_e86);pad=true;break;case "E": case "e": case "c": var d=_e86.getDay();var _e90;switch(l){case 1: case 2: if(c=="e"){var _e95=dojo.date.getFirstDayOfWeek(_e85.locale);d=(d-_e95+7)%7;}if(c!="c"){s=d+1;pad=true;break;}case 3: case 4: case 5: _e90=_e8d[l-3];break;}if(_e90){var type=(c=="c")?"standalone":"format";var prop=["days",type,_e90].join("-");s=_e8e[prop][d];}break;case "a": var _e96=(_e86.getHours()<12)?"am":"pm";s=_e8e[_e96];break;case "h": case "H": case "K": case "k": var h=_e86.getHours();switch(c){case "h": s=(h%12)||12;break;case "H": s=h;break;case "K": s=(h%12);break;case "k": s=h||24;break;}pad=true;break;case "m": s=_e86.getMinutes();pad=true;break;case "s": s=_e86.getSeconds();pad=true;break;case "S": s=Math.round(_e86.getMilliseconds()*Math.pow(10,l-3));break;case "v": case "z": s=dojo.date.getTimezoneName(_e86);if(s){break;}l=4;case "Z": var _e98=_e86.getTimezoneOffset();var tz=[(_e98<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_e98)/60),2),dojo.string.pad(Math.abs(_e98)%60,2)];if(l==4){tz.splice(0,0,"GMT");tz.splice(3,0,":");}s=tz.join("");break;case "Y": case "u": case "W": case "F": case "g": case "A": s="?";break;default: dojo.raise("dojo.date.format: invalid pattern char: "+_e87);}if(pad){s=dojo.string.pad(s,l);}return s;});}_e85=_e85||{};var _e9a=dojo.hostenv.normalizeLocale(_e85.locale);var _e9b=_e85.formatLength||"short";var _e8e=dojo.date._getGregorianBundle(_e9a);var str=[];var _e9d=dojo.lang.curry(this,formatPattern,_e84);if(_e85.selector=="yearOnly"){var year=_e84.getFullYear();if(_e9a.match(/^zh|^ja/)){year+="\u5e74";}return year;}if(_e85.selector!="timeOnly"){var _e9f=_e85.datePattern||_e8e["dateFormat-"+_e9b];if(_e9f){str.push(_processPattern(_e9f,_e9d));}}if(_e85.selector!="dateOnly"){var _ea0=_e85.timePattern||_e8e["timeFormat-"+_e9b];if(_ea0){str.push(_processPattern(_ea0,_e9d));}}var _ea1=str.join(" ");return _ea1;};dojo.date.parse=function(_ea2,_ea3){_ea3=_ea3||{};var _ea4=dojo.hostenv.normalizeLocale(_ea3.locale);var info=dojo.date._getGregorianBundle(_ea4);var _ea6=_ea3.formatLength||"full";if(!_ea3.selector){_ea3.selector="dateOnly";}var _ea7=_ea3.datePattern||info["dateFormat-"+_ea6];var _ea8=_ea3.timePattern||info["timeFormat-"+_ea6];var _ea9;if(_ea3.selector=="dateOnly"){_ea9=_ea7;}else{if(_ea3.selector=="timeOnly"){_ea9=_ea8;}else{if(_ea3.selector=="dateTime"){_ea9=_ea7+" "+_ea8;}else{var msg="dojo.date.parse: Unknown selector param passed: '"+_ea3.selector+"'.";msg+=" Defaulting to date pattern.";dojo.debug(msg);_ea9=_ea7;}}}var _eab=[];var _eac=_processPattern(_ea9,dojo.lang.curry(this,_buildDateTimeRE,_eab,info,_ea3));var _ead=new RegExp("^"+_eac+"$");var _eae=_ead.exec(_ea2);if(!_eae){return null;}var _eaf=["abbr","wide","narrow"];var _eb0=new Date(1972,0);var _eb1={};for(var i=1;i<_eae.length;i++){var grp=_eab[i-1];var l=grp.length;var v=_eae[i];switch(grp.charAt(0)){case "y": if(l!=2){_eb0.setFullYear(v);_eb1.year=v;}else{if(v<100){v=Number(v);var year=""+new Date().getFullYear();var _eb7=year.substring(0,2)*100;var _eb8=Number(year.substring(2,4));var _eb9=Math.min(_eb8+20,99);var num=(v<_eb9)?_eb7+v:_eb7-100+v;_eb0.setFullYear(num);_eb1.year=num;}else{if(_ea3.strict){return null;}_eb0.setFullYear(v);_eb1.year=v;}}break;case "M": if(l>2){if(!_ea3.strict){v=v.replace(/\./g,"");v=v.toLowerCase();}var _ebb=info["months-format-"+_eaf[l-3]].concat();for(var j=0;j<_ebb.length;j++){if(!_ea3.strict){_ebb[j]=_ebb[j].toLowerCase();}if(v==_ebb[j]){_eb0.setMonth(j);_eb1.month=j;break;}}if(j==_ebb.length){dojo.debug("dojo.date.parse: Could not parse month name: '"+v+"'.");return null;}}else{_eb0.setMonth(v-1);_eb1.month=v-1;}break;case "E": case "e": if(!_ea3.strict){v=v.toLowerCase();}var days=info["days-format-"+_eaf[l-3]].concat();for(var j=0;j<days.length;j++){if(!_ea3.strict){days[j]=days[j].toLowerCase();}if(v==days[j]){break;}}if(j==days.length){dojo.debug("dojo.date.parse: Could not parse weekday name: '"+v+"'.");return null;}break;case "d": _eb0.setDate(v);_eb1.date=v;break;case "a": var am=_ea3.am||info.am;var pm=_ea3.pm||info.pm;if(!_ea3.strict){v=v.replace(/\./g,"").toLowerCase();am=am.replace(/\./g,"").toLowerCase();pm=pm.replace(/\./g,"").toLowerCase();}if(_ea3.strict&&v!=am&&v!=pm){dojo.debug("dojo.date.parse: Could not parse am/pm part.");return null;}var _ec0=_eb0.getHours();if(v==pm&&_ec0<12){_eb0.setHours(_ec0+12);}else{if(v==am&&_ec0==12){_eb0.setHours(0);}}break;case "K": if(v==24){v=0;}case "h": case "H": case "k": if(v>23){dojo.debug("dojo.date.parse: Illegal hours value");return null;}_eb0.setHours(v);break;case "m": _eb0.setMinutes(v);break;case "s": _eb0.setSeconds(v);break;case "S": _eb0.setMilliseconds(v);break;default: dojo.unimplemented("dojo.date.parse: unsupported pattern char="+grp.charAt(0));}}if(_eb1.year&&_eb0.getFullYear()!=_eb1.year){dojo.debug("Parsed year: '"+_eb0.getFullYear()+"' did not match input year: '"+_eb1.year+"'.");return null;}if(_eb1.month&&_eb0.getMonth()!=_eb1.month){dojo.debug("Parsed month: '"+_eb0.getMonth()+"' did not match input month: '"+_eb1.month+"'.");return null;}if(_eb1.date&&_eb0.getDate()!=_eb1.date){dojo.debug("Parsed day of month: '"+_eb0.getDate()+"' did not match input day of month: '"+_eb1.date+"'.");return null;}return _eb0;};function _processPattern(_ec1,_ec2,_ec3,_ec4){var _ec5=function(x){return x;};_ec2=_ec2||_ec5;_ec3=_ec3||_ec5;_ec4=_ec4||_ec5;var _ec7=_ec1.match(/(''|[^'])+/g);var _ec8=false;for(var i=0;i<_ec7.length;i++){if(!_ec7[i]){_ec7[i]="";}else{_ec7[i]=(_ec8?_ec3:_ec2)(_ec7[i]);_ec8=!_ec8;}}return _ec4(_ec7.join(""));}function _buildDateTimeRE(_eca,info,_ecc,_ecd){return _ecd.replace(/([a-z])\1*/ig,function(_ece){var s;var c=_ece.charAt(0);var l=_ece.length;switch(c){case "y": s="\\d"+((l==2)?"{2,4}":"+");break;case "M": s=(l>2)?"\\S+":"\\d{1,2}";break;case "d": s="\\d{1,2}";break;case "E": s="\\S+";break;case "h": case "H": case "K": case "k": s="\\d{1,2}";break;case "m": case "s": s="[0-5]\\d";break;case "S": s="\\d{1,3}";break;case "a": var am=_ecc.am||info.am||"AM";var pm=_ecc.pm||info.pm||"PM";if(_ecc.strict){s=am+"|"+pm;}else{s=am;s+=(am!=am.toLowerCase())?"|"+am.toLowerCase():"";s+="|";s+=(pm!=pm.toLowerCase())?pm+"|"+pm.toLowerCase():pm;}break;default: dojo.unimplemented("parse of date format, pattern="+_ecd);}if(_eca){_eca.push(_ece);}return "\\s*("+s+")\\s*";});}})();dojo.date.strftime=function(_ed4,_ed5,_ed6){var _ed7=null;function _(s,n){return dojo.string.pad(s,n||2,_ed7||"0");}var info=dojo.date._getGregorianBundle(_ed6);function $(_edb){switch(_edb){case "a": return dojo.date.getDayShortName(_ed4,_ed6);case "A": return dojo.date.getDayName(_ed4,_ed6);case "b": case "h": return dojo.date.getMonthShortName(_ed4,_ed6);case "B": return dojo.date.getMonthName(_ed4,_ed6);case "c": return dojo.date.format(_ed4,{locale:_ed6});case "C": return _(Math.floor(_ed4.getFullYear()/100));case "d": return _(_ed4.getDate());case "D": return $("m")+"/"+$("d")+"/"+$("y");case "e": if(_ed7==null){_ed7=" ";}return _(_ed4.getDate());case "f": if(_ed7==null){_ed7=" ";}return _(_ed4.getMonth()+1);case "g": break;case "G": dojo.unimplemented("unimplemented modifier 'G'");break;case "F": return $("Y")+"-"+$("m")+"-"+$("d");case "H": return _(_ed4.getHours());case "I": return _(_ed4.getHours()%12||12);case "j": return _(dojo.date.getDayOfYear(_ed4),3);case "k": if(_ed7==null){_ed7=" ";}return _(_ed4.getHours());case "l": if(_ed7==null){_ed7=" ";}return _(_ed4.getHours()%12||12);case "m": return _(_ed4.getMonth()+1);case "M": return _(_ed4.getMinutes());case "n": return "\n";case "p": return info[_ed4.getHours()<12?"am":"pm"];case "r": return $("I")+":"+$("M")+":"+$("S")+" "+$("p");case "R": return $("H")+":"+$("M");case "S": return _(_ed4.getSeconds());case "t": return "\t";case "T": return $("H")+":"+$("M")+":"+$("S");case "u": return String(_ed4.getDay()||7);case "U": return _(dojo.date.getWeekOfYear(_ed4));case "V": return _(dojo.date.getIsoWeekOfYear(_ed4));case "W": return _(dojo.date.getWeekOfYear(_ed4,1));case "w": return String(_ed4.getDay());case "x": return dojo.date.format(_ed4,{selector:"dateOnly",locale:_ed6});case "X": return dojo.date.format(_ed4,{selector:"timeOnly",locale:_ed6});case "y": return _(_ed4.getFullYear()%100);case "Y": return String(_ed4.getFullYear());case "z": var _edc=_ed4.getTimezoneOffset();return (_edc>0?"-":"+")+_(Math.floor(Math.abs(_edc)/60))+":"+_(Math.abs(_edc)%60);case "Z": return dojo.date.getTimezoneName(_ed4);case "%": return "%";}}var _edd="";var i=0;var _edf=0;var _ee0=null;while((_edf=_ed5.indexOf("%",i))!=-1){_edd+=_ed5.substring(i,_edf++);switch(_ed5.charAt(_edf++)){case "_": _ed7=" ";break;case "-": _ed7="";break;case "0": _ed7="0";break;case "^": _ee0="upper";break;case "*": _ee0="lower";break;case "#": _ee0="swap";break;default: _ed7=null;_edf--;break;}var _ee1=$(_ed5.charAt(_edf++));switch(_ee0){case "upper": _ee1=_ee1.toUpperCase();break;case "lower": _ee1=_ee1.toLowerCase();break;case "swap": var _ee2=_ee1.toLowerCase();var _ee3="";var j=0;var ch="";while(j<_ee1.length){ch=_ee1.charAt(j);_ee3+=(ch==_ee2.charAt(j))?ch.toUpperCase():ch.toLowerCase();j++;}_ee1=_ee3;break;default: break;}_ee0=null;_edd+=_ee1;i=_edf;}_edd+=_ed5.substring(i);return _edd;};(function(){var _ee6=[];dojo.date.addCustomFormats=function(_ee7,_ee8){_ee6.push({pkg:_ee7,name:_ee8});};dojo.date._getGregorianBundle=function(_ee9){var _eea={};dojo.lang.forEach(_ee6,function(desc){var _eec=dojo.i18n.getLocalization(desc.pkg,desc.name,_ee9);_eea=dojo.lang.mixin(_eea,_eec);},this);return _eea;};})();dojo.date.addCustomFormats("dojo.i18n.calendar","gregorian");dojo.date.addCustomFormats("dojo.i18n.calendar","gregorianExtras");dojo.date.getNames=function(item,type,use,_ef0){var _ef1;var _ef2=dojo.date._getGregorianBundle(_ef0);var _ef3=[item,use,type];if(use=="standAlone"){_ef1=_ef2[_ef3.join("-")];}_ef3[1]="format";return (_ef1||_ef2[_ef3.join("-")]).concat();};dojo.date.getDayName=function(_ef4,_ef5){return dojo.date.getNames("days","wide","format",_ef5)[_ef4.getDay()];};dojo.date.getDayShortName=function(_ef6,_ef7){return dojo.date.getNames("days","abbr","format",_ef7)[_ef6.getDay()];};dojo.date.getMonthName=function(_ef8,_ef9){return dojo.date.getNames("months","wide","format",_ef9)[_ef8.getMonth()];};dojo.date.getMonthShortName=function(_efa,_efb){return dojo.date.getNames("months","abbr","format",_efb)[_efa.getMonth()];};dojo.date.toRelativeString=function(_efc){var now=new Date();var diff=(now-_efc)/1000;var end=" ago";var _f00=false;if(diff<0){_f00=true;end=" from now";diff=-diff;}if(diff<60){diff=Math.round(diff);return diff+" second"+(diff==1?"":"s")+end;}if(diff<60*60){diff=Math.round(diff/60);return diff+" minute"+(diff==1?"":"s")+end;}if(diff<60*60*24){diff=Math.round(diff/3600);return diff+" hour"+(diff==1?"":"s")+end;}if(diff<60*60*24*7){diff=Math.round(diff/(3600*24));if(diff==1){return _f00?"Tomorrow":"Yesterday";}else{return diff+" days"+end;}}return dojo.date.format(_efc);};dojo.date.toSql=function(_f01,_f02){return dojo.date.strftime(_f01,"%F"+!_f02?" %T":"");};dojo.date.fromSql=function(_f03){var _f04=_f03.split(/[\- :]/g);while(_f04.length<6){_f04.push(0);}return new Date(_f04[0],(parseInt(_f04[1],10)-1),_f04[2],_f04[3],_f04[4],_f04[5]);};dojo.provide("wtl.widget.SavedSearch");dojo.widget.defineWidget("wtl.widget.SavedSearch",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"SavedSearch",templateCssPath:null,templateString:"<div class=\"SavedSearch\" dojoAttachEvent=\"onClick:_savedSearchClick; onMouseOver:_doMouseOver; onMouseOut:_doMouseOut\">\r\n    <div style=\"float:right; width:48px;\">\r\n\t    <a dojoAttachEvent=\"onClick:deleteClick\" title=\"Delete Saved Search\" href=\"\" class=\"Delete\"><span>Delete</span></a>\r\n\t    <a dojoAttachEvent=\"onClick:editClick\" title=\"Edit Saved Search\" href=\"\" class=\"Edit\"><span>Edit</span></a>\r\n\t    <a dojoAttachEvent=\"onClick:rssClick\" title=\"RSS\" href=\"\" class=\"RSS\"><span>RSS</span></a>\r\n    </div>\r\n\t<p class=\"DisplayMode\"><a href=\"\" dojoAttachPoint=\"searchName\" class=\"SearchTitle\"></a></p>\r\n\t<p class=\"EditMode\" style=\"overflow:auto\">\r\n\t\t<b>Search Name:</b> \r\n\t\t<input dojoAttachPoint=\"searchNameInput\" type=\"text\" value=\"\" />\r\n\t</p>\r\n    <p style=\"margin:5px 0;\">\r\n\t    <b>Send E-mail Updates:</b> \r\n\t    <span dojoAttachPoint=\"notification\" class=\"DisplayMode\"></span>\r\n\t\t<select dojoAttachPoint=\"frequencySelect\" class=\"EditMode\"></select>\r\n\t</p>\r\n\t<p><b>Created:</b> <span dojoAttachPoint=\"createDate\"></span> <span dojoAttachPoint=\"updateDateHolder\" style=\"margin-left:12px;\"><b>Last Updated:</b> <span dojoAttachPoint=\"updateDate\"></span></span></p>\r\n\t\r\n    <div class=\"EditMode\" style=\"float:right; margin-top:5px;\">\r\n        <div class=\"Disableable Button Right\"><a dojoAttachEvent=\"onclick:saveClick\" href=\"\">Save</a></div>\r\n        <div class=\"Disableable Button Right\"><a dojoAttachEvent=\"onclick:cancelClick\" href=\"\">Cancel</a></div>\r\n    </div>\r\n</div>\r\n",currentDeployment:{},search:null,onDeleteCallBack:null,frequencies:[],HomeDeliveryID:0,searchName:null,createDate:null,notification:null,rssButton:null,frequencySelect:null,_isEditing:false,_xhr:null,fillInTemplate:function(){if(this.search){this.HomeDeliveryID=this.search.HomeDeliveryID;this.createDate.innerHTML=dojo.date.format(this.search.CreateDate,{selector:"dateOnly",datePattern:"MM/dd/yyyy"});this.updateDate.innerHTML=dojo.date.format(this.search.UpdateDate,{selector:"dateOnly",datePattern:"MM/dd/yyyy"});dojo.html.setDisplay(this.updateDateHolder,(dojo.date.diff(this.search.CreateDate,this.search.UpdateDate,dojo.date.dateParts.SECOND)>0));for(var i=0;i<this.frequencies.length;i++){var opt=this._addFrequency(this.frequencies[i]);}this.fillInDisplay();}},fillInDisplay:function(){var s=this.search.SearchName?this.search.SearchName:"(unnamed search)";this.searchName.innerHTML=s;this.searchNameInput.value=s;for(var i=0;i<this.frequencySelect.length;i++){if(this.frequencySelect[i].value==this.search.FrequencyCode){this.frequencySelect[i].selected=true;break;}}this.notification.innerHTML=this.search.Frequency?this.search.Frequency:"(unknown notification type)";},_updateDate:function(){this.updateDate.innerHTML=dojo.date.format(new Date(),{selector:"dateOnly",datePattern:"MM/dd/yyyy"});dojo.html.setDisplay(this.updateDateHolder,true);},_addFrequency:function(obj){var opt=document.createElement("option");opt.setAttribute("value",obj.Value);opt.innerHTML=obj.Label;this.frequencySelect.appendChild(opt);return opt;},postCreate:function(){},deleteClick:function(evt){dojo.event.browser.stopEvent(evt);if(this._validDelete()){var _f0c={guestID:this.guest.GuestID,homeDeliveryID:this.search.HomeDeliveryID,actionType:this.actionType.DELETESAVEDSEARCH};this._guestHandlerCall(_f0c,dojo.lang.hitch(this,"_onDelete"));}},_validDelete:function(){if(this._xhr){this.showError("Your action is currently being processed.");return false;}return confirm("Are you sure you want to delete this saved search?");},_onDelete:function(type,obj,_f0f){this._xhr=null;if(obj&&obj.Success){if(dojo.lang.isFunction(this.onDeleteCallBack)){this.onDeleteCallBack(this.search);}}else{this.showError("An error occurred while processing your request. Please try again.");}},_onBindError:function(){this.showError("An error occurred while processing your request. Please try again.");if(this._xhr){this._xhr.abort();this._xhr=null;}},editClick:function(evt){if(evt){dojo.event.browser.stopEvent(evt);}this._swapMode();this.rerunSearch(this.search);},_swapMode:function(){this._isEditing=!this._isEditing;if(this._isEditing){dojo.html.addClass(this.domNode,"Editing");this.searchNameInput.focus();this.searchNameInput.select();}else{dojo.html.removeClass(this.domNode,"Editing");}},close:function(){this._isEditing=false;dojo.html.removeClass(this.domNode,"Editing");dojo.html.removeClass(this.domNode,"SavedSearchSelected");dojo.html.removeClass(this.domNode,"SavedSearchHighlight");},rssClick:function(evt){if(evt){dojo.event.browser.stopEvent(evt);}if(dojo.lang.isFunction(ShowHelp)){ShowHelp("Rss&HDID="+this.search.HomeDeliveryID);}},cancelClick:function(evt){dojo.event.browser.stopEvent(evt);this.fillInDisplay();this._swapMode();},saveClick:function(evt){dojo.event.browser.stopEvent(evt);if(this._validSave()){this.saveSearch(this.searchNameInput.value,this.frequencySelect[this.frequencySelect.selectedIndex].value,this.HomeDeliveryID);}},_validSave:function(){var s=dojo.string.trim(this.searchNameInput.value);if(s.length==0){this.searchNameInput.focus();this.showError("Please enter a search name.");return false;}return true;},saveSearch:function(_f15,_f16,_f17){},updateSearch:function(_f18){this._swapMode();this.search=_f18;this.fillInDisplay();this._updateDate();},showError:function(){},_savedSearchClick:function(evt){if(!this._isEditing){dojo.event.browser.stopEvent(evt);this._swapMode();this.rerunSearch(this.search);}},_doMouseOver:function(evt){dojo.html.addClass(this.domNode,"SavedSearchHighlight");},_doMouseOut:function(evt){dojo.html.removeClass(this.domNode,"SavedSearchHighlight");},searchNameClick:function(evt){dojo.event.browser.stopEvent(evt);this._swapMode();this.rerunSearch(this.search);},rerunSearch:function(_f1d){},_guestHandlerCall:function(_f1e,_f1f){this._xhr=dojo.io.bind({url:wtl.util.urlAppend(this.guestHandler,"rand="+(new Date()).getTime()),method:"post",content:_f1e,load:_f1f,error:dojo.lang.hitch(this,"_onBindError"),mimetype:"text/json",transport:"XMLHTTPTransport"});}});dojo.provide("wtl.widget.YourAccountSavedSearches");dojo.widget.defineWidget("wtl.widget.YourAccountSavedSearches",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"YourAccountSavedSearches",templateCssPath:null,templateString:"<div class=\"SavedSearches\">\r\n\r\n    <div class=\"NoItems\" dojoAttachPoint=\"noSearchesContainer\">\r\n\t\t<p>You have no Saved Searches</p>\r\n\t</div>\r\n\t\r\n\t<div class=\"NewSearchInfo\" style=\"display:none;\"><!-- this mark-up should be removed -->\r\n\t\t<p class=\"SearchTitle\">New Saved Search</p>\r\n\t\t<div class=\"Container\">\r\n\t\t\t<input dojoAttachPoint=\"searchName\" dojoAttachEvent=\"onKeyPress;onBlur:_onSearchNameBlur;onFocus:_onSearchNameFocus\" type=\"text\" value=\"Name Your Search\" />\r\n\t\t</div>\r\n\r\n\t\t<div class=\"Container\">\r\n\t\t\t<div class=\"Disableable Button Right\"><a dojoAttachEvent=\"onclick:saveClick\" href=\"\">Save</a></div>\r\n\t\t\tSend E-mail Updates: <select dojoAttachPoint=\"notificationTypes\" dojoAttachEvent=\"onKeyPress\" style=\"margin-left:5px;width:100px\"></select>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<div class=\"SearchesContainer\" dojoAttachPoint=\"searchesContainer\" style=\"height:200px;\"></div>\r\n</div>\r\n",currentDeployment:{},guest:null,guestHandler:"",saveSearchHandler:"",actionType:null,onDeleteCallBack:null,onSaveCallBack:null,parentPanel:null,frequencies:[{Label:"Don't Send",Value:0},{Label:"Daily",Value:1},{Label:"Weekly",Value:7},{Label:"Monthly",Value:30}],searchesContainer:null,searchName:null,notificationTypes:null,noSearchesContainer:null,_searches:[],_prevSearchID:-1,_query:true,_xhr:null,_searchNameDefault:"Name your search",fillInTemplate:function(){this._getSearches();},postCreate:function(){this._searchNameDefault=dojo.string.trim(this.searchName.value);this._disableButtonSelections();},_disableButtonSelections:function(){var _f20=dojo.html.getElementsByClass("Disableable",this.domNode,"div");for(var i=0;i<_f20.length;i++){dojo.html.disableSelection(_f20[i]);}},refreshGuest:function(_f22){this._query=true;this.guest=_f22;},_getSearches:function(){if(this.guest){var _f23={guestID:this.guest.GuestID,actionType:this.actionType.GETSAVEDSEARCHES};this._guestHandlerCall(_f23,dojo.lang.hitch(this,"_onGetSearches"));}},_onGetSearches:function(type,obj,_f26){this._xhr=null;this.resetDisplay();if(obj&&obj.Success&&obj.Searches){this._searches=obj.Searches;for(var i=0;i<obj.Searches.length;i++){this._addSearch(obj.Searches[i]);}}else{}this._checkDisplay();},_checkDisplay:function(){dojo.html.setDisplay(this.noSearchesContainer,this._searches.length>0?false:true);this.superSize();},_addSearch:function(_f28){var div=document.createElement("div");this.searchesContainer.appendChild(div);var _f2a={widgetId:"SavedSearch_"+_f28.HomeDeliveryID,currentDeployment:this.currentDeployment,notificationTypes:this.notificationTypes,guest:this.guest,search:_f28,guestHandler:this.guestHandler,actionType:this.actionType,frequencies:this.frequencies,onDeleteCallBack:dojo.lang.hitch(this,"_onDeleteSearch")};var w=dojo.widget.createWidget("wtl:SavedSearch",_f2a,div);dojo.event.connect(w,"rerunSearch",this,"_onSearchRun");dojo.event.connect(w,"saveSearch",this,"saveSearch");dojo.event.connect(w,"showError",this,"_showError");},addSearch:function(_f2c){this.searchName.value=this._searchNameDefault;this.notificationTypes.selectedIndex=0;this._showSuccess("New Search has been saved.");this._searches.push(_f2c);this._checkDisplay();this._addSearch(_f2c);},updateSearch:function(_f2d){if(_f2d){var w=dojo.widget.byId("SavedSearch_"+_f2d.HomeDeliveryID);if(w){w.updateSearch(_f2d);}}},_guestHandlerCall:function(_f2f,_f30){this._xhr=dojo.io.bind({url:wtl.util.urlAppend(this.guestHandler,"rand="+(new Date()).getTime()),method:"post",content:_f2f,load:_f30,error:dojo.lang.hitch(this,"_onBindError"),mimetype:"text/json",transport:"XMLHTTPTransport"});},_onBindError:function(){this._showError("An error occurred while processing your request. Please try again.");if(this._xhr){this._xhr.abort();this._xhr=null;}},_onDeleteSearch:function(_f31){if(_f31){var w=dojo.widget.byId("SavedSearch_"+_f31.HomeDeliveryID);if(w){w.destroy();}for(var i=0;i<this._searches.length;i++){if(_f31.HomeDeliveryID==this._searches[i].HomeDeliveryID){this._searches.splice(i,1);break;}}this._checkDisplay();}},superSize:function(){if(dojo.html.isDisplayed(this.searchesContainer)){this.searchesContainer.style.height="";var _f34=dojo.html.getMarginBox(this.parentPanel).height;var _f35=dojo.html.getMarginBox(this.domNode).height;var _f36=dojo.html.getMarginBox(this.searchesContainer).height;var h=_f34-(_f35-_f36);this.searchesContainer.scrollTop=0;}},onKeyPress:function(evt){if(evt.keyCode==13){this.saveClick(evt);}},_onSearchNameFocus:function(evt){if(dojo.string.trim(this.searchName.value).toLowerCase()==this._searchNameDefault.toLowerCase()){this.searchName.value="";}},_onSearchNameBlur:function(evt){var s=dojo.string.trim(this.searchName.value);if(s.length==0||s.toLowerCase()==this._searchNameDefault.toLowerCase()){this.searchName.value=this._searchNameDefault;}},saveClick:function(evt){dojo.event.browser.stopEvent(evt);if(this._validSave()){this.saveSearch(this.searchName.value,this.notificationTypes[this.notificationTypes.selectedIndex].value,0);}},saveSearch:function(_f3d,_f3e,_f3f){},_onSearchRun:function(_f40){this._currentSearchID=_f40.HomeDeliveryID;this.closeOtherSearches();var _f41=dojo.widget.manager.getWidgetById("SavedSearch_"+this._currentSearchID);if(_f41){dojo.html.removeClass(_f41.domNode,"SavedSearchHighlight");dojo.html.addClass(_f41.domNode,"SavedSearchSelected");}this.rerunSearch(_f40);this._prevSearchID=_f40.HomeDeliveryID;},closeSearch:function(){if(this._prevSearchID>-1){var w=dojo.widget.byId("SavedSearch_"+this._prevSearchID);if(w){w.close();}}},closeOtherSearches:function(){var _f43=dojo.widget.manager.getWidgetsByType("SavedSearch");for(var j in _f43){var w=_f43[j];if(w.widgetId!=("SavedSearch_"+this._currentSearchID)){w.close();}}},rerunSearch:function(_f46){},_validSave:function(){var s=dojo.string.trim(this.searchName.value);if(s.length==0||s.toLowerCase()==this._searchNameDefault.toLowerCase()){this.searchName.focus();this._showError("Please enter a search name.");return false;}s=this.notificationTypes[this.notificationTypes.selectedIndex].value;if(!s.length){this.notificationTypes.focus();this._showError("Please select a notification frequency.");return false;}return true;},_showError:function(msg){this.showMessage(msg,true);},_showSuccess:function(msg){this.showMessage(msg,false);},showMessage:function(msg,_f4b){},checkGuest:function(){if(this._query){this._getSearches();this._query=false;}},resetDisplay:function(){dojo.lang.forEach(dojo.widget.byType("SavedSearch"),function(_f4c){_f4c.destroy();});wtl.util.destroyChildren(this.searchesContainer);this._searches=[];this._checkDisplay();}});dojo.provide("wtl.widget.YourAccountYourInfo");dojo.widget.defineWidget("wtl.widget.YourAccountYourInfo",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"YourAccountYourInfo",templateCssPath:null,templateString:"<div class=\"YourInfo\">\r\n\t<p>Contact Information</p>\r\n\t<div class=\"Container\">\r\n\t\t<label class=\"Required\">First Name</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"firstName\" type=\"text\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label class=\"Required\">Last Name</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"lastName\" type=\"text\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t    <label class=\"Required\">E-mail Address</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"emailAddress\" type=\"text\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label>Address Line 1</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"address1\" type=\"text\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label>Address Line 2</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"address2\" type=\"text\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label>City</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"city\" type=\"text\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label>State</label>\r\n\t\t<select dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"state\" style=\"width:160px\"></select>\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label>Zip Code</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"postalCode\" type=\"text\" value=\"\" style=\"width:80px\"/>\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label>Phone 1</label>\r\n\t\t<select class=\"Phone\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"phone1Type\" style=\"width:60px\"></select>\r\n\t\t<input class=\"Phone\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"phone1Number\" type=\"text\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label>Phone 2</label>\r\n\t\t<select class=\"Phone\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"phone2Type\" style=\"width:60px\"></select>\r\n\t\t<input class=\"Phone\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"phone2Number\" type=\"text\" value=\"\" />\r\n\t</div>\r\n    \r\n    <p>Sign In Information</p>\r\n\t<div class=\"Container\">\r\n\t    <label>Username</label>\r\n\t\t<span dojoAttachPoint=\"userName\"></span>\r\n\t</div>\r\n    <div class=\"Container\">\r\n\t\t<label class=\"Required\">New Password</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"password1\" type=\"password\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label class=\"Required\">Confirm Password</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"password2\" type=\"password\" value=\"\" />\r\n\t</div>\r\n\t\r\n\t<div class=\"Container\">\r\n\t\t<input id=\"${this.widgetId}_sendEmail\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"sendEmailCheckbox\" type=\"checkbox\" class=\"Checkbox\" />\r\n\t\t<label for=\"${this.widgetId}_sendEmail\" class=\"Checkbox\">I am interested in receiving periodic updates via e-mail.</label>\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<div class=\"Disableable Button Right\" id=\"Update\"><a dojoAttachEvent=\"onclick:saveClick\" href=\"\">Update</a></div>\r\n\t\t<div class=\"Disableable Button\"><a dojoAttachEvent=\"onclick:deleteClick\" href=\"\">Delete</a></div>\r\n\t</div>\r\n\t<div class=\"RequiredLabel\">Required Field</div>\r\n</div>\r\n",currentDeployment:{},guest:null,guestHandler:"",actionType:null,stateProvs:[],phoneCodes:[],firstName:null,lastName:null,emailAddress:null,address1:null,address2:null,city:null,state:null,postalCode:null,phone1Type:null,phone1Number:null,phone2Type:null,phone2Number:null,sendEmailCheckbox:null,userName:null,password1:null,password2:null,_query:true,_xhr:null,fillInTemplate:function(){this._populateDisplay();},postCreate:function(){},_populateDisplay:function(){if(this.state.options.length==0){var opt=document.createElement("option");opt.setAttribute("value","");opt.innerHTML="";this.state.appendChild(opt);for(var i=0;i<this.stateProvs.States.length;i++){opt=document.createElement("option");opt.setAttribute("value",this.stateProvs.States[i].Code);opt.innerHTML=this.stateProvs.States[i].Name;this.state.appendChild(opt);}}wtl.util.buildPhoneList(this.phone1Type,this.phoneCodes);wtl.util.buildPhoneList(this.phone2Type,this.phoneCodes);if(this.guest){this.firstName.value=this.guest.FirstName;this.lastName.value=this.guest.LastName;this.userName.innerHTML=this.guest.UserName;this.emailAddress.value=this.guest.EmailAddress;var a=this.guest.Address;this.address1.value=a.Address1?a.Address1:"";this.address2.value=a.Address2?a.Address2:"";this.city.value=a.City?a.City:"";this._setSelectedIndex(this.state,a.State?a.State:"");this.postalCode.value=a.PostalCode?a.PostalCode:"";var p=this.guest.Phones;if(p.length){this.phone1Number.value=p[0].Number?p[0].Number:"";this._setSelectedIndex(this.phone1Type,p[0].Code?p[0].Code:"");if(p[1]){this.phone2Number.value=p[1].Number?p[1].Number:"";this._setSelectedIndex(this.phone2Type,p[1].Code?p[1].Code:"");}}this.sendEmailCheckbox.checked=this.guest.SendEmail;}},refreshGuest:function(_f51){this._query=true;this.guest=_f51;},_setSelectedIndex:function(sl,val){sl.selectedIndex=0;for(var i=0;i<sl.options.length;i++){if(val==sl.options[i].value){sl.selectedIndex=i;return;}}},saveClick:function(evt){dojo.event.browser.stopEvent(evt);var _f56=this._validSave();if(_f56){var _f57={guestID:this.guest.GuestID,actionType:this.actionType.UPDATEGUEST,updates:dojo.json.serialize(_f56)};this._guestHandlerCall(_f57,dojo.lang.hitch(this,"_onSave"));}},onKeyPress:function(evt){if(evt.keyCode==13){this.saveClick(evt);}},_validSave:function(){if(this._xhr){this._showError("Your action is currently being processed.");return false;}var _f59={};if(dojo.string.trim(this.firstName.value).length==0){this.firstName.focus();this._showError("Please enter your first name.");return false;}else{_f59.FirstName=this.firstName.value;}if(dojo.string.trim(this.lastName.value).length==0){this.lastName.focus();this._showError("Please enter your last name.");return false;}else{_f59.LastName=this.lastName.value;}if(dojo.string.trim(this.emailAddress.value).length==0){this.emailAddress.focus();this._showError("Please enter your E-mail Address.");return false;}else{if(!dojo.validate.isEmailAddress(this.emailAddress.value)){this.emailAddress.focus();this._showError("The E-mail Address you entered is not valid. Please enter a valid E-mail Address.");return false;}else{_f59.EmailAddress=this.emailAddress.value;}}_f59.Address1=this.address1.value;_f59.City=this.city.value;_f59.Address2=this.address2.value;_f59.State=this.state[this.state.selectedIndex].value;_f59.PostalCode=this.postalCode.value;_f59.Phone1Code=this.phone1Type[this.phone1Type.selectedIndex].value;_f59.Phone2Code=this.phone2Type[this.phone2Type.selectedIndex].value;_f59.Phone1Number=this.phone1Number.value;_f59.Phone2Number=this.phone2Number.value;_f59.SendEmail=this.sendEmailCheckbox.checked;var p1=dojo.string.trim(this.password1.value);var p2=dojo.string.trim(this.password2.value);if(this.password1.value.length||this.password2.value.length){if(p1.length!=this.password1.value.length){this.password1.focus();this._showError("Your new password cannot contain spaces.");return false;}if(this.password1.value.length<7){this.password1.focus();this._showError("Your new password must be at least 7 characters long.");return false;}if(this.password1.value!=this.password2.value){this.password2.value="";this.password2.focus();this._showError("Your confirm password must match your new password.");return false;}_f59.UpdatePassword=true;_f59.Password=p1;}else{_f59.UpdatePassword=false;}return _f59;},deleteClick:function(evt){dojo.event.browser.stopEvent(evt);if(this._validDelete()){var _f5d={guestID:this.guest.GuestID,actionType:this.actionType.DELETEGUEST};this._guestHandlerCall(_f5d,dojo.lang.hitch(this,"_onDelete"));}},_validDelete:function(){if(this._xhr){this._showError("Your action is currently being processed.");return false;}return confirm("Are you sure you want to delete Your Account?");},_guestHandlerCall:function(_f5e,_f5f){this._xhr=dojo.io.bind({url:wtl.util.urlAppend(this.guestHandler,"rand="+(new Date()).getTime()),method:"post",content:_f5e,load:_f5f,error:dojo.lang.hitch(this,"_onBindError"),mimetype:"text/json",transport:"XMLHTTPTransport"});},_onBindError:function(){this._showError("An error occurred while processing your request. Please try again.");if(this._xhr){this._xhr.abort();this._xhr=null;}},_onSave:function(type,obj,_f62){this._xhr=null;this.password1.value="";this.password2.value="";if(obj&&obj.Success&&obj.Guest){this.onSave(obj.Guest);this._showSuccess("Your information has been successfully updated!");}else{this._showError("An error occurred while updating Your Account.  Please try again.");}},onSave:function(_f63){this.guest=_f63;},_onDelete:function(type,obj,_f66){this._xhr=null;if(obj&&obj.Success){this.onDelete();}else{this._showError("An error occurred while deleting Your Account.  Please try again.");}},onDelete:function(){this.guest=null;this.resetDisplay();},resetDisplay:function(){this.firstName.value="";this.lastName.value="";this.emailAddress.value="";this.address1.value="";this.address2.value="";this.city.value="";this._setSelectedIndex(this.state,"");this.postalCode.value="";this.phone1Number.value="";this._setSelectedIndex(this.phone1Type,"");this.phone2Number.value="";this._setSelectedIndex(this.phone2Type,"");this.password1.value="";this.password2.value="";this.sendEmailCheckbox.checked=true;},_showError:function(msg){this.showMessage(msg,true);},_showSuccess:function(msg){this.showMessage(msg,false);},showMessage:function(msg,_f6a){},checkGuest:function(){if(this._query){this._populateDisplay();this._query=false;}}});dojo.provide("wtl.widget.YourAccountListing");dojo.widget.defineWidget("wtl.widget.YourAccountListing",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"YourAccountListing",templateCssPath:null,templateString:"<div class=\"ListingInfo\">\r\n    <div class=\"ListingHolder\">\r\n        <a dojoAttachPoint=\"deleteButton\" dojoAttachEvent=\"onClick:deleteClick\" title=\"Remove from Your Account\" href=\"\" class=\"Delete\"><span></span></a>\r\n        <a dojoAttachPoint=\"alertButton\" dojoAttachEvent=\"onClick:_showAlerts\" title=\"View Updates for this Property\" href=\"\" class=\"Alert\"><span></span></a>\r\n       \r\n        <img class=\"ListingPhoto\" dojoAttachPoint=\"photo\" alt=\"\" dojoAttachEvent=\"onclick:_thumbClick\" />\r\n\t    <p class=\"Price\" dojoAttachPoint=\"price\"></p>\r\n\t    <p dojoAttachPoint=\"address\" class=\"Address\"></p>\r\n\t    <p class=\"CityStateZip\"><span dojoAttachPoint=\"city\"></span>, <span dojoAttachPoint=\"state\"></span> <span dojoAttachPoint=\"postalCode\"></span></p>\r\n\t    <div class=\"Tools\">\r\n\t        <input id=\"${this.widgetId}_compare\" dojoAttachPoint=\"compareCheckbox\" dojoAttachEvent=\"onClick:compareClick\" type=\"checkbox\" class=\"Checkbox\" />\r\n\t        <label for=\"${this.widgetId}_compare\" class=\"Checkbox\">Compare</label>\r\n\t        <a href=\"\" dojoAttachEvent=\"onClick:brochureClick\" dojoAttachPoint=\"brochureButton\" class=\"PrintBrochure\">Print Brochures</a>\r\n\t        <a href=\"#\" class=\"NotesLink\" dojoAttachPoint=\"notesLink\">Notes</a>\r\n\t        <div class=\"NotePreview\" dojoAttachPoint=\"noteHolder\">Notes: <span dojoAttachPoint=\"notePreview\"></span></div>\r\n\t    </div>    \r\n\t    <div class=\"AlertDetail\" dojoAttachPoint=\"alertHolder\">\r\n            <a class=\"Close\" href=\"\" title=\"Close\" dojoattachevent=\"onClick:_showAlerts\"><span>Close</span></a>\t\r\n            <a class=\"Clear\" href=\"\" title=\"Clear Alerts\" dojoattachevent=\"onClick:_clearAlerts\"><span dojoAttachPoint=\"clearAlertLabel\">Clear Alerts</span></a>\t\r\n            <div dojoAttachPoint=\"alertDetail\"></div>  \r\n\t    </div>\r\n\t    <div class=\"IDXContainer\" dojoAttachPoint=\"idxContainer\">\r\n\t\t\t<div dojoAttachPoint=\"idxText\" class=\"IDXText\"></div>\r\n\t\t</div>\r\n\t    <div class=\"ListedBy\" dojoAttachPoint=\"listedBy\"></div>\r\n\t    <div class=\"ActiveStatus\" dojoAttachPoint=\"propertyStatus\" dojoAttachEvent=\"onclick:_thumbClick\"></div>\r\n\t</div>\r\n</div>\r\n",currentDeployment:{},guest:null,listing:null,listingType:null,photo:null,deleteButton:null,alertButton:null,alertDetail:null,brochureButton:null,price:null,address:null,city:null,state:null,postalCode:null,notesLink:null,notePreview:null,noteHolder:null,notes:null,compareCheckbox:null,alerts:null,inlineEditor:null,_xhr:null,fillInTemplate:function(){},postCreate:function(){if(this.listing){this.propertyStatus.className=this.listing.ListingStatusCode+"Status";var _f6b=parseInt(dojo.html.getComputedStyle(this.photo,"width"));if(this.listing.Images){if(this.listing.MissingImage){this.photo.src="/ResizeImage.c?Width="+_f6b+"&Image="+this.listing.MissingImage+"&u="+this.listing.PicTicks+"&Make4x3=true";}else{dojo.debug(this.listing.Images[0].file);this.photo.src="/ResizeImage.c?Width="+_f6b+"&Image="+this.listing.Prefix+"320px/"+this.listing.Images[0].file+"&u="+this.listing.PicTicks+"&Make4x3=true";}}else{var s=this.listing.ThumbImage;var p=s.indexOf("?");if(p!=-1&&s.length>p+1){p++;var _f6e=s.substring(p).split("&");for(var i=0;i<_f6e.length;i++){var part=_f6e[i].toLowerCase();if(part.indexOf("width=")!=-1||part.indexOf("max=")!=-1){_f6e[i]="Width="+_f6b;}}this.photo.src=s.substring(0,p)+_f6e.join("&");}}this.price.innerHTML=this.listing.PriceDisplay;if(this.listing.PriceType&&this.listing.PriceType.length>0){this.price.innerHTML+=" "+this.listing.PriceType;}this.address.innerHTML=(this.listing.Address&&this.listing.Address.length?this.listing.Address:"")+(this.listing.Address2&&this.listing.Address2!=""?"<br />"+this.listing.Address2:"");this.city.innerHTML=this.listing.City;this.state.innerHTML=this.listing.State;this.postalCode.innerHTML=this.listing.PostalCode;if(!this.listing.Note){dojo.html.setDisplay(this.noteHolder,false);}var text=(!this.listing.Note)?"":this.listing.Note;dojo.html.setDisplay(this.idxContainer,false);dojo.html.setDisplay(this.listedBy,false);if(this.listing.PropertyID<=0){this.idxText.innerHTML=this.listing.ListingCourtesy;dojo.html.setDisplay(this.idxContainer,true);dojo.html.addClass(this.idxText,"MLS"+this.listing.MLSProviderID);}else{this.listedBy.innerHTML=this.listing.ListingCourtesy;dojo.html.setDisplay(this.listedBy,true);}if(this.listing.Updates){var _f72=this.listing.Updates.split("|");var _f73=0;for(var i=0;i<_f72.length;i++){if(_f72[i].length>0){this.alertDetail.innerHTML+=_f72[i]+"<br />";_f73++;}}this.clearAlertLabel.innerHTML=(_f73>1)?"Clear Alerts":"Clear Alert";}else{this.alertButton.style.display="none";}this.inlineEditor=dojo.widget.createWidget("InlineEditBox",{mode:"textarea",value:text,compact:40},this.notePreview);dojo.event.connect(this.inlineEditor,"onSave",this,"saveClick");dojo.event.connect(this.inlineEditor,"onCancel",this,"_onNoteChange");dojo.event.connect(this.inlineEditor,"cancelEdit",this,"_onNoteEdit");dojo.event.connect(this.notesLink,"onclick",this,"notesClick");this.brochureButton.href="/Popups/PrintBrochures.aspx?"+(this.listing.ListingID>0?"ListingID="+this.listing.ListingID:"MLSID="+this.listing.MLSID+"&MLSProviderID="+this.listing.MLSProviderID);}},_showAlerts:function(evt){dojo.event.browser.stopEvent(evt);dojo.html.toggleDisplay(this.alertHolder);},_clearAlerts:function(evt){dojo.event.browser.stopEvent(evt);this.clearAlerts();},clearAlerts:function(){dojo.io.bind({url:"/SaveToHomeFile.c?ListingID="+this.listing.ListingID+"&MLSProviderID="+this.listing.MLSProviderID+"&MLSID="+this.listing.MLSID+"&Page=Search2&rand="+(new Date()).getTime(),method:"post",load:dojo.lang.hitch(this,"_processClearAlerts"),mimetype:"text/json",sync:true,transport:"XMLHTTPTransport"});},_processClearAlerts:function(type,data,_f78){if(data&&data.success){dojo.html.toggleDisplay(this.alertHolder);dojo.html.setDisplay(this.alertButton,false);this._showSuccess("You have cleared the alerts.");}},postAttachExternalEvents:function(){this.onDisplayCompareable(this.listing);},_thumbClick:function(evt){dojo.event.browser.stopEvent(evt);this.onYourListingClick(this.listing);},onYourListingClick:function(_f7a){},deleteClick:function(evt){dojo.event.browser.stopEvent(evt);if(this._validDelete()){var _f7c={guestID:this.guest.GuestID,listingType:this.listingType,guestListingID:this.listing.GuestListingID,actionType:this.actionType.DELETELISTING};this._guestHandlerCall(_f7c,dojo.lang.hitch(this,"_onDelete"));}},brochureClick:function(evt){if(dojo.lang.isFunction(ShowPrintBrochuresWin)){dojo.event.browser.stopEvent(evt);ShowPrintBrochuresWin(evt.currentTarget.href);}},compareClick:function(evt){this.toggleCompare(evt.target.checked,this.listing);},notesClick:function(evt){dojo.event.browser.stopEvent(evt);dojo.html.setDisplay(this.noteHolder,true);this.inlineEditor._beginEdit();},_onNoteChange:function(_f80){dojo.html.setDisplay(this.noteHolder,_f80.length);},saveClick:function(_f81,_f82,name){if(_f81!=_f82){var _f84={comments:_f81,guestListingID:this.listing.GuestListingID,actionType:this.actionType.UPDATELISTING};this._xhr=dojo.io.bind({url:wtl.util.urlAppend(this.guestHandler,"rand="+(new Date()).getTime()),method:"post",content:_f84,load:dojo.lang.hitch(this,"_onSave"),error:dojo.lang.hitch(this,"_onBindError"),mimetype:"text/json",transport:"XMLHTTPTransport"});this._onNoteChange(_f81);}},_onSave:function(type,obj,_f87){},_onDelete:function(type,obj,_f8a){this._xhr=null;if(obj&&obj.Success){this.onDelete(this.listing,this.listingType);}else{this._showError("An error occurred while processing your request. Please try again.");}},onDelete:function(_f8b,type){},_guestHandlerCall:function(_f8d,_f8e){this._xhr=dojo.io.bind({url:wtl.util.urlAppend(this.guestHandler,"rand="+(new Date()).getTime()),method:"post",content:_f8d,load:_f8e,error:dojo.lang.hitch(this,"_onBindError"),mimetype:"text/json",transport:"XMLHTTPTransport"});},_onBindError:function(){this._showError("An error occurred while processing your request. Please try again.");if(this._xhr){this._xhr.abort();this._xhr=null;}},_showError:function(msg){this.showMessage(msg,true);},_showSuccess:function(msg){this.showMessage(msg,false);},showMessage:function(msg,_f92){},_validDelete:function(){if(this._xhr){this._showError("Your action is currently being processed.");return false;}return confirm("Are you sure you want to remove this listing from Your Account?");},toggleCompare:function(_f93,item){},onDisplayCompareable:function(item){},onCompareItemToggled:function(item,_f97,_f98,_f99){if(wtl.util.listingsEqual(item,this.listing)){this.compareCheckbox.checked=_f97;}this.compareCheckbox.disabled=!this.compareCheckbox.checked&&_f98;},onUpdateCompareableDisplay:function(item,_f9b,_f9c){if(wtl.util.listingsEqual(item,this.listing)){this.compareCheckbox.checked=_f9b;}this.compareCheckbox.disabled=!this.compareCheckbox.checked&&_f9c;}});dojo.provide("wtl.widget.YourAccountYourListings");dojo.widget.defineWidget("wtl.widget.YourAccountYourListings",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"YourAccountYourListings",templateCssPath:null,templateString:"<div class=\"YourListings\">\r\n    \r\n    <div class=\"NoItems\" dojoAttachPoint=\"noPropertyContainer\">\r\n\t\t<p>You have no Saved Properties</p>\r\n\t</div>\r\n    <div dojoAttachPoint=\"favoritesContainer\" class=\"ListingContainer\"></div>\r\n\r\n</div>\r\n",currentDeployment:{},guest:null,guestHandler:"",actionType:null,imageWidth:100,resizeType:null,noPropertyContainer:null,favoritesContainer:null,_favorites:[],_alerts:[],_query:true,_xhr:null,listingType:{FAVORITE:0,ALERT:1,RECOMMENDED:2},fillInTemplate:function(){},postAttachExternalEvents:function(){this._getListings();},_toggleContainer:function(evt){dojo.event.browser.stopEvent(evt);var _f9e=dojo.byId(evt.currentTarget.id+"Container");dojo.html.setDisplay(_f9e,(_f9e.style.display=="none")?true:false);},showLoading:function(){},hideLoading:function(){},_getListings:function(){this.showLoading();if(this.guest){var _f9f={guestID:this.guest.GuestID,actionType:this.actionType.GETLISTINGS,imageWidth:this.imageWidth,resizeType:this.resizeType.WIDTH};this._guestHandlerCall(_f9f,dojo.lang.hitch(this,"_onGetListings"));}},_onGetListings:function(type,obj,_fa2){this._xhr=null;this.resetDisplay();this.hideLoading();if(obj&&obj.Success){this._favorites=obj.Favorites;this.checkDisplay();var _fa3=obj.Favorites.length;for(var i=0;i<_fa3;i++){this._addListing(obj.Favorites[i],this.listingType.FAVORITE,i>0);}}else{this._showError("An error occurred while processing your request. Please try again.");}},checkDisplay:function(){if(this._favorites.length>0){dojo.html.setDisplay(this.noPropertyContainer,false);}else{dojo.html.setDisplay(this.noPropertyContainer,true);}},_addListing:function(_fa5,type){var node=null;switch(type){case this.listingType.FAVORITE: node=this.favoritesContainer;break;case this.listingType.ALERT: break;}if(node){var div=document.createElement("div");node.appendChild(div);var _fa9={widgetId:"Listing_"+type+"_"+wtl.util.composeIds(_fa5),currentDeployment:this.currentDeployment,listing:_fa5,listingType:type,guest:this.guest,guestHandler:this.guestHandler,actionType:this.actionType};var w=dojo.widget.createWidget("wtl:YourAccountListing",_fa9,div);dojo.event.connect(w,"onDelete",this,"_onDeleteListing");dojo.event.connect(w,"showMessage",this,"showMessage");dojo.event.connect(w,"toggleCompare",this,"toggleCompare");dojo.event.connect(w,"onYourListingClick",this,"onYourListingClick");dojo.event.connect(w,"onDisplayCompareable",this,"onDisplayCompareable");dojo.event.connect(this,"onCompareItemToggled",w,"onCompareItemToggled");dojo.event.connect(this,"onUpdateCompareableDisplay",w,"onUpdateCompareableDisplay");w.postAttachExternalEvents();}},_isAlreadySaved:function(_fab){for(var i=0;i<this._favorites.length;i++){if(this._favorites[i].GuestListingID==_fab.GuestListingID){return true;}}return false;},refreshGuest:function(_fad){this._query=true;this.guest=_fad;},_guestHandlerCall:function(_fae,_faf){this._xhr=dojo.io.bind({url:wtl.util.urlAppend(this.guestHandler,"rand="+(new Date()).getTime()),method:"post",content:_fae,load:_faf,error:dojo.lang.hitch(this,"_onBindError"),mimetype:"text/json",transport:"XMLHTTPTransport"});},_onBindError:function(){this._showError("An error occurred while processing your request. Please try again.");if(this._xhr){this._xhr.abort();this._xhr=null;}},_onDeleteListing:function(_fb0,type){if(_fb0){var w=dojo.widget.byId("Listing_"+type+"_"+wtl.util.composeIds(_fb0));if(w){w.destroy();}var arr=[];switch(type){case this.listingType.FAVORITE: arr=this._favorites;break;case this.listingType.RECOMMENDED: arr=this._recommended;break;}for(var i=0;i<arr.length;i++){if(wtl.util.listingsEqual(arr[i],_fb0)){arr.splice(i,1);break;}}this.checkDisplay();}},onSaveToHomeFile:function(_fb5){if(this._isAlreadySaved(_fb5)){return;}this._favorites.push(_fb5);this._addListing(_fb5,this.listingType.FAVORITE,this._favorites.length>1);this.checkDisplay();},checkGuest:function(){if(this._query){this._getListings();this._query=false;}},resetDisplay:function(){dojo.lang.forEach(dojo.widget.byType("YourAccountListing"),dojo.lang.hitch(this,function(_fb6){dojo.event.disconnect(this,"onCompareItemToggled",_fb6,"onCompareItemToggled");dojo.event.disconnect(this,"onUpdateCompareableDisplay",_fb6,"onUpdateCompareableDisplay");wtl.util.disconnectAll(_fb6);_fb6.destroy();}));wtl.util.destroyChildren(this.favoritesContainer);this._favorites=[];},_showError:function(msg){this.showMessage(msg,true);},_showSuccess:function(msg){this.showMessage(msg,false);},showMessage:function(msg,_fba){},toggleCompare:function(_fbb,item){},onYourListingClick:function(item){},onDisplayCompareable:function(item){},onCompareItemToggled:function(item,_fc0,_fc1,_fc2){},onUpdateCompareableDisplay:function(item,_fc4,_fc5){}});dojo.provide("wtl.widget.YourAccountRegister");dojo.widget.defineWidget("wtl.widget.YourAccountRegister",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"YourAccountRegister",templateCssPath:null,templateString:"<div class=\"YourInfo\">\r\n\t<p class=\"SectionHeading\">Your Account Information</p>\r\n\t<div class=\"Container\">\r\n\t    <label class=\"Required\">Username</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"username\" type=\"text\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label class=\"Required\">Password</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"password1\" type=\"password\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label class=\"Required\">Confirm Password</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"password2\" type=\"password\" value=\"\" />\r\n\t</div>\r\n    <div class=\"Container\">\r\n\t    <label class=\"Required\">E-mail Address</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"emailAddress\" type=\"text\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label class=\"Required\">First Name</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"firstName\" type=\"text\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label class=\"Required\">Last Name</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"lastName\" type=\"text\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label>Address Line 1</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"address1\" type=\"text\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label>Address Line 2</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"address2\" type=\"text\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label>City</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"city\" type=\"text\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label>State</label>\r\n\t\t<select dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"state\" style=\"width:160px\"></select>\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label>Zip Code</label>\r\n\t\t<input class=\"Input\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"postalCode\" type=\"text\" value=\"\" style=\"width:80px\"/>\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label>Phone 1</label>\r\n\t\t<select class=\"Phone\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"phone1Type\" style=\"width:60px\"></select>\r\n\t\t<input class=\"Phone\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"phone1Number\" type=\"text\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<label>Phone 2</label>\r\n\t\t<select class=\"Phone\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"phone2Type\" style=\"width:60px\"></select>\r\n\t\t<input class=\"Phone\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"phone2Number\" type=\"text\" value=\"\" />\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<input id=\"${this.widgetId}_sendEmail\" checked=\"checked\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"sendEmailCheckbox\" type=\"checkbox\" class=\"Checkbox\" />\r\n\t\t<label for=\"${this.widgetId}_sendEmail\" class=\"Checkbox\">I am interested in receiving periodic updates via E-mail.</label>\r\n\t</div>\r\n\t<div class=\"Container\">\r\n\t\t<div class=\"Disableable Button\" id=\"Register\" style=\"margin-right:12px\"><a dojoAttachEvent=\"onclick:saveClick\" href=\"\">Register</a></div>\r\n\t\t<div class=\"Disableable Button\"><a dojoAttachEvent=\"onclick:cancel\" href=\"\">Cancel</a></div>\r\n\t</div>\r\n    <div class=\"RequiredLabel\">Required Field</div>\r\n</div>\r\n",currentDeployment:{},guest:null,guestHandler:"",registerHandler:"",actionType:null,stateProvs:[],phoneCodes:[],username:null,firstName:null,lastName:null,emailAddress:null,address1:null,address2:null,city:null,state:null,postalCode:null,phone1Type:null,phone1Number:null,phone2Type:null,phone2Number:null,sendEmailCheckbox:null,password1:null,password2:null,_xhr:null,fillInTemplate:function(){if(this.state.options.length==0){var opt=document.createElement("option");opt.setAttribute("value","");opt.innerHTML="";this.state.appendChild(opt);for(var i=0;i<this.stateProvs.States.length;i++){opt=document.createElement("option");opt.setAttribute("value",this.stateProvs.States[i].Code);opt.innerHTML=this.stateProvs.States[i].Name;this.state.appendChild(opt);}}wtl.util.buildPhoneList(this.phone1Type,this.phoneCodes);wtl.util.buildPhoneList(this.phone2Type,this.phoneCodes);},postCreate:function(){},_setSelectedIndex:function(sl,val){sl.selectedIndex=0;for(var i=0;i<sl.options.length;i++){if(val==sl.options[i].value){sl.selectedIndex=i;return;}}},saveClick:function(evt){dojo.event.browser.stopEvent(evt);var _fcc=this._validSave();if(_fcc){var _fcd={values:dojo.json.serialize(_fcc)};this._xhr=dojo.io.bind({url:wtl.util.urlAppend(this.registerHandler,"rand="+(new Date()).getTime()),method:"post",content:_fcd,load:dojo.lang.hitch(this,"_onSave"),error:dojo.lang.hitch(this,"_onBindError"),mimetype:"text/json",transport:"XMLHTTPTransport"});}},_onBindError:function(){this._showError("An error occurred while processing your request. Please try again.");if(this._xhr){this._xhr.abort();this._xhr=null;}},onKeyPress:function(evt){if(evt.keyCode==13){this.saveClick(evt);}},_validSave:function(){if(this._xhr){this._showError("Your action is currently being processed.");return false;}var _fcf={};if(dojo.string.trim(this.emailAddress.value).length==0){this.emailAddress.focus();this._showError("Please enter your E-mail Address.");return false;}else{if(!dojo.validate.isEmailAddress(this.emailAddress.value)){this.emailAddress.focus();this._showError("The E-mail Address you entered is not valid. Please enter a valid E-mail Address.");return false;}else{_fcf.EmailAddress=this.emailAddress.value;}}var p1=dojo.string.trim(this.password1.value);var p2=dojo.string.trim(this.password2.value);if(p1.length!=this.password1.value.length){this.password1.focus();this._showError("Your new password cannot contain spaces.");return false;}if(p1.length<7){this.password1.focus();this._showError("Your new password must be at least 7 characters long.");return false;}if(p1!=p2){this.password2.value="";this.password2.focus();this._showError("Your confirm password must match your new password.");return false;}_fcf.Password=p1;if(dojo.string.trim(this.firstName.value).length==0){this.firstName.focus();this._showError("Please enter your first name.");return false;}else{_fcf.FirstName=this.firstName.value;}if(dojo.string.trim(this.lastName.value).length==0){this.lastName.focus();this._showError("Please enter your last name.");return false;}else{_fcf.LastName=this.lastName.value;}_fcf.UserName=this.username.value;_fcf.Address1=this.address1.value;_fcf.Address2=this.address2.value;_fcf.City=this.city.value;_fcf.State=this.state[this.state.selectedIndex].value;_fcf.PostalCode=this.postalCode.value;_fcf.Phone1Code=this.phone1Type[this.phone1Type.selectedIndex].value;_fcf.Phone2Code=this.phone2Type[this.phone2Type.selectedIndex].value;_fcf.Phone1Number=this.phone1Number.value;_fcf.Phone2Number=this.phone2Number.value;_fcf.SendEmail=this.sendEmailCheckbox.checked;return _fcf;},_onSave:function(type,obj,_fd4){this._xhr=null;if(obj&&obj.Success&&obj.Guest){this.onSave(obj.Guest);this.resetDisplay();if(typeof pageTracker!="undefined"){pageTracker._trackPageview("/goals/create-an-account-thanks.html");}}else{if(obj&&obj.Message){this._showError(obj.Message);}else{this._showError("There was an error during registration. Please try again.");}}},onSave:function(_fd5){this.guest=_fd5;},resetDisplay:function(){this.username.value="";this.firstName.value="";this.lastName.value="";this.emailAddress.value="";this.address1.value="";this.address2.value="";this.city.value="";this._setSelectedIndex(this.state,"");this.postalCode.value="";this.phone1Number.value="";this._setSelectedIndex(this.phone1Type,"");this.phone2Number.value="";this._setSelectedIndex(this.phone2Type,"");this.password1.value="";this.password2.value="";this.sendEmailCheckbox.checked=false;},_showError:function(msg){this.showMessage(msg,true);},_showSuccess:function(msg){this.showMessage(msg,false);},showMessage:function(msg,_fd9){},cancel:function(evt){dojo.event.browser.stopEvent(evt);this.resetDisplay();}});dojo.provide("wtl.widget.YourAccountPassword");dojo.widget.defineWidget("wtl.widget.YourAccountPassword",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"YourAccountPassword",templateCssPath:null,templateString:"<div class=\"ResetPassword\">\r\n\r\n\t<p class=\"SectionHeading\">Reset Password</p>\r\n\t<p>Please enter the following information.</p>\r\n\t\r\n\t<div class=\"Container\">\r\n\t    <label>Username</label>\r\n\t    <input class=\"LoginInput\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"userName\" maxlength=\"100\" type=\"text\" tabindex=\"1\" value=\"\" />\r\n    </div>\r\n    \r\n\t<div class=\"Container\">\r\n\t    <label>E-mail Address</label>\r\n\t    <input class=\"LoginInput\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"emailAddress\" maxlength=\"100\" type=\"text\" tabindex=\"1\" value=\"\" />\r\n    </div>\r\n    \r\n    <div class=\"Container\">\r\n        <div class=\"Disableable Button\" id=\"Reset\"><a dojoAttachEvent=\"onclick:saveClick\" href=\"\">Submit</a></div>\r\n\t    <div class=\"Disableable Button\"><a dojoAttachEvent=\"onclick:cancel\" href=\"\">Cancel</a></div>\r\n\t</div>\r\n\t\r\n</div>\r\n",currentDeployment:{},resetPasswordHandler:"",onSaveCallBack:null,userName:null,emailAddress:null,_xhr:null,saveClick:function(evt){dojo.event.browser.stopEvent(evt);var _fdc=this._validSave();if(_fdc){this._xhr=dojo.io.bind({url:wtl.util.urlAppend(this.resetPasswordHandler,"rand="+(new Date()).getTime()),method:"post",content:_fdc,load:dojo.lang.hitch(this,"_onSave"),error:dojo.lang.hitch(this,"_onBindError"),mimetype:"text/json",transport:"XMLHTTPTransport"});}},_onBindError:function(){this._showError("An error occurred while processing your request. Please try again.");if(this._xhr){this._xhr.abort();this._xhr=null;}},onKeyPress:function(evt){if(evt.keyCode==13){this.saveClick(evt);}},_validSave:function(){if(this._xhr){this._showError("Your action is currently being processed.");return false;}if(dojo.string.trim(this.userName.value).length==0){this.userName.focus();this._showError("Please enter your Username.");return false;}if(dojo.string.trim(this.emailAddress.value).length==0){this.emailAddress.focus();this._showError("Please enter your E-mail Address.");return false;}else{if(!dojo.validate.isEmailAddress(this.emailAddress.value)){this.emailAddress.focus();this._showError("The E-mail Address you entered is not valid. Please enter a valid E-mail Address.");return false;}}return {Username:this.userName.value,EmailAddress:this.emailAddress.value};},_onSave:function(type,obj,_fe0){this._xhr=null;if(obj&&obj.Success){this.resetDisplay();this.onSave(this.emailAddress.value);if(obj.Message){this._showSuccess(obj.Message);}}else{if(obj&&obj.Message){this._showError(obj.Message);}else{this._showError("There was a problem updating your password. Please try again.");}}},onSave:function(_fe1){},resetDisplay:function(){this.userName.value="";this.emailAddress.value="";},_showError:function(msg){this.showMessage(msg,true);},_showSuccess:function(msg){this.showMessage(msg,false);},showMessage:function(msg,_fe5){},cancel:function(evt){dojo.event.browser.stopEvent(evt);this.resetDisplay();},defaultFill:function(_fe7){this.userName.value=_fe7;}});dojo.provide("wtl.widget.YourAccountPane");dojo.widget.defineWidget("wtl.widget.YourAccountPane",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"YourAccountPane",templateCssPath:null,templateString:"<div class=\"YourAccountPane\">\r\n    \r\n    <div class=\"MessageContainer\" dojoAttachPoint=\"messageContainer\" style=\"display:none;\">\r\n\t\t<a dojoAttachEvent=\"onclick:_clearMessage\" class=\"Close\"></a><span class=\"StatusMessage\" dojoAttachPoint=\"statusMessage\"></span>\r\n\t</div>\r\n\t\r\n\t<div dojoAttachPoint=\"loggedOutPanel\">\r\n\t\t<div dojoAttachPoint=\"loginForm\">\r\n\t\t\t<div class=\"Wrap\">\r\n\t\t\t    <br />\r\n\t\t\t\t<div class=\"Container\">\r\n\t\t\t\t\t<label>Username</label>\r\n\t\t\t\t\t<input class=\"LoginInput\" dojoAttachPoint=\"userNameInput\" dojoAttachEvent=\"onkeypress:onLoggedOutKeyPress\" maxlength=\"100\" type=\"text\" tabindex=\"1\" />\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div class=\"Container\">\r\n\t\t\t\t\t<label>Password</label>\r\n\t\t\t\t\t<input class=\"LoginInput\" dojoAttachPoint=\"passwordInput\" dojoAttachEvent=\"onkeypress:onLoggedOutKeyPress\" maxlength=\"16\" type=\"password\" tabindex=\"2\" />\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div class=\"Container\">\r\n\t\t\t\t\t<div class=\"Disableable Button\" id=\"SignIn\"><a dojoAttachEvent=\"onclick:attemptLogin\" href=\"\" tabindex=\"3\">Sign In</a></div>\r\n\t\t\t\t\t<input id=\"${this.widgetId}_autoLogin\" dojoAttachPoint=\"autoLoginCheckbox\" type=\"checkbox\" checked=\"checked\" class=\"Checkbox\" />\r\n\t\t\t\t\t<label for=\"${this.widgetId}_autoLogin\" class=\"Checkbox\">Automatically sign in on this computer.</label>\r\n\t\t\t\t</div>\r\n\t\t\t\t\r\n\t\t\t\t<div class=\"Container\">\r\n\t\t\t\t    <a href=\"\" class=\"ForgotPassword\" dojoAttachEvent=\"onclick:onForgotPasswordClick\">Forgot Your Password? Click Here</a>\r\n\t\t\t\t</div>\r\n\t\t\t\r\n\t\t\t\t<div class=\"Separator\"></div>\r\n\t\t\t\r\n\t\t\t\t<div class=\"Container\">\r\n\t\t\t\t\t<p>Register to create a new Account</p>\r\n\t\t\t\t\t<div class=\"Disableable Button\"><a dojoAttachEvent=\"onclick:registerClick\" href=\"\">Register</a></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<div class=\"AdditionalInfo\" dojoAttachPoint=\"additionalInfo\">\r\n\t\t\t\t<p class=\"SectionHeading\">About Your Account</p>\r\n\t\t\t\t<p>This free service allows you to:</p>\r\n\t\t\t\t<ul>\r\n\t\t\t\t\t<li>Save and view your favorite properties</li>\r\n\t\t\t\t\t<li>Save and view your recent home searches</li>\r\n\t\t\t\t\t<li>Schedule automated E-mail updates</li>\r\n\t\t\t\t\t<!--<li>Receive agent-recommended listings</li>\r\n\t\t\t\t\t<li>Receive RSS search updates via your favorite RSS Reader</li>-->\r\n\t\t\t\t\t<li>Create a personal profile</li>\r\n\t\t\t\t\t<li>Receive property alerts - Automatically track your favorite properties with price, status and open house alerts.</li>\r\n\t\t\t\t\t<li>And more!</li>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"Wrap\">\r\n\t\t    <div dojoAttachPoint=\"forgotPasswordForm\" style=\"display:none;\"></div>\r\n\t\t</div>\r\n\t\t<div dojoAttachPoint=\"registerForm\" style=\"display:none;\"></div>\r\n\t</div>\r\n\r\n\t<div class=\"LoggedInPanel\" dojoAttachPoint=\"loggedInPanel\" style=\"display:none;\">\r\n\r\n\t\t<div dojoAttachPoint=\"tabContainer\" class=\"TabContainer\">\r\n\t\t\t<div class=\"Disableable Tab\" id=\"FarLeft\" dojoAttachPoint=\"savedSearchesTab\" dojoAttachEvent=\"onclick:savedSearchesClick\">\r\n\t\t\t\t<a>Saved Searches</a>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"Disableable Tab\" dojoAttachPoint=\"yourListingsTab\" dojoAttachEvent=\"onclick:yourListingsClick\">\r\n\t\t\t\t<a>Saved Properties</a>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"Disableable Tab\" id=\"FarRight\" dojoAttachPoint=\"yourInfoTab\" dojoAttachEvent=\"onclick:yourInfoClick\" style=\"width:112px;\">\r\n\t\t\t\t<a>Your Information</a>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t\r\n\t\t<div dojoAttachPoint=\"tabContent\" class=\"TabContent\" style=\"height:200px\">\r\n\t\t\t<div dojoAttachPoint=\"widgetPlaceHolder\"></div>\r\n\t\t</div>\r\n\t\t\r\n\t\t<div dojoAttachPoint=\"wwmoContent\" class=\"wwmoContent\">\r\n\t\t    <div class=\"Titlebar\">Working Online With:</div>\r\n\t\t    <div class=\"NoItems\" dojoAttachPoint=\"noWWMOContainer\">\r\n\t\t        <p>You have not selected a Sales Associate.</p>\r\n\t        </div>\r\n            <div dojoAttachPoint=\"wwmoContainer\" class=\"wwmoContainer\" style=\"display:none;\">\r\n                <img class=\"WWMOphoto\" alt=\"\" dojoAttachPoint=\"WWMOphoto\" dojoAttachEvent=\"onclick:_WWMOClick\" style=\"cursor: pointer\"/>\r\n                <div class=\"AgentName\" dojoAttachPoint=\"contactName\" dojoAttachEvent=\"onclick:_WWMOClick\" style=\"cursor: pointer\"></div>\r\n                <a href=\"\" class=\"EmailMe\" dojoAttachEvent=\"onclick:_emailMeClick\">E-mail Me</a>\r\n                <a href=\"\" class=\"wwmoLink\" dojoAttachPoint=\"wwmoLink\" dojoAttachEvent=\"onclick:removeWWMOClick\"></a>\r\n            </div>\r\n\t\t</div>\r\n\t</div>\r\n\r\n</div>\r\n",currentDeployment:{},checkUser:false,guestHandler:"",registerHandler:"",resetPasswordHandler:"",label:"Your Account",defaultTabIndex:0,imageWidth:100,stateProvs:[],phoneCodes:[],errorMessageCSS:"Error",suppressAccountDetails:false,onCloseCallback:null,onOpenCallback:null,showLoadingCallback:null,hideLoadingCallback:null,messageContainer:null,loggedInPanel:null,loggedOutPanel:null,userNameInput:null,passwordInput:null,autoLoginCheckbox:null,additionalInfo:null,statusMessage:null,wwmoContent:null,wwmoLink:null,tabContainer:null,tabContent:null,savedSearchesTab:null,yourListingsTab:null,yourInfoTab:null,widgetPlaceHolder:null,loginForm:null,forgotPasswordForm:null,registerForm:null,loginButton:null,logoutButton:null,_agent:null,_pane:null,_validLogin:true,_guest:null,_widgetPane:null,_savedSearchesWidget:null,_yourListingsWidget:null,_yourInfoWidget:null,_registerWidget:null,_resetPasswordWidget:null,_animTimer:null,_updatedAgent:false,_xhr:null,actionType:{GETGUEST:0,GETSAVEDSEARCHES:1,GETLISTINGS:2,UPDATEGUEST:3,DELETEGUEST:4,DELETELISTING:5,DELETESAVEDSEARCH:6,UPDATENOTIFICATION:7,UPDATELISTING:8},resizeType:{WIDTH:0,HEIGHT:1,MAX:2},postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/YourAccountPane.css");}}},postCreate:function(){if(this.checkUser){this._attemptLogin();}this._disableButtonSelections();dojo.lang.setTimeout(this,"superSize",500);dojo.event.connect("before",this,"_attemptLogin",this,"_validateLogin");this.wwmoContent.style.display=(this.directAgentID==0)?"":"none";if(this.showRegister){this._showRegister();}},attemptLogin:function(evt){dojo.event.browser.stopEvent(evt);this._attemptLogin();},logOut:function(evt){if(evt){dojo.event.browser.stopEvent(evt);}this._guestHandlerCall({logout:true},dojo.lang.hitch(this,"_onLogout"));this.removedWidgets();},onLoggedOutKeyPress:function(evt){if(evt.keyCode==13){dojo.event.browser.stopEvent(evt);this.passwordInput.blur();this._attemptLogin();}},onForgotPasswordClick:function(evt){dojo.event.browser.stopEvent(evt);this._showResetPassword();},registerClick:function(evt){dojo.event.browser.stopEvent(evt);this._showRegister();},onAboutAutoLoginClick:function(evt){dojo.event.browser.stopEvent(evt);if(dojo.lang.isFunction(ShowHelp)){ShowHelp("AutomaticLogin");}},savedSearchesClick:function(evt){dojo.event.browser.stopEvent(evt);this._showSavedSearches(evt.currentTarget);},yourListingsClick:function(evt){dojo.event.browser.stopEvent(evt);this._showYourListings(evt.currentTarget);},yourInfoClick:function(evt){dojo.event.browser.stopEvent(evt);this._showYourInfo(evt.currentTarget);},_onLogin:function(type,obj,_ff3){this._xhr=null;if(obj&&obj.Success&&obj.Guest){this._refreshGuest(obj.Guest);this.onLogin(this._guest);if(!this.suppressAccountDetails){if(obj.Agent){if(!this._updatedAgent){this._loadWWMO(obj.Agent);}}this._showLoggedInPanel();}else{this._showLoggedOutPanel();}this._resetLoginValues();}else{this._showError("The system could not sign you in.");}this.onLoginComplete();},onLoginComplete:function(){},_onLogout:function(type,obj,_ff6){this._xhr=null;dojo.html.setDisplay(this.loggedInPanel,false);this._showLoggedOutPanel();this.onLogout(this._guest);},saveSearch:function(_ff7,_ff8,_ff9){},rerunSearch:function(_ffa){},onLogin:function(_ffb){},onLogout:function(_ffc){},onTabClick:function(idx){},onDialogShow:function(){if(this.userNameInput){try{this.userNameInput.focus();}catch(x){dojo.debug(x);}}},_onTabClick:function(e){var idx=0;var nodes=dojo.html.getElementsByClass("Tab",this.tabContainer,"div");for(var i=0;i<nodes.length;i++){if(nodes[i]==e){idx=i;dojo.html.addClass(e,"Selected");}else{dojo.html.removeClass(nodes[i],"Selected");}}this.onTabClick(idx);},_showWidget:function(w){var wp=this._widgetPane;var c=wp.children;if(c[0]){if(c[0]==w){if(dojo.lang.isFunction(w.checkGuest)){w.checkGuest();}return;}wp.removeChild(c[0]);}wp.addChild(w);if(dojo.lang.isFunction(w.checkGuest)){w.checkGuest();}},removedWidgets:function(){var wp=this._widgetPane;var c=wp.children;if(c[0]){wp.removeChild(c[0]);}},_loadWWMO:function(agent){this._agent=agent;dojo.html.setDisplay(this.noWWMOContainer,false);dojo.html.setDisplay(this.wwmoContainer,true);var path=(agent.PicExists)?"/ResizeImage.c?Image=/Users/pic"+agent.WTLUserID+".jpg&Width=66&u="+agent.PicTicks+"&Make4x3=true&BG=ffffff":"/ResizeImage.c?Image=/Users/Default/broker_"+this.currentDeployment.brokerId+"/320px.jpg&Width=66";this.WWMOphoto.src=path;this.contactName.innerHTML=agent.FirstName+" "+agent.LastName+(agent.Suffix?" "+agent.Suffix:"");this.wwmoLink.innerHTML="Stop Working Online with "+agent.FirstName;},_WWMOClick:function(evt){dojo.event.browser.stopEvent(evt);this.WWMOClick(this._agent);},WWMOClick:function(agent){},updateWWMO:function(agent){this.openPane();this._loadWWMO(agent);this._resizeLoggedInPanel();},removeWWMOClick:function(evt){dojo.event.browser.stopEvent(evt);if(confirm("Are you sure you want to stop working online with this Sales Associate?")){this.workWithMeOnline(false,0);}},workWithMeOnline:function(_100d,id){},processWorkWithMe:function(agent){if(agent.WTLUserID==0){dojo.html.setDisplay(this.noWWMOContainer,true);dojo.html.setDisplay(this.wwmoContainer,false);}else{this._updatedAgent=true;this.updateWWMO(agent);}},_showSavedSearches:function(e){this._onTabClick(e);if(!this._savedSearchesWidget){var _1011={currentDeployment:this.currentDeployment,notificationTypes:this.notificationTypes,guest:this._guest,guestHandler:this.guestHandler,actionType:this.actionType,parentPanel:this.tabContent};this._savedSearchesWidget=dojo.widget.createWidget("wtl:YourAccountSavedSearches",_1011);dojo.event.connect(this._savedSearchesWidget,"showMessage",this,"_showMessage");dojo.event.connect(this._savedSearchesWidget,"saveSearch",this,"saveSearch");dojo.event.connect(this._savedSearchesWidget,"rerunSearch",this,"rerunSearch");dojo.event.connect(this,"onSaveSearch",this._savedSearchesWidget,"addSearch");dojo.event.connect(this,"onUpdateSearch",this._savedSearchesWidget,"updateSearch");dojo.event.connect(this,"_refreshGuest",this._savedSearchesWidget,"refreshGuest");dojo.event.connect(this,"_onLogout",this._savedSearchesWidget,"resetDisplay");}this._showWidget(this._savedSearchesWidget);},_showYourListings:function(e){this._onTabClick(e);if(!this._yourListingsWidget){var _1013={currentDeployment:this.currentDeployment,guest:this._guest,guestHandler:this.guestHandler,actionType:this.actionType,imageWidth:this.imageWidth,resizeType:this.resizeType};this._yourListingsWidget=dojo.widget.createWidget("wtl:YourAccountYourListings",_1013);dojo.event.connect(this._yourListingsWidget,"showMessage",this,"_showMessage");dojo.event.connect(this._yourListingsWidget,"showLoading",this,"showLoadingCallback");dojo.event.connect(this._yourListingsWidget,"hideLoading",this,"hideLoadingCallback");dojo.event.connect(this,"_refreshGuest",this._yourListingsWidget,"refreshGuest");dojo.event.connect(this,"_onLogout",this._yourListingsWidget,"resetDisplay");dojo.event.connect(this._yourListingsWidget,"toggleCompare",this,"toggleCompare");dojo.event.connect(this._yourListingsWidget,"onYourListingClick",this,"onYourListingClick");dojo.event.connect(this._yourListingsWidget,"onDisplayCompareable",this,"onDisplayCompareable");dojo.event.connect(this,"onCompareItemToggled",this._yourListingsWidget,"onCompareItemToggled");dojo.event.connect(this,"onUpdateCompareableDisplay",this._yourListingsWidget,"onUpdateCompareableDisplay");dojo.event.connect(this,"onSaveToHomeFile",this._yourListingsWidget,"onSaveToHomeFile");}this._showWidget(this._yourListingsWidget);},_showYourInfo:function(e){this._onTabClick(e);if(!this._yourInfoWidget){var _1015={currentDeployment:this.currentDeployment,guest:this._guest,guestHandler:this.guestHandler,actionType:this.actionType,stateProvs:this.stateProvs,phoneCodes:this.phoneCodes};this._yourInfoWidget=dojo.widget.createWidget("wtl:YourAccountYourInfo",_1015);dojo.event.connect(this._yourInfoWidget,"showMessage",this,"_showMessage");dojo.event.connect(this._yourInfoWidget,"onDelete",this,"_onDeleteAccount");dojo.event.connect(this._yourInfoWidget,"onSave",this,"_onSaveAccount");dojo.event.connect(this,"_refreshGuest",this._yourInfoWidget,"refreshGuest");dojo.event.connect(this,"_onLogout",this._yourInfoWidget,"resetDisplay");}this._showWidget(this._yourInfoWidget);},_disableButtonSelections:function(){var nodes=dojo.html.getElementsByClass("Disableable",this.domNode,"div");for(var i=0;i<nodes.length;i++){dojo.html.disableSelection(nodes[i]);}},_attemptLogin:function(){if(this._validLogin){var _1018={u:this.userNameInput.value,p:this.passwordInput.value,al:this.autoLoginCheckbox.checked,actionType:this.actionType.GETGUEST};this._guestHandlerCall(_1018,dojo.lang.hitch(this,"_onLogin"));}},_guestHandlerCall:function(_1019,_101a){this._xhr=dojo.io.bind({url:wtl.util.urlAppend(this.guestHandler,"rand="+(new Date()).getTime()),method:"post",content:_1019,load:_101a,error:dojo.lang.hitch(this,"_onBindError"),mimetype:"text/json",transport:"XMLHTTPTransport"});},_onBindError:function(){this._showError("An error occurred while processing your request. Please try again.");if(this._xhr){this._xhr.abort();this._xhr=null;}},_validateLogin:function(){if(this._xhr){this._showError("Your action is currently being processed.");return false;}if(dojo.string.trim(this.userNameInput.value).length==0){this._showError("Please enter your Username.");this.userNameInput.focus();this._validLogin=false;return;}if(dojo.string.trim(this.passwordInput.value).length==0){this._showError("Please enter your password.");this.passwordInput.focus();this._validLogin=false;return;}this._validLogin=true;},_resetLoginValues:function(){this.userNameInput.value="";this.passwordInput.value="";this.autoLoginCheckbox.checked=true;},_showLoggedInPanel:function(){if(!dojo.html.isDisplayed(this.loggedInPanel)){if(!this._widgetPane){this._widgetPane=dojo.widget.createWidget("ContentPane",{},this.widgetPlaceHolder);}dojo.html.setDisplay(this.loggedOutPanel,false);dojo.html.setDisplay(this.loggedInPanel,true);switch(this.defaultTabIndex){case 2: this._showYourInfo(this.yourInfoTab);break;case 1: this._showYourListings(this.yourListingsTab);break;case 0: default: this._showSavedSearches(this.savedSearchesTab);break;}this._resizeLoggedInPanel();}},_showLoggedOutPanel:function(){dojo.html.setDisplay(this.loggedOutPanel,true);this._showLoginPane();this._setFocus();this._resizeLoggedOutPanel();},setPane:function(pane){this._pane=pane;},openPane:function(){if(this._pane){this._pane.onLabelClick();}this._setFocus();},showPane:function(){if(this._pane){this._pane.onLabelClick();}},showLoggedOutPanel:function(){this._showLoggedOutPanel();},_setFocus:function(){var self=this;setTimeout(function(){try{self.userNameInput.focus();}catch(x){dojo.debug(x);}},300);},superSize:function(){this._resizeLoggedOutPanel();this._resizeLoggedInPanel();},_resizeLoggedOutPanel:function(){if(dojo.html.isDisplayed(this.loggedOutPanel)&&this._pane){this.additionalInfo.style.height="";var _101d=dojo.html.getMarginBox(this.loggedOutPanel).height+5;var _101e=dojo.html.getContentBox(this.additionalInfo).height-5;var _101f=dojo.html.getMarginBox(this._pane.containerNode).height+5;var h=_101e+(_101f-_101d);if(this.parent&&this.parent.containerNode){if(this._registerWidget&&this._registerWidget.domNode&&dojo.html.isDisplayed(this._registerWidget.domNode)&&_101d>_101f){this.parent.containerNode.style.overflowY="scroll";}else{this.parent.containerNode.style.overflowY="hidden";}}this.additionalInfo.style.height=(h<20?20:h)+"px";this.additionalInfo.scrollTop=0;}},_resizeLoggedInPanel:function(){if(dojo.html.isDisplayed(this.loggedInPanel)&&this._pane){this.tabContent.style.height="";var _1021=dojo.html.getContentBox(this.tabContent).height;var _1022=dojo.html.getMarginBox(this._pane.containerNode).height+5;var _1023=dojo.html.getMarginBox(this.loggedInPanel).height+5;var h=_1021+(_1022-_1023);this.tabContent.style.height=(h<20?20:h)+"px";this.tabContent.scrollTop=0;}},_onDeleteAccount:function(){this._onLogout();},_onSaveAccount:function(guest){this._refreshGuest(guest);this.onLogin(this._guest);},_refreshGuest:function(guest){this._guest=guest;},onSaveSearch:function(_1027){this._showSavedSearches(this.savedSearchesTab);this._savedSearchesWidget.closeSearch();},onUpdateSearch:function(_1028){},_showError:function(msg){this._showMessage(msg,true);},_showSuccess:function(msg){this._showMessage(msg,false);},_showMessage:function(msg,_102c){},clearMessage:function(){},onHide:function(){wtl.widget.YourAccountPane.superclass.onHide.call(this);if(dojo.html.isDisplayed(this.loggedOutPanel)){this._showLoginPane();}},_showRegister:function(){if(!this._registerWidget){var _102d={currentDeployment:this.currentDeployment,guestHandler:this.guestHandler,registerHandler:this.registerHandler,actionType:this.actionType,stateProvs:this.stateProvs,phoneCodes:this.phoneCodes};this._registerWidget=dojo.widget.createWidget("wtl:YourAccountRegister",_102d,this.registerForm);dojo.event.connect(this._registerWidget,"cancel",this,"_showLoginPane");dojo.event.connect(this._registerWidget,"onSave",this,"_onCreateAccount");dojo.event.connect(this._registerWidget,"showMessage",this,"_showMessage");}this._hideLoginPane();this._hideResetPassword();dojo.html.setDisplay(this._registerWidget.domNode,true);this.domNode.scrollTop=0;this.superSize();if(typeof pageTracker!="undefined"){pageTracker._trackPageview("/goals/create-an-account.html");}},_hideRegister:function(){if(this._registerWidget){dojo.html.setDisplay(this._registerWidget.domNode,false);}},_showResetPassword:function(){if(!this._resetPasswordWidget){var _102e={currentDeployment:this.currentDeployment,resetPasswordHandler:this.resetPasswordHandler,actionType:this.actionType};this._resetPasswordWidget=dojo.widget.createWidget("wtl:YourAccountPassword",_102e,this.forgotPasswordForm);dojo.event.connect(this._resetPasswordWidget,"cancel",this,"_showLoginPane");dojo.event.connect(this._resetPasswordWidget,"onSave",this,"_onResetPassword");dojo.event.connect(this._resetPasswordWidget,"showMessage",this,"_showMessage");}this._resetPasswordWidget.defaultFill(this.userNameInput.value);this._hideLoginPane();this._hideRegister();dojo.html.setDisplay(this._resetPasswordWidget.domNode,true);this.domNode.scrollTop=0;this.superSize();},_hideResetPassword:function(){if(this._resetPasswordWidget){dojo.html.setDisplay(this._resetPasswordWidget.domNode,false);}},_showLoginPane:function(){this._hideRegister();this._hideResetPassword();dojo.html.setDisplay(this.loginForm,true);this.superSize();},_hideLoginPane:function(){dojo.html.setDisplay(this.loginForm,false);this._resetLoginValues();},_onCreateAccount:function(guest){this._refreshGuest(guest);this.onLogin(this._guest);if(!this.suppressAccountDetails){this._showLoggedInPanel();}else{this._showLoggedOutPanel();}this._resetLoginValues();},_emailMeClick:function(evt){dojo.event.browser.stopEvent(evt);ShowEmailWin("/Popups/SendEmail.aspx?Type=EmailAgent"+"&AgentID="+this._agent.WTLUserID+"&EmailAddress="+this._agent.EmailAddress+"&Referrer="+self.location.pathname.substring(1));},onSaveToHomeFile:function(_1031){this.openPane();this._showLoggedInPanel();this._showYourListings(this.yourListingsTab);this._showSuccess("This property has been saved.");},_onResetPassword:function(_1032){this._resetLoginValues();this._showLoggedOutPanel();this.userNameInput.value=_1032;},toggleCompare:function(_1033,item){},onYourListingClick:function(item){},onDisplayCompareable:function(item){},onCompareItemToggled:function(item,_1038,_1039,_103a){},onUpdateCompareableDisplay:function(item,_103c,_103d){}});dojo.provide("wtl.ZoomBox");dojo.declare("wtl.ZoomBox",null,function(_103e){this._mapObj=_103e;this._mapElem=dojo.html.firstElement(dojo.html.firstElement(_103e.getMapContainer()));var d=document.createElement("div");d.className="ZoomBox";d.style.display="none";this._mapElem.appendChild(d);this._box=d;var d2=document.createElement("div");d2.className="ZoomBoxTargetLayer";d2.style.display="none";dojo.body().appendChild(d2);this._zoomBoxTargetLayer=d2;this._mapContainer=dojo.html.firstElement(dojo.html.firstElement(this._mapObj.getMapContainer()));dojo.event.connect([this._mapContainer,this._zoomBoxTargetLayer],"onmousedown",this,"_mouseDown");},{_mapObj:null,_mapElem:null,_mapContainer:null,_zoomBoxTargetLayer:null,_ctrlKey:false,_dragging:false,_coords:{x:0,y:0,x2:0,y2:0},_box:null,_overMap:false,_cancelledContextMenu:false,_ieBorderHack:null,_showZoomBoxTargetLayer:function(){var m=this._mapObj;var d=this._zoomBoxTargetLayer;d.style.left=m.getLeft()+"px";d.style.top=m.getTop()+"px";d.style.width=m.getWidth()+"px";d.style.height=m.getHeight()+"px";dojo.html.setDisplay(d,true);},_hideZoomBoxTargetLayer:function(){var d=this._zoomBoxTargetLayer;dojo.html.setDisplay(d,false);d.style.left="0px";d.style.top="0px";d.style.width="0px";d.style.height="0px";},_keyDown:function(evt){if(evt.keyCode==17&&!this._ctrlKey){dojo.event.browser.stopEvent(evt);this._ctrlKey=true;this._showZoomBoxTargetLayer();}},_keyUp:function(evt){if(!evt||evt.keyCode==17){if(evt){dojo.event.browser.stopEvent(evt);}this._ctrlKey=false;this._hideZoomBoxTargetLayer();}},_cancelContextMenu:function(evt){dojo.event.browser.stopEvent(evt);},_mouseDown:function(evt){if(this._overMap&&(this._ctrlKey||evt.button==2)){dojo.event.browser.stopEvent(evt);this._connectMouseMove();this._mapObj._disableHover();this._mapObj._disableEffects();this._dragging=true;var x=evt.pageX;var y=evt.pageY;this._coords={x:x,y:y,x2:x,y2:y};this._box.style.left=x+"px";this._box.style.top=y+"px";this._box.style.width="0px";this._box.style.height="0px";this._showZoomBoxTargetLayer();dojo.event.connect(document,"onmouseup",this,"_mouseUp");}},_mouseMove:function(evt){var m=this._mapObj;var mx=m.getLeft();var my=m.getTop();var mw=m.getWidth();var mh=m.getHeight();if(this._dragging){this._coords.x2=evt.pageX;this._coords.y2=evt.pageY;var x=this._coords.x;var y=this._coords.y;var w=0;var h=0;var bw=0;w=Math.abs(this._coords.x2-x)-1;if(this._coords.x2<x){x=this._coords.x2;}h=Math.abs(this._coords.y2-y)-1;if(this._coords.y2<y){y=this._coords.y2;}var n=mx-x;if(n>0){x+=n;w-=n;}var n=my-y;if(n>0){y+=n;h-=n;}var n=(mx+mw)-(x+w+bw);if(n<0){w+=n;}var n=(my+mh)-(y+h+bw);if(n<0){h+=n;}x-=mx+parseInt(this._box.parentNode.style.left);y-=my+parseInt(this._box.parentNode.style.top);if(dojo.render.html.ie){if(!this._ieBorderHack){this._ieBorderHack=dojo.html.getBorder(this._box).width;}bw=this._ieBorderHack;x-=bw;y-=bw;}this._box.style.left=x+"px";this._box.style.top=y+"px";this._box.style.width=(w<1?1:w)+"px";this._box.style.height=(h<1?1:h)+"px";if(!dojo.html.isDisplayed(this._box)){dojo.html.setDisplay(this._box,true);}}},_mouseUp:function(){dojo.event.disconnect(document,"onmouseup",this,"_mouseUp");this._disConnectMouseMove();if(this._dragging){this._dragging=false;dojo.html.setDisplay(this._box,false);if(!this._ctrlKey){this._hideZoomBoxTargetLayer();}if(this._mapObj){this._mapObj.zoomFit(this._coords);this._mapObj._enableHover();this._mapObj._enableEffects();}}},isOverMap:function(b){this._overMap=b;if(b){dojo.event.connect(document,"onkeydown",this,"_keyDown");dojo.event.connect(document,"onkeyup",this,"_keyUp");if(!this._cancelledContextMenu){dojo.event.connect(document,"oncontextmenu",this,"_cancelContextMenu");this._cancelledContextMenu=true;}}else{dojo.event.disconnect(document,"onkeydown",this,"_keyDown");dojo.event.disconnect(document,"onkeyup",this,"_keyUp");if(this._cancelledContextMenu){dojo.event.disconnect(document,"oncontextmenu",this,"_cancelContextMenu");this._cancelledContextMenu=false;}}},_connectMouseMove:function(){dojo.event.connect(document,"onmousemove",this,"_mouseMove");},_disConnectMouseMove:function(){dojo.event.disconnect(document,"onmousemove",this,"_mouseMove");},destroy:function(){dojo.event.disconnect([this._mapContainer,this._zoomBoxTargetLayer],"onmousedown",this,"_mouseDown");dojo.event.disconnect(document,"onkeydown",this,"_keyDown");dojo.event.disconnect(document,"onkeyup",this,"_keyUp");dojo.event.disconnect(document,"oncontextmenu",this,"_cancelContextMenu");}});dojo.provide("wtl.widget.Map");(function(){var gkey=djConfig["googleMapKey"];if(!dojo.hostenv.post_load_&&gkey){document.write("<scr"+"ipt src=\"http://maps.google.com/maps?file=api&amp;v=2&amp;key="+gkey+"\"></scri"+"pt>");}})();dojo.widget.defineWidget("wtl.widget.Map",dojo.widget.HtmlWidget,{isContainer:false,widgetType:"Map",templateCssPath:null,templatePath:null,currentDeployment:{},contentServers:[],dataStoreKey:"",dataStoreKey2:"",defaultLatitude:null,defaultLongitude:null,defaultMapType:SM_NORMAL_MAP,defaultZoomLevel:null,selectedMapType:null,httpHandler:"",mapControls:null,defaultZoom:null,homeDeliveryZoom:null,onResetMap:null,onMapTypeChange:null,disableDirectory:false,_map:null,_dragging:false,_dragTimer:0,_mapLeft:0,_mapTop:0,_mapWidth:0,_mapHeight:0,_showMarkerTiles:true,_zoomBox:null,_removeMouseWheel:null,_hoverTimer:0,_hoverEnabled:false,_zoomWheeling:false,disableEffectsCallback:null,enableEffectsCallback:null,mapCallback:null,hoverCallback:null,_hoverLastLat:null,_hoverLastLng:null,_gEventMouseMove:null,_gEventZoomEnd:null,_searchHash:0,_lastUpdateTicks:0,searchType:0,_tileOverlay:null,lastZoom:null,postCreate:function(){if(GBrowserIsCompatible()){dojo.html.removeChildren(this.domNode);this._map=new GMap2(this.domNode);this._map.enableDoubleClickZoom();this._map.addControl(new GLargeMapControl());this._setMapSize(true);var mt=this.defaultMapType;if(this.selectedMapType){switch(this.selectedMapType){case 2: mt=SM_SATELLITE_MAP;break;case 3: mt=SM_HYBRID_MAP;break;default: mt=SM_NORMAL_MAP;}}this.setMapType(mt);this._zoomBox=new wtl.ZoomBox(this);this._removeMouseWheel=dojo.event.browser.addListener(this.getMapContainer(),navigator.userAgent.match(/gecko/i)?"DOMMouseScroll":"mousewheel",dojo.lang.hitch(this,"_zoomWheel"),false,false);if(this.mapControls){dojo.event.connect(this.mapControls.normalMap.button,"onclick",this,"_mapTypeButtonClick");dojo.event.connect(this.mapControls.satelliteMap.button,"onclick",this,"_mapTypeButtonClick");dojo.event.connect(this.mapControls.hybridMap.button,"onclick",this,"_mapTypeButtonClick");}GEvent.addListener(this._map,"dragstart",dojo.lang.hitch(this,"_mapDragStart"));GEvent.addListener(this._map,"dragend",dojo.lang.hitch(this,"_mapDragEnd"));GEvent.addListener(this._map,"zoomstart",dojo.lang.hitch(this,"_mapZoomStart"));this._connectZoomEnd();GEvent.addListener(this._map,"mouseover",dojo.lang.hitch(this,"_mapMouseOver"));GEvent.addListener(this._map,"mouseout",dojo.lang.hitch(this,"_mapMouseOut"));new GKeyboardHandler(this._map);var _1059=this._map.getContainer();var nodes=_1059.getElementsByTagName("div");for(var j=0;j<nodes.length;++j){var item=nodes.item(j);if(item.getAttribute&&item.getAttribute("log")!=null&&/^pan_\w+$/.test(item.getAttribute("log"))){dojo.event.connect(item,"onclick",this,this._controlButtonClick);}}}},_mapTypeButtonClick:function(evt){dojo.event.browser.stopEvent(evt);var id=evt.currentTarget.id;if(id=="MapControlHybridButton"){this.setMapType(SM_HYBRID_MAP);}else{if(id=="MapControlSatelliteButton"){this.setMapType(SM_SATELLITE_MAP);}else{this.setMapType(SM_NORMAL_MAP);}}},_controlButtonMoveEndListener:null,_controlButtonClick:function(evt){if(this._controlButtonMoveEndListener!=null){GEvent.removeListener(this._controlButtonMoveEndListener);}this._controlButtonMoveEndListener=GEvent.addListener(this._map,"moveend",dojo.lang.hitch(this,"_controlButtonMapMoveEnd"));},_controlButtonMapMoveEnd:function(evt){if(dojo.lang.isFunction(this.mapCallback)){this.mapCallback({rebuildQuadTree:false,functionName:"_mapMoveEnd"});}GEvent.removeListener(this._controlButtonMoveEndListener);this._controlButtonMoveEndListener=null;},_addTileOverlay:function(){if(!this._tileOverlay){this._tileOverlay=new GTileLayerOverlay(this._createTileLayer());this._map.addOverlay(this._tileOverlay);}},removeTileOverlay:function(){if(this._tileOverlay){this._map.removeOverlay(this._tileOverlay);this._tileOverlay=null;}},setMapType:function(type){this.mapType=type;if(this.mapControls){for(var i in this.mapControls){if(this.mapControls[i].type==type){dojo.html.addClass(this.mapControls[i].button,"ButtonOn");}else{dojo.html.removeClass(this.mapControls[i].button,"ButtonOn");}}}if(this._map){var _1063=G_NORMAL_MAP;var _1064=1;if(type==SM_SATELLITE_MAP){_1063=G_SATELLITE_MAP;_1064=2;}else{if(type==SM_HYBRID_MAP){_1063=G_HYBRID_MAP;_1064=3;}}this._map.setMapType(_1063);if(dojo.lang.isFunction(this.onMapTypeChange)){this.onMapTypeChange(_1064);}}},setMapSize:function(_1065,size,_1067){setTimeout(dojo.lang.hitch(this,function(){this._setMapSize(_1065,size,_1067);}),1000);},_setMapSize:function(_1068,size,_106a){var mc=this.getMapContainer();var _106c=_106a?true:false;var w=dojo.html.getContentBox(mc).width;var h=dojo.html.getContentBox(mc).height;if(size&&size.width&&size.width!=w){_106c=true;w=size.width;mc.parentNode.style.width=w+"px";}if(size&&size.height&&size.height!=h){_106c=true;h=size.height;mc.style.height=h+"px";mc.style.height="100%";mc.parentNode.style.height=h+"px";}this._map.checkResize();dojo.html.firstElement(mc).style.height="100%";var _106f=dojo.html.getAbsolutePosition(mc,true);this._mapLeft=_106f.x;this._mapTop=_106f.y;this._mapWidth=w;this._mapHeight=h;if(_1068){if(this.homeDeliveryZoom){this._setView(this.homeDeliveryZoom);}else{this._setDefaultCenter();}}if(_106c&&dojo.lang.isFunction(this.mapCallback)){this.mapCallback({rebuildQuadTree:_106a,functionName:"_setMapSize"});}},_setView:function(zoom){var b=false;if(zoom){var _1072=(zoom.sw.lat+zoom.ne.lat)/2;var _1073=(zoom.sw.lng+zoom.ne.lng)/2;var z=this._map.getBoundsZoomLevel(new GLatLngBounds(new GLatLng(zoom.sw.lat,zoom.sw.lng),new GLatLng(zoom.ne.lat,zoom.ne.lng)));b=z!=this.getZoomLevel();if(b){this.removeTileOverlay();}this._map.setCenter(new GLatLng(_1072,_1073),z);}return b;},setDefaults:function(_1075){if(_1075.MapType!=null){this.defaultMapType=_1075.MapType;}if(_1075.CenterLat&&_1075.CenterLng&&_1075.ZoomLevel){this.defaultLatitude=_1075.CenterLat;this.defaultLongitude=_1075.CenterLng;this.defaultZoomLevel=_1075.ZoomLevel;this.resetMap();}else{var _1076=this.zoomFitLatLng(_1075);if(!_1076){if(dojo.lang.isFunction(this.mapCallback)){this.mapCallback({rebuildQuadTree:true,functionName:"setDefaults"});}}}},_setDefaultCenter:function(){if(this.defaultLatitude&&this.defaultLongitude&&this.defaultZoomLevel){this._map.setCenter(new GLatLng(this.defaultLatitude,this.defaultLongitude),this.defaultZoomLevel);}else{if(this.defaultZoom){this._setView(this.defaultZoom);}}},recenterMap:function(item){this._map.checkResize();var mc=this.getMapContainer();var w=this._mapWidth;var h=this._mapHeight;var _107b=dojo.html.getAbsolutePosition(mc,true);this._mapLeft=_107b.x;this._mapTop=_107b.y;this._mapWidth=dojo.html.getContentBox(mc).width;this._mapHeight=dojo.html.getContentBox(mc).height;var p=new GSize();if(item&&item.Latitude&&item.Longitude){this._map.panTo(new GLatLng(item.Latitude,item.Longitude));}else{if(w){p.width=parseInt((this._mapWidth-w)/2);}if(h){p.height=parseInt((this._mapHeight-h)/2);}if(w||h){this._map.panBy(p);}}if(dojo.lang.isFunction(this.mapCallback)){this.mapCallback({rebuildQuadTree:false,item:item,functionName:"recenterMap"});}},setHoverState:function(_107d){_107d?this._enableHover():this._disableHover();},_enableHover:function(){clearTimeout(this._hoverTimer);this._hoverEnabled=true;this._connectMouseMove();},_disableHover:function(){clearTimeout(this._hoverTimer);this._hoverEnabled=false;this._disConnectMouseMove();},_connectMouseMove:function(){if(!this._gEventMouseMove&&(this._hoverEnabled&&dojo.lang.isFunction(this.hoverCallback))){var _this=this;this._gEventMouseMove=GEvent.addListener(this._map,"mousemove",function(_107f){_this._mapMouseMove(_107f);});}},_disConnectMouseMove:function(){if(this._gEventMouseMove){GEvent.removeListener(this._gEventMouseMove);this._gEventMouseMove=null;}},_connectZoomEnd:function(){if(!this._gEventZoomEnd){this._gEventZoomEnd=GEvent.addListener(this._map,"zoomend",dojo.lang.hitch(this,"_mapZoomEnd"));}this._connectMouseMove();},_disConnectZoomEnd:function(){if(this._gEventZoomEnd){GEvent.removeListener(this._gEventZoomEnd);this._gEventZoomEnd=null;}},_enableEffects:function(){if(dojo.lang.isFunction(this.enableEffectsCallback)){this.enableEffectsCallback({panning:true});}},_disableEffects:function(){if(dojo.lang.isFunction(this.disableEffectsCallback)){this.disableEffectsCallback({panning:true});}},zoomFit:function(_1080){if(_1080.x!=_1080.x2&&_1080.y!=_1080.y2){var _1081=(Math.abs(_1080.x+_1080.x2)/2)-this._mapLeft;var _1082=(Math.abs(_1080.y+_1080.y2)/2)-this._mapTop;var _1083=this._map.fromContainerPixelToLatLng({x:_1081,y:_1082});var _1084=this._map.fromContainerPixelToLatLng({x:_1080.x,y:_1080.y});var _1085=this._map.fromContainerPixelToLatLng({x:_1080.x2,y:_1080.y2});var _1086=new GLatLngBounds(_1084);_1086.extend(_1085);var _1087=this._map.getBoundsZoomLevel(_1086);if(_1087!=this.getZoomLevel()){this.removeTileOverlay();}this._map.setCenter(_1083,_1087);}},zoomFromExtent:function(s){var b=true;if(s&&s.length){var parts=s.split(";");if(parts.length&&parts.length==4){b=false;var _108b=this._setView({ne:{lat:parseFloat(parts[0]),lng:parseFloat(parts[3])},sw:{lat:parseFloat(parts[2]),lng:parseFloat(parts[1])}});if(!_108b){if(dojo.lang.isFunction(this.mapCallback)){this.mapCallback({rebuildQuadTree:true,functionName:"zoomFromExtent"});}}}}if(b){this._setDefaultCenter();}},zoomFitLatLng:function(zoom){return this._setView(zoom);},getMapExtent:function(){var _108d=this._map.getBounds();var sw=_108d.getSouthWest();var ne=_108d.getNorthEast();return ne.lat()+";"+sw.lng()+";"+sw.lat()+";"+ne.lng();},getZoomLevel:function(){return this._map.getZoom();},getMapContainer:function(){return this._map.getContainer();},getBounds:function(){return this._map.getBounds();},getPointFromLatLng:function(lat,lng,_1092){var b=this._map.getBounds();var sw=b.getSouthWest();var ne=b.getNorthEast();var point={x:parseInt((Math.abs(lng-sw.lng())/Math.abs(ne.lng()-sw.lng()))*this._mapWidth),y:this._mapHeight-parseInt((Math.abs(lat-sw.lat())/Math.abs(ne.lat()-sw.lat()))*this._mapHeight)};if(_1092){point.x+=this._mapLeft;point.y+=this._mapTop;}return point;},addMarker:function(args){var icon=new GIcon();icon.iconSize=new GSize(args.width?args.width:12,args.height?args.height:12);icon.iconAnchor=new GPoint(args.width?parseInt(args.width/2):6,args.height?parseInt(args.height/2):6);icon.image=args.MarkerImage;var point=new GLatLng(args.Latitude,args.Longitude);var _109a=new GMarker(point,icon);this._map.addOverlay(_109a);if(dojo.lang.isFunction(args.onClick)){GEvent.addListener(_109a,"click",args.onClick);}return _109a;},removeMarker:function(_109b){this._map.removeOverlay(_109b);},toggleMarkerTiles:function(_109c,_109d){this._showMarkerTiles=_109c;if(_109c){if(!this._tileOverlay){this._addTileOverlay();}else{if(this.invalidTiles){this.removeTileOverlay();this._addTileOverlay();}else{}}}else{this.removeTileOverlay();}},destroy:function(){if(this._removeMouseWheel){dojo.event.browser.removeListener(this.getMapContainer(),navigator.userAgent.match(/gecko/i)?"DOMMouseScroll":"mousewheel",this._removeMouseWheel,false);}if(this._zoomBox){this._zoomBox.destroy();}wtl.widget.Map.superclass.destroy.call(this);GUnload();},getCurrentMapType:function(){return this._map.getCurrentMapType().getName();},refreshMapType:function(){this.setMapType(this.mapType);},resetMap:function(){this._disConnectZoomEnd();this._setDefaultCenter();this.setMapType(this.defaultMapType);this._connectZoomEnd();},getLeft:function(){return this._mapLeft;},getTop:function(){return this._mapTop;},getWidth:function(){return this._mapWidth;},getHeight:function(){return this._mapHeight;},_mapDragStart:function(){this._dragging=true;clearTimeout(this._hoverTimer);clearTimeout(this._dragTimer);this._disableEffects();this._disConnectMouseMove();},_mapMoveEnd:function(){if(dojo.lang.isFunction(this.mapCallback)){this.mapCallback({rebuildQuadTree:false,functionName:"_mapMoveEnd"});}},_mapDragEnd:function(){this._dragging=false;this._dragTimer=dojo.lang.setTimeout(this,"_doneDragging",300);},_doneDragging:function(){if(!this._dragging){this._enableEffects();this._connectMouseMove();if(dojo.lang.isFunction(this.mapCallback)){this.mapCallback({rebuildQuadTree:false,functionName:"_doneDragging"});}}},_mapZoomStart:function(){this._disConnectMouseMove();clearTimeout(this._dragTimer);},_mapZoomEnd:function(){if(dojo.lang.isFunction(this.mapCallback)){this.mapCallback({rebuildQuadTree:true,functionName:"_mapZoomEnd"});}this._connectMouseMove();},_mapMouseMove:function(_109e){clearTimeout(this._hoverTimer);var lat=_109e.lat();var lng=_109e.lng();if((!this._hoverLastLat||this._hoverLastLat!=lat)&&(!this._hoverLastLat||this._hoverLastLng!=lng)){var _this=this;this._hoverTimer=setTimeout(function(){_this._fireHoverCallback(lat,lng);},100);}},_fireHoverCallback:function(lat,lng){this._hoverLastLat=lat;this._hoverLastLng=lng;this.hoverCallback({zoom:this.getZoomLevel(),lat:lat,lng:lng});},_mapMouseOver:function(){if(this._zoomBox){this._zoomBox.isOverMap(true);}},_mapMouseOut:function(){if(this._zoomBox){this._zoomBox.isOverMap(false);}clearTimeout(this._hoverTimer);},_zoomWheel:function(evt){if(!this._zoomWheeling){this._disConnectMouseMove();this._zoomWheeling=true;if(!evt){evt=dojo.event.browser.currentEvent;}var delta=0;if(evt["wheelDelta"]){delta=evt.wheelDelta;}else{delta=evt.detail*-40;}if(window.opera&&parseFloat(navigator.appVersion)<=9.21){delta=~(delta)+1;}if(delta<0){this._map.zoomOut();}else{this._map.zoomIn();}setTimeout(dojo.lang.hitch(this,"_resetZoomWheelState"),500);}dojo.event.browser.stopEvent(evt);},_resetZoomWheelState:function(){this._connectMouseMove();this._zoomWheeling=false;},invalidTiles:false,_createTileLayer:function(){this.invalidTiles=false;var tl=new GTileLayer(new GCopyrightCollection("This function has been deemed way shibby."));tl.getTileUrl=dojo.lang.hitch(this,function(tile,zoom){if(this.lastZoom!=null&&this.lastZoom!=zoom){this.invalidTiles=true;return "/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/General/1t.gif";}var _10a9=this._getRandomServer(tile.x,tile.y)+this.httpHandler;var query="x="+tile.x;query+="&y="+tile.y;query+="&zoom="+zoom;if(this.dataStoreKey){query+="&type="+this.dataStoreKey;}if(this.dataStoreKey2){query+="&type2="+this.dataStoreKey2;}if(this.disableDirectory){query+="&DisableDirectory=true";}query+="&uuid="+this._searchHash+"-"+this._lastUpdateTicks+"-"+this.searchType;var s=wtl.util.urlAppend(_10a9,query);return s;});tl.getOpacity=function(){return 1;};tl.isPng=function(){return true;};return tl;},_getRandomServer:function(x,y){return this.contentServers.length?this.contentServers[((x+y)%this.contentServers.length)]:"";},switchSearchType:function(typ){this.searchType=typ;},setTileParams:function(hash,ticks){this._searchHash=hash;this._lastUpdateTicks=ticks;},debug:function(){dojo.debug("*************** MAP ***************");dojo.debug("zoom level: "+this.getZoomLevel());var _10b1=this._map.getCenter();dojo.debug("center latitude: "+_10b1.y);dojo.debug("center longitude: "+_10b1.x);dojo.debugShallow(this._map.getBounds());dojo.debug("*************** MAP ***************");dojo.debug("");}});dojo.provide("wtl.widget.BaseDialog");dojo.widget.defineWidget("wtl.widget.BaseDialog",[dojo.widget.HtmlWidget,dojo.widget.Dialog],{isContainer:false,widgetType:"BaseDialog",templateCssPath:null,templateString:"<div class=\"BaseDialog Dialog\">\r\n    <div class=\"BDContainer\">\r\n\r\n        <div class=\"HeaderBG\">\r\n            <div class=\"Header\">\r\n                <a class=\"Close\" dojoAttachPoint=\"closeButton\">Close</a>\r\n            </div>\r\n        </div>\r\n\r\n        <div class=\"Body\" dojoAttachPoint=\"bodyContainer\">\r\n        </div>\r\n    </div>\r\n\t<div class=\"Round4\"></div>\r\n\t<div class=\"Round5\"></div>\r\n\t<div class=\"Round1\"></div>\r\n</div>\r\n",errorMessage:null,closeButton:null,bodyContainer:null,currentDeployment:{},bodyWidgetName:null,bodyWidgetParams:{},_bodyWidget:null,postMixInProperties:function(){wtl.widget.BaseDialog.superclass.postMixInProperties.apply(this,arguments);if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/BaseDialog.css");}}wtl.util.connectDialogKeyPress(this);},fillInTemplate:function(){if(this.bodyWidgetName!==null){var _10b2=this.bodyContainer.appendChild(document.createElement("div"));this._bodyWidget=dojo.widget.createWidget(this.bodyWidgetName,this.bodyWidgetParams,_10b2);if(dojo.lang.isFunction(this._bodyWidget.onDialogShow)){dojo.event.connect(this,"show",this._bodyWidget,"onDialogShow");}if(dojo.lang.isFunction(this._bodyWidget.clearMessage)){dojo.event.connect(this,"onCloseButtonClick",this._bodyWidget,"clearMessage");}}dojo.event.connect(this.closeButton,"onclick",this,"_doCloseButtonClick");},setContent:function(data){this.bodyContainer.innerHTML=data;},onCloseButtonClick:function(evt){},_doCloseButtonClick:function(evt){dojo.event.browser.stopEvent(evt);this.onCloseButtonClick(evt);this.hide();},destroy:function(){wtl.widget.BaseDialog.superclass.destroy.call(this);},reset:function(){this.errorMessage.innerHTML="";}});dojo.provide("wtl.widget.LinkToSearchControl");dojo.widget.defineWidget("wtl.widget.LinkToSearchControl",dojo.widget.HtmlWidget,function(){this.options=[];},{isContainer:false,widgetType:"LinkToSearchControl",templateCssPath:null,templateString:"<div class=\"LinkToSearchControl\" style=\"display:none\">\r\n   <div style=\"position:relative\">\r\n       <div class=\"Titlebar\">\r\n            <a class=\"Close\" href=\"\" title=\"Close\" dojoattachevent=\"onClick:hide\"><span>Close</span></a>\r\n            <span dojoAttachpoint=\"title\"></span>\r\n       </div>\r\n       \r\n       <div dojoAttachPoint=\"linkToSearch\" class=\"LinkSearch\">\r\n            <label for=\"LinkToSearchLink\">Copy &amp; Paste this URL into an E-mail or IM</label>\r\n            <input dojoAttachPoint=\"textbox\" value=\"\" type=\"text\" />\r\n       </div>\r\n        \r\n        <div dojoAttachPoint=\"saveSearch\" class=\"SaveSearch\">\r\n\t        <div style=\"overflow:auto\"><input dojoAttachPoint=\"searchName\" dojoAttachEvent=\"onKeyPress;onBlur:_onSearchNameBlur;onFocus:_onSearchNameFocus\" type=\"text\" value=\"Name Your Search\" maxlength=\"100\" /></div>\r\n\t\t    <div style=\"clear:both; margin-top:10px; float:left;width:254px;\">\r\n\t\t\t    <div class=\"Button ButtonSm Right\"><a dojoAttachEvent=\"onclick:_saveClick\" href=\"\">Save</a></div>\r\n\t\t\t    E-mail Updates: <select dojoAttachPoint=\"notificationTypes\" dojoAttachEvent=\"onKeyPress\" style=\"margin-left:5px;width:85px\"></select>\r\n\t\t    </div>\r\n        </div>\r\n    </div>\r\n</div>\r\n",currentDeployment:{},id:"",label:"",frequencies:[{Label:"Don't Send",Value:0},{Label:"Daily",Value:1},{Label:"Weekly",Value:7},{Label:"Monthly",Value:30}],errorMessageCSS:"Error",linkToSearch:null,saveSearch:null,textbox:null,_showing:false,_mode:"",_searchNameDefault:"Name your search",postMixInProperties:function(){if(this.currentDeployment.compressedCss){this.templateCssPath=null;}else{if(this.currentDeployment.deploymentDirectory){this.templateCssPath=dojo.uri.moduleUri("wtl","/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Widgets/LinkToSearchControl.css");}}},fillInTemplate:function(){for(var i=0;i<this.frequencies.length;i++){var opt=document.createElement("option");opt.setAttribute("value",this.frequencies[i].Value);opt.innerHTML=this.frequencies[i].Label;this.notificationTypes.appendChild(opt);}},toggle:function(){dojo.html.toggleDisplay(this.domNode);if(dojo.html.isDisplayed(this.domNode)){dojo.html.addClass(dojo.byId(this._mode),"On");}else{dojo.html.removeClass(dojo.byId(this._mode),"On");}return dojo.html.isDisplayed(this.domNode);},showLinkToSearch:function(){if(this._mode=="SaveSearch"&&dojo.html.isDisplayed(this.domNode)){this.toggle();}dojo.html.setDisplay(this.linkToSearch,true);dojo.html.setDisplay(this.saveSearch,false);this.title.innerHTML="Link To Search";this._mode="LinkToSearch";return this.toggle();},showSaveSearch:function(){if(this._mode=="LinkToSearch"&&dojo.html.isDisplayed(this.domNode)){this.toggle();}dojo.html.setDisplay(this.linkToSearch,false);dojo.html.setDisplay(this.saveSearch,true);this.title.innerHTML="Save Search";this._mode="SaveSearch";this.toggle();},setSelectedValue:function(str){this.textbox.value=str;this.textbox.focus();this.textbox.select();},onKeyPress:function(evt){if(evt.keyCode==13){this.saveClick(evt);}},_onSearchNameFocus:function(evt){if(dojo.string.trim(this.searchName.value).toLowerCase()==this._searchNameDefault.toLowerCase()){this.searchName.value="";}},_onSearchNameBlur:function(evt){var s=dojo.string.trim(this.searchName.value);if(s.length==0||s.toLowerCase()==this._searchNameDefault.toLowerCase()){this.searchName.value=this._searchNameDefault;}},_saveClick:function(evt){dojo.event.browser.stopEvent(evt);if(this._validSave()){this.saveClick();}},getSearchName:function(){return this.searchName.value;},getNotificationType:function(){return this.notificationTypes[this.notificationTypes.selectedIndex].value;},saveClick:function(){},_validSave:function(){var s=dojo.string.trim(this.searchName.value);if(s.length==0||s.toLowerCase()==this._searchNameDefault.toLowerCase()){this.searchName.focus();this._showError("Please enter a search name.");return false;}return true;},_showError:function(msg){this._showMessage(msg,true);},_showSuccess:function(msg){this._showMessage(msg,false);},_showMessage:function(msg,_10c2){},hide:function(evt){if(evt){dojo.event.browser.stopEvent(evt);}if(dojo.html.isDisplayed(this.domNode)){dojo.html.setDisplay(this.domNode,false);dojo.html.removeClass(dojo.byId(this._mode),"On");this.textbox.blur();this.searchName.blur();}},clear:function(){this.searchName.value="";}});dojo.provide("wtl.widget.MessageContainer");dojo.widget.defineWidget("wtl.widget.MessageContainer",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"MessageContainer",templateCssPath:null,templateString:"<div class=\"MessageContainer\"><a dojoAttachEvent=\"onclick:_clearMessage\" class=\"Close\"></a><span class=\"StatusMessage\" dojoAttachPoint=\"message\"></span></div>",errorMessageCSS:"Error",_animTimer:null,message:null,fillInTemplate:function(){},showError:function(msg){this._showMessage(msg,true);},showSuccess:function(msg){this._showMessage(msg,false);},showMessage:function(msg,_10c7){this._showMessage(msg,_10c7);},_showMessage:function(msg,_10c9){if(msg&&msg.length>0){var st=dojo.html.getScroll().top;this.message.innerHTML=msg;this.domNode.style.left=this.getLeft()+"px";var time=5000;if(_10c9){dojo.html.addClass(this.message,this.errorMessageCSS);time=7000;}else{dojo.html.removeClass(this.message,this.errorMessageCSS);}if(this._anim){this._anim.stop();this._anim=null;}clearTimeout(this._animTimer);this._anim=dojo.lfx.html.slideTo(this.domNode,{top:st,left:this.getLeft()},600,-1).play(true);this._animTimer=dojo.lang.setTimeout(this,"_hideMessage",time);}},_hideMessage:function(){if(this.message.innerHTML.length){this._anim=dojo.lfx.html.slideTo(this.domNode,{top:this.getTop(),left:this.getLeft()},600,-1).play(true);}},_clearMessage:function(){if(this._animTimer){dojo.lang.clearTimeout(this._animTimer);}this._anim=dojo.lfx.html.slideTo(this.domNode,{top:this.getTop(),left:this.getLeft()},400,-1).play(true);},hide:function(){this._clearMessage();},onHide:function(){},getTop:function(){var h=dojo.html.getMarginBox(this.domNode).height;return (h-(h*2));},getLeft:function(){var w=dojo.html.getViewport().width;return Math.round(w/2-dojo.html.getMarginBox(this.domNode).width/2);}});dojo.provide("wtl.LayoutCache");wtl.LayoutCache=new function(){var _10ce={};this.getAbsolutePosition=function(_10cf,_10d0){if(!_10ce[_10cf]||(typeof _10d0=="boolean"&&_10d0)){_10ce[_10cf]=dojo.html.getAbsolutePosition(_10cf);}else{}return _10ce[_10cf];};};dojo.provide("wtl.MotherBrain");var SM_NORMAL_MAP=0;var SM_SATELLITE_MAP=1;var SM_HYBRID_MAP=2;dojo.declare("wtl.MotherBrain",null,function(args){for(var arg in args){this[arg]=args[arg];}function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var _10d7="; expires="+date.toGMTString();}else{var _10d7="";}document.cookie=name+"="+value+_10d7+"; path=/";}function eraseCookie(name){createCookie(name,"",-1);}if(dojo.io.cookie.getCookie("NewSearch")!=null){this._persistentData=null;eraseCookie("NewSearch");}else{var sp=dojo.io.cookie.getCookie("SearchPersist");try{this._persistentData=sp?eval("("+sp+")"):null;}catch(ex){}}if(this._persistentData&&this._persistentData.searchDisplay){this.searchDisplay=this._persistentData.searchDisplay;}this._compareManager=new wtl.CompareManager({maxItems:this.currentDeployment.maxCompareCount,cookieName:this.compareCookie,httpHandler:this.compareHttpHandler});if(this.filmStrip){this.filmStrip.currentDeployment=this.currentDeployment;this.filmStrip.id="SearchFilmStrip";this.filmStrip.searchType=this.searchType;this.filmStrip.onMouseOverCallback=dojo.lang.hitch(this,"_onFilmStripOver");this.filmStrip.onMouseOutCallback=dojo.lang.hitch(this,"_onFilmStripOut");this.filmStrip.onItemClickCallback=dojo.lang.hitch(this,"_onFilmStripItemClick");this.filmStrip.onItemOverCallback=dojo.lang.hitch(this,"_onFilmStripItemOver");this.filmStrip.onItemOutCallback=dojo.lang.hitch(this,"_onFilmStripItemOut");this._filmStripWidget=dojo.widget.createWidget("wtl:FilmStripFisheye",this.filmStrip,this.filmStrip.placeHolder);dojo.event.connect(this,"_switchSearchType",this._filmStripWidget,"switchSearchType");}var vph=dojo.html.getViewport().height;var st=dojo.html.getScroll().top;if(this.map){var h=vph-wtl.LayoutCache.getAbsolutePosition("MapContainer").y-(this._filmStripWidget?this._filmStripWidget.getHeight():0)-st;this.map.mapContainer.style.height=(h<250?250:h-4)+"px";this.map.currentDeployment=this.currentDeployment;if(this._persistentData&&this._persistentData.mapType){this.map.selectedMapType=this._persistentData.mapType;}this.map.disableDirectory=this.disableDirectory;this.map.searchType=this.searchType;this.map.dataStoreKey=this.dataStoreKey;this.map.dataStoreKey2=this.dataStoreKey2;this.map.contentServers=this.contentServers;this.map.disableEffectsCallback=dojo.lang.hitch(this,"_disableEffects");this.map.enableEffectsCallback=dojo.lang.hitch(this,"_enableEffects");this.map.mapCallback=dojo.lang.hitch(this,"_search");this.map.hoverCallback=dojo.lang.hitch(this,"_onHover");this.map.onResetMap=dojo.lang.hitch(this,"_resetMap");this.map.onMapTypeChange=dojo.lang.hitch(this,"_saveSelectedMapType");this._mapWidget=dojo.widget.createWidget("wtl:Map",this.map,this.map.placeHolder);dojo.event.connect(this,"_switchSearchType",this._mapWidget,"switchSearchType");dojo.event.connect(this,"debug",this._mapWidget,"debug");}if(this.accordion){var h=vph-wtl.LayoutCache.getAbsolutePosition("Accordion").y-st;this.accordion.placeHolder.style.height=(h<250?250:h-7)+"px";var aw=dojo.widget.createWidget("AccordionContainer",{labelNodeClass:this.accordion.labelNodeClass,containerNodeClass:this.accordion.containerNodeClass},this.accordion.placeHolder);this._accordionWidget=aw;dojo.event.connect(aw,"selectChild",this,"_saveSelectedAccordionPane");dojo.event.connect(aw,"selectChild",this,"disconnectListeners");var _10de=false;this.comparePropertiesPane.selected=false;this.filterPane.selected=true;this.yourAccountPane.selected=false;var _10df=this._persistentData&&this._persistentData.selectedPane?this._persistentData.selectedPane:0;if(this.selectedPane){_10df=this.selectedPane;}if(_10df>0){switch(_10df){case 1: this.filterPane.selected=true;break;case 2: _10de=true;this.filterPane.selected=false;break;case 3: this.comparePropertiesPane.selected=true;this.filterPane.selected=false;break;case 4: this.yourAccountPane.selected=true;this.filterPane.selected=false;break;}}this.filterPane.currentDeployment=this.currentDeployment;this.filterPane.searchType=this.searchType;this.filterPane.disableDirectory=this.disableDirectory;this.filterPane.defaultTabIndex=!this.disableDirectory&&this.filterPane.isDirectorySearch?1:0;this._filterPane=dojo.widget.createWidget("wtl:FilterPane",this.filterPane);this._filterPane.setPane(aw.addChild(this._filterPane));dojo.event.connect(this,"_switchSearchType",this._filterPane,"switchSearchType");dojo.event.connect(this._filterPane,"filter",this,"_onFilter");dojo.event.connect(dojo.byId("BodyContainer"),"onclick",this._filterPane,"_closeDrillDowns");dojo.event.connect(aw,"selectChild",this._filterPane,"_closeDrillDowns");this._previewAccordionPane=dojo.widget.createWidget("AccordionPane",{selected:_10de,labelNodeClass:this.accordion.labelNodeClass,containerNodeClass:this.accordion.containerNodeClass});aw.addChild(this._previewAccordionPane);if(!this.selectedPane){if(this.defaultOffice){this._showOfficePreview();this._officePreviewPane.openPreview({OfficeID:this.defaultOffice},false,true);}else{if(this._persistentData&&this._persistentData.OfficeID){this._showOfficePreview();this._officePreviewPane.openPreview({OfficeID:this._persistentData.OfficeID},true,true);}}if(this.defaultAgent){this._showAgentPreview();this._agentPreviewPane.openPreview({WTLUserID:this.defaultAgent},false,true);}else{if(this._persistentData&&this._persistentData.WTLUserID){this._showAgentPreview();this._agentPreviewPane.openPreview({WTLUserID:this._persistentData.WTLUserID},true,true);}}}if(!this._showingOfficePreview&&!this._showingAgentPreview){this._showPropertyPreview();if(!this.selectedPane){if(this.defaultListing){this._propertyPreviewPane.openPreview(this.defaultListing,false);}else{var key=wtl.util.getListingKey(this._persistentData);if(key){this._propertyPreviewPane.openPreview(key,true);}}}}this.comparePropertiesPane.currentDeployment=this.currentDeployment;this.comparePropertiesPane.searchType=this.searchType;this._comparePropertiesPane=dojo.widget.createWidget("wtl:ComparePropertiesPane",this.comparePropertiesPane);this._comparePropertiesPane.setPane(aw.addChild(this._comparePropertiesPane));dojo.event.connect(this,"_switchSearchType",this._comparePropertiesPane,"switchSearchType");dojo.event.connect(this,"_resetAll",this._comparePropertiesPane,"resetAll");dojo.event.connect(this._compareManager,"onToggled",this._comparePropertiesPane,"onCompareItemToggled");dojo.event.connect(this._comparePropertiesPane,"onCompareItemClick",this,"_onCompareItemClick");dojo.event.connect(this._comparePropertiesPane,"removeAll",this._compareManager,"removeAll");dojo.event.connect(this._comparePropertiesPane,"toggleCompare",this._compareManager,"toggle");this.yourAccountPane.currentDeployment=this.currentDeployment;this.yourAccountPane.searchType=this.searchType;this.yourAccountPane.saveSearchHandler=this.saveSearchHandler;this.yourAccountPane.defaultTabIndex=this._persistentData&&this._persistentData.paneTabIndex?this._persistentData.paneTabIndex:0;this.yourAccountPane.showLoadingCallback=dojo.lang.hitch(this,"_showLoading");this.yourAccountPane.hideLoadingCallback=dojo.lang.hitch(this,"_hideLoading");dojo.event.connect(this.yourAccountPane,"WWMOClick",this,"_loadAgentPreview");this._yourAccountPane=dojo.widget.createWidget("wtl:YourAccountPane",this.yourAccountPane);this._yourAccountPane.setPane(aw.addChild(this._yourAccountPane));this._attachCompareEvents(this._yourAccountPane);dojo.event.connect(this._yourAccountPane,"onYourListingClick",this,"_onCompareItemClick");dojo.event.connect(this._yourAccountPane,"onLogin",this,"_disconnectListeners");dojo.event.connect(this._yourAccountPane,"saveSearch",this,"_saveSearch");dojo.event.connect(this,"onSaveSearch",this._yourAccountPane,"onSaveSearch");dojo.event.connect(this,"onUpdateSearch",this._yourAccountPane,"onUpdateSearch");dojo.event.connect(this._yourAccountPane,"rerunSearch",this,"_onRerunSearch");dojo.event.connect(this._yourAccountPane,"onTabClick",this,"_paneTabClick");dojo.event.connect(this._yourAccountPane,"onLogin",this,"_onLoginCallback");dojo.event.connect(this._yourAccountPane,"onLoginComplete",this,"_onLoginCompleteCallback");dojo.event.connect(this._yourAccountPane,"onLogout",this,"_onLogoutCallback");dojo.event.connect(this,"onSaveToHomeFile",this._yourAccountPane,"onSaveToHomeFile");dojo.event.connect(this._yourAccountPane,"_showMessage",this,"showMessage");dojo.event.connect(this._yourAccountPane,"clearMessage",this,"clearMessage");dojo.event.connect(this._yourAccountPane,"workWithMeOnline",this,"_workWithMeOnline");dojo.event.connect(this,"onWorkWithMeOnline",this._yourAccountPane,"processWorkWithMe");aw.onResized();}if(this.areaSelector){this.areaSelector.currentDeployment=this.currentDeployment;this.areaSelector.searchType=this.searchType;this._areaSelectorWidget=dojo.widget.createWidget("wtl:AreaSelector",this.areaSelector,this.areaSelector.placeHolder);dojo.event.connect(this._areaSelectorWidget,"onSwitchSearchType",this,"_switchSearchType");dojo.event.connect(this._areaSelectorWidget,"onSwitchSearchArea",this,"_onAreaSelect");dojo.event.connect(this,"_onShowLightbox",this._areaSelectorWidget,"onShowLightbox");dojo.event.connect(this,"_onHideLightbox",this._areaSelectorWidget,"onHideLightbox");dojo.event.connect(this,"debug",this._areaSelectorWidget,"debug");}if(this.headerItems){var h=this.headerItems;dojo.event.connect(h.HeaderSignInLink,"onclick",this,"_onHeaderLoginClick");dojo.event.connect(h.HeaderSignOutLink,"onclick",this,"_onHeaderLogoutClick");}if(this.resetControl){var a=dojo.byId("ResetDropDown").getElementsByTagName("a");for(var i=0;i<a.length;i++){dojo.event.connect(a[i],"onclick",this,"_resetClick");}dojo.event.connect(this.resetControl,"onmouseover",this,"_showReset");dojo.event.connect(this.resetControl,"onmouseout",this,"_hideReset");dojo.event.connect(dojo.byId("ResetDropDown"),"onmouseout",this,"_hideReset");}if(this.saveSearchControl){dojo.event.connect(this.saveSearchControl,"onclick",this,"_saveSearchClick");dojo.event.connect(this,"_saveSearchClick",this,"_disconnectListeners");}if(this.linkSearchControl){dojo.event.connect(this.linkSearchControl,"onclick",this,"_linkToSearchClick");dojo.event.connect(this.linkSearchControl,"onmouseover",this,"_hideDrillDown");}var _10e3=-1;var outer=this;function _doResize(){if(_10e3!=-1){window.clearTimeout(_10e3);}_10e3=-1;outer._recalcLayout();}function _restart(){if(_10e3!=-1){window.clearTimeout(_10e3);}_10e3=window.setTimeout(_doResize,100);}dojo.event.connect(window,"onresize",_restart);if(this.currentEntityListingsType!=null){if(this.currentEntityListingsType==this.ENTITYLISTINGSTYPE.ACTIVE){if(this.entityAgent!=null){this._setAgentListingDisplay(this.entityAgent);}else{if(this.entityCompany!=null){this._setCompanyListingDisplay(this.entityCompany);}}}else{if(this.entityAgent!=null){this._setAgentSoldDisplay(this.entityAgent);}else{if(this.entityCompany!=null){this._setCompanySoldDisplay(this.entityCompany);}}}}if(this._mapWidget){this._mapWidget._setMapSize(true,null,true);}window.setTimeout(dojo.lang.hitch(this,function(){if(this.showFlashMovie){var div=document.createElement("div");dojo.body().appendChild(div);var sdfm=dojo.widget.createWidget("wtl:BaseDialog",{currentDeployment:this.currentDeployment,bgOpacity:0.4},div);var node=document.createElement("div");node.id="MapHelp";if(false){var i=document.createElement("input");i.type="checkbox";i.id="sdfmOptOut";var l=document.createElement("label");l.htmlFor="sdfmOptOut";l.appendChild(document.createTextNode("Do not show this message again"));node.appendChild(i);node.appendChild(l);dojo.event.connect(sdfm,"hide",function(){dojo.io.cookie.setCookie("SDFM",dojo.byId("sdfmOptOut").checked?"0":"1",365,"/");});}else{dojo.io.cookie.setCookie("SDFM","1",365,"/");}sdfm.bodyContainer.appendChild(node);sdfm.show();}}),1000);},{_mapWidget:null,_filmStripWidget:null,_balloonWidget:null,_areaSelectorWidget:null,_accordionWidget:null,_agentPreviewPane:null,_officePreviewPane:null,_propertyPreviewPane:null,_comparePropertiesPane:null,_filterPane:null,_previewAccordionPane:null,_yourAccountPane:null,_linkToSearchControl:null,_linkSaveSearchWidget:null,_searchRequest:null,_hoverRequest:null,_balloonsEnabled:false,_markerHover:null,_markerSelected:null,_compareManager:null,_messageLayer:null,_persistantData:null,_showingPropertyPreview:false,_showingOfficePreview:false,_showingAgentPreview:false,listingsAgentID:0,useBoundingBox:false,_prevSearchDetailEvent:null,currentEntityListingsType:null,ENTITYLISTINGSTYPE:{ACTIVE:1,SOLD:2},searchDisplay:0,SEARCHDISPLAYTYPE:{LISTING:0,DIRECTORY:1},_attachCompareEvents:function(_10ea){dojo.event.connect(_10ea,"toggleCompare",this._compareManager,"toggle");dojo.event.connect(_10ea,"onDisplayCompareable",this._compareManager,"onDisplayCompareable");dojo.event.connect(this._compareManager,"onToggled",_10ea,"onCompareItemToggled");dojo.event.connect(this._compareManager,"onUpdateCompareableDisplay",_10ea,"onUpdateCompareableDisplay");},_createPropertyPreview:function(){if(this.propertyPreviewPane){this.propertyPreviewPane.currentDeployment=this.currentDeployment;this.propertyPreviewPane.searchType=this.searchType;this.propertyPreviewPane.requestMoreInfoCallback=dojo.lang.hitch(this,"_requestMoreInfoPopup");this.propertyPreviewPane.requestShowingCallback=dojo.lang.hitch(this,"_requestShowingPopup");this.propertyPreviewPane.emailListingCallback=dojo.lang.hitch(this,"_emailListingPopup");this.propertyPreviewPane.onCloseCallback=dojo.lang.hitch(this,"_onPreviewClose");this.propertyPreviewPane.onOpenCallback=dojo.lang.hitch(this,"_onPreviewOpen");this.propertyPreviewPane.disableEffectsCallback=dojo.lang.hitch(this,"_disableEffects");this.propertyPreviewPane.enableEffectsCallback=dojo.lang.hitch(this,"_enableEffects");this.propertyPreviewPane.showLoadingCallback=dojo.lang.hitch(this,"_showLoading");this.propertyPreviewPane.hideLoadingCallback=dojo.lang.hitch(this,"_hideLoading");this.propertyPreviewPane.onPagingCallback=dojo.lang.hitch(this,"_onPreviewPaging");this.propertyPreviewPane.onGetDirections=dojo.lang.hitch(this,"_getDrivingDirections");if(this.currentDeployment.brokerId==178||this.currentDeployment.brokerId==189){this._propertyPreviewPane=dojo.widget.createWidget("wtl:PropertyPreviewPaneCBGL",this.propertyPreviewPane);}else{this._propertyPreviewPane=dojo.widget.createWidget("wtl:PropertyPreviewPane",this.propertyPreviewPane);}dojo.event.connect(this,"_switchSearchType",this._propertyPreviewPane,"switchSearchType");dojo.event.connect(this,"_onCompareItemClick",this._propertyPreviewPane,"openPreview");dojo.event.connect(this._propertyPreviewPane,"onSaveToHomeFile",this,"onSaveToHomeFile");dojo.event.connect(this._propertyPreviewPane,"notLoggedIn",this,"_notLoggedIn");dojo.event.connect(this._propertyPreviewPane,"workWithMeOnline",this,"_workWithMeOnline");dojo.event.connect(this,"onWorkWithMeOnline",this._propertyPreviewPane,"processWorkWithMe");dojo.event.connect(this._propertyPreviewPane,"onShowLightbox",this,"_onShowLightbox");dojo.event.connect(this._propertyPreviewPane,"onHideLightbox",this,"_onHideLightbox");dojo.event.connect(this._propertyPreviewPane,"viewListingsClick",this,"_showAgentListings");dojo.event.connect(this._propertyPreviewPane,"viewSoldsClick",this,"_showAgentSolds");dojo.event.connect(this,"resetAgentSearch",this._propertyPreviewPane,"resetAgentSearch");this._attachCompareEvents(this._propertyPreviewPane);}},_onLoginAction:[],disconnectListeners:function(){if(this._onLoginAction.length>0&&this._persistentData.selectedPane!=4){this._disconnectListeners();}},_disconnectListeners:function(){for(var i=0;i<this._onLoginAction.length;i++){if(this._onLoginAction[i].WidgetId=="this"){var w=this;}else{var w=dojo.widget.byId(this._onLoginAction[i].WidgetId);}var f=this._onLoginAction[i].Pointer;dojo.event.disconnect(this._yourAccountPane,"onLogin",w,f);}this._onLoginAction=[];},_notLoggedIn:function(_10ee,_10ef){dojo.event.connect(this._yourAccountPane,"onLogin",dojo.widget.byId(_10ee),_10ef);this._onLoginAction.push({WidgetId:_10ee,Pointer:_10ef});var msg=(dojo.widget.byId(_10ee).signInMessage)?dojo.widget.byId(_10ee).signInMessage:"Please sign in to Your Account.";this._focusYourAccount(msg);},_notLoggedInInternal:function(_10f1,_10f2){dojo.event.connect("after",this._yourAccountPane,"onLogin",this,_10f1);this._onLoginAction.push({WidgetId:"this",Pointer:_10f1});this._focusYourAccount(_10f2);},_focusYourAccount:function(_10f3){this._yourAccountPane.openPane();this._yourAccountPane.showLoggedOutPanel();this._yourAccountPane._showError(_10f3);},_createOfficePreview:function(){if(this.officePreviewPane){this.officePreviewPane.currentDeployment=this.currentDeployment;this.officePreviewPane.searchType=this.searchType;this.officePreviewPane.onCloseCallback=dojo.lang.hitch(this,"_onPreviewClose");this.officePreviewPane.onOpenCallback=dojo.lang.hitch(this,"_onPreviewOpen");this.officePreviewPane.onGetDirections=dojo.lang.hitch(this,"_getDrivingDirections");this._officePreviewPane=dojo.widget.createWidget("wtl:OfficePreviewPane",this.officePreviewPane);}},_createAgentPreview:function(){if(this.agentPreviewPane){this.agentPreviewPane.currentDeployment=this.currentDeployment;this.agentPreviewPane.searchType=this.searchType;this.agentPreviewPane.onPagingCallback=dojo.lang.hitch(this,"_onPreviewPaging");this.agentPreviewPane.onCloseCallback=dojo.lang.hitch(this,"_onPreviewClose");this.agentPreviewPane.onOpenCallback=dojo.lang.hitch(this,"_onPreviewOpen");this.agentPreviewPane.showMessageCallback=dojo.lang.hitch(this,"_showMessage");this._agentPreviewPane=dojo.widget.createWidget("wtl:AgentPreviewPane",this.agentPreviewPane);dojo.event.connect(this._agentPreviewPane,"viewListingsClick",this,"_showAgentListings");dojo.event.connect(this._agentPreviewPane,"viewSoldsClick",this,"_showAgentSolds");dojo.event.connect(this._agentPreviewPane,"workWithMeOnline",this,"_workWithMeOnline");dojo.event.connect(this,"onWorkWithMeOnline",this._agentPreviewPane,"processWorkWithMe");dojo.event.connect(this._agentPreviewPane,"notLoggedIn",this,"_notLoggedIn");dojo.event.connect(this,"resetAgentSearch",this._agentPreviewPane,"resetAgentSearch");}},_showPropertyPreview:function(){if(this._showingPropertyPreview){return;}if(this._showingOfficePreview){this._previewAccordionPane.removeChild(this._officePreviewPane);this._showingOfficePreview=false;}if(this._showingAgentPreview){this._previewAccordionPane.removeChild(this._agentPreviewPane);this._showingAgentPreview=false;}if(!this._propertyPreviewPane){this._createPropertyPreview();}this._previewAccordionPane.addChild(this._propertyPreviewPane);this._previewAccordionPane.setLabel(this._propertyPreviewPane.label);this._propertyPreviewPane.setPane(this._previewAccordionPane);this._showingPropertyPreview=true;},_showOfficePreview:function(){if(this._showingOfficePreview){return;}if(this._showingPropertyPreview){this._previewAccordionPane.removeChild(this._propertyPreviewPane);this._showingPropertyPreview=false;}if(this._showingAgentPreview){this._previewAccordionPane.removeChild(this._agentPreviewPane);this._showingAgentPreview=false;}if(!this._officePreviewPane){this._createOfficePreview();}this._previewAccordionPane.addChild(this._officePreviewPane);this._previewAccordionPane.setLabel(this._officePreviewPane.label);this._officePreviewPane.setPane(this._previewAccordionPane);this._showingOfficePreview=true;},_showAgentPreview:function(){if(this._showingAgentPreview){return;}if(this._showingPropertyPreview){this._previewAccordionPane.removeChild(this._propertyPreviewPane);this._showingPropertyPreview=false;}if(this._showingOfficePreview){this._previewAccordionPane.removeChild(this._officePreviewPane);this._showingOfficePreview=false;}if(!this._agentPreviewPane){this._createAgentPreview();}this._previewAccordionPane.addChild(this._agentPreviewPane);this._previewAccordionPane.setLabel(this._agentPreviewPane.label);this._agentPreviewPane.setPane(this._previewAccordionPane);this._showingAgentPreview=true;},_showLoading:function(){if(this.loadingLayer&&this._mapWidget){var mc=this._mapWidget.getMapContainer();var map=dojo.html.getMarginBox(mc);var abs=wtl.LayoutCache.getAbsolutePosition("MapContainer");dojo.html.setVisibility(this.loadingLayer,false);dojo.html.setDisplay(this.loadingLayer,true);var mb=dojo.html.getMarginBox(this.loadingLayer);this.loadingLayer.style.top=(abs.top+(Math.round(map.height/2)-Math.round(mb.height/2)))+"px";this.loadingLayer.style.left=(abs.left+(Math.round(map.width/2)-Math.round(mb.width/2)))+"px";dojo.html.setVisibility(this.loadingLayer,true);}},_hideLoading:function(){if(this.loadingLayer){dojo.html.setVisibility(this.loadingLayer,false);dojo.html.setDisplay(this.loadingLayer,false);}},_recalcLayout:function(){if(this._mapWidget){var vph=dojo.html.getViewport().height;var st=dojo.html.getScroll().top;var h=vph-wtl.LayoutCache.getAbsolutePosition("MapContainer").y-(this._filmStripWidget?this._filmStripWidget.getHeight():0)-st;this._mapWidget.setMapSize(false,{height:(h<250?250:h-4)});if(this.accordion){var h=vph-wtl.LayoutCache.getAbsolutePosition("Accordion").y-st;this._accordionWidget.domNode.style.height=(h<250?250:h-7)+"px";this._accordionWidget.onResized();dojo.lang.forEach(this._accordionWidget.children,function(w1){dojo.lang.forEach(w1.children,function(w2){if(dojo.lang.isFunction(w2.superSize)){w2.superSize();}});});}}},onSearch:function(){},_search:function(args){if(this.homeDeliveryID){args.homeDeliveryID=this.homeDeliveryID;this.homeDeliveryID=null;}if(this.searchHttpHandler&&this._mapWidget){this.onSearch();if(args.rebuildQuadTree){this._mapWidget.removeTileOverlay();}var _10fe=this._mapWidget.getBounds();var sw=_10fe.getSouthWest();var ne=_10fe.getNorthEast();var _this=this;var _1102={x:sw.lng(),y:sw.lat(),w:Math.abs(ne.lng()-sw.lng()),h:Math.abs(ne.lat()-sw.lat()),SearchDisplayType:this.searchDisplay,rebuildQuadTree:args.rebuildQuadTree?true:false,homeDeliveryID:args.homeDeliveryID?args.homeDeliveryID:0,searchType:this.searchType,type:this.dataStoreKey,type2:this.dataStoreKey2};if(this._filterPane&&(!args.homeDeliveryID||args.homeDeliveryID==0)){_1102.listingFilter=this._filterPane.getListingFilter();_1102.agentFilter=this._filterPane.getAgentFilter();}if(this.listingsAgentID>0){_1102.agentID=this.listingsAgentID;}if(this.listingsCompanyID>0){_1102.companyID=this.listingsCompanyID;}if(this.currentEntityListingsType){_1102.entityListingsType=this.currentEntityListingsType;this.currentEntityListingsType=null;}_1102.DisableDirectory=this.disableDirectory;if(this.useBoundingBox){_1102.useBoundingBox=this.useBoundingBox;this.useBoundingBox=false;}if(this._propertyPreviewPane&&this._showingPropertyPreview){var _1103=this._propertyPreviewPane.getItemKey();if(_1103){for(var key in _1103){_1102[key]=_1103[key];}}}_1102.zoom=this._mapWidget.getZoomLevel();if(this._searchRequest){if(args.rebuildQuadTree){}else{return;}}this._searchRequest=dojo.io.bind({url:wtl.util.urlAppend(this.searchHttpHandler,"rand="+(new Date()).getTime()),method:"post",content:_1102,load:function(type,obj,event){if(obj){if(_this._filterPane){_this._filterPane.update(obj.ListingFilterCriteria,obj.AgentFilterCriteria);}_this._balloonsEnabled=obj.EnableBalloons;if(obj.SavedSearch){_this.searchDisplay=obj.SavedSearch.SearchDisplay;_this._filmStripWidget._officeID=obj.SavedSearch.OfficeID;_this._areaSelectorWidget.setDisplayFromSavedSearch(obj.SavedSearch.SearchType,obj.SavedSearch.AreaID);_this.listingsAgentID=obj.SavedSearch.listingsAgentID||0;_this.listingsCompanyID=obj.SavedSearch.listingsCompanyID||0;}if(_this._mapWidget){_this._mapWidget.lastZoom=obj.LastZoom;if(obj.Zoom){_this._searchRequest.abort();_this._searchRequest=null;_this._mapWidget.setDefaults(obj.Zoom);return;}if(args.rebuildQuadTree){_this._mapWidget.removeTileOverlay();}_this._mapWidget.setTileParams(obj.SearchHash,obj.UpdateTicks);_this._mapWidget.setHoverState(obj.EnableBalloons);_this._mapWidget.toggleMarkerTiles(obj.ShowMarkerTiles,args.rebuildQuadTree);}if(_this.itemCountPlaceHolder){var lbl="Displaying ";if(obj.Label){lbl+=wtl.util.formatNumber(obj.Count)+" "+obj.Label;}if(obj.Label2){if(obj.Label){lbl+=(obj.Label3?", ":" and ");}lbl+=wtl.util.formatNumber(obj.Count2)+" "+obj.Label2;}if(obj.Label3){lbl+=" and "+wtl.util.formatNumber(obj.Count3)+" "+obj.Label3;}_this.itemCountPlaceHolder.innerHTML=lbl;}if(_this._filmStripWidget){_this._filmStripWidget.httpHandlerParams={type:_this.searchDisplay==_this.SEARCHDISPLAYTYPE.LISTING?"listings":"agents",zoom:_1102.zoom};if(args.item){_this._filmStripWidget.goItem(wtl.util.composeIds(args.item));}else{_this._filmStripWidget.go(true);}}if(_this._propertyPreviewPane&&_this._showingPropertyPreview){_this._propertyPreviewPane.setPagination(obj.PreviousItem,obj.NextItem);}if(_this._agentPreviewPane&&_this._showingAgentPreview){_this._agentPreviewPane.setPagination(obj.PreviousItem,obj.NextItem);}var _1109=false;if(_this.searchDisplay==_this.SEARCHDISPLAYTYPE.DIRECTORY){_1109=obj.Count3==1;}else{_1109=obj.Count==1;}_this._filmStripWidget.selectItem=_1109;if(_this.searchDisplay==_this.SEARCHDISPLAYTYPE.DIRECTORY&&obj.Count2==1&&obj.Office){_this._showOfficePreview();_this._officePreviewPane.openPreview(obj.Office,false,true);}if(!_this._persistentData){_this._persistentData={};}_this._persistentData.searchDisplay=_this.searchDisplay;}_this._searchRequest=null;},mimetype:"text/json",transport:"XMLHTTPTransport"});}},_manageReset:function(id){switch(parseInt(id)){case 0: this._resetAll();break;case 1: this._resetMap();break;case 2: this._resetSearchCriteria();break;}},_resetMap:function(){if(this._mapWidget){this._mapWidget.resetMap();}if(this._areaSelectorWidget){this._areaSelectorWidget.reset();}this._search({rebuildQuadTree:true,functionName:"_resetMap"});},_resetAll:function(){this._resetSearch();},_resetSearchCriteria:function(){this.resetAgentSearch();if(this._filterPane){this._filterPane.resetFilter();}if(this._filmStripWidget){this._filmStripWidget.reset();}this._persistentData=null;this._writePersistentCookie();if(this._filterPane){this._filterPane.resetDisplay();if(this._accordionWidget){this._accordionWidget.selectChild(this._filterPane.getPane());}}if(this._markerSelected){this._removeMarker(this._markerSelected);this._markerSelected=null;}this._search({rebuildQuadTree:true,functionName:"_resetSearchCriteria"});},_resetSearch:function(_110b){this.resetAgentSearch();this.searchDisplay=this.SEARCHDISPLAYTYPE.LISTING;if(this._filterPane){this._filterPane.resetFilter();}if(this._filmStripWidget){this._filmStripWidget.reset();}if(!_110b&&this._areaSelectorWidget){this._areaSelectorWidget.reset();}if(this._mapWidget){this._mapWidget.resetMap();}this._persistentData=null;this._writePersistentCookie();this._showPropertyPreview();if(this._propertyPreviewPane){this._propertyPreviewPane.openPreview(null,true);}if(this._filterPane){this._filterPane.resetDisplay();if(this._accordionWidget){this._accordionWidget.selectChild(this._filterPane.getPane());}}if(this._markerSelected){this._removeMarker(this._markerSelected);this._markerSelected=null;}this._search({rebuildQuadTree:true,functionName:"_resetSearch"});},_getMapBounds:function(){if(this._mapWidget){return this._mapWidget.getBounds();}return null;},_onFilter:function(_110c){this.searchDisplay=_110c=="property"?this.SEARCHDISPLAYTYPE.LISTING:this.SEARCHDISPLAYTYPE.DIRECTORY;this._filmStripWidget.reset();this._search({rebuildQuadTree:true,functionName:"_onFilter"});},_onHover:function(args){if(this._balloonsEnabled&&this.hoverHttpHandler&&!this._balloonWidget){args.searchType=this.searchType;args.type=this.dataStoreKey;args.type2=this.dataStoreKey2;args.disableDirectory=this.disableDirectory;var _this=this;if(this._hoverRequest){this._hoverRequest.abort();}this._hoverRequest=dojo.io.bind({url:wtl.util.urlAppend(this.hoverHttpHandler,"rand="+(new Date()).getTime()),method:"get",content:args,load:function(type,obj,event){if(obj&&obj.length){if(_this._balloonWidget){_this._balloonWidget.hide();_this._balloonWidget=null;}var lat=0;var lng=0;for(var i=0;i<obj.length;i++){if(obj[i].data.length){lat=obj[i].data[0].Latitude;lng=obj[i].data[0].Longitude;break;}}_this._balloonWidget=_this._createBalloon({data:obj,showCompare:true,lat:lat,lng:lng});}_this._hoverRequest=null;},mimetype:"text/json",transport:"XMLHTTPTransport"});}},_balloonClickCallback:function(type,item){if(this._balloonWidget){this._balloonWidget.hide();this._balloonWidget=null;}switch(type){case "Listing": this._showPropertyPreview();if(this._propertyPreviewPane){this._propertyPreviewPane.openPreview(item);}break;case "Office": this._showOfficePreview();if(this._officePreviewPane){this._officePreviewPane.openPreview(item,false,true);}if(this._filmStripWidget){this._filmStripWidget.selectItem=false;this._filmStripWidget.searchByOffice(item.OfficeID);}break;}},_enableEffects:function(args){if(this._filmStripWidget){this._filmStripWidget.enableFisheye();}},_disableEffects:function(args){if(this._filterPane){}if(this._filmStripWidget){this._filmStripWidget.disableFisheye();}},_addMarker:function(args){args.MarkerImage="/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/SmartMap/Markers/"+args.MarkerType+".png";return this._mapWidget.addMarker(args);},_removeMarker:function(_111a){this._mapWidget.removeMarker(_111a);},_onFilmStripOver:function(){if(this._mapWidget&&this._balloonsEnabled){this._mapWidget.setHoverState(false);}},_onFilmStripOut:function(){if(this._mapWidget&&this._balloonsEnabled){var _this=this;setTimeout(function(){_this._mapWidget.setHoverState(true);},300);}},_onFilmStripItemClick:function(item,idx,type){if(this._markerSelected){this._removeMarker(this._markerSelected);this._markerSelected=null;}var _111f=this.markers[item.MarkerType+"Selected"];this._markerSelected=this._addMarker({width:_111f?_111f.width:32,height:_111f?_111f.height:32,MarkerType:item.MarkerType+"Selected",Latitude:item.Latitude,Longitude:item.Longitude});if(type.toLowerCase()=="agents"){this._loadAgentPreview(item);}else{this._showPropertyPreview();if(this._propertyPreviewPane){this._propertyPreviewPane.openPreview(item);}}},_loadAgentPreview:function(item){this._showAgentPreview();if(this._agentPreviewPane&&!wtl.util.agentsEqual(this._agentPreviewPane.getItemKey(),item)){this._agentPreviewPane.openPreview(item,null,true);}else{this._agentPreviewPane._pane.onLabelClick();}},_onFilmStripItemOver:function(item,idx){if(!this._markerHover){var _1123=this.markers[item.MarkerType+"Selected"];this._markerHover=this._addMarker({width:_1123?_1123.width:32,height:_1123?_1123.height:32,MarkerType:item.MarkerType+"Selected",Latitude:item.Latitude,Longitude:item.Longitude});}},_onFilmStripItemOut:function(item,idx){if(this._markerHover){this._removeMarker(this._markerHover);this._markerHover=null;}},_requestMoreInfoPopup:function(_1126,mlsID,_1128){ShowEmailWin("/Popups/SendEmail.aspx?Type=RequestMoreInfo&"+(_1126>0?"ListingID="+_1126:"MLSID="+mlsID+"&MLSProviderID="+_1128)+"&Referrer="+window.location.pathname.substring(1));},_requestShowingPopup:function(_1129,mlsID,_112b){ShowEmailWin("/Popups/SendEmail.aspx?Type=RequestShowing&"+(_1129>0?"ListingID="+_1129:"MLSID="+mlsID+"&MLSProviderID="+_112b)+"&Referrer="+window.location.pathname.substring(1));},_emailListingPopup:function(_112c,mlsID,_112e){ShowEmailWin("/Popups/SendEmail.aspx?Type=EmailListing&"+(_112c>0?"ListingID="+_112c:"MLSID="+mlsID+"&MLSProviderID="+_112e)+"&Referrer="+window.location.pathname.substring(1));},_createBalloon:function(args){if(!this._mapWidget){return;}var point={x:0,y:0};if(args.lat&&args.lng){point=this._mapWidget.getPointFromLatLng(args.lat,args.lng,true);}var div=document.createElement("div");dojo.body().appendChild(div);var _1132=dojo.widget.createWidget("wtl:Balloon",{currentDeployment:this.currentDeployment,mapLeft:this._mapWidget.getLeft(),mapTop:this._mapWidget.getTop(),mapWidth:this._mapWidget.getWidth(),mapHeight:this._mapWidget.getHeight(),x:point.x,y:point.y,data:args.data,onCreateCallback:dojo.lang.hitch(this,"_disableEffects"),balloonClick:dojo.lang.hitch(this,"_balloonClickCallback"),onDestroyCallback:dojo.lang.hitch(this,"_balloonDestroyCallback"),showCompare:args.showCompare},div);this._attachCompareEvents(_1132);_1132.postAttachExternalEvents();return _1132;},_balloonDestroyCallback:function(){this._balloonWidget=null;this._enableEffects();},_onPreviewClose:function(){if(this._filmStripWidget){this._filmStripWidget.selectById();}if(this._markerSelected){this._removeMarker(this._markerSelected);this._markerSelected=null;}},_onPreviewOpen:function(item,type,_1135){if(this._mapWidget){if(this._markerSelected){this._removeMarker(this._markerSelected);this._markerSelected=null;}var _1136=this.markers[item.MarkerType+"Selected"];this._markerSelected=this._addMarker({width:_1136?_1136.width:32,height:_1136?_1136.height:32,MarkerType:item.MarkerType+"Selected",Latitude:item.Latitude,Longitude:item.Longitude});}if(!_1135&&this._filmStripWidget&&item){var _1137=this._filmStripWidget.getType().toLowerCase();if(_1137==type.toLowerCase()){this._filmStripWidget.selectById(wtl.util.composeIds(item,type));}}},_onAreaSelect:function(_1138,_1139){if(this._mapWidget){if(_1138){this._mapWidget.zoomFromExtent(_1138);}else{this._resetMap();}}if(!this._persistentData){this._persistentData={};}this._persistentData.areaID=_1139;this._writePersistentCookie();},unload:function(){dojo.widget.manager.destroyAll();},_showMessage:function(msg,w){var d=this._messageLayer;if(!d){d=document.createElement("div");d.id="StatusMsg";d.style.opacity=0;d.className="Fyi";this._messageLayer=d;dojo.byId("InfoBar").appendChild(d);dojo.event.connect(this._messageLayer,"onmouseover",this,"_pauseHideMessage");dojo.event.connect(this._messageLayer,"onmouseout",this,"_resumeHideMessage");}dojo.html.setOpacity(d,0);while(d.lastChild){d.removeChild(d.lastChild);}d.innerHTML=String(msg);var _113d=dojo.lfx.fadeIn(d,600,null);var _113e=dojo.lfx.fadeOut(d,600,null);function delayFadeOut(){window.setTimeout(function(){_113e.play();},2200);}dojo.event.connect(_113d,"onEnd",delayFadeOut);_113d.play();},_pauseHideMessage:function(){if(this._messageTimer){clearTimeout(this._messageTimer);}},_resumeHideMessage:function(){this._messageTimer=setTimeout(dojo.lang.hitch(this,"_hideMessage"),2000);},_hideMessage:function(){this._messageTimer=0;if(this._messageLayer){dojo.lfx.html.fadeOut(this._messageLayer,300).play();}},_writePersistentCookie:function(){if(this._persistentData){dojo.io.cookie.setCookie("SearchPersist",dojo.json.serialize(this._persistentData),-1,"/");}else{dojo.io.cookie.deleteCookie("SearchPersist");}},_saveSelectedAccordionPane:function(w){if(w.children.length){if(!this._persistentData){this._persistentData={};}var n=4;switch(w.children[0]){case this._filterPane: n=1;break;case this._propertyPreviewPane: case this._officePreviewPane: case this._agentPreviewPane: n=2;this._persistentData=wtl.util.removeFromObjectByKey(["WTLUserID","OfficeID","ListingID","MLSProviderID","MLSID"],this._persistentData);var _1141=w.children[0].getItemKey();if(_1141){for(var key in _1141){this._persistentData[key]=_1141[key];}}break;case this._comparePropertiesPane: n=3;break;case this._yourAccountPane: default: n=4;break;}this._persistentData.selectedPane=n;this._writePersistentCookie();}},_saveSelectedMapType:function(type){if(!this._persistentData){this._persistentData={};}this._persistentData.mapType=type;this._writePersistentCookie();},_onPreviewPaging:function(data){if(!this._persistentData){this._persistentData={};}if(data){for(var key in data){this._persistentData[key]=data[key];}}this._writePersistentCookie();},_paneTabClick:function(idx){if(!this._persistentData){this._persistentData={};}this._persistentData.paneTabIndex=idx;this._writePersistentCookie();},_switchSearchType:function(typ,_1148){this.searchType=typ;if(_1148){this._mapWidget.zoomFromExtent(_1148);}else{this._mapWidget.zoomFromExtent(this.map.entireExtent);}},_showAgentListings:function(agent){if(this._filmStripWidget){this._filmStripWidget.reset();}if(this._filterPane){this._filterPane.resetFilter();}this.searchDisplay=this.SEARCHDISPLAYTYPE.LISTING;this.listingsAgentID=agent.WTLUserID;this.useBoundingBox=true;this.currentEntityListingsType=this.ENTITYLISTINGSTYPE.ACTIVE;this._search({rebuildQuadTree:true,functionName:"_showAgentListings"});this._setAgentListingDisplay(agent);},_resetAgentSearch:function(evt){dojo.event.browser.stopEvent(evt);this.resetAgentSearch();this._search({rebuildQuadTree:true,functionName:"_resetAgentSearch"});},_resetCompanySearch:function(evt){dojo.event.browser.stopEvent(evt);this.resetCompanySearch();this._search({rebuildQuadTree:true,functionName:"_resetCompanySearch"});},resetAgentSearch:function(){this.listingsAgentID=0;this.currentEntityListingsType=null;this._updateSearchDetails();},resetCompanySearch:function(){this.listingsCompanyID=0;this.currentEntityListingsType=null;this._updateSearchDetails();},_showAgentSolds:function(agent){if(this._filmStripWidget){this._filmStripWidget.reset();}if(this._filterPane){this._filterPane.resetFilter();}this.searchDisplay=this.SEARCHDISPLAYTYPE.LISTING;this.listingsAgentID=agent.WTLUserID;this.useBoundingBox=true;this.currentEntityListingsType=this.ENTITYLISTINGSTYPE.SOLD;this._search({rebuildQuadTree:true,functionName:"_showAgentSolds"});this._setAgentSoldDisplay(agent);},_setAgentListingDisplay:function(agent){var txt=agent.FirstName+" "+agent.LastName+(agent.Suffix?" "+agent.Suffix:"")+" Properties only";var _114f="Show all";var _1150=dojo.lang.hitch(this,"_resetAgentSearch");this._updateSearchDetails(txt,_114f,_1150);},_setAgentSoldDisplay:function(agent){var txt=agent.FirstName+" "+agent.LastName+(agent.Suffix?" "+agent.Suffix:"")+" Sold Properties only";var _1153="Show all";var _1154=dojo.lang.hitch(this,"_resetAgentSearch");this._updateSearchDetails(txt,_1153,_1154);},_setCompanyListingDisplay:function(_1155){var txt=_1155.CompanyName+" Properties";var _1157="Show all";var _1158=dojo.lang.hitch(this,"_resetCompanySearch");this._updateSearchDetails(txt,_1157,_1158);},_setCompanySoldDisplay:function(_1159){var txt=_1159.CompanyName+" Sold Properties";var _115b="Show all";var _115c=dojo.lang.hitch(this,"_resetCompanySearch");this._updateSearchDetails(txt,_115b,_115c);},_getDrivingDirections:function(query){if(dojo.lang.isFunction(ShowMapDirectionsWin)){var url="/Popups/MapAndDirections.aspx?"+query;ShowMapDirectionsWin(url);}},_showOwnership:function(s){if(s&&s.length){return s+(s.charAt(s.length-1)=="s"?"'":"'s");}return "";},_wwmoAgentID:0,_wwmoOverride:false,_workWithMeOnline:function(_1160,id){this._wwmoAgentID=parseInt(id);this._wwmoOverride=_1160;dojo.io.cookie.setCookie("AttemptWWMO",parseInt(id),-1,"/");this._doWorkWithMeOnline();},_workWithMeOnlineOverride:function(_1162){this._workWithMeOnline(_1162,this._wwmoAgentID);},_doWorkWithMeOnline:function(){dojo.io.bind({url:"/WorkWithAgent.aspx?rand="+(new Date()).getTime(),method:"post",content:{Override:this._wwmoOverride?"true":"false",AgentID:this._wwmoAgentID},load:dojo.lang.hitch(this,"_processWorkWithMe"),mimetype:"text/json",sync:true,transport:"XMLHTTPTransport"});},_processWorkWithMe:function(type,data,event){if(data){if(data.promptOverride){if(confirm("You are currently working online with "+data.oldAgent+".\nDo you want to replace "+data.oldAgent+" with "+data.newAgent+"?")){this._workWithMeOnlineOverride(true);this._yourAccountPane._showSuccess("You are now working online with "+data.newAgent+".");}else{this._wwmoAgentID=0;this._wwmoOverride=false;}}else{if(data.success){this.onWorkWithMeOnline(data.Agent);}else{this._notLoggedInInternal("_doWorkWithMeOnline","Please sign in or register for an account.");}}}},onWorkWithMeOnline:function(agent){},_createLinkSaveSearchWidget:function(){if(!this._linkSaveSearchWidget){this._linkSaveSearchWidget=dojo.widget.createWidget("wtl:LinkToSearchControl",{currentDeployment:this.currentDeployment,id:"LinkToSearchWidget"},dojo.byId("linkSaveSearchWidget"));dojo.event.connect(this._linkSaveSearchWidget,"saveClick",this,"_doSaveSearch");dojo.event.connect(this,"onSearch",this._linkSaveSearchWidget,"hide");dojo.event.connect(this,"onSearch",this,"_disconnectListeners");dojo.event.connect(this._linkSaveSearchWidget,"_showMessage",this,"showMessage");}},_saveSearchClick:function(evt){dojo.event.browser.stopEvent(evt);if(!this._linkSaveSearchWidget){this._createLinkSaveSearchWidget();}this._linkSaveSearchWidget.showSaveSearch();},_doSaveSearch:function(){this._linkSaveSearchWidget.hide();dojo.io.bind({url:"/GuestHandler.c?rand="+(new Date()).getTime(),method:"post",content:{},load:dojo.lang.hitch(this,"_onCheckGuest"),mimetype:"text/json",transport:"XMLHTTPTransport"});},_onCheckGuest:function(type,obj,event){if(obj.Success){this._saveSearch(this._linkSaveSearchWidget.getSearchName(),this._linkSaveSearchWidget.getNotificationType(),0);this._linkSaveSearchWidget.clear();this._yourAccountPane.openPane();}if(!obj.Success){this._notLoggedInInternal("_trySaveSearchAgain","You must sign in to save a search.");}},_trySaveSearchAgain:function(){this._saveSearch(this._linkSaveSearchWidget.getSearchName(),this._linkSaveSearchWidget.getNotificationType(),0);},_saveSearch:function(_116b,_116c,_116d){if(this._mapWidget){var _116e=this._mapWidget.getBounds();var sw=_116e.getSouthWest();var ne=_116e.getNorthEast();var _1171={top:ne.lat(),left:sw.lng(),bottom:sw.lat(),right:ne.lng(),searchType:this.searchType,SearchDisplayType:this.searchDisplay,OfficeID:this.defaultOffice?this.defaultOffice:0,areaID:this._areaSelectorWidget.selectedAreaID,SearchName:_116b,FrequencyCode:_116c,HomeDeliveryID:_116d?_116d:0,SaveToGuest:true};dojo.io.bind({url:wtl.util.urlAppend(this.saveSearchHandler,"rand="+(new Date()).getTime()),method:"post",content:_1171,load:dojo.lang.hitch(this,(_116d>0)?"_onUpdateSearch":"_onSaveSearch"),mimetype:"text/json",transport:"XMLHTTPTransport"});}},_onSaveSearch:function(type,obj,event){if(obj&&obj.Search){this.onSaveSearch(obj.Search);}else{}},onSaveSearch:function(_1175){},_onUpdateSearch:function(type,obj,event){if(obj&&obj.Search){this.onUpdateSearch(obj.Search);}else{}},onUpdateSearch:function(_1179){},_linkToSearchClick:function(evt){dojo.event.browser.stopEvent(evt);if(!this._linkSaveSearchWidget){this._createLinkSaveSearchWidget();}var _117b=this._linkSaveSearchWidget.showLinkToSearch();function linkToSearchCallback(type,obj,event){if(obj.HomeDeliveryID){this._linkSaveSearchWidget.setSelectedValue(wtl.util.getSavedSearchURL(obj.HomeDeliveryID));}else{this._linkSaveSearchWidget.setSelectedValue("Error Creating Link");}}if(_117b){var _117f=this._mapWidget.getBounds();var sw=_117f.getSouthWest();var ne=_117f.getNorthEast();var _1182={top:ne.lat(),left:sw.lng(),bottom:sw.lat(),right:ne.lng(),searchType:this.searchType,SearchDisplayType:this.searchDisplay,areaID:this._areaSelectorWidget.selectedAreaID,SearchName:"link_to_search",FrequencyCode:0,HomeDeliveryID:0,SaveToGuest:false};dojo.io.bind({url:wtl.util.urlAppend(this.saveSearchHandler,"rand="+(new Date()).getTime()),method:"post",content:_1182,load:dojo.lang.hitch(this,linkToSearchCallback),mimetype:"text/json",transport:"XMLHTTPTransport"});}},onSaveToHomeFile:function(_1183){},saveToHomeFileSuccess:function(msg){},_onHeaderLoginClick:function(evt){if(this._yourAccountPane&&dojo.lang.isFunction(this._yourAccountPane.openPane)){dojo.event.browser.stopEvent(evt);this._yourAccountPane.openPane();}},_onHeaderLogoutClick:function(evt){if(this._yourAccountPane&&dojo.lang.isFunction(this._yourAccountPane.logOut)){this._yourAccountPane.logOut(evt);if(dojo.lang.isFunction(this._yourAccountPane.openPane)){this._yourAccountPane.openPane();}}},_onLoginCallback:function(guest){var h=this.headerItems;if(h&&guest){dojo.html.addClass(h.HeaderSignIn,"Hide");dojo.html.removeClass(h.HeaderSignedIn,"Hide");h.HeaderSignedInName.innerHTML=guest.FirstName+" "+guest.LastName;}},_onLoginCompleteCallback:function(){if(this._propertyPreviewPane&&this._propertyPreviewPane.item){this._propertyPreviewPane.openPreview(this._propertyPreviewPane.item,true);}},_onLogoutCallback:function(guest){var h=this.headerItems;if(h){dojo.html.removeClass(h.HeaderSignIn,"Hide");dojo.html.addClass(h.HeaderSignedIn,"Hide");h.HeaderSignedInName.innerHTML="";}},_onRerunSearch:function(_118b){this._search({rebuildQuadTree:true,homeDeliveryID:_118b.HomeDeliveryID,functionName:"_onRerunSearch"});},_updateSearchDetails:function(txt,_118d,_118e){if(this._prevSearchDetailEvent){var _118f=this.searchDetails.getElementsByTagName("a");if(_118f[0]){this._removeSearchDetailEvent(_118f[0],this._prevSearchDetailEvent);}}wtl.util.destroyChildren(this.searchDetails);if(txt){this.searchDetails.appendChild(document.createTextNode(txt+" "));}if(_118d&&_118e){var a=document.createElement("a");a.innerHTML=_118d;this._addSearchDetailEvent(a,_118e);this.searchDetails.appendChild(a);}},_addSearchDetailEvent:function(a,_1192){this._prevSearchDetailEvent=_1192;dojo.event.connect(a,"onclick",_1192);},_removeSearchDetailEvent:function(a,_1194){dojo.event.disconnect(a,"onclick",_1194);this._prevSearchDetailEvent=null;},_onCompareItemClick:function(_1195){this._showPropertyPreview();},_onShowLightbox:function(){},_onHideLightbox:function(){},_messageContainer:null,showMessage:function(msg,error){if(!this._messageContainer){this._createMessageContainer();}this._messageContainer.showMessage(msg,error);},clearMessage:function(){if(this._messageContainer){this._messageContainer.hide();}},_createMessageContainer:function(){var div=document.createElement("div");dojo.body().appendChild(div);this._messageContainer=dojo.widget.createWidget("wtl:MessageContainer",{},div);},_resetClick:function(evt){dojo.event.browser.stopEvent(evt);this._hideDrillDown();var id=evt.target.id;this._manageReset(id);},_showReset:function(){if(dojo.html.isDisplayed(dojo.byId("ResetDropDown"))){clearTimeout(this._resetTimer);this._resetTimer=0;}else{dojo.html.setDisplay(dojo.byId("ResetDropDown"),true);dojo.html.addClass(this.resetControl,"FilterCriteriaDrillDownSelected");}},_hideReset:function(evt){var pos=wtl.LayoutCache.getAbsolutePosition("ResetDrillDown");var box=dojo.html.getContentBox(this.resetControl);box.height+=54;var _119e=false;if(evt.pageX<(pos.x-55)||evt.pageY<(parseInt(pos.y)+25)){_119e=true;}if(evt.pageX>=(pos.x+box.width)){_119e=true;}if(evt.pageY>(pos.y+box.height)){_119e=true;}if(_119e){this._resetTimer=setTimeout(dojo.lang.hitch(this,"_hideDrillDown"),100);}},_hideDrillDown:function(){this._resetTimer=0;dojo.html.setDisplay(dojo.byId("ResetDropDown"),false);dojo.html.removeClass(this.resetControl,"FilterCriteriaDrillDownSelected");},debug:function(){}});dojo.provide("dojo.widget.PopupContainer");dojo.declare("dojo.widget.PopupContainerBase",null,function(){this.queueOnAnimationFinish=[];},{isShowingNow:false,currentSubpopup:null,beginZIndex:1000,parentPopup:null,parent:null,popupIndex:0,aroundBox:dojo.html.boxSizing.BORDER_BOX,openedForWindow:null,processKey:function(evt){return false;},applyPopupBasicStyle:function(){with(this.domNode.style){display="none";position="absolute";}},aboutToShow:function(){},open:function(x,y,_11a2,_11a3,_11a4,_11a5){if(this.isShowingNow){return;}if(this.animationInProgress){this.queueOnAnimationFinish.push(this.open,arguments);return;}this.aboutToShow();var _11a6=false,node,_11a8;if(typeof x=="object"){node=x;_11a8=_11a3;_11a3=_11a2;_11a2=y;_11a6=true;}this.parent=_11a2;dojo.body().appendChild(this.domNode);_11a3=_11a3||_11a2["domNode"]||[];var _11a9=null;this.isTopLevel=true;while(_11a2){if(_11a2!==this&&(_11a2.setOpenedSubpopup!=undefined&&_11a2.applyPopupBasicStyle!=undefined)){_11a9=_11a2;this.isTopLevel=false;_11a9.setOpenedSubpopup(this);break;}_11a2=_11a2.parent;}this.parentPopup=_11a9;this.popupIndex=_11a9?_11a9.popupIndex+1:1;if(this.isTopLevel){var _11aa=dojo.html.isNode(_11a3)?_11a3:null;dojo.widget.PopupManager.opened(this,_11aa);}if(this.isTopLevel&&!dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){this._bookmark=dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.getBookmark);}else{this._bookmark=null;}if(_11a3 instanceof Array){_11a3={left:_11a3[0],top:_11a3[1],width:0,height:0};}with(this.domNode.style){display="";zIndex=this.beginZIndex+this.popupIndex;}if(_11a6){this.move(node,_11a5,_11a8);}else{this.move(x,y,_11a5,_11a4);}this.domNode.style.display="none";this.explodeSrc=_11a3;this.show();this.isShowingNow=true;},move:function(x,y,_11ad,_11ae){var _11af=(typeof x=="object");if(_11af){var _11b0=_11ad;var node=x;_11ad=y;if(!_11b0){_11b0={"BL":"TL","TL":"BL"};}dojo.html.placeOnScreenAroundElement(this.domNode,node,_11ad,this.aroundBox,_11b0);}else{if(!_11ae){_11ae="TL,TR,BL,BR";}dojo.html.placeOnScreen(this.domNode,x,y,_11ad,true,_11ae);}},close:function(force){if(force){this.domNode.style.display="none";}if(this.animationInProgress){this.queueOnAnimationFinish.push(this.close,[]);return;}this.closeSubpopup(force);this.hide();if(this.bgIframe){this.bgIframe.hide();this.bgIframe.size({left:0,top:0,width:0,height:0});}if(this.isTopLevel){dojo.widget.PopupManager.closed(this);}this.isShowingNow=false;if(this.parent){setTimeout(dojo.lang.hitch(this,function(){try{if(this.parent["focus"]){this.parent.focus();}else{this.parent.domNode.focus();}}catch(e){dojo.debug("No idea how to focus to parent",e);}}),10);}if(this._bookmark&&dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){if(this.openedForWindow){this.openedForWindow.focus();}try{dojo.withGlobal(this.openedForWindow||dojo.global(),"moveToBookmark",dojo.html.selection,[this._bookmark]);}catch(e){}}this._bookmark=null;},closeAll:function(force){if(this.parentPopup){this.parentPopup.closeAll(force);}else{this.close(force);}},setOpenedSubpopup:function(popup){this.currentSubpopup=popup;},closeSubpopup:function(force){if(this.currentSubpopup==null){return;}this.currentSubpopup.close(force);this.currentSubpopup=null;},onShow:function(){dojo.widget.PopupContainer.superclass.onShow.apply(this,arguments);this.openedSize={w:this.domNode.style.width,h:this.domNode.style.height};if(dojo.render.html.ie){if(!this.bgIframe){this.bgIframe=new dojo.html.BackgroundIframe();this.bgIframe.setZIndex(this.domNode);}this.bgIframe.size(this.domNode);this.bgIframe.show();}this.processQueue();},processQueue:function(){if(!this.queueOnAnimationFinish.length){return;}var func=this.queueOnAnimationFinish.shift();var args=this.queueOnAnimationFinish.shift();func.apply(this,args);},onHide:function(){dojo.widget.HtmlWidget.prototype.onHide.call(this);if(this.openedSize){with(this.domNode.style){width=this.openedSize.w;height=this.openedSize.h;}}this.processQueue();}});dojo.widget.defineWidget("dojo.widget.PopupContainer",[dojo.widget.HtmlWidget,dojo.widget.PopupContainerBase],{fillInTemplate:function(){this.applyPopupBasicStyle();dojo.widget.PopupContainer.superclass.fillInTemplate.apply(this,arguments);}});dojo.widget.PopupManager=new function(){this.currentMenu=null;this.currentButton=null;this.currentFocusMenu=null;this.focusNode=null;this.registeredWindows=[];this.registerWin=function(win){if(!win.__PopupManagerRegistered){dojo.event.connect(win.document,"onmousedown",this,"onClick");dojo.event.connect(win,"onscroll",this,"onClick");dojo.event.connect(win.document,"onkey",this,"onKey");win.__PopupManagerRegistered=true;this.registeredWindows.push(win);}};this.registerAllWindows=function(_11b9){if(!_11b9){_11b9=dojo.html.getDocumentWindow(window.top&&window.top.document||window.document);}this.registerWin(_11b9);for(var i=0;i<_11b9.frames.length;i++){try{var win=dojo.html.getDocumentWindow(_11b9.frames[i].document);if(win){this.registerAllWindows(win);}}catch(e){}}};this.unRegisterWin=function(win){if(win.__PopupManagerRegistered){dojo.event.disconnect(win.document,"onmousedown",this,"onClick");dojo.event.disconnect(win,"onscroll",this,"onClick");dojo.event.disconnect(win.document,"onkey",this,"onKey");win.__PopupManagerRegistered=false;}};this.unRegisterAllWindows=function(){for(var i=0;i<this.registeredWindows.length;++i){this.unRegisterWin(this.registeredWindows[i]);}this.registeredWindows=[];};dojo.addOnLoad(this,"registerAllWindows");dojo.addOnUnload(this,"unRegisterAllWindows");this.closed=function(menu){if(this.currentMenu==menu){this.currentMenu=null;this.currentButton=null;this.currentFocusMenu=null;}};this.opened=function(menu,_11c0){if(menu==this.currentMenu){return;}if(this.currentMenu){this.currentMenu.close();}this.currentMenu=menu;this.currentFocusMenu=menu;this.currentButton=_11c0;};this.setFocusedMenu=function(menu){this.currentFocusMenu=menu;};this.onKey=function(e){if(!e.key){return;}if(!this.currentMenu||!this.currentMenu.isShowingNow){return;}var m=this.currentFocusMenu;while(m){if(m.processKey(e)){e.preventDefault();e.stopPropagation();break;}m=m.parentPopup;}},this.onClick=function(e){if(!this.currentMenu){return;}var _11c5=dojo.html.getScroll().offset;var m=this.currentMenu;while(m){if(dojo.html.overElement(m.domNode,e)||dojo.html.isDescendantOf(e.target,m.domNode)){return;}m=m.currentSubpopup;}if(this.currentButton&&dojo.html.overElement(this.currentButton,e)){return;}this.currentMenu.close();};};dojo.provide("dojo.widget.DropdownContainer");dojo.widget.defineWidget("dojo.widget.DropdownContainer",dojo.widget.HtmlWidget,{inputWidth:"7em",id:"",inputId:"",inputName:"",iconURL:dojo.uri.moduleUri("dojo","widget/templates/images/combo_box_arrow.png"),copyClasses:false,iconAlt:"",containerToggle:"plain",containerToggleDuration:150,templateString:"<span style=\"white-space:nowrap\"><input type=\"hidden\" name=\"\" value=\"\" dojoAttachPoint=\"valueNode\" /><input name=\"\" type=\"text\" value=\"\" style=\"vertical-align:middle;\" dojoAttachPoint=\"inputNode\" autocomplete=\"off\" /> <img src=\"${this.iconURL}\" alt=\"${this.iconAlt}\" dojoAttachEvent=\"onclick:onIconClick\" dojoAttachPoint=\"buttonNode\" style=\"vertical-align:middle; cursor:pointer; cursor:hand\" /></span>",templateCssPath:"",isContainer:true,attachTemplateNodes:function(){dojo.widget.DropdownContainer.superclass.attachTemplateNodes.apply(this,arguments);this.popup=dojo.widget.createWidget("PopupContainer",{toggle:this.containerToggle,toggleDuration:this.containerToggleDuration});this.containerNode=this.popup.domNode;},fillInTemplate:function(args,frag){this.domNode.appendChild(this.popup.domNode);if(this.id){this.domNode.id=this.id;}if(this.inputId){this.inputNode.id=this.inputId;}if(this.inputName){this.inputNode.name=this.inputName;}this.inputNode.style.width=this.inputWidth;this.inputNode.disabled=this.disabled;if(this.copyClasses){this.inputNode.style="";this.inputNode.className=this.getFragNodeRef(frag).className;}dojo.event.connect(this.inputNode,"onchange",this,"onInputChange");},onIconClick:function(evt){if(this.disabled){return;}if(!this.popup.isShowingNow){this.popup.open(this.inputNode,this,this.buttonNode);}else{this.popup.close();}},hideContainer:function(){if(this.popup.isShowingNow){this.popup.close();}},onInputChange:function(){},enable:function(){this.inputNode.disabled=false;dojo.widget.DropdownContainer.superclass.enable.apply(this,arguments);},disable:function(){this.inputNode.disabled=true;dojo.widget.DropdownContainer.superclass.disable.apply(this,arguments);}});dojo.provide("dojo.date.serialize");dojo.date.setIso8601=function(_11ca,_11cb){var comps=(_11cb.indexOf("T")==-1)?_11cb.split(" "):_11cb.split("T");_11ca=dojo.date.setIso8601Date(_11ca,comps[0]);if(comps.length==2){_11ca=dojo.date.setIso8601Time(_11ca,comps[1]);}return _11ca;};dojo.date.fromIso8601=function(_11cd){return dojo.date.setIso8601(new Date(0,0),_11cd);};dojo.date.setIso8601Date=function(_11ce,_11cf){var _11d0="^([0-9]{4})((-?([0-9]{2})(-?([0-9]{2}))?)|"+"(-?([0-9]{3}))|(-?W([0-9]{2})(-?([1-7]))?))?$";var d=_11cf.match(new RegExp(_11d0));if(!d){dojo.debug("invalid date string: "+_11cf);return null;}var year=d[1];var month=d[4];var date=d[6];var _11d5=d[8];var week=d[10];var _11d7=d[12]?d[12]:1;_11ce.setFullYear(year);if(_11d5){_11ce.setMonth(0);_11ce.setDate(Number(_11d5));}else{if(week){_11ce.setMonth(0);_11ce.setDate(1);var gd=_11ce.getDay();var day=gd?gd:7;var _11da=Number(_11d7)+(7*Number(week));if(day<=4){_11ce.setDate(_11da+1-day);}else{_11ce.setDate(_11da+8-day);}}else{if(month){_11ce.setDate(1);_11ce.setMonth(month-1);}if(date){_11ce.setDate(date);}}}return _11ce;};dojo.date.fromIso8601Date=function(_11db){return dojo.date.setIso8601Date(new Date(0,0),_11db);};dojo.date.setIso8601Time=function(_11dc,_11dd){var _11de="Z|(([-+])([0-9]{2})(:?([0-9]{2}))?)$";var d=_11dd.match(new RegExp(_11de));var _11e0=0;if(d){if(d[0]!="Z"){_11e0=(Number(d[3])*60)+Number(d[5]);_11e0*=((d[2]=="-")?1:-1);}_11e0-=_11dc.getTimezoneOffset();_11dd=_11dd.substr(0,_11dd.length-d[0].length);}var _11e1="^([0-9]{2})(:?([0-9]{2})(:?([0-9]{2})(.([0-9]+))?)?)?$";d=_11dd.match(new RegExp(_11e1));if(!d){dojo.debug("invalid time string: "+_11dd);return null;}var hours=d[1];var mins=Number((d[3])?d[3]:0);var secs=(d[5])?d[5]:0;var ms=d[7]?(Number("0."+d[7])*1000):0;_11dc.setHours(hours);_11dc.setMinutes(mins);_11dc.setSeconds(secs);_11dc.setMilliseconds(ms);if(_11e0!==0){_11dc.setTime(_11dc.getTime()+_11e0*60000);}return _11dc;};dojo.date.fromIso8601Time=function(_11e6){return dojo.date.setIso8601Time(new Date(0,0),_11e6);};dojo.date.toRfc3339=function(_11e7,_11e8){if(!_11e7){_11e7=new Date();}var _=dojo.string.pad;var _11ea=[];if(_11e8!="timeOnly"){var date=[_(_11e7.getFullYear(),4),_(_11e7.getMonth()+1,2),_(_11e7.getDate(),2)].join("-");_11ea.push(date);}if(_11e8!="dateOnly"){var time=[_(_11e7.getHours(),2),_(_11e7.getMinutes(),2),_(_11e7.getSeconds(),2)].join(":");var _11ed=_11e7.getTimezoneOffset();time+=(_11ed>0?"-":"+")+_(Math.floor(Math.abs(_11ed)/60),2)+":"+_(Math.abs(_11ed)%60,2);_11ea.push(time);}return _11ea.join("T");};dojo.date.fromRfc3339=function(_11ee){if(_11ee.indexOf("Tany")!=-1){_11ee=_11ee.replace("Tany","");}var _11ef=new Date();return dojo.date.setIso8601(_11ef,_11ee);};dojo.provide("dojo.widget.DatePicker");dojo.widget.defineWidget("dojo.widget.DatePicker",dojo.widget.HtmlWidget,{value:"",name:"",displayWeeks:6,adjustWeeks:false,startDate:"1492-10-12",endDate:"2941-10-12",weekStartsOn:"",staticDisplay:false,dayWidth:"narrow",classNames:{previous:"previousMonth",disabledPrevious:"previousMonthDisabled",current:"currentMonth",disabledCurrent:"currentMonthDisabled",next:"nextMonth",disabledNext:"nextMonthDisabled",currentDate:"currentDate",selectedDate:"selectedDate"},templateString:"<div class=\"datePickerContainer\" dojoAttachPoint=\"datePickerContainerNode\">\r\n\t<table cellspacing=\"0\" cellpadding=\"0\" class=\"calendarContainer\">\r\n\t\t<thead>\r\n\t\t\t<tr>\r\n\t\t\t\t<td class=\"monthWrapper\" valign=\"top\">\r\n\t\t\t\t\t<table class=\"monthContainer\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td class=\"monthCurve monthCurveTL\" valign=\"top\"></td>\r\n\t\t\t\t\t\t\t<td class=\"monthLabelContainer\" valign=\"top\">\r\n\t\t\t\t\t\t\t\t<span dojoAttachPoint=\"increaseWeekNode\" \r\n\t\t\t\t\t\t\t\t\tdojoAttachEvent=\"onClick: onIncrementWeek;\" \r\n\t\t\t\t\t\t\t\t\tclass=\"incrementControl increase\">\r\n\t\t\t\t\t\t\t\t\t<img src=\"${dojoWidgetModuleUri}templates/images/incrementMonth.png\" \r\n\t\t\t\t\t\t\t\t\talt=\"&darr;\" style=\"width:7px;height:5px;\" />\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t<span \r\n\t\t\t\t\t\t\t\t\tdojoAttachPoint=\"increaseMonthNode\" \r\n\t\t\t\t\t\t\t\t\tdojoAttachEvent=\"onClick: onIncrementMonth;\" class=\"incrementControl increase\">\r\n\t\t\t\t\t\t\t\t\t<img src=\"${dojoWidgetModuleUri}templates/images/incrementMonth.png\" \r\n\t\t\t\t\t\t\t\t\t\talt=\"&darr;\"  dojoAttachPoint=\"incrementMonthImageNode\">\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t<span \r\n\t\t\t\t\t\t\t\t\tdojoAttachPoint=\"decreaseWeekNode\" \r\n\t\t\t\t\t\t\t\t\tdojoAttachEvent=\"onClick: onIncrementWeek;\" \r\n\t\t\t\t\t\t\t\t\tclass=\"incrementControl decrease\">\r\n\t\t\t\t\t\t\t\t\t<img src=\"${dojoWidgetModuleUri}templates/images/decrementMonth.png\" alt=\"&uarr;\" style=\"width:7px;height:5px;\" />\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t<span \r\n\t\t\t\t\t\t\t\t\tdojoAttachPoint=\"decreaseMonthNode\" \r\n\t\t\t\t\t\t\t\t\tdojoAttachEvent=\"onClick: onIncrementMonth;\" class=\"incrementControl decrease\">\r\n\t\t\t\t\t\t\t\t\t<img src=\"${dojoWidgetModuleUri}templates/images/decrementMonth.png\" \r\n\t\t\t\t\t\t\t\t\t\talt=\"&uarr;\" dojoAttachPoint=\"decrementMonthImageNode\">\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t<span dojoAttachPoint=\"monthLabelNode\" class=\"month\"></span>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td class=\"monthCurve monthCurveTR\" valign=\"top\"></td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</thead>\r\n\t\t<tbody>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan=\"3\">\r\n\t\t\t\t\t<table class=\"calendarBodyContainer\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t<tr dojoAttachPoint=\"dayLabelsRow\">\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t<tbody dojoAttachPoint=\"calendarDatesContainerNode\" \r\n\t\t\t\t\t\t\tdojoAttachEvent=\"onClick: _handleUiClick;\">\r\n\t\t\t\t\t\t\t<tr dojoAttachPoint=\"calendarWeekTemplate\">\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</tbody>\r\n\t\t<tfoot>\r\n\t\t\t<tr>\r\n\t\t\t\t<td colspan=\"3\" class=\"yearWrapper\">\r\n\t\t\t\t\t<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"yearContainer\">\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td class=\"curveBL\" valign=\"top\"></td>\r\n\t\t\t\t\t\t\t<td valign=\"top\">\r\n\t\t\t\t\t\t\t\t<h3 class=\"yearLabel\">\r\n\t\t\t\t\t\t\t\t\t<span dojoAttachPoint=\"previousYearLabelNode\"\r\n\t\t\t\t\t\t\t\t\t\tdojoAttachEvent=\"onClick: onIncrementYear;\" class=\"previousYear\"></span>\r\n\t\t\t\t\t\t\t\t\t<span class=\"selectedYear\" dojoAttachPoint=\"currentYearLabelNode\"></span>\r\n\t\t\t\t\t\t\t\t\t<span dojoAttachPoint=\"nextYearLabelNode\" \r\n\t\t\t\t\t\t\t\t\t\tdojoAttachEvent=\"onClick: onIncrementYear;\" class=\"nextYear\"></span>\r\n\t\t\t\t\t\t\t\t</h3>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td class=\"curveBR\" valign=\"top\"></td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</tfoot>\r\n\t</table>\r\n\t\r\n</div>\r\n",templateCssString:".datePickerContainer {\r\n\twidth:164px; /* needed for proper user styling */\r\n}\r\n\r\n.calendarContainer {\r\n/*\tborder:1px solid #566f8f;*/\r\n}\r\n\r\n.calendarBodyContainer {\r\n\twidth:100%; /* needed for the explode effect (explain?) */\r\n\tbackground: #7591bc url(\"images/dpBg.gif\") top left repeat-x;\r\n}\r\n\r\n.calendarBodyContainer thead tr td {\r\n\tcolor:#293a4b;\r\n\tfont:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\r\n\ttext-align:center;\r\n\tpadding:0.25em;\r\n\tbackground: url(\"images/dpHorizLine.gif\") bottom left repeat-x;\r\n}\r\n\r\n.calendarBodyContainer tbody tr td {\r\n\tcolor:#fff;\r\n\tfont:bold 0.7em Helvetica, Arial, Verdana, sans-serif;\r\n\ttext-align:center;\r\n\tpadding:0.4em;\r\n\tbackground: url(\"images/dpVertLine.gif\") top right repeat-y;\r\n\tcursor:pointer;\r\n\tcursor:hand;\r\n}\r\n\r\n\r\n.monthWrapper {\r\n\tpadding-bottom:2px;\r\n\tbackground: url(\"images/dpHorizLine.gif\") bottom left repeat-x;\r\n}\r\n\r\n.monthContainer {\r\n\twidth:100%;\r\n}\r\n\r\n.monthLabelContainer {\r\n\ttext-align:center;\r\n\tfont:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\r\n\tbackground: url(\"images/dpMonthBg.png\") repeat-x top left !important;\r\n\tcolor:#293a4b;\r\n\tpadding:0.25em;\r\n}\r\n\r\n.monthCurve {\r\n\twidth:12px;\r\n}\r\n\r\n.monthCurveTL {\r\n\tbackground: url(\"images/dpCurveTL.png\") no-repeat top left !important;\r\n}\r\n\r\n.monthCurveTR {\r\n\t\tbackground: url(\"images/dpCurveTR.png\") no-repeat top right !important;\r\n}\r\n\r\n\r\n.yearWrapper {\r\n\tbackground: url(\"images/dpHorizLineFoot.gif\") top left repeat-x;\r\n\tpadding-top:2px;\r\n}\r\n\r\n.yearContainer {\r\n\twidth:100%;\r\n}\r\n\r\n.yearContainer td {\r\n\tbackground:url(\"images/dpYearBg.png\") top left repeat-x;\r\n}\r\n\r\n.yearContainer .yearLabel {\r\n\tmargin:0;\r\n\tpadding:0.45em 0 0.45em 0;\r\n\tcolor:#fff;\r\n\tfont:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\r\n\ttext-align:center;\r\n}\r\n\r\n.curveBL {\r\n\tbackground: url(\"images/dpCurveBL.png\") bottom left no-repeat !important;\r\n\twidth:9px !important;\r\n\tpadding:0;\r\n\tmargin:0;\r\n}\r\n\r\n.curveBR {\r\n\tbackground: url(\"images/dpCurveBR.png\") bottom right no-repeat !important;\r\n\twidth:9px !important;\r\n\tpadding:0;\r\n\tmargin:0;\r\n}\r\n\r\n\r\n.previousMonth {\r\n\tbackground-color:#6782a8 !important;\r\n}\r\n\r\n.previousMonthDisabled {\r\n\tbackground-color:#a4a5a6 !important;\r\n\tcursor:default !important\r\n}\r\n.currentMonth {\r\n}\r\n\r\n.currentMonthDisabled {\r\n\tbackground-color:#bbbbbc !important;\r\n\tcursor:default !important\r\n}\r\n.nextMonth {\r\n\tbackground-color:#6782a8 !important;\r\n}\r\n.nextMonthDisabled {\r\n\tbackground-color:#a4a5a6 !important;\r\n\tcursor:default !important;\r\n}\r\n\r\n.currentDate {\r\n\ttext-decoration:underline;\r\n\tfont-style:italic;\r\n}\r\n\r\n.selectedItem {\r\n\tbackground-color:#fff !important;\r\n\tcolor:#6782a8 !important;\r\n}\r\n\r\n.yearLabel .selectedYear {\r\n\tpadding:0.2em;\r\n\tbackground-color:#9ec3fb !important;\r\n}\r\n\r\n.nextYear, .previousYear {\r\n\tcursor:pointer;cursor:hand;\r\n\tpadding:0;\r\n}\r\n\r\n.nextYear {\r\n\tmargin:0 0 0 0.55em;\r\n}\r\n\r\n.previousYear {\r\n\tmargin:0 0.55em 0 0;\r\n}\r\n\r\n.incrementControl {\r\n\tcursor:pointer;cursor:hand;\r\n\twidth:1em;\r\n}\r\n\r\n.increase {\r\n\tfloat:right;\r\n}\r\n\r\n.decrease {\r\n\tfloat:left;\r\n}\r\n\r\n.lastColumn {\r\n\tbackground-image:none !important;\r\n}\r\n\r\n\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/DatePicker.css"),postMixInProperties:function(){dojo.widget.DatePicker.superclass.postMixInProperties.apply(this,arguments);if(!this.weekStartsOn){this.weekStartsOn=dojo.date.getFirstDayOfWeek(this.lang);}this.today=new Date();this.today.setHours(0,0,0,0);if(typeof (this.value)=="string"&&this.value.toLowerCase()=="today"){this.value=new Date();}else{if(this.value&&(typeof this.value=="string")&&(this.value.split("-").length>2)){this.value=dojo.date.fromRfc3339(this.value);this.value.setHours(0,0,0,0);}}},fillInTemplate:function(args,frag){dojo.widget.DatePicker.superclass.fillInTemplate.apply(this,arguments);var _11f2=this.getFragNodeRef(frag);dojo.html.copyStyle(this.domNode,_11f2);this.weekTemplate=dojo.dom.removeNode(this.calendarWeekTemplate);this._preInitUI(this.value?this.value:this.today,false,true);var _11f3=dojo.lang.unnest(dojo.date.getNames("days",this.dayWidth,"standAlone",this.lang));if(this.weekStartsOn>0){for(var i=0;i<this.weekStartsOn;i++){_11f3.push(_11f3.shift());}}var _11f5=this.dayLabelsRow.getElementsByTagName("td");for(i=0;i<7;i++){_11f5.item(i).innerHTML=_11f3[i];}if(this.value){this.setValue(this.value);}},getValue:function(){return dojo.date.toRfc3339(new Date(this.value),"dateOnly");},getDate:function(){return this.value;},setValue:function(_11f6){this.setDate(_11f6);},setDate:function(_11f7){var d=_11f7;if(typeof (d)=="string"&&d!=""){var t=dojo.date.fromRfc3339(d);}else{if(typeof (d)=="object"){var t=new Date(d);}else{t="";}}if(typeof (t)=="object"){this.value=new Date(t);this.value.setHours(0,0,0,0);}else{this.value="";}if(this.selectedNode!=null){dojo.html.removeClass(this.selectedNode,this.classNames.selectedDate);}if(this.clickedNode!=null){dojo.html.addClass(this.clickedNode,this.classNames.selectedDate);this.selectedNode=this.clickedNode;}else{this._preInitUI((this.value=="")?this.curMonth:this.value,false,true);}this.clickedNode=null;this.onValueChanged(this.value);},_preInitUI:function(_11fa,_11fb,_11fc){function checkDate(d,s){if(typeof (d)=="string"){var t=dojo.date.fromRfc3339(d);if(t==null&&typeof (s)=="string"){var t=dojo.date.fromRfc3339(s);}return t;}return d;}this.startDate=checkDate(this.startDate,"1492-10-12");this.endDate=checkDate(this.endDate,"2941-10-12");this.startDate.setHours(0,0,0,0);this.endDate.setHours(24,0,0,-1);if(_11fa<this.startDate||_11fa>this.endDate){_11fa=new Date((_11fa<this.startDate)?this.startDate:this.endDate);}this.firstDay=this._initFirstDay(_11fa,_11fb);this.selectedIsUsed=false;this.currentIsUsed=false;var _1200=new Date(this.firstDay);var _1201=_1200.getMonth();this.curMonth=new Date(_1200);this.curMonth.setDate(_1200.getDate()+6);this.curMonth.setDate(1);if(this.displayWeeks==""||this.adjustWeeks){this.adjustWeeks=true;this.displayWeeks=Math.ceil((dojo.date.getDaysInMonth(this.curMonth)+this._getAdjustedDay(this.curMonth))/7);}var days=this.displayWeeks*7;if(dojo.date.diff(this.startDate,this.endDate,dojo.date.dateParts.DAY)<days){this.staticDisplay=true;if(dojo.date.diff(_1200,this.endDate,dojo.date.dateParts.DAY)>days){this._preInitUI(this.startDate,true,false);_1200=new Date(this.firstDay);}this.curMonth=new Date(_1200);this.curMonth.setDate(_1200.getDate()+6);this.curMonth.setDate(1);var _1203=(_1200.getMonth()==this.curMonth.getMonth())?"current":"previous";}if(_11fc){this._initUI(days);}},_initUI:function(days){dojo.dom.removeChildren(this.calendarDatesContainerNode);for(var i=0;i<this.displayWeeks;i++){this.calendarDatesContainerNode.appendChild(this.weekTemplate.cloneNode(true));}var _1206=new Date(this.firstDay);this._setMonthLabel(this.curMonth.getMonth());this._setYearLabels(this.curMonth.getFullYear());var _1207=this.calendarDatesContainerNode.getElementsByTagName("td");var _1208=this.calendarDatesContainerNode.getElementsByTagName("tr");var _1209;for(i=0;i<days;i++){_1209=_1207.item(i);_1209.innerHTML=_1206.getDate();_1209.setAttribute("djDateValue",_1206.valueOf());var _120a=(_1206.getMonth()!=this.curMonth.getMonth()&&Number(_1206)<Number(this.curMonth))?"previous":(_1206.getMonth()==this.curMonth.getMonth())?"current":"next";var _120b=_120a;if(this._isDisabledDate(_1206)){var _120c={previous:"disabledPrevious",current:"disabledCurrent",next:"disabledNext"};_120b=_120c[_120a];}dojo.html.setClass(_1209,this._getDateClassName(_1206,_120b));if(dojo.html.hasClass(_1209,this.classNames.selectedDate)){this.selectedNode=_1209;}_1206=dojo.date.add(_1206,dojo.date.dateParts.DAY,1);}this.lastDay=dojo.date.add(_1206,dojo.date.dateParts.DAY,-1);this._initControls();},_initControls:function(){var d=this.firstDay;var d2=this.lastDay;var _120f,_1210,_1211,_1212,_1213,_1214;_120f=_1210=_1211=_1212=_1213=_1214=!this.staticDisplay;with(dojo.date.dateParts){var add=dojo.date.add;if(_120f&&add(d,DAY,(-1*(this._getAdjustedDay(d)+1)))<this.startDate){_120f=_1211=_1213=false;}if(_1210&&d2>this.endDate){_1210=_1212=_1214=false;}if(_1211&&add(d,DAY,-1)<this.startDate){_1211=_1213=false;}if(_1212&&add(d2,DAY,1)>this.endDate){_1212=_1214=false;}if(_1213&&add(d2,YEAR,-1)<this.startDate){_1213=false;}if(_1214&&add(d,YEAR,1)>this.endDate){_1214=false;}}function enableControl(node,_1217){dojo.html.setVisibility(node,_1217?"":"hidden");}enableControl(this.decreaseWeekNode,_120f);enableControl(this.increaseWeekNode,_1210);enableControl(this.decreaseMonthNode,_1211);enableControl(this.increaseMonthNode,_1212);enableControl(this.previousYearLabelNode,_1213);enableControl(this.nextYearLabelNode,_1214);},_incrementWeek:function(evt){var d=new Date(this.firstDay);switch(evt.target){case this.increaseWeekNode.getElementsByTagName("img").item(0): case this.increaseWeekNode: var _121a=dojo.date.add(d,dojo.date.dateParts.WEEK,1);if(_121a<this.endDate){d=dojo.date.add(d,dojo.date.dateParts.WEEK,1);}break;case this.decreaseWeekNode.getElementsByTagName("img").item(0): case this.decreaseWeekNode: if(d>=this.startDate){d=dojo.date.add(d,dojo.date.dateParts.WEEK,-1);}break;}this._preInitUI(d,true,true);},_incrementMonth:function(evt){var d=new Date(this.curMonth);var _121d=new Date(this.firstDay);switch(evt.currentTarget){case this.increaseMonthNode.getElementsByTagName("img").item(0): case this.increaseMonthNode: _121d=dojo.date.add(_121d,dojo.date.dateParts.DAY,this.displayWeeks*7);if(_121d<this.endDate){d=dojo.date.add(d,dojo.date.dateParts.MONTH,1);}else{var _121e=true;}break;case this.decreaseMonthNode.getElementsByTagName("img").item(0): case this.decreaseMonthNode: if(_121d>this.startDate){d=dojo.date.add(d,dojo.date.dateParts.MONTH,-1);}else{var _121f=true;}break;}if(_121f){d=new Date(this.startDate);}else{if(_121e){d=new Date(this.endDate);}}this._preInitUI(d,false,true);},_incrementYear:function(evt){var year=this.curMonth.getFullYear();var _1222=new Date(this.firstDay);switch(evt.target){case this.nextYearLabelNode: _1222=dojo.date.add(_1222,dojo.date.dateParts.YEAR,1);if(_1222<this.endDate){year++;}else{var _1223=true;}break;case this.previousYearLabelNode: _1222=dojo.date.add(_1222,dojo.date.dateParts.YEAR,-1);if(_1222>this.startDate){year--;}else{var _1224=true;}break;}var d;if(_1224){d=new Date(this.startDate);}else{if(_1223){d=new Date(this.endDate);}else{d=new Date(year,this.curMonth.getMonth(),1);}}this._preInitUI(d,false,true);},onIncrementWeek:function(evt){evt.stopPropagation();if(!this.staticDisplay){this._incrementWeek(evt);}},onIncrementMonth:function(evt){evt.stopPropagation();if(!this.staticDisplay){this._incrementMonth(evt);}},onIncrementYear:function(evt){evt.stopPropagation();if(!this.staticDisplay){this._incrementYear(evt);}},_setMonthLabel:function(_1229){this.monthLabelNode.innerHTML=dojo.date.getNames("months","wide","standAlone",this.lang)[_1229];},_setYearLabels:function(year){var y=year-1;var that=this;function f(n){that[n+"YearLabelNode"].innerHTML=dojo.date.format(new Date(y++,0),{selector:"yearOnly",locale:that.lang});}f("previous");f("current");f("next");},_getDateClassName:function(date,_122f){var _1230=this.classNames[_122f];if((!this.selectedIsUsed&&this.value)&&(Number(date)==Number(this.value))){_1230=this.classNames.selectedDate+" "+_1230;this.selectedIsUsed=true;}if((!this.currentIsUsed)&&(Number(date)==Number(this.today))){_1230=_1230+" "+this.classNames.currentDate;this.currentIsUsed=true;}return _1230;},onClick:function(evt){dojo.event.browser.stopEvent(evt);},_handleUiClick:function(evt){var _1233=evt.target;if(_1233.nodeType!=dojo.dom.ELEMENT_NODE){_1233=_1233.parentNode;}dojo.event.browser.stopEvent(evt);this.selectedIsUsed=this.todayIsUsed=false;if(dojo.html.hasClass(_1233,this.classNames["disabledPrevious"])||dojo.html.hasClass(_1233,this.classNames["disabledCurrent"])||dojo.html.hasClass(_1233,this.classNames["disabledNext"])){return;}this.clickedNode=_1233;this.setDate(new Date(Number(dojo.html.getAttribute(_1233,"djDateValue"))));},onValueChanged:function(date){},_isDisabledDate:function(_1235){if(_1235<this.startDate||_1235>this.endDate){return true;}return this.isDisabledDate(_1235,this.lang);},isDisabledDate:function(_1236,_1237){return false;},_initFirstDay:function(_1238,adj){var d=new Date(_1238);if(!adj){d.setDate(1);}d.setDate(d.getDate()-this._getAdjustedDay(d,this.weekStartsOn));d.setHours(0,0,0,0);return d;},_getAdjustedDay:function(_123b){var days=[0,1,2,3,4,5,6];if(this.weekStartsOn>0){for(var i=0;i<this.weekStartsOn;i++){days.unshift(days.pop());}}return days[_123b.getDay()];},destroy:function(){dojo.widget.DatePicker.superclass.destroy.apply(this,arguments);dojo.html.destroyNode(this.weekTemplate);}});dojo.provide("wtl.widget.DatePickerWTL1");dojo.widget.defineWidget("wtl.widget.DatePickerWTL1",dojo.widget.DatePicker,{templateString:"<div class=\"datePickerContainer\" dojoAttachPoint=\"datePickerContainerNode\">\r\n\t<table cellspacing=\"0\" cellpadding=\"0\" class=\"calendarContainer\" border=\"0\">\r\n\t\t<thead>\r\n\t\t\t<tr>\r\n\t\t\t\t<td class=\"yearWrapper\">\r\n\r\n\t\t\t\t\t<div class=\"yearLabel\">\r\n\t\t\t\t\t\t<img src=\"../Deployments/CBGreatLakes/Branding/Icons/ArrowLeftSm.gif\" alt=\"&#60;\" dojoAttachEvent=\"onClick: onIncrementYear;\" class=\"previousYear decrease\" dojoAttachPoint=\"previousYearLabelNode\">\r\n\t\t\t\t\t\t<img src=\"../Deployments/CBGreatLakes/Branding/Icons/ArrowRightSm.gif\" alt=\"&#62;\" dojoAttachEvent=\"onClick: onIncrementYear;\" class=\"nextYear increase\" dojoAttachPoint=\"nextYearLabelNode\">\r\n\t\t\t\t\t\t<span class=\"selectedYear\" dojoAttachPoint=\"currentYearLabelNode\"></span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t\t<td class=\"monthWrapper\" valign=\"top\">\r\n\r\n\t\t\t\t\t\t<span style=\"display: none;\" dojoattachpoint=\"increaseWeekNode\" dojoattachevent=\"onClick: onIncrementWeek;\" class=\"incrementControl increase\">\r\n\t\t\t\t\t\t\t<img src=\"../Deployments/CBGreatLakes/Branding/Icons/ArrowRightSm.gif\" alt=\"&#62;\" />\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t<span dojoattachpoint=\"increaseMonthNode\" dojoattachevent=\"onClick: onIncrementMonth;\" class=\"incrementControl increase\">\r\n\t\t\t\t\t\t\t<img src=\"../Deployments/CBGreatLakes/Branding/Icons/ArrowRightSm.gif\" alt=\"&#62;\" dojoattachpoint=\"incrementMonthImageNode\">\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t<span style=\"display: none;\" dojoattachpoint=\"decreaseWeekNode\" dojoattachevent=\"onClick: onIncrementWeek;\" class=\"incrementControl decrease\">\r\n\t\t\t\t\t\t\t<img src=\"../Deployments/CBGreatLakes/Branding/Icons/ArrowLeftSm.gif\" alt=\"&#60;\" />\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t<span dojoattachpoint=\"decreaseMonthNode\" dojoattachevent=\"onClick: onIncrementMonth;\" class=\"incrementControl decrease\">\r\n\t\t\t\t\t\t\t<img src=\"../Deployments/CBGreatLakes/Branding/Icons/ArrowLeftSm.gif\" alt=\"&#60;\" dojoattachpoint=\"decrementMonthImageNode\">\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t<span dojoAttachPoint=\"monthLabelNode\" class=\"month\"></span>\r\n\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</thead>\r\n\t\t<tbody>\r\n\t\t\t<tr>\r\n\t\t\t\t<td class=\"bodyWrapper\">\r\n\t\t\t\t\t<table class=\"calendarBodyContainer\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t<tr dojoAttachPoint=\"dayLabelsRow\">\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t<tbody dojoAttachPoint=\"calendarDatesContainerNode\" \r\n\t\t\t\t\t\t\tdojoAttachEvent=\"onClick: _handleUiClick;\">\r\n\t\t\t\t\t\t\t<tr dojoAttachPoint=\"calendarWeekTemplate\">\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</tbody>\r\n\t</table>\r\n</div>\r\n",templateCssPath:null,postMixInProperties:function(){if(!djConfig["compressedCss"]){this.templateCssString="";this.templateCssPath=dojo.uri.moduleUri("wtl","widget/templates/DatePickerWTL.css");}wtl.widget.DatePickerWTL1.superclass.postMixInProperties.apply(this,arguments);},_setYearLabels:function(year){var y=year;var that=this;function f(n){that[n+"YearLabelNode"].innerHTML=dojo.date.format(new Date(y++,0),{selector:"yearOnly",locale:that.lang});}f("current");}});dojo.provide("wtl.widget.DropdownDatePicker");dojo.widget.defineWidget("wtl.widget.DropdownDatePicker",dojo.widget.DropdownContainer,{iconURL:"/Images/Calendar.gif",cssClass:"",tabIndex:-1,formatLength:"short",displayFormat:"MM/dd/yyyy",saveFormat:"",value:"",name:"",displayWeeks:6,adjustWeeks:false,startDate:"1492-10-12",endDate:"2941-10-12",weekStartsOn:"",staticDisplay:false,keyPress:false,postMixInProperties:function(_1242,frag){wtl.widget.DropdownDatePicker.superclass.postMixInProperties.apply(this,arguments);var _1244=dojo.i18n.getLocalization("dojo.widget","DropdownDatePicker",this.lang);this.iconAlt=_1244.selectDate;if(typeof (this.value)=="string"&&this.value.toLowerCase()=="today"){this.value=new Date();}else{if(this.value&&isNaN(this.value)){var orig=this.value;this.value=dojo.date.fromRfc3339(this.value);}else{if(this.value&&!isNaN(this.value)){this.value=new Date(this.value);}}}},fillInTemplate:function(args,frag){wtl.widget.DropdownDatePicker.superclass.fillInTemplate.call(this,args,frag);var _1248={widgetContainerId:this.widgetId,lang:this.lang,value:this.value,startDate:this.startDate,endDate:this.endDate,displayWeeks:this.displayWeeks,weekStartsOn:this.weekStartsOn,adjustWeeks:this.adjustWeeks,staticDisplay:this.staticDisplay};this.datePicker=dojo.widget.createWidget("wtl:DatePickerWTL1",_1248,this.containerNode,"child");dojo.event.connect(this.datePicker,"onValueChanged",this,"_updateText");dojo.event.connect(this.inputNode,"onChange",this,"_updateText");dojo.event.connect(this.inputNode,"onclick",this,"onIconClick");dojo.event.connect(this.inputNode,"onblur",this,"onBlur");dojo.event.connect(this.inputNode,"onkeypress",this,"onKeyPress");if(this.value){this._updateText();}if(this.cssClass){dojo.html.addClass(this.inputNode,this.cssClass);dojo.html.addClass(this.valueNode,this.cssClass);}if(this.tabIndex>-1){this.inputNode.tabIndex=this.tabIndex;}this.containerNode.explodeClassName="calendarBodyContainer";this.valueNode.name=this.name;},getValue:function(){return this.valueNode.value;},getDate:function(){return this.datePicker.value;},setValue:function(_1249){this.setDate(_1249);},setDate:function(_124a){this.datePicker.setDate(_124a);this._syncValueNode();},resetDate:function(){this.setDate(new Date());this.inputNode.value="";},_updateText:function(){if(!this.keyPress&&this.value){this.inputNode.value=this.datePicker.value?dojo.date.format(this.datePicker.value,{formatLength:this.formatLength,datePattern:this.displayFormat,selector:"dateOnly",locale:this.lang}):"";if(this.datePicker.value<this.datePicker.startDate||this.value>this.datePicker.endDate){this.inputNode.value="";}this._syncValueNode();this.onValueChanged(this.getDate());this.hideContainer();}},onValueChanged:function(_124b){},onBlur:function(){this.keyPress=false;},onKeyPress:function(evt){this.keyPress=true;if(evt.keyCode==46||evt.keyCode==8||evt.keyCode==9||evt.keyCode==13||evt.keyCode==37||evt.keyCode==39){return;}if(evt.keyCode==13||evt.keyCode==9){this.onBlur();return;}if((("0123456789/").indexOf(evt.key)==-1)){dojo.event.browser.stopEvent(evt);return;}var input=dojo.string.trim(this.inputNode.value);var value=null;if(input){value=input+evt.key;}else{value=evt.key;}var year=null;var month=null;var day=null;if(value){var tmp=value;var date=tmp.split("/");if(date.length==3){if(date[2].length==2||date[2].length==4){year=date[2];}}if(date.length>=2&&date[1]!=null&&date[1]!=""){day=date[1];}if(date.length>=1){month=date[0];}}var now=new Date();if(year){now.setYear(parseInt(year));}if(month){now.setMonth(parseInt(month)-1);}if(day){now.setDate(parseInt(day));}if(now!="Invalid Date"){this.datePicker.setDate(now);}else{this.inputNode.value="";this.datePicker.setDate(new Date());}},onInputChange:function(){var input=dojo.string.trim(this.inputNode.value);if(input){var date=input.split("/");var year=(date.length==3)?date[2]:null;if(year!=null){var _1258=(year.length>2)?"MM/dd/yyyy":"MM/dd/yy";var _1259=dojo.date.parse(input,{formatLength:this.formatLength,datePattern:_1258,selector:"dateOnly",locale:this.lang});if(_1259!=null){if(!this.datePicker._isDisabledDate(_1259)){this.setDate(_1259);}}}}else{if(input==""){this.resetDate();}}if(input){this._updateText();}},_syncValueNode:function(){var date=this.datePicker.value;var value="";if(date){switch(this.saveFormat.toLowerCase()){case "rfc": case "iso": case "": value=dojo.date.toRfc3339(date,"dateOnly");break;case "posix": case "unix": value=Number(date);break;default: value=dojo.date.format(date,{datePattern:this.saveFormat,selector:"dateOnly",locale:this.lang});}}this.valueNode.value=value;},destroy:function(_125c){this.datePicker.destroy(_125c);wtl.widget.DropdownDatePicker.superclass.destroy.apply(this,arguments);}});
