/*
	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("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(_955){if(this._currentItems){var _956=this.currentItemIndex;var temp=this.currentItemIndex+_955;if(this.currentItemIndex==0&&_955==-1){this.currentItemIndex+=_955;dojo.html.removeClass(this._currentItems[0],"MatchHover");return;}else{if(temp<this._currentItems.length){this.currentItemIndex+=_955;}else{return;}}var _958=this._currentItems[this.currentItemIndex];if(_958){if(_956!=-1){dojo.html.removeClass(this._currentItems[_956],"MatchHover");}this.inputField.value=_958.getAttribute("match");dojo.html.addClass(_958,"MatchHover");var obj=this._currentItems[this.currentItemIndex];var _95a=dojo.html.getPaddingBox(obj);var _95b=dojo.html.getPaddingBox(this._autoContainer);var _95c=Math.floor(_95b.height/_95a.height);var t=(this.currentItemIndex-(_95c-1));this._autoContainer.scrollTop=((t>-1?t:0)*_95a.height);}}},_performLookup:function(){if(this.inputField.value==""||this.inputField.value.length<this.minChars){return;}var _95e={actionType:this.autoType,FuzzySearch:this.inputField.value};var _95f=dojo.io.bind({url:"/AutoCompleteHandler.c"+"?rand="+(new Date()).getTime(),method:"get",content:_95e,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 _966=dojo.io.cookie.getCookie(this.cookieName);if(_966&&_966.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,_969){if(obj&&obj.length){for(var i=0;i<obj.length&&!this._isFull();i++){this._onAddItem(obj[i],false);}}},toggle:function(_96b,item){var p=this._getExistingItemIndex(item);if(_96b&&p==-1){this._onAddItem(item,true);this._updateCookie();}else{if(!_96b&&p!=-1){this._onRemoveItem(p,item);this._updateCookie();}}},_onAddItem:function(item,_96f){this._items.push(item);this.onToggled(item,true,this._isFull(),_96f);},_onRemoveItem:function(idx,item){this._items.splice(idx,1);this.onToggled(item,false,this._isFull(),false);},onToggled:function(item,_973,_974,_975){},onDisplayCompareable:function(item){this.onUpdateCompareableDisplay(item,this._isCompared(item),this._isFull());},onUpdateCompareableDisplay:function(item,_978,_979){},_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 _97d="";for(var i=0;i<this._items.length;i++){_97d+=(i>0?"|":"")+wtl.util.composeIds(this._items[i]);}dojo.io.cookie.setCookie(this.cookieName,_97d,-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(_980){this.pairs=[];this.returnWrappers=_980||false;};dojo.lang.extend(dojo.AdapterRegistry,{register:function(name,_982,wrap,_984,_985){var type=(_985)?"unshift":"push";this.pairs[type]([name,_982,wrap,_984]);},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,_98d,wrap,_98f){dojo.json.jsonRegistry.register(name,_98d,wrap,_98f);},evalJson:function(json){try{return eval("("+json+")");}catch(e){dojo.debug(e);return json;}},serialize:function(o){var _992=typeof (o);if(_992=="undefined"){return "undefined";}else{if((_992=="number")||(_992=="boolean")){return o+"";}else{if(o===null){return "null";}}}if(_992=="string"){return dojo.string.escapeString(o);}var me=arguments.callee;var _994;if(typeof (o.__json__)=="function"){_994=o.__json__();if(o!==_994){return me(_994);}}if(typeof (o.json)=="function"){_994=o.json();if(o!==_994){return me(_994);}}if(_992!="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;_994=dojo.json.jsonRegistry.match(o);return me(_994);}catch(e){}if(_992=="function"){return null;}res=[];for(var k in o){var _999;if(typeof (k)=="number"){_999="\""+k+"\"";}else{if(typeof (k)=="string"){_999=dojo.string.escapeString(k);}else{continue;}}val=me(o[k]);if(typeof (val)!="string"){continue;}res.push(_999+":"+val);}return "{"+res.join(",")+"}";}};dojo.provide("dojo.i18n.common");dojo.i18n.getLocalization=function(_99a,_99b,_99c){dojo.hostenv.preloadLocalizations();_99c=dojo.hostenv.normalizeLocale(_99c);var _99d=_99c.split("-");var _99e=[_99a,"nls",_99b].join(".");var _99f=dojo.hostenv.findModule(_99e,true);var _9a0;for(var i=_99d.length;i>0;i--){var loc=_99d.slice(0,i).join("_");if(_99f[loc]){_9a0=_99f[loc];break;}}if(!_9a0){_9a0=_99f.ROOT;}if(_9a0){var _9a3=function(){};_9a3.prototype=_9a0;return new _9a3();}dojo.raise("Bundle not found: "+_99b+" in "+_99a+" , locale="+_99c);};dojo.i18n.isLTR=function(_9a4){var lang=dojo.hostenv.normalizeLocale(_9a4).split("-")[0];var RTL={ar:true,fa:true,he:true,ur:true,yi:true};return !RTL[lang];};dojo.provide("wtl.util");wtl.util={substituteParams:function(_9a7,hash){_9a7=_9a7.replace(/(\$\{)/g,"%{");return dojo.string.substituteParams(_9a7,hash);},connectDialogKeyPress:function(_9a9){dojo.event.connect(document,"onkeypress",function(evt){if(evt.keyCode==27){dojo.event.browser.stopEvent(evt);_9a9.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(_9ae){_9ae+="";var _9af=/(\d+)(\d{3})/;while(_9af.test(_9ae)){_9ae=_9ae.replace(_9af,"$1,$2");}return _9ae;},formatCurrency:function(_9b0,_9b1){if(_9b1===undefined){_9b1=djConfig.locale;}if(/fr\-ca/i.test(_9b1)){return wtl.util.formatCurrencyFR(_9b0);}else{_9b0=String(_9b0).replace(/\$|\%/g,"");var _9b2=/(\d+)(\d{3})/;while(_9b2.test(_9b0)){_9b0=_9b0.replace(_9b2,"$1,$2");}return "$"+_9b0;}},normalizeCurrency:function(str){var RE=new RegExp();var _9b5=str.lastIndexOf(",");var _9b6=str.length;if((_9b5>0)&&(_9b6-_9b5>=0)&&(_9b6-_9b5<=4)){str=str.substring(0,_9b5)+"."+str.substr(_9b5+1);}RE=/\$/;str=str.replace(RE,"");RE=/\%/;str=str.replace(RE,"");RE=/[^0-9.-]/g;str=str.replace(RE,"");return str;},formatCurrencyFR:function(str){str=wtl.util.normalizeCurrency(String(str));var RE=/\./;str=str.replace(RE,",");RE=/,/;if(str.search(RE)==-1){str=str+",00";}RE=/^,/;if(str.search(RE)!=-1){str="0"+str;}RE=/,.$/;if(str.search(RE)!=-1){str=str+"0";}RE=/^(.*,..).*$/;str=str.replace(RE,"$1");var i,j,tmp;for(i=0;i<str.length;i++){if(str.charAt(i)==","){tmp=str.substring(0,i-1);for(j=tmp.length-1;j>=0;j=j-3){tmp=tmp.substring(0,j-1)+" "+tmp.substring(j-1,tmp.length);}str=tmp+str.substring(i-1,str.length);break;}}RE=/^ /;str=str.replace(RE,"");str=str+"$";return str;},composeIds:function(item,type){if(!type){type="listings";}switch(type){case "agents": return item.WTLUserID;case "listings": default: var _9be=item.ListingID&&item.ListingID>0?item.ListingID:-1;var _9bf=_9be==-1&&item.MLSProviderID&&item.MLSProviderID>0?item.MLSProviderID:-1;var _9c0=_9be==-1&&item.MLSID&&item.MLSID.length?item.MLSID:"";return _9be+"~"+_9bf+"~"+_9c0;}},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 _9c3=s.split("~");if(_9c3.length==3){var _9c4=parseInt(_9c3[0]);if(_9c4==0){_9c4=-1;}var _9c5=parseInt(_9c3[1]);if(_9c5==0||_9c4!=-1){_9c5=-1;}var _9c6=_9c4==-1?_9c3[2]:"";return {ListingID:_9c4,MLSProviderID:_9c5,MLSID:_9c6};}}return null;},fixPng:function(elem,_9c8,w,h){if((dojo.render.html.ie55||dojo.render.html.ie60)&&elem){var _9cb=/url\(\s*([\t\s\w()\/.\\'"-:#=&?]+)\s*\)/i;var _9cc=/^[\s]*(['"]?)([\w()\/.\\'"-:#=&?]*)\1[\s]*?$/;var _9cd=_9cb.exec(dojo.html.getComputedStyle(elem,"background-image"));if(_9cd&&_9cd.length>1){var src=_9cd[1].replace(_9cc,"$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='"+(_9c8?_9c8:"crop")+"')";}}}},getQueryStringParam:function(str,_9d0){if(str&&str.length&&_9d0&&_9d0.length){var p=str.indexOf("?");if(p!=-1&&(p+1)<str.length){var _9d2=str.substring(p+1);var vars=_9d2.split("&");for(var i=0;i<vars.length;i++){var pair=vars[i].split("=");if(pair[0].toLowerCase()==_9d0.toLowerCase()){return pair[1];}}}}return null;},getListingKey:function(_9d6){if(!_9d6){return null;}var _9d7=_9d6.ListingID&&parseInt(_9d6.ListingID)>0?parseInt(_9d6.ListingID):-1;var _9d8=_9d7==-1&&_9d6.MLSProviderID&&parseInt(_9d6.MLSProviderID)>0?parseInt(_9d6.MLSProviderID):-1;var _9d9=_9d7==-1&&_9d6.MLSID&&_9d6.MLSID.length?_9d6.MLSID.toString():"";if(_9d7==-1&&_9d8==-1&&_9d9.length==0){return null;}return {ListingID:_9d7,MLSProviderID:_9d8,MLSID:_9d9};},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,_9e6){var s="";if(dojo.lang.isArray(obj)){var len=_9e6?_9e6: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(_9ea){var _9eb=_9ea.childNodes.length;while(_9ea.hasChildNodes()){dojo.html.destroyNode(_9ea.firstChild);}return _9eb;},disconnectAll:function(obj){var reJP=/\$joinpoint$/;var _9ee=/\$.+$/;for(var p in obj){if(reJP.test(p)){var jp=obj[p];var _9f1=jp.methodname.replace(_9ee,"");obj[_9f1]=jp.methodfunc;jp.unintercept();dojo.debug("disconnectAll: "+_9f1);jp=null;delete obj[p];delete obj[p+"$method"];}}},onPhotoMouseOver:function(evt){dojo.event.browser.stopEvent(evt);var _9f3=evt.target;while(!dojo.html.hasClass(_9f3,"PhotoHolder")){_9f3=_9f3.parentNode;}dojo.html.addClass(_9f3,"Over");},onPhotoMouseOut:function(evt){dojo.event.browser.stopEvent(evt);var _9f5=evt.target;while(!dojo.html.hasClass(_9f5,"PhotoHolder")){_9f5=_9f5.parentNode;}dojo.html.removeClass(_9f5,"Over");},getSavedSearchURL:function(_9f6,path){return "http://"+window.location.host+path+"/Search/"+_9f6;},buildPhoneList:function(list,_9f9){if(list.options.length==0){var opt=document.createElement("option");opt.setAttribute("value","");opt.innerHTML="";list.appendChild(opt);for(var i=0;i<_9f9.length;i++){opt=document.createElement("option");opt.setAttribute("value",_9f9[i].Value);opt.innerHTML=_9f9[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\" style=\"display:none;\">\r\n\t\t\t\t<div dojoAttachPoint=\"bannerBody\" class=\"BannerBody\"></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</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\">${this._NLS.shared.selectToCompare}</label>\r\n\t\t\t\t<a href=\"\" dojoAttachPoint=\"previewLink\" class=\"PreviewLink\">${this._NLS.balloon.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\"></div>\r\n\t\t\t\t<div style=\"font-size:9px;\">${this._NLS.shared.idxDisclaimer}</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"ActiveStatus\" dojoAttachPoint=\"propertyStatus\"></div>\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,_NLS: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._NLS=wtl.resources;},fillInTemplate:function(){var uid="BalloonItemCompare"+Math.round(Math.random()*10000000);this.compareCheckbox.id=uid;this.compareLabel.setAttribute("for",uid);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);if(this.item.ListingCourtesy&&this.item.ListingCourtesy.length){this.idxText.innerHTML=this.item.ListingCourtesy;dojo.html.setDisplay(this.idxContainer,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(_9ff,item){},onDisplayCompareable:function(item){},onCompareItemToggled:function(item,_a03,_a04,_a05){if(wtl.util.listingsEqual(item,this.item)){this.compareCheckbox.checked=_a03;}this.compareCheckbox.disabled=!this.compareCheckbox.checked&&_a04;},onUpdateCompareableDisplay:function(item,_a07,_a08){if(wtl.util.listingsEqual(item,this.item)){this.compareCheckbox.checked=_a07;}this.compareCheckbox.disabled=!this.compareCheckbox.checked&&_a08;}});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 class=\"ItemContainer\">\r\n\t\t\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=\"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\">${this._NLS.balloon.viewAgents}</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,_NLS: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._NLS=wtl.resources;},fillInTemplate:function(){this.thumb.src=this.item.ThumbImage;this.officeName.innerHTML=this.item.OfficeName;if(this.item.State=="ON"){this.officeName.innerHTML+=", Brokerage*";}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(_a0a,item){},onDisplayCompareable:function(item){},onCompareItemToggled:function(item,_a0e,_a0f,_a10){},onUpdateCompareableDisplay:function(item,_a12,_a13){}});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:100px;\">\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 _a17=this.balloonItemWidgets[i];dojo.event.connect(_a17,"toggleCompare",this,"toggleCompare");dojo.event.connect(_a17,"onDisplayCompareable",this,"onDisplayCompareable");dojo.event.connect(this,"onCompareItemToggled",_a17,"onCompareItemToggled");dojo.event.connect(this,"onUpdateCompareableDisplay",_a17,"onUpdateCompareableDisplay");_a17.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 _a23={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 _a25=dojo.widget.createWidget("wtl:BalloonItem"+args.type,_a23,tr);this.balloonItemWidgets.push(_a25);},toggleCompare:function(_a26,item){},onDisplayCompareable:function(item){},onCompareItemToggled:function(item,_a2a,_a2b,_a2c){},onUpdateCompareableDisplay:function(item,_a2e,_a2f){},positionBalloon:function(){this.y--;var _a30=parseInt(dojo.html.getComputedStyle(this.callout,"width"));var _a31=parseInt(dojo.html.getComputedStyle(this.callout,"height"));var mx=this.x-this.mapLeft;var my=this.y-this.mapTop;var _a34=Math.round(this.mapWidth*0.2);var _a35=Math.round(this.mapHeight*0.15);var _a36=dojo.html.getContentBox(this.balloonContainer).height-100;var _a37=dojo.html.getContentBox(this.tableBody.parentNode);var _a38=_a36+_a37.height;var a=this._getSegment(this.y-this.mapTop,_a35,this.mapHeight-_a35);var _a3a=dojo.dom.firstElement(this.callout);var _a3b=0;var _a3c=0;var _a3d=0;var _a3e=0;if(a==2){var _a3f=this.mapHeight-10<_a38;if(this.x<=this.mapWidth/2){_a3a.className="CalloutInner CalloutLeft";_a3b=this.x;_a3c=this.y-Math.round(_a31/2);if(_a3f){this.balloonContainer.style.width=(_a37.width+28)+"px";this.balloonBody.style.height=(this.mapHeight-10-_a36)+"px";_a3d=this.x+10;_a3e=this.mapTop+5;}else{this.balloonContainer.style.width=(_a37.width+8)+"px";this.balloonBody.style.height=_a37.height+"px";var h=dojo.html.getContentBox(this.balloonContainer).height;_a3d=this.x+10;_a3e=this.y-parseInt(h/2);if(_a3e+h-this.mapTop>this.mapHeight-5){_a3e=this.mapTop+this.mapHeight-5-h;}else{if(_a3e<this.mapTop+5){_a3e=this.mapTop+5;}}}}else{_a3a.className="CalloutInner CalloutRight";_a3b=this.x-_a30;_a3c=this.y-Math.round(_a31/2);if(_a3f){var w=_a37.width+28;this.balloonContainer.style.width=w+"px";this.balloonBody.style.height=(this.mapHeight-10-_a36)+"px";_a3d=this.x-w-_a30+1;_a3e=this.mapTop+5;}else{var w=_a37.width+8;this.balloonContainer.style.width=w+"px";this.balloonBody.style.height=_a37.height+"px";var h=dojo.html.getContentBox(this.balloonContainer).height;_a3d=this.x-w-_a30+1;_a3e=this.y-Math.round(h/2);if(_a3e+h-this.mapTop>this.mapHeight-5){_a3e=this.mapTop+this.mapHeight-5-h;}else{if(_a3e<this.mapTop+5){_a3e=this.mapTop+5;}}}}}else{var col=this._getSegment(this.x-this.mapLeft,_a34,this.mapWidth-_a34);if(a==1){switch(col){case 1: _a3a.className="CalloutInner CalloutTopLeft";_a3b=this.x;_a3c=this.y;_a3d=this.x+3;_a3e=this.y+3;if(this.mapHeight-10<(_a3e-this.mapTop)+_a38){this.balloonContainer.style.width=(_a37.width+28)+"px";this.balloonBody.style.height=(this.mapHeight-10-(_a3e-this.mapTop))+"px";}else{this.balloonContainer.style.width=(_a37.width+8)+"px";this.balloonBody.style.height=_a37.height+"px";}break;case 2: _a3a.className="CalloutInner CalloutTop";_a3b=this.x-Math.round(_a30/2);_a3c=this.y;var w=_a37.width+8;_a3e=this.y+10;if(this.mapHeight-10<(_a3e-this.mapTop)+_a38){w+=20;this.balloonBody.style.height=(this.mapHeight-10-(_a3e-this.mapTop))+"px";}else{this.balloonBody.style.height=_a37.height+"px";}this.balloonContainer.style.width=w+"px";_a3d=this.x-parseInt(w/2);break;default: _a3a.className="CalloutInner CalloutTopRight";_a3b=this.x-_a30;_a3c=this.y;var w=_a37.width+8;_a3e=this.y+3;if(this.mapHeight-10<(_a3e-this.mapTop)+_a38){w+=20;this.balloonBody.style.height=(this.mapHeight-10-(_a3e-this.mapTop))+"px";}else{this.balloonBody.style.height=_a37.height+"px";}this.balloonContainer.style.width=w+"px";_a3d=this.x-w-3;}}else{switch(col){case 1: _a3a.className="CalloutInner CalloutBottomLeft";_a3b=this.x;_a3c=this.y-_a31;_a3d=this.x+3;if(this.y-16-this.mapTop<_a38){this.balloonContainer.style.width=(_a37.width+28)+"px";this.balloonBody.style.height=(this.y-16-this.mapTop)+"px";_a3e=this.mapTop+5;}else{this.balloonContainer.style.width=(_a37.width+8)+"px";this.balloonBody.style.height=_a37.height+"px";var h=dojo.html.getContentBox(this.balloonContainer).height;_a3e=this.y-3-h;}break;case 2: _a3a.className="CalloutInner CalloutBottom";_a3b=this.x-Math.round(_a30/2);_a3c=this.y-_a31;var w=_a37.width+8;if(this.y-23-this.mapTop<_a38){w+=20;this.balloonBody.style.height=(this.y-23-this.mapTop)+"px";_a3e=this.mapTop+5;}else{this.balloonBody.style.height=_a37.height+"px";var h=dojo.html.getContentBox(this.balloonContainer).height;_a3e=this.y-10-h;}this.balloonContainer.style.width=w+"px";_a3d=this.x-Math.round(w/2);break;default: _a3a.className="CalloutInner CalloutBottomRight";_a3b=this.x-_a30;_a3c=this.y-_a31;var w=_a37.width+8;if(this.y-16-this.mapTop<_a38){w+=20;this.balloonContainer.style.width=w+"px";this.balloonBody.style.height=(this.y-16-this.mapTop)+"px";_a3e=this.mapTop+5;}else{this.balloonContainer.style.width=w+"px";this.balloonBody.style.height=_a37.height+"px";var h=dojo.html.getContentBox(this.balloonContainer).height;_a3e=this.y-3-h;}this.balloonContainer.style.width=w+"px";_a3d=this.x-3-w;}}}this.callout.style.left=(_a3b+this._domOffset)+"px";this.callout.style.top=(_a3c+this._domOffset)+"px";this.balloonContainer.style.left=(_a3d+this._domOffset)+"px";this.balloonContainer.style.top=(_a3e+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;}},_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;}},_drawOption:function(obj,list,_a4f){var opt=document.createElement("option");opt.value=obj.value;opt.innerHTML=obj.label;if(_a4f){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 _a53="";for(var i=0;i<this.data.length;i++){if(this.data[i].SearchType==this.searchType){_a53=this.data[i].MapExtent;break;}}this.selectedAreaID=0;this._drawSearchAreas();this.onSwitchSearchType(this.searchType,_a53);},onSwitchSearchType:function(_a55,_a56){this._publishSearchTypeChange();},_onSearchAreaChange:function(evt){var area=null;var _a59=parseInt(evt.target[evt.target.selectedIndex].value);if(_a59>0){for(var i=0;i<this._currentAreas.length;i++){if(this._currentAreas[i].AreaID==_a59){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(_a5b,_a5c){},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(_a5d,_a5e){var _a5f=this.searchType!=_a5d;this.searchType=_a5d;this.selectedAreaID=_a5e;var opts=this.searchTypes.options;for(var i=0;i<opts.length;i++){if(parseInt(opts[i].value)==_a5d){opts[i].selected=true;if(_a5f){this._publishSearchTypeChange();}this._drawSearchAreas();break;}}},reset:function(){this.selectedAreaID=this._defaultSearchArea;var _a62=false;if(this.searchType!=this._defaultSearchType){_a62=true;this.searchType=this._defaultSearchType;}this._currentAreas=[];this._drawSearchTypes();this._drawSearchAreas();if(_a62){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 _a65=this;setTimeout(function(){dojo.event.topic.publish("/searchTypeChange",_a65.getProvCodeBySearchType());},1000);},debug:function(){dojo.debug("*************** AREA SELECTOR ***************");dojo.debug("searchType: "+this.searchType);dojo.debug("selectedAreaID: "+this.selectedAreaID);dojo.debug("prov code: "+this.getProvCodeBySearchType());dojo.debug("*************** AREA SELECTOR ***************");dojo.debug("");}});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 _a6d=r;var _a6e=r;if(_a6d>c+lhs){_a6d=c+lhs;}if(_a6e>(siz-c+rhs)){_a6e=siz-c+rhs;}this.children[i].effectRangeLeft=_a6d/isz;this.children[i].effectRangeRght=_a6e/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 _a7e=(sim/siz)-0.5;if(_a7e>this.effectUnits){_a7e=this.effectUnits;}var _a7f=0;if(this.anchorEdge==this.EDGE.BOTTOM){var cen2=(y-this.proximityTop)/this.itemHeight;_a7f=(cen2>0.5)?1:y/(this.proximityTop+(this.itemHeight/2));}if(this.anchorEdge==this.EDGE.TOP){var cen2=(y-this.proximityTop)/this.itemHeight;_a7f=(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;_a7f=(cen2>0.5)?1:x/(this.proximityLeft+(this.itemWidth/2));}if(this.anchorEdge==this.EDGE.LEFT){var cen2=(x-this.proximityLeft)/this.itemWidth;_a7f=(cen2<0.5)?1:(this.totalWidth-x)/(this.proximityRight+(this.itemWidth/2));}if(this.anchorEdge==this.EDGE.CENTER){if(this.isHorizontal){_a7f=y/(this.totalHeight);}else{_a7f=x/(this.totalWidth);}if(_a7f>0.5){_a7f=1-_a7f;}_a7f*=2;}for(var i=0;i<this.itemCount;i++){var _a82=this._weighAt(cen,i);if(_a82<0){_a82=0;}this._setItemSize(i,_a82*_a7f);}var _a83=Math.round(cen);var _a84=0;if(cen<0){_a83=0;}else{if(cen>this.itemCount-1){_a83=this.itemCount-1;}else{_a84=(cen-_a83)*((this.isHorizontal?this.itemWidth:this.itemHeight)-this.children[_a83].sizeMain);}}this._positionElementsFrom(_a83,_a84);},_weighAt:function(cen,i){var dist=Math.abs(cen-i);var _a88=((cen-i)>0)?this.children[i].effectRangeRght:this.children[i].effectRangeLeft;return (dist>_a88)?0:(1-dist/_a88);},_setItemSize:function(p,_a8a){_a8a*=this.timerScale;var w=Math.round(this.itemWidth+((this.itemMaxWidth-this.itemWidth)*_a8a));var h=Math.round(this.itemHeight+((this.itemMaxHeight-this.itemHeight)*_a8a));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,_a90){var pos=0;if(this.isHorizontal){pos=Math.round(this.children[p].usualX+_a90);this.children[p].domNode.style.left=pos+"px";}else{pos=Math.round(this.children[p].usualY+_a90);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 _a9c=this.imgNode.parentNode;_a9c.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 _a9c=this.imgNode.parentNode;_a9c.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 _aa1=w/this.zeroWidth;var _aa2=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("+_aa1+","+_aa2+")");}}};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,_NLS: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/FilmStripFisheye.css");}}this._NLS=wtl.resources.filmstrip;},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(_aa7){this._officeID=_aa7;this.go(true,false);},reset:function(){this._officeID=0;},go:function(_aa8,_aa9){if(_aa8){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 _aaa={start:this._index,end:this._index+this._maxImages-1};for(var i in this.httpHandlerParams){_aaa[i]=this.httpHandlerParams[i];}if(this._officeID){_aaa.officeID=this._officeID;}var _aac=this;this._request=dojo.io.bind({url:wtl.util.urlAppend(this.httpHandler,"rand="+(new Date()).getTime()),method:"get",content:_aaa,load:function(type,obj,_aaf){if(obj){_aac._request=null;_aac._imageCount=obj.Count;_aac.items=obj.Data;if(obj.Label){_aac.noItemsLabel=wtl.util.substituteParams(_aac._NLS.noFound,[obj.Label]);_aac.noItemsLabel+=_aac._NLS.furtherAssistance;}_aac._type=obj.Type;_aac._draw(_aa9);if(_aac.selectItem){_aac._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(_aa9);}}}},goItem:function(_ab0){this._updateMaxImages();if(this.httpHandler.length&&_ab0){if(this._request!=null){this._request.abort();}var _ab1={maxImages:this._maxImages,previousIndex:this._index-1,selectedItem:_ab0};for(var i in this.httpHandlerParams){_ab1[i]=this.httpHandlerParams[i];}if(this._officeID){_ab1.officeID=this._officeID;}var _ab3=this;this._request=dojo.io.bind({url:wtl.util.urlAppend(this.httpHandler,"rand="+(new Date()).getTime()),method:"get",content:_ab1,load:function(type,obj,_ab6){if(obj){_ab3._request=null;_ab3._currentIndex=_ab3._index=obj.Index;_ab3._imageCount=obj.Count;_ab3.items=obj.Data;if(obj.Label){_ab3.noItemsLabel="No "+obj.Label.toLowerCase()+" found";}_ab3._type=obj.Type;_ab3._draw();setTimeout(function(){if(obj.FoundSelected){_ab3.selectById(_ab0);}_ab3._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(_abb){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 _abe=dojo.html.isVisible(this.filmStripScroller);var _abf=false;var n=this.items.length;this.imagePlaceHolder.style.height=(this.imageMinHeight+this._padding)+"px";if(n){var _ac1=document.createElement("div");_ac1.style.height=(this.imageMinHeight+this._padding)+"px";this.imagePlaceHolder.appendChild(_ac1);var _ac2={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",_ac2,_ac1);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 _ac4=this.items[i].ThumbImage+"&Make4x3=true";if(this._type=="listings"){_ac4+="&stts="+this.items[i].ListingStatusCode;}var item=dojo.widget.createWidget("wtl:FilmStripFisheyeListItem",{iconSrc:_ac4});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].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();_abf=this._imageCount>this._maxImages;}else{if(!_abb){var d=document.createElement("div");d.className="NoImages";d.innerHTML=this.noItemsLabel;this.imagePlaceHolder.appendChild(d);}}dojo.html.setVisibility(this.filmStripScroller,_abf);},_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 _ada=x-this._mouseX;var n=this._scrollerX+_ada;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\" dojoAttachEvent=\"onclick:_visitWebsiteClick\"><img class=\"photo\" alt=\"\" dojoAttachPoint=\"photo\" /></a>\r\n\t\t\t        <a href=\"\" dojoAttachPoint=\"siteLink\" class=\"SiteLink\" dojoAttachEvent=\"onclick:_visitWebsiteClick\"></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\">${this._NLS.contactInfo.emailMe}</a>\r\n\t\t\t            <a href=\"\" class=\"WorkWithMeOnline\" dojoAttachPoint=\"workWithMeOnline\" dojoAttachEvent=\"onclick:_workWithMeClick\">${this._NLS.contactInfo.wwmo}</a>\r\n\t\t\t            <a href=\"\" class=\"AgentListings\" dojoAttachPoint=\"listingsButton\" dojoAttachEvent=\"onclick:_viewListingsClick\">${this._NLS.contactInfo.myListings}</a>\r\n\t\t\t            <a href=\"\" class=\"AgentSolds\" dojoAttachPoint=\"soldsButton\" dojoAttachEvent=\"onclick:_viewSoldsClick\">${this._NLS.contactInfo.mySolds}</a>\r\n\t\t\t        </div>    \r\n\t\t\t        <div class=\"Buttons\" dojoAttachPoint=\"officeButtons\">\r\n\t\t\t\t        <a href=\"\" class=\"MapAndDirections\" dojoAttachEvent=\"onClick:_mapAndDirsClick\">${this._NLS.contactInfo.mapAndDirections}</a>\r\n\t\t\t\t        <a href=\"\" class=\"EmailMe\" dojoAttachPoint=\"emailOfficeLink\" dojoAttachEvent=\"onClick:emailOffice\">${this._NLS.contactInfo.emailUs}</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 class=\"BrokerOwner\" dojoAttachPoint=\"agentBrokerOwner\" style=\"display:none;\"></div>\r\n\t\t        <div dojoAttachPoint=\"contactDetails\" class=\"OfficeAddress\"></div>\r\n\t\t        <div dojoAttachPoint=\"phones\" class=\"ContactNumbers\"></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,agentBrokerOwner:null,contactDetails:null,phones:null,photoContainer:null,photo:null,imgLink:null,siteLink:null,agentButtons:null,officeButtons:null,workWithMeOnline:null,emailOfficeLink:null,_agent:null,_office:null,_listingsAgentID:0,_imageWidth:130,_workwithMeOnlineID:0,_NLS:null,_websiteLink:true,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");}}this._NLS=wtl.resources;},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;if(data.State=="ON"){this.contactName.innerHTML+=", Brokerage*";}this._populateData(data);var _ae1=djConfig.locale!="en-ca"?djConfig.locale+"/":"";var path=(data.PicExists)?"/ResizeImage.c?Image=/Offices/pic"+data.OfficeID+".jpg&Make4x3=true&Width="+this._imageWidth+"&u="+data.PicTicks:"/ResizeImage.c?Image=/Offices/Default/"+_ae1+"office_"+this.currentDeployment.brokerId+"_"+this.currentDeployment.teamId+"_320px.jpg&Max="+this._imageWidth+"&u="+data.PicTicks;path+="&langpref="+djConfig.locale;var url=(this._office.WebsiteLink)?djConfig.baseLinkPrefix+"/"+data.CompanyURL:"";this._populatePhoto(path,url,"_self");this.siteLink.innerHTML=this._NLS.contactInfo.visitOurWebsite;dojo.html.setDisplay(this.officeButtons,true);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;dojo.html.setDisplay(this.agentBrokerOwner,this._agent.IsBrokerOwner);dojo.html.setDisplay(this.jobTitle,(this._agent.JobTitle)?true:false);this.jobTitle.innerHTML=this._agent.JobTitle?this._agent.JobTitle:"";this._populateData(this._agent);var _ae5=djConfig.locale!="en-ca"?djConfig.locale+"/":"";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/"+_ae5+"agent_"+this.currentDeployment.brokerId+"_"+this.currentDeployment.teamId+"_320px.jpg&Width="+this._imageWidth;path+="&langpref="+djConfig.locale;var url=(this._agent.WebsiteLink)?djConfig.baseLinkPrefix+"/"+this._agent.EmailAddress.substring(0,this._agent.EmailAddress.indexOf("@")):"";this._populatePhoto(path,url,"_self");this.siteLink.innerHTML=this._NLS.contactInfo.visitMyWebsite;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(_ae8,_ae9){dojo.html.setDisplay(this.workWithMeOnline,!_ae9);this.updateWorkingOnline(_ae8);},updateWorkingOnline:function(_aea){dojo.html.setDisplay(this.workWithMeOnline,_aea!=this._agent.WTLUserID);},showWorkingOnline:function(){this._workwithMeOnlineID=0;dojo.html.setDisplay(this.workWithMeOnline,false);},_populateData:function(data){var on=(data.State=="ON")?", Brokerage*":"";var s="";if(data.AgentEntityName){s="<b>"+data.AgentEntityName+"</b><br />";}else{if(data.BrokerCompanyName){s="<b>"+data.BrokerCompanyName+on+"</b><br />";}}if(data.Address){s+=data.Address+"<br />";}else{s+=data.Address1+"<br />";}if(data.Address2&&data.Address2.replace(/^\s*|\s*$/g,"")!=""){s+=data.Address2+"<br />";}s+=data.City+", "+data.State+" "+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,_af0){this.photo.src=path;if(url.length>0){dojo.html.removeClass(this.imgLink,"noLink");this.siteLink.href=this.imgLink.href=url;this.siteLink.target=this.imgLink.target=(_af0&&_af0.length?_af0:"_self");this.siteLink.style.width=(this._imageWidth+2)+"px";this.siteLink.style.display="block";this._linkToWebsite=true;}else{this.siteLink.style.display="none";this._linkToWebsite=false;dojo.html.addClass(this.imgLink,"noLink");}},_visitWebsiteClick:function(evt){if(!this._linkToWebsite){dojo.event.browser.stopEvent(evt);}},_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(_af6){},viewListingsClick:function(_af7){},_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\">${this._NLS.agentPreview.noAgentText}</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=\"\">${this._NLS.shared.previous}</a></div>\r\n\t\t\t<div class=\"NextLink\" dojoAttachPoint=\"nextLink\" style=\"display:none;\"><a dojoAttachEvent=\"onclick:nextClick\" href=\"\">${this._NLS.shared.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 dojoAttachPoint=\"airMilesContainer\" class=\"AirMilesContainer\">${this._NLS.agentPreview.airMilesText}</div>\r\n\t\t   <div dojoAttachPoint=\"cgrnContainer\"></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\t${this._NLS.agentPreview.specialties}\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,airMilesContainer:null,_pane:null,_selectedIdx:0,_doNotOpenPane:false,_previousItem:null,_nextItem:null,_listingsAgentID:0,_viewingListings:false,_viewingSolds:false,_NLS:null,_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._NLS=wtl.resources;this.label=wtl.util.substituteParams(this._NLS.agentPreview.label,[this.currentDeployment.associateLabel]);},setPane:function(pane){this._pane=pane;},setPagination:function(prev,next,_aff){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(!_aff){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,_b03,load){this.item=item;this._selectedIdx=0;this._doNotOpenPane=_b03;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(_b05){this.workWithMeOnline(_b05,this._agentID);},_workWithAgentClick:function(id){this._agentID=id;this.workWithMeOnline(false,id);},workWithMeOnline:function(_b07,id){},processWorkWithMe:function(_b09){this._agentInfo.updateWorkingOnline(_b09.WTLUserID);},workWithAgent:function(){this.workWithMeOnline(false,this._agentID);},notLoggedIn:function(_b0a,_b0b){},viewSoldsClick:function(_b0c){},viewListingsClick:function(_b0d){},resetAgentSearch:function(){},_populate:function(type,data,_b10){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 _b11=false;this.cgrnContainer.innerHTML="";if(this.item.CGRN){this.cgrnContainer.appendChild(this._buildDesignationImg("CGRN",this._NLS.agentPreview.CGRNText));}if(!_b11){_b11=this.item.Designations.length;}dojo.html.setDisplay(this.airMilesContainer,this.item.AirMiles);s=this.item.Caption?this.item.Caption:"";this.caption.innerHTML=s;dojo.html.setDisplay(this.caption,s.length);if(!_b11){_b11=s.length;}s=this.item.LeadLine?this.item.LeadLine:"";this.leadLine.innerHTML=s;dojo.html.setDisplay(this.leadLine,s.length);if(!_b11){_b11=s.length;}s=this.item.Specialties?this.item.Specialties:"";var p=dojo.html.firstElement(this.specialties,"p");if(p){p.innerHTML=s;if(!_b11){_b11=s.length;}}dojo.html.setDisplay(this.specialties,p&&s.length);dojo.html.setDisplay(this.additionalInfo,_b11);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(_b13,_b14){var i=document.createElement("img");i.src="/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Designations/"+_b13+".gif";i.alt=_b14;i.title=_b14;return i;},superSize:function(){if(dojo.html.isDisplayed(this.additionalInfo)){this.additionalInfo.style.height="";var _b16=dojo.html.getMarginBox(this.agentContainer).height+5;var _b17=dojo.html.getContentBox(this.additionalInfo).height-5;var _b18=dojo.html.getMarginBox(this._pane.containerNode).height+5;var h=_b17+(_b18-_b16);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=\"${this._NLS.shared.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    <div class=\"IDXContainer\" dojoAttachPoint=\"idxContainer\"></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,_NLS: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");}}this._NLS=wtl.resources;},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:"")+(this.item.ShowcaseHD?"&HDShowcase=true":"")+"&stts="+this.item.ListingStatusCode+"&langpref="+djConfig.locale;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);if(this.item.ListingCourtesy&&this.item.ListingCourtesy.length){this.idxContainer.innerHTML=this.item.ListingCourtesy;}else{dojo.html.setDisplay(this.idxContainer,false);}dojo.event.connect(this.removeButton,"onclick",this,"_removeClick");},_thumbClick:function(evt){dojo.event.browser.stopEvent(evt);this.onCompareItemClick(this.item);},onCompareItemClick:function(_b1b){},_removeClick:function(evt){dojo.event.browser.stopEvent(evt);if(confirm(this._NLS.compareProperties.confirm)){this.toggleCompare(false,this.item);}},switchSearchType:function(typ){this.searchType=typ;},toggleCompare:function(_b1e,item){},onDisplayCompareable:function(item){},onCompareItemToggled:function(item,_b22,_b23,_b24){},onUpdateCompareableDisplay:function(item,_b26,_b27){}});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\">${this._NLS.compareProperties.noPropertyText}</div>\r\n\t\t\r\n\t\t<div dojoAttachPoint=\"hasPropertiesPanel\">\r\n\t\t\t<p class=\"Title\" dojoAttachPoint=\"maxCompareLabel\"></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\">${this._NLS.compareProperties.compare}</a></div>\r\n\t\t\t\t<div class=\"Button Right\"><a href=\"\" dojoAttachEvent=\"onclick:_removeAll\">${this._NLS.compareProperties.removeAll}</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:"",searchType:0,compareURL:"",maxCompareLabel:null,zeroPropertiesPanel:null,hasPropertiesPanel:null,propertiesPlaceHolder:null,_pane:null,_iCnt:0,_NLS: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/ComparePropertiesPane.css");}}this._NLS=wtl.resources;},fillInTemplate:function(){this.label=this._NLS.compareProperties.label;this.maxCompareLabel.innerHTML=wtl.util.substituteParams(this._NLS.compareProperties.maxCompareLabel,[this.currentDeployment.maxCompareCount]);},postCreate:function(){dojo.html.setDisplay(this.zeroPropertiesPanel,true);dojo.html.setDisplay(this.hasPropertiesPanel,false);},setPane:function(pane){this._pane=pane;},toggleCompare:function(_b29,item){},onCompareItemToggled:function(item,_b2c,_b2d,_b2e){if(_b2c){if(_b2e&&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 _b30=dojo.html.getMarginBox(this.domNode).height-(dojo.html.getMarginBox(this._pane.containerNode).height-8);if(_b30>0){p.style.overflow="auto";var h=dojo.html.getMarginBox(p).height-_b30;p.style.height=(h<20?20:h)+"px";}},_addCompareItem:function(item){var _b33=this;var div=document.createElement("div");this.propertiesPlaceHolder.appendChild(div);var _b35=dojo.widget.createWidget("wtl:ComparePropertiesItem",{widgetId:"CompareItem_"+wtl.util.composeIds(item),currentDeployment:this.currentDeployment,searchType:this.searchType,item:item},div);dojo.event.connect(_b35,"toggleCompare",this,"toggleCompare");dojo.event.connect(_b35,"onDisplayCompareable",this,"onDisplayCompareable");dojo.event.connect(_b35,"onCompareItemClick",this,"onCompareItemClick");dojo.event.connect(this,"onCompareItemToggled",_b35,"onCompareItemToggled");dojo.event.connect(this,"onUpdateCompareableDisplay",_b35,"onUpdateCompareableDisplay");dojo.event.connect(this,"switchSearchType",_b35,"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(this._NLS.compareProperties.removeAllConfirm)){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(_b3c){},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\">${this._NLS.officePreview.noOfficeText}</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\">${this._NLS.officePreview.airMilesText}</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:"",onOpenCallback:null,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,_NLS: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._NLS=wtl.resources;this.label=this._NLS.officePreview.label;},fillInTemplate:function(){},postCreate:function(){dojo.html.disableSelection(this.mapAndDirsButton);dojo.html.disableSelection(this.emailButton);},setPane:function(pane){this._pane=pane;},setPagination:function(prev,next,_b40){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(!_b40){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,_b44,load){this.item=item;this._selectedIdx=0;this._doNotOpenPane=_b44;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,_b4a){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._NLS.officePreview.FHEText));}if(this.item.REC){this.designations.appendChild(this._buildDesignationImg("REC",this._NLS.officePreview.RECText));}if(this.item.CIN){this.designations.appendChild(this._buildDesignationImg("CIN",this._NLS.officePreview.CINText));}if(this.item.CONS){this.designations.appendChild(this._buildDesignationImg("CONS",this._NLS.officePreview.CONSText));}if(this.item.CGRN){this.designations.appendChild(this._buildDesignationImg("CGRN",this._NLS.officePreview.CGRNText));}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(_b4b,_b4c){var i=document.createElement("img");i.src="/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Designations/"+_b4b+".gif";i.alt=_b4c;i.title=_b4c;return i;},superSize:function(){if(dojo.html.isDisplayed(this.additionalInfo)){this.additionalInfo.style.height="";var _b4e=dojo.html.getMarginBox(this.officeContainer).height+5;var _b4f=dojo.html.getContentBox(this.additionalInfo).height-5;var _b50=dojo.html.getMarginBox(this._pane.containerNode).height+5;var h=_b4f+(_b50-_b4e);this.additionalInfo.style.height=(h<20?20:h)+"px";this.additionalInfo.scrollTop=0;}}});dojo.provide("dojo.html.iframe");dojo.html.iframeContentWindow=function(_b52){var win=dojo.html.getDocumentWindow(dojo.html.iframeContentDocument(_b52))||dojo.html.iframeContentDocument(_b52).__parent__||(_b52.name&&document.frames[_b52.name])||null;return win;};dojo.html.iframeContentDocument=function(_b54){var doc=_b54.contentDocument||((_b54.contentWindow)&&(_b54.contentWindow.document))||((_b54.name)&&(document.frames[_b54.name])&&(document.frames[_b54.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 _b58=dojo.html.getMarginBox(this.domNode);if(_b58.width==0||_b58.height==0){dojo.lang.setTimeout(this,this.onResized,100);return;}this.iframe.style.width=_b58.width+"px";this.iframe.style.height=_b58.height+"px";}},size:function(node){if(!this.iframe){return;}var _b5a=dojo.html.toCoordinateObject(node,true,dojo.html.boxSizing.BORDER_BOX);with(this.iframe.style){width=_b5a.width+"px";height=_b5a.height+"px";left=_b5a.left+"px";top=_b5a.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.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 _b5e=this;setTimeout(function(){_b5e._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(_b60){if(arguments.length>=3){_b60=new dojo.gfx.color.Color(arguments[0],arguments[1],arguments[2]);}else{_b60=new dojo.gfx.color.Color(_b60);}this.bg.style.backgroundColor=_b60.toString();return this.bgColor=_b60;},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 _b62=dojo.html.getViewport();var h=_b62.height;var w=_b62.width;with(this.bg.style){width=w+"px";height=h+"px";}var _b65=dojo.html.getScroll().offset;this.bg.style.top=_b65.y+"px";this.bg.style.left=_b65.x+"px";var _b62=dojo.html.getViewport();if(_b62.width!=w){this.bg.style.width=_b62.width+"px";}if(_b62.height!=h){this.bg.style.height=_b62.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 _b66=dojo.html.getScroll().offset;var _b67=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=_b66.x+(_b67.width-mb.width)/2;var y=_b66.y+(_b67.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 _b6d=dojo.html.getScroll().offset;this.bg.style.top=_b6d.y+"px";this.bg.style.left=_b6d.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\">${this._NLS.shared.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\">${this._NLS.shared.saveToYourAccount}</a>\r\n\t\t\t\t\t<a class=\"MoreInfo\" dojoAttachEvent=\"onclick:_requestMoreInfo\">${this._NLS.shared.requestMoreInformation}</a>\r\n\t\t\t\t\t<a class=\"EmailListing\" dojoAttachEvent=\"onclick:_onEmailListingClick\">${this._NLS.shared.emailListing}</a>\r\n\t\t\t\t\t<a class=\"Showing\" dojoAttachPoint=\"requestShowingLink\" dojoAttachEvent=\"onclick:_requestShowing\">${this._NLS.shared.requestAShowing}</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=\"\">${this._NLS.shared.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=\"\">${this._NLS.shared.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>\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,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,ShowcaseHD:null,selectedIdx:0,_removeMouseWheel:null,_NLS: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);this._NLS=wtl.resources;this.bgOpacity=0.9;},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.ShowcaseHD,this.item.ShowcaseHD);if(this.item.ShowcaseHD){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?this._NLS.shared.propertyID+": "+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 _b74=new Image();_b74.src="/ResizeImage.c?MaxHeight=390&MaxWidth=586&Image="+this.item.Prefix+this.item.Images[i].file+"&langpref="+djConfig.locale;this._images.push(_b74);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&langpref="+djConfig.locale;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:{IsShowcase21: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)+" "+this._NLS.shared.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 _b7e=evt["wheelDelta"]?evt.wheelDelta*(window.opera?-1:1):evt.detail*-40;if(_b7e<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 _b81={deploymentLogo:"/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Lightbox/HD_logo.gif"};var _b82={allowscriptaccess:"always",allowfullscreen:true};var _b83={};swfobject.embedSWF("/Scripts/showcaseHD_"+djConfig.locale+".swf","FlashShowcaseHD","146","31","9.0.0","",_b81,_b82,_b83);this._flShowcaseHD=dojo.byId("FlashShowcaseHD");},_flShowcaseHDReady:function(){if(this.item.ShowcaseHD&&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){if(evt){dojo.event.browser.stopEvent(evt);}if(dojo.lang.isFunction(this.HDPhotoTourCallback)){this.HDPhotoTourCallback();}}});dojo.provide("wtl.widget.ContactInfoPropPreview");dojo.widget.defineWidget("wtl.widget.ContactInfoPropPreview",dojo.widget.HtmlWidget,function(){},{isContainer:false,widgetType:"ContactInfoPropPreview",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\t    <div class=\"DisplayLabel\" dojoAttachPoint=\"displayLabel\"></div>\r\n\t        <div dojoAttachPoint=\"photoContainer\" class=\"PhotoContainer\">\r\n\t\t        <div class=\"PhotoHolder\">\r\n\t\t\t        <a href=\"\" dojoAttachPoint=\"imgLink\" dojoAttachEvent=\"onclick:_visitWebsiteClick\"><img class=\"photo\" alt=\"\" dojoAttachPoint=\"photo\" /></a>\r\n                </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 class=\"BrokerOwner\" dojoAttachPoint=\"agentBrokerOwner\" style=\"display:none;\"></div>\r\n\t\t        <div dojoAttachPoint=\"contactDetails\" class=\"OfficeAddress\"></div>\r\n\t\t        <div dojoAttachPoint=\"phones\" class=\"ContactNumbers\"></div>\r\n\r\n                <div class=\"ButtonMenu\">\r\n                    <div style=\"clear:both;\" dojoAttachPoint=\"agentButtons\">\r\n\t\t                <a href=\"\" style=\"width:50px;float:left;\" class=\"EmailMe\" dojoAttachEvent=\"onclick:_emailMeClick\">${this._NLS.contactInfo.emailMe}</a>\r\n\t\t                <a href=\"\" style=\"width:100px;float:left;\" class=\"WorkWithMeOnline\" dojoAttachPoint=\"workWithMeOnline\" dojoAttachEvent=\"onclick:_workWithMeClick\">${this._NLS.contactInfo.wwmo}</a>\r\n\t\t                <a href=\"\" style=\"display:none;\" class=\"AgentListings\" dojoAttachPoint=\"listingsButton\" dojoAttachEvent=\"onclick:_viewListingsClick\">${this._NLS.contactInfo.myListings}</a>\r\n\t\t                <a href=\"\" style=\"display:none;\" class=\"AgentSolds\" dojoAttachPoint=\"soldsButton\" dojoAttachEvent=\"onclick:_viewSoldsClick\">${this._NLS.contactInfo.mySolds}</a>\r\n\t\t            </div>    \r\n\t\t            <div class=\"Buttons\" dojoAttachPoint=\"officeButtons\">\r\n\t\t\t            <!--<a href=\"\" class=\"MapAndDirections\" dojoAttachEvent=\"onClick:_mapAndDirsClick\">${this._NLS.contactInfo.mapAndDirections}</a>-->\r\n\t\t\t            <a href=\"\" class=\"EmailMe\" dojoAttachPoint=\"emailOfficeLink\" dojoAttachEvent=\"onClick:emailOffice\">${this._NLS.contactInfo.emailUs}</a>\r\n\t\t            </div>\r\n\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,agentBrokerOwner:null,contactDetails:null,phones:null,photoContainer:null,photo:null,imgLink:null,agentButtons:null,officeButtons:null,workWithMeOnline:null,emailOfficeLink:null,_agent:null,_office:null,_listingsAgentID:0,_imageWidth:77,_workwithMeOnlineID:0,_NLS:null,_websiteLink:true,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");}}this._NLS=wtl.resources;},fillInTemplate:function(){dojo.event.connect(this.photo,"onmouseover",wtl.util,"onPhotoMouseOver");dojo.event.connect(this.photo,"onmouseout",wtl.util,"onPhotoMouseOut");},setDisplayLabel:function(txt){this.displayLabel.innerHTML=txt;},populateOffice:function(data){if(data){this._office=data;this.contactName.innerHTML=data.OfficeName;if(data.State=="ON"){this.contactName.innerHTML+=", Brokerage*";}this._populateData(data);var _b8b=djConfig.locale!="en-ca"?djConfig.locale+"/":"";var path=(data.PicExists)?"/ResizeImage.c?Image=/Offices/pic"+data.OfficeID+".jpg&Make4x3=true&Width="+this._imageWidth+"&u="+data.PicTicks:"/ResizeImage.c?Image=/Offices/Default/"+_b8b+"office_"+this.currentDeployment.brokerId+"_"+this.currentDeployment.teamId+"_320px.jpg&Max="+this._imageWidth+"&u="+data.PicTicks;path+="&langpref="+djConfig.locale;var url=(this._office.WebsiteLink)?djConfig.baseLinkPrefix+"/"+data.CompanyURL:"";this._populatePhoto(path,url,"_self");dojo.html.setDisplay(this.officeButtons,true);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;dojo.html.setDisplay(this.agentBrokerOwner,this._agent.IsBrokerOwner);dojo.html.setDisplay(this.jobTitle,(this._agent.JobTitle)?true:false);this.jobTitle.innerHTML=this._agent.JobTitle?this._agent.JobTitle:"";this._populateData(this._agent);var _b8f=djConfig.locale!="en-ca"?djConfig.locale+"/":"";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/"+_b8f+"agent_"+this.currentDeployment.brokerId+"_"+this.currentDeployment.teamId+"_320px.jpg&Width="+this._imageWidth;path+="&langpref="+djConfig.locale;var url=(this._agent.WebsiteLink)?djConfig.baseLinkPrefix+"/"+this._agent.EmailAddress.substring(0,this._agent.EmailAddress.indexOf("@")):"";this._populatePhoto(path,url,"_self");dojo.html.setDisplay(this.officeButtons,false);dojo.html.setDisplay(this.agentButtons,true);}},setWorkingOnline:function(_b92,_b93){dojo.html.setDisplay(this.workWithMeOnline,!_b93);this.updateWorkingOnline(_b92);},updateWorkingOnline:function(_b94){dojo.html.setDisplay(this.workWithMeOnline,_b94!=this._agent.WTLUserID);},showWorkingOnline:function(){this._workwithMeOnlineID=0;dojo.html.setDisplay(this.workWithMeOnline,false);},_populateData:function(data){var on=(data.State=="ON")?", Brokerage*":"";var s="";if(data.AgentEntityName){s="<b>"+data.AgentEntityName+"</b><br />";}else{if(data.BrokerCompanyName){s="<b>"+data.BrokerCompanyName+on+"</b><br />";}}this.contactDetails.innerHTML=s;dojo.html.setDisplay(this.contactDetails,s.length>0);this.phones.innerHTML=wtl.util.phoneFormat(data.Phones,2);dojo.html.setDisplay(this.phones,data.Phones.length);},_populatePhoto:function(path,url,_b9a){this.photo.src=path;if(url.length>0){dojo.html.removeClass(this.imgLink,"noLink");this.imgLink.href=url;this.imgLink.target=(_b9a&&_b9a.length?_b9a:"_self");this._linkToWebsite=true;}else{this._linkToWebsite=false;dojo.html.addClass(this.imgLink,"noLink");}},_visitWebsiteClick:function(evt){if(!this._linkToWebsite){dojo.event.browser.stopEvent(evt);}},_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(_ba0){},viewListingsClick:function(_ba1){},_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("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(_bb0){if(!dojo.lang.inArray(this.acceptedTypes,"*")){for(var i=0;i<_bb0.length;i++){if(!dojo.lang.inArray(this.acceptedTypes,_bb0[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(_bb7){},dropTargets:[],registerDropTarget:function(_bb8){},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 _bbc=dp+"Idx_"+(this.dsCounter++);ds.dragSourceId=_bbc;this.dragSources[_bbc]=ds;ds.domNode.setAttribute(dp,_bbc);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 _bbf=ds.dragSourceId;delete ds.dragSourceId;delete this.dragSources[_bbf];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 _bc2=dojo.lang.find(this.dropTargets,dt,true);if(_bc2>=0){this.dropTargets.splice(_bc2,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 _bc8=e.target.nodeType==dojo.html.TEXT_NODE?e.target.parentNode:e.target;if(dojo.html.isTag(_bc8,"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,_bcb){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(_bcc){var ret=null;if(!_bcc){return;}if(this.currentDropTarget){e.dragObject=_bcc;var ce=this.currentDropTarget.domNode.childNodes;if(ce.length>0){e.dropTarget=ce[0];while(e.dropTarget==_bcc.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{_bcc.dragSource.onDragEnd(e);}catch(err){var _bcf={};for(var i in e){if(i=="type"){_bcf.type="mouseup";continue;}_bcf[i]=e[i];}_bcc.dragSource.onDragEnd(_bcf);}},function(){_bcc.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(_bd8){var tn=_bd8.domNode;if(!tn||!_bd8.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],_bd8]);},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(_bdf){if(!_bdf){return;}var tdo=_bdf.onDragStart(e);if(tdo){tdo.onDragStart(e);tdo.dragOffset.y+=dy;tdo.dragOffset.x+=dx;tdo.dragSource=_bdf;this.dragObjects.push(tdo);}},this);this.previousDropTarget=null;this.cacheTargetLocations();}dojo.lang.forEach(this.dragObjects,function(_be1){if(_be1){_be1.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 _be4=this.findBestTarget(e);if(_be4.target===null){if(this.currentDropTarget){this.currentDropTarget.onDragOut(e);this.previousDropTarget=this.currentDropTarget;this.currentDropTarget=null;}this.dropAcceptable=false;return;}if(this.currentDropTarget!==_be4.target){if(this.currentDropTarget){this.previousDropTarget=this.currentDropTarget;this.currentDropTarget.onDragOut(e);}this.currentDropTarget=_be4.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 _be6=this;var _be7=new Object();_be7.target=null;_be7.points=null;dojo.lang.every(this.dropTargetDimensions,function(_be8){if(!_be6.isInsideBox(e,_be8)){return true;}_be7.target=_be8[2];_be7.points=_be8;return Boolean(_be6.nestedTargets);});return _be7;},isInsideBox:function(e,_bea){if((e.pageX>_bea[0][0])&&(e.pageX<_bea[1][0])&&(e.pageY>_bea[0][1])&&(e.pageY<_bea[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.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 _bf1=new dojo.dnd.HtmlDragObject(this.dragObject,this.type);if(this.dragClass){_bf1.dragClass=this.dragClass;}if(this.constrainToContainer){_bf1.constrainTo(this.constrainingContainer||this.domNode.parentNode);}return _bf1;},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(_bf4){this.constrainToContainer=true;if(_bf4){this.constrainingContainer=_bf4;}},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 _bfe=doc.createElement("table");if(isTr){var _bff=doc.createElement("tbody");_bfe.appendChild(_bff);_bff.appendChild(node);}else{_bfe.appendChild(node);}var _c00=((isTr)?this.domNode:this.domNode.firstChild);var _c01=((isTr)?node:node.firstChild);var _c02=_c00.childNodes;var _c03=_c01.childNodes;for(var i=0;i<_c02.length;i++){if((_c03[i])&&(_c03[i].style)){_c03[i].style.width=dojo.html.getContentBox(_c02[i]).width+"px";}}node=_bfe;}if((dojo.render.html.ie55||dojo.render.html.ie60)&&this.createIframe){with(node.style){top="0px";left="0px";}var _c05=document.createElement("div");_c05.appendChild(node);this.bgIframe=new dojo.html.BackgroundIframe(_c05);_c05.appendChild(this.bgIframe.iframe);node=_c05;}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 _c07=dojo.html.getViewport();var _c08=_c07.width;var _c09=_c07.height;var _c0a=dojo.html.getScroll().offset;var x=_c0a.x;var y=_c0a.y;}else{var _c0d=dojo.html.getContentBox(this.constrainingContainer);_c08=_c0d.width;_c09=_c0d.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+_c08-mb.width,maxY:y+_c09-mb.height};},updateDragOffset:function(){var _c0f=dojo.html.getScroll().offset;if(_c0f.y!=this.scrollOffset.y){var diff=_c0f.y-this.scrollOffset.y;this.dragOffset.y+=diff;this.scrollOffset.y=_c0f.y;}if(_c0f.x!=this.scrollOffset.x){var diff=_c0f.x-this.scrollOffset.x;this.dragOffset.x+=diff;this.scrollOffset.x=_c0f.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 _c17=dojo.html.getAbsolutePosition(this.dragClone,true);var _c18={left:this.dragStartPosition.x+1,top:this.dragStartPosition.y+1};var anim=dojo.lfx.slideTo(this.dragClone,_c18,300);var _c1a=this;dojo.event.connect(anim,"onEnd",function(e){dojo.html.removeNode(_c1a.dragClone);_c1a.dragClone=null;});anim.play();break;}dojo.event.topic.publish("dragEnd",{source:this});},constrainTo:function(_c1c){this.constrainToContainer=true;if(_c1c){this.constrainingContainer=_c1c;}else{this.constrainingContainer=this.domNode.parentNode;}}});dojo.declare("dojo.dnd.HtmlDropTarget",dojo.dnd.DropTarget,function(node,_c1e){if(arguments.length==0){return;}this.domNode=dojo.byId(node);dojo.dnd.DropTarget.call(this);if(_c1e&&dojo.lang.isString(_c1e)){_c1e=[_c1e];}this.acceptedTypes=_c1e||[];dojo.dnd.dragManager.registerDropTarget(this);},{vertical:false,onDragOver:function(e){if(!this.accepts(e.dragObjects)){return false;}this.childBoxes=[];for(var i=0,_c21;i<this.domNode.childNodes.length;i++){_c21=this.domNode.childNodes[i];if(_c21.nodeType!=dojo.html.ELEMENT_NODE){continue;}var pos=dojo.html.getAbsolutePosition(_c21,true);var _c23=dojo.html.getBorderBox(_c21);this.childBoxes.push({top:pos.y,bottom:pos.y+_c23.height,left:pos.x,right:pos.x+_c23.width,height:_c23.height,width:_c23.width,node:_c21});}return true;},_getNodeUnderMouse:function(e){for(var i=0,_c26;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,_c28){var i=this._getNodeUnderMouse(e);if(!this.dropIndicator){this.createDropIndicator();}var _c2a=this.vertical?dojo.html.gravity.WEST:dojo.html.gravity.NORTH;var hide=false;if(i<0){if(this.childBoxes.length){var _c2c=(dojo.html.gravity(this.childBoxes[0].node,e)&_c2a);if(_c2c){hide=true;}}else{var _c2c=true;}}else{var _c2d=this.childBoxes[i];var _c2c=(dojo.html.gravity(_c2d.node,e)&_c2a);if(_c2d.node===_c28[0].dragSource.domNode){hide=true;}else{var _c2e=_c2c?(i>0?this.childBoxes[i-1]:_c2d):(i<this.childBoxes.length-1?this.childBoxes[i+1]:_c2d);if(_c2e.node===_c28[0].dragSource.domNode){hide=true;}}}if(hide){this.dropIndicator.style.display="none";return;}else{this.dropIndicator.style.display="";}this.placeIndicator(e,_c28,i,_c2c);if(!dojo.html.hasParent(this.dropIndicator)){dojo.body().appendChild(this.dropIndicator);}},placeIndicator:function(e,_c30,_c31,_c32){var _c33=this.vertical?"left":"top";var _c34;if(_c31<0){if(this.childBoxes.length){_c34=_c32?this.childBoxes[0]:this.childBoxes[this.childBoxes.length-1];}else{this.dropIndicator.style[_c33]=dojo.html.getAbsolutePosition(this.domNode,true)[this.vertical?"x":"y"]+"px";}}else{_c34=this.childBoxes[_c31];}if(_c34){this.dropIndicator.style[_c33]=(_c32?_c34[_c33]:_c34[this.vertical?"right":"bottom"])+"px";if(this.vertical){this.dropIndicator.style.height=_c34.height+"px";this.dropIndicator.style.top=_c34.top+"px";}else{this.dropIndicator.style.width=_c34.width+"px";this.dropIndicator.style.left=_c34.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 _c38=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)&_c38){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 _c39=this.childBoxes[i];if(dojo.html.gravity(_c39.node,e)&_c38){return this.insert(e,_c39.node,"before");}else{return this.insert(e,_c39.node,"after");}},insert:function(e,_c3b,_c3c){var node=e.dragObject.domNode;if(_c3c=="before"){return dojo.html.insertBefore(node,_c3b);}else{if(_c3c=="after"){return dojo.html.insertAfter(node,_c3b);}else{if(_c3c=="append"){_c3b.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 _c3e=new dojo.dnd.HtmlDragMoveObject(this.dragObject,this.type);if(this.constrainToContainer){_c3e.constrainTo(this.constrainingContainer);}return _c3e;},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 _c48=this.isEnableX&&!this.isEnableY;var _c49=this.isEnableY&&!this.isEnableX;switch(evt.key){case evt.KEY_LEFT_ARROW: dojo.event.browser.stopEvent(evt);if(_c49){this._bottomButtonPressed(evt);}else{this._leftButtonPressed(evt);}return;case evt.KEY_RIGHT_ARROW: dojo.event.browser.stopEvent(evt);if(_c49){this._topButtonPressed(evt);}else{this._rightButtonPressed(evt);}return;case evt.KEY_DOWN_ARROW: dojo.event.browser.stopEvent(evt);if(_c48){this._leftButtonPressed(evt);}else{this._bottomButtonPressed(evt);}return;case evt.KEY_UP_ARROW: dojo.event.browser.stopEvent(evt);if(_c48){this._rightButtonPressed(evt);}else{this._topButtonPressed(evt);}return;}}this._eventCount++;},_pressButton:function(_c4a){_c4a.className=_c4a.className.replace("Outset","Inset");},_releaseButton:function(_c4b){_c4b.className=_c4b.className.replace("Inset","Outset");},_buttonPressed:function(evt,_c4d){this._setFocus();if(typeof evt=="object"){if(this._typamaticTimer!=null){if(this._typamaticNode==_c4d){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(_c4d==this.leftButtonNode&&this.isEnableX){this._snapX(dojo.html.getPixelValue(this.sliderHandleNode,"left")-this._valueSizeX);}else{if(_c4d==this.rightButtonNode&&this.isEnableX){this._snapX(dojo.html.getPixelValue(this.sliderHandleNode,"left")+this._valueSizeX);}else{if(_c4d==this.topButtonNode&&this.isEnableY){this._snapY(dojo.html.getPixelValue(this.sliderHandleNode,"top")-this._valueSizeY);}else{if(_c4d==this.bottomButtonNode&&this.isEnableY){this._snapY(dojo.html.getPixelValue(this.sliderHandleNode,"top")+this._valueSizeY);}else{return false;}}}}this._pressButton(_c4d);this.notifyListeners();this._typamaticNode=_c4d;this._typamaticTimer=dojo.lang.setTimeout(this,"_buttonPressed",this._currentTimeout,this._eventCount,_c4d);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 _c5b=evt.keyCode;switch(_c5b){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 _c5d=0;if(typeof evt.wheelDelta=="number"){_c5d=evt.wheelDelta;}else{if(typeof evt.detail=="number"){_c5d=-evt.detail;}}if(this.isEnableY){if(_c5d>0){this._topButtonPressed(evt);this._buttonReleased(evt);}else{if(_c5d<0){this._bottomButtonPressed(evt);this._buttonReleased(evt);}}}else{if(this.isEnableX){if(_c5d>0){this._rightButtonPressed(evt);this._buttonReleased(evt);}else{if(_c5d<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 _c61=this.getFragNodeRef(frag);dojo.html.copyStyle(this.domNode,_c61);var _c62=this.domNode.style.padding;if(dojo.lang.isString(_c62)&&_c62!=""&&_c62!="0px"&&_c62!="0px 0px 0px 0px"){this.topBorderNode.style.padding=this.bottomBorderNode.style.padding=_c62;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 _c63=this.domNode.style.borderWidth;if(dojo.lang.isString(_c63)&&_c63!=""&&_c63!="0px"&&_c63!="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=_c63;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 _c65=Math.round(x/this._valueSizeX);x=Math.round(_c65*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 _c66=dojo.html.getContentBox(this.constrainingContainerNode);var _c67=dojo.html.getContentBox(this.sliderHandleNode);if(isNaN(_c66.width)||isNaN(_c67.width)||_c66.width<=0||_c67.width<=0){return false;}this._constraintWidth=_c66.width+dojo.html.getPadding(this.constrainingContainerNode).width-_c67.width;if(this.flipX){this._clipLeft=this._clipRight=_c66.width;}else{this._clipLeft=this._clipRight=0;}this._clipXdelta=_c67.width>>1;if(!this.isEnableY){this._clipTop=0;this._clipBottom=_c66.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(_c68){if(0==this._valueSizeX){if(this._calc_valueSizeX()==false){dojo.lang.setTimeout(this,"setValueX",100,_c68);return;}}if(isNaN(_c68)){_c68=0;}if(_c68>this.maximumX){_c68=this.maximumX;}else{if(_c68<this.minimumX){_c68=this.minimumX;}}var _c69=(_c68-this.minimumX)/(this.maximumX-this.minimumX);if(this.flipX){_c69=1-_c69;}this._snapX(_c69*this._constraintWidth);this.notifyListeners();},getValueX:function(){var _c6a=dojo.html.getPixelValue(this.sliderHandleNode,"left")/this._constraintWidth;if(this.flipX){_c6a=1-_c6a;}return Math.round(_c6a*(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 _c6c=Math.round(y/this._valueSizeY);y=Math.round(_c6c*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 _c6d=dojo.html.getContentBox(this.constrainingContainerNode);var _c6e=dojo.html.getContentBox(this.sliderHandleNode);if(isNaN(_c6d.height)||isNaN(_c6e.height)||_c6d.height<=0||_c6e.height<=0){return false;}this._constraintHeight=_c6d.height+dojo.html.getPadding(this.constrainingContainerNode).height-_c6e.height;if(this.flipY){this._clipTop=this._clipBottom=_c6d.height;}else{this._clipTop=this._clipBottom=0;}this._clipYdelta=_c6e.height>>1;if(!this.isEnableX){this._clipLeft=0;this._clipRight=_c6d.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(_c6f){if(0==this._valueSizeY){if(this._calc_valueSizeY()==false){dojo.lang.setTimeout(this,"setValueY",100,_c6f);return;}}if(isNaN(_c6f)){_c6f=0;}if(_c6f>this.maximumY){_c6f=this.maximumY;}else{if(_c6f<this.minimumY){_c6f=this.minimumY;}}var _c70=(_c6f-this.minimumY)/(this.maximumY-this.minimumY);if(this.flipY){_c70=1-_c70;}this._snapY(_c70*this._constraintHeight);this.notifyListeners();},getValueY:function(){var _c71=dojo.html.getPixelValue(this.sliderHandleNode,"top")/this._constraintHeight;if(this.flipY){_c71=1-_c71;}return Math.round(_c71*(this.snapValuesY-1))*((this.maximumY-this.minimumY)/(this.snapValuesY-1))+this.minimumY;},_onClick:function(evt){if(this._isDragInProgress){return;}var _c73=dojo.html.getAbsolutePosition(this.constrainingContainerNode,true,dojo.html.boxSizing.MARGIN_BOX);var _c74=dojo.html.getContentBox(this._handleMove.domNode);if(this.isEnableX){var x=evt.pageX-_c73.x-(_c74.width>>1);this._snapX(x);}if(this.isEnableY){var y=evt.pageY-_c73.y-(_c74.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(_c79){this.setValueX(_c79);},onValueChanged:function(_c7a){}});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(_c7b){this.setValueY(_c7b);},onValueChanged:function(_c7c){}});dojo.declare("dojo.widget._SliderDragMoveSource",dojo.dnd.HtmlDragMoveSource,{slider:null,onDragStart:function(evt){this.slider._isDragInProgress=true;var _c7e=this.createDragMoveObject();this.slider.notifyListeners();return _c7e;},onDragEnd:function(evt){this.slider._isDragInProgress=false;this.slider.notifyListeners();},createDragMoveObject:function(){var _c80=new dojo.widget._SliderDragMoveObject(this.dragObject,this.type);_c80.slider=this.slider;if(this.dragClass){_c80.dragClass=this.dragClass;}return _c80;},setParent:function(_c81){this.slider=_c81;}});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.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\" valign=\"top\"><div dojoAttachPoint=\"address\"></div></td>\r\n                <td class=\"CenterTD\" valign=\"top\"><span dojoAttachPoint=\"description\"></span></td>\r\n                <td class=\"RightTD\" valign=\"top\"><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\"><div class=\"PagingControls\"><a dojoAttachEvent=\"onclick:_previousClick\" href=\"\" class=\"Previous\"></a><span dojoAttachPoint=\"imageCount\">1 / 1</span><a dojoAttachEvent=\"onclick:_nextClick\" href=\"\" class=\"Next\"></a></div></td>\r\n                <td class=\"RightControl\">\r\n                    <a dojoAttachEvent=\"onclick:accountClick\" href=\"\" class=\"SaveTo\">${this._NLS.shared.saveToYourAccount}</a>\r\n                    <a dojoAttachEvent=\"onclick:rmiClick\" href=\"\" class=\"MoreInfo\">${this._NLS.shared.requestMoreInformation}</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,_NLS: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/ShowcaseHD.css");}}this._tempImgPath="/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/General/1t.gif";wtl.util.connectDialogKeyPress(this);this._NLS=wtl.resources;},fillInTemplate:function(){dojo.event.connect(window,"onscroll",this,"_onScroll");this._setSizes();var _c85={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",_c85,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 _c86=dojo.html.getViewport();var h=_c86.height;var w=_c86.width;with(this.domNode.style){width=w+"px";height=h+"px";}var _c89=dojo.html.getScroll().offset;this.domNode.style.top=_c89.y+"px";this.domNode.style.left=_c89.x+"px";var _c86=dojo.html.getViewport();if(_c86.width!=w){this.domNode.style.width=_c86.width+"px";}if(_c86.height!=h){this.domNode.style.height=_c86.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 _c8a=dojo.html.getViewport();if(_c8a.height!=this._orgHeight||_c8a.width!=this._orgWidth){this._orgHeight=_c8a.height;this._orgWidth=_c8a.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:{IsShowcase21: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 _c8c=this;var _c8d=function(){if(_c8c.autoStart){_c8c._startTimer();}};this.showImage(this.imageIndex,_c8d);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 _c90=this;var _c91=function(){while(_c90.largeNode.firstChild){_c90.largeNode.removeChild(_c90.largeNode.firstChild);}_c90.largeNode.appendChild(_c90.images[_c90.imageIndex]);};this._loadImage(this.imageIndex,_c91);this._cacheImages(this.imageIndex);},_onScroll:function(){var _c92=dojo.html.getScroll().offset;this.domNode.style.top=_c92.y+"px";this.domNode.style.left=_c92.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 _c96=this.showNextImage(true,true);if(!_c96){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(_c98,_c99){if(this.imageIndex+1>=this.maxPhotos){if(_c98&&_c99){this.imageIndex=-1;}else{return false;}}var _c9a=this;this.showImage(this.imageIndex+1,function(){if(_c98){_c9a._startTimer();}});return true;},closeClick:function(evt){if(evt){dojo.event.browser.stopEvent(evt);}this.hide();},showImage:function(_c9c,_c9d){var _c9e=this;var _c9f=this.largeNode.getElementsByTagName("div");this.imageIndex=_c9c;var _ca0=function(){if(_c9e.images[_c9c]){while(_c9e.largeNode.firstChild){_c9e.largeNode.removeChild(_c9e.largeNode.firstChild);}_c9e.imageCount.innerHTML=(_c9c+1)+" / "+_c9e.item.Images.length;_c9e.description.innerHTML=_c9e.item.Images[_c9c].desc?_c9e.item.Images[_c9c].desc:"";_c9e.images[_c9c].style.opacity=0;_c9e.largeNode.appendChild(_c9e.images[_c9c]);var _ca1=function(){if(_c9d&&_c9e._isPlaying){_c9d();}};dojo.lfx.html.fadeIn(_c9e.images[_c9c],400,null,_ca1).play();}else{_c9e._loadImage(_c9c,function(){_c9e.showImage(_c9c,_c9d);});}};if(_c9f&&_c9f.length>0){dojo.lfx.html.fadeOut(_c9f[0],400,null,_ca0).play();}else{_ca0();}this._cacheImages(_c9c);},_cacheImages:function(_ca2){for(var x=1;x<=this._preCacheVal;x++){if(_ca2+x<this.item.Images.length){if(!this.images[_ca2+x]){this._loadImage(_ca2+x);}}else{if(!this.images[(_ca2+x)-this.item.Images.length]){this._loadImage((_ca2+x)-this.item.Images.length);}}}for(var x=1;x<=this._preCacheVal;x++){if(_ca2-x>0){if(!this.images[_ca2-x]){this._loadImage(_ca2-x);}}else{if(!this.images[this.item.Images.length-x]){this._loadImage(this.item.Images.length-x);}}}},_loadImage:function(_ca4,_ca5){if(this.images[_ca4]||!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[_ca4].file+"&langpref="+djConfig.locale;var img=document.createElement("img");var div=document.createElement("div");div.appendChild(img);var _ca9=this;dojo.event.connect(img,"onload",function(){if(_ca5){_ca5();}});this.images[_ca4]=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\">${this._NLS.propertyPreview.noPropertyText}</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\">${this._NLS.shared.previous}</a></div>\r\n\t\t\t<div class=\"NextLink\" dojoAttachPoint=\"nextLink\" style=\"display:none;\"><a dojoAttachEvent=\"onclick:nextClick\">${this._NLS.shared.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\">${this._NLS.shared.viewSlideshow}</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\">${this._NLS.shared.propertyDetails}</a>\r\n\t\t\t\t\t        <a class=\"HDShowcase\" dojoAttachEvent=\"onclick:_onShowcaseHDClick\" dojoAttachPoint=\"showcaseHDLink\">${this._NLS.shared.hdPhotoTour}</a>\r\n\t\t\t\t\t        <a class=\"MoreInfo\" dojoAttachEvent=\"onclick:_onRequestMoreInfoClick\" href=\"\">${this._NLS.shared.requestMoreInformation}</a>\r\n\t\t\t\t\t        <a class=\"Showing\" dojoAttachPoint=\"requestShowingLink\" dojoAttachEvent=\"onclick:_onRequestShowingClick\" href=\"\">${this._NLS.shared.requestAShowing}</a>\r\n\t\t\t\t\t        <!-- <a class=\"Mortgage\" dojoAttachEvent=\"onclick:_onMortgageClick\">${this._NLS.shared.mortgageCalculator}</a> -->\r\n\t\t\t\t\t        <a class=\"Brochures\" dojoAttachEvent=\"onclick:_onBrochureClick\" href=\"\">${this._NLS.shared.printBrochures}</a>\r\n\t\t\t\t\t        <a class=\"SaveTo\" dojoAttachEvent=\"onclick:_onSaveToHomeFileClick\" href=\"\">${this._NLS.shared.saveToYourAccount}</a>\r\n\t\t\t\t\t        <a class=\"EmailListing\" dojoAttachEvent=\"onclick:_onEmailListingClick\" href=\"\">${this._NLS.shared.emailListing}</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\"/>\r\n\t\t\t\t\t            <label for=\"${this.widgetId}_compare\" class=\"Pointer\">${this._NLS.shared.selectToCompare}</label>\r\n\t\t\t                </div>\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=\"descTab\" id=\"descTab\">\r\n\t\t\t\t\t<a>${this._NLS.propertyPreview.propertyDescription}</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>${this._NLS.propertyPreview.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>${this._NLS.propertyPreview.photos}</a>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"TabIDXLogo IDX\" dojoAttachPoint=\"idxLogo\"></div>\t\t\t\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"TabContent\" dojoAttachPoint=\"tabContainer\">\r\n\r\n\t\t\t\t<div dojoAttachPoint=\"descTabContainer\">\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</div>\r\n\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\t<div class=\"VirtualTour\" dojoAttachPoint=\"virtualTour\" style=\"display:none;\">${this._NLS.propertyPreview.virtualTours}</div>\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        <div class=\"DisclaimerContainer\">\r\n\t\t        <div class=\"IDXContainer\" dojoAttachPoint=\"idxContainer\">\r\n\t\t\t        <p style=\"margin:2px 0 0 0\"></p>\r\n\t\t\t        <div style=\"font-size:9px;\">${this._NLS.shared.idxDisclaimer}</div>\r\n\t\t        </div>\r\n\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=\"AgentInfo PropWrap\" style=\"border-top: 1px solid #B2B2B2;\" dojoAttachPoint=\"listedByContainer\">\r\n            <div class=\"ListedByInfo\">\r\n                <div class=\"AgentInfoContaier\">\r\n                    <div dojoAttachPoint=\"agentContainer\"></div>\r\n                    <div dojoAttachPoint=\"coagentContainer\"></div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n\t</div>\r\n</div>\r\n",currentDeployment:{},item:null,label:"",httpHandler:"",agentHandler:"",imageWidth:108,signInMessage:"",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,descTab:null,descTabContainer:null,agentContainer:null,coagentContainer:null,summaryTab:null,summaryTabContainer:null,photosTab:null,photosTabContainer:null,agentName:null,jobTitle:null,agentBrokerOwner: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,_NLS:null,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");}}this._NLS=wtl.resources;},fillInTemplate:function(){this.label=this._NLS.propertyPreview.label;this.signInMessage=this._NLS.propertyPreview.signInMessage;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){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());}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,_cb2){this.item=item;this._selectedIdx=0;this._featureCounter=0;this._doNotOpenPane=_cb2;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",sync:true});}}else{dojo.html.setDisplay(this.noPropertyContainer,true);dojo.html.setDisplay(this.propertyContainer,false);}},_hasDescPanel:function(){if(this.item){return (this.item.Leadline.length+this.item.Caption.length)>0;}return false;},_populateListing:function(type,data,_cb5){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);this.propertyStatus.className=data.Detail.ListingStatusCode+"Status";if(data.Detail.WorkOnlineAgent){this._populateListingContact(data.Detail.WorkOnlineAgent,this.contactType.AGENT);}else{if(data.Detail.CompanySiteMainOffice){this._populateListingContact(data.Detail.CompanySiteMainOffice,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();if(this._hasDescPanel()){dojo.html.setDisplay(this.descTabContainer,true);this.descTab.className+=" Selected";}else{dojo.html.setDisplay(this.summaryTabContainer,true);this.summaryTab.className+=" Selected";}}}if(/selected/i.test(this.descTab.className)&&!this._hasDescPanel()){this._resetTabContent();dojo.html.setDisplay(this.summaryTabContainer,true);this.summaryTab.className+=" Selected";}dojo.html.setDisplay(this.showCaseButton,data.Images);dojo.html.setDisplay(this.photosTab,data.Images);dojo.html.setDisplay(this.descTab,this._hasDescPanel());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?this._NLS.shared.propertyID+": "+this.item.PropertyID:this.currentDeployment.idxLabel+": "+this.item.MLSID;if(data.OpenHouses&&data.OpenHouses.length){this.openHouseContainer.innerHTML=this._NLS.propertyPreview.openHouse.open+" ";for(var i=0;i<data.OpenHouses.length;i++){var oh=data.OpenHouses[i];if(i>0){this.openHouseContainer.innerHTML+="<br />"+this._NLS.propertyPreview.openHouse.and+" ";}this.openHouseContainer.innerHTML+=oh.StartDate+" "+this._NLS.propertyPreview.openHouse.from+" "+oh.StartTime+" "+this._NLS.propertyPreview.openHouse.to+" "+oh.EndTime;}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&langpref="+djConfig.locale;}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",this._NLS.propertyPreview.designations.FHE));}if(this.item.REC){this.designations.appendChild(this._buildDesignationImg("REC",this._NLS.propertyPreview.designations.REC));}if(this.item.AM){this.designations.appendChild(this._buildDesignationImg("AM",this._NLS.propertyPreview.designations.AM));}if(this.item.HIS){this.designations.appendChild(this._buildDesignationImg("HIS",this._NLS.propertyPreview.designations.HIS));}if(this.item.COM){this.designations.appendChild(this._buildDesignationImg("COM",this._NLS.propertyPreview.designations.COM));}dojo.html.setDisplay(this.virtualTour,false);dojo.html.setDisplay(this.requestShowingLink,!this.item.IsSold);wtl.util.destroyChildren(this.features);this._addFeature(this.currentDeployment.idxLabel,this.item.MLSID,true);this._addFeature(this._NLS.propertyPreview.features.style,this.item.Style,true);this._addFeature(this._NLS.propertyPreview.features.yearBuilt,this.item.YearBuilt,true);this._addFeature(this._NLS.propertyPreview.features.bedrooms,this.item.Bedrooms,true);this._addFeature(this._NLS.propertyPreview.features.bathrooms,this.item.Bathrooms,true);this._addFeature(this._NLS.propertyPreview.features.washrooms,this.item.Washrooms,true);this._addFeature(this._NLS.propertyPreview.features.aboveGroundSqFt,this.item.AboveSqFootage,true);this._addFeature(this._NLS.propertyPreview.features.foundationSqFt,this.item.FoundationSqFootage,true);this._addFeature(this._NLS.propertyPreview.features.newConstruction,this.item.NewConstruction,true);this._addFeature(this._NLS.propertyPreview.features.fireplaces,this.item.Fireplaces,true);this._addFeature(this._NLS.propertyPreview.features.buildingSizeDesc,this.item.BuildingSizeDesc,true);this._addFeature(this._NLS.propertyPreview.features.totalSqFt,this.item.SqFootage,true);this._addFeature(this._NLS.propertyPreview.features.lotSize,this.item.LotSize,true);this._addFeature(this._NLS.propertyPreview.features.acreage,this.item.Acerage,true);this._addFeature(this._NLS.propertyPreview.features.parkingStalls,this.item.Garages,true);this._addFeature(this._NLS.propertyPreview.features.county,this.item.County,true);this._addFeature(this._NLS.propertyPreview.features.neighborhood,this.item.Neighborhood,true);this._addFeature(this._NLS.propertyPreview.features.schoolDistrict,this.item.SchoolDistrict,true);this.propertyDetailsLink.href=this._buildListingLink();dojo.html.setDisplay(this.idxContainer,false);dojo.html.setDisplay(this.idxLogo,false);if(this.item.ListingCourtesy&&this.item.ListingCourtesy.length){dojo.html.setDisplay(this.idxLogo,true);var p=dojo.dom.firstElement(this.idxContainer,"p");if(p){p.innerHTML=this.item.ListingCourtesy;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&langpref="+djConfig.locale;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(_cbc,_cbd){var i=document.createElement("img");i.src="/Deployments/"+this.currentDeployment.deploymentDirectory+"/Branding/Designations/"+((this._NLS.lang!="en")?(this._NLS.lang+"/"):"")+_cbc+".gif";i.alt=_cbc;i.title=_cbd;return i;},superSize:function(){this.tabContainer.style.height="";var _cbf=dojo.html.getMarginBox(this.propertyContainer).height+5;var _cc0=dojo.html.getMarginBox(this.tabContainer).height-5;var _cc1=dojo.html.getMarginBox(this._pane.containerNode).height;var h=_cc0+(_cc1-_cbf);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:ContactInfoPropPreview",{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");}if(type==this.contactType.AGENT){this._contactInfo.populateAgent(data);this._contactInfo.setWorkingOnline(this.item.WorkWithAgent,this.item.DirectAgentSite);this._agent=data;dojo.html.addClass(this.listedByContainer,"AgentInfo");}else{this._contactInfo.populateOffice(data);dojo.html.removeClass(this.listedByContainer,"AgentInfo");}this._contactInfo.setDisplayLabel(this.item.DisplayLabel);},_populateCoAgent:function(_cc5){if(!this._coAgentInfo){this._coAgentInfo=dojo.widget.createWidget("wtl:ContactInfoPropPreview",{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(_cc5);this._coAgentInfo.domNode.style.display="";this._coAgentInfo.setDisplayLabel("");},mapAndDirs:function(id){if(dojo.lang.isFunction(this.onGetDirections)){this.onGetDirections("OfficeID="+id);}},agentDetailsClick:function(_cc7){},viewSoldsClick:function(_cc8){},viewListingsClick:function(_cc9){},resetAgentSearch:function(){},_addFeature:function(_cca,_ccb,span){if(_ccb||_ccb.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=_cca+":";tr.appendChild(td);var td=document.createElement("td");td.className="Value";td.innerHTML=_ccb;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>20){this.photo.src+="&21Photos=true";}if(this.item.ShowcaseHD){this.photo.src+="&HDShowcase=true";}}this.photo.src+="&langpref="+djConfig.locale;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 _cd2=document.createElement("div");dojo.body().appendChild(_cd2);var _cd3={currentDeployment:this.currentDeployment,saveToYourAccountCallback:dojo.lang.hitch(this,"saveToHomeFileClick"),requestMoreInfoCallback:this.requestMoreInfoCallback};this._showcaseHD=dojo.widget.createWidget("wtl:ShowcaseHD",_cd3,_cd2);}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 _cd5=document.createElement("div");dojo.body().appendChild(_cd5);var _cd6={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",_cd6,_cd5);_cd5=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(_cdc){this.workWithMeOnline(_cdc,this._agentID);},_workWithAgentClick:function(id){this._agentID=id;this.workWithMeOnline(false,id);},workWithMeOnline:function(_cde,id){},processWorkWithMe:function(_ce0){if(this._contactInfo){this._contactInfo.updateWorkingOnline(_ce0.WTLUserID);if(this._coAgentInfo){this._coAgentInfo.updateWorkingOnline(_ce0.WTLUserID);}if(_ce0.WTLUserID==0){this.openPreview(this.item,true);}}},workWithAgent:function(){this.workWithMeOnline(false,this._agentID);},notLoggedIn:function(_ce1,_ce2){},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(_ce4,_ce5,_ce6){if(dojo.lang.isFunction(this.showLoadingCallback)){this.showLoadingCallback();}dojo.io.bind({url:"/SaveToHomeFile.c?ListingID="+_ce4+"&MLSProviderID="+_ce5+"&MLSID="+_ce6+"&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,_ce9){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(_cea){},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: if(this._hasDescPanel()){dojo.html.setDisplay(this.descTabContainer,true);this.descTab.className+=" Selected";}else{dojo.html.setDisplay(this.summaryTabContainer,true);this.summaryTab.className+=" Selected";}break;}},_resetTabContent:function(){this.descTab.className="Tab";this.summaryTab.className="Tab";this.photosTab.className="Tab";dojo.html.setDisplay(this.descTabContainer,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 djConfig.baseLinkPrefix+this.item.FriendlyUrl;}return "";},switchSearchType:function(typ){this.searchType=typ;if(this.propertyDetailsLink){this.propertyDetailsLink.href=this._buildListingLink();}},toggleCompare:function(_cee,item){},onDisplayCompareable:function(item){},onCompareItemToggled:function(item,_cf2,_cf3,_cf4){if(wtl.util.listingsEqual(item,this.item)){this.compareCheckbox.checked=_cf2;}this.compareCheckbox.disabled=!this.compareCheckbox.checked&&_cf3;},onUpdateCompareableDisplay:function(item,_cf6,_cf7){if(wtl.util.listingsEqual(item,this.item)){this.compareCheckbox.checked=_cf6;}this.compareCheckbox.disabled=!this.compareCheckbox.checked&&_cf7;},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(_cf9){if(_cf9&&_cf9.value&&_cf9.value.length){this.textBox.value=_cf9.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 d=document.createElement("div");var _d02=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);_d02.htmlFor=this.label.replace(" ","");_d02.className="Checkbox";_d02.title=this.title;_d02.appendChild(document.createTextNode(this.label));d.appendChild(_d02);this.domNode.appendChild(d);},_onClick:function(evt){this.selectedValue=this.checkbox.checked;this._filter(evt);},setParams:function(_d04){this.checkbox.checked=this.selectedValue=_d04&&_d04.selectedValue!=null?_d04.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 _d07="";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(_d07)||/FilterCriteriaDrillDownRange/i.test(_d07))){var sep=frag.appendChild(document.createElement("div"));sep.className="Divider";}_d07=dt;if(/FilterCriteriaTextBox/i.test(dt)&&this.quickSearchValue.length){this.filters[i].selectedValue=this.quickSearchValue;}var _d0c=frag.appendChild(document.createElement("div"));this._addFilter(this.filters[i],_d0c);}}this.domNode.appendChild(frag);frag=null;},postCreate:function(){this._disableButtonSelections();},_addFilter:function(f,_d0e){f.currentDeployment=this.currentDeployment;f.onShowCallback=dojo.lang.hitch(this,"_hideAllDrillDowns");f.widget=dojo.widget.createWidget("wtl:"+f.dojotype,f,_d0e);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 _d10=dojo.html.getElementsByClass("Disableable",this.domNode,"div");for(var i=0;i<_d10.length;i++){dojo.html.disableSelection(_d10[i]);}},_filter:function(){this.filter("directory");},filter:function(_d12){},_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(_d18){if(dojo.lang.isArray(_d18)){for(var i=0;i<_d18.length;i++){if(_d18[i].id){for(var j=0;j<this.filters.length;j++){var w=this.filters[j].widget;if(w&&w.id==_d18[i].id&&w.setParams){w.setParams(_d18[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=\"${this._NLS.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,_NLS: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");}}this._NLS=wtl.resources.filters;},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.options.length){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=this._NLS.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(_d22){if(_d22){if(_d22.options){this.options=_d22.options;this._drawOptions();}if(_d22.selectedValue!=null){this.selectedValue=_d22.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(_d25,_d26,idx,_d28,_d29){var a=document.createElement("a");a.href="";a.idx=idx;a.innerHTML=_d25;a.title=_d25;if(_d29){a.className=_d29;}if(_d26){var s=document.createElement("span");s.innerHTML=" ("+wtl.util.formatNumber(_d26)+")";p.appendChild(s);}if(_d28&&this[_d28]){dojo.event.connect(a,"onclick",this,_d28);}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=this._NLS.define;}else{this._show();this.Label.title=this._NLS.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 _d32=false;if(evt.pageX<pos.x||evt.pageY<pos.y){_d32=true;}if(evt.pageX>=(pos.x+box.width)){_d32=true;}if(evt.pageY>(pos.y+box.height)){_d32=true;}if(_d32){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=\"${this._NLS.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    <div class=\"Range\">\r\n\t\t    <input dojoAttachPoint=\"start\" dojoAttachEvent=\"onFocus:_onFocus;onBlur:_onBlur;\" type=\"text\" class=\"start\" />\r\n\t\t    <input dojoAttachPoint=\"end\" dojoAttachEvent=\"onFocus:_onFocus;onBlur:_onBlur;\" type=\"text\" class=\"end\" />\r\n\t\t    </div>\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,_NLS: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/FilterCriteriaDrillDownRange.css");}}this._NLS=wtl.resources.filters;},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(_d3d){this._params=_d3d;dojo.dom.removeChildren(this.options);this.selectedItemContainer.innerHTML="";var s="";if(_d3d){this.start.value=_d3d.startValue?wtl.util.formatNumber(_d3d.startValue):"";this.end.value=_d3d.endValue?wtl.util.formatNumber(_d3d.endValue):"";if(_d3d.selectedLabel){s=_d3d.selectedLabel;}if(_d3d.options){for(var i=0;i<_d3d.options.length;i++){if(_d3d.options[i].selected){s+=(s.length?",":"")+_d3d.options[i].label;}this._addOption(_d3d.options[i].label,_d3d.options[i].count,i);}}}this.selectedItemContainer.innerHTML=s;this._addOption(this._NLS.reset+" "+this.label.replace(/\:/g,""),"",-1,"_onOptionClick","Reset");},_addOption:function(_d40,_d41,idx,_d43,_d44){var a=document.createElement("a");a.href="";a.idx=idx;a.innerHTML=_d40;a.title=_d40;if(_d44){a.className=_d44;}if(_d41){var s=document.createElement("span");s.innerHTML=" ("+wtl.util.formatNumber(_d41)+")";p.appendChild(s);}if(_d43&&this[_d43]){dojo.event.connect(a,"onclick",this,_d43);}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=this._NLS.define;}else{this._show();this.Label.title=this._NLS.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 _d4e=false;if(evt.pageX<pos.x||evt.pageY<pos.y){_d4e=true;}if(evt.pageX>=(pos.x+box.width)){_d4e=true;}if(evt.pageY>(pos.y+box.height)){_d4e=true;}if(_d4e){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 _d52="";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(_d52)||/FilterCriteriaDrillDownRange/i.test(_d52))){var sep=frag.appendChild(document.createElement("div"));sep.className="Divider";}_d52=dt;if(/FilterCriteriaTextBox/i.test(dt)&&this.quickSearchValue.length){this.filters[i].selectedValue=this.quickSearchValue;}var _d57=frag.appendChild(document.createElement("div"));this._addFilter(this.filters[i],_d57);}}}this.filtersContainer.appendChild(frag);frag=null;}},_createSeperator:function(){this._createPlaceHolder().className="Divider";},_addFilter:function(_d58,_d59){_d58.currentDeployment=this.currentDeployment;_d58.onShowCallback=dojo.lang.hitch(this,"_hideAllDrillDowns");_d58.widget=dojo.widget.createWidget("wtl:"+_d58.dojotype,_d58,_d59);dojo.event.connect(_d58.widget,"filter",this,"_onFilter");},_onFilter:function(){this.filter("property");},filter:function(_d5a){},_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(_d5d){if(dojo.lang.isArray(_d5d)){for(var i=0;i<_d5d.length;i++){if(_d5d[i].id){for(var j=0;j<this.filters.length;j++){var w=this.filters[j].widget;if(w&&w.id==_d5d[i].id&&w.setParams){w.setParams(_d5d[i]);break;}}}}}},_createPlaceHolder:function(){var d=document.createElement("div");this.filtersContainer.appendChild(d);return d;},_disableButtonSelections:function(){var _d62=dojo.html.getElementsByClass("Disableable",this.domNode,"div");for(var i=0;i<_d62.length;i++){dojo.html.disableSelection(_d62[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>${this._NLS.searchPane.propertySearch}</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._NLS.searchPane.directorySearch}</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\t\r\n\t<div class=\"ThirdPartyIdxContainer\"><a dojoAttachPoint=\"thirdPartyIdxLink\" class=\"ThirdPartyIdxUrl\" href=\"\" target=\"_blank\"></a></div>\r\n</div>\r\n",currentDeployment:{},label:"Search",onOpenCallback:null,onCloseCallback:null,defaultTabIndex:0,disableDirectory:false,tabContainer:null,tabContent:null,propertySearchTab:null,directorySearchTab:null,widgetPlaceHolder:null,_pane:null,_doNotOpenPane:false,_searchingFor:"property",_widgetPane:null,_propertySearchWidget:null,_directorySearchWidget:null,_NLS: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");}}this._NLS=wtl.resources;this.label=this._NLS.searchPane.label;},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;}if(this.thirdPartyIdx){this.thirdPartyIdxLink.href=this.thirdPartyIdx.url;this.thirdPartyIdxLink.innerHTML=this.thirdPartyIdx.txt;}else{dojo.html.setDisplay(this.thirdPartyIdxLink,false);}},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 _d6d=dojo.html.getElementsByClass("Tab",this.tabContainer,"div");for(var i=0;i<_d6d.length;i++){if(_d6d[i]==e){idx=i;dojo.html.addClass(e,"Selected");}else{dojo.html.removeClass(_d6d[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(_d72,_d73){if(_d72){this._checkPropertySearch();this._propertySearchWidget.update(_d72);}if(_d73){this._checkDirectorySearch();this._directorySearchWidget.update(_d73);}},_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 _d76={currentDeployment:this.currentDeployment,filters:this.listingFilters,quickSearchValue:this.isDirectorySearch?"":this.quickSearchValue};this._propertySearchWidget=dojo.widget.createWidget("wtl:PropertySearch",_d76);dojo.event.connect(this._propertySearchWidget,"filter",this,"_filter");}},_checkDirectorySearch:function(){if(!this._directorySearchWidget){var _d77={currentDeployment:this.currentDeployment,filters:this.agentFilters,quickSearchValue:this.isDirectorySearch?this.quickSearchValue:""};this._directorySearchWidget=dojo.widget.createWidget("wtl:DirectorySearch",_d77);dojo.event.connect(this._directorySearchWidget,"filter",this,"_filter");}},_disableButtonSelections:function(){var _d78=dojo.html.getElementsByClass("Disableable",this.domNode,"div");for(var i=0;i<_d78.length;i++){dojo.html.disableSelection(_d78[i]);}},superSize:function(){this.tabContent.style.height="";var _d7a=dojo.html.getContentBox(this.domNode).height;var _d7b=dojo.html.getContentBox(this.tabContainer).height;var h=(_d7a-_d7b)-26;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,_d7f,load){},resetDisplay:function(){},switchSearchType:function(){},resetFilter:function(){if(this._propertySearchWidget){this._propertySearchWidget.resetFilter();}if(this._directorySearchWidget){this._directorySearchWidget.resetFilter();}},_filter:function(_d81){this._searchingFor=_d81;this.filter(_d81);},filter:function(_d82){},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(_d83){_d83=(typeof _d83=="object")?_d83:{};if(typeof _d83.allowCC!="boolean"){_d83.allowCC=true;}if(typeof _d83.allowInfra!="boolean"){_d83.allowInfra=true;}if(typeof _d83.allowGeneric!="boolean"){_d83.allowGeneric=true;}var _d84="arpa";var _d85="aero|biz|com|coop|edu|gov|info|int|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(_d83.allowInfra){a.push(_d84);}if(_d83.allowGeneric){a.push(_d85);}if(_d83.allowCC){a.push(ccRE);}var _d88="";if(a.length>0){_d88="("+a.join("|")+")";}return _d88;};dojo.regexp.ipAddress=function(_d89){_d89=(typeof _d89=="object")?_d89:{};if(typeof _d89.allowDottedDecimal!="boolean"){_d89.allowDottedDecimal=true;}if(typeof _d89.allowDottedHex!="boolean"){_d89.allowDottedHex=true;}if(typeof _d89.allowDottedOctal!="boolean"){_d89.allowDottedOctal=true;}if(typeof _d89.allowDecimal!="boolean"){_d89.allowDecimal=true;}if(typeof _d89.allowHex!="boolean"){_d89.allowHex=true;}if(typeof _d89.allowIPv6!="boolean"){_d89.allowIPv6=true;}if(typeof _d89.allowHybrid!="boolean"){_d89.allowHybrid=true;}var _d8a="((\\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 _d8b="(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]";var _d8c="(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]";var _d8d="(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 _d8e="0[xX]0*[\\da-fA-F]{1,8}";var _d8f="([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}";var _d90="([\\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(_d89.allowDottedDecimal){a.push(_d8a);}if(_d89.allowDottedHex){a.push(_d8b);}if(_d89.allowDottedOctal){a.push(_d8c);}if(_d89.allowDecimal){a.push(_d8d);}if(_d89.allowHex){a.push(_d8e);}if(_d89.allowIPv6){a.push(_d8f);}if(_d89.allowHybrid){a.push(_d90);}var _d92="";if(a.length>0){_d92="("+a.join("|")+")";}return _d92;};dojo.regexp.host=function(_d93){_d93=(typeof _d93=="object")?_d93:{};if(typeof _d93.allowIP!="boolean"){_d93.allowIP=true;}if(typeof _d93.allowLocal!="boolean"){_d93.allowLocal=false;}if(typeof _d93.allowPort!="boolean"){_d93.allowPort=true;}var _d94="([0-9a-zA-Z]([-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?\\.)+"+dojo.regexp.tld(_d93);var _d95=(_d93.allowPort)?"(\\:"+dojo.regexp.integer({signed:false})+")?":"";var _d96=_d94;if(_d93.allowIP){_d96+="|"+dojo.regexp.ipAddress(_d93);}if(_d93.allowLocal){_d96+="|localhost";}return "("+_d96+")"+_d95;};dojo.regexp.url=function(_d97){_d97=(typeof _d97=="object")?_d97:{};if(typeof _d97.scheme=="undefined"){_d97.scheme=[true,false];}var _d98=dojo.regexp.buildGroupRE(_d97.scheme,function(q){if(q){return "(https?|ftps?)\\://";}return "";});var _d9a="(/([^?#\\s/]+/)*)?([^?#\\s/]+(\\?[^?#\\s/]*)?(#[A-Za-z][\\w.:-]*)?)?";return _d98+dojo.regexp.host(_d97)+_d9a;};dojo.regexp.emailAddress=function(_d9b){_d9b=(typeof _d9b=="object")?_d9b:{};if(typeof _d9b.allowCruft!="boolean"){_d9b.allowCruft=false;}_d9b.allowPort=false;var _d9c="([\\da-z]+[-._+&'])*[\\da-z]+";var _d9d=_d9c+"@"+dojo.regexp.host(_d9b);if(_d9b.allowCruft){_d9d="<?(mailto\\:)?"+_d9d+">?";}return _d9d;};dojo.regexp.emailAddressList=function(_d9e){_d9e=(typeof _d9e=="object")?_d9e:{};if(typeof _d9e.listSeparator!="string"){_d9e.listSeparator="\\s;,";}var _d9f=dojo.regexp.emailAddress(_d9e);var _da0="("+_d9f+"\\s*["+_d9e.listSeparator+"]\\s*)*"+_d9f+"\\s*["+_d9e.listSeparator+"]?\\s*";return _da0;};dojo.regexp.integer=function(_da1){_da1=(typeof _da1=="object")?_da1:{};if(typeof _da1.signed=="undefined"){_da1.signed=[true,false];}if(typeof _da1.separator=="undefined"){_da1.separator="";}else{if(typeof _da1.groupSize=="undefined"){_da1.groupSize=3;}}var _da2=dojo.regexp.buildGroupRE(_da1.signed,function(q){return q?"[-+]":"";});var _da4=dojo.regexp.buildGroupRE(_da1.separator,function(sep){if(sep==""){return "(0|[1-9]\\d*)";}var grp=_da1.groupSize,grp2=_da1.groupSize2;if(typeof grp2!="undefined"){var _da8="(0|[1-9]\\d{0,"+(grp2-1)+"}(["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";return ((grp-grp2)>0)?"("+_da8+"|(0|[1-9]\\d{0,"+(grp-1)+"}))":_da8;}return "(0|[1-9]\\d{0,"+(grp-1)+"}(["+sep+"]\\d{"+grp+"})*)";});return _da2+_da4;};dojo.regexp.realNumber=function(_da9){_da9=(typeof _da9=="object")?_da9:{};if(typeof _da9.places!="number"){_da9.places=Infinity;}if(typeof _da9.decimal!="string"){_da9.decimal=".";}if(typeof _da9.fractional=="undefined"){_da9.fractional=[true,false];}if(typeof _da9.exponent=="undefined"){_da9.exponent=[true,false];}if(typeof _da9.eSigned=="undefined"){_da9.eSigned=[true,false];}var _daa=dojo.regexp.integer(_da9);var _dab=dojo.regexp.buildGroupRE(_da9.fractional,function(q){var re="";if(q&&(_da9.places>0)){re="\\"+_da9.decimal;if(_da9.places==Infinity){re="("+re+"\\d+)?";}else{re=re+"\\d{"+_da9.places+"}";}}return re;});var _dae=dojo.regexp.buildGroupRE(_da9.exponent,function(q){if(q){return "([eE]"+dojo.regexp.integer({signed:_da9.eSigned})+")";}return "";});return _daa+_dab+_dae;};dojo.regexp.currency=function(_db0){_db0=(typeof _db0=="object")?_db0:{};if(typeof _db0.signed=="undefined"){_db0.signed=[true,false];}if(typeof _db0.symbol=="undefined"){_db0.symbol="$";}if(typeof _db0.placement!="string"){_db0.placement="before";}if(typeof _db0.signPlacement!="string"){_db0.signPlacement="before";}if(typeof _db0.separator=="undefined"){_db0.separator=",";}if(typeof _db0.decimal!="string"){_db0.decimal=".";}var _db1=dojo.regexp.buildGroupRE(_db0.signed,function(q){if(q){return "[-+]";}return "";});var _db3=dojo.regexp.buildGroupRE(_db0.symbol,function(_db4){return "\\s?"+_db4.replace(/([.$?*!=:|\\\/^])/g,"\\$1")+"\\s?";});switch(_db0.signPlacement){case "before": _db3=_db1+_db3;break;case "after": _db3=_db3+_db1;break;}var _db5=_db0;_db5.signed=false;_db5.exponent=false;var _db6=dojo.regexp.realNumber(_db5);var _db7;switch(_db0.placement){case "before": _db7=_db3+_db6;break;case "after": _db7=_db6+_db3;break;}switch(_db0.signPlacement){case "around": _db7="("+_db7+"|"+"\\("+_db7+"\\)"+")";break;case "begin": _db7=_db1+_db7;break;case "end": _db7=_db7+_db1;break;}return _db7;};dojo.regexp.us.state=function(_db8){_db8=(typeof _db8=="object")?_db8:{};if(typeof _db8.allowTerritories!="boolean"){_db8.allowTerritories=true;}if(typeof _db8.allowMilitary!="boolean"){_db8.allowMilitary=true;}var _db9="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 _dba="AS|FM|GU|MH|MP|PW|PR|VI";var _dbb="AA|AE|AP";if(_db8.allowTerritories){_db9+="|"+_dba;}if(_db8.allowMilitary){_db9+="|"+_dbb;}return "("+_db9+")";};dojo.regexp.time=function(_dbc){dojo.deprecated("dojo.regexp.time","Use dojo.date.parse instead","0.5");_dbc=(typeof _dbc=="object")?_dbc:{};if(typeof _dbc.format=="undefined"){_dbc.format="h:mm:ss t";}if(typeof _dbc.amSymbol!="string"){_dbc.amSymbol="AM";}if(typeof _dbc.pmSymbol!="string"){_dbc.pmSymbol="PM";}var _dbd=function(_dbe){_dbe=_dbe.replace(/([.$?*!=:|{}\(\)\[\]\\\/^])/g,"\\$1");var amRE=_dbc.amSymbol.replace(/([.$?*!=:|{}\(\)\[\]\\\/^])/g,"\\$1");var pmRE=_dbc.pmSymbol.replace(/([.$?*!=:|{}\(\)\[\]\\\/^])/g,"\\$1");_dbe=_dbe.replace("hh","(0[1-9]|1[0-2])");_dbe=_dbe.replace("h","([1-9]|1[0-2])");_dbe=_dbe.replace("HH","([01][0-9]|2[0-3])");_dbe=_dbe.replace("H","([0-9]|1[0-9]|2[0-3])");_dbe=_dbe.replace("mm","([0-5][0-9])");_dbe=_dbe.replace("m","([1-5][0-9]|[0-9])");_dbe=_dbe.replace("ss","([0-5][0-9])");_dbe=_dbe.replace("s","([1-5][0-9]|[0-9])");_dbe=_dbe.replace("t","\\s?("+amRE+"|"+pmRE+")\\s?");return _dbe;};return dojo.regexp.buildGroupRE(_dbc.format,_dbd);};dojo.regexp.numberFormat=function(_dc1){_dc1=(typeof _dc1=="object")?_dc1:{};if(typeof _dc1.format=="undefined"){_dc1.format="###-###-####";}var _dc2=function(_dc3){_dc3=dojo.string.escapeRegExp(_dc3,"?");_dc3=_dc3.replace(/\?/g,"\\d?");_dc3=_dc3.replace(/#/g,"\\d");return _dc3;};return dojo.regexp.buildGroupRE(_dc1.format,_dc2);};dojo.regexp.buildGroupRE=function(a,re,_dc6){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("|"),_dc6);};dojo.regexp.group=function(_dc9,_dca){return "("+(_dca?"?:":"")+_dc9+")";};dojo.provide("dojo.validate.common");dojo.validate.isText=function(_dcb,_dcc){_dcc=(typeof _dcc=="object")?_dcc:{};if(/^\s*$/.test(_dcb)){return false;}if(typeof _dcc.length=="number"&&_dcc.length!=_dcb.length){return false;}if(typeof _dcc.minlength=="number"&&_dcc.minlength>_dcb.length){return false;}if(typeof _dcc.maxlength=="number"&&_dcc.maxlength<_dcb.length){return false;}return true;};dojo.validate.isInteger=function(_dcd,_dce){var re=new RegExp("^"+dojo.regexp.integer(_dce)+"$");return re.test(_dcd);};dojo.validate.isRealNumber=function(_dd0,_dd1){var re=new RegExp("^"+dojo.regexp.realNumber(_dd1)+"$");return re.test(_dd0);};dojo.validate.isCurrency=function(_dd3,_dd4){var re=new RegExp("^"+dojo.regexp.currency(_dd4)+"$");return re.test(_dd3);};dojo.validate.isInRange=function(_dd6,_dd7){_dd6=_dd6.replace(new RegExp(dojo.lang.has(_dd7,"separator")?_dd7.separator:",","g"),"");_dd6=_dd6.replace(dojo.lang.has(_dd7,"symbol")?_dd7.symbol:"$","");if(isNaN(_dd6)){return false;}_dd7=(typeof _dd7=="object")?_dd7:{};var max=(typeof _dd7.max=="number")?_dd7.max:Infinity;var min=(typeof _dd7.min=="number")?_dd7.min:-Infinity;var dec=(typeof _dd7.decimal=="string")?_dd7.decimal:".";var _ddb="[^"+dec+"\\deE+-]";_dd6=_dd6.replace(RegExp(_ddb,"g"),"");_dd6=_dd6.replace(/^([+-]?)(\D*)/,"$1");_dd6=_dd6.replace(/(\D*)$/,"");_ddb="(\\d)["+dec+"](\\d)";_dd6=_dd6.replace(RegExp(_ddb,"g"),"$1.$2");_dd6=Number(_dd6);if(_dd6<min||_dd6>max){return false;}return true;};dojo.validate.isNumberFormat=function(_ddc,_ddd){var re=new RegExp("^"+dojo.regexp.numberFormat(_ddd)+"$","i");return re.test(_ddc);};dojo.validate.isValidLuhn=function(_ddf){var sum,_de1,_de2;if(typeof _ddf!="string"){_ddf=String(_ddf);}_ddf=_ddf.replace(/[- ]/g,"");_de1=_ddf.length%2;sum=0;for(var i=0;i<_ddf.length;i++){_de2=parseInt(_ddf.charAt(i));if(i%2==_de1){_de2*=2;}if(_de2>9){_de2-=9;}sum+=_de2;}return !(sum%10);};dojo.provide("dojo.validate.web");dojo.validate.isIpAddress=function(_de4,_de5){var re=new RegExp("^"+dojo.regexp.ipAddress(_de5)+"$","i");return re.test(_de4);};dojo.validate.isUrl=function(_de7,_de8){var re=new RegExp("^"+dojo.regexp.url(_de8)+"$","i");return re.test(_de7);};dojo.validate.isEmailAddress=function(_dea,_deb){var re=new RegExp("^"+dojo.regexp.emailAddress(_deb)+"$","i");return re.test(_dea);};dojo.validate.isEmailAddressList=function(_ded,_dee){var re=new RegExp("^"+dojo.regexp.emailAddressList(_dee)+"$","i");return re.test(_ded);};dojo.validate.getEmailAddressList=function(_df0,_df1){if(!_df1){_df1={};}if(!_df1.listSeparator){_df1.listSeparator="\\s;,";}if(dojo.validate.isEmailAddressList(_df0,_df1)){return _df0.split(new RegExp("\\s*["+_df1.listSeparator+"]\\s*"));}return [];};dojo.provide("dojo.date.common");dojo.date.setDayOfYear=function(_df2,_df3){_df2.setMonth(0);_df2.setDate(_df3);return _df2;};dojo.date.getDayOfYear=function(_df4){var _df5=_df4.getFullYear();var _df6=new Date(_df5-1,11,31);return Math.floor((_df4.getTime()-_df6.getTime())/86400000);};dojo.date.setWeekOfYear=function(_df7,week,_df9){if(arguments.length==2){_df9=0;}dojo.unimplemented("dojo.date.setWeekOfYear");};dojo.date.getWeekOfYear=function(_dfa,_dfb){if(arguments.length==1){_dfb=0;}var _dfc=new Date(_dfa.getFullYear(),0,1);var day=_dfc.getDay();_dfc.setDate(_dfc.getDate()-day+_dfb-(day>_dfb?7:0));return Math.floor((_dfa.getTime()-_dfc.getTime())/604800000);};dojo.date.setIsoWeekOfYear=function(_dfe,week,_e00){if(arguments.length==2){_e00=1;}dojo.unimplemented("dojo.date.setIsoWeekOfYear");};dojo.date.getIsoWeekOfYear=function(_e01,_e02){if(arguments.length==1){_e02=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(_e03){var _e04=_e03.getMonth();var days=[31,28,31,30,31,30,31,31,30,31,30,31];if(_e04==1&&dojo.date.isLeapYear(_e03)){return 29;}else{return days[_e04];}};dojo.date.isLeapYear=function(_e06){var year=_e06.getFullYear();return (year%400==0)?true:(year%100==0)?false:(year%4==0)?true:false;};dojo.date.getTimezoneName=function(_e08){var str=_e08.toString();var tz="";var _e0b;var pos=str.indexOf("(");if(pos>-1){pos++;tz=str.substring(pos,str.indexOf(")"));}else{var pat=/([A-Z\/]+) \d{4}$/;if((_e0b=str.match(pat))){tz=_e0b[1];}else{str=_e08.toLocaleString();pat=/ ([A-Z\/]+)$/;if((_e0b=str.match(pat))){tz=_e0b[1];}}}return tz=="AM"||tz=="PM"?"":tz;};dojo.date.getOrdinal=function(_e0e){var date=_e0e.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(_e10,_e11,_e12){var dA=_e10;var dB=_e11||new Date();var now=new Date();with(dojo.date.compareTypes){var opt=_e12||(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,_e1a,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(_e1a){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 _e1e=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;_e1e=(incr>0)?((incr-5)/5):((incr+5)/5);}else{days=mod;_e1e=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*_e1e)+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,_e26){if(typeof dtA=="number"){dtA=new Date(dtA);}if(typeof dtB=="number"){dtB=new Date(dtB);}var _e27=dtB.getFullYear()-dtA.getFullYear();var _e28=(dtB.getMonth()-dtA.getMonth())+(_e27*12);var _e29=dtB.getTime()-dtA.getTime();var _e2a=_e29/1000;var _e2b=_e2a/60;var _e2c=_e2b/60;var _e2d=_e2c/24;var _e2e=_e2d/7;var _e2f=0;with(dojo.date.dateParts){switch(_e26){case YEAR: _e2f=_e27;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+=(_e27*4);_e2f=qB-qA;break;case MONTH: _e2f=_e28;break;case WEEK: _e2f=parseInt(_e2e);break;case DAY: _e2f=_e2d;break;case WEEKDAY: var days=Math.round(_e2d);var _e35=parseInt(days/7);var mod=days%7;if(mod==0){days=_e35*5;}else{var adj=0;var aDay=dtA.getDay();var bDay=dtB.getDay();_e35=parseInt(days/7);mod=days%7;var _e3a=new Date(dtA);_e3a.setDate(_e3a.getDate()+(_e35*7));var _e3b=_e3a.getDay();if(_e2d>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 (_e3b+mod)>5: adj=-2;break;default: break;}}else{if(_e2d<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 (_e3b+mod)<0: adj=2;break;default: break;}}}days+=adj;days-=(_e35*2);}_e2f=days;break;case HOUR: _e2f=_e2c;break;case MINUTE: _e2f=_e2b;break;case SECOND: _e2f=_e2a;break;case MILLISECOND: _e2f=_e29;break;default: break;}}return Math.round(_e2f);};dojo.provide("dojo.date.supplemental");dojo.date.getFirstDayOfWeek=function(_e3c){var _e3d={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};_e3c=dojo.hostenv.normalizeLocale(_e3c);var _e3e=_e3c.split("-")[1];var dow=_e3d[_e3e];return (typeof dow=="undefined")?1:dow;};dojo.date.getWeekend=function(_e40){var _e41={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 _e42={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};_e40=dojo.hostenv.normalizeLocale(_e40);var _e43=_e40.split("-")[1];var _e44=_e41[_e43];var end=_e42[_e43];if(typeof _e44=="undefined"){_e44=6;}if(typeof end=="undefined"){end=0;}return {start:_e44,end:end};};dojo.date.isWeekend=function(_e46,_e47){var _e48=dojo.date.getWeekend(_e47);var day=(_e46||new Date()).getDay();if(_e48.end<_e48.start){_e48.end+=7;if(day<_e48.start){day+=7;}}return day>=_e48.start&&day<=_e48.end;};dojo.provide("dojo.date.format");(function(){dojo.date.format=function(_e4a,_e4b){if(typeof _e4b=="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(_e4a,_e4b);}function formatPattern(_e4c,_e4d){return _e4d.replace(/([a-z])\1*/ig,function(_e4e){var s;var c=_e4e.charAt(0);var l=_e4e.length;var pad;var _e53=["abbr","wide","narrow"];switch(c){case "G": if(l>3){dojo.unimplemented("Era format not implemented");}s=_e54.eras[_e4c.getFullYear()<0?1:0];break;case "y": s=_e4c.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((_e4c.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=_e4c.getMonth();var _e56;switch(l){case 1: case 2: s=m+1;pad=true;break;case 3: case 4: case 5: _e56=_e53[l-3];break;}if(_e56){var type=(c=="L")?"standalone":"format";var prop=["months",type,_e56].join("-");s=_e54[prop][m];}break;case "w": var _e59=0;s=dojo.date.getWeekOfYear(_e4c,_e59);pad=true;break;case "d": s=_e4c.getDate();pad=true;break;case "D": s=dojo.date.getDayOfYear(_e4c);pad=true;break;case "E": case "e": case "c": var d=_e4c.getDay();var _e56;switch(l){case 1: case 2: if(c=="e"){var _e5b=dojo.date.getFirstDayOfWeek(_e4b.locale);d=(d-_e5b+7)%7;}if(c!="c"){s=d+1;pad=true;break;}case 3: case 4: case 5: _e56=_e53[l-3];break;}if(_e56){var type=(c=="c")?"standalone":"format";var prop=["days",type,_e56].join("-");s=_e54[prop][d];}break;case "a": var _e5c=(_e4c.getHours()<12)?"am":"pm";s=_e54[_e5c];break;case "h": case "H": case "K": case "k": var h=_e4c.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=_e4c.getMinutes();pad=true;break;case "s": s=_e4c.getSeconds();pad=true;break;case "S": s=Math.round(_e4c.getMilliseconds()*Math.pow(10,l-3));break;case "v": case "z": s=dojo.date.getTimezoneName(_e4c);if(s){break;}l=4;case "Z": var _e5e=_e4c.getTimezoneOffset();var tz=[(_e5e<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_e5e)/60),2),dojo.string.pad(Math.abs(_e5e)%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: "+_e4d);}if(pad){s=dojo.string.pad(s,l);}return s;});}_e4b=_e4b||{};var _e60=dojo.hostenv.normalizeLocale(_e4b.locale);var _e61=_e4b.formatLength||"short";var _e54=dojo.date._getGregorianBundle(_e60);var str=[];var _e63=dojo.lang.curry(this,formatPattern,_e4a);if(_e4b.selector=="yearOnly"){var year=_e4a.getFullYear();if(_e60.match(/^zh|^ja/)){year+="\u5e74";}return year;}if(_e4b.selector!="timeOnly"){var _e65=_e4b.datePattern||_e54["dateFormat-"+_e61];if(_e65){str.push(_processPattern(_e65,_e63));}}if(_e4b.selector!="dateOnly"){var _e66=_e4b.timePattern||_e54["timeFormat-"+_e61];if(_e66){str.push(_processPattern(_e66,_e63));}}var _e67=str.join(" ");return _e67;};dojo.date.parse=function(_e68,_e69){_e69=_e69||{};var _e6a=dojo.hostenv.normalizeLocale(_e69.locale);var info=dojo.date._getGregorianBundle(_e6a);var _e6c=_e69.formatLength||"full";if(!_e69.selector){_e69.selector="dateOnly";}var _e6d=_e69.datePattern||info["dateFormat-"+_e6c];var _e6e=_e69.timePattern||info["timeFormat-"+_e6c];var _e6f;if(_e69.selector=="dateOnly"){_e6f=_e6d;}else{if(_e69.selector=="timeOnly"){_e6f=_e6e;}else{if(_e69.selector=="dateTime"){_e6f=_e6d+" "+_e6e;}else{var msg="dojo.date.parse: Unknown selector param passed: '"+_e69.selector+"'.";msg+=" Defaulting to date pattern.";dojo.debug(msg);_e6f=_e6d;}}}var _e71=[];var _e72=_processPattern(_e6f,dojo.lang.curry(this,_buildDateTimeRE,_e71,info,_e69));var _e73=new RegExp("^"+_e72+"$");var _e74=_e73.exec(_e68);if(!_e74){return null;}var _e75=["abbr","wide","narrow"];var _e76=new Date(1972,0);var _e77={};for(var i=1;i<_e74.length;i++){var grp=_e71[i-1];var l=grp.length;var v=_e74[i];switch(grp.charAt(0)){case "y": if(l!=2){_e76.setFullYear(v);_e77.year=v;}else{if(v<100){v=Number(v);var year=""+new Date().getFullYear();var _e7d=year.substring(0,2)*100;var _e7e=Number(year.substring(2,4));var _e7f=Math.min(_e7e+20,99);var num=(v<_e7f)?_e7d+v:_e7d-100+v;_e76.setFullYear(num);_e77.year=num;}else{if(_e69.strict){return null;}_e76.setFullYear(v);_e77.year=v;}}break;case "M": if(l>2){if(!_e69.strict){v=v.replace(/\./g,"");v=v.toLowerCase();}var _e81=info["months-format-"+_e75[l-3]].concat();for(var j=0;j<_e81.length;j++){if(!_e69.strict){_e81[j]=_e81[j].toLowerCase();}if(v==_e81[j]){_e76.setMonth(j);_e77.month=j;break;}}if(j==_e81.length){dojo.debug("dojo.date.parse: Could not parse month name: '"+v+"'.");return null;}}else{_e76.setMonth(v-1);_e77.month=v-1;}break;case "E": case "e": if(!_e69.strict){v=v.toLowerCase();}var days=info["days-format-"+_e75[l-3]].concat();for(var j=0;j<days.length;j++){if(!_e69.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": _e76.setDate(v);_e77.date=v;break;case "a": var am=_e69.am||info.am;var pm=_e69.pm||info.pm;if(!_e69.strict){v=v.replace(/\./g,"").toLowerCase();am=am.replace(/\./g,"").toLowerCase();pm=pm.replace(/\./g,"").toLowerCase();}if(_e69.strict&&v!=am&&v!=pm){dojo.debug("dojo.date.parse: Could not parse am/pm part.");return null;}var _e86=_e76.getHours();if(v==pm&&_e86<12){_e76.setHours(_e86+12);}else{if(v==am&&_e86==12){_e76.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;}_e76.setHours(v);break;case "m": _e76.setMinutes(v);break;case "s": _e76.setSeconds(v);break;case "S": _e76.setMilliseconds(v);break;default: dojo.unimplemented("dojo.date.parse: unsupported pattern char="+grp.charAt(0));}}if(_e77.year&&_e76.getFullYear()!=_e77.year){dojo.debug("Parsed year: '"+_e76.getFullYear()+"' did not match input year: '"+_e77.year+"'.");return null;}if(_e77.month&&_e76.getMonth()!=_e77.month){dojo.debug("Parsed month: '"+_e76.getMonth()+"' did not match input month: '"+_e77.month+"'.");return null;}if(_e77.date&&_e76.getDate()!=_e77.date){dojo.debug("Parsed day of month: '"+_e76.getDate()+"' did not match input day of month: '"+_e77.date+"'.");return null;}return _e76;};function _processPattern(_e87,_e88,_e89,_e8a){var _e8b=function(x){return x;};_e88=_e88||_e8b;_e89=_e89||_e8b;_e8a=_e8a||_e8b;var _e8d=_e87.match(/(''|[^'])+/g);var _e8e=false;for(var i=0;i<_e8d.length;i++){if(!_e8d[i]){_e8d[i]="";}else{_e8d[i]=(_e8e?_e89:_e88)(_e8d[i]);_e8e=!_e8e;}}return _e8a(_e8d.join(""));}function _buildDateTimeRE(_e90,info,_e92,_e93){return _e93.replace(/([a-z])\1*/ig,function(_e94){var s;var c=_e94.charAt(0);var l=_e94.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=_e92.am||info.am||"AM";var pm=_e92.pm||info.pm||"PM";if(_e92.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="+_e93);}if(_e90){_e90.push(_e94);}return "\\s*("+s+")\\s*";});}})();dojo.date.strftime=function(_e9a,_e9b,_e9c){var _e9d=null;function _(s,n){return dojo.string.pad(s,n||2,_e9d||"0");}var info=dojo.date._getGregorianBundle(_e9c);function $(_ea1){switch(_ea1){case "a": return dojo.date.getDayShortName(_e9a,_e9c);case "A": return dojo.date.getDayName(_e9a,_e9c);case "b": case "h": return dojo.date.getMonthShortName(_e9a,_e9c);case "B": return dojo.date.getMonthName(_e9a,_e9c);case "c": return dojo.date.format(_e9a,{locale:_e9c});case "C": return _(Math.floor(_e9a.getFullYear()/100));case "d": return _(_e9a.getDate());case "D": return $("m")+"/"+$("d")+"/"+$("y");case "e": if(_e9d==null){_e9d=" ";}return _(_e9a.getDate());case "f": if(_e9d==null){_e9d=" ";}return _(_e9a.getMonth()+1);case "g": break;case "G": dojo.unimplemented("unimplemented modifier 'G'");break;case "F": return $("Y")+"-"+$("m")+"-"+$("d");case "H": return _(_e9a.getHours());case "I": return _(_e9a.getHours()%12||12);case "j": return _(dojo.date.getDayOfYear(_e9a),3);case "k": if(_e9d==null){_e9d=" ";}return _(_e9a.getHours());case "l": if(_e9d==null){_e9d=" ";}return _(_e9a.getHours()%12||12);case "m": return _(_e9a.getMonth()+1);case "M": return _(_e9a.getMinutes());case "n": return "\n";case "p": return info[_e9a.getHours()<12?"am":"pm"];case "r": return $("I")+":"+$("M")+":"+$("S")+" "+$("p");case "R": return $("H")+":"+$("M");case "S": return _(_e9a.getSeconds());case "t": return "\t";case "T": return $("H")+":"+$("M")+":"+$("S");case "u": return String(_e9a.getDay()||7);case "U": return _(dojo.date.getWeekOfYear(_e9a));case "V": return _(dojo.date.getIsoWeekOfYear(_e9a));case "W": return _(dojo.date.getWeekOfYear(_e9a,1));case "w": return String(_e9a.getDay());case "x": return dojo.date.format(_e9a,{selector:"dateOnly",locale:_e9c});case "X": return dojo.date.format(_e9a,{selector:"timeOnly",locale:_e9c});case "y": return _(_e9a.getFullYear()%100);case "Y": return String(_e9a.getFullYear());case "z": var _ea2=_e9a.getTimezoneOffset();return (_ea2>0?"-":"+")+_(Math.floor(Math.abs(_ea2)/60))+":"+_(Math.abs(_ea2)%60);case "Z": return dojo.date.getTimezoneName(_e9a);case "%": return "%";}}var _ea3="";var i=0;var _ea5=0;var _ea6=null;while((_ea5=_e9b.indexOf("%",i))!=-1){_ea3+=_e9b.substring(i,_ea5++);switch(_e9b.charAt(_ea5++)){case "_": _e9d=" ";break;case "-": _e9d="";break;case "0": _e9d="0";break;case "^": _ea6="upper";break;case "*": _ea6="lower";break;case "#": _ea6="swap";break;default: _e9d=null;_ea5--;break;}var _ea7=$(_e9b.charAt(_ea5++));switch(_ea6){case "upper": _ea7=_ea7.toUpperCase();break;case "lower": _ea7=_ea7.toLowerCase();break;case "swap": var _ea8=_ea7.toLowerCase();var _ea9="";var j=0;var ch="";while(j<_ea7.length){ch=_ea7.charAt(j);_ea9+=(ch==_ea8.charAt(j))?ch.toUpperCase():ch.toLowerCase();j++;}_ea7=_ea9;break;default: break;}_ea6=null;_ea3+=_ea7;i=_ea5;}_ea3+=_e9b.substring(i);return _ea3;};(function(){var _eac=[];dojo.date.addCustomFormats=function(_ead,_eae){_eac.push({pkg:_ead,name:_eae});};dojo.date._getGregorianBundle=function(_eaf){var _eb0={};dojo.lang.forEach(_eac,function(desc){var _eb2=dojo.i18n.getLocalization(desc.pkg,desc.name,_eaf);_eb0=dojo.lang.mixin(_eb0,_eb2);},this);return _eb0;};})();dojo.date.addCustomFormats("dojo.i18n.calendar","gregorian");dojo.date.addCustomFormats("dojo.i18n.calendar","gregorianExtras");dojo.date.getNames=function(item,type,use,_eb6){var _eb7;var _eb8=dojo.date._getGregorianBundle(_eb6);var _eb9=[item,use,type];if(use=="standAlone"){_eb7=_eb8[_eb9.join("-")];}_eb9[1]="format";return (_eb7||_eb8[_eb9.join("-")]).concat();};dojo.date.getDayName=function(_eba,_ebb){return dojo.date.getNames("days","wide","format",_ebb)[_eba.getDay()];};dojo.date.getDayShortName=function(_ebc,_ebd){return dojo.date.getNames("days","abbr","format",_ebd)[_ebc.getDay()];};dojo.date.getMonthName=function(_ebe,_ebf){return dojo.date.getNames("months","wide","format",_ebf)[_ebe.getMonth()];};dojo.date.getMonthShortName=function(_ec0,_ec1){return dojo.date.getNames("months","abbr","format",_ec1)[_ec0.getMonth()];};dojo.date.toRelativeString=function(_ec2){var now=new Date();var diff=(now-_ec2)/1000;var end=" ago";var _ec6=false;if(diff<0){_ec6=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 _ec6?"Tomorrow":"Yesterday";}else{return diff+" days"+end;}}return dojo.date.format(_ec2);};dojo.date.toSql=function(_ec7,_ec8){return dojo.date.strftime(_ec7,"%F"+!_ec8?" %T":"");};dojo.date.fromSql=function(_ec9){var _eca=_ec9.split(/[\- :]/g);while(_eca.length<6){_eca.push(0);}return new Date(_eca[0],(parseInt(_eca[1],10)-1),_eca[2],_eca[3],_eca[4],_eca[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=\"${this._NLS.yourAccount.savedSearches.delete}\" href=\"\" class=\"Delete\"><span>${this._NLS.shared.delete}</span></a>\r\n\t    <a dojoAttachEvent=\"onClick:editClick\" title=\"${this._NLS.yourAccount.savedSearches.edit}\" href=\"\" class=\"Edit\"><span>${this._NLS.shared.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>${this._NLS.yourAccount.savedSearches.searchName}:</b> \r\n\t\t<input dojoAttachPoint=\"searchNameInput\" type=\"text\" value=\"\" />\r\n\t</p>\r\n    <p style=\"margin:5px;\">\r\n\t    <b>${this._NLS.yourAccount.savedSearches.emailUpdates}:</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>${this._NLS.yourAccount.savedSearches.created}</b> <span dojoAttachPoint=\"createDate\"></span> <span dojoAttachPoint=\"updateDateHolder\" style=\"margin-left:12px;\"><b>${this._NLS.yourAccount.savedSearches.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=\"\">${this._NLS.shared.save}</a></div>\r\n        <div class=\"Disableable Button Right\"><a dojoAttachEvent=\"onclick:cancelClick\" href=\"\">${this._NLS.shared.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,_NLS:null,postMixInProperties:function(){this._NLS=wtl.resources;},fillInTemplate:function(){if(this.search){this.HomeDeliveryID=this.search.HomeDeliveryID;this.createDate.innerHTML=dojo.date.format(this.search.CreateDate,{selector:"dateOnly"});this.updateDate.innerHTML=dojo.date.format(this.search.UpdateDate,{selector:"dateOnly"});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"});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 _ed2={guestID:this.guest.GuestID,homeDeliveryID:this.search.HomeDeliveryID,actionType:this.actionType.DELETESAVEDSEARCH};this._guestHandlerCall(_ed2,dojo.lang.hitch(this,"_onDelete"));}},_validDelete:function(){if(this._xhr){this.showError(this._NLS.errorMessages.xhr);return false;}return confirm(this._NLS.yourAccount.savedSearches.confirm);},_onDelete:function(type,obj,_ed5){this._xhr=null;if(obj&&obj.Success){if(dojo.lang.isFunction(this.onDeleteCallBack)){this.onDeleteCallBack(this.search);}}else{this.showError(this._NLS.errorMessages.general);}},_onBindError:function(){this.showError(this._NLS.errorMessages.general);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(this._NLS.yourAccount.savedSearches.noName);return false;}return true;},saveSearch:function(_edb,_edc,_edd){},updateSearch:function(_ede){this._swapMode();this.search=_ede;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(_ee3){},_guestHandlerCall:function(_ee4,_ee5){this._xhr=dojo.io.bind({url:wtl.util.urlAppend(this.guestHandler,"rand="+(new Date()).getTime()),method:"post",content:_ee4,load:_ee5,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\"><p>${this._NLS.yourAccount.savedSearches.noSearches}</p></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:null,searchesContainer:null,searchName:null,notificationTypes:null,noSearchesContainer:null,_searches:[],_prevSearchID:-1,_query:true,_xhr:null,_NLS:null,_searchNameDefault:"Name your search",postMixInProperties:function(){this._NLS=wtl.resources;this.frequencies=this._NLS.shared.emailFrequency;},fillInTemplate:function(){this._getSearches();},postCreate:function(){this._searchNameDefault=dojo.string.trim(this.searchName.value);this._disableButtonSelections();},_disableButtonSelections:function(){var _ee6=dojo.html.getElementsByClass("Disableable",this.domNode,"div");for(var i=0;i<_ee6.length;i++){dojo.html.disableSelection(_ee6[i]);}},refreshGuest:function(_ee8){this._query=true;this.guest=_ee8;},_getSearches:function(){if(this.guest){var _ee9={guestID:this.guest.GuestID,actionType:this.actionType.GETSAVEDSEARCHES};this._guestHandlerCall(_ee9,dojo.lang.hitch(this,"_onGetSearches"));}},_onGetSearches:function(type,obj,_eec){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(_eee){var div=document.createElement("div");this.searchesContainer.appendChild(div);var _ef0={widgetId:"SavedSearch_"+_eee.HomeDeliveryID,currentDeployment:this.currentDeployment,notificationTypes:this.notificationTypes,guest:this.guest,search:_eee,guestHandler:this.guestHandler,actionType:this.actionType,frequencies:this.frequencies,onDeleteCallBack:dojo.lang.hitch(this,"_onDeleteSearch")};var w=dojo.widget.createWidget("wtl:SavedSearch",_ef0,div);dojo.event.connect(w,"rerunSearch",this,"_onSearchRun");dojo.event.connect(w,"saveSearch",this,"saveSearch");dojo.event.connect(w,"showError",this,"_showError");},addSearch:function(_ef2){this.searchName.value=this._searchNameDefault;this.notificationTypes.selectedIndex=0;this._showSuccess(this._NLS.yourAccount.savedSearches.newSearch);this._searches.push(_ef2);this._checkDisplay();this._addSearch(_ef2);},updateSearch:function(_ef3){if(_ef3){var w=dojo.widget.byId("SavedSearch_"+_ef3.HomeDeliveryID);if(w){w.updateSearch(_ef3);}}},_guestHandlerCall:function(_ef5,_ef6){this._xhr=dojo.io.bind({url:wtl.util.urlAppend(this.guestHandler,"rand="+(new Date()).getTime()),method:"post",content:_ef5,load:_ef6,error:dojo.lang.hitch(this,"_onBindError"),mimetype:"text/json",transport:"XMLHTTPTransport"});},_onBindError:function(){this._showError(this._NLS.errorMessages.general);if(this._xhr){this._xhr.abort();this._xhr=null;}},_onDeleteSearch:function(_ef7){if(_ef7){var w=dojo.widget.byId("SavedSearch_"+_ef7.HomeDeliveryID);if(w){w.destroy();}for(var i=0;i<this._searches.length;i++){if(_ef7.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 _efa=dojo.html.getMarginBox(this.parentPanel).height;var _efb=dojo.html.getMarginBox(this.domNode).height;var _efc=dojo.html.getMarginBox(this.searchesContainer).height;var h=_efa-(_efb-_efc);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(_f03,_f04,_f05){},_onSearchRun:function(_f06){this._currentSearchID=_f06.HomeDeliveryID;this.closeOtherSearches();var _f07=dojo.widget.manager.getWidgetById("SavedSearch_"+this._currentSearchID);if(_f07){dojo.html.removeClass(_f07.domNode,"SavedSearchHighlight");dojo.html.addClass(_f07.domNode,"SavedSearchSelected");}this.rerunSearch(_f06);this._prevSearchID=_f06.HomeDeliveryID;},closeSearch:function(){if(this._prevSearchID>-1){var w=dojo.widget.byId("SavedSearch_"+this._prevSearchID);if(w){w.close();}}},closeOtherSearches:function(){var _f09=dojo.widget.manager.getWidgetsByType("SavedSearch");for(var j in _f09){var w=_f09[j];if(w.widgetId!=("SavedSearch_"+this._currentSearchID)){w.close();}}},rerunSearch:function(_f0c){},_validSave:function(){var s=dojo.string.trim(this.searchName.value);if(s.length==0||s.toLowerCase()==this._searchNameDefault.toLowerCase()){this.searchName.focus();this._showError(this._NLS.yourAccount.savedSearches.noName);return false;}s=this.notificationTypes[this.notificationTypes.selectedIndex].value;if(!s.length){this.notificationTypes.focus();this._showError(this._NLS.yourAccount.savedSearches.frequency);return false;}return true;},_showError:function(msg){this.showMessage(msg,true);},_showSuccess:function(msg){this.showMessage(msg,false);},showMessage:function(msg,_f11){},checkGuest:function(){if(this._query){this._getSearches();this._query=false;}},resetDisplay:function(){dojo.lang.forEach(dojo.widget.byType("SavedSearch"),function(_f12){_f12.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>${this._NLS.yourAccount.yourInfo.contactInfo}</p>\r\n\t<div class=\"Container\">\r\n\t\t<label class=\"Required\">${this._NLS.yourAccount.firstName}</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\">${this._NLS.yourAccount.lastName}</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\">${this._NLS.yourAccount.emailAddress}</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>${this._NLS.yourAccount.addr1}</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>${this._NLS.yourAccount.addr2}</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>${this._NLS.yourAccount.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>${this._NLS.yourAccount.provState}</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>${this._NLS.yourAccount.postal}</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>${this._NLS.yourAccount.phone1}</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>${this._NLS.yourAccount.phone2}</label>\r\n\t\t<select class=\"Phone\" dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"phone2Type\" style=\"width:60px\"></select>\r\n\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<label>${this._NLS.yourAccount.lang}</label>\r\n\t\t<select dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"lang\" style=\"width:160px\"></select>\r\n\t</div>\r\n    <p>${this._NLS.yourAccount.yourInfo.signInInfo}</p>\r\n\t<div class=\"Container\">\r\n\t    <label>${this._NLS.yourAccount.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\">${this._NLS.yourAccount.newPassword}</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\">${this._NLS.yourAccount.confirmPassword}</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\">${this._NLS.yourAccount.emailUpdates}</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=\"\">${this._NLS.shared.update}</a></div>\r\n\t\t<div class=\"Disableable Button\"><a dojoAttachEvent=\"onclick:deleteClick\" href=\"\">${this._NLS.shared.delete}</a></div>\r\n\t</div>\r\n\t<div class=\"RequiredLabel\">${this._NLS.yourAccount.required}</div>\r\n</div>\r\n",currentDeployment:{},guest:null,guestHandler:"",actionType:null,stateProvs:[],phoneCodes:[],langs:[],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,_NLS:null,postMixInProperties:function(){this._NLS=wtl.resources;},fillInTemplate:function(){if(this.state.options.length==0){var opt=document.createElement("option");opt.setAttribute("value","");opt.innerHTML="";this.state.appendChild(opt);var _f14=document.createElement("optgroup");_f14.setAttribute("label","Provinces");for(var i=0;i<this.stateProvs.Provinces.length;i++){opt=document.createElement("option");opt.setAttribute("value",this.stateProvs.Provinces[i].Code);opt.innerHTML=this.stateProvs.Provinces[i].Name;_f14.appendChild(opt);}var _f16=document.createElement("optgroup");_f16.setAttribute("label","States");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;_f16.appendChild(opt);}this.state.appendChild(_f14);this.state.appendChild(_f16);}wtl.util.buildPhoneList(this.phone1Type,this.phoneCodes);wtl.util.buildPhoneList(this.phone2Type,this.phoneCodes);if(this.langs.length>0){for(var i=0;i<this.langs.length;i++){var opt=document.createElement("option");opt.setAttribute("value",this.langs[i].value);opt.innerHTML=this.langs[i].name;this.lang.appendChild(opt);}}this._populateDisplay();},postCreate:function(){},_populateDisplay:function(){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;this._setSelectedIndex(this.lang,this.guest.PrefLang);}},refreshGuest:function(_f19){this._query=true;this.guest=_f19;},_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 _f1e=this._validSave();if(_f1e){var _f1f={guestID:this.guest.GuestID,actionType:this.actionType.UPDATEGUEST,updates:dojo.json.serialize(_f1e)};this._guestHandlerCall(_f1f,dojo.lang.hitch(this,"_onSave"));}},onKeyPress:function(evt){if(evt.keyCode==13){this.saveClick(evt);}},_validSave:function(){if(this._xhr){this._showError(this._NLS.errorMessages.xhr);return false;}var _f21={};if(dojo.string.trim(this.firstName.value).length==0){this.firstName.focus();this._showError(this._NLS.yourAccount.error.firstName);return false;}else{_f21.FirstName=this.firstName.value;}if(dojo.string.trim(this.lastName.value).length==0){this.lastName.focus();this._showError(this._NLS.yourAccount.error.lastName);return false;}else{_f21.LastName=this.lastName.value;}if(dojo.string.trim(this.emailAddress.value).length==0){this.emailAddress.focus();this._showError(this._NLS.yourAccount.error.emailEmpty);return false;}else{if(!dojo.validate.isEmailAddress(this.emailAddress.value)){this.emailAddress.focus();this._showError(this._NLS.yourAccount.error.emailInvalid);return false;}else{_f21.EmailAddress=this.emailAddress.value;}}_f21.Address1=this.address1.value;_f21.City=this.city.value;_f21.Address2=this.address2.value;_f21.State=this.state[this.state.selectedIndex].value;_f21.PostalCode=this.postalCode.value;_f21.Phone1Code=this.phone1Type[this.phone1Type.selectedIndex].value;_f21.Phone2Code=this.phone2Type[this.phone2Type.selectedIndex].value;_f21.Phone1Number=this.phone1Number.value;_f21.Phone2Number=this.phone2Number.value;_f21.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(this._NLS.yourAccount.error.passwordSpaces);return false;}if(this.password1.value.length<7){this.password1.focus();this._showError(this._NLS.yourAccount.error.passwordLength);return false;}if(this.password1.value!=this.password2.value){this.password2.value="";this.password2.focus();this._showError(this._NLS.yourAccount.error.passwordMatch);return false;}_f21.UpdatePassword=true;_f21.Password=p1;}else{_f21.UpdatePassword=false;}return _f21;},deleteClick:function(evt){dojo.event.browser.stopEvent(evt);if(this._validDelete()){var _f25={guestID:this.guest.GuestID,actionType:this.actionType.DELETEGUEST};this._guestHandlerCall(_f25,dojo.lang.hitch(this,"_onDelete"));}},_validDelete:function(){if(this._xhr){this._showError(this._NLS.errorMessages.xhr);return false;}return confirm(this._NLS.yourAccount.confirm);},_guestHandlerCall:function(_f26,_f27){this._xhr=dojo.io.bind({url:wtl.util.urlAppend(this.guestHandler,"rand="+(new Date()).getTime()),method:"post",content:_f26,load:_f27,error:dojo.lang.hitch(this,"_onBindError"),mimetype:"text/json",transport:"XMLHTTPTransport"});},_onBindError:function(){this._showError(this._NLS.errorMessages.general);if(this._xhr){this._xhr.abort();this._xhr=null;}},_onSave:function(type,obj,_f2a){this._xhr=null;this.password1.value="";this.password2.value="";if(obj&&obj.Success&&obj.Guest){this.onSave(obj.Guest);this._showSuccess(this._NLS.yourAccount.attaBoy);}else{this._showError(this._NLS.errorMessages.general);}},onSave:function(_f2b){this.guest=_f2b;},_onDelete:function(type,obj,_f2e){this._xhr=null;if(obj&&obj.Success){this.onDelete();}else{this._showError(this._NLS.errorMessages.general);}},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,_f32){},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=\"${this._NLS.yourAccount.savedProperties.delete}\" href=\"\" class=\"Delete\"><span></span></a>\r\n        <a dojoAttachPoint=\"alertButton\" dojoAttachEvent=\"onClick:_showAlerts\" title=\"${this._NLS.yourAccount.savedProperties.showAlerts}\" 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\">${this._NLS.shared.compare}</label>\r\n\t        <a href=\"\" dojoAttachEvent=\"onClick:brochureClick\" dojoAttachPoint=\"brochureButton\" class=\"PrintBrochure\">${this._NLS.shared.printBrochures}</a>\r\n\t        <a href=\"#\" class=\"NotesLink\" dojoAttachPoint=\"notesLink\">${this._NLS.yourAccount.savedProperties.notes}</a>\r\n\t        <div class=\"NotePreview\" dojoAttachPoint=\"noteHolder\">${this._NLS.yourAccount.savedProperties.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=\"${this._NLS.shared.close}\" dojoattachevent=\"onClick:_showAlerts\"><span>${this._NLS.shared.close}</span></a>\t\r\n            <a class=\"Clear\" href=\"\" title=\"${this._NLS.yourAccount.savedProperties.clearAlerts}\" dojoattachevent=\"onClick:_clearAlerts\"><span dojoAttachPoint=\"clearAlertLabel\"></span></a>\r\n            <div dojoAttachPoint=\"alertDetail\"></div>  \r\n\t    </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,_NLS:null,postMixInProperties:function(){this._NLS=wtl.resources;},fillInTemplate:function(){},postCreate:function(){if(this.listing){this.propertyStatus.className=this.listing.ListingStatusCode+"Status";var _f33=parseInt(dojo.html.getComputedStyle(this.photo,"width"));if(this.listing.Images){if(this.listing.MissingImage){this.photo.src="/ResizeImage.c?Width="+_f33+"&Image="+this.listing.MissingImage+"&u="+this.listing.PicTicks+"&Make4x3=true";}else{this.photo.src="/ResizeImage.c?Width="+_f33+"&Image="+this.listing.Prefix+"320px/"+this.listing.Images[0].file+"&u="+this.listing.PicTicks+"&Make4x3=true";}this.photo.src+="&langpref="+djConfig.locale;}else{var s=this.listing.ThumbImage;var p=s.indexOf("?");if(p!=-1&&s.length>p+1){p++;var _f36=s.substring(p).split("&");for(var i=0;i<_f36.length;i++){var part=_f36[i].toLowerCase();if(part.indexOf("width=")!=-1||part.indexOf("max=")!=-1){_f36[i]="Width="+_f33;}}this.photo.src=s.substring(0,p)+_f36.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;if(this.listing.Updates){var _f3a=this.listing.Updates.split("|");var _f3b=0;for(var i=0;i<_f3a.length;i++){if(_f3a[i].length>0){this.alertDetail.innerHTML+=_f3a[i]+"<br />";_f3b++;}}this.clearAlertLabel.innerHTML=(_f3b>1)?this._NLS.yourAccount.savedProperties.clearAlerts:this._NLS.yourAccount.savedProperties.clearAlert;}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,_f40){if(data&&data.success){dojo.html.toggleDisplay(this.alertHolder);dojo.html.setDisplay(this.alertButton,false);this._showSuccess(this._NLS.yourAccount.savedProperties.clearConfirm);}},postAttachExternalEvents:function(){this.onDisplayCompareable(this.listing);},_thumbClick:function(evt){dojo.event.browser.stopEvent(evt);this.onYourListingClick(this.listing);},onYourListingClick:function(_f42){},deleteClick:function(evt){dojo.event.browser.stopEvent(evt);if(this._validDelete()){var _f44={guestID:this.guest.GuestID,listingType:this.listingType,guestListingID:this.listing.GuestListingID,actionType:this.actionType.DELETELISTING};this._guestHandlerCall(_f44,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(_f48){dojo.html.setDisplay(this.noteHolder,_f48.length);},saveClick:function(_f49,_f4a,name){if(_f49!=_f4a){var _f4c={comments:_f49,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:_f4c,load:dojo.lang.hitch(this,"_onSave"),error:dojo.lang.hitch(this,"_onBindError"),mimetype:"text/json",transport:"XMLHTTPTransport"});this._onNoteChange(_f49);}},_onSave:function(type,obj,_f4f){},_onDelete:function(type,obj,_f52){this._xhr=null;if(obj&&obj.Success){this.onDelete(this.listing,this.listingType);}else{this._showError(this._NLS.errorMessages.general);}},onDelete:function(_f53,type){},_guestHandlerCall:function(_f55,_f56){this._xhr=dojo.io.bind({url:wtl.util.urlAppend(this.guestHandler,"rand="+(new Date()).getTime()),method:"post",content:_f55,load:_f56,error:dojo.lang.hitch(this,"_onBindError"),mimetype:"text/json",transport:"XMLHTTPTransport"});},_onBindError:function(){this._showError(this._NLS.errorMessages.general);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,_f5a){},_validDelete:function(){if(this._xhr){this._showError("Your action is currently being processed.");return false;}return confirm(this._NLS.yourAccount.savedProperties.confirm);},toggleCompare:function(_f5b,item){},onDisplayCompareable:function(item){},onCompareItemToggled:function(item,_f5f,_f60,_f61){if(wtl.util.listingsEqual(item,this.listing)){this.compareCheckbox.checked=_f5f;}this.compareCheckbox.disabled=!this.compareCheckbox.checked&&_f60;},onUpdateCompareableDisplay:function(item,_f63,_f64){if(wtl.util.listingsEqual(item,this.listing)){this.compareCheckbox.checked=_f63;}this.compareCheckbox.disabled=!this.compareCheckbox.checked&&_f64;}});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\">${this._NLS.yourAccount.savedProperties.noProperties}</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,_NLS:null,listingType:{FAVORITE:0,ALERT:1,RECOMMENDED:2},postMixInProperties:function(){this._NLS=wtl.resources;},fillInTemplate:function(){dojo.event.topic.subscribe("/comparePopupSaved",this,"_getListings");},postAttachExternalEvents:function(){this._getListings();},_toggleContainer:function(evt){dojo.event.browser.stopEvent(evt);var _f66=dojo.byId(evt.currentTarget.id+"Container");dojo.html.setDisplay(_f66,(_f66.style.display=="none")?true:false);},showLoading:function(){},hideLoading:function(){},_getListings:function(){this.showLoading();if(this.guest){var _f67={guestID:this.guest.GuestID,actionType:this.actionType.GETLISTINGS,imageWidth:this.imageWidth,resizeType:this.resizeType.WIDTH};this._guestHandlerCall(_f67,dojo.lang.hitch(this,"_onGetListings"));}},_onGetListings:function(type,obj,_f6a){this._xhr=null;this.resetDisplay();this.hideLoading();if(obj&&obj.Success){this._favorites=obj.Favorites;this.checkDisplay();var _f6b=obj.Favorites.length;for(var i=0;i<_f6b;i++){this._addListing(obj.Favorites[i],this.listingType.FAVORITE,i>0);}}else{this._showError(this._NLS.errorMessages.general);}},checkDisplay:function(){if(this._favorites.length>0){dojo.html.setDisplay(this.noPropertyContainer,false);}else{dojo.html.setDisplay(this.noPropertyContainer,true);}},_addListing:function(_f6d,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 _f71={widgetId:"Listing_"+type+"_"+wtl.util.composeIds(_f6d),currentDeployment:this.currentDeployment,listing:_f6d,listingType:type,guest:this.guest,guestHandler:this.guestHandler,actionType:this.actionType};var w=dojo.widget.createWidget("wtl:YourAccountListing",_f71,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(_f73){for(var i=0;i<this._favorites.length;i++){if(this._favorites[i].GuestListingID==_f73.GuestListingID){return true;}}return false;},refreshGuest:function(_f75){this._query=true;this.guest=_f75;},_guestHandlerCall:function(_f76,_f77){this._xhr=dojo.io.bind({url:wtl.util.urlAppend(this.guestHandler,"rand="+(new Date()).getTime()),method:"post",content:_f76,load:_f77,error:dojo.lang.hitch(this,"_onBindError"),mimetype:"text/json",transport:"XMLHTTPTransport"});},_onBindError:function(){this._showError(this._NLS.errorMessages.general);if(this._xhr){this._xhr.abort();this._xhr=null;}},_onDeleteListing:function(_f78,type){if(_f78){var w=dojo.widget.byId("Listing_"+type+"_"+wtl.util.composeIds(_f78));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],_f78)){arr.splice(i,1);break;}}this.checkDisplay();}},onSaveToHomeFile:function(_f7d){if(this._isAlreadySaved(_f7d)){return;}this._favorites.push(_f7d);this._addListing(_f7d,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(_f7e){dojo.event.disconnect(this,"onCompareItemToggled",_f7e,"onCompareItemToggled");dojo.event.disconnect(this,"onUpdateCompareableDisplay",_f7e,"onUpdateCompareableDisplay");wtl.util.disconnectAll(_f7e);_f7e.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,_f82){},toggleCompare:function(_f83,item){},onYourListingClick:function(item){},onDisplayCompareable:function(item){},onCompareItemToggled:function(item,_f88,_f89,_f8a){},onUpdateCompareableDisplay:function(item,_f8c,_f8d){}});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\">${this._NLS.yourAccount.heading}</p>\r\n\t<div class=\"Container\">\r\n\t    <label class=\"Required\">${this._NLS.yourAccount.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\">${this._NLS.yourAccount.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\">${this._NLS.yourAccount.confirmPassword}</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\">${this._NLS.yourAccount.emailAddress}</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\">${this._NLS.yourAccount.firstName}</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\">${this._NLS.yourAccount.lastName}</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>${this._NLS.yourAccount.addr1}</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>${this._NLS.yourAccount.addr2}</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>${this._NLS.yourAccount.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>${this._NLS.yourAccount.provState}</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>${this._NLS.yourAccount.postal}</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>${this._NLS.yourAccount.phone1}</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>${this._NLS.yourAccount.phone2}</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<label>${this._NLS.yourAccount.lang}</label>\r\n\t\t<select dojoAttachEvent=\"onKeyPress\" dojoAttachPoint=\"lang\" style=\"width:160px\"></select>\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\">${this._NLS.yourAccount.emailUpdates}</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=\"\">${this._NLS.yourAccount.register}</a></div>\r\n\t\t<div class=\"Disableable Button\"><a dojoAttachEvent=\"onclick:cancel\" href=\"\">${this._NLS.shared.cancel}</a></div>\r\n\t</div>\r\n    <div class=\"RequiredLabel\">${this._NLS.yourAccount.required}</div>\r\n</div>\r\n",currentDeployment:{},guest:null,guestHandler:"",registerHandler:"",actionType:null,stateProvs:[],phoneCodes:[],langs:[],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,_NLS:null,postMixInProperties:function(){this._NLS=wtl.resources;},fillInTemplate:function(){if(this.state.options.length==0){var opt=document.createElement("option");opt.setAttribute("value","");opt.innerHTML="";this.state.appendChild(opt);var _f8f=document.createElement("optgroup");_f8f.setAttribute("label","Provinces");for(var i=0;i<this.stateProvs.Provinces.length;i++){opt=document.createElement("option");opt.setAttribute("value",this.stateProvs.Provinces[i].Code);opt.innerHTML=this.stateProvs.Provinces[i].Name;_f8f.appendChild(opt);}var _f91=document.createElement("optgroup");_f91.setAttribute("label","States");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;_f91.appendChild(opt);}this.state.appendChild(_f8f);this.state.appendChild(_f91);}wtl.util.buildPhoneList(this.phone1Type,this.phoneCodes);wtl.util.buildPhoneList(this.phone2Type,this.phoneCodes);if(this.langs.length>0){for(var i=0;i<this.langs.length;i++){var opt=document.createElement("option");opt.setAttribute("value",this.langs[i].value);opt.innerHTML=this.langs[i].name;if(this.langs[i].value==djConfig.locale){opt.selected="true";}this.lang.appendChild(opt);}}},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 _f96=this._validSave();if(_f96){var _f97={values:dojo.json.serialize(_f96)};this._xhr=dojo.io.bind({url:wtl.util.urlAppend(this.registerHandler,"rand="+(new Date()).getTime()),method:"post",content:_f97,load:dojo.lang.hitch(this,"_onSave"),error:dojo.lang.hitch(this,"_onBindError"),mimetype:"text/json",transport:"XMLHTTPTransport"});}},_onBindError:function(){this._showError(this._NLS.errorMessages.general);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(this._NLS.errorMessages.xhr);return false;}var _f99={};if(dojo.string.trim(this.emailAddress.value).length==0){this.emailAddress.focus();this._showError(this._NLS.yourAccount.error.emailEmpty);return false;}else{if(!dojo.validate.isEmailAddress(this.emailAddress.value)){this.emailAddress.focus();this._showError(this._NLS.yourAccount.error.emailInvalid);return false;}else{_f99.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(this._NLS.yourAccount.error.passwordSpaces);return false;}if(p1.length<7){this.password1.focus();this._showError(this._NLS.yourAccount.error.passwordLength);return false;}if(p1!=p2){this.password2.value="";this.password2.focus();this._showError(this._NLS.yourAccount.error.passwordMatch);return false;}_f99.Password=p1;if(dojo.string.trim(this.firstName.value).length==0){this.firstName.focus();this._showError(this._NLS.yourAccount.error.firstName);return false;}else{_f99.FirstName=this.firstName.value;}if(dojo.string.trim(this.lastName.value).length==0){this.lastName.focus();this._showError(this._NLS.yourAccount.error.lastName);return false;}else{_f99.LastName=this.lastName.value;}_f99.UserName=this.username.value;_f99.Address1=this.address1.value;_f99.Address2=this.address2.value;_f99.City=this.city.value;_f99.State=this.state[this.state.selectedIndex].value;_f99.PostalCode=this.postalCode.value;_f99.Phone1Code=this.phone1Type[this.phone1Type.selectedIndex].value;_f99.Phone2Code=this.phone2Type[this.phone2Type.selectedIndex].value;_f99.Phone1Number=this.phone1Number.value;_f99.Phone2Number=this.phone2Number.value;_f99.SendEmail=this.sendEmailCheckbox.checked;_f99.PrefLang=this.lang[this.lang.selectedIndex].value;return _f99;},_onSave:function(type,obj,_f9e){this._xhr=null;if(obj&&obj.Success&&obj.Guest){this.onSave(obj.Guest);this.resetDisplay();if(typeof urchinTracker!="undefined"){urchinTracker("/goals/create-an-account-thanks.html");}}else{if(obj&&obj.Message){this._showError(obj.Message);}else{this._showError(this._NLS.errorMessages.general);}}},onSave:function(_f9f){this.guest=_f9f;},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,_fa3){},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\">${this._NLS.yourAccount.resetPassword.label}</p>\r\n\t<p>${this._NLS.yourAccount.resetPassword.desc}</p>\r\n\t\r\n\t<div class=\"Container\">\r\n\t    <label>${this._NLS.yourAccount.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>${this._NLS.yourAccount.emailAddress}</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=\"\">${this._NLS.yourAccount.submit}</a></div>\r\n\t    <div class=\"Disableable Button\"><a dojoAttachEvent=\"onclick:cancel\" href=\"\">${this._NLS.shared.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,_NLS:null,postMixInProperties:function(){this._NLS=wtl.resources;},saveClick:function(evt){dojo.event.browser.stopEvent(evt);var _fa6=this._validSave();if(_fa6){this._xhr=dojo.io.bind({url:wtl.util.urlAppend(this.resetPasswordHandler,"rand="+(new Date()).getTime()),method:"post",content:_fa6,load:dojo.lang.hitch(this,"_onSave"),error:dojo.lang.hitch(this,"_onBindError"),mimetype:"text/json",transport:"XMLHTTPTransport"});}},_onBindError:function(){this._showError(this._NLS.errorMessages.general);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(this._NLS.errorMessages.xhr);return false;}if(dojo.string.trim(this.userName.value).length==0){this.userName.focus();this._showError(this._NLS.yourAccount.error.username);return false;}if(dojo.string.trim(this.emailAddress.value).length==0){this.emailAddress.focus();this._showError(this._NLS.yourAccount.error.emailEmpty);return false;}else{if(!dojo.validate.isEmailAddress(this.emailAddress.value)){this.emailAddress.focus();this._showError(this._NLS.yourAccount.error.emailInvalid);return false;}}return {Username:this.userName.value,EmailAddress:this.emailAddress.value};},_onSave:function(type,obj,_faa){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(this._NLS.yourAccount.error.passwordUpdate);}}},onSave:function(_fab){},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,_faf){},cancel:function(evt){dojo.event.browser.stopEvent(evt);this.resetDisplay();},defaultFill:function(_fb1){this.userName.value=_fb1;}});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>${this._NLS.yourAccount.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>${this._NLS.yourAccount.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\">${this._NLS.shared.signIn}</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\">${this._NLS.yourAccount.autoSignIn}</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\">${this._NLS.yourAccount.forgotPasswordLink}</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>${this._NLS.yourAccount.registerText}</p>\r\n\t\t\t\t\t<div class=\"Disableable Button\"><a dojoAttachEvent=\"onclick:registerClick\" href=\"\">${this._NLS.yourAccount.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\">${this._NLS.yourAccount.aboutYourAccount}</p>\r\n\t\t\t\t${this._NLS.yourAccount.accountDetails}\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>${this._NLS.yourAccount.tabs.search}</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>${this._NLS.yourAccount.tabs.property}</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>${this._NLS.yourAccount.tabs.account}</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\">${this._NLS.wwmo.title}</div>\r\n\t\t    <div class=\"NoItems\" dojoAttachPoint=\"noWWMOContainer\">\r\n\t\t        <p>${this._NLS.wwmo.none}</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\">${this._NLS.contactInfo.emailMe}</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:"",defaultTabIndex:0,imageWidth:100,stateProvs:[],phoneCodes:[],langs:[],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,_NLS: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");}}this._NLS=wtl.resources;this.langs=this._NLS.supportedLangs;},fillInTemplate:function(){this.label=this._NLS.yourAccount.label;},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";},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,_fbd){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(this._NLS.yourAccount.error.noSignIn);}this.onLoginComplete();},onLoginComplete:function(){},_onLogout:function(type,obj,_fc0){this._xhr=null;dojo.html.setDisplay(this.loggedInPanel,false);this._showLoggedOutPanel();this.onLogout(this._guest);},saveSearch:function(_fc1,_fc2,_fc3){},rerunSearch:function(_fc4){},onLogin:function(_fc5){},onLogout:function(_fc6){},onTabClick:function(idx){},onDialogShow:function(){if(this.userNameInput){try{this.userNameInput.focus();}catch(x){dojo.debug(x);}}},_onTabClick:function(e){var idx=0;var _fca=dojo.html.getElementsByClass("Tab",this.tabContainer,"div");for(var i=0;i<_fca.length;i++){if(_fca[i]==e){idx=i;dojo.html.addClass(e,"Selected");}else{dojo.html.removeClass(_fca[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(_fd1){this._agent=_fd1;dojo.html.setDisplay(this.noWWMOContainer,false);dojo.html.setDisplay(this.wwmoContainer,true);var path=(_fd1.PicExists)?"/ResizeImage.c?Image=/Users/pic"+_fd1.WTLUserID+".jpg&Width=66&u="+_fd1.PicTicks+"&Make4x3=true&BG=ffffff":"/ResizeImage.c?Image=/Users/Default/agent_"+this.currentDeployment.brokerId+"_"+this.currentDeployment.teamId+"_320px.jpg&Width=66";path+="&langpref="+djConfig.locale;this.WWMOphoto.src=path;this.contactName.innerHTML=_fd1.FirstName+" "+_fd1.LastName;this.wwmoLink.innerHTML=wtl.util.substituteParams(this._NLS.wwmo.stopWWMO,[_fd1.FirstName]);},_WWMOClick:function(evt){dojo.event.browser.stopEvent(evt);this.WWMOClick(this._agent);},WWMOClick:function(_fd4){},updateWWMO:function(_fd5){this.openPane();this._loadWWMO(_fd5);this._resizeLoggedInPanel();},removeWWMOClick:function(evt){dojo.event.browser.stopEvent(evt);if(confirm(this._NLS.wwmo.confirm)){this.workWithMeOnline(false,0);}},workWithMeOnline:function(_fd7,id){},processWorkWithMe:function(_fd9){if(_fd9.WTLUserID==0){dojo.html.setDisplay(this.noWWMOContainer,true);dojo.html.setDisplay(this.wwmoContainer,false);}else{this._updatedAgent=true;this.updateWWMO(_fd9);}},_showSavedSearches:function(e){this._onTabClick(e);if(!this._savedSearchesWidget){var _fdb={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",_fdb);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 _fdd={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",_fdd);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 _fdf={currentDeployment:this.currentDeployment,guest:this._guest,guestHandler:this.guestHandler,actionType:this.actionType,stateProvs:this.stateProvs,phoneCodes:this.phoneCodes,langs:this.langs};this._yourInfoWidget=dojo.widget.createWidget("wtl:YourAccountYourInfo",_fdf);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 _fe0=dojo.html.getElementsByClass("Disableable",this.domNode,"div");for(var i=0;i<_fe0.length;i++){dojo.html.disableSelection(_fe0[i]);}},_attemptLogin:function(){if(this._validLogin){var _fe2={u:this.userNameInput.value,p:this.passwordInput.value,al:this.autoLoginCheckbox.checked,actionType:this.actionType.GETGUEST};this._guestHandlerCall(_fe2,dojo.lang.hitch(this,"_onLogin"));}},_guestHandlerCall:function(_fe3,_fe4){this._xhr=dojo.io.bind({url:wtl.util.urlAppend(this.guestHandler,"rand="+(new Date()).getTime()),method:"post",content:_fe3,load:_fe4,error:dojo.lang.hitch(this,"_onBindError"),mimetype:"text/json",transport:"XMLHTTPTransport"});},_onBindError:function(type,obj,_fe7){this._showError(this._NLS.errorMessages.general);if(this._xhr){this._xhr.abort();this._xhr=null;}},_validateLogin:function(){if(this._xhr){this._showError(this._NLS.errorMessages.xhr);return false;}if(dojo.string.trim(this.userNameInput.value).length==0){this._showError(this._NLS.yourAccount.error.username);this.userNameInput.focus();this._validLogin=false;return;}if(dojo.string.trim(this.passwordInput.value).length==0){this._showError(this._NLS.yourAccount.error.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 _fea=dojo.html.getMarginBox(this.loggedOutPanel).height+5;var _feb=dojo.html.getContentBox(this.additionalInfo).height-5;var _fec=dojo.html.getMarginBox(this._pane.containerNode).height+5;var h=_feb+(_fec-_fea);if(this.parent&&this.parent.containerNode){if(this._registerWidget&&this._registerWidget.domNode&&dojo.html.isDisplayed(this._registerWidget.domNode)&&_fea>_fec){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 _fee=dojo.html.getContentBox(this.tabContent).height;var _fef=dojo.html.getMarginBox(this._pane.containerNode).height+5;var _ff0=dojo.html.getMarginBox(this.loggedInPanel).height+5;var h=_fee+(_fef-_ff0);this.tabContent.style.height=(h<20?20:h)+"px";this.tabContent.scrollTop=0;}},_onDeleteAccount:function(){this._onLogout();},_onSaveAccount:function(_ff2){this._refreshGuest(_ff2);this.onLogin(this._guest);},_refreshGuest:function(_ff3){this._guest=_ff3;},onSaveSearch:function(_ff4){this._showSavedSearches(this.savedSearchesTab);this._savedSearchesWidget.closeSearch();},onUpdateSearch:function(_ff5){},_showError:function(msg){this._showMessage(msg,true);},_showSuccess:function(msg){this._showMessage(msg,false);},_showMessage:function(msg,_ff9){},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 _ffa={currentDeployment:this.currentDeployment,guestHandler:this.guestHandler,registerHandler:this.registerHandler,actionType:this.actionType,stateProvs:this.stateProvs,phoneCodes:this.phoneCodes,langs:this.langs};this._registerWidget=dojo.widget.createWidget("wtl:YourAccountRegister",_ffa,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 urchinTracker!="undefined"){urchinTracker("/goals/create-an-account.html");}},_hideRegister:function(){if(this._registerWidget){dojo.html.setDisplay(this._registerWidget.domNode,false);}},_showResetPassword:function(){if(!this._resetPasswordWidget){var _ffb={currentDeployment:this.currentDeployment,resetPasswordHandler:this.resetPasswordHandler,actionType:this.actionType};this._resetPasswordWidget=dojo.widget.createWidget("wtl:YourAccountPassword",_ffb,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(_ffc){this._refreshGuest(_ffc);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(_ffe){this.openPane();this._showLoggedInPanel();this._showYourListings(this.yourListingsTab);this._showSuccess(this._NLS.yourAccount.savedProperties.saveSuccess);},_onResetPassword:function(_fff){this._resetLoginValues();this._showLoggedOutPanel();this.userNameInput.value=_fff;},toggleCompare:function(_1000,item){},onYourListingClick:function(item){},onDisplayCompareable:function(item){},onCompareItemToggled:function(item,_1005,_1006,_1007){},onUpdateCompareableDisplay:function(item,_1009,_100a){}});dojo.provide("wtl.ZoomBox");dojo.declare("wtl.ZoomBox",null,function(_100b){this._mapObj=_100b;this._mapElem=dojo.html.firstElement(dojo.html.firstElement(_100b.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){var lang;if(djConfig.locale&&djConfig.locale.length>0){lang=djConfig.locale.toLowerCase()=="zh-cn"?djConfig.locale:djConfig.locale.substring(0,2);}else{lang="en";}document.write("<scr"+"ipt src=\"http://maps.google.com/maps?file=api&amp;v=2&amp;hl="+lang+"&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 _1027=this._map.getContainer();var nodes=_1027.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 _1031=G_NORMAL_MAP;var _1032=1;if(type==SM_SATELLITE_MAP){_1031=G_SATELLITE_MAP;_1032=2;}else{if(type==SM_HYBRID_MAP){_1031=G_HYBRID_MAP;_1032=3;}}this._map.setMapType(_1031);if(dojo.lang.isFunction(this.onMapTypeChange)){this.onMapTypeChange(_1032);}}},setMapSize:function(_1033,size,_1035){setTimeout(dojo.lang.hitch(this,function(){this._setMapSize(_1033,size,_1035);}),1000);},_setMapSize:function(_1036,size,_1038){var mc=this.getMapContainer();var _103a=_1038?true:false;var w=dojo.html.getContentBox(mc).width;var h=dojo.html.getContentBox(mc).height;if(size&&size.width&&size.width!=w){_103a=true;w=size.width;mc.parentNode.style.width=w+"px";}if(size&&size.height&&size.height!=h){_103a=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 _103d=dojo.html.getAbsolutePosition(mc,true);this._mapLeft=_103d.x;this._mapTop=_103d.y;this._mapWidth=w;this._mapHeight=h;if(_1036){if(this.homeDeliveryZoom){this._setView(this.homeDeliveryZoom);}else{this._setDefaultCenter();}}if(_103a&&dojo.lang.isFunction(this.mapCallback)){this.mapCallback({rebuildQuadTree:_1038,functionName:"_setMapSize"});}},_setView:function(zoom){var b=false;if(zoom){var _1040=(zoom.sw.lat+zoom.ne.lat)/2;var _1041=(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();this._map.setCenter(new GLatLng(_1040,_1041),z);}return b;},setDefaults:function(_1043){if(_1043.MapType!=null){this.defaultMapType=_1043.MapType;}if(_1043.CenterLat&&_1043.CenterLng&&_1043.ZoomLevel){this.defaultLatitude=_1043.CenterLat;this.defaultLongitude=_1043.CenterLng;this.defaultZoomLevel=_1043.ZoomLevel;this.resetMap();}else{var _1044=this.zoomFitLatLng(_1043);if(!_1044){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 _1049=dojo.html.getAbsolutePosition(mc,true);this._mapLeft=_1049.x;this._mapTop=_1049.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(_104b){_104b?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(_104d){_this._mapMouseMove(_104d);});}},_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(_104e){if(_104e.x!=_104e.x2&&_104e.y!=_104e.y2){var _104f=(Math.abs(_104e.x+_104e.x2)/2)-this._mapLeft;var _1050=(Math.abs(_104e.y+_104e.y2)/2)-this._mapTop;var _1051=this._map.fromContainerPixelToLatLng({x:_104f,y:_1050});var _1052=this._map.fromContainerPixelToLatLng({x:_104e.x,y:_104e.y});var _1053=this._map.fromContainerPixelToLatLng({x:_104e.x2,y:_104e.y2});var _1054=new GLatLngBounds(_1052);_1054.extend(_1053);var _1055=this._map.getBoundsZoomLevel(_1054);this._map.setCenter(_1051,_1055);}},zoomFromExtent:function(s){var b=true;if(s&&s.length){var parts=s.split(";");if(parts.length&&parts.length==4){b=false;var _1059=this._setView({ne:{lat:parseFloat(parts[0]),lng:parseFloat(parts[3])},sw:{lat:parseFloat(parts[2]),lng:parseFloat(parts[1])}});if(!_1059){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 _105b=this._map.getBounds();var sw=_105b.getSouthWest();var ne=_105b.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,_1060){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(_1060){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 _1068=new GMarker(point,icon);this._map.addOverlay(_1068);if(dojo.lang.isFunction(args.onClick)){GEvent.addListener(_1068,"click",args.onClick);}return _1068;},removeMarker:function(_1069){this._map.removeOverlay(_1069);},toggleMarkerTiles:function(_106a,_106b){this._showMarkerTiles=_106a;if(_106a){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(_106c){clearTimeout(this._hoverTimer);var lat=_106c.lat();var lng=_106c.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 _1077=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(_1077,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 _107f=this._map.getCenter();dojo.debug("center latitude: "+_107f.y);dojo.debug("center longitude: "+_107f.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=\"Container\">\r\n\r\n        <div class=\"HeaderBG\">\r\n            <div class=\"Header\">\r\n                <div class=\"HeaderLeft\"></div>\r\n                <a class=\"Close\" dojoAttachPoint=\"closeButton\">${this._NLS.shared.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:{},bgOpacity:0.9,_bodyWidget:null,_NLS: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);this._NLS=wtl.resources;},fillInTemplate:function(){if(this.bodyWidgetName!==null){var _1080=this.bodyContainer.appendChild(document.createElement("div"));this._bodyWidget=dojo.widget.createWidget(this.bodyWidgetName,this.bodyWidgetParams,_1080);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>\r\n    <a href=\"\" id=\"LinkToSearch\" dojoattachevent=\"onClick:_linkSearchClick;onMouseOver:_linkMouseOver\">${this._NLS.linkToSearchControl.linkToSearch}</a>\r\n    <a href=\"\" id=\"SaveSearch\" dojoattachevent=\"onClick:_saveSearchClick\">${this._NLS.linkToSearchControl.saveSearch}</a>\r\n    <div class=\"LinkToSearchControl\" style=\"display:none\" dojoAttachPoint=\"layer\">\r\n       <div class=\"Titlebar\">\r\n            <a class=\"Close\" href=\"\" title=\"${this._NLS.shared.close}\" dojoAttachpoint=\"close\" dojoattachevent=\"onClick:hide\">${this._NLS.shared.close}</a>\r\n            <span dojoAttachpoint=\"title\"></span>\r\n       </div>\r\n       \r\n       <div dojoAttachPoint=\"linkToSearch\" class=\"LinkSearch\">\r\n            <label for=\"LinkToSearchLink\">${this._NLS.linkToSearchControl.linkToSearchLabel}</label>\r\n            <input dojoAttachPoint=\"textbox\" value=\"\" type=\"text\" />\r\n       </div>\r\n        \r\n        <div dojoAttachPoint=\"saveSearch\" class=\"SaveSearch\">\r\n\t        <input dojoAttachPoint=\"searchName\" dojoAttachEvent=\"onKeyPress;onBlur:_onSearchNameBlur;onFocus:_onSearchNameFocus\" type=\"text\" value=\"${this._searchNameDefault}\" maxlength=\"100\" />\r\n\t\t    <div class=\"SaveSearchOptions\">\r\n\t\t\t    <div class=\"Button ButtonSm\"><a dojoAttachPoint=\"saveButton\" dojoAttachEvent=\"onclick:_saveClick\" href=\"\">${this._NLS.shared.save}</a></div>\r\n\t\t\t    ${this._NLS.shared.frequencyLabel}<select dojoAttachPoint=\"notificationTypes\" dojoAttachEvent=\"onKeyPress\"></select>\r\n\t\t    </div>\r\n        </div>\r\n    </div>\r\n</div>\r\n",currentDeployment:{},id:"",label:"",frequencies:null,errorMessageCSS:"Error",layer:null,linkToSearchText:null,saveSearchText:null,frequencyLabel:null,linkToSearch:null,linkToSearchLabel:null,saveSearch:null,textbox:null,close:null,_showing:false,_mode:"",_searchNameDefault:"",_NLS: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/LinkToSearchControl.css");}}this._NLS=wtl.resources;},fillInTemplate:function(){this.frequencies=this._NLS.shared.emailFrequency;this._searchNameDefault=this._NLS.linkToSearchControl.searchNameDefault;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);}},_saveSearchClick:function(evt){dojo.event.browser.stopEvent(evt);this.saveSearchClick(this.showSaveSearch());},_linkSearchClick:function(evt){dojo.event.browser.stopEvent(evt);this.linkSearchClick(this.showLinkToSearch());},saveSearchClick:function(){},linkSearchClick:function(){},_linkMouseOver:function(){},toggle:function(){dojo.html.toggleDisplay(this.layer);if(dojo.html.isDisplayed(this.layer)){dojo.html.addClass(dojo.byId(this._mode),"On");}else{dojo.html.removeClass(dojo.byId(this._mode),"On");}return dojo.html.isDisplayed(this.layer);},showLinkToSearch:function(){if(this._mode=="SaveSearch"&&dojo.html.isDisplayed(this.layer)){this.toggle();}dojo.html.setDisplay(this.linkToSearch,true);dojo.html.setDisplay(this.saveSearch,false);this.title.innerHTML=this._NLS.linkToSearchControl.linkToSearch;this._mode="LinkToSearch";return this.toggle();},showSaveSearch:function(){if(this._mode=="LinkToSearch"&&dojo.html.isDisplayed(this.layer)){this.toggle();}dojo.html.setDisplay(this.linkToSearch,false);dojo.html.setDisplay(this.saveSearch,true);this.title.innerHTML=this._NLS.linkToSearchControl.saveSearch;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(this._NLS.linkToSearchControl.noSearchName);return false;}return true;},_showError:function(msg){this._showMessage(msg,true);},_showSuccess:function(msg){this._showMessage(msg,false);},_showMessage:function(msg,_1092){},hide:function(evt){if(evt){dojo.event.browser.stopEvent(evt);}if(dojo.html.isDisplayed(this.layer)){dojo.html.setDisplay(this.layer,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,_1097){this._showMessage(msg,_1097);},_showMessage:function(msg,_1099){var st=dojo.html.getScroll().top;if(msg&&msg.length>0){this.message.innerHTML=msg;this.domNode.style.left=this.getLeft()+"px";var time=5000;if(_1099){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 _109e={};this.getAbsolutePosition=function(_109f,_10a0){if(!_109e[_109f]||(typeof _10a0=="boolean"&&_10a0)){_109e[_109f]=dojo.html.getAbsolutePosition(_109f);}else{}return _109e[_109f];};};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 _10a7="; expires="+date.toGMTString();}else{var _10a7="";}document.cookie=name+"="+value+_10a7+"; 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;}if(!this._persistentData){this._persistentData={};}this._persistentData.searchType=this.searchType;this._persistentData.areaID=this.areaSelector.areaID;this._writePersistentCookie();this._NLS=wtl.resources;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 _10ae=false;this.comparePropertiesPane.selected=false;this.filterPane.selected=true;this.yourAccountPane.selected=false;var _10af=this._persistentData&&this._persistentData.selectedPane?this._persistentData.selectedPane:0;if(this.selectedPane){_10af=this.selectedPane;}if(_10af>0){switch(_10af){case 1: this.filterPane.selected=true;break;case 2: _10ae=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:_10ae,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.linkSaveSearchHolder){this._createLinkSaveSearchWidget();}var _10b3=-1;var outer=this;function _doResize(){if(_10b3!=-1){window.clearTimeout(_10b3);}_10b3=-1;outer._recalcLayout();}function _restart(){if(_10b3!=-1){window.clearTimeout(_10b3);}_10b3=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);}},{_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,_NLS:null,_isReseting:false,listingsAgentID:0,useBoundingBox:false,_prevSearchDetailEvent:null,currentEntityListingsType:null,ENTITYLISTINGSTYPE:{ACTIVE:1,SOLD:2},searchDisplay:0,SEARCHDISPLAYTYPE:{LISTING:0,DIRECTORY:1},_attachCompareEvents:function(_10b5){dojo.event.connect(_10b5,"toggleCompare",this._compareManager,"toggle");dojo.event.connect(_10b5,"onDisplayCompareable",this._compareManager,"onDisplayCompareable");dojo.event.connect(this._compareManager,"onToggled",_10b5,"onCompareItemToggled");dojo.event.connect(this._compareManager,"onUpdateCompareableDisplay",_10b5,"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");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(_10b9,_10ba){dojo.event.connect(this._yourAccountPane,"onLogin",dojo.widget.byId(_10b9),_10ba);this._onLoginAction.push({WidgetId:_10b9,Pointer:_10ba});var msg=(dojo.widget.byId(_10b9).signInMessage)?dojo.widget.byId(_10b9).signInMessage:this._NLS.errorMessages.signIn;this._focusYourAccount(msg);},_notLoggedInInternal:function(_10bc,_10bd){dojo.event.connect("after",this._yourAccountPane,"onLogin",this,_10bc);this._onLoginAction.push({WidgetId:"this",Pointer:_10bc});this._focusYourAccount(_10bd);},_focusYourAccount:function(_10be){this._yourAccountPane.openPane();this._yourAccountPane.showLoggedOutPanel();this._yourAccountPane._showError(_10be);},_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 _10c9=this._mapWidget.getBounds();var sw=_10c9.getSouthWest();var ne=_10c9.getNorthEast();var _this=this;var _10cd={isReseting:this._isReseting,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._isReseting){this._isReseting=false;}if(this._filterPane&&(!args.homeDeliveryID||args.homeDeliveryID==0)){_10cd.listingFilter=this._filterPane.getListingFilter();_10cd.agentFilter=this._filterPane.getAgentFilter();}if(this.listingsAgentID>0){_10cd.agentID=this.listingsAgentID;}if(this.listingsCompanyID>0){_10cd.companyID=this.listingsCompanyID;}if(this.currentEntityListingsType){_10cd.entityListingsType=this.currentEntityListingsType;this.currentEntityListingsType=null;}_10cd.DisableDirectory=this.disableDirectory;if(this.useBoundingBox){_10cd.useBoundingBox=this.useBoundingBox;this.useBoundingBox=false;}if(this._propertyPreviewPane&&this._showingPropertyPreview){var _10ce=this._propertyPreviewPane.getItemKey();if(_10ce){for(var key in _10ce){_10cd[key]=_10ce[key];}}}_10cd.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:_10cd,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;}_this._mapWidget.setTileParams(obj.SearchHash,obj.UpdateTicks);_this._mapWidget.setHoverState(obj.EnableBalloons);_this._mapWidget.toggleMarkerTiles(obj.ShowMarkerTiles,args.rebuildQuadTree);}if(_this.itemCountPlaceHolder){var lbl=_this._NLS.motherBrain.displaying+" "+(obj.Label||"");_this.itemCountPlaceHolder.innerHTML=lbl;}if(_this._filmStripWidget){_this._filmStripWidget.httpHandlerParams={type:_this.searchDisplay==_this.SEARCHDISPLAYTYPE.LISTING?"listings":"agents",zoom:_10cd.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);}_this._filmStripWidget.selectItem=(obj.Count==1||obj.Count3==1);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){this._isReseting=true;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(_10d5){this.resetAgentSearch();this.searchDisplay=this.SEARCHDISPLAYTYPE.LISTING;if(this._filterPane){this._filterPane.resetFilter();}if(this._filmStripWidget){this._filmStripWidget.reset();}if(!_10d5&&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(_10d6){this.searchDisplay=_10d6=="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(_10e4){this._mapWidget.removeMarker(_10e4);},_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 _10e9=this.markers[item.MarkerType+"Selected"];this._markerSelected=this._addMarker({width:_10e9?_10e9.width:32,height:_10e9?_10e9.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 _10ed=this.markers[item.MarkerType+"Selected"];this._markerHover=this._addMarker({width:_10ed?_10ed.width:32,height:_10ed?_10ed.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(_10f0,mlsID,_10f2){ShowEmailWin("/Popups/SendEmail.aspx?Type=RequestMoreInfo&"+(_10f0>0?"ListingID="+_10f0:"MLSID="+mlsID+"&MLSProviderID="+_10f2)+"&Referrer="+window.location.pathname.substring(1));},_requestShowingPopup:function(_10f3,mlsID,_10f5){ShowEmailWin("/Popups/SendEmail.aspx?Type=RequestShowing&"+(_10f3>0?"ListingID="+_10f3:"MLSID="+mlsID+"&MLSProviderID="+_10f5)+"&Referrer="+window.location.pathname.substring(1));},_emailListingPopup:function(_10f6,mlsID,_10f8){ShowEmailWin("/Popups/SendEmail.aspx?Type=EmailListing&"+(_10f6>0?"ListingID="+_10f6:"MLSID="+mlsID+"&MLSProviderID="+_10f8)+"&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 _10fc=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(_10fc);_10fc.postAttachExternalEvents();return _10fc;},_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,_10ff){if(this._mapWidget){if(this._markerSelected){this._removeMarker(this._markerSelected);this._markerSelected=null;}var _1100=this.markers[item.MarkerType+"Selected"];this._markerSelected=this._addMarker({width:_1100?_1100.width:32,height:_1100?_1100.height:32,MarkerType:item.MarkerType+"Selected",Latitude:item.Latitude,Longitude:item.Longitude});}if(!_10ff&&this._filmStripWidget&&item){var _1101=this._filmStripWidget.getType().toLowerCase();if(_1101==type.toLowerCase()){this._filmStripWidget.selectById(wtl.util.composeIds(item,type));}}},_onAreaSelect:function(_1102,_1103){if(this._mapWidget){if(_1102){this._mapWidget.zoomFromExtent(_1102);}else{this._resetMap();}}if(!this._persistentData){this._persistentData={};}this._persistentData.areaID=_1103;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 _1107=dojo.lfx.fadeIn(d,600,null);var _1108=dojo.lfx.fadeOut(d,600,null);function delayFadeOut(){window.setTimeout(function(){_1108.play();},2200);}dojo.event.connect(_1107,"onEnd",delayFadeOut);_1107.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),30,"/");}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 _110b=w.children[0].getItemKey();if(_110b){for(var key in _110b){this._persistentData[key]=_110b[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,_1112){this.searchType=typ;if(!this._persistentData){this._persistentData={};}this._persistentData.searchType=typ;this._writePersistentCookie();if(_1112){this._mapWidget.zoomFromExtent(_1112);}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=wtl.util.substituteParams(this._NLS.motherBrain.agentProps,[agent.FirstName+" "+agent.LastName]);var _1119=this._NLS.motherBrain.showAll;var _111a=dojo.lang.hitch(this,"_resetAgentSearch");this._updateSearchDetails(txt,_1119,_111a);},_setAgentSoldDisplay:function(agent){var txt=wtl.util.substituteParams(this._NLS.motherBrain.agentSolds,[agent.FirstName+" "+agent.LastName]);var _111d=this._NLS.motherBrain.showAll;var _111e=dojo.lang.hitch(this,"_resetAgentSearch");this._updateSearchDetails(txt,_111d,_111e);},_setCompanyListingDisplay:function(_111f){var txt=wtl.util.substituteParams(this._NLS.motherBrain.companyProps,[_111f.CompanyName]);var _1121=this._NLS.motherBrain.showAll;var _1122=dojo.lang.hitch(this,"_resetCompanySearch");this._updateSearchDetails(txt,_1121,_1122);},_setCompanySoldDisplay:function(_1123){var txt=wtl.util.substituteParams(this._NLS.motherBrain.companySolds,[_1123.CompanyName]);var _1125=this._NLS.motherBrain.showAll;var _1126=dojo.lang.hitch(this,"_resetCompanySearch");this._updateSearchDetails(txt,_1125,_1126);},_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(_112a,id){this._wwmoAgentID=parseInt(id);this._wwmoOverride=_112a;dojo.io.cookie.setCookie("AttemptWWMO",parseInt(id),-1,"/");this._doWorkWithMeOnline();},_workWithMeOnlineOverride:function(_112c){this._workWithMeOnline(_112c,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(wtl.util.substituteParams(this._NLS.wwmo.confirmSwitch,[data.oldAgent,data.newAgent]))){this._workWithMeOnlineOverride(true);this._yourAccountPane._showSuccess(wtl.util.substituteParams(this._NLS.wwmo.nowWorking,[data.newAgent]));}else{this._wwmoAgentID=0;this._wwmoOverride=false;}}else{if(data.success){this.onWorkWithMeOnline(data.Agent);}else{this._notLoggedInInternal("_doWorkWithMeOnline",this._NLS.errorMessages.signIn);}}}},onWorkWithMeOnline:function(agent){},_createLinkSaveSearchWidget:function(){if(!this._linkSaveSearchWidget){this._linkSaveSearchWidget=dojo.widget.createWidget("wtl:LinkToSearchControl",{currentDeployment:this.currentDeployment,id:"LinkToSearchWidget"},this.linkSaveSearchHolder);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");dojo.event.connect(this._linkSaveSearchWidget,"saveSearchClick",this,"_disconnectListeners");dojo.event.connect(this._linkSaveSearchWidget,"_linkMouseOver",this,"_hideDrillDown");dojo.event.connect(this._linkSaveSearchWidget,"linkSearchClick",this,"_linkToSearchClick");}},_doSaveSearch:function(){this._linkSaveSearchWidget.hide();dojo.io.bind({url:wtl.util.urlAppend("/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",this._NLS.motherBrain.searchSignIn);}},_trySaveSearchAgain:function(){this._saveSearch(this._linkSaveSearchWidget.getSearchName(),this._linkSaveSearchWidget.getNotificationType(),0);},_saveSearch:function(_1134,_1135,_1136){if(this._mapWidget){var _1137=this._mapWidget.getBounds();var sw=_1137.getSouthWest();var ne=_1137.getNorthEast();var _113a={top:ne.lat(),left:sw.lng(),bottom:sw.lat(),right:ne.lng(),searchType:this.searchType,SearchDisplayType:this.searchDisplay,OfficeID:this.defaultOffice,areaID:this._areaSelectorWidget.selectedAreaID,SearchName:_1134,FrequencyCode:_1135,HomeDeliveryID:_1136?_1136:0,SaveToGuest:true};dojo.io.bind({url:wtl.util.urlAppend(this.saveSearchHandler,"rand="+(new Date()).getTime()),method:"post",content:_113a,load:dojo.lang.hitch(this,(_1136>0)?"_onUpdateSearch":"_onSaveSearch"),mimetype:"text/json",transport:"XMLHTTPTransport"});}},_onSaveSearch:function(type,obj,event){if(obj&&obj.Search){this.onSaveSearch(obj.Search);}else{}},onSaveSearch:function(_113e){},_onUpdateSearch:function(type,obj,event){if(obj&&obj.Search){this.onUpdateSearch(obj.Search);}else{}},onUpdateSearch:function(_1142){},_linkToSearchClick:function(_1143){function linkToSearchCallback(type,obj,event){if(obj.HomeDeliveryID){this._linkSaveSearchWidget.setSelectedValue(wtl.util.getSavedSearchURL(obj.HomeDeliveryID,obj.linkPrefix));}else{this._linkSaveSearchWidget.setSelectedValue("Error Creating Link");}}if(_1143){var _1147=this._mapWidget.getBounds();var sw=_1147.getSouthWest();var ne=_1147.getNorthEast();var _114a={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:_114a,load:dojo.lang.hitch(this,linkToSearchCallback),mimetype:"text/json",transport:"XMLHTTPTransport"});}},onSaveToHomeFile:function(_114b){},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(_1153){this._search({rebuildQuadTree:true,homeDeliveryID:_1153.HomeDeliveryID,functionName:"_onRerunSearch"});},_updateSearchDetails:function(txt,_1155,_1156){if(this._prevSearchDetailEvent){var _1157=this.searchDetails.getElementsByTagName("a");if(_1157[0]){this._removeSearchDetailEvent(_1157[0],this._prevSearchDetailEvent);}}wtl.util.destroyChildren(this.searchDetails);if(txt){this.searchDetails.appendChild(document.createTextNode(txt+" "));}if(_1155&&_1156){var a=document.createElement("a");a.innerHTML=_1155;this._addSearchDetailEvent(a,_1156);this.searchDetails.appendChild(a);}},_addSearchDetailEvent:function(a,_115a){this._prevSearchDetailEvent=_115a;dojo.event.connect(a,"onclick",_115a);},_removeSearchDetailEvent:function(a,_115c){dojo.event.disconnect(a,"onclick",_115c);this._prevSearchDetailEvent=null;},_onCompareItemClick:function(_115d){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 _1166=false;if(evt.pageX<(pos.x-55)||evt.pageY<(parseInt(pos.y)+25)){_1166=true;}if(evt.pageX>=(pos.x+box.width)){_1166=true;}if(evt.pageY>(pos.y+box.height)){_1166=true;}if(_1166){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");},onComparePopupSaved:function(){dojo.event.topic.publish("/comparePopupSaved",null);},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,_116a,_116b,_116c,_116d){if(this.isShowingNow){return;}if(this.animationInProgress){this.queueOnAnimationFinish.push(this.open,arguments);return;}this.aboutToShow();var _116e=false,node,_1170;if(typeof x=="object"){node=x;_1170=_116b;_116b=_116a;_116a=y;_116e=true;}this.parent=_116a;dojo.body().appendChild(this.domNode);_116b=_116b||_116a["domNode"]||[];var _1171=null;this.isTopLevel=true;while(_116a){if(_116a!==this&&(_116a.setOpenedSubpopup!=undefined&&_116a.applyPopupBasicStyle!=undefined)){_1171=_116a;this.isTopLevel=false;_1171.setOpenedSubpopup(this);break;}_116a=_116a.parent;}this.parentPopup=_1171;this.popupIndex=_1171?_1171.popupIndex+1:1;if(this.isTopLevel){var _1172=dojo.html.isNode(_116b)?_116b:null;dojo.widget.PopupManager.opened(this,_1172);}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(_116b instanceof Array){_116b={left:_116b[0],top:_116b[1],width:0,height:0};}with(this.domNode.style){display="";zIndex=this.beginZIndex+this.popupIndex;}if(_116e){this.move(node,_116d,_1170);}else{this.move(x,y,_116d,_116c);}this.domNode.style.display="none";this.explodeSrc=_116b;this.show();this.isShowingNow=true;},move:function(x,y,_1175,_1176){var _1177=(typeof x=="object");if(_1177){var _1178=_1175;var node=x;_1175=y;if(!_1178){_1178={"BL":"TL","TL":"BL"};}dojo.html.placeOnScreenAroundElement(this.domNode,node,_1175,this.aroundBox,_1178);}else{if(!_1176){_1176="TL,TR,BL,BR";}dojo.html.placeOnScreen(this.domNode,x,y,_1175,true,_1176);}},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(_1181){if(!_1181){_1181=dojo.html.getDocumentWindow(window.top&&window.top.document||window.document);}this.registerWin(_1181);for(var i=0;i<_1181.frames.length;i++){try{var win=dojo.html.getDocumentWindow(_1181.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,_1188){if(menu==this.currentMenu){return;}if(this.currentMenu){this.currentMenu.close();}this.currentMenu=menu;this.currentFocusMenu=menu;this.currentButton=_1188;};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 _118d=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(_1192,_1193){var comps=(_1193.indexOf("T")==-1)?_1193.split(" "):_1193.split("T");_1192=dojo.date.setIso8601Date(_1192,comps[0]);if(comps.length==2){_1192=dojo.date.setIso8601Time(_1192,comps[1]);}return _1192;};dojo.date.fromIso8601=function(_1195){return dojo.date.setIso8601(new Date(0,0),_1195);};dojo.date.setIso8601Date=function(_1196,_1197){var _1198="^([0-9]{4})((-?([0-9]{2})(-?([0-9]{2}))?)|"+"(-?([0-9]{3}))|(-?W([0-9]{2})(-?([1-7]))?))?$";var d=_1197.match(new RegExp(_1198));if(!d){dojo.debug("invalid date string: "+_1197);return null;}var year=d[1];var month=d[4];var date=d[6];var _119d=d[8];var week=d[10];var _119f=d[12]?d[12]:1;_1196.setFullYear(year);if(_119d){_1196.setMonth(0);_1196.setDate(Number(_119d));}else{if(week){_1196.setMonth(0);_1196.setDate(1);var gd=_1196.getDay();var day=gd?gd:7;var _11a2=Number(_119f)+(7*Number(week));if(day<=4){_1196.setDate(_11a2+1-day);}else{_1196.setDate(_11a2+8-day);}}else{if(month){_1196.setDate(1);_1196.setMonth(month-1);}if(date){_1196.setDate(date);}}}return _1196;};dojo.date.fromIso8601Date=function(_11a3){return dojo.date.setIso8601Date(new Date(0,0),_11a3);};dojo.date.setIso8601Time=function(_11a4,_11a5){var _11a6="Z|(([-+])([0-9]{2})(:?([0-9]{2}))?)$";var d=_11a5.match(new RegExp(_11a6));var _11a8=0;if(d){if(d[0]!="Z"){_11a8=(Number(d[3])*60)+Number(d[5]);_11a8*=((d[2]=="-")?1:-1);}_11a8-=_11a4.getTimezoneOffset();_11a5=_11a5.substr(0,_11a5.length-d[0].length);}var _11a9="^([0-9]{2})(:?([0-9]{2})(:?([0-9]{2})(.([0-9]+))?)?)?$";d=_11a5.match(new RegExp(_11a9));if(!d){dojo.debug("invalid time string: "+_11a5);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;_11a4.setHours(hours);_11a4.setMinutes(mins);_11a4.setSeconds(secs);_11a4.setMilliseconds(ms);if(_11a8!==0){_11a4.setTime(_11a4.getTime()+_11a8*60000);}return _11a4;};dojo.date.fromIso8601Time=function(_11ae){return dojo.date.setIso8601Time(new Date(0,0),_11ae);};dojo.date.toRfc3339=function(_11af,_11b0){if(!_11af){_11af=new Date();}var _=dojo.string.pad;var _11b2=[];if(_11b0!="timeOnly"){var date=[_(_11af.getFullYear(),4),_(_11af.getMonth()+1,2),_(_11af.getDate(),2)].join("-");_11b2.push(date);}if(_11b0!="dateOnly"){var time=[_(_11af.getHours(),2),_(_11af.getMinutes(),2),_(_11af.getSeconds(),2)].join(":");var _11b5=_11af.getTimezoneOffset();time+=(_11b5>0?"-":"+")+_(Math.floor(Math.abs(_11b5)/60),2)+":"+_(Math.abs(_11b5)%60,2);_11b2.push(time);}return _11b2.join("T");};dojo.date.fromRfc3339=function(_11b6){if(_11b6.indexOf("Tany")!=-1){_11b6=_11b6.replace("Tany","");}var _11b7=new Date();return dojo.date.setIso8601(_11b7,_11b6);};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 _11ba=this.getFragNodeRef(frag);dojo.html.copyStyle(this.domNode,_11ba);this.weekTemplate=dojo.dom.removeNode(this.calendarWeekTemplate);this._preInitUI(this.value?this.value:this.today,false,true);var _11bb=dojo.lang.unnest(dojo.date.getNames("days",this.dayWidth,"standAlone",this.lang));if(this.weekStartsOn>0){for(var i=0;i<this.weekStartsOn;i++){_11bb.push(_11bb.shift());}}var _11bd=this.dayLabelsRow.getElementsByTagName("td");for(i=0;i<7;i++){_11bd.item(i).innerHTML=_11bb[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(_11be){this.setDate(_11be);},setDate:function(_11bf){var d=_11bf;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(_11c2,_11c3,_11c4){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(_11c2<this.startDate||_11c2>this.endDate){_11c2=new Date((_11c2<this.startDate)?this.startDate:this.endDate);}this.firstDay=this._initFirstDay(_11c2,_11c3);this.selectedIsUsed=false;this.currentIsUsed=false;var _11c8=new Date(this.firstDay);var _11c9=_11c8.getMonth();this.curMonth=new Date(_11c8);this.curMonth.setDate(_11c8.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(_11c8,this.endDate,dojo.date.dateParts.DAY)>days){this._preInitUI(this.startDate,true,false);_11c8=new Date(this.firstDay);}this.curMonth=new Date(_11c8);this.curMonth.setDate(_11c8.getDate()+6);this.curMonth.setDate(1);var _11cb=(_11c8.getMonth()==this.curMonth.getMonth())?"current":"previous";}if(_11c4){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 _11ce=new Date(this.firstDay);this._setMonthLabel(this.curMonth.getMonth());this._setYearLabels(this.curMonth.getFullYear());var _11cf=this.calendarDatesContainerNode.getElementsByTagName("td");var _11d0=this.calendarDatesContainerNode.getElementsByTagName("tr");var _11d1;for(i=0;i<days;i++){_11d1=_11cf.item(i);_11d1.innerHTML=_11ce.getDate();_11d1.setAttribute("djDateValue",_11ce.valueOf());var _11d2=(_11ce.getMonth()!=this.curMonth.getMonth()&&Number(_11ce)<Number(this.curMonth))?"previous":(_11ce.getMonth()==this.curMonth.getMonth())?"current":"next";var _11d3=_11d2;if(this._isDisabledDate(_11ce)){var _11d4={previous:"disabledPrevious",current:"disabledCurrent",next:"disabledNext"};_11d3=_11d4[_11d2];}dojo.html.setClass(_11d1,this._getDateClassName(_11ce,_11d3));if(dojo.html.hasClass(_11d1,this.classNames.selectedDate)){this.selectedNode=_11d1;}_11ce=dojo.date.add(_11ce,dojo.date.dateParts.DAY,1);}this.lastDay=dojo.date.add(_11ce,dojo.date.dateParts.DAY,-1);this._initControls();},_initControls:function(){var d=this.firstDay;var d2=this.lastDay;var _11d7,_11d8,_11d9,_11da,_11db,_11dc;_11d7=_11d8=_11d9=_11da=_11db=_11dc=!this.staticDisplay;with(dojo.date.dateParts){var add=dojo.date.add;if(_11d7&&add(d,DAY,(-1*(this._getAdjustedDay(d)+1)))<this.startDate){_11d7=_11d9=_11db=false;}if(_11d8&&d2>this.endDate){_11d8=_11da=_11dc=false;}if(_11d9&&add(d,DAY,-1)<this.startDate){_11d9=_11db=false;}if(_11da&&add(d2,DAY,1)>this.endDate){_11da=_11dc=false;}if(_11db&&add(d2,YEAR,-1)<this.startDate){_11db=false;}if(_11dc&&add(d,YEAR,1)>this.endDate){_11dc=false;}}function enableControl(node,_11df){dojo.html.setVisibility(node,_11df?"":"hidden");}enableControl(this.decreaseWeekNode,_11d7);enableControl(this.increaseWeekNode,_11d8);enableControl(this.decreaseMonthNode,_11d9);enableControl(this.increaseMonthNode,_11da);enableControl(this.previousYearLabelNode,_11db);enableControl(this.nextYearLabelNode,_11dc);},_incrementWeek:function(evt){var d=new Date(this.firstDay);switch(evt.target){case this.increaseWeekNode.getElementsByTagName("img").item(0): case this.increaseWeekNode: var _11e2=dojo.date.add(d,dojo.date.dateParts.WEEK,1);if(_11e2<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 _11e5=new Date(this.firstDay);switch(evt.currentTarget){case this.increaseMonthNode.getElementsByTagName("img").item(0): case this.increaseMonthNode: _11e5=dojo.date.add(_11e5,dojo.date.dateParts.DAY,this.displayWeeks*7);if(_11e5<this.endDate){d=dojo.date.add(d,dojo.date.dateParts.MONTH,1);}else{var _11e6=true;}break;case this.decreaseMonthNode.getElementsByTagName("img").item(0): case this.decreaseMonthNode: if(_11e5>this.startDate){d=dojo.date.add(d,dojo.date.dateParts.MONTH,-1);}else{var _11e7=true;}break;}if(_11e7){d=new Date(this.startDate);}else{if(_11e6){d=new Date(this.endDate);}}this._preInitUI(d,false,true);},_incrementYear:function(evt){var year=this.curMonth.getFullYear();var _11ea=new Date(this.firstDay);switch(evt.target){case this.nextYearLabelNode: _11ea=dojo.date.add(_11ea,dojo.date.dateParts.YEAR,1);if(_11ea<this.endDate){year++;}else{var _11eb=true;}break;case this.previousYearLabelNode: _11ea=dojo.date.add(_11ea,dojo.date.dateParts.YEAR,-1);if(_11ea>this.startDate){year--;}else{var _11ec=true;}break;}var d;if(_11ec){d=new Date(this.startDate);}else{if(_11eb){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(_11f1){this.monthLabelNode.innerHTML=dojo.date.getNames("months","wide","standAlone",this.lang)[_11f1];},_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,_11f7){var _11f8=this.classNames[_11f7];if((!this.selectedIsUsed&&this.value)&&(Number(date)==Number(this.value))){_11f8=this.classNames.selectedDate+" "+_11f8;this.selectedIsUsed=true;}if((!this.currentIsUsed)&&(Number(date)==Number(this.today))){_11f8=_11f8+" "+this.classNames.currentDate;this.currentIsUsed=true;}return _11f8;},onClick:function(evt){dojo.event.browser.stopEvent(evt);},_handleUiClick:function(evt){var _11fb=evt.target;if(_11fb.nodeType!=dojo.dom.ELEMENT_NODE){_11fb=_11fb.parentNode;}dojo.event.browser.stopEvent(evt);this.selectedIsUsed=this.todayIsUsed=false;if(dojo.html.hasClass(_11fb,this.classNames["disabledPrevious"])||dojo.html.hasClass(_11fb,this.classNames["disabledCurrent"])||dojo.html.hasClass(_11fb,this.classNames["disabledNext"])){return;}this.clickedNode=_11fb;this.setDate(new Date(Number(dojo.html.getAttribute(_11fb,"djDateValue"))));},onValueChanged:function(date){},_isDisabledDate:function(_11fd){if(_11fd<this.startDate||_11fd>this.endDate){return true;}return this.isDisabledDate(_11fd,this.lang);},isDisabledDate:function(_11fe,_11ff){return false;},_initFirstDay:function(_1200,adj){var d=new Date(_1200);if(!adj){d.setDate(1);}d.setDate(d.getDate()-this._getAdjustedDay(d,this.weekStartsOn));d.setHours(0,0,0,0);return d;},_getAdjustedDay:function(_1203){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[_1203.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/C21/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/C21/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/C21/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/C21/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/C21/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/C21/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:"",saveFormat:"",value:"",name:"",displayWeeks:6,adjustWeeks:false,startDate:"1492-10-12",endDate:"2941-10-12",weekStartsOn:"",staticDisplay:false,keyPress:false,postMixInProperties:function(_120a,frag){wtl.widget.DropdownDatePicker.superclass.postMixInProperties.apply(this,arguments);var _120c=dojo.i18n.getLocalization("dojo.widget","DropdownDatePicker",this.lang);this.iconAlt=_120c.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 _1210={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",_1210,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(_1211){this.setDate(_1211);},setDate:function(_1212){this.datePicker.setDate(_1212);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(_1213){},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 _1220=(year.length>2)?"MM/dd/yyyy":"MM/dd/yy";var _1221=dojo.date.parse(input,{formatLength:this.formatLength,datePattern:_1220,selector:"dateOnly",locale:this.lang});if(_1221!=null){if(!this.datePicker._isDisabledDate(_1221)){this.setDate(_1221);}}}}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(_1224){this.datePicker.destroy(_1224);wtl.widget.DropdownDatePicker.superclass.destroy.apply(this,arguments);}});
