function addScriptTag(b){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src",b);document.getElementsByTagName("head").item(0).appendChild(a)}function addCssTag(b){var a=document.createElement("link");a.setAttribute("rel","stylesheet");a.setAttribute("type","text/css");a.setAttribute("href",b);document.getElementsByTagName("head").item(0).appendChild(a)}var djConfig={parseOnLoad:true,xdWaitSeconds:30,useXDomain:true,locale:"en-us",modulePaths:{},load_wem_scripts:function(){addCssTag("http://us.sunpowercorp.com:9001/cos-service/styles/UIComponents.css")},load_users_scripts:function(){addScriptTag("http://us.sunpowercorp.com:9001/user-service/scripts/features/register.js");addScriptTag("http://us.sunpowercorp.com:9001/user-service/scripts/features/editprofile.js");addScriptTag("http://us.sunpowercorp.com:9001/user-service/scripts/features/forgotpassword.js")}};(function(){var sMap=null;if((sMap||(typeof djConfig!="undefined"&&djConfig.scopeMap))&&(typeof window!="undefined")){var scopeDef="",scopePrefix="",scopeSuffix="",scopeMap={},scopeMapRev={};sMap=sMap||djConfig.scopeMap;for(var i=0;i<sMap.length;i++){var newScope=sMap[i];scopeDef+="var "+newScope[0]+" = {}; "+newScope[1]+" = "+newScope[0]+";"+newScope[1]+"._scopeName = '"+newScope[1]+"';";scopePrefix+=(i==0?"":",")+newScope[0];scopeSuffix+=(i==0?"":",")+newScope[1];scopeMap[newScope[0]]=newScope[1];scopeMapRev[newScope[1]]=newScope[0]}eval(scopeDef+"dojo._scopeArgs = ["+scopeSuffix+"];");dojo._scopePrefixArgs=scopePrefix;dojo._scopePrefix="(function("+scopePrefix+"){";dojo._scopeSuffix="})("+scopeSuffix+")";dojo._scopeMap=scopeMap;dojo._scopeMapRev=scopeMapRev}(function(){if(typeof this["loadFirebugConsole"]=="function"){this["loadFirebugConsole"]()}else{this.console=this.console||{};var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"];var i=0,tn;while((tn=cn[i++])){if(!console[tn]){(function(){var tcn=tn+"";console[tcn]=("log" in console)?function(){var a=Array.apply({},arguments);a.unshift(tcn+":");console.log(a.join(" "))}:function(){}})()}}}if(typeof dojo=="undefined"){this.dojo={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}}}var d=dojo;if(typeof dijit=="undefined"){this.dijit={_scopeName:"dijit"}}if(typeof dojox=="undefined"){this.dojox={_scopeName:"dojox"}}if(!d._scopeArgs){d._scopeArgs=[dojo,dijit,dojox]}d.global=this;d.config={isDebug:false,debugAtAllCosts:false};if(typeof djConfig!="undefined"){for(var opt in djConfig){d.config[opt]=djConfig[opt]}}dojo.locale=d.config.locale;var rev="$Rev: 18832 $".match(/\d+/);dojo.version={major:1,minor:3,patch:2,flag:"cos-widget",revision:rev?+rev[0]:NaN,toString:function(){with(d.version){return major+"."+minor+"."+patch+flag+" ("+revision+")"}}};if(typeof OpenAjax!="undefined"){OpenAjax.hub.registerLibrary(dojo._scopeName,"http://dojotoolkit.org",d.version.toString())}var tobj={};dojo._mixin=function(obj,props){for(var x in props){if(tobj[x]===undefined||tobj[x]!=props[x]){obj[x]=props[x]}}if(d.isIE&&props){var p=props.toString;if(typeof p=="function"&&p!=obj.toString&&p!=tobj.toString&&p!="\nfunction toString() {\n    [native code]\n}\n"){obj.toString=props.toString}}return obj};dojo.mixin=function(obj,props){if(!obj){obj={}}for(var i=1,l=arguments.length;i<l;i++){d._mixin(obj,arguments[i])}return obj};dojo._getProp=function(parts,create,context){var obj=context||d.global;for(var i=0,p;obj&&(p=parts[i]);i++){if(i==0&&this._scopeMap[p]){p=this._scopeMap[p]}obj=(p in obj?obj[p]:(create?obj[p]={}:undefined))}return obj};dojo.setObject=function(name,value,context){var parts=name.split("."),p=parts.pop(),obj=d._getProp(parts,true,context);return obj&&p?(obj[p]=value):undefined};dojo.getObject=function(name,create,context){return d._getProp(name.split("."),create,context)};dojo.exists=function(name,obj){return !!d.getObject(name,false,obj)};dojo["eval"]=function(scriptFragment){return d.global.eval?d.global.eval(scriptFragment):eval(scriptFragment)};d.deprecated=d.experimental=function(){}})();(function(){var d=dojo;d.mixin(d,{_loadedModules:{},_inFlightCount:0,_hasResource:{},_modulePrefixes:{dojo:{name:"dojo",value:"."},doh:{name:"doh",value:"../util/doh"},tests:{name:"tests",value:"tests"}},_moduleHasPrefix:function(module){var mp=this._modulePrefixes;return !!(mp[module]&&mp[module].value)},_getModulePrefix:function(module){var mp=this._modulePrefixes;if(this._moduleHasPrefix(module)){return mp[module].value}return module},_loadedUrls:[],_postLoad:false,_loaders:[],_unloaders:[],_loadNotifying:false});dojo._loadPath=function(relpath,module,cb){var uri=((relpath.charAt(0)=="/"||relpath.match(/^\w+:/))?"":this.baseUrl)+relpath;try{return !module?this._loadUri(uri,cb):this._loadUriAndCheck(uri,module,cb)}catch(e){console.error(e);return false}};dojo._loadUri=function(uri,cb){if(this._loadedUrls[uri]){return true}var contents=this._getText(uri,true);if(!contents){return false}this._loadedUrls[uri]=true;this._loadedUrls.push(uri);if(cb){contents="("+contents+")"}else{contents=this._scopePrefix+contents+this._scopeSuffix}if(d.isMoz){contents+="\r\n//@ sourceURL="+uri}var value=d["eval"](contents);if(cb){cb(value)}return true};dojo._loadUriAndCheck=function(uri,moduleName,cb){var ok=false;try{ok=this._loadUri(uri,cb)}catch(e){console.error("failed loading "+uri+" with error: "+e)}return !!(ok&&this._loadedModules[moduleName])};dojo.loaded=function(){this._loadNotifying=true;this._postLoad=true;var mll=d._loaders;this._loaders=[];for(var x=0;x<mll.length;x++){mll[x]()}this._loadNotifying=false;if(d._postLoad&&d._inFlightCount==0&&mll.length){d._callLoaded()}};dojo.unloaded=function(){var mll=d._unloaders;while(mll.length){(mll.pop())()}};d._onto=function(arr,obj,fn){if(!fn){arr.push(obj)}else{if(fn){var func=(typeof fn=="string")?obj[fn]:fn;arr.push(function(){func.call(obj)})}}};dojo.addOnLoad=function(obj,functionName){d._onto(d._loaders,obj,functionName);if(d._postLoad&&d._inFlightCount==0&&!d._loadNotifying){d._callLoaded()}};var dca=d.config.addOnLoad;if(dca){d.addOnLoad[(dca instanceof Array?"apply":"call")](d,dca)}dojo._modulesLoaded=function(){if(d._postLoad){return}if(d._inFlightCount>0){console.warn("files still in flight!");return}d._callLoaded()};dojo._callLoaded=function(){if(typeof setTimeout=="object"||(dojo.config.useXDomain&&d.isOpera)){if(dojo.isAIR){setTimeout(function(){dojo.loaded()},0)}else{setTimeout(dojo._scopeName+".loaded();",0)}}else{d.loaded()}};dojo._getModuleSymbols=function(modulename){var syms=modulename.split(".");for(var i=syms.length;i>0;i--){var parentModule=syms.slice(0,i).join(".");if((i==1)&&!this._moduleHasPrefix(parentModule)){syms[0]="../"+syms[0]}else{var parentModulePath=this._getModulePrefix(parentModule);if(parentModulePath!=parentModule){syms.splice(0,i,parentModulePath);break}}}return syms};dojo._global_omit_module_check=false;dojo.loadInit=function(init){init()};dojo._loadModule=dojo.require=function(moduleName,omitModuleCheck){if(moduleName=="dojo.nls._en-us"){return}omitModuleCheck=this._global_omit_module_check||omitModuleCheck;var module=this._loadedModules[moduleName];if(module){return module}var relpath=this._getModuleSymbols(moduleName).join("/")+".js";var modArg=(!omitModuleCheck)?moduleName:null;var ok=this._loadPath(relpath,modArg);if(!ok&&!omitModuleCheck){throw new Error("Could not load '"+moduleName+"'; last tried '"+relpath+"'")}if(!omitModuleCheck&&!this._isXDomain){module=this._loadedModules[moduleName];if(!module){throw new Error("symbol '"+moduleName+"' is not defined after loading '"+relpath+"'")}}return module};dojo.provide=function(resourceName){resourceName=resourceName+"";return(d._loadedModules[resourceName]=d.getObject(resourceName,true))};dojo.platformRequire=function(modMap){var common=modMap.common||[];var result=common.concat(modMap[d._name]||modMap["default"]||[]);for(var x=0;x<result.length;x++){var curr=result[x];if(curr.constructor==Array){d._loadModule.apply(d,curr)}else{d._loadModule(curr)}}};dojo.requireIf=function(condition,resourceName){if(condition===true){var args=[];for(var i=1;i<arguments.length;i++){args.push(arguments[i])}d.require.apply(d,args)}};dojo.requireAfterIf=d.requireIf;dojo.registerModulePath=function(module,prefix){d._modulePrefixes[module]={name:module,value:prefix}};dojo.requireLocalization=function(moduleName,bundleName,locale,availableFlatLocales){d.require("dojo.i18n");d.i18n._requireLocalization.apply(d.hostenv,arguments)};var ore=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$");var ire=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");dojo._Url=function(){var n=null;var _a=arguments;var uri=[_a[0]];for(var i=1;i<_a.length;i++){if(!_a[i]){continue}var relobj=new d._Url(_a[i]+"");var uriobj=new d._Url(uri[0]+"");if(relobj.path==""&&!relobj.scheme&&!relobj.authority&&!relobj.query){if(relobj.fragment!=n){uriobj.fragment=relobj.fragment}relobj=uriobj}else{if(!relobj.scheme){relobj.scheme=uriobj.scheme;if(!relobj.authority){relobj.authority=uriobj.authority;if(relobj.path.charAt(0)!="/"){var path=uriobj.path.substring(0,uriobj.path.lastIndexOf("/")+1)+relobj.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}}}}relobj.path=segs.join("/")}}}}uri=[];if(relobj.scheme){uri.push(relobj.scheme,":")}if(relobj.authority){uri.push("//",relobj.authority)}uri.push(relobj.path);if(relobj.query){uri.push("?",relobj.query)}if(relobj.fragment){uri.push("#",relobj.fragment)}}this.uri=uri.join("");var r=this.uri.match(ore);this.scheme=r[2]||(r[1]?"":n);this.authority=r[4]||(r[3]?"":n);this.path=r[5];this.query=r[7]||(r[6]?"":n);this.fragment=r[9]||(r[8]?"":n);if(this.authority!=n){r=this.authority.match(ire);this.user=r[3]||n;this.password=r[4]||n;this.host=r[6]||r[7];this.port=r[9]||n}};dojo._Url.prototype.toString=function(){return this.uri};dojo.moduleUrl=function(module,url){var loc=d._getModuleSymbols(module).join("/");if(!loc){return null}if(loc.lastIndexOf("/")!=loc.length-1){loc+="/"}var colonIndex=loc.indexOf(":");if(loc.charAt(0)!="/"&&(colonIndex==-1||colonIndex>loc.indexOf("/"))){loc=d.baseUrl+loc}return new d._Url(loc,url)}})();if(typeof window!="undefined"){dojo.isBrowser=true;dojo._name="browser";(function(){var d=dojo;if(document&&document.getElementsByTagName){var scripts=document.getElementsByTagName("script");var rePkg=/dojo(\.xd)?\.js(\W|$)/i;for(var i=0;i<scripts.length;i++){var src=scripts[i].getAttribute("src");if(!src){continue}var m=src.match(rePkg);if(m){if(!d.config.baseUrl){d.config.baseUrl=src.substring(0,m.index)}var cfg=scripts[i].getAttribute("djConfig");if(cfg){var cfgo=eval("({ "+cfg+" })");for(var x in cfgo){dojo.config[x]=cfgo[x]}}break}}}d.baseUrl=d.config.baseUrl;var n=navigator;var dua=n.userAgent,dav=n.appVersion,tv=parseFloat(dav);if(dua.indexOf("Opera")>=0){d.isOpera=tv}if(dua.indexOf("AdobeAIR")>=0){d.isAIR=1}d.isKhtml=(dav.indexOf("Konqueror")>=0)?tv:0;d.isWebKit=parseFloat(dua.split("WebKit/")[1])||undefined;d.isChrome=parseFloat(dua.split("Chrome/")[1])||undefined;var index=Math.max(dav.indexOf("WebKit"),dav.indexOf("Safari"),0);if(index&&!dojo.isChrome){d.isSafari=parseFloat(dav.split("Version/")[1]);if(!d.isSafari||parseFloat(dav.substr(index+7))<=419.3){d.isSafari=2}}if(dua.indexOf("Gecko")>=0&&!d.isKhtml&&!d.isWebKit){d.isMozilla=d.isMoz=tv}if(d.isMoz){d.isFF=parseFloat(dua.split("Firefox/")[1]||dua.split("Minefield/")[1]||dua.split("Shiretoko/")[1])||undefined}if(document.all&&!d.isOpera){d.isIE=parseFloat(dav.split("MSIE ")[1])||undefined;if(d.isIE>=8&&document.documentMode!=5){d.isIE=document.documentMode}}if(dojo.isIE&&window.location.protocol==="file:"){dojo.config.ieForceActiveXXhr=true}var cm=document.compatMode;d.isQuirks=cm=="BackCompat"||cm=="QuirksMode"||d.isIE<6;d.locale=dojo.config.locale||(d.isIE?n.userLanguage:n.language).toLowerCase();d._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];d._xhrObj=function(){var http,last_e;if(!dojo.isIE||!dojo.config.ieForceActiveXXhr){try{http=new XMLHttpRequest()}catch(e){}}if(!http){for(var i=0;i<3;++i){var progid=d._XMLHTTP_PROGIDS[i];try{http=new ActiveXObject(progid)}catch(e){last_e=e}if(http){d._XMLHTTP_PROGIDS=[progid];break}}}if(!http){throw new Error("XMLHTTP not available: "+last_e)}return http};d._isDocumentOk=function(http){var stat=http.status||0;return(stat>=200&&stat<300)||stat==304||stat==1223||(!stat&&(location.protocol=="file:"||location.protocol=="chrome:"))};var owloc=window.location+"";var base=document.getElementsByTagName("base");var hasBase=(base&&base.length>0);d._getText=function(uri,fail_ok){var http=this._xhrObj();if(!hasBase&&dojo._Url){uri=(new dojo._Url(owloc,uri)).toString()}if(d.config.cacheBust){uri+="";uri+=(uri.indexOf("?")==-1?"?":"&")+String(d.config.cacheBust).replace(/\W+/g,"")}http.open("GET",uri,false);try{http.send(null);if(!d._isDocumentOk(http)){var err=Error("Unable to load "+uri+" status:"+http.status);err.status=http.status;err.responseText=http.responseText;throw err}}catch(e){if(fail_ok){return null}throw e}return http.responseText};var _w=window;var _handleNodeEvent=function(evtName,fp){var oldHandler=_w[evtName]||function(){};_w[evtName]=function(){fp.apply(_w,arguments);oldHandler.apply(_w,arguments)}};d._windowUnloaders=[];d.windowUnloaded=function(){var mll=d._windowUnloaders;while(mll.length){(mll.pop())()}};var _onWindowUnloadAttached=0;d.addOnWindowUnload=function(obj,functionName){d._onto(d._windowUnloaders,obj,functionName);if(!_onWindowUnloadAttached){_onWindowUnloadAttached=1;_handleNodeEvent("onunload",d.windowUnloaded)}};var _onUnloadAttached=0;d.addOnUnload=function(obj,functionName){d._onto(d._unloaders,obj,functionName);if(!_onUnloadAttached){_onUnloadAttached=1;_handleNodeEvent("onbeforeunload",dojo.unloaded)}}})();dojo._initFired=false;dojo._loadInit=function(e){dojo._initFired=true;var type=e&&e.type?e.type.toLowerCase():"load";if(arguments.callee.initialized||(type!="domcontentloaded"&&type!="load")){return}arguments.callee.initialized=true;if("_khtmlTimer" in dojo){clearInterval(dojo._khtmlTimer);delete dojo._khtmlTimer}if(dojo._inFlightCount==0){dojo._modulesLoaded()}};if(!dojo.config.afterOnLoad){if(document.addEventListener){if(dojo.isWebKit>525||dojo.isOpera||dojo.isFF>=3||(dojo.isMoz&&dojo.config.enableMozDomContentLoaded===true)){document.addEventListener("DOMContentLoaded",dojo._loadInit,null)}window.addEventListener("load",dojo._loadInit,null)}if(dojo.isAIR){window.addEventListener("load",dojo._loadInit,null)}else{if((dojo.isWebKit<525)||dojo.isKhtml){dojo._khtmlTimer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){dojo._loadInit()}},10)}}}if(dojo.isIE){if(!dojo.config.afterOnLoad){document.write('<script defer src="//:" onreadystatechange="if(this.readyState==\'complete\'){'+dojo._scopeName+'._loadInit();}"><\/script>')}try{document.namespaces.add("v","urn:schemas-microsoft-com:vml");document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML);  display:inline-block")}catch(e){}}}(function(){var mp=dojo.config.modulePaths;if(mp){for(var param in mp){dojo.registerModulePath(param,mp[param])}}})();if(dojo.config.isDebug){dojo.require("dojo._firebug.firebug")}if(dojo.config.debugAtAllCosts){dojo.config.useXDomain=true;dojo.require("dojo._base._loader.loader_xd");dojo.require("dojo._base._loader.loader_debug");dojo.require("dojo.i18n")}if(!dojo._hasResource["dojo._base.lang"]){dojo._hasResource["dojo._base.lang"]=true;dojo.provide("dojo._base.lang");dojo.isString=function(it){return !!arguments.length&&it!=null&&(typeof it=="string"||it instanceof String)};dojo.isArray=function(it){return it&&(it instanceof Array||typeof it=="array")};dojo.isFunction=(function(){var _isFunction=function(it){var t=typeof it;return it&&(t=="function"||it instanceof Function)};return dojo.isSafari?function(it){if(typeof it=="function"&&it=="[object NodeList]"){return false}return _isFunction(it)}:_isFunction})();dojo.isObject=function(it){return it!==undefined&&(it===null||typeof it=="object"||dojo.isArray(it)||dojo.isFunction(it))};dojo.isArrayLike=function(it){var d=dojo;return it&&it!==undefined&&!d.isString(it)&&!d.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(d.isArray(it)||isFinite(it.length))};dojo.isAlien=function(it){return it&&!dojo.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it))};dojo.extend=function(constructor,props){for(var i=1,l=arguments.length;i<l;i++){dojo._mixin(constructor.prototype,arguments[i])}return constructor};dojo._hitchArgs=function(scope,method){var pre=dojo._toArray(arguments,2);var named=dojo.isString(method);return function(){var args=dojo._toArray(arguments);var f=named?(scope||dojo.global)[method]:method;return f&&f.apply(scope||this,pre.concat(args))}};dojo.hitch=function(scope,method){if(arguments.length>2){return dojo._hitchArgs.apply(dojo,arguments)}if(!method){method=scope;scope=null}if(dojo.isString(method)){scope=scope||dojo.global;if(!scope[method]){throw (['dojo.hitch: scope["',method,'"] is null (scope="',scope,'")'].join(""))}return function(){return scope[method].apply(scope,arguments||[])}}return !scope?method:function(){return method.apply(scope,arguments||[])}};dojo.delegate=dojo._delegate=(function(){function TMP(){}return function(obj,props){TMP.prototype=obj;var tmp=new TMP();if(props){dojo._mixin(tmp,props)}return tmp}})();(function(){var efficient=function(obj,offset,startWith){return(startWith||[]).concat(Array.prototype.slice.call(obj,offset||0))};var slow=function(obj,offset,startWith){var arr=startWith||[];for(var x=offset||0;x<obj.length;x++){arr.push(obj[x])}return arr};dojo._toArray=dojo.isIE?function(obj){return((obj.item)?slow:efficient).apply(this,arguments)}:efficient})();dojo.partial=function(method){var arr=[null];return dojo.hitch.apply(dojo,arr.concat(dojo._toArray(arguments)))};dojo.clone=function(o){if(!o){return o}if(dojo.isArray(o)){var r=[];for(var i=0;i<o.length;++i){r.push(dojo.clone(o[i]))}return r}if(!dojo.isObject(o)){return o}if(o.nodeType&&o.cloneNode){return o.cloneNode(true)}if(o instanceof Date){return new Date(o.getTime())}r=new o.constructor();for(i in o){if(!(i in r)||r[i]!=o[i]){r[i]=dojo.clone(o[i])}}return r};dojo.trim=String.prototype.trim?function(str){return str.trim()}:function(str){return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}}if(!dojo._hasResource["dojo._base.declare"]){dojo._hasResource["dojo._base.declare"]=true;dojo.provide("dojo._base.declare");dojo.declare=function(className,superclass,props){var dd=arguments.callee,mixins;if(dojo.isArray(superclass)){mixins=superclass;superclass=mixins.shift()}if(mixins){dojo.forEach(mixins,function(m,i){if(!m){throw (className+": mixin #"+i+" is null")}superclass=dd._delegate(superclass,m)})}var ctor=dd._delegate(superclass);props=props||{};ctor.extend(props);dojo.extend(ctor,{declaredClass:className,_constructor:props.constructor});ctor.prototype.constructor=ctor;return dojo.setObject(className,ctor)};dojo.mixin(dojo.declare,{_delegate:function(base,mixin){var bp=(base||0).prototype,mp=(mixin||0).prototype,dd=dojo.declare;var ctor=dd._makeCtor();dojo.mixin(ctor,{superclass:bp,mixin:mp,extend:dd._extend});if(base){ctor.prototype=dojo._delegate(bp)}dojo.extend(ctor,dd._core,mp||0,{_constructor:null,preamble:null});ctor.prototype.constructor=ctor;ctor.prototype.declaredClass=(bp||0).declaredClass+"_"+(mp||0).declaredClass;return ctor},_extend:function(props){var i,fn;for(i in props){if(dojo.isFunction(fn=props[i])&&!0[i]){fn.nom=i;fn.ctor=this}}dojo.extend(this,props)},_makeCtor:function(){return function(){this._construct(arguments)}},_core:{_construct:function(args){var c=args.callee,s=c.superclass,ct=s&&s.constructor,m=c.mixin,mct=m&&m.constructor,a=args,ii,fn;if(a[0]){if(((fn=a[0].preamble))){a=fn.apply(this,a)||a}}if((fn=c.prototype.preamble)){a=fn.apply(this,a)||a}if(ct&&ct.apply){ct.apply(this,a)}if(mct&&mct.apply){mct.apply(this,a)}if((ii=c.prototype._constructor)){ii.apply(this,args)}if(this.constructor.prototype==c.prototype&&(ct=this.postscript)){ct.apply(this,args)}},_findMixin:function(mixin){var c=this.constructor,p,m;while(c){p=c.superclass;m=c.mixin;if(m==mixin||(m instanceof mixin.constructor)){return p}if(m&&m._findMixin&&(m=m._findMixin(mixin))){return m}c=p&&p.constructor}},_findMethod:function(name,method,ptype,has){var p=ptype,c,m,f;do{c=p.constructor;m=c.mixin;if(m&&(m=this._findMethod(name,method,m,has))){return m}if((f=p[name])&&(has==(f==method))){return p}p=c.superclass}while(p);return !has&&(p=this._findMixin(ptype))&&this._findMethod(name,method,p,has)},inherited:function(name,args,newArgs){var a=arguments;if(!dojo.isString(a[0])){newArgs=args;args=name;name=args.callee.nom}a=newArgs||args;var c=args.callee,p=this.constructor.prototype,fn,mp;if(this[name]!=c||p[name]==c){mp=(c.ctor||0).superclass||this._findMethod(name,c,p,true);if(!mp){throw (this.declaredClass+': inherited method "'+name+'" mismatch')}p=this._findMethod(name,c,mp,false)}fn=p&&p[name];if(!fn){throw (mp.declaredClass+': inherited method "'+name+'" not found')}return fn.apply(this,a)}}})}if(!dojo._hasResource["dojo._base.connect"]){dojo._hasResource["dojo._base.connect"]=true;dojo.provide("dojo._base.connect");dojo._listener={getDispatcher:function(){return function(){var ap=Array.prototype,c=arguments.callee,ls=c._listeners,t=c.target;var r=t&&t.apply(this,arguments);var lls;lls=[].concat(ls);for(var i in lls){if(!(i in ap)){lls[i].apply(this,arguments)}}return r}},add:function(source,method,listener){source=source||dojo.global;var f=source[method];if(!f||!f._listeners){var d=dojo._listener.getDispatcher();d.target=f;d._listeners=[];f=source[method]=d}return f._listeners.push(listener)},remove:function(source,method,handle){var f=(source||dojo.global)[method];if(f&&f._listeners&&handle--){delete f._listeners[handle]}}};dojo.connect=function(obj,event,context,method,dontFix){var a=arguments,args=[],i=0;args.push(dojo.isString(a[0])?null:a[i++],a[i++]);var a1=a[i+1];args.push(dojo.isString(a1)||dojo.isFunction(a1)?a[i++]:null,a[i++]);for(var l=a.length;i<l;i++){args.push(a[i])}return dojo._connect.apply(this,args)};dojo._connect=function(obj,event,context,method){var l=dojo._listener,h=l.add(obj,event,dojo.hitch(context,method));return[obj,event,h,l]};dojo.disconnect=function(handle){if(handle&&handle[0]!==undefined){dojo._disconnect.apply(this,handle);delete handle[0]}};dojo._disconnect=function(obj,event,handle,listener){listener.remove(obj,event,handle)};dojo._topics={};dojo.subscribe=function(topic,context,method){return[topic,dojo._listener.add(dojo._topics,topic,dojo.hitch(context,method))]};dojo.unsubscribe=function(handle){if(handle){dojo._listener.remove(dojo._topics,handle[0],handle[1])}};dojo.publish=function(topic,args){var f=dojo._topics[topic];if(f){f.apply(this,args||[])}};dojo.connectPublisher=function(topic,obj,event){var pf=function(){dojo.publish(topic,arguments)};return(event)?dojo.connect(obj,event,pf):dojo.connect(obj,pf)}}if(!dojo._hasResource["dojo._base.Deferred"]){dojo._hasResource["dojo._base.Deferred"]=true;dojo.provide("dojo._base.Deferred");dojo.Deferred=function(canceller){this.chain=[];this.id=this._nextId();this.fired=-1;this.paused=0;this.results=[null,null];this.canceller=canceller;this.silentlyCancelled=false};dojo.extend(dojo.Deferred,{_nextId:(function(){var n=1;return function(){return n++}})(),cancel:function(){var err;if(this.fired==-1){if(this.canceller){err=this.canceller(this)}else{this.silentlyCancelled=true}if(this.fired==-1){if(!(err instanceof Error)){var res=err;var msg="Deferred Cancelled";if(err&&err.toString){msg+=": "+err.toString()}err=new Error(msg);err.dojoType="cancel";err.cancelResult=res}this.errback(err)}}else{if((this.fired==0)&&(this.results[0] instanceof dojo.Deferred)){this.results[0].cancel()}}},_resback:function(res){this.fired=((res instanceof Error)?1:0);this.results[this.fired]=res;this._fire()},_check:function(){if(this.fired!=-1){if(!this.silentlyCancelled){throw new Error("already called!")}this.silentlyCancelled=false;return}},callback:function(res){this._check();this._resback(res)},errback:function(res){this._check();if(!(res instanceof Error)){res=new Error(res)}this._resback(res)},addBoth:function(cb,cbfn){var enclosed=dojo.hitch.apply(dojo,arguments);return this.addCallbacks(enclosed,enclosed)},addCallback:function(cb,cbfn){return this.addCallbacks(dojo.hitch.apply(dojo,arguments))},addErrback:function(cb,cbfn){return this.addCallbacks(null,dojo.hitch.apply(dojo,arguments))},addCallbacks:function(cb,eb){this.chain.push([cb,eb]);if(this.fired>=0){this._fire()}return this},_fire:function(){var chain=this.chain;var fired=this.fired;var res=this.results[fired];var self=this;var cb=null;while((chain.length>0)&&(this.paused==0)){var f=chain.shift()[fired];if(!f){continue}var func=function(){var ret=f(res);if(typeof ret!="undefined"){res=ret}fired=((res instanceof Error)?1:0);if(res instanceof dojo.Deferred){cb=function(res){self._resback(res);self.paused--;if((self.paused==0)&&(self.fired>=0)){self._fire()}};this.paused++}};if(dojo.config.debugAtAllCosts){func.call(this)}else{try{func.call(this)}catch(err){fired=1;res=err}}}this.fired=fired;this.results[fired]=res;if((cb)&&(this.paused)){res.addBoth(cb)}}})}if(!dojo._hasResource["dojo._base.json"]){dojo._hasResource["dojo._base.json"]=true;dojo.provide("dojo._base.json");dojo.fromJson=function(json){return eval("("+json+")")};dojo._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.toJsonIndentStr="\t";dojo.toJson=function(it,prettyPrint,_indentStr){if(it===undefined){return"undefined"}var objtype=typeof it;if(objtype=="number"||objtype=="boolean"){return it+""}if(it===null){return"null"}if(dojo.isString(it)){return dojo._escapeString(it)}var recurse=arguments.callee;var newObj;_indentStr=_indentStr||"";var nextIndent=prettyPrint?_indentStr+dojo.toJsonIndentStr:"";var tf=it.__json__||it.json;if(dojo.isFunction(tf)){newObj=tf.call(it);if(it!==newObj){return recurse(newObj,prettyPrint,nextIndent)}}if(it.nodeType&&it.cloneNode){throw new Error("Can't serialize DOM nodes")}var sep=prettyPrint?" ":"";var newLine=prettyPrint?"\n":"";if(dojo.isArray(it)){var res=dojo.map(it,function(obj){var val=recurse(obj,prettyPrint,nextIndent);if(typeof val!="string"){val="undefined"}return newLine+nextIndent+val});return"["+res.join(","+sep)+newLine+_indentStr+"]"}if(objtype=="function"){return null}var output=[],key;for(key in it){var keyStr,val;if(typeof key=="number"){keyStr='"'+key+'"'}else{if(typeof key=="string"){keyStr=dojo._escapeString(key)}else{continue}}val=recurse(it[key],prettyPrint,nextIndent);if(typeof val!="string"){continue}output.push(newLine+nextIndent+keyStr+":"+sep+val)}return"{"+output.join(","+sep)+newLine+_indentStr+"}"}}if(!dojo._hasResource["dojo._base.array"]){dojo._hasResource["dojo._base.array"]=true;dojo.provide("dojo._base.array");(function(){var _getParts=function(arr,obj,cb){return[dojo.isString(arr)?arr.split(""):arr,obj||dojo.global,dojo.isString(cb)?new Function("item","index","array",cb):cb]};dojo.mixin(dojo,{indexOf:function(array,value,fromIndex,findLast){var step=1,end=array.length||0,i=0;if(findLast){i=end-1;step=end=-1}if(fromIndex!=undefined){i=fromIndex}if((findLast&&i>end)||i<end){for(;i!=end;i+=step){if(array[i]==value){return i}}}return -1},lastIndexOf:function(array,value,fromIndex){return dojo.indexOf(array,value,fromIndex,true)},forEach:function(arr,callback,thisObject){if(!arr||!arr.length){return}var _p=_getParts(arr,thisObject,callback);arr=_p[0];for(var i=0,l=arr.length;i<l;++i){_p[2].call(_p[1],arr[i],i,arr)}},_everyOrSome:function(every,arr,callback,thisObject){var _p=_getParts(arr,thisObject,callback);arr=_p[0];for(var i=0,l=arr.length;i<l;++i){var result=!!_p[2].call(_p[1],arr[i],i,arr);if(every^result){return result}}return every},every:function(arr,callback,thisObject){return dojo._everyOrSome(true,arr,callback,thisObject)},some:function(arr,callback,thisObject){return dojo._everyOrSome(false,arr,callback,thisObject)},map:function(arr,callback,thisObject){var _p=_getParts(arr,thisObject,callback);arr=_p[0];var outArr=(arguments[3]?(new arguments[3]()):[]);for(var i=0,l=arr.length;i<l;++i){outArr.push(_p[2].call(_p[1],arr[i],i,arr))}return outArr},filter:function(arr,callback,thisObject){var _p=_getParts(arr,thisObject,callback);arr=_p[0];var outArr=[];for(var i=0,l=arr.length;i<l;++i){if(_p[2].call(_p[1],arr[i],i,arr)){outArr.push(arr[i])}}return outArr}})})()}if(!dojo._hasResource["dojo._base.Color"]){dojo._hasResource["dojo._base.Color"]=true;dojo.provide("dojo._base.Color");(function(){var d=dojo;dojo.Color=function(color){if(color){this.setColor(color)}};dojo.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255]};dojo.extend(dojo.Color,{r:255,g:255,b:255,a:1,_set:function(r,g,b,a){var t=this;t.r=r;t.g=g;t.b=b;t.a=a},setColor:function(color){if(d.isString(color)){d.colorFromString(color,this)}else{if(d.isArray(color)){d.colorFromArray(color,this)}else{this._set(color.r,color.g,color.b,color.a);if(!(color instanceof d.Color)){this.sanitize()}}}return this},sanitize:function(){return this},toRgb:function(){var t=this;return[t.r,t.g,t.b]},toRgba:function(){var t=this;return[t.r,t.g,t.b,t.a]},toHex:function(){var arr=d.map(["r","g","b"],function(x){var s=this[x].toString(16);return s.length<2?"0"+s:s},this);return"#"+arr.join("")},toCss:function(includeAlpha){var t=this,rgb=t.r+", "+t.g+", "+t.b;return(includeAlpha?"rgba("+rgb+", "+t.a:"rgb("+rgb)+")"},toString:function(){return this.toCss(true)}});dojo.blendColors=function(start,end,weight,obj){var t=obj||new d.Color();d.forEach(["r","g","b","a"],function(x){t[x]=start[x]+(end[x]-start[x])*weight;if(x!="a"){t[x]=Math.round(t[x])}});return t.sanitize()};dojo.colorFromRgb=function(color,obj){var m=color.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return m&&dojo.colorFromArray(m[1].split(/\s*,\s*/),obj)};dojo.colorFromHex=function(color,obj){var t=obj||new d.Color(),bits=(color.length==4)?4:8,mask=(1<<bits)-1;color=Number("0x"+color.substr(1));if(isNaN(color)){return null}d.forEach(["b","g","r"],function(x){var c=color&mask;color>>=bits;t[x]=bits==4?17*c:c});t.a=1;return t};dojo.colorFromArray=function(a,obj){var t=obj||new d.Color();t._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));if(isNaN(t.a)){t.a=1}return t.sanitize()};dojo.colorFromString=function(str,obj){var a=d.Color.named[str];return a&&d.colorFromArray(a,obj)||d.colorFromRgb(str,obj)||d.colorFromHex(str,obj)}})()}if(!dojo._hasResource["dojo._base"]){dojo._hasResource["dojo._base"]=true;dojo.provide("dojo._base")}if(!dojo._hasResource["dojo._base.window"]){dojo._hasResource["dojo._base.window"]=true;dojo.provide("dojo._base.window");dojo.doc=window.document||null;dojo.body=function(){return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0]};dojo.setContext=function(globalObject,globalDocument){dojo.global=globalObject;dojo.doc=globalDocument};dojo.withGlobal=function(globalObject,callback,thisObject,cbArguments){var oldGlob=dojo.global;try{dojo.global=globalObject;return dojo.withDoc.call(null,globalObject.document,callback,thisObject,cbArguments)}finally{dojo.global=oldGlob}};dojo.withDoc=function(documentObject,callback,thisObject,cbArguments){var oldDoc=dojo.doc,oldLtr=dojo._bodyLtr;try{dojo.doc=documentObject;delete dojo._bodyLtr;if(thisObject&&dojo.isString(callback)){callback=thisObject[callback]}return callback.apply(thisObject,cbArguments||[])}finally{dojo.doc=oldDoc;if(oldLtr!==undefined){dojo._bodyLtr=oldLtr}}}}if(!dojo._hasResource["dojo._base.event"]){dojo._hasResource["dojo._base.event"]=true;dojo.provide("dojo._base.event");(function(){var del=(dojo._event_listener={add:function(node,name,fp){if(!node){return}name=del._normalizeEventName(name);fp=del._fixCallback(name,fp);var oname=name;if(!dojo.isIE&&(name=="mouseenter"||name=="mouseleave")){var ofp=fp;name=(name=="mouseenter")?"mouseover":"mouseout";fp=function(e){if(dojo.isFF<=2){try{e.relatedTarget.tagName}catch(e2){return}}if(!dojo.isDescendant(e.relatedTarget,node)){return ofp.call(this,e)}}}node.addEventListener(name,fp,false);return fp},remove:function(node,event,handle){if(node){event=del._normalizeEventName(event);if(!dojo.isIE&&(event=="mouseenter"||event=="mouseleave")){event=(event=="mouseenter")?"mouseover":"mouseout"}node.removeEventListener(event,handle,false)}},_normalizeEventName:function(name){return name.slice(0,2)=="on"?name.slice(2):name},_fixCallback:function(name,fp){return name!="keypress"?fp:function(e){return fp.call(this,del._fixEvent(e,this))}},_fixEvent:function(evt,sender){switch(evt.type){case"keypress":del._setKeyChar(evt);break}return evt},_setKeyChar:function(evt){evt.keyChar=evt.charCode?String.fromCharCode(evt.charCode):"";evt.charOrCode=evt.keyChar||evt.keyCode},_punctMap:{106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39}});dojo.fixEvent=function(evt,sender){return del._fixEvent(evt,sender)};dojo.stopEvent=function(evt){evt.preventDefault();evt.stopPropagation()};var node_listener=dojo._listener;dojo._connect=function(obj,event,context,method,dontFix){var isNode=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);var lid=isNode?(dontFix?2:1):0,l=[dojo._listener,del,node_listener][lid];var h=l.add(obj,event,dojo.hitch(context,method));return[obj,event,h,lid]};dojo._disconnect=function(obj,event,handle,listener){([dojo._listener,del,node_listener][listener]).remove(obj,event,handle)};dojo.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145};if(dojo.isIE){var _trySetKeyCode=function(e,code){try{return(e.keyCode=code)}catch(e){return 0}};var iel=dojo._listener;var listenersName=(dojo._ieListenersName="_"+dojo._scopeName+"_listeners");if(!dojo.config._allow_leaks){node_listener=iel=dojo._ie_listener={handlers:[],add:function(source,method,listener){source=source||dojo.global;var f=source[method];if(!f||!f[listenersName]){var d=dojo._getIeDispatcher();d.target=f&&(ieh.push(f)-1);d[listenersName]=[];f=source[method]=d}return f[listenersName].push(ieh.push(listener)-1)},remove:function(source,method,handle){var f=(source||dojo.global)[method],l=f&&f[listenersName];if(f&&l&&handle--){delete ieh[l[handle]];delete l[handle]}}};var ieh=iel.handlers}dojo.mixin(del,{add:function(node,event,fp){if(!node){return}event=del._normalizeEventName(event);if(event=="onkeypress"){var kd=node.onkeydown;if(!kd||!kd[listenersName]||!kd._stealthKeydownHandle){var h=del.add(node,"onkeydown",del._stealthKeyDown);kd=node.onkeydown;kd._stealthKeydownHandle=h;kd._stealthKeydownRefs=1}else{kd._stealthKeydownRefs++}}return iel.add(node,event,del._fixCallback(fp))},remove:function(node,event,handle){event=del._normalizeEventName(event);iel.remove(node,event,handle);if(event=="onkeypress"){var kd=node.onkeydown;if(--kd._stealthKeydownRefs<=0){iel.remove(node,"onkeydown",kd._stealthKeydownHandle);delete kd._stealthKeydownHandle}}},_normalizeEventName:function(eventName){return eventName.slice(0,2)!="on"?"on"+eventName:eventName},_nop:function(){},_fixEvent:function(evt,sender){if(!evt){var w=sender&&(sender.ownerDocument||sender.document||sender).parentWindow||window;evt=w.event}if(!evt){return(evt)}evt.target=evt.srcElement;evt.currentTarget=(sender||evt.srcElement);evt.layerX=evt.offsetX;evt.layerY=evt.offsetY;var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;var docBody=((dojo.isIE<6)||(doc.compatMode=="BackCompat"))?doc.body:doc.documentElement;var offset=dojo._getIeDocumentElementOffset();evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(docBody.scrollLeft||0)-offset.x;evt.pageY=evt.clientY+(docBody.scrollTop||0)-offset.y;if(evt.type=="mouseover"){evt.relatedTarget=evt.fromElement}if(evt.type=="mouseout"){evt.relatedTarget=evt.toElement}evt.stopPropagation=del._stopPropagation;evt.preventDefault=del._preventDefault;return del._fixKeys(evt)},_fixKeys:function(evt){switch(evt.type){case"keypress":var c=("charCode" in evt?evt.charCode:evt.keyCode);if(c==10){c=0;evt.keyCode=13}else{if(c==13||c==27){c=0}else{if(c==3){c=99}}}evt.charCode=c;del._setKeyChar(evt);break}return evt},_stealthKeyDown:function(evt){var kp=evt.currentTarget.onkeypress;if(!kp||!kp[listenersName]){return}var k=evt.keyCode;var unprintable=k!=13&&k!=32&&k!=27&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(unprintable||evt.ctrlKey){var c=unprintable?0:k;if(evt.ctrlKey){if(k==3||k==13){return}else{if(c>95&&c<106){c-=48}else{if((!evt.shiftKey)&&(c>=65&&c<=90)){c+=32}else{c=del._punctMap[c]||c}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});kp.call(evt.currentTarget,faux);evt.cancelBubble=faux.cancelBubble;evt.returnValue=faux.returnValue;_trySetKeyCode(evt,faux.keyCode)}},_stopPropagation:function(){this.cancelBubble=true},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey){_trySetKeyCode(this,0)}this.returnValue=false}});dojo.stopEvent=function(evt){evt=evt||window.event;del._stopPropagation.call(evt);del._preventDefault.call(evt)}}del._synthesizeEvent=function(evt,props){var faux=dojo.mixin({},evt,props);del._setKeyChar(faux);faux.preventDefault=function(){evt.preventDefault()};faux.stopPropagation=function(){evt.stopPropagation()};return faux};if(dojo.isOpera){dojo.mixin(del,{_fixEvent:function(evt,sender){switch(evt.type){case"keypress":var c=evt.which;if(c==3){c=99}c=c<41&&!evt.shiftKey?0:c;if(evt.ctrlKey&&!evt.shiftKey&&c>=65&&c<=90){c+=32}return del._synthesizeEvent(evt,{charCode:c})}return evt}})}if(dojo.isWebKit){del._add=del.add;del._remove=del.remove;dojo.mixin(del,{add:function(node,event,fp){if(!node){return}var handle=del._add(node,event,fp);if(del._normalizeEventName(event)=="keypress"){handle._stealthKeyDownHandle=del._add(node,"keydown",function(evt){var k=evt.keyCode;var unprintable=k!=13&&k!=32&&k!=27&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(unprintable||evt.ctrlKey){var c=unprintable?0:k;if(evt.ctrlKey){if(k==3||k==13){return}else{if(c>95&&c<106){c-=48}else{if(!evt.shiftKey&&c>=65&&c<=90){c+=32}else{c=del._punctMap[c]||c}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});fp.call(evt.currentTarget,faux)}})}return handle},remove:function(node,event,handle){if(node){if(handle._stealthKeyDownHandle){del._remove(node,"keydown",handle._stealthKeyDownHandle)}del._remove(node,event,handle)}},_fixEvent:function(evt,sender){switch(evt.type){case"keypress":if(evt.faux){return evt}var c=evt.charCode;c=c>=32?c:0;return del._synthesizeEvent(evt,{charCode:c,faux:true})}return evt}})}})();if(dojo.isIE){dojo._ieDispatcher=function(args,sender){var ap=Array.prototype,h=dojo._ie_listener.handlers,c=args.callee,ls=c[dojo._ieListenersName],t=h[c.target];var r=t&&t.apply(sender,args);var lls=[].concat(ls);for(var i in lls){var f=h[lls[i]];if(!(i in ap)&&f){f.apply(sender,args)}}return r};dojo._getIeDispatcher=function(){return new Function(dojo._scopeName+"._ieDispatcher(arguments, this)")};dojo._event_listener._fixCallback=function(fp){var f=dojo._event_listener._fixEvent;return function(e){return fp.call(this,f(e,this))}}}}if(!dojo._hasResource["dojo._base.html"]){dojo._hasResource["dojo._base.html"]=true;dojo.provide("dojo._base.html");try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}if(dojo.isIE||dojo.isOpera){dojo.byId=function(id,doc){if(dojo.isString(id)){var _d=doc||dojo.doc;var te=_d.getElementById(id);if(te&&(te.attributes.id.value==id||te.id==id)){return te}else{var eles=_d.all[id];if(!eles||eles.nodeName){eles=[eles]}var i=0;while((te=eles[i++])){if((te.attributes&&te.attributes.id&&te.attributes.id.value==id)||te.id==id){return te}}}}else{return id}}}else{dojo.byId=function(id,doc){return dojo.isString(id)?(doc||dojo.doc).getElementById(id):id}}(function(){var d=dojo;var _destroyContainer=null;d.addOnWindowUnload(function(){_destroyContainer=null});dojo._destroyElement=dojo.destroy=function(node){node=d.byId(node);try{if(!_destroyContainer||_destroyContainer.ownerDocument!=node.ownerDocument){_destroyContainer=node.ownerDocument.createElement("div")}_destroyContainer.appendChild(node.parentNode?node.parentNode.removeChild(node):node);_destroyContainer.innerHTML=""}catch(e){}};dojo.isDescendant=function(node,ancestor){try{node=d.byId(node);ancestor=d.byId(ancestor);while(node){if(node===ancestor){return true}node=node.parentNode}}catch(e){}return false};dojo.setSelectable=function(node,selectable){node=d.byId(node);if(d.isMozilla){node.style.MozUserSelect=selectable?"":"none"}else{if(d.isKhtml||d.isWebKit){node.style.KhtmlUserSelect=selectable?"auto":"none"}else{if(d.isIE){var v=(node.unselectable=selectable?"":"on");d.query("*",node).forEach("item.unselectable = '"+v+"'")}}}};var _insertBefore=function(node,ref){var parent=ref.parentNode;if(parent){parent.insertBefore(node,ref)}};var _insertAfter=function(node,ref){var parent=ref.parentNode;if(parent){if(parent.lastChild==ref){parent.appendChild(node)}else{parent.insertBefore(node,ref.nextSibling)}}};dojo.place=function(node,refNode,position){refNode=d.byId(refNode);if(d.isString(node)){node=node.charAt(0)=="<"?d._toDom(node,refNode.ownerDocument):d.byId(node)}if(typeof position=="number"){var cn=refNode.childNodes;if(!cn.length||cn.length<=position){refNode.appendChild(node)}else{_insertBefore(node,cn[position<0?0:position])}}else{switch(position){case"before":_insertBefore(node,refNode);break;case"after":_insertAfter(node,refNode);break;case"replace":refNode.parentNode.replaceChild(node,refNode);break;case"only":d.empty(refNode);refNode.appendChild(node);break;case"first":if(refNode.firstChild){_insertBefore(node,refNode.firstChild);break}default:refNode.appendChild(node)}}return node};dojo.boxModel="content-box";if(d.isIE){var _dcm=document.compatMode;d.boxModel=_dcm=="BackCompat"||_dcm=="QuirksMode"||d.isIE<6?"border-box":"content-box"}var gcs;if(d.isWebKit){gcs=function(node){var s;if(node.nodeType==1){var dv=node.ownerDocument.defaultView;s=dv.getComputedStyle(node,null);if(!s&&node.style){node.style.display="";s=dv.getComputedStyle(node,null)}}return s||{}}}else{if(d.isIE){gcs=function(node){return node.nodeType==1?node.currentStyle:{}}}else{gcs=function(node){return node.nodeType==1?node.ownerDocument.defaultView.getComputedStyle(node,null):{}}}}dojo.getComputedStyle=gcs;if(!d.isIE){d._toPixelValue=function(element,value){return parseFloat(value)||0}}else{d._toPixelValue=function(element,avalue){if(!avalue){return 0}if(avalue=="medium"){return 4}if(avalue.slice&&avalue.slice(-2)=="px"){return parseFloat(avalue)}with(element){var sLeft=style.left;var rsLeft=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=avalue;avalue=style.pixelLeft}catch(e){avalue=0}style.left=sLeft;runtimeStyle.left=rsLeft}return avalue}}var px=d._toPixelValue;var astr="DXImageTransform.Microsoft.Alpha";var af=function(n,f){try{return n.filters.item(astr)}catch(e){return f?{}:null}};dojo._getOpacity=d.isIE?function(node){try{return af(node).Opacity/100}catch(e){return 1}}:function(node){return gcs(node).opacity};dojo._setOpacity=d.isIE?function(node,opacity){var ov=opacity*100;node.style.zoom=1;af(node,1).Enabled=!(opacity==1);if(!af(node)){node.style.filter+=" progid:"+astr+"(Opacity="+ov+")"}else{af(node,1).Opacity=ov}if(node.nodeName.toLowerCase()=="tr"){d.query("> td",node).forEach(function(i){d._setOpacity(i,opacity)})}return opacity}:function(node,opacity){return node.style.opacity=opacity};var _pixelNamesCache={left:true,top:true};var _pixelRegExp=/margin|padding|width|height|max|min|offset/;var _toStyleValue=function(node,type,value){type=type.toLowerCase();if(d.isIE){if(value=="auto"){if(type=="height"){return node.offsetHeight}if(type=="width"){return node.offsetWidth}}if(type=="fontweight"){switch(value){case 700:return"bold";case 400:default:return"normal"}}}if(!(type in _pixelNamesCache)){_pixelNamesCache[type]=_pixelRegExp.test(type)}return _pixelNamesCache[type]?px(node,value):value};var _floatStyle=d.isIE?"styleFloat":"cssFloat",_floatAliases={cssFloat:_floatStyle,styleFloat:_floatStyle,"float":_floatStyle};dojo.style=function(node,style,value){var n=d.byId(node),args=arguments.length,op=(style=="opacity");style=_floatAliases[style]||style;if(args==3){return op?d._setOpacity(n,value):n.style[style]=value}if(args==2&&op){return d._getOpacity(n)}var s=gcs(n);if(args==2&&!d.isString(style)){for(var x in style){d.style(node,x,style[x])}return s}return(args==1)?s:_toStyleValue(n,style,s[style]||n.style[style])};dojo._getPadExtents=function(n,computedStyle){var s=computedStyle||gcs(n),l=px(n,s.paddingLeft),t=px(n,s.paddingTop);return{l:l,t:t,w:l+px(n,s.paddingRight),h:t+px(n,s.paddingBottom)}};dojo._getBorderExtents=function(n,computedStyle){var ne="none",s=computedStyle||gcs(n),bl=(s.borderLeftStyle!=ne?px(n,s.borderLeftWidth):0),bt=(s.borderTopStyle!=ne?px(n,s.borderTopWidth):0);return{l:bl,t:bt,w:bl+(s.borderRightStyle!=ne?px(n,s.borderRightWidth):0),h:bt+(s.borderBottomStyle!=ne?px(n,s.borderBottomWidth):0)}};dojo._getPadBorderExtents=function(n,computedStyle){var s=computedStyle||gcs(n),p=d._getPadExtents(n,s),b=d._getBorderExtents(n,s);return{l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h}};dojo._getMarginExtents=function(n,computedStyle){var s=computedStyle||gcs(n),l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);if(d.isWebKit&&(s.position!="absolute")){r=l}return{l:l,t:t,w:l+r,h:t+b}};dojo._getMarginBox=function(node,computedStyle){var s=computedStyle||gcs(node),me=d._getMarginExtents(node,s);var l=node.offsetLeft-me.l,t=node.offsetTop-me.t,p=node.parentNode;if(d.isMoz){var sl=parseFloat(s.left),st=parseFloat(s.top);if(!isNaN(sl)&&!isNaN(st)){l=sl,t=st}else{if(p&&p.style){var pcs=gcs(p);if(pcs.overflow!="visible"){var be=d._getBorderExtents(p,pcs);l+=be.l,t+=be.t}}}}else{if(d.isOpera||(d.isIE>7&&!d.isQuirks)){if(p){be=d._getBorderExtents(p);l-=be.l;t-=be.t}}}return{l:l,t:t,w:node.offsetWidth+me.w,h:node.offsetHeight+me.h}};dojo._getContentBox=function(node,computedStyle){var s=computedStyle||gcs(node),pe=d._getPadExtents(node,s),be=d._getBorderExtents(node,s),w=node.clientWidth,h;if(!w){w=node.offsetWidth,h=node.offsetHeight}else{h=node.clientHeight,be.w=be.h=0}if(d.isOpera){pe.l+=be.l;pe.t+=be.t}return{l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h}};dojo._getBorderBox=function(node,computedStyle){var s=computedStyle||gcs(node),pe=d._getPadExtents(node,s),cb=d._getContentBox(node,s);return{l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h}};dojo._setBox=function(node,l,t,w,h,u){u=u||"px";var s=node.style;if(!isNaN(l)){s.left=l+u}if(!isNaN(t)){s.top=t+u}if(w>=0){s.width=w+u}if(h>=0){s.height=h+u}};dojo._isButtonTag=function(node){return node.tagName=="BUTTON"||node.tagName=="INPUT"&&node.getAttribute("type").toUpperCase()=="BUTTON"};dojo._usesBorderBox=function(node){var n=node.tagName;return d.boxModel=="border-box"||n=="TABLE"||d._isButtonTag(node)};dojo._setContentSize=function(node,widthPx,heightPx,computedStyle){if(d._usesBorderBox(node)){var pb=d._getPadBorderExtents(node,computedStyle);if(widthPx>=0){widthPx+=pb.w}if(heightPx>=0){heightPx+=pb.h}}d._setBox(node,NaN,NaN,widthPx,heightPx)};dojo._setMarginBox=function(node,leftPx,topPx,widthPx,heightPx,computedStyle){var s=computedStyle||gcs(node),bb=d._usesBorderBox(node),pb=bb?_nilExtents:d._getPadBorderExtents(node,s);if(d.isWebKit){if(d._isButtonTag(node)){var ns=node.style;if(widthPx>=0&&!ns.width){ns.width="4px"}if(heightPx>=0&&!ns.height){ns.height="4px"}}}var mb=d._getMarginExtents(node,s);if(widthPx>=0){widthPx=Math.max(widthPx-pb.w-mb.w,0)}if(heightPx>=0){heightPx=Math.max(heightPx-pb.h-mb.h,0)}d._setBox(node,leftPx,topPx,widthPx,heightPx)};var _nilExtents={l:0,t:0,w:0,h:0};dojo.marginBox=function(node,box){var n=d.byId(node),s=gcs(n),b=box;return !b?d._getMarginBox(n,s):d._setMarginBox(n,b.l,b.t,b.w,b.h,s)};dojo.contentBox=function(node,box){var n=d.byId(node),s=gcs(n),b=box;return !b?d._getContentBox(n,s):d._setContentSize(n,b.w,b.h,s)};var _sumAncestorProperties=function(node,prop){if(!(node=(node||0).parentNode)){return 0}var val,retVal=0,_b=d.body();while(node&&node.style){if(gcs(node).position=="fixed"){return 0}val=node[prop];if(val){retVal+=val-0;if(node==_b){break}}node=node.parentNode}return retVal};dojo._docScroll=function(){var _b=d.body(),_w=d.global,de=d.doc.documentElement;return{y:(_w.pageYOffset||de.scrollTop||_b.scrollTop||0),x:(_w.pageXOffset||d._fixIeBiDiScrollLeft(de.scrollLeft)||_b.scrollLeft||0)}};dojo._isBodyLtr=function(){return("_bodyLtr" in d)?d._bodyLtr:d._bodyLtr=gcs(d.body()).direction=="ltr"};dojo._getIeDocumentElementOffset=function(){var de=d.doc.documentElement;if(d.isIE<7){return{x:d._isBodyLtr()||window.parent==window?de.clientLeft:de.offsetWidth-de.clientWidth-de.clientLeft,y:de.clientTop}}else{if(d.isIE<8){return{x:de.getBoundingClientRect().left,y:de.getBoundingClientRect().top}}else{return{x:0,y:0}}}};dojo._fixIeBiDiScrollLeft=function(scrollLeft){var dd=d.doc;if(d.isIE<8&&!d._isBodyLtr()){var de=dd.compatMode=="BackCompat"?dd.body:dd.documentElement;return scrollLeft+de.clientWidth-de.scrollWidth}return scrollLeft};dojo._abs=function(node,includeScroll){var db=d.body(),dh=d.body().parentNode,ret;if(node.getBoundingClientRect){var client=node.getBoundingClientRect();ret={x:client.left,y:client.top};if(d.isFF>=3){var cs=gcs(dh);ret.x-=px(dh,cs.marginLeft)+px(dh,cs.borderLeftWidth);ret.y-=px(dh,cs.marginTop)+px(dh,cs.borderTopWidth)}if(d.isIE){var offset=d._getIeDocumentElementOffset();ret.x-=offset.x+(d.isQuirks?db.clientLeft:0);ret.y-=offset.y+(d.isQuirks?db.clientTop:0)}}else{ret={x:0,y:0};if(node.offsetParent){ret.x-=_sumAncestorProperties(node,"scrollLeft");ret.y-=_sumAncestorProperties(node,"scrollTop");var curnode=node;do{var n=curnode.offsetLeft,t=curnode.offsetTop;ret.x+=isNaN(n)?0:n;ret.y+=isNaN(t)?0:t;cs=gcs(curnode);if(curnode!=node){if(d.isFF){ret.x+=2*px(curnode,cs.borderLeftWidth);ret.y+=2*px(curnode,cs.borderTopWidth)}else{ret.x+=px(curnode,cs.borderLeftWidth);ret.y+=px(curnode,cs.borderTopWidth)}}if(d.isFF&&cs.position=="static"){var parent=curnode.parentNode;while(parent!=curnode.offsetParent){var pcs=gcs(parent);if(pcs.position=="static"){ret.x+=px(curnode,pcs.borderLeftWidth);ret.y+=px(curnode,pcs.borderTopWidth)}parent=parent.parentNode}}curnode=curnode.offsetParent}while((curnode!=dh)&&curnode)}else{if(node.x&&node.y){ret.x+=isNaN(node.x)?0:node.x;ret.y+=isNaN(node.y)?0:node.y}}}if(includeScroll){var scroll=d._docScroll();ret.x+=scroll.x;ret.y+=scroll.y}return ret};dojo.coords=function(node,includeScroll){var n=d.byId(node),s=gcs(n),mb=d._getMarginBox(n,s);var abs=d._abs(n,includeScroll);mb.x=abs.x;mb.y=abs.y;return mb};var ieLT8=d.isIE<8;var _fixAttrName=function(name){switch(name.toLowerCase()){case"tabindex":return ieLT8?"tabIndex":"tabindex";case"readonly":return"readOnly";case"class":return"className";case"for":case"htmlfor":return ieLT8?"htmlFor":"for";default:return name}};var _attrProps={colspan:"colSpan",enctype:"enctype",frameborder:"frameborder",method:"method",rowspan:"rowSpan",scrolling:"scrolling",shape:"shape",span:"span",type:"type",valuetype:"valueType",classname:"className",innerhtml:"innerHTML"};dojo.hasAttr=function(node,name){node=d.byId(node);var fixName=_fixAttrName(name);fixName=fixName=="htmlFor"?"for":fixName;var attr=node.getAttributeNode&&node.getAttributeNode(fixName);return attr?attr.specified:false};var _evtHdlrMap={},_ctr=0,_attrId=dojo._scopeName+"attrid",_roInnerHtml={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};dojo.attr=function(node,name,value){node=d.byId(node);var args=arguments.length;if(args==2&&!d.isString(name)){for(var x in name){d.attr(node,x,name[x])}return}name=_fixAttrName(name);if(args==3){if(d.isFunction(value)){var attrId=d.attr(node,_attrId);if(!attrId){attrId=_ctr++;d.attr(node,_attrId,attrId)}if(!_evtHdlrMap[attrId]){_evtHdlrMap[attrId]={}}var h=_evtHdlrMap[attrId][name];if(h){d.disconnect(h)}else{try{delete node[name]}catch(e){}}_evtHdlrMap[attrId][name]=d.connect(node,name,value)}else{if(typeof value=="boolean"){node[name]=value}else{if(name==="style"&&!d.isString(value)){d.style(node,value)}else{if(name=="className"){node.className=value}else{if(name==="innerHTML"){if(d.isIE&&node.tagName.toLowerCase() in _roInnerHtml){d.empty(node);node.appendChild(d._toDom(value,node.ownerDocument))}else{node[name]=value}}else{node.setAttribute(name,value)}}}}}}else{var prop=_attrProps[name.toLowerCase()];if(prop){return node[prop]}var attrValue=node[name];return(typeof attrValue=="boolean"||typeof attrValue=="function")?attrValue:(d.hasAttr(node,name)?node.getAttribute(name):null)}};dojo.removeAttr=function(node,name){d.byId(node).removeAttribute(_fixAttrName(name))};dojo.create=function(tag,attrs,refNode,pos){var doc=d.doc;if(refNode){refNode=d.byId(refNode);doc=refNode.ownerDocument}if(d.isString(tag)){tag=doc.createElement(tag)}if(attrs){d.attr(tag,attrs)}if(refNode){d.place(tag,refNode,pos)}return tag};d.empty=d.isIE?function(node){node=d.byId(node);for(var c;c=node.lastChild;){d.destroy(c)}}:function(node){d.byId(node).innerHTML=""};var tagWrap={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},reTag=/<\s*([\w\:]+)/,masterNode={},masterNum=0,masterName="__"+d._scopeName+"ToDomId";for(var param in tagWrap){var tw=tagWrap[param];tw.pre=param=="option"?'<select multiple="multiple">':"<"+tw.join("><")+">";tw.post="</"+tw.reverse().join("></")+">"}d._toDom=function(frag,doc){doc=doc||d.doc;var masterId=doc[masterName];if(!masterId){doc[masterName]=masterId=++masterNum+"";masterNode[masterId]=doc.createElement("div")}frag+="";var match=frag.match(reTag),tag=match?match[1].toLowerCase():"",master=masterNode[masterId],wrap,i,fc,df;if(match&&tagWrap[tag]){wrap=tagWrap[tag];master.innerHTML=wrap.pre+frag+wrap.post;for(i=wrap.length;i;--i){master=master.firstChild}}else{master.innerHTML=frag}if(master.childNodes.length==1){return master.removeChild(master.firstChild)}df=doc.createDocumentFragment();while(fc=master.firstChild){df.appendChild(fc)}return df};var _className="className";dojo.hasClass=function(node,classStr){return((" "+d.byId(node)[_className]+" ").indexOf(" "+classStr+" ")>=0)};dojo.addClass=function(node,classStr){node=d.byId(node);var cls=node[_className];if((" "+cls+" ").indexOf(" "+classStr+" ")<0){node[_className]=cls+(cls?" ":"")+classStr}};dojo.removeClass=function(node,classStr){node=d.byId(node);var t=d.trim((" "+node[_className]+" ").replace(" "+classStr+" "," "));if(node[_className]!=t){node[_className]=t}};dojo.toggleClass=function(node,classStr,condition){if(condition===undefined){condition=!d.hasClass(node,classStr)}d[condition?"addClass":"removeClass"](node,classStr)}})()}if(!dojo._hasResource["dojo._base.NodeList"]){dojo._hasResource["dojo._base.NodeList"]=true;dojo.provide("dojo._base.NodeList");(function(){var d=dojo;var ap=Array.prototype,aps=ap.slice,apc=ap.concat;var tnl=function(a){a.constructor=d.NodeList;dojo._mixin(a,d.NodeList.prototype);return a};var loopBody=function(f,a,o){a=[0].concat(aps.call(a,0));if(!a.sort){a=aps.call(a,0)}o=o||d.global;return function(node){a[0]=node;return f.apply(o,a)}};var adaptAsForEach=function(f,o){return function(){this.forEach(loopBody(f,arguments,o));return this}};var adaptAsMap=function(f,o){return function(){return this.map(loopBody(f,arguments,o))}};var adaptAsFilter=function(f,o){return function(){return this.filter(loopBody(f,arguments,o))}};var adaptWithCondition=function(f,g,o){return function(){var a=arguments,body=loopBody(f,a,o);if(g.call(o||d.global,a)){return this.map(body)}this.forEach(body);return this}};var magicGuard=function(a){return a.length==1&&d.isString(a[0])};var orphan=function(node){var p=node.parentNode;if(p){p.removeChild(node)}};dojo.NodeList=function(){return tnl(Array.apply(null,arguments))};var nl=d.NodeList,nlp=nl.prototype;nl._wrap=tnl;nl._adaptAsMap=adaptAsMap;nl._adaptAsForEach=adaptAsForEach;nl._adaptAsFilter=adaptAsFilter;nl._adaptWithCondition=adaptWithCondition;d.forEach(["slice","splice"],function(name){var f=ap[name];nlp[name]=function(){return tnl(f.apply(this,arguments))}});d.forEach(["indexOf","lastIndexOf","every","some"],function(name){var f=d[name];nlp[name]=function(){return f.apply(d,[this].concat(aps.call(arguments,0)))}});d.forEach(["attr","style"],function(name){nlp[name]=adaptWithCondition(d[name],magicGuard)});d.forEach(["connect","addClass","removeClass","toggleClass","empty"],function(name){nlp[name]=adaptAsForEach(d[name])});dojo.extend(dojo.NodeList,{concat:function(item){var t=d.isArray(this)?this:aps.call(this,0),m=d.map(arguments,function(a){return a&&!d.isArray(a)&&(a.constructor===NodeList||a.constructor==nl)?aps.call(a,0):a});return tnl(apc.apply(t,m))},map:function(func,obj){return tnl(d.map(this,func,obj))},forEach:function(callback,thisObj){d.forEach(this,callback,thisObj);return this},coords:adaptAsMap(d.coords),place:function(queryOrNode,position){var item=d.query(queryOrNode)[0];return this.forEach(function(node){d.place(node,item,position)})},orphan:function(simpleFilter){return(simpleFilter?d._filterQueryResult(this,simpleFilter):this).forEach(orphan)},adopt:function(queryOrListOrNode,position){return d.query(queryOrListOrNode).place(this[0],position)},query:function(queryStr){if(!queryStr){return this}var ret=this.map(function(node){return d.query(queryStr,node).filter(function(subNode){return subNode!==undefined})});return tnl(apc.apply([],ret))},filter:function(simpleFilter){var a=arguments,items=this,start=0;if(d.isString(simpleFilter)){items=d._filterQueryResult(this,a[0]);if(a.length==1){return items}start=1}return tnl(d.filter(items,a[start],a[start+1]))},addContent:function(content,position){var c=d.isString(content)?d._toDom(content,this[0]&&this[0].ownerDocument):content,i,l=this.length-1;for(i=0;i<l;++i){d.place(c.cloneNode(true),this[i],position)}if(l>=0){d.place(c,this[l],position)}return this},instantiate:function(declaredClass,properties){var c=d.isFunction(declaredClass)?declaredClass:d.getObject(declaredClass);properties=properties||{};return this.forEach(function(node){new c(properties,node)})},at:function(){var t=new dojo.NodeList();d.forEach(arguments,function(i){if(this[i]){t.push(this[i])}},this);return t}});d.forEach(["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","submit"],function(evt){var _oe="on"+evt;nlp[_oe]=function(a,b){return this.connect(_oe,a,b)}})})()}if(!dojo._hasResource["dojo._base.query"]){dojo._hasResource["dojo._base.query"]=true;if(typeof dojo!="undefined"){dojo.provide("dojo._base.query")}(function(d){var trim=d.trim;var each=d.forEach;var qlc=d._queryListCtor=d.NodeList;var isString=d.isString;var getDoc=function(){return d.doc};var cssCaseBug=((d.isWebKit||d.isMozilla)&&((getDoc().compatMode)=="BackCompat"));var childNodesName=!!getDoc().firstChild.children?"children":"childNodes";var specials=">~+";var caseSensitive=false;var yesman=function(){return true};var getQueryParts=function(query){if(specials.indexOf(query.slice(-1))>=0){query+=" * "}else{query+=" "}var ts=function(s,e){return trim(query.slice(s,e))};var queryParts=[];var inBrackets=-1,inParens=-1,inMatchFor=-1,inPseudo=-1,inClass=-1,inId=-1,inTag=-1,lc="",cc="",pStart;var x=0,ql=query.length,currentPart=null,_cp=null;var endTag=function(){if(inTag>=0){var tv=(inTag==x)?null:ts(inTag,x);currentPart[(specials.indexOf(tv)<0)?"tag":"oper"]=tv;inTag=-1}};var endId=function(){if(inId>=0){currentPart.id=ts(inId,x).replace(/\\/g,"");inId=-1}};var endClass=function(){if(inClass>=0){currentPart.classes.push(ts(inClass+1,x).replace(/\\/g,""));inClass=-1}};var endAll=function(){endId();endTag();endClass()};var endPart=function(){endAll();if(inPseudo>=0){currentPart.pseudos.push({name:ts(inPseudo+1,x)})}currentPart.loops=(currentPart.pseudos.length||currentPart.attrs.length||currentPart.classes.length);currentPart.oquery=currentPart.query=ts(pStart,x);currentPart.otag=currentPart.tag=(currentPart.oper)?null:(currentPart.tag||"*");if(currentPart.tag){currentPart.tag=currentPart.tag.toUpperCase()}if(queryParts.length&&(queryParts[queryParts.length-1].oper)){currentPart.infixOper=queryParts.pop();currentPart.query=currentPart.infixOper.query+" "+currentPart.query}queryParts.push(currentPart);currentPart=null};for(;lc=cc,cc=query.charAt(x),x<ql;x++){if(lc=="\\"){continue}if(!currentPart){pStart=x;currentPart={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return(caseSensitive)?this.otag:this.tag}};inTag=x}if(inBrackets>=0){if(cc=="]"){if(!_cp.attr){_cp.attr=ts(inBrackets+1,x)}else{_cp.matchFor=ts((inMatchFor||inBrackets+1),x)}var cmf=_cp.matchFor;if(cmf){if((cmf.charAt(0)=='"')||(cmf.charAt(0)=="'")){_cp.matchFor=cmf.slice(1,-1)}}currentPart.attrs.push(_cp);_cp=null;inBrackets=inMatchFor=-1}else{if(cc=="="){var addToCc=("|~^$*".indexOf(lc)>=0)?lc:"";_cp.type=addToCc+cc;_cp.attr=ts(inBrackets+1,x-addToCc.length);inMatchFor=x+1}}}else{if(inParens>=0){if(cc==")"){if(inPseudo>=0){_cp.value=ts(inParens+1,x)}inPseudo=inParens=-1}}else{if(cc=="#"){endAll();inId=x+1}else{if(cc=="."){endAll();inClass=x}else{if(cc==":"){endAll();inPseudo=x}else{if(cc=="["){endAll();inBrackets=x;_cp={}}else{if(cc=="("){if(inPseudo>=0){_cp={name:ts(inPseudo+1,x),value:null};currentPart.pseudos.push(_cp)}inParens=x}else{if((cc==" ")&&(lc!=cc)){endPart()}}}}}}}}}return queryParts};var agree=function(first,second){if(!first){return second}if(!second){return first}return function(){return first.apply(window,arguments)&&second.apply(window,arguments)}};var getArr=function(i,arr){var r=arr||[];if(i){r.push(i)}return r};var _isElement=function(n){return(1==n.nodeType)};var blank="";var _getAttr=function(elem,attr){if(!elem){return blank}if(attr=="class"){return elem.className||blank}if(attr=="for"){return elem.htmlFor||blank}if(attr=="style"){return elem.style.cssText||blank}return(caseSensitive?elem.getAttribute(attr):elem.getAttribute(attr,2))||blank};var attrs={"*=":function(attr,value){return function(elem){return(_getAttr(elem,attr).indexOf(value)>=0)}},"^=":function(attr,value){return function(elem){return(_getAttr(elem,attr).indexOf(value)==0)}},"$=":function(attr,value){var tval=" "+value;return function(elem){var ea=" "+_getAttr(elem,attr);return(ea.lastIndexOf(value)==(ea.length-value.length))}},"~=":function(attr,value){var tval=" "+value+" ";return function(elem){var ea=" "+_getAttr(elem,attr)+" ";return(ea.indexOf(tval)>=0)}},"|=":function(attr,value){var valueDash=" "+value+"-";return function(elem){var ea=" "+_getAttr(elem,attr);return((ea==value)||(ea.indexOf(valueDash)==0))}},"=":function(attr,value){return function(elem){return(_getAttr(elem,attr)==value)}}};var _noNES=(typeof getDoc().firstChild.nextElementSibling=="undefined");var _ns=!_noNES?"nextElementSibling":"nextSibling";var _ps=!_noNES?"previousElementSibling":"previousSibling";var _simpleNodeTest=(_noNES?_isElement:yesman);var _lookLeft=function(node){while(node=node[_ps]){if(_simpleNodeTest(node)){return false}}return true};var _lookRight=function(node){while(node=node[_ns]){if(_simpleNodeTest(node)){return false}}return true};var getNodeIndex=function(node){var root=node.parentNode;var i=0,tret=root[childNodesName],ci=(node._i||-1),cl=(root._l||-1);if(!tret){return -1}var l=tret.length;if(cl==l&&ci>=0&&cl>=0){return ci}root._l=l;ci=-1;for(var te=root.firstElementChild||root.firstChild;te;te=te[_ns]){if(_simpleNodeTest(te)){te._i=++i;if(node===te){ci=i}}}return ci};var isEven=function(elem){return !((getNodeIndex(elem))%2)};var isOdd=function(elem){return((getNodeIndex(elem))%2)};var pseudos={checked:function(name,condition){return function(elem){return !!d.attr(elem,"checked")}},"first-child":function(){return _lookLeft},"last-child":function(){return _lookRight},"only-child":function(name,condition){return function(node){if(!_lookLeft(node)){return false}if(!_lookRight(node)){return false}return true}},empty:function(name,condition){return function(elem){var cn=elem.childNodes;var cnl=elem.childNodes.length;for(var x=cnl-1;x>=0;x--){var nt=cn[x].nodeType;if((nt===1)||(nt==3)){return false}}return true}},contains:function(name,condition){var cz=condition.charAt(0);if(cz=='"'||cz=="'"){condition=condition.slice(1,-1)}return function(elem){return(elem.innerHTML.indexOf(condition)>=0)}},not:function(name,condition){var p=getQueryParts(condition)[0];var ignores={el:1};if(p.tag!="*"){ignores.tag=1}if(!p.classes.length){ignores.classes=1}var ntf=getSimpleFilterFunc(p,ignores);return function(elem){return(!ntf(elem))}},"nth-child":function(name,condition){var pi=parseInt;if(condition=="odd"){return isOdd}else{if(condition=="even"){return isEven}}if(condition.indexOf("n")!=-1){var tparts=condition.split("n",2);var pred=tparts[0]?((tparts[0]=="-")?-1:pi(tparts[0])):1;var idx=tparts[1]?pi(tparts[1]):0;var lb=0,ub=-1;if(pred>0){if(idx<0){idx=(idx%pred)&&(pred+(idx%pred))}else{if(idx>0){if(idx>=pred){lb=idx-idx%pred}idx=idx%pred}}}else{if(pred<0){pred*=-1;if(idx>0){ub=idx;idx=idx%pred}}}if(pred>0){return function(elem){var i=getNodeIndex(elem);return(i>=lb)&&(ub<0||i<=ub)&&((i%pred)==idx)}}else{condition=idx}}var ncount=pi(condition);return function(elem){return(getNodeIndex(elem)==ncount)}}};var defaultGetter=(d.isIE)?function(cond){var clc=cond.toLowerCase();if(clc=="class"){cond="className"}return function(elem){return(caseSensitive?elem.getAttribute(cond):elem[cond]||elem[clc])}}:function(cond){return function(elem){return(elem&&elem.getAttribute&&elem.hasAttribute(cond))}};var getSimpleFilterFunc=function(query,ignores){if(!query){return yesman}ignores=ignores||{};var ff=null;if(!("el" in ignores)){ff=agree(ff,_isElement)}if(!("tag" in ignores)){if(query.tag!="*"){ff=agree(ff,function(elem){return(elem&&(elem.tagName==query.getTag()))})}}if(!("classes" in ignores)){each(query.classes,function(cname,idx,arr){var re=new RegExp("(?:^|\\s)"+cname+"(?:\\s|$)");ff=agree(ff,function(elem){return re.test(elem.className)});ff.count=idx})}if(!("pseudos" in ignores)){each(query.pseudos,function(pseudo){var pn=pseudo.name;if(pseudos[pn]){ff=agree(ff,pseudos[pn](pn,pseudo.value))}})}if(!("attrs" in ignores)){each(query.attrs,function(attr){var matcher;var a=attr.attr;if(attr.type&&attrs[attr.type]){matcher=attrs[attr.type](a,attr.matchFor)}else{if(a.length){matcher=defaultGetter(a)}}if(matcher){ff=agree(ff,matcher)}})}if(!("id" in ignores)){if(query.id){ff=agree(ff,function(elem){return(!!elem&&(elem.id==query.id))})}}if(!ff){if(!("default" in ignores)){ff=yesman}}return ff};var _nextSibling=function(filterFunc){return function(node,ret,bag){while(node=node[_ns]){if(_noNES&&(!_isElement(node))){continue}if((!bag||_isUnique(node,bag))&&filterFunc(node)){ret.push(node)}break}return ret}};var _nextSiblings=function(filterFunc){return function(root,ret,bag){var te=root[_ns];while(te){if(_simpleNodeTest(te)){if(bag&&!_isUnique(te,bag)){break}if(filterFunc(te)){ret.push(te)}}te=te[_ns]}return ret}};var _childElements=function(filterFunc){filterFunc=filterFunc||yesman;return function(root,ret,bag){var te,x=0,tret=root[childNodesName];while(te=tret[x++]){if(_simpleNodeTest(te)&&(!bag||_isUnique(te,bag))&&(filterFunc(te,x))){ret.push(te)}}return ret}};var _isDescendant=function(node,root){var pn=node.parentNode;while(pn){if(pn==root){break}pn=pn.parentNode}return !!pn};var _getElementsFuncCache={};var getElementsFunc=function(query){var retFunc=_getElementsFuncCache[query.query];if(retFunc){return retFunc}var io=query.infixOper;var oper=(io?io.oper:"");var filterFunc=getSimpleFilterFunc(query,{el:1});var qt=query.tag;var wildcardTag=("*"==qt);var ecs=getDoc()["getElementsByClassName"];if(!oper){if(query.id){filterFunc=(!query.loops&&wildcardTag)?yesman:getSimpleFilterFunc(query,{el:1,id:1});retFunc=function(root,arr){var te=d.byId(query.id,(root.ownerDocument||root));if(!te||!filterFunc(te)){return}if(9==root.nodeType){return getArr(te,arr)}else{if(_isDescendant(te,root)){return getArr(te,arr)}}}}else{if(ecs&&/\{\s*\[native code\]\s*\}/.test(String(ecs))&&query.classes.length&&!cssCaseBug){filterFunc=getSimpleFilterFunc(query,{el:1,classes:1,id:1});var classesString=query.classes.join(" ");retFunc=function(root,arr,bag){var ret=getArr(0,arr),te,x=0;var tret=root.getElementsByClassName(classesString);while((te=tret[x++])){if(filterFunc(te,root)&&_isUnique(te,bag)){ret.push(te)}}return ret}}else{if(!wildcardTag&&!query.loops){retFunc=function(root,arr,bag){var ret=getArr(0,arr),te,x=0;var tret=root.getElementsByTagName(query.getTag());while((te=tret[x++])){if(_isUnique(te,bag)){ret.push(te)}}return ret}}else{filterFunc=getSimpleFilterFunc(query,{el:1,tag:1,id:1});retFunc=function(root,arr,bag){var ret=getArr(0,arr),te,x=0;var tret=root.getElementsByTagName(query.getTag());while((te=tret[x++])){if(filterFunc(te,root)&&_isUnique(te,bag)){ret.push(te)}}return ret}}}}}else{var skipFilters={el:1};if(wildcardTag){skipFilters.tag=1}filterFunc=getSimpleFilterFunc(query,skipFilters);if("+"==oper){retFunc=_nextSibling(filterFunc)}else{if("~"==oper){retFunc=_nextSiblings(filterFunc)}else{if(">"==oper){retFunc=_childElements(filterFunc)}}}}return _getElementsFuncCache[query.query]=retFunc};var filterDown=function(root,queryParts){var candidates=getArr(root),qp,x,te,qpl=queryParts.length,bag,ret;for(var i=0;i<qpl;i++){ret=[];qp=queryParts[i];x=candidates.length-1;if(x>0){bag={};ret.nozip=true}var gef=getElementsFunc(qp);while(te=candidates[x--]){gef(te,ret,bag)}if(!ret.length){break}candidates=ret}return ret};var _queryFuncCacheDOM={},_queryFuncCacheQSA={};var getStepQueryFunc=function(query){var qparts=getQueryParts(trim(query));if(qparts.length==1){var tef=getElementsFunc(qparts[0]);return function(root){var r=tef(root,new qlc());if(r){r.nozip=true}return r}}return function(root){return filterDown(root,qparts)}};var nua=navigator.userAgent;var wk="WebKit/";var is525=(d.isWebKit&&(nua.indexOf(wk)>0)&&(parseFloat(nua.split(wk)[1])>528));var noZip=d.isIE?"commentStrip":"nozip";var qsa="querySelectorAll";var qsaAvail=(!!getDoc()[qsa]&&(!d.isSafari||(d.isSafari>3.1)||is525));var getQueryFunc=function(query,forceDOM){if(qsaAvail){var qsaCached=_queryFuncCacheQSA[query];if(qsaCached&&!forceDOM){return qsaCached}}var domCached=_queryFuncCacheDOM[query];if(domCached){return domCached}var qcz=query.charAt(0);var nospace=(-1==query.indexOf(" "));if((query.indexOf("#")>=0)&&(nospace)){forceDOM=true}var useQSA=(qsaAvail&&(!forceDOM)&&(specials.indexOf(qcz)==-1)&&(!d.isIE||(query.indexOf(":")==-1))&&(!(cssCaseBug&&(query.indexOf(".")>=0)))&&(query.indexOf(":contains")==-1)&&(query.indexOf("|=")==-1));if(useQSA){var tq=(specials.indexOf(query.charAt(query.length-1))>=0)?(query+" *"):query;return _queryFuncCacheQSA[query]=function(root){try{if(!((9==root.nodeType)||nospace)){throw""}var r=root[qsa](tq);r[noZip]=true;return r}catch(e){return getQueryFunc(query,true)(root)}}}else{var parts=query.split(/\s*,\s*/);return _queryFuncCacheDOM[query]=((parts.length<2)?getStepQueryFunc(query):function(root){var pindex=0,ret=[],tp;while((tp=parts[pindex++])){ret=ret.concat(getStepQueryFunc(tp)(root))}return ret})}};var _zipIdx=0;var _nodeUID=d.isIE?function(node){if(caseSensitive){return(node.getAttribute("_uid")||node.setAttribute("_uid",++_zipIdx)||_zipIdx)}else{return node.uniqueID}}:function(node){return(node._uid||(node._uid=++_zipIdx))};var _isUnique=function(node,bag){if(!bag){return 1}var id=_nodeUID(node);if(!bag[id]){return bag[id]=1}return 0};var _zipIdxName="_zipIdx";var _zip=function(arr){if(arr&&arr.nozip){return(qlc._wrap)?qlc._wrap(arr):arr}var ret=new qlc();if(!arr||!arr.length){return ret}if(arr[0]){ret.push(arr[0])}if(arr.length<2){return ret}_zipIdx++;if(d.isIE&&caseSensitive){var szidx=_zipIdx+"";arr[0].setAttribute(_zipIdxName,szidx);for(var x=1,te;te=arr[x];x++){if(arr[x].getAttribute(_zipIdxName)!=szidx){ret.push(te)}te.setAttribute(_zipIdxName,szidx)}}else{if(d.isIE&&arr.commentStrip){try{for(var x=1,te;te=arr[x];x++){if(_isElement(te)){ret.push(te)}}}catch(e){}}else{if(arr[0]){arr[0][_zipIdxName]=_zipIdx}for(var x=1,te;te=arr[x];x++){if(arr[x][_zipIdxName]!=_zipIdx){ret.push(te)}te[_zipIdxName]=_zipIdx}}}return ret};d.query=function(query,root){qlc=d._queryListCtor;if(!query){return new qlc()}if(query.constructor==qlc){return query}if(!isString(query)){return new qlc(query)}if(isString(root)){root=d.byId(root);if(!root){return new qlc()}}root=root||getDoc();var od=root.ownerDocument||root.documentElement;caseSensitive=(root.contentType&&root.contentType=="application/xml")||(d.isOpera&&(root.doctype||od.toString()=="[object XMLDocument]"))||(!!od)&&(d.isIE?od.xml:(root.xmlVersion||od.xmlVersion));var r=getQueryFunc(query)(root);if(r&&r.nozip&&!qlc._wrap){return r}return _zip(r)};d.query.pseudos=pseudos;d._filterQueryResult=function(nodeList,simpleFilter){var tmpNodeList=new d._queryListCtor();var filterFunc=getSimpleFilterFunc(getQueryParts(simpleFilter)[0]);for(var x=0,te;te=nodeList[x];x++){if(filterFunc(te)){tmpNodeList.push(te)}}return tmpNodeList}})(this["queryPortability"]||this["acme"]||dojo)}if(!dojo._hasResource["dojo._base.xhr"]){dojo._hasResource["dojo._base.xhr"]=true;dojo.provide("dojo._base.xhr");(function(){var _d=dojo;function setValue(obj,name,value){var val=obj[name];if(_d.isString(val)){obj[name]=[val,value]}else{if(_d.isArray(val)){val.push(value)}else{obj[name]=value}}}dojo.formToObject=function(formNode){var ret={};var exclude="file|submit|image|reset|button|";_d.forEach(dojo.byId(formNode).elements,function(item){var _in=item.name;var type=(item.type||"").toLowerCase();if(_in&&type&&exclude.indexOf(type)==-1&&!item.disabled){if(type=="radio"||type=="checkbox"){if(item.checked){setValue(ret,_in,item.value)}}else{if(item.multiple){ret[_in]=[];_d.query("option",item).forEach(function(opt){if(opt.selected){setValue(ret,_in,opt.value)}})}else{setValue(ret,_in,item.value);if(type=="image"){ret[_in+".x"]=ret[_in+".y"]=ret[_in].x=ret[_in].y=0}}}}});return ret};dojo.objectToQuery=function(map){var enc=encodeURIComponent;var pairs=[];var backstop={};for(var name in map){var value=map[name];if(value!=backstop[name]){var assign=enc(name)+"=";if(_d.isArray(value)){for(var i=0;i<value.length;i++){pairs.push(assign+enc(value[i]))}}else{pairs.push(assign+enc(value))}}}return pairs.join("&")};dojo.formToQuery=function(formNode){return _d.objectToQuery(_d.formToObject(formNode))};dojo.formToJson=function(formNode,prettyPrint){return _d.toJson(_d.formToObject(formNode),prettyPrint)};dojo.queryToObject=function(str){var ret={};var qp=str.split("&");var dec=decodeURIComponent;_d.forEach(qp,function(item){if(item.length){var parts=item.split("=");var name=dec(parts.shift());var val=dec(parts.join("="));if(_d.isString(ret[name])){ret[name]=[ret[name]]}if(_d.isArray(ret[name])){ret[name].push(val)}else{ret[name]=val}}});return ret};dojo._blockAsync=false;dojo._contentHandlers={text:function(xhr){return xhr.responseText},json:function(xhr){return _d.fromJson(xhr.responseText||null)},"json-comment-filtered":function(xhr){if(!dojo.config.useCommentedJson){console.warn("Consider using the standard mimetype:application/json. json-commenting can introduce security issues. To decrease the chances of hijacking, use the standard the 'json' handler and prefix your json with: {}&&\nUse djConfig.useCommentedJson=true to turn off this message.")}var value=xhr.responseText;var cStartIdx=value.indexOf("/*");var cEndIdx=value.lastIndexOf("*/");if(cStartIdx==-1||cEndIdx==-1){throw new Error("JSON was not comment filtered")}return _d.fromJson(value.substring(cStartIdx+2,cEndIdx))},javascript:function(xhr){return _d.eval(xhr.responseText)},xml:function(xhr){var result=xhr.responseXML;if(_d.isIE&&(!result||!result.documentElement)){var ms=function(n){return"MSXML"+n+".DOMDocument"};var dp=["Microsoft.XMLDOM",ms(6),ms(4),ms(3),ms(2)];_d.some(dp,function(p){try{var dom=new ActiveXObject(p);dom.async=false;dom.loadXML(xhr.responseText);result=dom}catch(e){return false}return true})}return result}};dojo._contentHandlers["json-comment-optional"]=function(xhr){var handlers=_d._contentHandlers;if(xhr.responseText&&xhr.responseText.indexOf("/*")!=-1){return handlers["json-comment-filtered"](xhr)}else{return handlers.json(xhr)}};dojo._ioSetArgs=function(args,canceller,okHandler,errHandler){var ioArgs={args:args,url:args.url};var formObject=null;if(args.form){var form=_d.byId(args.form);var actnNode=form.getAttributeNode("action");ioArgs.url=ioArgs.url||(actnNode?actnNode.value:null);formObject=_d.formToObject(form)}var miArgs=[{}];if(formObject){miArgs.push(formObject)}if(args.content){miArgs.push(args.content)}if(args.preventCache){miArgs.push({"dojo.preventCache":new Date().valueOf()})}ioArgs.query=_d.objectToQuery(_d.mixin.apply(null,miArgs));ioArgs.handleAs=args.handleAs||"text";var d=new _d.Deferred(canceller);d.addCallbacks(okHandler,function(error){return errHandler(error,d)});var ld=args.load;if(ld&&_d.isFunction(ld)){d.addCallback(function(value){return ld.call(args,value,ioArgs)})}var err=args.error;if(err&&_d.isFunction(err)){d.addErrback(function(value){return err.call(args,value,ioArgs)})}var handle=args.handle;if(handle&&_d.isFunction(handle)){d.addBoth(function(value){return handle.call(args,value,ioArgs)})}d.ioArgs=ioArgs;return d};var _deferredCancel=function(dfd){dfd.canceled=true;var xhr=dfd.ioArgs.xhr;var _at=typeof xhr.abort;if(_at=="function"||_at=="object"||_at=="unknown"){xhr.abort()}var err=dfd.ioArgs.error;if(!err){err=new Error("xhr cancelled");err.dojoType="cancel"}return err};var _deferredOk=function(dfd){var ret=_d._contentHandlers[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);return ret===undefined?null:ret};var _deferError=function(error,dfd){console.error(error);return error};var _inFlightIntvl=null;var _inFlight=[];var _watchInFlight=function(){var now=(new Date()).getTime();if(!_d._blockAsync){for(var i=0,tif;i<_inFlight.length&&(tif=_inFlight[i]);i++){var dfd=tif.dfd;var func=function(){if(!dfd||dfd.canceled||!tif.validCheck(dfd)){_inFlight.splice(i--,1)}else{if(tif.ioCheck(dfd)){_inFlight.splice(i--,1);tif.resHandle(dfd)}else{if(dfd.startTime){if(dfd.startTime+(dfd.ioArgs.args.timeout||0)<now){_inFlight.splice(i--,1);var err=new Error("timeout exceeded");err.dojoType="timeout";dfd.errback(err);dfd.cancel()}}}}};if(dojo.config.debugAtAllCosts){func.call(this)}else{try{func.call(this)}catch(e){dfd.errback(e)}}}}if(!_inFlight.length){clearInterval(_inFlightIntvl);_inFlightIntvl=null;return}};dojo._ioCancelAll=function(){try{_d.forEach(_inFlight,function(i){try{i.dfd.cancel()}catch(e){}})}catch(e){}};if(_d.isIE){_d.addOnWindowUnload(_d._ioCancelAll)}_d._ioWatch=function(dfd,validCheck,ioCheck,resHandle){var args=dfd.ioArgs.args;if(args.timeout){dfd.startTime=(new Date()).getTime()}_inFlight.push({dfd:dfd,validCheck:validCheck,ioCheck:ioCheck,resHandle:resHandle});if(!_inFlightIntvl){_inFlightIntvl=setInterval(_watchInFlight,50)}if(args.sync){_watchInFlight()}};var _defaultContentType="application/x-www-form-urlencoded";var _validCheck=function(dfd){return dfd.ioArgs.xhr.readyState};var _ioCheck=function(dfd){return 4==dfd.ioArgs.xhr.readyState};var _resHandle=function(dfd){var xhr=dfd.ioArgs.xhr;if(_d._isDocumentOk(xhr)){dfd.callback(dfd)}else{var err=new Error("Unable to load "+dfd.ioArgs.url+" status:"+xhr.status);err.status=xhr.status;err.responseText=xhr.responseText;dfd.errback(err)}};dojo._ioAddQueryToUrl=function(ioArgs){if(ioArgs.query.length){ioArgs.url+=(ioArgs.url.indexOf("?")==-1?"?":"&")+ioArgs.query;ioArgs.query=null}};dojo.xhr=function(method,args,hasBody){var dfd=_d._ioSetArgs(args,_deferredCancel,_deferredOk,_deferError);dfd.ioArgs.xhr=_d._xhrObj(dfd.ioArgs.args);if(hasBody){if("postData" in args){dfd.ioArgs.query=args.postData}else{if("putData" in args){dfd.ioArgs.query=args.putData}}}else{_d._ioAddQueryToUrl(dfd.ioArgs)}var ioArgs=dfd.ioArgs;var xhr=ioArgs.xhr;xhr.open(method,ioArgs.url,args.sync!==true,args.user||undefined,args.password||undefined);if(args.headers){for(var hdr in args.headers){if(hdr.toLowerCase()==="content-type"&&!args.contentType){args.contentType=args.headers[hdr]}else{xhr.setRequestHeader(hdr,args.headers[hdr])}}}xhr.setRequestHeader("Content-Type",args.contentType||_defaultContentType);if(!args.headers||!args.headers["X-Requested-With"]){xhr.setRequestHeader("X-Requested-With","XMLHttpRequest")}if(dojo.config.debugAtAllCosts){xhr.send(ioArgs.query)}else{try{xhr.send(ioArgs.query)}catch(e){dfd.ioArgs.error=e;dfd.cancel()}}_d._ioWatch(dfd,_validCheck,_ioCheck,_resHandle);xhr=null;return dfd};dojo.xhrGet=function(args){return _d.xhr("GET",args)};dojo.rawXhrPost=dojo.xhrPost=function(args){return _d.xhr("POST",args,true)};dojo.rawXhrPut=dojo.xhrPut=function(args){return _d.xhr("PUT",args,true)};dojo.xhrDelete=function(args){return _d.xhr("DELETE",args)}})()}if(!dojo._hasResource["dojo._base.fx"]){dojo._hasResource["dojo._base.fx"]=true;dojo.provide("dojo._base.fx");(function(){var d=dojo;var _mixin=d.mixin;dojo._Line=function(start,end){this.start=start;this.end=end};dojo._Line.prototype.getValue=function(n){return((this.end-this.start)*n)+this.start};d.declare("dojo._Animation",null,{constructor:function(args){_mixin(this,args);if(d.isArray(this.curve)){this.curve=new d._Line(this.curve[0],this.curve[1])}},duration:350,repeat:0,rate:10,_percent:0,_startRepeatCount:0,_fire:function(evt,args){if(this[evt]){if(dojo.config.debugAtAllCosts){this[evt].apply(this,args||[])}else{try{this[evt].apply(this,args||[])}catch(e){console.error("exception in animation handler for:",evt);console.error(e)}}}return this},play:function(delay,gotoStart){var _t=this;if(_t._delayTimer){_t._clearTimer()}if(gotoStart){_t._stopTimer();_t._active=_t._paused=false;_t._percent=0}else{if(_t._active&&!_t._paused){return _t}}_t._fire("beforeBegin");var de=delay||_t.delay,_p=dojo.hitch(_t,"_play",gotoStart);if(de>0){_t._delayTimer=setTimeout(_p,de);return _t}_p();return _t},_play:function(gotoStart){var _t=this;if(_t._delayTimer){_t._clearTimer()}_t._startTime=new Date().valueOf();if(_t._paused){_t._startTime-=_t.duration*_t._percent}_t._endTime=_t._startTime+_t.duration;_t._active=true;_t._paused=false;var value=_t.curve.getValue(_t._percent);if(!_t._percent){if(!_t._startRepeatCount){_t._startRepeatCount=_t.repeat}_t._fire("onBegin",[value])}_t._fire("onPlay",[value]);_t._cycle();return _t},pause:function(){var _t=this;if(_t._delayTimer){_t._clearTimer()}_t._stopTimer();if(!_t._active){return _t}_t._paused=true;_t._fire("onPause",[_t.curve.getValue(_t._percent)]);return _t},gotoPercent:function(percent,andPlay){var _t=this;_t._stopTimer();_t._active=_t._paused=true;_t._percent=percent;if(andPlay){_t.play()}return _t},stop:function(gotoEnd){var _t=this;if(_t._delayTimer){_t._clearTimer()}if(!_t._timer){return _t}_t._stopTimer();if(gotoEnd){_t._percent=1}_t._fire("onStop",[_t.curve.getValue(_t._percent)]);_t._active=_t._paused=false;return _t},status:function(){if(this._active){return this._paused?"paused":"playing"}return"stopped"},_cycle:function(){var _t=this;if(_t._active){var curr=new Date().valueOf();var step=(curr-_t._startTime)/(_t._endTime-_t._startTime);if(step>=1){step=1}_t._percent=step;if(_t.easing){step=_t.easing(step)}_t._fire("onAnimate",[_t.curve.getValue(step)]);if(_t._percent<1){_t._startTimer()}else{_t._active=false;if(_t.repeat>0){_t.repeat--;_t.play(null,true)}else{if(_t.repeat==-1){_t.play(null,true)}else{if(_t._startRepeatCount){_t.repeat=_t._startRepeatCount;_t._startRepeatCount=0}}}_t._percent=0;_t._fire("onEnd");_t._stopTimer()}}return _t},_clearTimer:function(){clearTimeout(this._delayTimer);delete this._delayTimer}});var ctr=0,_globalTimerList=[],timer=null,runner={run:function(){}};dojo._Animation.prototype._startTimer=function(){if(!this._timer){this._timer=d.connect(runner,"run",this,"_cycle");ctr++}if(!timer){timer=setInterval(d.hitch(runner,"run"),this.rate)}};dojo._Animation.prototype._stopTimer=function(){if(this._timer){d.disconnect(this._timer);this._timer=null;ctr--}if(ctr<=0){clearInterval(timer);timer=null;ctr=0}};var _makeFadeable=d.isIE?function(node){var ns=node.style;if(!ns.width.length&&d.style(node,"width")=="auto"){ns.width="auto"}}:function(){};dojo._fade=function(args){args.node=d.byId(args.node);var fArgs=_mixin({properties:{}},args),props=(fArgs.properties.opacity={});props.start=!("start" in fArgs)?function(){return +d.style(fArgs.node,"opacity")||0}:fArgs.start;props.end=fArgs.end;var anim=d.animateProperty(fArgs);d.connect(anim,"beforeBegin",d.partial(_makeFadeable,fArgs.node));return anim};dojo.fadeIn=function(args){return d._fade(_mixin({end:1},args))};dojo.fadeOut=function(args){return d._fade(_mixin({end:0},args))};dojo._defaultEasing=function(n){return 0.5+((Math.sin((n+1.5)*Math.PI))/2)};var PropLine=function(properties){this._properties=properties;for(var p in properties){var prop=properties[p];if(prop.start instanceof d.Color){prop.tempColor=new d.Color()}}};PropLine.prototype.getValue=function(r){var ret={};for(var p in this._properties){var prop=this._properties[p],start=prop.start;if(start instanceof d.Color){ret[p]=d.blendColors(start,prop.end,r,prop.tempColor).toCss()}else{if(!d.isArray(start)){ret[p]=((prop.end-start)*r)+start+(p!="opacity"?prop.units||"px":0)}}}return ret};dojo.animateProperty=function(args){args.node=d.byId(args.node);if(!args.easing){args.easing=d._defaultEasing}var anim=new d._Animation(args);d.connect(anim,"beforeBegin",anim,function(){var pm={};for(var p in this.properties){if(p=="width"||p=="height"){this.node.display="block"}var prop=this.properties[p];prop=pm[p]=_mixin({},(d.isObject(prop)?prop:{end:prop}));if(d.isFunction(prop.start)){prop.start=prop.start()}if(d.isFunction(prop.end)){prop.end=prop.end()}var isColor=(p.toLowerCase().indexOf("color")>=0);function getStyle(node,p){var v={height:node.offsetHeight,width:node.offsetWidth}[p];if(v!==undefined){return v}v=d.style(node,p);return(p=="opacity")?+v:(isColor?v:parseFloat(v))}if(!("end" in prop)){prop.end=getStyle(this.node,p)}else{if(!("start" in prop)){prop.start=getStyle(this.node,p)}}if(isColor){prop.start=new d.Color(prop.start);prop.end=new d.Color(prop.end)}else{prop.start=(p=="opacity")?+prop.start:parseFloat(prop.start)}}this.curve=new PropLine(pm)});d.connect(anim,"onAnimate",d.hitch(d,"style",anim.node));return anim};dojo.anim=function(node,properties,duration,easing,onEnd,delay){return d.animateProperty({node:node,duration:duration||d._Animation.prototype.duration,properties:properties,easing:easing,onEnd:onEnd}).play(delay||0)}})()}if(!dojo._hasResource["dojo._base.browser"]){dojo._hasResource["dojo._base.browser"]=true;dojo.provide("dojo._base.browser");dojo.forEach(dojo.config.require,function(i){dojo.require(i)})}if(dojo.config.afterOnLoad&&dojo.isBrowser){window.setTimeout(dojo._loadInit,1000)}})();dojo.provide("cos_widget_deps");if(!dojo._hasResource["dojo.io.script"]){dojo._hasResource["dojo.io.script"]=true;dojo.provide("dojo.io.script");dojo.io.script={get:function(c){var a=this._makeScriptDeferred(c);var b=a.ioArgs;dojo._ioAddQueryToUrl(b);if(this._canAttach(b)){this.attach(b.id,b.url,c.frameDoc)}dojo._ioWatch(a,this._validCheck,this._ioCheck,this._resHandle);return a},attach:function(e,a,c){var d=(c||dojo.doc);var b=d.createElement("script");b.type="text/javascript";b.src=a;b.id=e;b.charset="utf-8";d.getElementsByTagName("head")[0].appendChild(b)},remove:function(b,a){dojo.destroy(dojo.byId(b,a));if(this["jsonp_"+b]){delete this["jsonp_"+b]}},_makeScriptDeferred:function(c){var a=dojo._ioSetArgs(c,this._deferredCancel,this._deferredOk,this._deferredError);var b=a.ioArgs;b.id=dojo._scopeName+"IoScript"+(this._counter++);b.canDelete=false;if(c.callbackParamName){b.query=b.query||"";if(b.query.length>0){b.query+="&"}b.query+=c.callbackParamName+"="+(c.frameDoc?"parent.":"")+dojo._scopeName+".io.script.jsonp_"+b.id+"._jsonpCallback";b.frameDoc=c.frameDoc;b.canDelete=true;a._jsonpCallback=this._jsonpCallback;this["jsonp_"+b.id]=a}return a},_deferredCancel:function(a){a.canceled=true;if(a.ioArgs.canDelete){dojo.io.script._addDeadScript(a.ioArgs)}},_deferredOk:function(a){if(a.ioArgs.canDelete){dojo.io.script._addDeadScript(a.ioArgs)}if(a.ioArgs.json){return a.ioArgs.json}else{return a.ioArgs}},_deferredError:function(b,a){if(a.ioArgs.canDelete){if(b.dojoType=="timeout"){dojo.io.script.remove(a.ioArgs.id,a.ioArgs.frameDoc)}else{dojo.io.script._addDeadScript(a.ioArgs)}}return b},_deadScripts:[],_counter:1,_addDeadScript:function(a){dojo.io.script._deadScripts.push({id:a.id,frameDoc:a.frameDoc});a.frameDoc=null},_validCheck:function(b){var a=dojo.io.script;var c=a._deadScripts;if(c&&c.length>0){for(var d=0;d<c.length;d++){a.remove(c[d].id,c[d].frameDoc);c[d].frameDoc=null}dojo.io.script._deadScripts=[]}return true},_ioCheck:function(dfd){if(dfd.ioArgs.json){return true}var checkString=dfd.ioArgs.args.checkString;if(checkString&&eval("typeof("+checkString+") != 'undefined'")){return true}return false},_resHandle:function(a){if(dojo.io.script._ioCheck(a)){a.callback(a)}else{a.errback(new Error("inconceivable dojo.io.script._resHandle error"))}},_canAttach:function(a){return true},_jsonpCallback:function(a){this.ioArgs.json=a}}}if(!dojo._hasResource["dojo.io.iframe"]){dojo._hasResource["dojo.io.iframe"]=true;dojo.provide("dojo.io.iframe");dojo.io.iframe={create:function(fname,onloadstr,uri){if(window[fname]){return window[fname]}if(window.frames[fname]){return window.frames[fname]}var cframe=null;var turi=uri;if(!turi){if(dojo.config.useXDomain&&!dojo.config.dojoBlankHtmlUrl){console.warn("dojo.io.iframe.create: When using cross-domain Dojo builds, please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl to the path on your domain to blank.html")}turi=(dojo.config.dojoBlankHtmlUrl||dojo.moduleUrl("dojo","resources/blank.html"))}var ifrstr=dojo.isIE?'<iframe name="'+fname+'" src="'+turi+'" onload="'+onloadstr+'">':"iframe";cframe=dojo.doc.createElement(ifrstr);with(cframe){name=fname;setAttribute("name",fname);id=fname}dojo.body().appendChild(cframe);window[fname]=cframe;with(cframe.style){if(!(dojo.isSafari<3)){position="absolute"}left=top="1px";height=width="1px";visibility="hidden"}if(!dojo.isIE){this.setSrc(cframe,turi,true);cframe.onload=new Function(onloadstr)}return cframe},setSrc:function(c,f,b){try{if(!b){if(dojo.isWebKit){c.location=f}else{frames[c.name].location=f}}else{var a;if(dojo.isIE||dojo.isWebKit>521){a=c.contentWindow.document}else{if(dojo.isSafari){a=c.document}else{a=c.contentWindow}}if(!a){c.location=f;return}else{a.location.replace(f)}}}catch(d){}},doc:function(a){var b=a.contentDocument||(((a.name)&&(a.document)&&(document.getElementsByTagName("iframe")[a.name].contentWindow)&&(document.getElementsByTagName("iframe")[a.name].contentWindow.document)))||((a.name)&&(document.frames[a.name])&&(document.frames[a.name].document))||null;return b},send:function(args){if(!this["_frame"]){this._frame=this.create(this._iframeName,dojo._scopeName+".io.iframe._iframeOnload();")}var dfd=dojo._ioSetArgs(args,function(dfd){dfd.canceled=true;dfd.ioArgs._callNext()},function(dfd){var value=null;try{var ioArgs=dfd.ioArgs;var dii=dojo.io.iframe;var ifd=dii.doc(dii._frame);var handleAs=ioArgs.handleAs;value=ifd;if(handleAs!="html"){if(handleAs=="xml"){if(dojo.isIE){dojo.query("a",dii._frame.contentWindow.document.documentElement).orphan();var xmlText=(dii._frame.contentWindow.document).documentElement.innerText;xmlText=xmlText.replace(/>\s+</g,"><");xmlText=dojo.trim(xmlText);var fauxXhr={responseText:xmlText};value=dojo._contentHandlers.xml(fauxXhr)}}else{value=ifd.getElementsByTagName("textarea")[0].value;if(handleAs=="json"){value=dojo.fromJson(value)}else{if(handleAs=="javascript"){value=dojo.eval(value)}}}}}catch(e){value=e}finally{ioArgs._callNext()}return value},function(error,dfd){dfd.ioArgs._hasError=true;dfd.ioArgs._callNext();return error});dfd.ioArgs._callNext=function(){if(!this["_calledNext"]){this._calledNext=true;dojo.io.iframe._currentDfd=null;dojo.io.iframe._fireNextRequest()}};this._dfdQueue.push(dfd);this._fireNextRequest();dojo._ioWatch(dfd,function(dfd){return !dfd.ioArgs._hasError},function(dfd){return(!!dfd.ioArgs._finished)},function(dfd){if(dfd.ioArgs._finished){dfd.callback(dfd)}else{dfd.errback(new Error("Invalid dojo.io.iframe request state"))}});return dfd},_currentDfd:null,_dfdQueue:[],_iframeName:dojo._scopeName+"IoIframe",_fireNextRequest:function(){try{if((this._currentDfd)||(this._dfdQueue.length==0)){return}var o=this._currentDfd=this._dfdQueue.shift();var g=o.ioArgs;var k=g.args;g._contentToClean=[];var l=dojo.byId(k.form);var j=k.content||{};if(l){if(j){var d=function(r,s){var e;if(dojo.isIE){e=dojo.doc.createElement("<input type='hidden' name='"+r+"'>")}else{e=dojo.doc.createElement("input");e.type="hidden";e.name=r}e.value=s;l.appendChild(e);g._contentToClean.push(r)};for(var m in j){var c=j[m];if(dojo.isArray(c)&&c.length>1){var f;for(f=0;f<c.length;f++){d(m,c[f])}}else{if(!l[m]){d(m,c)}else{l[m].value=c}}}}var q=l.getAttributeNode("action");var b=l.getAttributeNode("method");var a=l.getAttributeNode("target");if(k.url){g._originalAction=q?q.value:null;if(q){q.value=k.url}else{l.setAttribute("action",k.url)}}if(!b||!b.value){if(b){b.value=(k.method)?k.method:"post"}else{l.setAttribute("method",(k.method)?k.method:"post")}}g._originalTarget=a?a.value:null;if(a){a.value=this._iframeName}else{l.setAttribute("target",this._iframeName)}l.target=this._iframeName;l.submit()}else{var p=k.url+(k.url.indexOf("?")>-1?"&":"?")+g.query;this.setSrc(this._frame,p,true)}}catch(h){o.errback(h)}},_iframeOnload:function(){var h=this._currentDfd;if(!h){this._fireNextRequest();return}var d=h.ioArgs;var e=d.args;var f=dojo.byId(e.form);if(f){var b=d._contentToClean;for(var c=0;c<b.length;c++){var g=b[c];for(var a=0;a<f.childNodes.length;a++){var k=f.childNodes[a];if(k.name==g){dojo.destroy(k);break}}}if(d._originalAction){f.setAttribute("action",d._originalAction)}if(d._originalTarget){f.setAttribute("target",d._originalTarget);f.target=d._originalTarget}}d._finished=true}}}if(!dojo._hasResource["dijit._base.focus"]){dojo._hasResource["dijit._base.focus"]=true;dojo.provide("dijit._base.focus");dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){var a=dojo.doc;if(a.selection){var c=a.selection;if(c.type=="Text"){return !c.createRange().htmlText.length}else{return !c.createRange().length}}else{var d=dojo.global;var b=d.getSelection();if(dojo.isString(b)){return !b}else{return !b||b.isCollapsed||!b.toString()}}},getBookmark:function(){var e,d=dojo.doc.selection;if(d){var b=d.createRange();if(d.type.toUpperCase()=="CONTROL"){if(b.length){e=[];var c=0,a=b.length;while(c<a){e.push(b.item(c++))}}else{e=null}}else{e=b.getBookmark()}}else{if(window.getSelection){d=dojo.global.getSelection();if(d){b=d.getRangeAt(0);e=b.cloneRange()}}else{console.warn("No idea how to store the current selection for this browser!")}}return e},moveToBookmark:function(d){var a=dojo.doc;if(a.selection){var b;if(dojo.isArray(d)){b=a.body.createControlRange();dojo.forEach(d,function(e){b.addElement(e)})}else{b=a.selection.createRange();b.moveToBookmark(d)}b.select()}else{var c=dojo.global.getSelection&&dojo.global.getSelection();if(c&&c.removeAllRanges){c.removeAllRanges();c.addRange(d)}else{console.warn("No idea how to restore selection for this browser!")}}},getFocus:function(b,a){return{node:b&&dojo.isDescendant(dijit._curFocus,b.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(a||dojo.global,dijit.isCollapsed)?dojo.withGlobal(a||dojo.global,dijit.getBookmark):null,openedForWindow:a}},focus:function(d){if(!d){return}var c="node" in d?d.node:d,b=d.bookmark,a=d.openedForWindow;if(c){var g=(c.tagName.toLowerCase()=="iframe")?c.contentWindow:c;if(g&&g.focus){try{g.focus()}catch(f){}}dijit._onFocusNode(c)}if(b&&dojo.withGlobal(a||dojo.global,dijit.isCollapsed)){if(a){a.focus()}try{dojo.withGlobal(a||dojo.global,dijit.moveToBookmark,null,[b])}catch(f){}}},_activeStack:[],registerIframe:function(a){dijit.registerWin(a.contentWindow,a)},registerWin:function(b,a){dojo.connect(b.document,"onmousedown",function(d){dijit._justMouseDowned=true;setTimeout(function(){dijit._justMouseDowned=false},0);dijit._onTouchNode(a||d.target||d.srcElement)});var c=b.document;if(c){if(dojo.isIE){c.attachEvent("onactivate",function(d){if(d.srcElement.tagName.toLowerCase()!="#document"){dijit._onFocusNode(a||d.srcElement)}});c.attachEvent("ondeactivate",function(d){dijit._onBlurNode(a||d.srcElement)})}else{c.addEventListener("focus",function(d){dijit._onFocusNode(a||d.target)},true);c.addEventListener("blur",function(d){dijit._onBlurNode(a||d.target)},true)}}c=null},_onBlurNode:function(a){dijit._prevFocus=dijit._curFocus;dijit._curFocus=null;if(dijit._justMouseDowned){return}if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer)}dijit._clearActiveWidgetsTimer=setTimeout(function(){delete dijit._clearActiveWidgetsTimer;dijit._setStack([]);dijit._prevFocus=null},100)},_onTouchNode:function(b){if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);delete dijit._clearActiveWidgetsTimer}var a=[];try{while(b){if(b.dijitPopupParent){b=dijit.byId(b.dijitPopupParent).domNode}else{if(b.tagName&&b.tagName.toLowerCase()=="body"){if(b===dojo.body()){break}b=dijit.getDocumentWindow(b.ownerDocument).frameElement}else{var d=b.getAttribute&&b.getAttribute("widgetId");if(d){a.unshift(d)}b=b.parentNode}}}}catch(c){}dijit._setStack(a)},_onFocusNode:function(a){if(!a){return}if(a.nodeType==9){return}dijit._onTouchNode(a);if(a==dijit._curFocus){return}if(dijit._curFocus){dijit._prevFocus=dijit._curFocus}dijit._curFocus=a;dojo.publish("focusNode",[a])},_setStack:function(a){var e=dijit._activeStack;dijit._activeStack=a;for(var c=0;c<Math.min(e.length,a.length);c++){if(e[c]!=a[c]){break}}for(var b=e.length-1;b>=c;b--){var d=dijit.byId(e[b]);if(d){d._focused=false;d._hasBeenBlurred=true;if(d._onBlur){d._onBlur()}if(d._setStateClass){d._setStateClass()}dojo.publish("widgetBlur",[d])}}for(b=c;b<a.length;b++){d=dijit.byId(a[b]);if(d){d._focused=true;if(d._onFocus){d._onFocus()}if(d._setStateClass){d._setStateClass()}dojo.publish("widgetFocus",[d])}}}});dojo.addOnLoad(function(){dijit.registerWin(window)})}if(!dojo._hasResource["dijit._base.manager"]){dojo._hasResource["dijit._base.manager"]=true;dojo.provide("dijit._base.manager");dojo.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={}},add:function(a){if(this._hash[a.id]){throw new Error("Tried to register widget with id=="+a.id+" but that id is already registered")}this._hash[a.id]=a},remove:function(a){delete this._hash[a]},forEach:function(a){for(var b in this._hash){a(this._hash[b])}},filter:function(b){var a=new dijit.WidgetSet();this.forEach(function(c){if(b(c)){a.add(c)}});return a},byId:function(a){return this._hash[a]},byClass:function(a){return this.filter(function(b){return b.declaredClass==a})}});dijit.registry=new dijit.WidgetSet();dijit._widgetTypeCtr={};dijit.getUniqueId=function(a){var b;do{b=a+"_"+(a in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[a]:dijit._widgetTypeCtr[a]=0)}while(dijit.byId(b));return b};dijit.findWidgets=function(a){var b=[];function c(d){var j=dojo.isIE?d.children:d.childNodes,e=0,g;while(g=j[e++]){if(g.nodeType!=1){continue}var f=g.getAttribute("widgetId");if(f){var h=dijit.byId(f);b.push(h)}else{c(g)}}}c(a);return b};if(dojo.isIE){dojo.addOnWindowUnload(function(){dojo.forEach(dijit.findWidgets(dojo.body()),function(a){if(a.destroyRecursive){a.destroyRecursive()}else{if(a.destroy){a.destroy()}}})})}dijit.byId=function(a){return(dojo.isString(a))?dijit.registry.byId(a):a};dijit.byNode=function(a){return dijit.registry.byId(a.getAttribute("widgetId"))};dijit.getEnclosingWidget=function(a){while(a){if(a.getAttribute&&a.getAttribute("widgetId")){return dijit.registry.byId(a.getAttribute("widgetId"))}a=a.parentNode}return null};dijit._tabElements={area:true,button:true,input:true,object:true,select:true,textarea:true};dijit._isElementShown=function(b){var a=dojo.style(b);return(a.visibility!="hidden")&&(a.visibility!="collapsed")&&(a.display!="none")&&(dojo.attr(b,"type")!="hidden")};dijit.isTabNavigable=function(d){if(dojo.hasAttr(d,"disabled")){return false}var a=dojo.hasAttr(d,"tabindex");var c=dojo.attr(d,"tabindex");if(a&&c>=0){return true}var b=d.nodeName.toLowerCase();if(((b=="a"&&dojo.hasAttr(d,"href"))||dijit._tabElements[b])&&(!a||c>=0)){return true}return false};dijit._getTabNavigable=function(b){var g,e,a,c,f,h;var d=function(j){dojo.query("> *",j).forEach(function(m){var l=dijit._isElementShown(m);if(l&&dijit.isTabNavigable(m)){var k=dojo.attr(m,"tabindex");if(!dojo.hasAttr(m,"tabindex")||k==0){if(!g){g=m}e=m}else{if(k>0){if(!a||k<c){c=k;a=m}if(!f||k>=h){h=k;f=m}}}}if(l&&m.nodeName.toUpperCase()!="SELECT"){d(m)}})};if(dijit._isElementShown(b)){d(b)}return{first:g,last:e,lowest:a,highest:f}};dijit.getFirstInTabbingOrder=function(a){var b=dijit._getTabNavigable(dojo.byId(a));return b.lowest?b.lowest:b.first};dijit.getLastInTabbingOrder=function(a){var b=dijit._getTabNavigable(dojo.byId(a));return b.last?b.last:b.highest};dijit.defaultDuration=dojo.config.defaultDuration||200}if(!dojo._hasResource["dojo.AdapterRegistry"]){dojo._hasResource["dojo.AdapterRegistry"]=true;dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(a){this.pairs=[];this.returnWrappers=a||false};dojo.extend(dojo.AdapterRegistry,{register:function(c,b,e,a,d){this.pairs[((d)?"unshift":"push")]([c,b,e,a])},match:function(){for(var a=0;a<this.pairs.length;a++){var b=this.pairs[a];if(b[1].apply(this,arguments)){if((b[3])||(this.returnWrappers)){return b[2]}else{return b[2].apply(this,arguments)}}}throw new Error("No match found")},unregister:function(a){for(var b=0;b<this.pairs.length;b++){var c=this.pairs[b];if(c[0]==a){this.pairs.splice(b,1);return true}}return false}})}if(!dojo._hasResource["dijit._base.place"]){dojo._hasResource["dijit._base.place"]=true;dojo.provide("dijit._base.place");dijit.getViewport=function(){var b=(dojo.doc.compatMode=="BackCompat")?dojo.body():dojo.doc.documentElement;var a=dojo._docScroll();return{w:b.clientWidth,h:b.clientHeight,l:a.x,t:a.y}};dijit.placeOnScreen=function(b,e,a,c){var d=dojo.map(a,function(f){var g={corner:f,pos:{x:e.x,y:e.y}};if(c){g.pos.x+=f.charAt(1)=="L"?c.x:-c.x;g.pos.y+=f.charAt(0)=="T"?c.y:-c.y}return g});return dijit._place(b,d)};dijit._place=function(c,e,b){var a=dijit.getViewport();if(!c.parentNode||String(c.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(c)}var d=null;dojo.some(e,function(j){var r=j.corner;var o=j.pos;if(b){b(c,j.aroundCorner,r)}var f=c.style;var m=f.display;var p=f.visibility;f.visibility="hidden";f.display="";var q=dojo.marginBox(c);f.display=m;f.visibility=p;var l=(r.charAt(1)=="L"?o.x:Math.max(a.l,o.x-q.w)),k=(r.charAt(0)=="T"?o.y:Math.max(a.t,o.y-q.h)),u=(r.charAt(1)=="L"?Math.min(a.l+a.w,l+q.w):o.x),t=(r.charAt(0)=="T"?Math.min(a.t+a.h,k+q.h):o.y),g=u-l,s=t-k,h=(q.w-g)+(q.h-s);if(d==null||h<d.overflow){d={corner:r,aroundCorner:j.aroundCorner,x:l,y:k,w:g,h:s,overflow:h}}return !h});c.style.left=d.x+"px";c.style.top=d.y+"px";if(d.overflow&&b){b(c,d.aroundCorner,d.corner)}return d};dijit.placeOnScreenAroundNode=function(d,b,h,c){b=dojo.byId(b);var e=b.style.display;b.style.display="";var a=b.offsetWidth;var g=b.offsetHeight;var f=dojo.coords(b,true);b.style.display=e;return dijit._placeOnScreenAroundRect(d,f.x,f.y,a,g,h,c)};dijit.placeOnScreenAroundRectangle=function(c,a,d,b){return dijit._placeOnScreenAroundRect(c,a.x,a.y,a.width,a.height,d,b)};dijit._placeOnScreenAroundRect=function(c,g,f,b,h,e,d){var j=[];for(var a in e){j.push({aroundCorner:a,corner:e[a],pos:{x:g+(a.charAt(1)=="L"?0:b),y:f+(a.charAt(0)=="T"?0:h)}})}return dijit._place(c,j,d)};dijit.placementRegistry=new dojo.AdapterRegistry();dijit.placementRegistry.register("node",function(b,a){return typeof a=="object"&&typeof a.offsetWidth!="undefined"&&typeof a.offsetHeight!="undefined"},dijit.placeOnScreenAroundNode);dijit.placementRegistry.register("rect",function(b,a){return typeof a=="object"&&"x" in a&&"y" in a&&"width" in a&&"height" in a},dijit.placeOnScreenAroundRectangle);dijit.placeOnScreenAroundElement=function(c,a,d,b){return dijit.placementRegistry.match.apply(dijit.placementRegistry,arguments)}}if(!dojo._hasResource["dijit._base.window"]){dojo._hasResource["dijit._base.window"]=true;dojo.provide("dijit._base.window");dijit.getDocumentWindow=function(b){if(dojo.isIE&&window!==document.parentWindow&&!b._parentWindow){b.parentWindow.execScript("document._parentWindow = window;","Javascript");var a=b._parentWindow;b._parentWindow=null;return a}return b._parentWindow||b.parentWindow||b.defaultView}}if(!dojo._hasResource["dijit._base.popup"]){dojo._hasResource["dijit._base.popup"]=true;dojo.provide("dijit._base.popup");dijit.popup=new function(){var a=[],b=1000,c=1;this.prepare=function(e){var d=e.style;d.visibility="hidden";d.position="absolute";d.top="-9999px";if(d.display=="none"){d.display=""}dojo.body().appendChild(e)};this.open=function(m){var l=m.popup,k=m.orient||{BL:"TL",TL:"BL"},o=m.around,f=(m.around&&m.around.id)?(m.around.id+"_dropdown"):("popup_"+c++);var e=dojo.create("div",{id:f,"class":"dijitPopup",style:{zIndex:b+a.length,visibility:"hidden"}},dojo.body());dijit.setWaiRole(e,"presentation");e.style.left=e.style.top="0px";if(m.parent){e.dijitPopupParent=m.parent.id}var p=l.domNode.style;p.display="";p.visibility="";p.position="";p.top="0px";e.appendChild(l.domNode);var j=new dijit.BackgroundIframe(e);var h=o?dijit.placeOnScreenAroundElement(e,o,k,l.orient?dojo.hitch(l,"orient"):null):dijit.placeOnScreen(e,m,k=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],m.padding);e.style.visibility="visible";var g=[];var d=function(){for(var q=a.length-1;q>0&&a[q].parent===a[q-1].widget;q--){}return a[q]};g.push(dojo.connect(e,"onkeypress",this,function(q){if(q.charOrCode==dojo.keys.ESCAPE&&m.onCancel){dojo.stopEvent(q);m.onCancel()}else{if(q.charOrCode===dojo.keys.TAB){dojo.stopEvent(q);var r=d();if(r&&r.onCancel){r.onCancel()}}}}));if(l.onCancel){g.push(dojo.connect(l,"onCancel",null,m.onCancel))}g.push(dojo.connect(l,l.onExecute?"onExecute":"onChange",null,function(){var q=d();if(q&&q.onExecute){q.onExecute()}}));a.push({wrapper:e,iframe:j,widget:l,parent:m.parent,onExecute:m.onExecute,onCancel:m.onCancel,onClose:m.onClose,handlers:g});if(l.onOpen){l.onOpen(h)}return h};this.close=function(e){while(dojo.some(a,function(k){return k.widget==e})){var h=a.pop(),j=h.wrapper,f=h.iframe,g=h.widget,d=h.onClose;if(g.onClose){g.onClose()}dojo.forEach(h.handlers,dojo.disconnect);if(!g||!g.domNode){return}this.prepare(g.domNode);f.destroy();dojo.destroy(j);if(d){d()}}}}();dijit._frames=new function(){var a=[];this.pop=function(){var c;if(a.length){c=a.pop();c.style.display=""}else{if(dojo.isIE){var d=dojo.config.dojoBlankHtmlUrl||(dojo.moduleUrl("dojo","resources/blank.html")+"")||'javascript:""';var b="<iframe src='"+d+"' style='position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity=\"0\");'>";c=dojo.doc.createElement(b)}else{c=dojo.create("iframe");c.src='javascript:""';c.className="dijitBackgroundIframe"}c.tabIndex=-1;dojo.body().appendChild(c)}return c};this.push=function(b){b.style.display="none";if(dojo.isIE){b.style.removeExpression("width");b.style.removeExpression("height")}a.push(b)}}();dijit.BackgroundIframe=function(b){if(!b.id){throw new Error("no id")}if(dojo.isIE<7||(dojo.isFF<3&&dojo.hasClass(dojo.body(),"dijit_a11y"))){var a=dijit._frames.pop();b.appendChild(a);if(dojo.isIE){a.style.setExpression("width",dojo._scopeName+".doc.getElementById('"+b.id+"').offsetWidth");a.style.setExpression("height",dojo._scopeName+".doc.getElementById('"+b.id+"').offsetHeight")}this.iframe=a}};dojo.extend(dijit.BackgroundIframe,{destroy:function(){if(this.iframe){dijit._frames.push(this.iframe);delete this.iframe}}})}if(!dojo._hasResource["dijit._base.scroll"]){dojo._hasResource["dijit._base.scroll"]=true;dojo.provide("dijit._base.scroll");dijit.scrollIntoView=function(y){try{y=dojo.byId(y);var H=dojo.doc;var q=dojo.body();var r=q.parentNode;if((!(dojo.isFF>=3||dojo.isIE||dojo.isWebKit)||y==q||y==r)&&(typeof y.scrollIntoView=="function")){y.scrollIntoView(false);return}var B=dojo._isBodyLtr();var h=dojo.isIE>=8&&!k;var j=!B&&!h;var g=q;var k=H.compatMode=="BackCompat";if(k){r._offsetWidth=r._clientWidth=q._offsetWidth=q.clientWidth;r._offsetHeight=r._clientHeight=q._offsetHeight=q.clientHeight}else{if(dojo.isWebKit){q._offsetWidth=q._clientWidth=r.clientWidth;q._offsetHeight=q._clientHeight=r.clientHeight}else{g=r}r._offsetHeight=r.clientHeight;r._offsetWidth=r.clientWidth}function f(I){var J=dojo.isIE;return((J<=6||(J>=7&&k))?false:(dojo.style(I,"position").toLowerCase()=="fixed"))}function o(L){var M=L.parentNode;var O=L.offsetParent;if(O==null||f(L)){O=r;M=(L==q)?r:null}L._offsetParent=O;L._parent=M;var N=dojo._getBorderExtents(L);L._borderStart={H:(h&&!B)?(N.w-N.l):N.l,V:N.t};L._borderSize={H:N.w,V:N.h};L._scrolledAmount={H:L.scrollLeft,V:L.scrollTop};L._offsetSize={H:L._offsetWidth||L.offsetWidth,V:L._offsetHeight||L.offsetHeight};L._offsetStart={H:(h&&!B)?O.clientWidth-L.offsetLeft-L._offsetSize.H:L.offsetLeft,V:L.offsetTop};L._clientSize={H:L._clientWidth||L.clientWidth,V:L._clientHeight||L.clientHeight};if(L!=q&&L!=r&&L!=y){for(var J in L._offsetSize){var K=L._offsetSize[J]-L._clientSize[J]-L._borderSize[J];var I=L._clientSize[J]>0&&K>0;if(I){L._offsetSize[J]-=K;if(dojo.isIE&&j&&J=="H"){L._offsetStart[J]+=K}}}}}var c=y;while(c!=null){if(f(c)){y.scrollIntoView(false);return}o(c);c=c._parent}if(dojo.isIE&&y._parent){var a=y._offsetParent;y._offsetStart.H+=a._borderStart.H;y._offsetStart.V+=a._borderStart.V}if(dojo.isIE>=7&&g==r&&j&&q._offsetStart&&q._offsetStart.H==0){var b=r.scrollWidth-r._offsetSize.H;if(b>0){q._offsetStart.H=-b}}if(dojo.isIE<=6&&!k){r._offsetSize.H+=r._borderSize.H;r._offsetSize.V+=r._borderSize.V}if(j&&q._offsetStart&&g==r&&r._scrolledAmount){var x=q._offsetStart.H;if(x<0){r._scrolledAmount.H+=x;q._offsetStart.H=0}}c=y;while(c){var p=c._parent;if(!p){break}if(p.tagName=="TD"){var C=p._parent._parent._parent;if(p!=c._offsetParent&&p._offsetParent!=c._offsetParent){p=C}}var E=c._offsetParent==p;for(var v in c._offsetStart){var m=v=="H"?"V":"H";if(j&&v=="H"&&(p!=r)&&(p!=q)&&(dojo.isIE||dojo.isWebKit)&&p._clientSize.H>0&&p.scrollWidth>p._clientSize.H){var G=p.scrollWidth-p._clientSize.H;if(G>0){p._scrolledAmount.H-=G}}if(p._offsetParent.tagName=="TABLE"){if(dojo.isIE){p._offsetStart[v]-=p._offsetParent._borderStart[v];p._borderStart[v]=p._borderSize[v]=0}else{p._offsetStart[v]+=p._offsetParent._borderStart[v]}}if(dojo.isIE){p._offsetStart[v]+=p._offsetParent._borderStart[v]}var d=c._offsetStart[v]-p._scrolledAmount[v]-(E?0:p._offsetStart[v])-p._borderStart[v];var w=d+c._offsetSize[v]-p._offsetSize[v]+p._borderSize[v];var e=(v=="H")?"scrollLeft":"scrollTop";var l=v=="H"&&j;var F=l?-w:d;var A=l?-d:w;var t=(F*A<=0)?0:Math[(F<0)?"max":"min"](F,A);if(t!=0){var D=p[e];p[e]+=(l)?-t:t;var s=p[e]-D}if(E){c._offsetStart[v]+=p._offsetStart[v]}c._offsetStart[v]-=p[e]}c._parent=p._parent;c._offsetParent=p._offsetParent}p=y;var u;while(p&&p.removeAttribute){u=p.parentNode;p.removeAttribute("_offsetParent");p.removeAttribute("_parent");p=u}}catch(z){console.error("scrollIntoView: "+z);y.scrollIntoView(false)}}}if(!dojo._hasResource["dijit._base.sniff"]){dojo._hasResource["dijit._base.sniff"]=true;dojo.provide("dijit._base.sniff");(function(){var j=dojo,h=j.doc.documentElement,a=j.isIE,e=j.isOpera,g=Math.floor,b=j.isFF,k=j.boxModel.replace(/-/,""),f={dj_ie:a,dj_ie6:g(a)==6,dj_ie7:g(a)==7,dj_iequirks:a&&j.isQuirks,dj_opera:e,dj_opera8:g(e)==8,dj_opera9:g(e)==9,dj_khtml:j.isKhtml,dj_webkit:j.isWebKit,dj_safari:j.isSafari,dj_gecko:j.isMozilla,dj_ff2:g(b)==2,dj_ff3:g(b)==3};f["dj_"+k]=true;for(var c in f){if(f[c]){if(h.className){h.className+=" "+c}else{h.className=c}}}dojo._loaders.unshift(function(){if(!dojo._isBodyLtr()){h.className+=" dijitRtl";for(var d in f){if(f[d]){h.className+=" "+d+"-rtl"}}}})})()}if(!dojo._hasResource["dijit._base.typematic"]){dojo._hasResource["dijit._base.typematic"]=true;dojo.provide("dijit._base.typematic");dijit.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=(this._currentTimeout<0)?this._initialDelay:((this._subsequentDelay>1)?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay));this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout)},trigger:function(a,g,c,f,e,b,d){if(e!=this._obj){this.stop();this._initialDelay=d||500;this._subsequentDelay=b||0.9;this._obj=e;this._evt=a;this._node=c;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(g,f);this._fireEventAndReload()}},stop:function(){if(this._timer){clearTimeout(this._timer);this._timer=null}if(this._obj){this._callback(-1,this._node,this._evt);this._obj=null}},addKeyListener:function(c,a,f,e,b,d){if(a.keyCode){a.charOrCode=a.keyCode;dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0")}else{if(a.charCode){a.charOrCode=String.fromCharCode(a.charCode);dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0")}}return[dojo.connect(c,"onkeypress",this,function(g){if(g.charOrCode==a.charOrCode&&(a.ctrlKey===undefined||a.ctrlKey==g.ctrlKey)&&(a.altKey===undefined||a.altKey==g.ctrlKey)&&(a.shiftKey===undefined||a.shiftKey==g.ctrlKey)){dojo.stopEvent(g);dijit.typematic.trigger(a,f,c,e,a,b,d)}else{if(dijit.typematic._obj==a){dijit.typematic.stop()}}}),dojo.connect(c,"onkeyup",this,function(g){if(dijit.typematic._obj==a){dijit.typematic.stop()}})]},addMouseListener:function(c,f,e,b,d){var a=dojo.connect;return[a(c,"mousedown",this,function(g){dojo.stopEvent(g);dijit.typematic.trigger(g,f,c,e,c,b,d)}),a(c,"mouseup",this,function(g){dojo.stopEvent(g);dijit.typematic.stop()}),a(c,"mouseout",this,function(g){dojo.stopEvent(g);dijit.typematic.stop()}),a(c,"mousemove",this,function(g){dojo.stopEvent(g)}),a(c,"dblclick",this,function(g){dojo.stopEvent(g);if(dojo.isIE){dijit.typematic.trigger(g,f,c,e,c,b,d);setTimeout(dojo.hitch(this,dijit.typematic.stop),50)}})]},addListener:function(d,e,a,g,f,b,c){return this.addKeyListener(e,a,g,f,b,c).concat(this.addMouseListener(d,g,f,b,c))}}}if(!dojo._hasResource["dijit._base.wai"]){dojo._hasResource["dijit._base.wai"]=true;dojo.provide("dijit._base.wai");dijit.wai={onload:function(){var d=dojo.create("div",{id:"a11yTestNode",style:{cssText:'border: 1px solid;border-color:red green;position: absolute;height: 5px;top: -999px;background-image: url("'+(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif"))+'");'}},dojo.body());var b=dojo.getComputedStyle(d);if(b){var a=b.backgroundImage;var c=(b.borderTopColor==b.borderRightColor)||(a!=null&&(a=="none"||a=="url(invalid-url:)"));dojo[c?"addClass":"removeClass"](dojo.body(),"dijit_a11y");if(dojo.isIE){d.outerHTML=""}else{dojo.body().removeChild(d)}}}};if(dojo.isIE||dojo.isMoz){dojo._loaders.unshift(dijit.wai.onload)}dojo.mixin(dijit,{_XhtmlRoles:/banner|contentinfo|definition|main|navigation|search|note|secondary|seealso/,hasWaiRole:function(a,c){var b=this.getWaiRole(a);return c?(b.indexOf(c)>-1):(b.length>0)},getWaiRole:function(a){return dojo.trim((dojo.attr(a,"role")||"").replace(this._XhtmlRoles,"").replace("wairole:",""))},setWaiRole:function(c,e){var d=dojo.attr(c,"role")||"";if(dojo.isFF<3||!this._XhtmlRoles.test(d)){dojo.attr(c,"role",dojo.isFF<3?"wairole:"+e:e)}else{if((" "+d+" ").indexOf(" "+e+" ")<0){var b=dojo.trim(d.replace(this._XhtmlRoles,""));var a=dojo.trim(d.replace(b,""));dojo.attr(c,"role",a+(a?" ":"")+e)}}},removeWaiRole:function(c,e){var a=dojo.attr(c,"role");if(!a){return}if(e){var d=dojo.isFF<3?"wairole:"+e:e;var b=dojo.trim((" "+a+" ").replace(" "+d+" "," "));dojo.attr(c,"role",b)}else{c.removeAttribute("role")}},hasWaiState:function(a,b){if(dojo.isFF<3){return a.hasAttributeNS("http://www.w3.org/2005/07/aaa",b)}return a.hasAttribute?a.hasAttribute("aria-"+b):!!a.getAttribute("aria-"+b)},getWaiState:function(a,b){if(dojo.isFF<3){return a.getAttributeNS("http://www.w3.org/2005/07/aaa",b)}return a.getAttribute("aria-"+b)||""},setWaiState:function(a,c,b){if(dojo.isFF<3){a.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+c,b)}else{a.setAttribute("aria-"+c,b)}},removeWaiState:function(a,b){if(dojo.isFF<3){a.removeAttributeNS("http://www.w3.org/2005/07/aaa",b)}else{a.removeAttribute("aria-"+b)}}})}if(!dojo._hasResource["dijit._base"]){dojo._hasResource["dijit._base"]=true;dojo.provide("dijit._base")}if(!dojo._hasResource["dijit._Widget"]){dojo._hasResource["dijit._Widget"]=true;dojo.provide("dijit._Widget");dojo.require("dijit._base");dojo.connect(dojo,"connect",function(b,a){if(b&&dojo.isFunction(b._onConnect)){b._onConnect(a)}});dijit._connectOnUseEventHandler=function(a){};(function(){var b={};var a=function(c){if(!b[c]){var g=[];var d;var f=dojo.getObject(c).prototype;for(var e in f){if(dojo.isFunction(f[e])&&(d=e.match(/^_set([a-zA-Z]*)Attr$/))&&d[1]){g.push(d[1].charAt(0).toLowerCase()+d[1].substr(1))}}b[c]=g}return b[c]||[]};dojo.declare("dijit._Widget",null,{id:"",lang:"",dir:"","class":"",style:"",title:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:dijit._connectOnUseEventHandler,onDblClick:dijit._connectOnUseEventHandler,onKeyDown:dijit._connectOnUseEventHandler,onKeyPress:dijit._connectOnUseEventHandler,onKeyUp:dijit._connectOnUseEventHandler,onMouseDown:dijit._connectOnUseEventHandler,onMouseMove:dijit._connectOnUseEventHandler,onMouseOut:dijit._connectOnUseEventHandler,onMouseOver:dijit._connectOnUseEventHandler,onMouseLeave:dijit._connectOnUseEventHandler,onMouseEnter:dijit._connectOnUseEventHandler,onMouseUp:dijit._connectOnUseEventHandler,_blankGif:(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif")),postscript:function(d,c){this.create(d,c)},create:function(f,d){this.srcNodeRef=dojo.byId(d);this._connects=[];this._deferredConnects=dojo.clone(this._deferredConnects);for(var c in this.attributeMap){delete this._deferredConnects[c]}for(c in this._deferredConnects){if(this[c]!==dijit._connectOnUseEventHandler){delete this._deferredConnects[c]}}if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id}if(f){this.params=f;dojo.mixin(this,f)}this.postMixInProperties();if(!this.id){this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"))}dijit.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var e=this.srcNodeRef;if(e&&e.parentNode){e.parentNode.replaceChild(this.domNode,e)}for(c in this.params){this._onConnect(c)}}if(this.domNode){this.domNode.setAttribute("widgetId",this.id)}this.postCreate();if(this.srcNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef}this._created=true},_applyAttributes:function(){var d=function(e,f){if((f.params&&e in f.params)||f[e]){f.attr(e,f[e])}};for(var c in this.attributeMap){d(c,this)}dojo.forEach(a(this.declaredClass),function(e){if(!(e in this.attributeMap)){d(e,this)}},this)},postMixInProperties:function(){},buildRendering:function(){this.domNode=this.srcNodeRef||dojo.create("div")},postCreate:function(){},startup:function(){this._started=true},destroyRecursive:function(c){this.destroyDescendants(c);this.destroy(c)},destroy:function(c){this.uninitialize();dojo.forEach(this._connects,function(d){dojo.forEach(d,dojo.disconnect)});dojo.forEach(this._supportingWidgets||[],function(d){if(d.destroy){d.destroy()}});this.destroyRendering(c);dijit.registry.remove(this.id)},destroyRendering:function(c){if(this.bgIframe){this.bgIframe.destroy(c);delete this.bgIframe}if(this.domNode){if(c){dojo.removeAttr(this.domNode,"widgetId")}else{dojo.destroy(this.domNode)}delete this.domNode}if(this.srcNodeRef){if(!c){dojo.destroy(this.srcNodeRef)}delete this.srcNodeRef}},destroyDescendants:function(c){dojo.forEach(this.getChildren(),function(d){if(d.destroyRecursive){d.destroyRecursive(c)}})},uninitialize:function(){return false},onFocus:function(){},onBlur:function(){},_onFocus:function(c){this.onFocus()},_onBlur:function(){this.onBlur()},_onConnect:function(c){if(c in this._deferredConnects){var d=this[this._deferredConnects[c]||"domNode"];this.connect(d,c.toLowerCase(),c);delete this._deferredConnects[c]}},_setClassAttr:function(c){var d=this[this.attributeMap["class"]||"domNode"];dojo.removeClass(d,this["class"]);this["class"]=c;dojo.addClass(d,c)},_setStyleAttr:function(c){var d=this[this.attributeMap.style||"domNode"];if(dojo.isObject(c)){dojo.style(d,c)}else{if(d.style.cssText){d.style.cssText+="; "+c}else{d.style.cssText=c}}this["style"]=c},setAttribute:function(c,d){dojo.deprecated(this.declaredClass+"::setAttribute() is deprecated. Use attr() instead.","","2.0");this.attr(c,d)},_attrToDom:function(d,e){var c=this.attributeMap[d];dojo.forEach(dojo.isArray(c)?c:[c],function(h){var g=this[h.node||h||"domNode"];var f=h.type||"attribute";switch(f){case"attribute":if(dojo.isFunction(e)){e=dojo.hitch(this,e)}if(/^on[A-Z][a-zA-Z]*$/.test(d)){d=d.toLowerCase()}dojo.attr(g,d,e);break;case"innerHTML":g.innerHTML=e;break;case"class":dojo.removeClass(g,this[d]);dojo.addClass(g,e);break}},this);this[d]=e},attr:function(e,f){var d=arguments.length;if(d==1&&!dojo.isString(e)){for(var c in e){this.attr(c,e[c])}return this}var g=this._getAttrNames(e);if(d==2){if(this[g.s]){return this[g.s](f)||this}else{if(e in this.attributeMap){this._attrToDom(e,f)}this[e]=f}return this}else{if(this[g.g]){return this[g.g]()}else{return this[e]}}},_attrPairNames:{},_getAttrNames:function(e){var c=this._attrPairNames;if(c[e]){return c[e]}var d=e.charAt(0).toUpperCase()+e.substr(1);return c[e]={n:e+"Node",s:"_set"+d+"Attr",g:"_get"+d+"Attr"}},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getDescendants:function(){if(this.containerNode){var c=dojo.query("[widgetId]",this.containerNode);return c.map(dijit.byNode)}else{return[]}},getChildren:function(){if(this.containerNode){return dijit.findWidgets(this.containerNode)}else{return[]}},nodesWithKeyClick:["input","button"],connect:function(h,g,k){var j=dojo;var e=dojo.connect;var f=[];if(g=="ondijitclick"){if(!this.nodesWithKeyClick[h.nodeName]){var c=j.hitch(this,k);f.push(e(h,"onkeydown",this,function(d){if(!j.isFF&&d.keyCode==j.keys.ENTER&&!d.ctrlKey&&!d.shiftKey&&!d.altKey&&!d.metaKey){return c(d)}else{if(d.keyCode==j.keys.SPACE){j.stopEvent(d)}}}),e(h,"onkeyup",this,function(d){if(d.keyCode==j.keys.SPACE&&!d.ctrlKey&&!d.shiftKey&&!d.altKey&&!d.metaKey){return c(d)}}));if(j.isFF){f.push(e(h,"onkeypress",this,function(d){if(d.keyCode==j.keys.ENTER&&!d.ctrlKey&&!d.shiftKey&&!d.altKey&&!d.metaKey){return c(d)}}))}}g="onclick"}f.push(e(h,g,this,k));this._connects.push(f);return f},disconnect:function(d){for(var c=0;c<this._connects.length;c++){if(this._connects[c]==d){dojo.forEach(d,dojo.disconnect);this._connects.splice(c,1);return}}},isLeftToRight:function(){return dojo._isBodyLtr()},isFocusable:function(){return this.focus&&(dojo.style(this.domNode,"display")!="none")},placeAt:function(d,c){if(d.declaredClass&&d.addChild){d.addChild(this,c)}else{dojo.place(this.domNode,d,c)}return this}})})()}if(!dojo._hasResource["dojo.string"]){dojo._hasResource["dojo.string"]=true;dojo.provide("dojo.string");dojo.string.rep=function(c,b){if(b<=0||!c){return""}var a=[];for(;;){if(b&1){a.push(c)}if(!(b>>=1)){break}c+=c}return a.join("")};dojo.string.pad=function(f,c,d,a){if(!d){d="0"}var b=String(f),e=dojo.string.rep(d,Math.ceil((c-b.length)/d.length));return a?b+e:e+b};dojo.string.substitute=function(c,d,b,a){a=a||dojo.global;b=(!b)?function(e){return e}:dojo.hitch(a,b);return c.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(e,f,h){var g=dojo.getObject(f,false,d);if(h){g=dojo.getObject(h,false,a).call(a,g,f)}return b(g,f).toString()})};dojo.string.trim=String.prototype.trim?dojo.trim:function(b){b=b.replace(/^\s+/,"");for(var a=b.length-1;a>=0;a--){if(/\S/.test(b.charAt(a))){b=b.substring(0,a+1);break}}return b}}if(!dojo._hasResource["dojo.date.stamp"]){dojo._hasResource["dojo.date.stamp"]=true;dojo.provide("dojo.date.stamp");dojo.date.stamp.fromISOString=function(e,b){if(!dojo.date.stamp._isoRegExp){dojo.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/}var c=dojo.date.stamp._isoRegExp.exec(e);var a=null;if(c){c.shift();if(c[1]){c[1]--}if(c[6]){c[6]*=1000}if(b){b=new Date(b);dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(g){return b["get"+g]()}).forEach(function(h,g){if(c[g]===undefined){c[g]=h}})}a=new Date(c[0]||1970,c[1]||0,c[2]||1,c[3]||0,c[4]||0,c[5]||0,c[6]||0);var f=0;var d=c[7]&&c[7].charAt(0);if(d!="Z"){f=((c[8]||0)*60)+(Number(c[9])||0);if(d!="-"){f*=-1}}if(d){f-=a.getTimezoneOffset()}if(f){a.setTime(a.getTime()+f*60000)}}return a};dojo.date.stamp.toISOString=function(f,l){var k=function(m){return(m<10)?"0"+m:m};l=l||{};var e=[];var h=l.zulu?"getUTC":"get";var c="";if(l.selector!="time"){var g=f[h+"FullYear"]();c=["0000".substr((g+"").length)+g,k(f[h+"Month"]()+1),k(f[h+"Date"]())].join("-")}e.push(c);if(l.selector!="date"){var b=[k(f[h+"Hours"]()),k(f[h+"Minutes"]()),k(f[h+"Seconds"]())].join(":");var a=f[h+"Milliseconds"]();if(l.milliseconds){b+="."+(a<100?"0":"")+k(a)}if(l.zulu){b+="Z"}else{if(l.selector!="time"){var j=f.getTimezoneOffset();var d=Math.abs(j);b+=(j>0?"-":"+")+k(Math.floor(d/60))+":"+k(d%60)}}e.push(b)}return e.join("T")}}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");dojo.parser=new function(){var f=dojo;var a=f._scopeName+"Type";var h="["+a+"]";var b=0,k={};var g=function(d,p){var o=p||k;if(dojo.isIE){var q=d.__dojoNameCache;if(q&&o[q]===d){return q}}var m;do{m="__"+b++}while(m in o);o[m]=d;return m};function l(d){if(f.isString(d)){return"string"}if(typeof d=="number"){return"number"}if(typeof d=="boolean"){return"boolean"}if(f.isFunction(d)){return"function"}if(f.isArray(d)){return"array"}if(d instanceof Date){return"date"}if(d instanceof f._Url){return"url"}return"object"}function e(m,d){switch(d){case"string":return m;case"number":return m.length?Number(m):NaN;case"boolean":return typeof m=="boolean"?m:!(m.toLowerCase()=="false");case"function":if(f.isFunction(m)){m=m.toString();m=f.trim(m.substring(m.indexOf("{")+1,m.length-1))}try{if(m.search(/[^\w\.]+/i)!=-1){m=g(new Function(m),this)}return f.getObject(m,false)}catch(o){return new Function()}case"array":return m?m.split(/\s*,\s*/):[];case"date":switch(m){case"":return new Date("");case"now":return new Date();default:return f.date.stamp.fromISOString(m)}case"url":return f.baseUrl+m;default:return f.fromJson(m)}}var j={};function c(o){if(!j[o]){var d=f.getObject(o);if(!f.isFunction(d)){throw new Error("Could not load class '"+o+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?")}var p=d.prototype;var s={},r={};for(var m in p){if(m.charAt(0)=="_"){continue}if(m in r){continue}var q=p[m];s[m]=l(q)}j[o]={cls:d,params:s}}return j[o]}this._functionFromScript=function(m){var o="";var q="";var d=m.getAttribute("args");if(d){f.forEach(d.split(/\s*,\s*/),function(s,r){o+="var "+s+" = arguments["+r+"]; "})}var p=m.getAttribute("with");if(p&&p.length){f.forEach(p.split(/\s*,\s*/),function(r){o+="with("+r+"){";q+="}"})}return new Function(o+m.innerHTML+q)};this.instantiate=function(m,d){var o=[];d=d||{};f.forEach(m,function(r){if(!r){return}var z=a in d?d[a]:r.getAttribute(a);if(!z||!z.length){return}var w=c(z),x=w.cls,p=x._noScript||x.prototype._noScript;var s={},u=r.attributes;for(var q in w.params){var D=q in d?{value:d[q],specified:true}:u.getNamedItem(q);if(!D||(!D.specified&&(!dojo.isIE||q.toLowerCase()!="value"))){continue}var B=D.value;switch(q){case"class":B="className" in d?d.className:r.className;break;case"style":B="style" in d?d.style:(r.style&&r.style.cssText)}var v=w.params[q];if(typeof B=="string"){s[q]=e(B,v)}else{s[q]=B}}if(!p){var t=[],E=[];f.query("> script[type^='dojo/']",r).orphan().forEach(function(F){var H=F.getAttribute("event"),G=F.getAttribute("type"),I=f.parser._functionFromScript(F);if(H){if(G=="dojo/connect"){t.push({event:H,func:I})}else{s[H]=I}}else{E.push(I)}})}var A=x.markupFactory;if(!A&&x.prototype){A=x.prototype.markupFactory}var C=A?A(s,r,x):new x(s,r);o.push(C);var y=r.getAttribute("jsId");if(y){f.setObject(y,C)}if(!p){f.forEach(t,function(F){f.connect(C,F.event,null,F.func)});f.forEach(E,function(F){F.call(C)})}});f.forEach(o,function(p){if(p&&p.startup&&!p._started&&(!p.getParent||!p.getParent())){p.startup()}});return o};this.parse=function(d){var m=f.query(h,d);var o=this.instantiate(m);return o}}();(function(){var a=function(){if(dojo.config.parseOnLoad==true){dojo.parser.parse()}};if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){dojo._loaders.splice(1,0,a)}else{dojo._loaders.unshift(a)}})()}if(!dojo._hasResource["dijit._Templated"]){dojo._hasResource["dijit._Templated"]=true;dojo.provide("dijit._Templated");dojo.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_stringRepl:function(a){var b=this.declaredClass,c=this;return dojo.string.substitute(a,this,function(e,d){if(d.charAt(0)=="!"){e=dojo.getObject(d.substr(1),false,c)}if(typeof e=="undefined"){throw new Error(b+" template:"+d)}if(e==null){return""}return d.charAt(0)=="!"?e:e.toString().replace(/"/g,"&quot;")},this)},buildRendering:function(){var b=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var c;if(dojo.isString(b)){c=dojo._toDom(this._stringRepl(b))}else{c=b.cloneNode(true)}this.domNode=c;this._attachTemplateNodes(c);if(this.widgetsInTemplate){var a=(this._supportingWidgets=dojo.parser.parse(c));this._attachTemplateNodes(a,function(e,d){return e[d]})}this._fillContent(this.srcNodeRef)},_fillContent:function(b){var a=this.containerNode;if(b&&a){while(b.hasChildNodes()){a.appendChild(b.firstChild)}}},_attachTemplateNodes:function(d,g){g=g||function(t,s){return t.getAttribute(s)};var b=dojo.isArray(d)?d:(d.all||d.getElementsByTagName("*"));var l=dojo.isArray(d)?0:-1;for(;l<b.length;l++){var c=(l==-1)?d:b[l];if(this.widgetsInTemplate&&g(c,"dojoType")){continue}var e=g(c,"dojoAttachPoint");if(e){var m,p=e.split(/\s*,\s*/);while((m=p.shift())){if(dojo.isArray(this[m])){this[m].push(c)}else{this[m]=c}}}var k=g(c,"dojoAttachEvent");if(k){var a,q=k.split(/\s*,\s*/);var f=dojo.trim;while((a=q.shift())){if(a){var h=null;if(a.indexOf(":")!=-1){var r=a.split(":");a=f(r[0]);h=f(r[1])}else{a=f(a)}if(!h){h=a}this.connect(c,a,h)}}}var j=g(c,"waiRole");if(j){dijit.setWaiRole(c,j)}var o=g(c,"waiState");if(o){dojo.forEach(o.split(/\s*,\s*/),function(t){if(t.indexOf("-")!=-1){var s=t.split("-");dijit.setWaiState(c,s[0],s[1])}})}}}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(c,d,f){var e=dijit._Templated._templateCache;var a=d||c;var b=e[a];if(b){if(!b.ownerDocument||b.ownerDocument==dojo.doc){return b}dojo.destroy(b)}if(!d){d=dijit._Templated._sanitizeTemplateString(dojo.trim(dojo._getText(c)))}d=dojo.string.trim(d);if(f||d.match(/\$\{([^\}]+)\}/g)){return(e[a]=d)}else{return(e[a]=dojo._toDom(d))}};dijit._Templated._sanitizeTemplateString=function(a){if(a){a=a.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var b=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(b){a=b[1]}}else{a=""}return a};if(dojo.isIE){dojo.addOnWindowUnload(function(){var a=dijit._Templated._templateCache;for(var b in a){var c=a[b];if(!isNaN(c.nodeType)){dojo.destroy(c)}delete a[b]}})}dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""})}if(!dojo._hasResource["dojo.dnd.common"]){dojo._hasResource["dojo.dnd.common"]=true;dojo.provide("dojo.dnd.common");dojo.dnd._isMac=navigator.appVersion.indexOf("Macintosh")>=0;dojo.dnd._copyKey=dojo.dnd._isMac?"metaKey":"ctrlKey";dojo.dnd.getCopyKeyState=function(a){return a[dojo.dnd._copyKey]};dojo.dnd._uniqueId=0;dojo.dnd.getUniqueId=function(){var a;do{a=dojo._scopeName+"Unique"+(++dojo.dnd._uniqueId)}while(dojo.byId(a));return a};dojo.dnd._empty={};dojo.dnd.isFormElement=function(b){var a=b.target;if(a.nodeType==3){a=a.parentNode}return" button textarea input select option ".indexOf(" "+a.tagName.toLowerCase()+" ")>=0};dojo.dnd._lmb=dojo.isIE?1:0;dojo.dnd._isLmbPressed=dojo.isIE?function(a){return a.button&1}:function(a){return a.button===0}}if(!dojo._hasResource["dojo.dnd.autoscroll"]){dojo._hasResource["dojo.dnd.autoscroll"]=true;dojo.provide("dojo.dnd.autoscroll");dojo.dnd.getViewport=function(){var f=dojo.doc,c=f.documentElement,e=window,a=dojo.body();if(dojo.isMozilla){return{w:c.clientWidth,h:e.innerHeight}}else{if(!dojo.isOpera&&e.innerWidth){return{w:e.innerWidth,h:e.innerHeight}}else{if(!dojo.isOpera&&c&&c.clientWidth){return{w:c.clientWidth,h:c.clientHeight}}else{if(a.clientWidth){return{w:a.clientWidth,h:a.clientHeight}}}}}return null};dojo.dnd.V_TRIGGER_AUTOSCROLL=32;dojo.dnd.H_TRIGGER_AUTOSCROLL=32;dojo.dnd.V_AUTOSCROLL_VALUE=16;dojo.dnd.H_AUTOSCROLL_VALUE=16;dojo.dnd.autoScroll=function(d){var c=dojo.dnd.getViewport(),b=0,a=0;if(d.clientX<dojo.dnd.H_TRIGGER_AUTOSCROLL){b=-dojo.dnd.H_AUTOSCROLL_VALUE}else{if(d.clientX>c.w-dojo.dnd.H_TRIGGER_AUTOSCROLL){b=dojo.dnd.H_AUTOSCROLL_VALUE}}if(d.clientY<dojo.dnd.V_TRIGGER_AUTOSCROLL){a=-dojo.dnd.V_AUTOSCROLL_VALUE}else{if(d.clientY>c.h-dojo.dnd.V_TRIGGER_AUTOSCROLL){a=dojo.dnd.V_AUTOSCROLL_VALUE}}window.scrollBy(b,a)};dojo.dnd._validNodes={div:1,p:1,td:1};dojo.dnd._validOverflow={auto:1,scroll:1};dojo.dnd.autoScrollNodes=function(k){for(var d=k.target;d;){if(d.nodeType==1&&(d.tagName.toLowerCase() in dojo.dnd._validNodes)){var u=dojo.getComputedStyle(d);if(u.overflow.toLowerCase() in dojo.dnd._validOverflow){var l=dojo._getContentBox(d,u),q=dojo._abs(d,true);var o=Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL,l.w/2),j=Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL,l.h/2),c=k.pageX-q.x,a=k.pageY-q.y,r=0,p=0;if(dojo.isWebKit||dojo.isOpera){c+=dojo.body().scrollLeft,a+=dojo.body().scrollTop}if(c>0&&c<l.w){if(c<o){r=-o}else{if(c>l.w-o){r=o}}}if(a>0&&a<l.h){if(a<j){p=-j}else{if(a>l.h-j){p=j}}}var f=d.scrollLeft,g=d.scrollTop;d.scrollLeft=d.scrollLeft+r;d.scrollTop=d.scrollTop+p;if(f!=d.scrollLeft||g!=d.scrollTop){return}}}try{d=d.parentNode}catch(m){d=null}}dojo.dnd.autoScroll(k)}}if(!dojo._hasResource["dojo.dnd.Mover"]){dojo._hasResource["dojo.dnd.Mover"]=true;dojo.provide("dojo.dnd.Mover");dojo.declare("dojo.dnd.Mover",null,{constructor:function(f,g,c){this.node=dojo.byId(f);this.marginBox={l:g.pageX,t:g.pageY};this.mouseButton=g.button;var b=this.host=c,j=f.ownerDocument,a=dojo.connect(j,"onmousemove",this,"onFirstMove");this.events=[dojo.connect(j,"onmousemove",this,"onMouseMove"),dojo.connect(j,"onmouseup",this,"onMouseUp"),dojo.connect(j,"ondragstart",dojo.stopEvent),dojo.connect(j.body,"onselectstart",dojo.stopEvent),a];if(b&&b.onMoveStart){b.onMoveStart(this)}},onMouseMove:function(b){dojo.dnd.autoScroll(b);var a=this.marginBox;this.host.onMove(this,{l:a.l+b.pageX,t:a.t+b.pageY});dojo.stopEvent(b)},onMouseUp:function(a){if(dojo.isWebKit&&dojo.dnd._isMac&&this.mouseButton==2?a.button==0:this.mouseButton==a.button){this.destroy()}dojo.stopEvent(a)},onFirstMove:function(){var o=this.node.style,d,k,e=this.host;switch(o.position){case"relative":case"absolute":d=Math.round(parseFloat(o.left));k=Math.round(parseFloat(o.top));break;default:o.position="absolute";var c=dojo.marginBox(this.node);var g=dojo.doc.body;var j=dojo.getComputedStyle(g);var a=dojo._getMarginBox(g,j);var f=dojo._getContentBox(g,j);d=c.l-(f.l-a.l);k=c.t-(f.t-a.t);break}this.marginBox.l=d-this.marginBox.l;this.marginBox.t=k-this.marginBox.t;if(e&&e.onFirstMove){e.onFirstMove(this)}dojo.disconnect(this.events.pop())},destroy:function(){dojo.forEach(this.events,dojo.disconnect);var a=this.host;if(a&&a.onMoveStop){a.onMoveStop(this)}this.events=this.node=this.host=null}})}if(!dojo._hasResource["dojo.dnd.Moveable"]){dojo._hasResource["dojo.dnd.Moveable"]=true;dojo.provide("dojo.dnd.Moveable");dojo.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:false,constructor:function(a,b){this.node=dojo.byId(a);if(!b){b={}}this.handle=b.handle?dojo.byId(b.handle):null;if(!this.handle){this.handle=this.node}this.delay=b.delay>0?b.delay:0;this.skip=b.skip;this.mover=b.mover?b.mover:dojo.dnd.Mover;this.events=[dojo.connect(this.handle,"onmousedown",this,"onMouseDown"),dojo.connect(this.handle,"ondragstart",this,"onSelectStart"),dojo.connect(this.handle,"onselectstart",this,"onSelectStart")]},markupFactory:function(b,a){return new dojo.dnd.Moveable(a,b)},destroy:function(){dojo.forEach(this.events,dojo.disconnect);this.events=this.node=this.handle=null},onMouseDown:function(a){if(this.skip&&dojo.dnd.isFormElement(a)){return}if(this.delay){this.events.push(dojo.connect(this.handle,"onmousemove",this,"onMouseMove"),dojo.connect(this.handle,"onmouseup",this,"onMouseUp"));this._lastX=a.pageX;this._lastY=a.pageY}else{this.onDragDetected(a)}dojo.stopEvent(a)},onMouseMove:function(a){if(Math.abs(a.pageX-this._lastX)>this.delay||Math.abs(a.pageY-this._lastY)>this.delay){this.onMouseUp(a);this.onDragDetected(a)}dojo.stopEvent(a)},onMouseUp:function(b){for(var a=0;a<2;++a){dojo.disconnect(this.events.pop())}dojo.stopEvent(b)},onSelectStart:function(a){if(!this.skip||!dojo.dnd.isFormElement(a)){dojo.stopEvent(a)}},onDragDetected:function(a){new this.mover(this.node,a,this)},onMoveStart:function(a){dojo.publish("/dnd/move/start",[a]);dojo.addClass(dojo.body(),"dojoMove");dojo.addClass(this.node,"dojoMoveItem")},onMoveStop:function(a){dojo.publish("/dnd/move/stop",[a]);dojo.removeClass(dojo.body(),"dojoMove");dojo.removeClass(this.node,"dojoMoveItem")},onFirstMove:function(a){},onMove:function(b,a){this.onMoving(b,a);var c=b.node.style;c.left=a.l+"px";c.top=a.t+"px";this.onMoved(b,a)},onMoving:function(b,a){},onMoved:function(b,a){}})}if(!dojo._hasResource["dojo.dnd.move"]){dojo._hasResource["dojo.dnd.move"]=true;dojo.provide("dojo.dnd.move");dojo.declare("dojo.dnd.move.constrainedMoveable",dojo.dnd.Moveable,{constraints:function(){},within:false,markupFactory:function(b,a){return new dojo.dnd.move.constrainedMoveable(a,b)},constructor:function(a,b){if(!b){b={}}this.constraints=b.constraints;this.within=b.within},onFirstMove:function(a){var d=this.constraintBox=this.constraints.call(this,a);d.r=d.l+d.w;d.b=d.t+d.h;if(this.within){var b=dojo.marginBox(a.node);d.r-=b.w;d.b-=b.h}},onMove:function(b,a){var e=this.constraintBox,d=b.node.style;d.left=(a.l<e.l?e.l:e.r<a.l?e.r:a.l)+"px";d.top=(a.t<e.t?e.t:e.b<a.t?e.b:a.t)+"px"}});dojo.declare("dojo.dnd.move.boxConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{box:{},markupFactory:function(b,a){return new dojo.dnd.move.boxConstrainedMoveable(a,b)},constructor:function(b,c){var a=c&&c.box;this.constraints=function(){return a}}});dojo.declare("dojo.dnd.move.parentConstrainedMoveable",dojo.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(b,a){return new dojo.dnd.move.parentConstrainedMoveable(a,b)},constructor:function(b,c){var a=c&&c.area;this.constraints=function(){var g=this.node.parentNode,e=dojo.getComputedStyle(g),f=dojo._getMarginBox(g,e);if(a=="margin"){return f}var d=dojo._getMarginExtents(g,e);f.l+=d.l,f.t+=d.t,f.w-=d.w,f.h-=d.h;if(a=="border"){return f}d=dojo._getBorderExtents(g,e);f.l+=d.l,f.t+=d.t,f.w-=d.w,f.h-=d.h;if(a=="padding"){return f}d=dojo._getPadExtents(g,e);f.l+=d.l,f.t+=d.t,f.w-=d.w,f.h-=d.h;return f}}});dojo.dnd.move.constrainedMover=function(a,c){dojo.deprecated("dojo.dnd.move.constrainedMover, use dojo.dnd.move.constrainedMoveable instead");var b=function(f,g,d){dojo.dnd.Mover.call(this,f,g,d)};dojo.extend(b,dojo.dnd.Mover.prototype);dojo.extend(b,{onMouseMove:function(h){dojo.dnd.autoScroll(h);var d=this.marginBox,j=this.constraintBox,f=d.l+h.pageX,g=d.t+h.pageY;f=f<j.l?j.l:j.r<f?j.r:f;g=g<j.t?j.t:j.b<g?j.b:g;this.host.onMove(this,{l:f,t:g})},onFirstMove:function(){dojo.dnd.Mover.prototype.onFirstMove.call(this);var e=this.constraintBox=a.call(this);e.r=e.l+e.w;e.b=e.t+e.h;if(c){var d=dojo.marginBox(this.node);e.r-=d.w;e.b-=d.h}}});return b};dojo.dnd.move.boxConstrainedMover=function(b,a){dojo.deprecated("dojo.dnd.move.boxConstrainedMover, use dojo.dnd.move.boxConstrainedMoveable instead");return dojo.dnd.move.constrainedMover(function(){return b},a)};dojo.dnd.move.parentConstrainedMover=function(c,b){dojo.deprecated("dojo.dnd.move.parentConstrainedMover, use dojo.dnd.move.parentConstrainedMoveable instead");var a=function(){var g=this.node.parentNode,e=dojo.getComputedStyle(g),f=dojo._getMarginBox(g,e);if(c=="margin"){return f}var d=dojo._getMarginExtents(g,e);f.l+=d.l,f.t+=d.t,f.w-=d.w,f.h-=d.h;if(c=="border"){return f}d=dojo._getBorderExtents(g,e);f.l+=d.l,f.t+=d.t,f.w-=d.w,f.h-=d.h;if(c=="padding"){return f}d=dojo._getPadExtents(g,e);f.l+=d.l,f.t+=d.t,f.w-=d.w,f.h-=d.h;return f};return dojo.dnd.move.constrainedMover(a,b)};dojo.dnd.constrainedMover=dojo.dnd.move.constrainedMover;dojo.dnd.boxConstrainedMover=dojo.dnd.move.boxConstrainedMover;dojo.dnd.parentConstrainedMover=dojo.dnd.move.parentConstrainedMover}if(!dojo._hasResource["dojo.dnd.TimedMoveable"]){dojo._hasResource["dojo.dnd.TimedMoveable"]=true;dojo.provide("dojo.dnd.TimedMoveable");(function(){var a=dojo.dnd.Moveable.prototype.onMove;dojo.declare("dojo.dnd.TimedMoveable",dojo.dnd.Moveable,{timeout:40,constructor:function(b,c){if(!c){c={}}if(c.timeout&&typeof c.timeout=="number"&&c.timeout>=0){this.timeout=c.timeout}},markupFactory:function(c,b){return new dojo.dnd.TimedMoveable(b,c)},onMoveStop:function(b){if(b._timer){clearTimeout(b._timer);a.call(this,b,b._leftTop)}dojo.dnd.Moveable.prototype.onMoveStop.apply(this,arguments)},onMove:function(c,b){c._leftTop=b;if(!c._timer){var d=this;c._timer=setTimeout(function(){c._timer=null;a.call(d,c,c._leftTop)},this.timeout)}}})})()}if(!dojo._hasResource["dojo.fx.Toggler"]){dojo._hasResource["dojo.fx.Toggler"]=true;dojo.provide("dojo.fx.Toggler");dojo.declare("dojo.fx.Toggler",null,{constructor:function(a){var b=this;dojo.mixin(b,a);b.node=a.node;b._showArgs=dojo.mixin({},a);b._showArgs.node=b.node;b._showArgs.duration=b.showDuration;b.showAnim=b.showFunc(b._showArgs);b._hideArgs=dojo.mixin({},a);b._hideArgs.node=b.node;b._hideArgs.duration=b.hideDuration;b.hideAnim=b.hideFunc(b._hideArgs);dojo.connect(b.showAnim,"beforeBegin",dojo.hitch(b.hideAnim,"stop",true));dojo.connect(b.hideAnim,"beforeBegin",dojo.hitch(b.showAnim,"stop",true))},node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,show:function(a){return this.showAnim.play(a||0)},hide:function(a){return this.hideAnim.play(a||0)}})}if(!dojo._hasResource["dojo.fx"]){dojo._hasResource["dojo.fx"]=true;dojo.provide("dojo.fx");(function(){var c=dojo,b={_fire:function(d,f){if(this[d]){this[d].apply(this,f||[])}return this}};var e=function(d){this._index=-1;this._animations=d||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;c.forEach(this._animations,function(f){this.duration+=f.duration;if(f.delay){this.duration+=f.delay}},this)};c.extend(e,{_onAnimate:function(){this._fire("onAnimate",arguments)},_onEnd:function(){c.disconnect(this._onAnimateCtx);c.disconnect(this._onEndCtx);this._onAnimateCtx=this._onEndCtx=null;if(this._index+1==this._animations.length){this._fire("onEnd")}else{this._current=this._animations[++this._index];this._onAnimateCtx=c.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx=c.connect(this._current,"onEnd",this,"_onEnd");this._current.play(0,true)}},play:function(g,d){if(!this._current){this._current=this._animations[this._index=0]}if(!d&&this._current.status()=="playing"){return this}var f=c.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin")}),j=c.connect(this._current,"onBegin",this,function(k){this._fire("onBegin",arguments)}),h=c.connect(this._current,"onPlay",this,function(k){this._fire("onPlay",arguments);c.disconnect(f);c.disconnect(j);c.disconnect(h)});if(this._onAnimateCtx){c.disconnect(this._onAnimateCtx)}this._onAnimateCtx=c.connect(this._current,"onAnimate",this,"_onAnimate");if(this._onEndCtx){c.disconnect(this._onEndCtx)}this._onEndCtx=c.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,arguments);return this},pause:function(){if(this._current){var d=c.connect(this._current,"onPause",this,function(f){this._fire("onPause",arguments);c.disconnect(d)});this._current.pause()}return this},gotoPercent:function(f,d){this.pause();var g=this.duration*f;this._current=null;c.some(this._animations,function(h){if(h.duration<=g){this._current=h;return true}g-=h.duration;return false});if(this._current){this._current.gotoPercent(g/this._current.duration,d)}return this},stop:function(d){if(this._current){if(d){for(;this._index+1<this._animations.length;++this._index){this._animations[this._index].stop(true)}this._current=this._animations[this._index]}var f=c.connect(this._current,"onStop",this,function(g){this._fire("onStop",arguments);c.disconnect(f)});this._current.stop()}return this},status:function(){return this._current?this._current.status():"stopped"},destroy:function(){if(this._onAnimateCtx){c.disconnect(this._onAnimateCtx)}if(this._onEndCtx){c.disconnect(this._onEndCtx)}}});c.extend(e,b);dojo.fx.chain=function(d){return new e(d)};var a=function(f){this._animations=f||[];this._connects=[];this._finished=0;this.duration=0;c.forEach(f,function(g){var h=g.duration;if(g.delay){h+=g.delay}if(this.duration<h){this.duration=h}this._connects.push(c.connect(g,"onEnd",this,"_onEnd"))},this);this._pseudoAnimation=new c._Animation({curve:[0,1],duration:this.duration});var d=this;c.forEach(["beforeBegin","onBegin","onPlay","onAnimate","onPause","onStop"],function(g){d._connects.push(c.connect(d._pseudoAnimation,g,function(){d._fire(g,arguments)}))})};c.extend(a,{_doAction:function(f,d){c.forEach(this._animations,function(g){g[f].apply(g,d)});return this},_onEnd:function(){if(++this._finished==this._animations.length){this._fire("onEnd")}},_call:function(g,d){var f=this._pseudoAnimation;f[g].apply(f,d)},play:function(f,d){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this},pause:function(){this._doAction("pause",arguments);this._call("pause",arguments);return this},gotoPercent:function(g,d){var f=this.duration*g;c.forEach(this._animations,function(h){h.gotoPercent(h.duration<f?1:(f/h.duration),d)});this._call("gotoPercent",arguments);return this},stop:function(d){this._doAction("stop",arguments);this._call("stop",arguments);return this},status:function(){return this._pseudoAnimation.status()},destroy:function(){c.forEach(this._connects,dojo.disconnect)}});c.extend(a,b);dojo.fx.combine=function(d){return new a(d)};dojo.fx.wipeIn=function(d){d.node=c.byId(d.node);var g=d.node,f=g.style,j;var h=c.animateProperty(c.mixin({properties:{height:{start:function(){j=f.overflow;f.overflow="hidden";if(f.visibility=="hidden"||f.display=="none"){f.height="1px";f.display="";f.visibility="";return 1}else{var k=c.style(g,"height");return Math.max(k,1)}},end:function(){return g.scrollHeight}}}},d));c.connect(h,"onEnd",function(){f.height="auto";f.overflow=j});return h};dojo.fx.wipeOut=function(d){var g=d.node=c.byId(d.node),f=g.style,j;var h=c.animateProperty(c.mixin({properties:{height:{end:1}}},d));c.connect(h,"beforeBegin",function(){j=f.overflow;f.overflow="hidden";f.display=""});c.connect(h,"onEnd",function(){f.overflow=j;f.height="auto";f.display="none"});return h};dojo.fx.slideTo=function(d){var f=d.node=c.byId(d.node),j=null,h=null;var k=(function(l){return function(){var o=c.getComputedStyle(l);var p=o.position;j=(p=="absolute"?l.offsetTop:parseInt(o.top)||0);h=(p=="absolute"?l.offsetLeft:parseInt(o.left)||0);if(p!="absolute"&&p!="relative"){var m=c.coords(l,true);j=m.y;h=m.x;l.style.position="absolute";l.style.top=j+"px";l.style.left=h+"px"}}})(f);k();var g=c.animateProperty(c.mixin({properties:{top:d.top||0,left:d.left||0}},d));c.connect(g,"beforeBegin",g,k);return g}})()}if(!dojo._hasResource["dijit.form._FormMixin"]){dojo._hasResource["dijit.form._FormMixin"]=true;dojo.provide("dijit.form._FormMixin");dojo.declare("dijit.form._FormMixin",null,{reset:function(){dojo.forEach(this.getDescendants(),function(a){if(a.reset){a.reset()}})},validate:function(){var a=false;return dojo.every(dojo.map(this.getDescendants(),function(c){c._hasBeenBlurred=true;var b=c.disabled||!c.validate||c.validate();if(!b&&!a){dijit.scrollIntoView(c.containerNode||c.domNode);c.focus();a=true}return b}),function(b){return b})},setValues:function(a){dojo.deprecated(this.declaredClass+"::setValues() is deprecated. Use attr('value', val) instead.","","2.0");return this.attr("value",a)},_setValueAttr:function(e){var d={};dojo.forEach(this.getDescendants(),function(g){if(!g.name){return}var f=d[g.name]||(d[g.name]=[]);f.push(g)});for(var b in d){if(!d.hasOwnProperty(b)){continue}var c=d[b],a=dojo.getObject(b,false,e);if(a===undefined){continue}if(!dojo.isArray(a)){a=[a]}if(typeof c[0].checked=="boolean"){dojo.forEach(c,function(f,g){f.attr("value",dojo.indexOf(a,f.value)!=-1)})}else{if(c[0]._multiValue){c[0].attr("value",a)}else{dojo.forEach(c,function(f,g){f.attr("value",a[g])})}}}},getValues:function(){dojo.deprecated(this.declaredClass+"::getValues() is deprecated. Use attr('value') instead.","","2.0");return this.attr("value")},_getValueAttr:function(){var a={};dojo.forEach(this.getDescendants(),function(e){var b=e.name;if(!b||e.disabled){return}var d=e.attr("value");if(typeof e.checked=="boolean"){if(/Radio/.test(e.declaredClass)){if(d!==false){dojo.setObject(b,d,a)}else{d=dojo.getObject(b,false,a);if(d===undefined){dojo.setObject(b,null,a)}}}else{var c=dojo.getObject(b,false,a);if(!c){c=[];dojo.setObject(b,c,a)}if(d!==false){c.push(d)}}}else{dojo.setObject(b,d,a)}});return a},isValid:function(){this._invalidWidgets=dojo.filter(this.getDescendants(),function(a){return !a.disabled&&a.isValid&&!a.isValid()});return !this._invalidWidgets.length},onValidStateChange:function(a){},_widgetChange:function(a){var b=this._lastValidState;if(!a||this._lastValidState===undefined){b=this.isValid();if(this._lastValidState===undefined){this._lastValidState=b}}else{if(a.isValid){this._invalidWidgets=dojo.filter(this._invalidWidgets||[],function(c){return(c!=a)},this);if(!a.isValid()&&!a.attr("disabled")){this._invalidWidgets.push(a)}b=(this._invalidWidgets.length===0)}}if(b!==this._lastValidState){this._lastValidState=b;this.onValidStateChange(b)}},connectChildren:function(){dojo.forEach(this._changeConnections,dojo.hitch(this,"disconnect"));var b=this;var a=this._changeConnections=[];dojo.forEach(dojo.filter(this.getDescendants(),function(c){return c.validate}),function(c){a.push(b.connect(c,"validate",dojo.hitch(b,"_widgetChange",c)));a.push(b.connect(c,"_setDisabledAttr",dojo.hitch(b,"_widgetChange",c)))});this._widgetChange(null)},startup:function(){this.inherited(arguments);this._changeConnections=[];this.connectChildren()}})}if(!dojo._hasResource["dijit._DialogMixin"]){dojo._hasResource["dijit._DialogMixin"]=true;dojo.provide("dijit._DialogMixin");dojo.declare("dijit._DialogMixin",null,{attributeMap:dijit._Widget.prototype.attributeMap,execute:function(a){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.attr("value"))},_getFocusItems:function(b){var a=dijit._getTabNavigable(dojo.byId(b));this._firstFocusItem=a.lowest||a.first||b;this._lastFocusItem=a.last||a.highest||this._firstFocusItem;if(dojo.isMoz&&this._firstFocusItem.tagName.toLowerCase()=="input"&&dojo.attr(this._firstFocusItem,"type").toLowerCase()=="file"){dojo.attr(b,"tabindex","0");this._firstFocusItem=b}}})}if(!dojo._hasResource["dijit.DialogUnderlay"]){dojo._hasResource["dijit.DialogUnderlay"]=true;dojo.provide("dijit.DialogUnderlay");dojo.declare("dijit.DialogUnderlay",[dijit._Widget,dijit._Templated],{templateString:"<div class='dijitDialogUnderlayWrapper'><div class='dijitDialogUnderlay' dojoAttachPoint='node'></div></div>",dialogId:"","class":"",attributeMap:{id:"domNode"},_setDialogIdAttr:function(a){dojo.attr(this.node,"id",a+"_underlay")},_setClassAttr:function(a){this.node.className="dijitDialogUnderlay "+a},postCreate:function(){dojo.body().appendChild(this.domNode);this.bgIframe=new dijit.BackgroundIframe(this.domNode)},layout:function(){var b=this.node.style,c=this.domNode.style;c.display="none";var a=dijit.getViewport();c.top=a.t+"px";c.left=a.l+"px";b.width=a.w+"px";b.height=a.h+"px";c.display="block"},show:function(){this.domNode.style.display="block";this.layout();if(this.bgIframe.iframe){this.bgIframe.iframe.style.display="block"}},hide:function(){this.domNode.style.display="none";if(this.bgIframe.iframe){this.bgIframe.iframe.style.display="none"}},uninitialize:function(){if(this.bgIframe){this.bgIframe.destroy()}}})}if(!dojo._hasResource["dijit._Contained"]){dojo._hasResource["dijit._Contained"]=true;dojo.provide("dijit._Contained");dojo.declare("dijit._Contained",null,{getParent:function(){for(var b=this.domNode.parentNode;b;b=b.parentNode){var c=b.getAttribute&&b.getAttribute("widgetId");if(c){var a=dijit.byId(c);return a.isContainer?a:null}}return null},_getSibling:function(b){var a=this.domNode;do{a=a[b+"Sibling"]}while(a&&a.nodeType!=1);if(!a){return null}var c=a.getAttribute("widgetId");return dijit.byId(c)},getPreviousSibling:function(){return this._getSibling("previous")},getNextSibling:function(){return this._getSibling("next")},getIndexInParent:function(){var a=this.getParent();if(!a||!a.getIndexOfChild){return -1}return a.getIndexOfChild(this)}})}if(!dojo._hasResource["dijit._Container"]){dojo._hasResource["dijit._Container"]=true;dojo.provide("dijit._Container");dojo.declare("dijit._Container",null,{isContainer:true,buildRendering:function(){this.inherited(arguments);if(!this.containerNode){this.containerNode=this.domNode}},addChild:function(d,a){var b=this.containerNode;if(a&&typeof a=="number"){var c=this.getChildren();if(c&&c.length>=a){b=c[a-1].domNode;a="after"}}dojo.place(d.domNode,b,a);if(this._started&&!d._started){d.startup()}},removeChild:function(b){if(typeof b=="number"&&b>0){b=this.getChildren()[b]}if(!b||!b.domNode){return}var a=b.domNode;a.parentNode.removeChild(a)},_nextElement:function(a){do{a=a.nextSibling}while(a&&a.nodeType!=1);return a},_firstElement:function(a){a=a.firstChild;if(a&&a.nodeType!=1){a=this._nextElement(a)}return a},getChildren:function(){return dojo.query("> [widgetId]",this.containerNode).map(dijit.byNode)},hasChildren:function(){return !!this._firstElement(this.containerNode)},destroyDescendants:function(a){dojo.forEach(this.getChildren(),function(b){b.destroyRecursive(a)})},_getSiblingOfChild:function(d,a){var b=d.domNode;var c=(a>0?"nextSibling":"previousSibling");do{b=b[c]}while(b&&(b.nodeType!=1||!dijit.byNode(b)));return b?dijit.byNode(b):null},getIndexOfChild:function(e){var b=this.getChildren();for(var a=0,d;d=b[a];a++){if(d==e){return a}}return -1}})}if(!dojo._hasResource["dijit.layout._LayoutWidget"]){dojo._hasResource["dijit.layout._LayoutWidget"]=true;dojo.provide("dijit.layout._LayoutWidget");dojo.declare("dijit.layout._LayoutWidget",[dijit._Widget,dijit._Container,dijit._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:true,postCreate:function(){dojo.addClass(this.domNode,"dijitContainer");dojo.addClass(this.domNode,this.baseClass)},startup:function(){if(this._started){return}dojo.forEach(this.getChildren(),function(a){a.startup()});if(!this.getParent||!this.getParent()){this.resize();this._viewport=dijit.getViewport();this.connect(dojo.global,"onresize",function(){var a=dijit.getViewport();if(a.w!=this._viewport.w||a.h!=this._viewport.h){this._viewport=a;this.resize()}})}this.inherited(arguments)},resize:function(a,h){var b=this.domNode;if(a){dojo.marginBox(b,a);if(a.t){b.style.top=a.t+"px"}if(a.l){b.style.left=a.l+"px"}}var j=h||{};dojo.mixin(j,a||{});if(!("h" in j)||!("w" in j)){j=dojo.mixin(dojo.marginBox(b),j)}var d=dojo.getComputedStyle(b);var g=dojo._getMarginExtents(b,d);var c=dojo._getBorderExtents(b,d);var f=(this._borderBox={w:j.w-(g.w+c.w),h:j.h-(g.h+c.h)});var e=dojo._getPadExtents(b,d);this._contentBox={l:dojo._toPixelValue(b,d.paddingLeft),t:dojo._toPixelValue(b,d.paddingTop),w:f.w-e.w,h:f.h-e.h};this.layout()},layout:function(){},_setupChild:function(a){dojo.addClass(a.domNode,this.baseClass+"-child");if(a.baseClass){dojo.addClass(a.domNode,this.baseClass+"-"+a.baseClass)}},addChild:function(b,a){this.inherited(arguments);if(this._started){this._setupChild(b)}},removeChild:function(a){dojo.removeClass(a.domNode,this.baseClass+"-child");if(a.baseClass){dojo.removeClass(a.domNode,this.baseClass+"-"+a.baseClass)}this.inherited(arguments)}});dijit.layout.marginBox2contentBox=function(d,e){var b=dojo.getComputedStyle(d);var c=dojo._getMarginExtents(d,b);var a=dojo._getPadBorderExtents(d,b);return{l:dojo._toPixelValue(d,b.paddingLeft),t:dojo._toPixelValue(d,b.paddingTop),w:e.w-(c.w+a.w),h:e.h-(c.h+a.h)}};(function(){var b=function(c){return c.substring(0,1).toUpperCase()+c.substring(1)};var a=function(c,d){c.resize?c.resize(d):dojo.marginBox(c.domNode,d);dojo.mixin(c,dojo.marginBox(c.domNode));dojo.mixin(c,d)};dijit.layout.layoutChildren=function(c,e,d){e=dojo.mixin({},e);dojo.addClass(c,"dijitLayoutContainer");d=dojo.filter(d,function(f){return f.layoutAlign!="client"}).concat(dojo.filter(d,function(f){return f.layoutAlign=="client"}));dojo.forEach(d,function(j){var h=j.domNode,g=j.layoutAlign;var f=h.style;f.left=e.l+"px";f.top=e.t+"px";f.bottom=f.right="auto";dojo.addClass(h,"dijitAlign"+b(g));if(g=="top"||g=="bottom"){a(j,{w:e.w});e.h-=j.h;if(g=="top"){e.t+=j.h}else{f.top=e.t+e.h+"px"}}else{if(g=="left"||g=="right"){a(j,{h:e.h});e.w-=j.w;if(g=="left"){e.l+=j.w}else{f.left=e.l+e.w+"px"}}else{if(g=="client"){a(j,e)}}}})}})()}if(!dojo._hasResource["dojo.html"]){dojo._hasResource["dojo.html"]=true;dojo.provide("dojo.html");(function(){var a=0;dojo.html._secureForInnerHtml=function(b){return b.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"")};dojo.html._emptyNode=dojo.empty;dojo.html._setNodeContent=function(f,b,j){if(j){dojo.html._emptyNode(f)}if(typeof b=="string"){var g="",e="",c=0,d=f.nodeName.toLowerCase();switch(d){case"tr":g="<tr>";e="</tr>";c+=1;case"tbody":case"thead":g="<tbody>"+g;e+="</tbody>";c+=1;case"table":g="<table>"+g;e+="</table>";c+=1;break}if(c){var h=f.ownerDocument.createElement("div");h.innerHTML=g+b+e;do{h=h.firstChild}while(--c);dojo.forEach(h.childNodes,function(k){f.appendChild(k.cloneNode(true))})}else{f.innerHTML=b}}else{if(b.nodeType){f.appendChild(b)}else{dojo.forEach(b,function(k){f.appendChild(k.cloneNode(true))})}}return f};dojo.declare("dojo.html._ContentSetter",null,{node:"",content:"",id:"",cleanContent:false,extractContent:false,parseContent:false,constructor:function(c,b){dojo.mixin(this,c||{});b=this.node=dojo.byId(this.node||b);if(!this.id){this.id=["Setter",(b)?b.id||b.tagName:"",a++].join("_")}if(!(this.node||b)){new Error(this.declaredClass+": no node provided to "+this.id)}},set:function(b,c){if(undefined!==b){this.content=b}if(c){this._mixin(c)}this.onBegin();this.setContent();this.onEnd();return this.node},setContent:function(){var b=this.node;if(!b){console.error("setContent given no node")}try{b=dojo.html._setNodeContent(b,this.content)}catch(d){var c=this.onContentError(d);try{b.innerHTML=c}catch(d){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+d.message,d)}}this.node=b},empty:function(){if(this.parseResults&&this.parseResults.length){dojo.forEach(this.parseResults,function(b){if(b.destroy){b.destroy()}});delete this.parseResults}dojo.html._emptyNode(this.node)},onBegin:function(){var b=this.content;if(dojo.isString(b)){if(this.cleanContent){b=dojo.html._secureForInnerHtml(b)}if(this.extractContent){var c=b.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(c){b=c[1]}}}this.empty();this.content=b;return this.node},onEnd:function(){if(this.parseContent){this._parse()}return this.node},tearDown:function(){delete this.parseResults;delete this.node;delete this.content},onContentError:function(b){return"Error occured setting content: "+b},_mixin:function(d){var c={},b;for(b in d){if(b in c){continue}this[b]=d[b]}},_parse:function(){var b=this.node;try{this.parseResults=dojo.parser.parse(b,true)}catch(c){this._onError("Content",c,"Error parsing in _ContentSetter#"+this.id)}},_onError:function(c,e,b){var d=this["on"+c+"Error"].call(this,e);if(b){console.error(b,e)}else{if(d){dojo.html._setNodeContent(this.node,d,true)}}}});dojo.html.set=function(c,b,d){if(undefined==b){console.warn("dojo.html.set: no cont argument provided, using empty string");b=""}if(!d){return dojo.html._setNodeContent(c,b,true)}else{var e=new dojo.html._ContentSetter(dojo.mixin(d,{content:b,node:c}));return e.set()}}})()}if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function(b,c,h){h=dojo.i18n.normalizeLocale(h);var a=h.split("-");var d=[b,"nls",c].join(".");var k=dojo._loadedModules[d];if(k){var j;for(var e=a.length;e>0;e--){var g=a.slice(0,e).join("_");if(k[g]){j=k[g];break}}if(!j){j=k.ROOT}if(j){var f=function(){};f.prototype=j;return new f()}}throw new Error("Bundle not found: "+c+" in "+b+" , locale="+h)};dojo.i18n.normalizeLocale=function(b){var a=b?b.toLowerCase():dojo.locale;if(a=="root"){a="ROOT"}return a};dojo.i18n._requireLocalization=function(a,b,q,l){var h=dojo.i18n.normalizeLocale(q);var e=[a,"nls",b].join(".");var d="";if(l){var p=l.split(",");for(var j=0;j<p.length;j++){if(h.indexOf(p[j])==0){if(p[j].length>d.length){d=p[j]}}}if(!d){d="ROOT"}}var m=l?d:h;var s=dojo._loadedModules[e];var c=null;if(s){if(dojo.config.localizationComplete&&s._built){return}var g=m.replace(/-/g,"_");var o=e+"."+g;c=dojo._loadedModules[o]}if(!c){s=dojo.provide(e);var f=dojo._getModuleSymbols(a);var k=f.concat("nls").join("/");var r;dojo.i18n._searchLocalePath(m,l,function(x){var y=x.replace(/-/g,"_");var w=e+"."+y;var u=false;if(!dojo._loadedModules[w]){dojo.provide(w);var v=[k];if(x!="ROOT"){v.push(x)}v.push(b);var t=v.join("/")+".js";u=dojo._loadPath(t,null,function(B){var A=function(){};A.prototype=r;s[y]=new A();for(var z in B){s[y][z]=B[z]}})}else{u=true}if(u&&s[y]){r=s[y]}else{s[y]=r}if(l){return true}})}if(l&&h!=d){s[h.replace(/-/g,"_")]=s[d.replace(/-/g,"_")]}};(function(){var a=dojo.config.extraLocale;if(a){if(!a instanceof Array){a=[a]}var b=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(e,d,c,g){b(e,d,c,g);if(c){return}for(var f=0;f<a.length;f++){b(e,d,a[f],g)}}}})();dojo.i18n._searchLocalePath=function(h,k,c){h=dojo.i18n.normalizeLocale(h);var a=h.split("-");var b=[];for(var e=a.length;e>0;e--){b.push(a.slice(0,e).join("-"))}b.push(false);if(k){b.reverse()}for(var d=b.length-1;d>=0;d--){var f=b[d]||"ROOT";var g=c(f);if(g){break}}};dojo.i18n._preloadLocalizations=function(e,b){function c(f){f=dojo.i18n.normalizeLocale(f);dojo.i18n._searchLocalePath(f,true,function(h){for(var g=0;g<b.length;g++){if(b[g]==h){dojo.require(e+"_"+h);return true}}return false})}c();var a=dojo.config.extraLocale||[];for(var d=0;d<a.length;d++){c(a[d])}}}if(!dojo._hasResource["dijit.layout.ContentPane"]){dojo._hasResource["dijit.layout.ContentPane"]=true;dojo.provide("dijit.layout.ContentPane");dojo.declare("dijit.layout.ContentPane",dijit._Widget,{href:"",extractContent:false,parseOnLoad:true,preventCache:false,preload:false,refreshOnShow:false,loadingMessage:"<span class='dijitContentPaneLoading'>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'>${errorState}</span>",isLoaded:false,baseClass:"dijitContentPane",doLayout:true,ioArgs:{},isContainer:true,postMixInProperties:function(){this.inherited(arguments);var a=dojo.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=dojo.string.substitute(this.loadingMessage,a);this.errorMessage=dojo.string.substitute(this.errorMessage,a);if(!this.href&&this.srcNodeRef&&this.srcNodeRef.innerHTML){this.isLoaded=true}},buildRendering:function(){this.inherited(arguments);if(!this.containerNode){this.containerNode=this.domNode}},postCreate:function(){this.domNode.title="";if(!dojo.attr(this.domNode,"role")){dijit.setWaiRole(this.domNode,"group")}dojo.addClass(this.domNode,this.baseClass)},startup:function(){if(this._started){return}if(this.isLoaded){dojo.forEach(this.getChildren(),function(a){a.startup()});if(this.doLayout){this._checkIfSingleChild()}if(!this._singleChild||!dijit._Contained.prototype.getParent.call(this)){this._scheduleLayout()}}this._loadCheck();this.inherited(arguments)},_checkIfSingleChild:function(){var c=dojo.query(">",this.containerNode),a=c.filter(function(d){return dojo.hasAttr(d,"dojoType")||dojo.hasAttr(d,"widgetId")}),b=dojo.filter(a.map(dijit.byNode),function(d){return d&&d.domNode&&d.resize});if(c.length==a.length&&b.length==1){this._singleChild=b[0]}else{delete this._singleChild}},setHref:function(a){dojo.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use attr('href', ...) instead.","","2.0");return this.attr("href",a)},_setHrefAttr:function(a){this.cancel();this.href=a;if(this._created&&(this.preload||this._isShown())){return this.refresh()}else{this._hrefChanged=true}},setContent:function(a){dojo.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use attr('content', ...) instead.","","2.0");this.attr("content",a)},_setContentAttr:function(a){this.href="";this.cancel();this._setContent(a||"");this._isDownloaded=false},_getContentAttr:function(){return this.containerNode.innerHTML},cancel:function(){if(this._xhrDfd&&(this._xhrDfd.fired==-1)){this._xhrDfd.cancel()}delete this._xhrDfd},uninitialize:function(){if(this._beingDestroyed){this.cancel()}},destroyRecursive:function(a){if(this._beingDestroyed){return}this._beingDestroyed=true;this.inherited(arguments)},resize:function(b){dojo.marginBox(this.domNode,b);var c=this.containerNode,d=dojo.mixin(dojo.marginBox(c),b||{});var a=(this._contentBox=dijit.layout.marginBox2contentBox(c,d));if(this._singleChild&&this._singleChild.resize){this._singleChild.resize({w:a.w,h:a.h})}},_isShown:function(){if("open" in this){return this.open}else{var a=this.domNode;return(a.style.display!="none")&&(a.style.visibility!="hidden")&&!dojo.hasClass(a,"dijitHidden")}},_onShow:function(){if(this._needLayout){this._layoutChildren()}this._loadCheck();if(this.onShow){this.onShow()}},_loadCheck:function(){if((this.href&&!this._xhrDfd)&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow)&&(this.preload||this._isShown())){delete this._hrefChanged;this.refresh()}},refresh:function(){this.cancel();this._setContent(this.onDownloadStart(),true);var b=this;var c={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};if(dojo.isObject(this.ioArgs)){dojo.mixin(c,this.ioArgs)}var a=(this._xhrDfd=(this.ioMethod||dojo.xhrGet)(c));a.addCallback(function(d){try{b._isDownloaded=true;b._setContent(d,false);b.onDownloadEnd()}catch(e){b._onError("Content",e)}delete b._xhrDfd;return d});a.addErrback(function(d){if(!a.canceled){b._onError("Download",d)}delete b._xhrDfd;return d})},_onLoadHandler:function(a){this.isLoaded=true;try{this.onLoad(a)}catch(b){console.error("Error "+this.widgetId+" running custom onLoad code: "+b.message)}},_onUnloadHandler:function(){this.isLoaded=false;try{this.onUnload()}catch(a){console.error("Error "+this.widgetId+" running custom onUnload code: "+a.message)}},destroyDescendants:function(){if(this.isLoaded){this._onUnloadHandler()}var a=this._contentSetter;dojo.forEach(this.getChildren(),function(b){if(b.destroyRecursive){b.destroyRecursive()}});if(a){dojo.forEach(a.parseResults,function(b){if(b.destroyRecursive&&b.domNode&&b.domNode.parentNode==dojo.body()){b.destroyRecursive()}});delete a.parseResults}dojo.html._emptyNode(this.containerNode)},_setContent:function(a,d){this.destroyDescendants();delete this._singleChild;var c=this._contentSetter;if(!(c&&c instanceof dojo.html._ContentSetter)){c=this._contentSetter=new dojo.html._ContentSetter({node:this.containerNode,_onError:dojo.hitch(this,this._onError),onContentError:dojo.hitch(this,function(g){var f=this.onContentError(g);try{this.containerNode.innerHTML=f}catch(g){console.error("Fatal "+this.id+" could not change content due to "+g.message,g)}})})}var b=dojo.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad},this._contentSetterParams||{});dojo.mixin(c,b);c.set((dojo.isObject(a)&&a.domNode)?a.domNode:a);delete this._contentSetterParams;if(!d){dojo.forEach(this.getChildren(),function(e){e.startup()});if(this.doLayout){this._checkIfSingleChild()}this._scheduleLayout();this._onLoadHandler(a)}},_onError:function(b,d,a){var c=this["on"+b+"Error"].call(this,d);if(a){console.error(a,d)}else{if(c){this._setContent(c,true)}}},_scheduleLayout:function(){if(this._isShown()){this._layoutChildren()}else{this._needLayout=true}},_layoutChildren:function(){if(this._singleChild&&this._singleChild.resize){var a=this._contentBox||dojo.contentBox(this.containerNode);this._singleChild.resize({w:a.w,h:a.h})}else{dojo.forEach(this.getChildren(),function(b){if(b.resize){b.resize()}})}delete this._needLayout},onLoad:function(a){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage},onContentError:function(a){},onDownloadError:function(a){return this.errorMessage},onDownloadEnd:function(){}})}if(!dojo._hasResource["dijit.TooltipDialog"]){dojo._hasResource["dijit.TooltipDialog"]=true;dojo.provide("dijit.TooltipDialog");dojo.declare("dijit.TooltipDialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{title:"",doLayout:false,autofocus:true,baseClass:"dijitTooltipDialog",_firstFocusItem:null,_lastFocusItem:null,templateString:null,templateString:'<div waiRole="presentation">\n\t<div class="dijitTooltipContainer" waiRole="presentation">\n\t\t<div class ="dijitTooltipContents dijitTooltipFocusNode" dojoAttachPoint="containerNode" tabindex="-1" waiRole="dialog"></div>\n\t</div>\n\t<div class="dijitTooltipConnector" waiRole="presentation"></div>\n</div>\n',postCreate:function(){this.inherited(arguments);this.connect(this.containerNode,"onkeypress","_onKey");this.containerNode.title=this.title},orient:function(d,a,b){var e=this._currentOrientClass;if(e){dojo.removeClass(this.domNode,e)}e="dijitTooltipAB"+(b.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(b.charAt(0)=="T"?"Below":"Above");dojo.addClass(this.domNode,e);this._currentOrientClass=e},onOpen:function(a){this.orient(this.domNode,a.aroundCorner,a.corner);this._onShow();if(this.autofocus){this._getFocusItems(this.containerNode);dijit.focus(this._firstFocusItem)}},_onKey:function(a){var c=a.target;var b=dojo.keys;if(a.charOrCode===b.TAB){this._getFocusItems(this.containerNode)}var d=(this._firstFocusItem==this._lastFocusItem);if(a.charOrCode==b.ESCAPE){this.onCancel();dojo.stopEvent(a)}else{if(c==this._firstFocusItem&&a.shiftKey&&a.charOrCode===b.TAB){if(!d){dijit.focus(this._lastFocusItem)}dojo.stopEvent(a)}else{if(c==this._lastFocusItem&&a.charOrCode===b.TAB&&!a.shiftKey){if(!d){dijit.focus(this._firstFocusItem)}dojo.stopEvent(a)}else{if(a.charOrCode===b.TAB){a.stopPropagation()}}}}}})}if(!dojo._hasResource["dijit.Dialog"]){dojo._hasResource["dijit.Dialog"]=true;dojo.provide("dijit.Dialog");dojo.declare("dijit.Dialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin],{templateString:null,templateString:'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel, onmouseenter: _onCloseEnter, onmouseleave: _onCloseLeave" title="${buttonCancel}">\n\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent"></div>\n</div>\n',attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{title:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}]}),open:false,duration:dijit.defaultDuration,refocus:true,autofocus:true,_firstFocusItem:null,_lastFocusItem:null,doLayout:false,draggable:true,_fixSizes:true,postMixInProperties:function(){var a=dojo.i18n.getLocalization("dijit","common");dojo.mixin(this,a);this.inherited(arguments)},postCreate:function(){dojo.style(this.domNode,{visibility:"hidden",position:"absolute",display:"",top:"-9999px"});dojo.body().appendChild(this.domNode);this.inherited(arguments);this.connect(this,"onExecute","hide");this.connect(this,"onCancel","hide");this._modalconnects=[]},onLoad:function(){this._position();this.inherited(arguments)},_endDrag:function(c){if(c&&c.node&&c.node===this.domNode){var a=dijit.getViewport();var b=c._leftTop||dojo.coords(c.node,true);this._relativePosition={t:b.t-a.t,l:b.l-a.l}}},_setup:function(){var b=this.domNode;if(this.titleBar&&this.draggable){this._moveable=(dojo.isIE==6)?new dojo.dnd.TimedMoveable(b,{handle:this.titleBar}):new dojo.dnd.Moveable(b,{handle:this.titleBar,timeout:0});dojo.subscribe("/dnd/move/stop",this,"_endDrag")}else{dojo.addClass(b,"dijitDialogFixed")}var c={dialogId:this.id,"class":dojo.map(this["class"].split(/\s/),function(d){return d+"_underlay"}).join(" ")};var a=dijit._underlay;if(!a){a=dijit._underlay=new dijit.DialogUnderlay(c)}this._fadeIn=dojo.fadeIn({node:b,duration:this.duration,beforeBegin:function(){a.attr(c);a.show()},onEnd:dojo.hitch(this,function(){if(this.autofocus){this._getFocusItems(this.domNode);dijit.focus(this._firstFocusItem)}})});this._fadeOut=dojo.fadeOut({node:b,duration:this.duration,onEnd:function(){b.style.visibility="hidden";b.style.top="-9999px";dijit._underlay.hide()}})},uninitialize:function(){var a=false;if(this._fadeIn&&this._fadeIn.status()=="playing"){a=true;this._fadeIn.stop()}if(this._fadeOut&&this._fadeOut.status()=="playing"){a=true;this._fadeOut.stop()}if(this.open||a){dijit._underlay.hide()}if(this._moveable){this._moveable.destroy()}},_size:function(){var b=dojo.marginBox(this.domNode);var a=dijit.getViewport();if(b.w>=a.w||b.h>=a.h){dojo.style(this.containerNode,{width:Math.min(b.w,Math.floor(a.w*0.75))+"px",height:Math.min(b.h,Math.floor(a.h*0.75))+"px",overflow:"auto",position:"relative"})}},_position:function(){if(!dojo.hasClass(dojo.body(),"dojoMove")){var b=this.domNode;var a=dijit.getViewport();var c=this._relativePosition;var d=c?null:dojo.marginBox(b);dojo.style(b,{left:Math.floor(a.l+(c?c.l:(a.w-d.w)/2))+"px",top:Math.floor(a.t+(c?c.t:(a.h-d.h)/2))+"px"})}},_onKey:function(a){if(a.charOrCode){var b=dojo.keys;var c=a.target;if(a.charOrCode===b.TAB){this._getFocusItems(this.domNode)}var f=(this._firstFocusItem==this._lastFocusItem);if(c==this._firstFocusItem&&a.shiftKey&&a.charOrCode===b.TAB){if(!f){dijit.focus(this._lastFocusItem)}dojo.stopEvent(a)}else{if(c==this._lastFocusItem&&a.charOrCode===b.TAB&&!a.shiftKey){if(!f){dijit.focus(this._firstFocusItem)}dojo.stopEvent(a)}else{while(c){if(c==this.domNode){if(a.charOrCode==b.ESCAPE){this.onCancel()}else{return}}c=c.parentNode}if(a.charOrCode!==b.TAB){dojo.stopEvent(a)}else{if(!dojo.isOpera){try{this._firstFocusItem.focus()}catch(d){}}}}}}},show:function(){if(this.open){return}if(!this._alreadyInitialized){this._setup();this._alreadyInitialized=true}if(this._fadeOut.status()=="playing"){this._fadeOut.stop()}this._modalconnects.push(dojo.connect(window,"onscroll",this,"layout"));this._modalconnects.push(dojo.connect(window,"onresize",this,function(){var a=dijit.getViewport();if(!this._oldViewport||a.h!=this._oldViewport.h||a.w!=this._oldViewport.w){this.layout();this._oldViewport=a}}));this._modalconnects.push(dojo.connect(dojo.doc.documentElement,"onkeypress",this,"_onKey"));dojo.style(this.domNode,{opacity:0,visibility:""});if(this._fixSizes){dojo.style(this.containerNode,{width:"auto",height:"auto"})}this.open=true;this._onShow();this._size();this._position();this._fadeIn.play();this._savedFocus=dijit.getFocus(this)},hide:function(){if(!this._alreadyInitialized){return}if(this._fadeIn.status()=="playing"){this._fadeIn.stop()}this._fadeOut.play();if(this._scrollConnected){this._scrollConnected=false}dojo.forEach(this._modalconnects,dojo.disconnect);this._modalconnects=[];if(this.refocus){this.connect(this._fadeOut,"onEnd",dojo.hitch(dijit,"focus",this._savedFocus))}if(this._relativePosition){delete this._relativePosition}this.open=false},layout:function(){if(this.domNode.style.visibility!="hidden"){dijit._underlay.layout();this._position()}},destroy:function(){dojo.forEach(this._modalconnects,dojo.disconnect);if(this.refocus&&this.open){setTimeout(dojo.hitch(dijit,"focus",this._savedFocus),25)}this.inherited(arguments)},_onCloseEnter:function(){dojo.addClass(this.closeButtonNode,"dijitDialogCloseIcon-hover")},_onCloseLeave:function(){dojo.removeClass(this.closeButtonNode,"dijitDialogCloseIcon-hover")}})}if(!dojo._hasResource["dojox.string.Builder"]){dojo._hasResource["dojox.string.Builder"]=true;dojo.provide("dojox.string.Builder");dojox.string.Builder=function(c){var a="";this.length=0;this.append=function(f){if(arguments.length>1){var e="",b=arguments.length;switch(b){case 9:e=""+arguments[8]+e;case 8:e=""+arguments[7]+e;case 7:e=""+arguments[6]+e;case 6:e=""+arguments[5]+e;case 5:e=""+arguments[4]+e;case 4:e=""+arguments[3]+e;case 3:e=""+arguments[2]+e;case 2:a+=""+arguments[0]+arguments[1]+e;break;default:var d=0;while(d<arguments.length){e+=arguments[d++]}a+=e}}else{a+=f}this.length=a.length;return this};this.concat=function(b){return this.append.apply(this,arguments)};this.appendArray=function(b){return this.append.apply(this,b)};this.clear=function(){a="";this.length=0;return this};this.replace=function(b,d){a=a.replace(b,d);this.length=a.length;return this};this.remove=function(d,b){if(b===undefined){b=a.length}if(b==0){return this}a=a.substr(0,d)+a.substr(d+b);this.length=a.length;return this};this.insert=function(b,d){if(b==0){a=d+a}else{a=a.slice(0,b)+d+a.slice(b)}this.length=a.length;return this};this.toString=function(){return a};if(c){this.append(c)}}}if(!dojo._hasResource["dojox.string.tokenize"]){dojo._hasResource["dojox.string.tokenize"]=true;dojo.provide("dojox.string.tokenize");dojox.string.tokenize=function(f,k,h,j){var g=[];var b,d,c=0;while(b=k.exec(f)){d=f.slice(c,k.lastIndex-b[0].length);if(d.length){g.push(d)}if(h){if(dojo.isOpera){var a=b.slice(0);while(a.length<b.length){a.push(null)}b=a}var e=h.apply(j,b.slice(1).concat(g.length));if(typeof e!="undefined"){g.push(e)}}c=k.lastIndex}d=f.slice(c);if(d.length){g.push(d)}return g}}if(!dojo._hasResource["dojox.dtl._base"]){dojo._hasResource["dojox.dtl._base"]=true;dojo.provide("dojox.dtl._base");dojo.experimental("dojox.dtl");(function(){var h=dojox.dtl;h.TOKEN_BLOCK=-1;h.TOKEN_VAR=-2;h.TOKEN_COMMENT=-3;h.TOKEN_TEXT=3;h._Context=dojo.extend(function(m){dojo._mixin(this,m||{});this._dicts=[]},{push:function(){var o=this;var m=dojo.delegate(this);m.pop=function(){return o};return m},pop:function(){throw new Error("pop() called on empty Context")},get:function(p,m){if(typeof this[p]!="undefined"){return this._normalize(this[p])}for(var o=0,q;q=this._dicts[o];o++){if(typeof q[p]!="undefined"){return this._normalize(q[p])}}return m},_normalize:function(m){if(m instanceof Date){m.year=m.getFullYear();m.month=m.getMonth()+1;m.day=m.getDate();m.date=m.year+"-"+("0"+m.month).slice(-2)+"-"+("0"+m.day).slice(-2);m.hour=m.getHours();m.minute=m.getMinutes();m.second=m.getSeconds();m.microsecond=m.getMilliseconds()}return m},update:function(o){var m=this.push();if(o){dojo._mixin(this,o)}return m}});var d=/("(?:[^"\\]*(?:\\.[^"\\]*)*)"|'(?:[^'\\]*(?:\\.[^'\\]*)*)'|[^\s]+)/g;var c=/\s+/g;var e=function(q,m){q=q||c;if(!(q instanceof RegExp)){q=new RegExp(q,"g")}if(!q.global){throw new Error("You must use a globally flagged RegExp with split "+q)}q.exec("");var o,r=[],s=0,p=0;while(o=q.exec(this)){r.push(this.slice(s,q.lastIndex-o[0].length));s=q.lastIndex;if(m&&(++p>m-1)){break}}r.push(this.slice(s));return r};h.Token=function(o,m){this.token_type=o;this.contents=new String(dojo.trim(m));this.contents.split=e;this.split=function(){return String.prototype.split.apply(this.contents,arguments)}};h.Token.prototype.split_contents=function(m){var q,p=[],o=0;m=m||999;while(o++<m&&(q=d.exec(this.contents))){q=q[0];if(q.charAt(0)=='"'&&q.slice(-1)=='"'){p.push('"'+q.slice(1,-1).replace('\\"','"').replace("\\\\","\\")+'"')}else{if(q.charAt(0)=="'"&&q.slice(-1)=="'"){p.push("'"+q.slice(1,-1).replace("\\'","'").replace("\\\\","\\")+"'")}else{p.push(q)}}}return p};var j=h.text={_get:function(p,o,s){var u=h.register.get(p,o.toLowerCase(),s);if(!u){if(!s){throw new Error("No tag found for "+o)}return null}var r=u[1];var m=u[2];var t;if(r.indexOf(":")!=-1){t=r.split(":");r=t.pop()}dojo.require(m);var q=dojo.getObject(m);return q[r||o]||q[o+"_"]||q[r+"_"]},getTag:function(m,o){return j._get("tag",m,o)},getFilter:function(m,o){return j._get("filter",m,o)},getTemplate:function(m){return new h.Template(j.getTemplateString(m))},getTemplateString:function(m){return dojo._getText(m.toString())||""},_resolveLazy:function(m,p,o){if(p){if(o){return dojo.fromJson(dojo._getText(m))||{}}else{return h.text.getTemplateString(m)}}else{return dojo.xhrGet({handleAs:(o)?"json":"text",url:m})}},_resolveTemplateArg:function(m,o){if(j._isTemplate(m)){if(!o){var p=new dojo.Deferred();p.callback(m);return p}return m}return j._resolveLazy(m,o)},_isTemplate:function(m){return(typeof m=="undefined")||(typeof m=="string"&&(m.match(/^\s*[<{]/)||m.indexOf(" ")!=-1))},_resolveContextArg:function(m,o){if(m.constructor==Object){if(!o){var p=new dojo.Deferred;p.callback(m);return p}return m}return j._resolveLazy(m,o,true)},_re:/(?:\{\{\s*(.+?)\s*\}\}|\{%\s*(load\s*)?(.+?)\s*%\})/g,tokenize:function(m){return dojox.string.tokenize(m,j._re,j._parseDelims)},_parseDelims:function(s,q,m){if(s){return[h.TOKEN_VAR,s]}else{if(q){var r=dojo.trim(m).split(/\s+/g);for(var p=0,o;o=r[p];p++){dojo.require(o)}}else{return[h.TOKEN_BLOCK,m]}}}};h.Template=dojo.extend(function(o,m){var q=m?o:j._resolveTemplateArg(o,true)||"";var p=j.tokenize(q);var r=new h._Parser(p);this.nodelist=r.parse()},{update:function(o,m){return j._resolveContextArg(m).addCallback(this,function(p){var q=this.render(new h._Context(p));if(o.forEach){o.forEach(function(r){r.innerHTML=q})}else{dojo.byId(o).innerHTML=q}return this})},render:function(o,m){m=m||this.getBuffer();o=o||new h._Context({});return this.nodelist.render(o,m)+""},getBuffer:function(){return new dojox.string.Builder()}});var g=/\{\{\s*(.+?)\s*\}\}/g;h.quickFilter=function(m){if(!m){return new h._NodeList()}if(m.indexOf("{%")==-1){return new h._QuickNodeList(dojox.string.tokenize(m,g,function(o){return new h._Filter(o)}))}};h._QuickNodeList=dojo.extend(function(m){this.contents=m},{render:function(q,o){for(var p=0,m=this.contents.length;p<m;p++){if(this.contents[p].resolve){o=o.concat(this.contents[p].resolve(q))}else{o=o.concat(this.contents[p])}}return o},dummyRender:function(m){return this.render(m,h.Template.prototype.getBuffer()).toString()},clone:function(m){return this}});h._Filter=dojo.extend(function(o){if(!o){throw new Error("Filter must be called with variable name")}this.contents=o;var m=this._cache[o];if(m){this.key=m[0];this.filters=m[1]}else{this.filters=[];dojox.string.tokenize(o,this._re,this._tokenize,this);this._cache[o]=[this.key,this.filters]}},{_cache:{},_re:/(?:^_\("([^\\"]*(?:\\.[^\\"])*)"\)|^"([^\\"]*(?:\\.[^\\"]*)*)"|^([a-zA-Z0-9_.]+)|\|(\w+)(?::(?:_\("([^\\"]*(?:\\.[^\\"])*)"\)|"([^\\"]*(?:\\.[^\\"]*)*)"|([a-zA-Z0-9_.]+)|'([^\\']*(?:\\.[^\\']*)*)'))?|^'([^\\']*(?:\\.[^\\']*)*)')/g,_values:{0:'"',1:'"',2:"",8:'"'},_args:{4:'"',5:'"',6:"",7:"'"},_tokenize:function(){var s,m;for(var p=0,o=[];p<arguments.length;p++){o[p]=(typeof arguments[p]!="undefined"&&typeof arguments[p]=="string"&&arguments[p])}if(!this.key){for(s in this._values){if(o[s]){this.key=this._values[s]+arguments[s]+this._values[s];break}}}else{for(s in this._args){if(o[s]){var r=arguments[s];if(this._args[s]=="'"){r=r.replace(/\\'/g,"'")}else{if(this._args[s]=='"'){r=r.replace(/\\"/g,'"')}}m=[!this._args[s],r];break}}var q=j.getFilter(arguments[3]);if(!dojo.isFunction(q)){throw new Error(arguments[3]+" is not registered as a filter")}this.filters.push([q,m])}},getExpression:function(){return this.contents},resolve:function(o){if(typeof this.key=="undefined"){return""}var q=this.resolvePath(this.key,o);for(var m=0,p;p=this.filters[m];m++){if(p[1]){if(p[1][0]){q=p[0](q,this.resolvePath(p[1][1],o))}else{q=p[0](q,p[1][1])}}else{q=p[0](q)}}return q},resolvePath:function(y,o){var t,q;var s=y.charAt(0);var w=y.slice(-1);if(!isNaN(parseInt(s))){t=(y.indexOf(".")==-1)?parseInt(y):parseFloat(y)}else{if(s=='"'&&s==w){t=y.slice(1,-1)}else{if(y=="true"){return true}if(y=="false"){return false}if(y=="null"||y=="None"){return null}q=y.split(".");t=o.get(q[0]);if(dojo.isFunction(t)){var x=o.getThis&&o.getThis();if(t.alters_data){t=""}else{if(x){t=t.call(x)}else{t=""}}}for(var r=1;r<q.length;r++){var p=q[r];if(t){var m=t;if(dojo.isObject(t)&&p=="items"&&typeof t[p]=="undefined"){var u=[];for(var v in t){u.push([v,t[v]])}t=u;continue}if(t.get&&dojo.isFunction(t.get)&&t.get.safe){t=t.get(p)}else{if(typeof t[p]=="undefined"){t=t[p];break}else{t=t[p]}}if(dojo.isFunction(t)){if(t.alters_data){t=""}else{t=t.call(m)}}else{if(t instanceof Date){t=h._Context.prototype._normalize(t)}}}else{return""}}}}return t}});h._TextNode=h._Node=dojo.extend(function(m){this.contents=m},{set:function(m){this.contents=m;return this},render:function(o,m){return m.concat(this.contents)},isEmpty:function(){return !dojo.trim(this.contents)},clone:function(){return this}});h._NodeList=dojo.extend(function(m){this.contents=m||[];this.last=""},{push:function(m){this.contents.push(m);return this},concat:function(m){this.contents=this.contents.concat(m);return this},render:function(p,m){for(var o=0;o<this.contents.length;o++){m=this.contents[o].render(p,m);if(!m){throw new Error("Template must return buffer")}}return m},dummyRender:function(m){return this.render(m,h.Template.prototype.getBuffer()).toString()},unrender:function(){return arguments[1]},clone:function(){return this},rtrim:function(){while(1){i=this.contents.length-1;if(this.contents[i] instanceof h._TextNode&&this.contents[i].isEmpty()){this.contents.pop()}else{break}}return this}});h._VarNode=dojo.extend(function(m){this.contents=new h._Filter(m)},{render:function(o,m){var p=this.contents.resolve(o);if(!p.safe){p=h._base.escape(""+p)}return m.concat(p)}});h._noOpNode=new function(){this.render=this.unrender=function(){return arguments[1]};this.clone=function(){return this}};h._Parser=dojo.extend(function(m){this.contents=m},{i:0,parse:function(t){var m={};t=t||[];for(var o=0;o<t.length;o++){m[t[o]]=true}var r=new h._NodeList();while(this.i<this.contents.length){token=this.contents[this.i++];if(typeof token=="string"){r.push(new h._TextNode(token))}else{var q=token[0];var u=token[1];if(q==h.TOKEN_VAR){r.push(new h._VarNode(u))}else{if(q==h.TOKEN_BLOCK){if(m[u]){--this.i;return r}var s=u.split(/\s+/g);if(s.length){s=s[0];var p=j.getTag(s);if(p){r.push(p(this,new h.Token(q,u)))}}}}}}if(t.length){throw new Error("Could not find closing tag(s): "+t.toString())}this.contents.length=0;return r},next_token:function(){var m=this.contents[this.i++];return new h.Token(m[0],m[1])},delete_first_token:function(){this.i++},skip_past:function(o){while(this.i<this.contents.length){var m=this.contents[this.i++];if(m[0]==h.TOKEN_BLOCK&&m[1]==o){return}}throw new Error("Unclosed tag found when looking for "+o)},create_variable_node:function(m){return new h._VarNode(m)},create_text_node:function(m){return new h._TextNode(m||"")},getTemplate:function(m){return new h.Template(m)}});h.register={_registry:{attributes:[],tags:[],filters:[]},get:function(q,o){var m=h.register._registry[q+"s"];for(var p=0,r;r=m[p];p++){if(typeof r[0]=="string"){if(r[0]==o){return r}}else{if(o.match(r[0])){return r}}}},getAttributeTags:function(){var o=[];var m=h.register._registry.attributes;for(var p=0,r;r=m[p];p++){if(r.length==3){o.push(r)}else{var q=dojo.getObject(r[1]);if(q&&dojo.isFunction(q)){r.push(q);o.push(r)}}}return o},_any:function(s,t,o){for(var u in o){for(var q=0,r;r=o[u][q];q++){var p=r;if(dojo.isArray(r)){p=r[0];r=r[1]}if(typeof p=="string"){if(p.substr(0,5)=="attr:"){var m=r;if(m.substr(0,5)=="attr:"){m=m.slice(5)}h.register._registry.attributes.push([m.toLowerCase(),t+"."+u+"."+m])}p=p.toLowerCase()}h.register._registry[s].push([p,r,t+"."+u])}}},tags:function(o,m){h.register._any("tags",o,m)},filters:function(o,m){h.register._any("filters",o,m)}};var f=/&/g;var a=/</g;var l=/>/g;var b=/'/g;var k=/"/g;h._base.escape=function(m){return h.mark_safe(m.replace(f,"&amp;").replace(a,"&lt;").replace(l,"&gt;").replace(k,"&quot;").replace(b,"&#39;"))};h._base.safe=function(m){if(typeof m=="string"){m=new String(m)}if(typeof m=="object"){m.safe=true}return m};h.mark_safe=h._base.safe;h.register.tags("dojox.dtl.tag",{date:["now"],logic:["if","for","ifequal","ifnotequal"],loader:["extends","block","include","load","ssi"],misc:["comment","debug","filter","firstof","spaceless","templatetag","widthratio","with"],loop:["cycle","ifchanged","regroup"]});h.register.filters("dojox.dtl.filter",{dates:["date","time","timesince","timeuntil"],htmlstrings:["linebreaks","linebreaksbr","removetags","striptags"],integers:["add","get_digit"],lists:["dictsort","dictsortreversed","first","join","length","length_is","random","slice","unordered_list"],logic:["default","default_if_none","divisibleby","yesno"],misc:["filesizeformat","pluralize","phone2numeric","pprint"],strings:["addslashes","capfirst","center","cut","fix_ampersands","floatformat","iriencode","linenumbers","ljust","lower","make_list","rjust","slugify","stringformat","title","truncatewords","truncatewords_html","upper","urlencode","urlize","urlizetrunc","wordcount","wordwrap"]});h.register.filters("dojox.dtl",{_base:["escape","safe"]})})()}if(!dojo._hasResource["dojox.dtl.Context"]){dojo._hasResource["dojox.dtl.Context"]=true;dojo.provide("dojox.dtl.Context");dojox.dtl.Context=dojo.extend(function(a){this._this={};dojox.dtl._Context.call(this,a)},dojox.dtl._Context.prototype,{getKeys:function(){var b=[];for(var a in this){if(this.hasOwnProperty(a)&&a!="_dicts"&&a!="_this"){b.push(a)}}return b},extend:function(a){return dojo.delegate(this,a)},filter:function(e){var d=new dojox.dtl.Context();var f=[];var c,a;if(e instanceof dojox.dtl.Context){f=e.getKeys()}else{if(typeof e=="object"){for(var b in e){f.push(b)}}else{for(c=0;a=arguments[c];c++){if(typeof a=="string"){f.push(a)}}}}for(c=0,b;b=f[c];c++){d[b]=this[b]}return d},setThis:function(a){this._this=a},getThis:function(){return this._this},hasKey:function(b){if(typeof this[b]!="undefined"){return true}for(var a=0,c;c=this._dicts[a];a++){if(typeof c[b]!="undefined"){return true}}return false}})}if(!dojo._hasResource["dojox.dtl.dom"]){dojo._hasResource["dojox.dtl.dom"]=true;dojo.provide("dojox.dtl.dom");(function(){var a=dojox.dtl;a.BOOLS={checked:1,disabled:1,readonly:1};a.TOKEN_CHANGE=-11;a.TOKEN_ATTR=-12;a.TOKEN_CUSTOM=-13;a.TOKEN_NODE=1;var b=a.text;var c=a.dom={_attributes:{},_uppers:{},_re4:/^function anonymous\(\)\s*{\s*(.*)\s*}$/,_reTrim:/(?:^[\n\s]*(\{%)?\s*|\s*(%\})?[\n\s]*$)/g,_reSplit:/\s*%\}[\n\s]*\{%\s*/g,getTemplate:function(o){if(typeof this._commentable=="undefined"){this._commentable=false;var s=document.createElement("div");s.innerHTML="<!--Test comment handling, and long comments, using comments whenever possible.-->";if(s.childNodes.length&&s.childNodes[0].nodeType==8&&s.childNodes[0].data=="comment"){this._commentable=true}}if(!this._commentable){o=o.replace(/<!--({({|%).*?(%|})})-->/g,"$1")}if(dojo.isIE){o=o.replace(/\b(checked|disabled|readonly|style)="/g,'t$1="')}o=o.replace(/\bstyle="/g,'tstyle="');var l;var D=dojo.isWebKit;var J=[[true,"select","option"],[D,"tr","td|th"],[D,"thead","tr","th"],[D,"tbody","tr","td"],[D,"table","tbody|thead|tr","tr","td"]];var g=[];for(var A=0,w;w=J[A];A++){if(!w[0]){continue}if(o.indexOf("<"+w[1])!=-1){var e=new RegExp("<"+w[1]+"(?:.|\n)*?>((?:.|\n)+?)</"+w[1]+">","ig");tagLoop:while(l=e.exec(o)){var h=w[2].split("|");var H=[];for(var z=0,G;G=h[z];z++){H.push("<"+G+"(?:.|\n)*?>(?:.|\n)*?</"+G+">")}var q=[];var r=dojox.string.tokenize(l[1],new RegExp("("+H.join("|")+")","ig"),function(k){var j=/<(\w+)/.exec(k)[1];if(!q[j]){q[j]=true;q.push(j)}return{data:k}});if(q.length){var I=(q.length==1)?q[0]:w[2].split("|")[0];var E=[];for(var z=0,B=r.length;z<B;z++){var f=r[z];if(dojo.isObject(f)){E.push(f.data)}else{var u=f.replace(this._reTrim,"");if(!u){continue}f=u.split(this._reSplit);for(var y=0,d=f.length;y<d;y++){var x="";for(var t=2,C=w.length;t<C;t++){if(t==2){x+="<"+I+' dtlinstruction="{% '+f[y].replace('"','\\"')+' %}">'}else{if(I==w[t]){continue}else{x+="<"+w[t]+">"}}}x+="DTL";for(var t=w.length-1;t>1;t--){if(t==2){x+="</"+I+">"}else{if(I==w[t]){continue}else{x+="</"+w[t]+">"}}}E.push("\xFF"+g.length);g.push(x)}}}o=o.replace(l[1],E.join(""))}}}}for(var A=g.length;A--;){o=o.replace("\xFF"+A,g[A])}var v=/\b([a-zA-Z_:][a-zA-Z0-9_\-\.:]*)=['"]/g;while(l=v.exec(o)){var F=l[1].toLowerCase();if(F=="dtlinstruction"){continue}if(F!=l[1]){this._uppers[F]=l[1]}this._attributes[F]=true}var s=document.createElement("div");s.innerHTML=o;var m={nodes:[]};while(s.childNodes.length){m.nodes.push(s.removeChild(s.childNodes[0]))}return m},tokenize:function(d){var g=[];for(var e=0,f;f=d[e++];){if(f.nodeType!=1){this.__tokenize(f,g)}else{this._tokenize(f,g)}}return g},_swallowed:[],_tokenize:function(s,p){var k=false;var y=this._swallowed;var v,t,z,h;if(!p.first){k=p.first=true;var o=a.register.getAttributeTags();for(v=0;z=o[v];v++){try{(z[2])({swallowNode:function(){throw 1}},new a.Token(a.TOKEN_ATTR,""))}catch(x){y.push(z)}}}for(v=0;z=y[v];v++){var m=s.getAttribute(z[0]);if(m){var y=false;var d=(z[2])({swallowNode:function(){y=true;return s}},new a.Token(a.TOKEN_ATTR,z[0]+" "+m));if(y){if(s.parentNode&&s.parentNode.removeChild){s.parentNode.removeChild(s)}p.push([a.TOKEN_CUSTOM,d]);return}}}var g=[];if(dojo.isIE&&s.tagName=="SCRIPT"){g.push({nodeType:3,data:s.text});s.text=""}else{for(v=0;h=s.childNodes[v];v++){g.push(h)}}p.push([a.TOKEN_NODE,s]);var l=false;if(g.length){p.push([a.TOKEN_CHANGE,s]);l=true}for(var A in this._attributes){var q=false;var r="";if(A=="class"){r=s.className||r}else{if(A=="for"){r=s.htmlFor||r}else{if(A=="value"&&s.value==s.innerHTML){continue}else{if(s.getAttribute){r=s.getAttribute(A,2)||r;if(A=="href"||A=="src"){if(dojo.isIE){var f=location.href.lastIndexOf(location.hash);var u=location.href.substring(0,f).split("/");u.pop();u=u.join("/")+"/";if(r.indexOf(u)==0){r=r.replace(u,"")}r=decodeURIComponent(r)}}else{if(A=="tstyle"){q=A;A="style"}else{if(a.BOOLS[A.slice(1)]&&dojo.trim(r)){A=A.slice(1)}else{if(this._uppers[A]&&dojo.trim(r)){q=this._uppers[A]}}}}}}}}if(q){s.setAttribute(q,"");s.removeAttribute(q)}if(typeof r=="function"){r=r.toString().replace(this._re4,"$1")}if(!l){p.push([a.TOKEN_CHANGE,s]);l=true}p.push([a.TOKEN_ATTR,s,A,r])}for(v=0,h;h=g[v];v++){if(h.nodeType==1){var w=h.getAttribute("dtlinstruction");if(w){h.parentNode.removeChild(h);h={nodeType:8,data:w}}}this.__tokenize(h,p)}if(!k&&s.parentNode&&s.parentNode.tagName){if(l){p.push([a.TOKEN_CHANGE,s,true])}p.push([a.TOKEN_CHANGE,s.parentNode]);s.parentNode.removeChild(s)}else{p.push([a.TOKEN_CHANGE,s,true,true])}},__tokenize:function(e,m){var k=e.data;switch(e.nodeType){case 1:this._tokenize(e,m);return;case 3:if(k.match(/[^\s\n]/)&&(k.indexOf("{{")!=-1||k.indexOf("{%")!=-1)){var f=b.tokenize(k);for(var h=0,o;o=f[h];h++){if(typeof o=="string"){m.push([a.TOKEN_TEXT,o])}else{m.push(o)}}}else{m.push([e.nodeType,e])}if(e.parentNode){e.parentNode.removeChild(e)}return;case 8:if(k.indexOf("{%")==0){var o=dojo.trim(k.slice(2,-2));if(o.substr(0,5)=="load "){var g=dojo.trim(o).split(/\s+/g);for(var l=1,d;d=g[l];l++){dojo.require(d)}}m.push([a.TOKEN_BLOCK,o])}if(k.indexOf("{{")==0){m.push([a.TOKEN_VAR,dojo.trim(k.slice(2,-2))])}if(e.parentNode){e.parentNode.removeChild(e)}return}}};a.DomTemplate=dojo.extend(function(f){if(!f.nodes){var d=dojo.byId(f);if(d&&d.nodeType==1){dojo.forEach(["class","src","href","name","value"],function(h){c._attributes[h]=true});f={nodes:[d]}}else{if(typeof f=="object"){f=b.getTemplateString(f)}f=c.getTemplate(f)}}var e=c.tokenize(f.nodes);if(a.tests){this.tokens=e.slice(0)}var g=new a._DomParser(e);this.nodelist=g.parse()},{_count:0,_re:/\bdojo:([a-zA-Z0-9_]+)\b/g,setClass:function(d){this.getRootNode().className=d},getRootNode:function(){return this.buffer.rootNode},getBuffer:function(){return new a.DomBuffer()},render:function(g,d){d=this.buffer=d||this.getBuffer();this.rootNode=null;var e=this.nodelist.render(g||new a.Context({}),d);for(var f=0,h;h=d._cache[f];f++){if(h._cache){h._cache.length=0}}return e},unrender:function(e,d){return this.nodelist.unrender(e,d)}});a.DomBuffer=dojo.extend(function(d){this._parent=d;this._cache=[]},{concat:function(h){var g=this._parent;if(g&&h.parentNode&&h.parentNode===g&&!g._dirty){return this}if(h.nodeType==1&&!this.rootNode){this.rootNode=h||true;return this}if(!g){if(h.nodeType==3&&dojo.trim(h.data)){throw new Error("Text should not exist outside of the root node in template")}return this}if(this._closed){if(h.nodeType==3&&!dojo.trim(h.data)){return this}else{throw new Error("Content should not exist outside of the root node in template")}}if(g._dirty){if(h._drawn&&h.parentNode==g){var d=g._cache;if(d){for(var f=0,e;e=d[f];f++){this.onAddNode&&this.onAddNode(e);g.insertBefore(e,h);this.onAddNodeComplete&&this.onAddNodeComplete(e)}d.length=0}}g._dirty=false}if(!g._cache){g._cache=[];this._cache.push(g)}g._dirty=true;g._cache.push(h);return this},remove:function(d){if(typeof d=="string"){if(this._parent){this._parent.removeAttribute(d)}}else{if(d.nodeType==1&&!this.getRootNode()&&!this._removed){this._removed=true;return this}if(d.parentNode){this.onRemoveNode&&this.onRemoveNode(d);if(d.parentNode){d.parentNode.removeChild(d)}}}return this},setAttribute:function(e,f){var d=dojo.attr(this._parent,e);if(this.onChangeAttribute&&d!=f){this.onChangeAttribute(this._parent,e,d,f)}if(e=="style"){this._parent.style.cssText=f}else{dojo.attr(this._parent,e,f)}return this},addEvent:function(f,h,g,e){if(!f.getThis()){throw new Error("You must use Context.setObject(instance)")}this.onAddEvent&&this.onAddEvent(this.getParent(),h,g);var d=g;if(dojo.isArray(e)){d=function(j){this[g].apply(this,[j].concat(e))}}return dojo.connect(this.getParent(),h,f.getThis(),d)},setParent:function(f,h,l){if(!this._parent){this._parent=this._first=f}if(h&&l&&f===this._first){this._closed=true}if(h){var o=this._parent;var k="";var e=dojo.isIE&&o.tagName=="SCRIPT";if(e){o.text=""}if(o._dirty){var j=o._cache;var m=(o.tagName=="SELECT"&&!o.options.length);for(var g=0,d;d=j[g];g++){if(d!==o){this.onAddNode&&this.onAddNode(d);if(e){k+=d.data}else{o.appendChild(d);if(m&&d.defaultSelected&&g){m=g}}this.onAddNodeComplete&&this.onAddNodeComplete(d)}}if(m){o.options.selectedIndex=(typeof m=="number")?m:0}j.length=0;o._dirty=false}if(e){o.text=k}}this._parent=f;this.onSetParent&&this.onSetParent(f,h,l);return this},getParent:function(){return this._parent},getRootNode:function(){return this.rootNode}});a._DomNode=dojo.extend(function(d){this.contents=d},{render:function(e,d){this._rendered=true;return d.concat(this.contents)},unrender:function(e,d){if(!this._rendered){return d}this._rendered=false;return d.remove(this.contents)},clone:function(d){return new this.constructor(this.contents)}});a._DomNodeList=dojo.extend(function(d){this.contents=d||[]},{push:function(d){this.contents.push(d)},unshift:function(d){this.contents.unshift(d)},render:function(g,e,d){e=e||a.DomTemplate.prototype.getBuffer();if(d){var h=e.getParent()}for(var f=0;f<this.contents.length;f++){e=this.contents[f].render(g,e);if(!e){throw new Error("Template node render functions must return their buffer")}}if(h){e.setParent(h)}return e},dummyRender:function(h,e,g){var l=document.createElement("div");var j=e.getParent();var d=j._clone;j._clone=l;var k=this.clone(e,l);if(d){j._clone=d}else{j._clone=null}e=a.DomTemplate.prototype.getBuffer();k.unshift(new a.ChangeNode(l));k.unshift(new a._DomNode(l));k.push(new a.ChangeNode(l,true));k.render(h,e);if(g){return e.getRootNode()}var f=l.innerHTML;return(dojo.isIE)?f.replace(/\s*_(dirty|clone)="[^"]*"/g,""):f},unrender:function(g,e,d){if(d){var h=e.getParent()}for(var f=0;f<this.contents.length;f++){e=this.contents[f].unrender(g,e);if(!e){throw new Error("Template node render functions must return their buffer")}}if(h){e.setParent(h)}return e},clone:function(f){var k=f.getParent();var e=this.contents;var l=new a._DomNodeList();var h=[];for(var g=0;g<e.length;g++){var j=e[g].clone(f);if(j instanceof a.ChangeNode||j instanceof a._DomNode){var m=j.contents._clone;if(m){j.contents=m}else{if(k!=j.contents&&j instanceof a._DomNode){var d=j.contents;j.contents=j.contents.cloneNode(false);f.onClone&&f.onClone(d,j.contents);h.push(d);d._clone=j.contents}}}l.push(j)}for(var g=0,j;j=h[g];g++){j._clone=null}return l},rtrim:function(){while(1){var d=this.contents.length-1;if(this.contents[d] instanceof a._DomTextNode&&this.contents[d].isEmpty()){this.contents.pop()}else{break}}return this}});a._DomVarNode=dojo.extend(function(d){this.contents=new a._Filter(d)},{render:function(e,h){var l=this.contents.resolve(e);var m="text";if(l){if(l.render&&l.getRootNode){m="injection"}else{if(l.safe){if(l.nodeType){m="node"}else{if(l.toString){l=l.toString();m="html"}}}}}if(this._type&&m!=this._type){this.unrender(e,h)}this._type=m;switch(m){case"text":this._rendered=true;this._txt=this._txt||document.createTextNode(l);if(this._txt.data!=l){var g=this._txt.data;this._txt.data=l;h.onChangeData&&h.onChangeData(this._txt,g,this._txt.data)}return h.concat(this._txt);case"injection":var o=l.getRootNode();if(this._rendered&&o!=this._root){h=this.unrender(e,h)}this._root=o;var k=this._injected=new a._DomNodeList();k.push(new a.ChangeNode(h.getParent()));k.push(new a._DomNode(o));k.push(l);k.push(new a.ChangeNode(h.getParent()));this._rendered=true;return k.render(e,h);case"node":this._rendered=true;if(this._node&&this._node!=l&&this._node.parentNode&&this._node.parentNode===h.getParent()){this._node.parentNode.removeChild(this._node)}this._node=l;return h.concat(l);case"html":if(this._rendered&&this._src!=l){h=this.unrender(e,h)}this._src=l;if(!this._rendered){this._rendered=true;this._html=this._html||[];var d=(this._div=this._div||document.createElement("div"));d.innerHTML=l;var f=d.childNodes;while(f.length){var j=d.removeChild(f[0]);this._html.push(j);h=h.concat(j)}}return h;default:return h}},unrender:function(g,e){if(!this._rendered){return e}this._rendered=false;switch(this._type){case"text":return e.remove(this._txt);case"injection":return this._injection.unrender(g,e);case"node":if(this._node.parentNode===e.getParent()){return e.remove(this._node)}return e;case"html":for(var f=0,d=this._html.length;f<d;f++){e=e.remove(this._html[f])}return e;default:return e}},clone:function(){return new this.constructor(this.contents.getExpression())}});a.ChangeNode=dojo.extend(function(f,d,e){this.contents=f;this.up=d;this.root=e},{render:function(e,d){return d.setParent(this.contents,this.up,this.root)},unrender:function(e,d){if(!d.getParent()){return d}return d.setParent(this.contents)},clone:function(){return new this.constructor(this.contents,this.up,this.root)}});a.AttributeNode=dojo.extend(function(d,e){this.key=d;this.value=e;this.contents=e;if(this._pool[e]){this.nodelist=this._pool[e]}else{if(!(this.nodelist=a.quickFilter(e))){this.nodelist=(new a.Template(e,true)).nodelist}this._pool[e]=this.nodelist}this.contents=""},{_pool:{},render:function(f,d){var e=this.key;var g=this.nodelist.dummyRender(f);if(a.BOOLS[e]){g=!(g=="false"||g=="undefined"||!g)}if(g!==this.contents){this.contents=g;return d.setAttribute(e,g)}return d},unrender:function(e,d){this.contents="";return d.remove(this.key)},clone:function(d){return new this.constructor(this.key,this.value)}});a._DomTextNode=dojo.extend(function(d){this.contents=document.createTextNode(d);this.upcoming=d},{set:function(d){this.upcoming=d;return this},render:function(f,e){if(this.contents.data!=this.upcoming){var d=this.contents.data;this.contents.data=this.upcoming;e.onChangeData&&e.onChangeData(this.contents,d,this.upcoming)}return e.concat(this.contents)},unrender:function(e,d){return d.remove(this.contents)},isEmpty:function(){return !dojo.trim(this.contents.data)},clone:function(){return new this.constructor(this.contents.data)}});a._DomParser=dojo.extend(function(d){this.contents=d},{i:0,parse:function(d){var k={};var o=this.contents;if(!d){d=[]}for(var h=0;h<d.length;h++){k[d[h]]=true}var s=new a._DomNodeList();while(this.i<o.length){var g=o[this.i++];var p=g[0];var r=g[1];if(p==a.TOKEN_CUSTOM){s.push(r)}else{if(p==a.TOKEN_CHANGE){var j=new a.ChangeNode(r,g[2],g[3]);r[j.attr]=j;s.push(j)}else{if(p==a.TOKEN_ATTR){var q=b.getTag("attr:"+g[2],true);if(q&&g[3]){if(g[3].indexOf("{%")!=-1||g[3].indexOf("{{")!=-1){r.setAttribute(g[2],"")}s.push(q(null,new a.Token(p,g[2]+" "+g[3])))}else{if(dojo.isString(g[3])){if(g[2]=="style"||g[3].indexOf("{%")!=-1||g[3].indexOf("{{")!=-1){s.push(new a.AttributeNode(g[2],g[3]))}else{if(dojo.trim(g[3])){try{dojo.attr(r,g[2],g[3])}catch(m){}}}}}}else{if(p==a.TOKEN_NODE){var q=b.getTag("node:"+r.tagName.toLowerCase(),true);if(q){s.push(q(null,new a.Token(p,r),r.tagName.toLowerCase()))}s.push(new a._DomNode(r))}else{if(p==a.TOKEN_VAR){s.push(new a._DomVarNode(r))}else{if(p==a.TOKEN_TEXT){s.push(new a._DomTextNode(r.data||r))}else{if(p==a.TOKEN_BLOCK){if(k[r]){--this.i;return s}var f=r.split(/\s+/g);if(f.length){f=f[0];var q=b.getTag(f);if(typeof q!="function"){throw new Error("Function not found for "+f)}var l=q(this,new a.Token(p,r));if(l){s.push(l)}}}}}}}}}}if(d.length){throw new Error("Could not find closing tag(s): "+d.toString())}return s},next_token:function(){var d=this.contents[this.i++];return new a.Token(d[0],d[1])},delete_first_token:function(){this.i++},skip_past:function(d){return a._Parser.prototype.skip_past.call(this,d)},create_variable_node:function(d){return new a._DomVarNode(d)},create_text_node:function(d){return new a._DomTextNode(d||"")},getTemplate:function(d){return new a.DomTemplate(c.getTemplate(d))}})})()}if(!dojo._hasResource["dojox.dtl.render.dom"]){dojo._hasResource["dojox.dtl.render.dom"]=true;dojo.provide("dojox.dtl.render.dom");dojox.dtl.render.dom.Render=function(a,b){this._tpl=b;this.domNode=dojo.byId(a)};dojo.extend(dojox.dtl.render.dom.Render,{setAttachPoint:function(a){this.domNode=a},render:function(c,b,a){if(!this.domNode){throw new Error("You cannot use the Render object without specifying where you want to render it")}this._tpl=b=b||this._tpl;a=a||b.getBuffer();c=c||new dojox.dtl.Context();var d=b.render(c,a).getParent();if(!d){throw new Error("Rendered template does not have a root node")}if(this.domNode!==d){this.domNode.parentNode.replaceChild(d,this.domNode);this.domNode=d}}})}if(!dojo._hasResource["dojox.dtl.contrib.dijit"]){dojo._hasResource["dojox.dtl.contrib.dijit"]=true;dojo.provide("dojox.dtl.contrib.dijit");(function(){var a=dojox.dtl;var c=a.contrib.dijit;c.AttachNode=dojo.extend(function(e,d){this._keys=e;this._object=d},{render:function(g,d){if(!this._rendered){this._rendered=true;for(var f=0,e;e=this._keys[f];f++){g.getThis()[e]=this._object||d.getParent()}}return d},unrender:function(g,d){if(this._rendered){this._rendered=false;for(var f=0,e;e=this._keys[f];f++){if(g.getThis()[e]===(this._object||d.getParent())){delete g.getThis()[e]}}}return d},clone:function(d){return new this.constructor(this._keys,this._object)}});c.EventNode=dojo.extend(function(e,f){this._command=e;var h,l=e.split(/\s*,\s*/);var d=dojo.trim;var g=[];var k=[];while(h=l.pop()){if(h){var j=null;if(h.indexOf(":")!=-1){var m=h.split(":");h=d(m[0]);j=d(m.slice(1).join(":"))}else{h=d(h)}if(!j){j=h}g.push(h);k.push(j)}}this._types=g;this._fns=k;this._object=f;this._rendered=[]},{_clear:false,render:function(g,d){for(var f=0,j;j=this._types[f];f++){if(!this._clear&&!this._object){d.getParent()[j]=null}var h=this._fns[f];var e;if(h.indexOf(" ")!=-1){if(this._rendered[f]){dojo.disconnect(this._rendered[f]);this._rendered[f]=false}e=dojo.map(h.split(" ").slice(1),function(k){return new a._Filter(k).resolve(g)});h=h.split(" ",2)[0]}if(!this._rendered[f]){if(!this._object){this._rendered[f]=d.addEvent(g,j,h,e)}else{this._rendered[f]=dojo.connect(this._object,j,g.getThis(),h)}}}this._clear=true;return d},unrender:function(e,d){while(this._rendered.length){dojo.disconnect(this._rendered.pop())}return d},clone:function(){return new this.constructor(this._command,this._object)}});function b(e){var d=e.cloneNode(true);if(dojo.isIE){dojo.query("script",d).forEach("item.text = this[index].text;",dojo.query("script",e))}return d}c.DojoTypeNode=dojo.extend(function(h,f){this._node=h;this._parsed=f;var g=h.getAttribute("dojoAttachEvent");if(g){this._events=new c.EventNode(dojo.trim(g))}var e=h.getAttribute("dojoAttachPoint");if(e){this._attach=new c.AttachNode(dojo.trim(e).split(/\s*,\s*/))}if(!f){this._dijit=dojo.parser.instantiate([b(h)])[0]}else{h=b(h);var d=c.widgetsInTemplate;c.widgetsInTemplate=false;this._template=new a.DomTemplate(h);c.widgetsInTemplate=d}},{render:function(f,e){if(this._parsed){var g=new a.DomBuffer();this._template.render(f,g);var d=b(g.getRootNode());var k=document.createElement("div");k.appendChild(d);var j=k.innerHTML;k.removeChild(d);if(j!=this._rendered){this._rendered=j;if(this._dijit){this._dijit.destroyRecursive()}this._dijit=dojo.parser.instantiate([d])[0]}}var h=this._dijit.domNode;if(this._events){this._events._object=this._dijit;this._events.render(f,e)}if(this._attach){this._attach._object=this._dijit;this._attach.render(f,e)}return e.concat(h)},unrender:function(e,d){return d.remove(this._dijit.domNode)},clone:function(){return new this.constructor(this._node,this._parsed)}});dojo.mixin(c,{widgetsInTemplate:true,dojoAttachPoint:function(e,d){return new c.AttachNode(d.contents.slice(16).split(/\s*,\s*/))},dojoAttachEvent:function(e,d){return new c.EventNode(d.contents.slice(16))},dojoType:function(j,f){var d=false;if(f.contents.slice(-7)==" parsed"){d=true}var h=f.contents.slice(9);var e=d?h.slice(0,-7):h.toString();if(c.widgetsInTemplate){var g=j.swallowNode();g.setAttribute("dojoType",e);return new c.DojoTypeNode(g,d)}return new a.AttributeNode("dojoType",e)},on:function(f,d){var e=d.contents.split();return new c.EventNode(e[0]+":"+e.slice(1).join(" "))}});a.register.tags("dojox.dtl.contrib",{dijit:["attr:dojoType","attr:dojoAttachPoint",["attr:attach","dojoAttachPoint"],"attr:dojoAttachEvent",[/(attr:)?on(click|key(up))/i,"on"]]})})()}if(!dojo._hasResource["dojox.dtl._DomTemplated"]){dojo._hasResource["dojox.dtl._DomTemplated"]=true;dojo.provide("dojox.dtl._DomTemplated");dojox.dtl._DomTemplated={prototype:{_dijitTemplateCompat:false,buildRendering:function(){this.domNode=this.srcNodeRef;if(!this._render){var b=dojox.dtl.contrib.dijit;var a=b.widgetsInTemplate;b.widgetsInTemplate=this.widgetsInTemplate;this.template=this.template||this._getCachedTemplate(this.templatePath,this.templateString);this._render=new dojox.dtl.render.dom.Render(this.domNode,this.template);b.widgetsInTemplate=a}this.render();this.domNode=this.template.getRootNode();if(this.srcNodeRef&&this.srcNodeRef.parentNode){dojo.destroy(this.srcNodeRef);delete this.srcNodeRef}},setTemplate:function(b,a){if(dojox.dtl.text._isTemplate(b)){this.template=this._getCachedTemplate(null,b)}else{this.template=this._getCachedTemplate(b)}this.render(a)},render:function(b,a){if(a){this.template=a}this._render.render(this._getContext(b),this.template)},_getContext:function(a){if(!(a instanceof dojox.dtl.Context)){a=false}a=a||new dojox.dtl.Context(this);a.setThis(this);return a},_getCachedTemplate:function(b,c){if(!this._templates){this._templates={}}var a=c||b.toString();var d=this._templates;if(d[a]){return d[a]}return(d[a]=new dojox.dtl.DomTemplate(dijit._Templated.getCachedTemplate(b,c,true)))}}}}if(!dojo._hasResource["dojox.dtl._HtmlTemplated"]){dojo._hasResource["dojox.dtl._HtmlTemplated"]=true;dojo.provide("dojox.dtl._HtmlTemplated");dojo.deprecated("dojox.dtl.html","All packages and classes in dojox.dtl that start with Html or html have been renamed to Dom or dom");dojox.dtl._HtmlTemplated=dojox.dtl._DomTemplated;dojox.dtl._HtmlTemplated.prototype.declaredClass="dojox.dtl._HtmlTemplated"}if(!dojo._hasResource["dojox.dtl.tag.logic"]){dojo._hasResource["dojox.dtl.tag.logic"]=true;dojo.provide("dojox.dtl.tag.logic");(function(){var a=dojox.dtl;var b=a.text;var c=a.tag.logic;c.IfNode=dojo.extend(function(g,f,d,e){this.bools=g;this.trues=f;this.falses=d;this.type=e},{render:function(h,e){var g,f,d,j,k;if(this.type=="or"){for(g=0;f=this.bools[g];g++){d=f[0];j=f[1];k=j.resolve(h);if((k&&!d)||(d&&!k)){if(this.falses){e=this.falses.unrender(h,e)}return(this.trues)?this.trues.render(h,e,this):e}}if(this.trues){e=this.trues.unrender(h,e)}return(this.falses)?this.falses.render(h,e,this):e}else{for(g=0;f=this.bools[g];g++){d=f[0];j=f[1];k=j.resolve(h);if(k==d){if(this.trues){e=this.trues.unrender(h,e)}return(this.falses)?this.falses.render(h,e,this):e}}if(this.falses){e=this.falses.unrender(h,e)}return(this.trues)?this.trues.render(h,e,this):e}return e},unrender:function(e,d){d=(this.trues)?this.trues.unrender(e,d):d;d=(this.falses)?this.falses.unrender(e,d):d;return d},clone:function(d){var f=(this.trues)?this.trues.clone(d):null;var e=(this.falses)?this.falses.clone(d):null;return new this.constructor(this.bools,f,e,this.type)}});c.IfEqualNode=dojo.extend(function(h,f,e,d,g){this.var1=new a._Filter(h);this.var2=new a._Filter(f);this.trues=e;this.falses=d;this.negate=g},{render:function(e,d){var g=this.var1.resolve(e);var f=this.var2.resolve(e);g=(typeof g!="undefined")?g:"";f=(typeof g!="undefined")?f:"";if((this.negate&&g!=f)||(!this.negate&&g==f)){if(this.falses){d=this.falses.unrender(e,d,this)}return(this.trues)?this.trues.render(e,d,this):d}if(this.trues){d=this.trues.unrender(e,d,this)}return(this.falses)?this.falses.render(e,d,this):d},unrender:function(e,d){return c.IfNode.prototype.unrender.call(this,e,d)},clone:function(d){var f=this.trues?this.trues.clone(d):null;var e=this.falses?this.falses.clone(d):null;return new this.constructor(this.var1.getExpression(),this.var2.getExpression(),f,e,this.negate)}});c.ForNode=dojo.extend(function(e,d,g,f){this.assign=e;this.loop=new a._Filter(d);this.reversed=g;this.nodelist=f;this.pool=[]},{render:function(f,l){var m,h,g;var d=false;var u=this.assign;for(g=0;g<u.length;g++){if(typeof f[u[g]]!="undefined"){d=true;f=f.push();break}}if(!d&&f.forloop){d=true;f=f.push()}var o=this.loop.resolve(f)||[];for(m=o.length;m<this.pool.length;m++){this.pool[m].unrender(f,l,this)}if(this.reversed){o=o.slice(0).reverse()}var t=dojo.isObject(o)&&!dojo.isArrayLike(o);var e=[];if(t){for(var p in o){e.push(o[p])}}else{e=o}var r=f.forloop={parentloop:f.get("forloop",{})};var h=0;for(m=0;m<e.length;m++){var s=e[m];r.counter0=h;r.counter=h+1;r.revcounter0=e.length-h-1;r.revcounter=e.length-h;r.first=!h;r.last=(h==e.length-1);if(u.length>1&&dojo.isArrayLike(s)){if(!d){d=true;f=f.push()}var q={};for(g=0;g<s.length&&g<u.length;g++){q[u[g]]=s[g]}dojo.mixin(f,q)}else{f[u[0]]=s}if(h+1>this.pool.length){this.pool.push(this.nodelist.clone(l))}l=this.pool[h++].render(f,l,this)}delete f.forloop;if(d){f=f.pop()}else{for(g=0;g<u.length;g++){delete f[u[g]]}}return l},unrender:function(g,d){for(var f=0,e;e=this.pool[f];f++){d=e.unrender(g,d)}return d},clone:function(d){return new this.constructor(this.assign,this.loop.getExpression(),this.reversed,this.nodelist.clone(d))}});dojo.mixin(c,{if_:function(d,h){var k,f,o,e=[],j=h.contents.split();j.shift();h=j.join(" ");j=h.split(" and ");if(j.length==1){o="or";j=h.split(" or ")}else{o="and";for(k=0;k<j.length;k++){if(j[k].indexOf(" or ")!=-1){throw new Error("'if' tags can't mix 'and' and 'or'")}}}for(k=0;f=j[k];k++){var g=false;if(f.indexOf("not ")==0){f=f.slice(4);g=true}e.push([g,new a._Filter(f)])}var l=d.parse(["else","endif"]);var m=false;var h=d.next_token();if(h.contents=="else"){m=d.parse(["endif"]);d.next_token()}return new c.IfNode(e,l,m,o)},_ifequal:function(k,f,j){var h=f.split_contents();if(h.length!=3){throw new Error(h[0]+" takes two arguments")}var d="end"+h[0];var g=k.parse(["else",d]);var e=false;var f=k.next_token();if(f.contents=="else"){e=k.parse([d]);k.next_token()}return new c.IfEqualNode(h[1],h[2],g,e,j)},ifequal:function(e,d){return c._ifequal(e,d)},ifnotequal:function(e,d){return c._ifequal(e,d,true)},for_:function(l,f){var h=f.contents.split();if(h.length<4){throw new Error("'for' statements should have at least four words: "+f.contents)}var k=h[h.length-1]=="reversed";var d=(k)?-3:-2;if(h[h.length+d]!="in"){throw new Error("'for' tag received an invalid argument: "+f.contents)}var j=h.slice(1,d).join(" ").split(/ *, */);for(var e=0;e<j.length;e++){if(!j[e]||j[e].indexOf(" ")!=-1){throw new Error("'for' tag received an invalid argument: "+f.contents)}}var g=l.parse(["endfor"]);l.next_token();return new c.ForNode(j,h[h.length+d+1],k,g)}})})()}if(!dojo._hasResource["dijit.form._FormWidget"]){dojo._hasResource["dijit.form._FormWidget"]=true;dojo.provide("dijit.form._FormWidget");dojo.declare("dijit.form._FormWidget",[dijit._Widget,dijit._Templated],{baseClass:"",name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:false,readOnly:false,intermediateChanges:false,scrollOnFocus:true,attributeMap:dojo.delegate(dijit._Widget.prototype.attributeMap,{value:"focusNode",disabled:"focusNode",readOnly:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode"}),postMixInProperties:function(){this.nameAttrSetting=this.name?("name='"+this.name+"'"):"";this.inherited(arguments)},_setDisabledAttr:function(a){this.disabled=a;dojo.attr(this.focusNode,"disabled",a);dijit.setWaiState(this.focusNode,"disabled",a);if(a){this._hovering=false;this._active=false;this.focusNode.removeAttribute("tabIndex")}else{this.focusNode.setAttribute("tabIndex",this.tabIndex)}this._setStateClass()},setDisabled:function(a){dojo.deprecated("setDisabled("+a+") is deprecated. Use attr('disabled',"+a+") instead.","","2.0");this.attr("disabled",a)},_onFocus:function(a){if(this.scrollOnFocus){dijit.scrollIntoView(this.domNode)}this.inherited(arguments)},_onMouse:function(b){var c=b.currentTarget;if(c&&c.getAttribute){this.stateModifier=c.getAttribute("stateModifier")||""}if(!this.disabled){switch(b.type){case"mouseenter":case"mouseover":this._hovering=true;this._active=this._mouseDown;break;case"mouseout":case"mouseleave":this._hovering=false;this._active=false;break;case"mousedown":this._active=true;this._mouseDown=true;var a=this.connect(dojo.body(),"onmouseup",function(){if(this._mouseDown&&this.isFocusable()){this.focus()}this._active=false;this._mouseDown=false;this._setStateClass();this.disconnect(a)});break}this._setStateClass()}},isFocusable:function(){return !this.disabled&&!this.readOnly&&this.focusNode&&(dojo.style(this.domNode,"display")!="none")},focus:function(){dijit.focus(this.focusNode)},_setStateClass:function(){var d=this.baseClass.split(" ");function b(c){d=d.concat(dojo.map(d,function(h){return h+c}),"dijit"+c)}if(this.checked){b("Checked")}if(this.state){b(this.state)}if(this.selected){b("Selected")}if(this.disabled){b("Disabled")}else{if(this.readOnly){b("ReadOnly")}else{if(this._active){b(this.stateModifier+"Active")}else{if(this._focused){b("Focused")}if(this._hovering){b(this.stateModifier+"Hover")}}}}var a=this.stateNode||this.domNode,g={};dojo.forEach(a.className.split(" "),function(h){g[h]=true});if("_stateClasses" in this){dojo.forEach(this._stateClasses,function(h){delete g[h]})}dojo.forEach(d,function(h){g[h]=true});var f=[];for(var e in g){f.push(e)}a.className=f.join(" ");this._stateClasses=d},compare:function(b,a){if((typeof b=="number")&&(typeof a=="number")){return(isNaN(b)&&isNaN(a))?0:(b-a)}else{if(b>a){return 1}else{if(b<a){return -1}else{return 0}}}},onChange:function(a){},_onChangeActive:false,_handleOnChange:function(b,a){this._lastValue=b;if(this._lastValueReported==undefined&&(a===null||!this._onChangeActive)){this._resetValue=this._lastValueReported=b}if((this.intermediateChanges||a||a===undefined)&&((typeof b!=typeof this._lastValueReported)||this.compare(b,this._lastValueReported)!=0)){this._lastValueReported=b;if(this._onChangeActive){this.onChange(b)}}},create:function(){this.inherited(arguments);this._onChangeActive=true;this._setStateClass()},destroy:function(){if(this._layoutHackHandle){clearTimeout(this._layoutHackHandle)}this.inherited(arguments)},setValue:function(a){dojo.deprecated("dijit.form._FormWidget:setValue("+a+") is deprecated.  Use attr('value',"+a+") instead.","","2.0");this.attr("value",a)},getValue:function(){dojo.deprecated(this.declaredClass+"::getValue() is deprecated. Use attr('value') instead.","","2.0");return this.attr("value")},_layoutHack:function(){if(dojo.isFF==2&&!this._layoutHackHandle){var b=this.domNode;var a=b.style.opacity;b.style.opacity="0.999";this._layoutHackHandle=setTimeout(dojo.hitch(this,function(){this._layoutHackHandle=null;b.style.opacity=a}),0)}}});dojo.declare("dijit.form._FormValueWidget",dijit.form._FormWidget,{attributeMap:dojo.delegate(dijit.form._FormWidget.prototype.attributeMap,{value:""}),postCreate:function(){if(dojo.isIE||dojo.isWebKit){this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown)}if(this._resetValue===undefined){this._resetValue=this.value}},_setValueAttr:function(b,a){this.value=b;this._handleOnChange(b,a)},_getValueAttr:function(a){return this._lastValue},undo:function(){this._setValueAttr(this._lastValueReported,false)},reset:function(){this._hasBeenBlurred=false;this._setValueAttr(this._resetValue,true)},_onKeyDown:function(a){if(a.keyCode==dojo.keys.ESCAPE&&!a.ctrlKey&&!a.altKey){var b;if(dojo.isIE){a.preventDefault();b=document.createEventObject();b.keyCode=dojo.keys.ESCAPE;b.shiftKey=a.shiftKey;a.srcElement.fireEvent("onkeypress",b)}else{if(dojo.isWebKit){b=document.createEvent("Events");b.initEvent("keypress",true,true);b.keyCode=dojo.keys.ESCAPE;b.shiftKey=a.shiftKey;a.target.dispatchEvent(b)}}}}})}if(!dojo._hasResource["fw.dijit.UITextarea"]){dojo._hasResource["fw.dijit.UITextarea"]=true;dojo.provide("fw.dijit.UITextarea");dojo.declare("fw.dijit.UITextarea",dijit.form._FormWidget,{defaultTitle:"",content:"",noteDisplayed:false,height:0,noteId:null,focusNote:"",error:"",errorId:0,hideErrorOnActivity:false,templateString:"<div dojoAttachPoint='decoratorDiv' class='UITextAreaWrapper'>	                       <div class='UITextArea' dojoAttachPoint='rootDiv'>		                    <textarea dojoAttachPoint='focusNode' dojoAttachEvent='onmouseenter:_onMouse,onmouseleave:_onMouse' autocomplete='off' ${nameAttrSetting}></textarea>		                    <div class='UITextAreaDefaultTitle' id='${id}_default_title' dojoAttachPoint='defaultTitleNode'>${defaultTitle}</div>	                      </div>                        </div>",widgetsInTemplate:true,postCreate:function(){if(this.srcNodeRef){this.focusNode.innerHTML=this.srcNodeRef.innerHTML}else{this.focusNode.innerHTML=this.content}this.inherited(arguments);if(this.focusNode.innerHTML){this.hideDefaultTitle()}},getValue:function(){return this.focusNode.value},cleanValue:function(){this.focusNode.value=""},setHeight:function(a){this.focusNode.style.height=a+"px"},_onBlur:function(){this.inherited(arguments);this.decoratorDiv.className="UITextAreaWrapper"},_onFocus:function(){this.inherited(arguments);var a=this.decoratorDiv.clientWidth;if(dojo.isIE){a=this.decoratorDiv.offsetWidth}this.decoratorDiv.className="UITextAreaFocused";this.decoratorDiv.style.width=a;this.hideDefaultTitle()},showDefaultTitle:function(){this.defaultTitleNode.style.display="block"},hideDefaultTitle:function(){this.defaultTitleNode.style.display="none"}})}if(!dojo._hasResource["dijit.form.TextBox"]){dojo._hasResource["dijit.form.TextBox"]=true;dojo.provide("dijit.form.TextBox");dojo.declare("dijit.form.TextBox",dijit.form._FormValueWidget,{trim:false,uppercase:false,lowercase:false,propercase:false,maxLength:"",templateString:'<input class="dijit dijitReset dijitLeft" dojoAttachPoint=\'textbox,focusNode\'\n\tdojoAttachEvent=\'onmouseenter:_onMouse,onmouseleave:_onMouse\'\n\tautocomplete="off" type="${type}" ${nameAttrSetting}\n\t/>\n',baseClass:"dijitTextBox",attributeMap:dojo.delegate(dijit.form._FormValueWidget.prototype.attributeMap,{maxLength:"focusNode"}),_getValueAttr:function(){return this.parse(this.attr("displayedValue"),this.constraints)},_setValueAttr:function(d,c,b){var a;if(d!==undefined){a=this.filter(d);if(typeof b!="string"){if(a!==null&&((typeof a!="number")||!isNaN(a))){b=this.filter(this.format(a,this.constraints))}else{b=""}}}if(b!=null&&b!=undefined&&((typeof b)!="number"||!isNaN(b))&&this.textbox.value!=b){this.textbox.value=b}this.inherited(arguments,[a,c])},displayedValue:"",getDisplayedValue:function(){dojo.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use attr('displayedValue') instead.","","2.0");return this.attr("displayedValue")},_getDisplayedValueAttr:function(){return this.filter(this.textbox.value)},setDisplayedValue:function(a){dojo.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use attr('displayedValue', ...) instead.","","2.0");this.attr("displayedValue",a)},_setDisplayedValueAttr:function(a){if(a===null||a===undefined){a=""}else{if(typeof a!="string"){a=String(a)}}this.textbox.value=a;this._setValueAttr(this.attr("value"),undefined,a)},format:function(a,b){return((a==null||a==undefined)?"":(a.toString?a.toString():a))},parse:function(a,b){return a},_refreshState:function(){},_onInput:function(a){if(a&&a.type&&/key/i.test(a.type)&&a.keyCode){switch(a.keyCode){case dojo.keys.SHIFT:case dojo.keys.ALT:case dojo.keys.CTRL:case dojo.keys.TAB:return}}if(this.intermediateChanges){var b=this;setTimeout(function(){b._handleOnChange(b.attr("value"),false)},0)}this._refreshState()},postCreate:function(){this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);if(dojo.isMoz||dojo.isOpera){this.connect(this.textbox,"oninput",this._onInput)}else{this.connect(this.textbox,"onkeydown",this._onInput);this.connect(this.textbox,"onkeyup",this._onInput);this.connect(this.textbox,"onpaste",this._onInput);this.connect(this.textbox,"oncut",this._onInput)}this._layoutHack()},_blankValue:"",filter:function(a){if(a===null){return this._blankValue}if(typeof a!="string"){return a}if(this.trim){a=dojo.trim(a)}if(this.uppercase){a=a.toUpperCase()}if(this.lowercase){a=a.toLowerCase()}if(this.propercase){a=a.replace(/[^\s]+/g,function(b){return b.substring(0,1).toUpperCase()+b.substring(1)})}return a},_setBlurValue:function(){this._setValueAttr(this.attr("value"),true)},_onBlur:function(a){if(this.disabled){return}this._setBlurValue();this.inherited(arguments)},_onFocus:function(a){if(this.disabled){return}this._refreshState();this.inherited(arguments)},reset:function(){this.textbox.value="";this.inherited(arguments)}});dijit.selectInputText=function(element,start,stop){var _window=dojo.global;var _document=dojo.doc;element=dojo.byId(element);if(isNaN(start)){start=0}if(isNaN(stop)){stop=element.value?element.value.length:0}element.focus();if(_document.selection&&dojo.body()["createTextRange"]){if(element.createTextRange){var range=element.createTextRange();with(range){collapse(true);moveStart("character",start);moveEnd("character",stop);select()}}}else{if(_window.getSelection){var selection=_window.getSelection();if(element.setSelectionRange){element.setSelectionRange(start,stop)}}}}}if(!dojo._hasResource["fw.dijit.UIInput"]){dojo._hasResource["fw.dijit.UIInput"]=true;dojo.provide("fw.dijit.UIInput");dojo.declare("fw.dijit.UIInput",dijit.form.TextBox,{defaultTitle:"",noteDisplayed:false,noteId:null,focusNote:"",error:"",errorId:null,hideErrorOnActivity:false,templateString:null,templateString:"<div dojoAttachPoint='decoratorDiv' class='UIInputWrapper'>	<div class='UIInput' dojoAttachPoint='rootDiv'>		<input class='dijit	dijitReset dijitLeft' dojoAttachPoint='textbox,focusNode' dojoAttachEvent='onmouseenter:_onMouse,onmouseleave:_onMouse' autocomplete='off'	type='${type}' 	${nameAttrSetting}/>		<div class='UIInputDefaultTitle' id='${id}_default_title' dojoAttachPoint='defaultTitleNode'>${defaultTitle}</div>	</div></div>",widgetsInTemplate:true,postCreate:function(){this.inherited(arguments);if(this.error){this.showError(this.error)}if(this.value){this.hideDefaultTitle()}},setDefaultTitle:function(a){this.defaultTitleNode.innerHTML=a},_onBlur:function(){this.inherited(arguments);if(!this.errorId){this.decoratorDiv.className="UIInputWrapper"}if(this.noteId){var a=dojo.byId(this.noteId);a.parentNode.removeChild(a);this.noteId=null}if(!this.value){this.showDefaultTitle()}},_onFocus:function(){this.inherited(arguments);this.hideDefaultTitle();if(!this.errorId){this.decoratorDiv.className="UIInputFocused"}if(!this.noteId&&this.focusNote){var b=dojo.byId(this.id);var a=document.createElement("div");a.className="left";a.id=this.id+"_focused_note";a.innerHTML='<div class="UIInput_FocusHelp"><div	class="UIInput_FocusHelpTri"></div>'+this.focusNote+"</div>";dojo.place(a,b,"after");this.noteDisplayed=true;this.noteId=this.id+"_focused_note"}},_onInput:function(a){this.inherited(arguments);if(this.hideErrorOnActivity){this.hideError()}},showDefaultTitle:function(){this.defaultTitleNode.style.display="block"},hideDefaultTitle:function(){this.defaultTitleNode.style.display="none"},showError:function(b){this.baseClass="dijitTextBox UIInputError";var d=dojo.byId(this.id).parentNode.parentNode;var c=document.createElement("div");c.className="left";c.id=this.id+"_error_arrow";c.innerHTML='<div class="UIInputErrorArrow"></div>';dojo.place(c,d,"after");var a=document.createElement("div");a.className="left";a.id=this.id+"_error_note";a.innerHTML='<div	class="UIInputErrorText">'+b+"</div>";dojo.place(a,d,"before");this.errorId=this.id+"_error";this.decoratorDiv.className="UIInputError"},hideError:function(){if(this.errorId){this.baseClass="UIInputWrapper dijitTextBox";var a=dojo.byId(this.errorId+"_note");a.parentNode.removeChild(a);var a=dojo.byId(this.errorId+"_arrow");a.parentNode.removeChild(a);this.errorId=null;this._setStateClass()}},validate:function(){return true}})}dojo.provide("dojox.encoding.digests._base");(function(){var b=dojox.encoding.digests;b.outputTypes={Base64:0,Hex:1,String:2,Raw:3};b.addWords=function(g,e){var f=(g&65535)+(e&65535);var d=(g>>16)+(e>>16)+(f>>16);return(d<<16)|(f&65535)};var c=8;var a=(1<<c)-1;b.stringToWord=function(f){var g=[];for(var e=0,d=f.length*c;e<d;e+=c){g[e>>5]|=(f.charCodeAt(e/c)&a)<<(e%32)}return g};b.wordToString=function(g){var f=[];for(var e=0,d=g.length*32;e<d;e+=c){f.push(String.fromCharCode((g[e>>5]>>>(e%32))&a))}return f.join("")};b.wordToHex=function(j){var g="0123456789abcdef",f=[];for(var e=0,d=j.length*4;e<d;e++){f.push(g.charAt((j[e>>2]>>((e%4)*8+4))&15)+g.charAt((j[e>>2]>>((e%4)*8))&15))}return f.join("")};b.wordToBase64=function(o){var m="=",k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=[];for(var g=0,d=o.length*4;g<d;g+=3){var f=(((o[g>>2]>>8*(g%4))&255)<<16)|(((o[g+1>>2]>>8*((g+1)%4))&255)<<8)|((o[g+2>>2]>>8*((g+2)%4))&255);for(var e=0;e<4;e++){if(g*8+e*6>o.length*32){h.push(m)}else{h.push(k.charAt((f>>6*(3-e))&63))}}}return h.join("")}})();dojo.provide("dojox.encoding.digests.MD5");dojo.require("dojox.encoding.digests._base");(function(){var h=dojox.encoding.digests;var j=8;function e(m,l){return(m<<l)|(m>>>(32-l))}function a(u,o,m,l,r,p){return h.addWords(e(h.addWords(h.addWords(o,u),h.addWords(l,p)),r),m)}function g(o,m,u,r,l,q,p){return a((m&u)|((~m)&r),o,m,l,q,p)}function b(o,m,u,r,l,q,p){return a((m&r)|(u&(~r)),o,m,l,q,p)}function k(o,m,u,r,l,q,p){return a(m^u^r,o,m,l,q,p)}function d(o,m,u,r,l,q,p){return a(u^(m|(~r)),o,m,l,q,p)}function c(w,r){w[r>>5]|=128<<((r)%32);w[(((r+64)>>>9)<<4)+14]=r;var v=1732584193;var u=-271733879;var t=-1732584194;var s=271733878;for(var o=0;o<w.length;o+=16){var q=v;var p=u;var m=t;var l=s;v=g(v,u,t,s,w[o+0],7,-680876936);s=g(s,v,u,t,w[o+1],12,-389564586);t=g(t,s,v,u,w[o+2],17,606105819);u=g(u,t,s,v,w[o+3],22,-1044525330);v=g(v,u,t,s,w[o+4],7,-176418897);s=g(s,v,u,t,w[o+5],12,1200080426);t=g(t,s,v,u,w[o+6],17,-1473231341);u=g(u,t,s,v,w[o+7],22,-45705983);v=g(v,u,t,s,w[o+8],7,1770035416);s=g(s,v,u,t,w[o+9],12,-1958414417);t=g(t,s,v,u,w[o+10],17,-42063);u=g(u,t,s,v,w[o+11],22,-1990404162);v=g(v,u,t,s,w[o+12],7,1804603682);s=g(s,v,u,t,w[o+13],12,-40341101);t=g(t,s,v,u,w[o+14],17,-1502002290);u=g(u,t,s,v,w[o+15],22,1236535329);v=b(v,u,t,s,w[o+1],5,-165796510);s=b(s,v,u,t,w[o+6],9,-1069501632);t=b(t,s,v,u,w[o+11],14,643717713);u=b(u,t,s,v,w[o+0],20,-373897302);v=b(v,u,t,s,w[o+5],5,-701558691);s=b(s,v,u,t,w[o+10],9,38016083);t=b(t,s,v,u,w[o+15],14,-660478335);u=b(u,t,s,v,w[o+4],20,-405537848);v=b(v,u,t,s,w[o+9],5,568446438);s=b(s,v,u,t,w[o+14],9,-1019803690);t=b(t,s,v,u,w[o+3],14,-187363961);u=b(u,t,s,v,w[o+8],20,1163531501);v=b(v,u,t,s,w[o+13],5,-1444681467);s=b(s,v,u,t,w[o+2],9,-51403784);t=b(t,s,v,u,w[o+7],14,1735328473);u=b(u,t,s,v,w[o+12],20,-1926607734);v=k(v,u,t,s,w[o+5],4,-378558);s=k(s,v,u,t,w[o+8],11,-2022574463);t=k(t,s,v,u,w[o+11],16,1839030562);u=k(u,t,s,v,w[o+14],23,-35309556);v=k(v,u,t,s,w[o+1],4,-1530992060);s=k(s,v,u,t,w[o+4],11,1272893353);t=k(t,s,v,u,w[o+7],16,-155497632);u=k(u,t,s,v,w[o+10],23,-1094730640);v=k(v,u,t,s,w[o+13],4,681279174);s=k(s,v,u,t,w[o+0],11,-358537222);t=k(t,s,v,u,w[o+3],16,-722521979);u=k(u,t,s,v,w[o+6],23,76029189);v=k(v,u,t,s,w[o+9],4,-640364487);s=k(s,v,u,t,w[o+12],11,-421815835);t=k(t,s,v,u,w[o+15],16,530742520);u=k(u,t,s,v,w[o+2],23,-995338651);v=d(v,u,t,s,w[o+0],6,-198630844);s=d(s,v,u,t,w[o+7],10,1126891415);t=d(t,s,v,u,w[o+14],15,-1416354905);u=d(u,t,s,v,w[o+5],21,-57434055);v=d(v,u,t,s,w[o+12],6,1700485571);s=d(s,v,u,t,w[o+3],10,-1894986606);t=d(t,s,v,u,w[o+10],15,-1051523);u=d(u,t,s,v,w[o+1],21,-2054922799);v=d(v,u,t,s,w[o+8],6,1873313359);s=d(s,v,u,t,w[o+15],10,-30611744);t=d(t,s,v,u,w[o+6],15,-1560198380);u=d(u,t,s,v,w[o+13],21,1309151649);v=d(v,u,t,s,w[o+4],6,-145523070);s=d(s,v,u,t,w[o+11],10,-1120210379);t=d(t,s,v,u,w[o+2],15,718787259);u=d(u,t,s,v,w[o+9],21,-343485551);v=h.addWords(v,q);u=h.addWords(u,p);t=h.addWords(t,m);s=h.addWords(s,l)}return[v,u,t,s]}function f(t,p){var u=h.stringToWord(p);if(u.length>16){u=c(u,p.length*j)}var m=[],s=[];for(var o=0;o<16;o++){m[o]=u[o]^909522486;s[o]=u[o]^1549556828}var q=c(m.concat(h.stringToWord(t)),512+t.length*j);return c(s.concat(q),640)}h.MD5=function(m,p){var l=p||h.outputTypes.Base64;var o=c(h.stringToWord(m),m.length*j);switch(l){case h.outputTypes.Raw:return o;case h.outputTypes.Hex:return h.wordToHex(o);case h.outputTypes.String:return h.wordToString(o);default:return h.wordToBase64(o)}};h.MD5._hmac=function(o,m,q){var l=q||h.outputTypes.Base64;var p=f(o,m);switch(l){case h.outputTypes.Raw:return p;case h.outputTypes.Hex:return h.wordToHex(p);case h.outputTypes.String:return h.wordToString(p);default:return h.wordToBase64(p)}}})();dojo.provide("cos.escapeHtml");(function(){cos.escapeHtml=function(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}})();dojo.provide("cos.InsertWordBreaks");(function(){cos.InsertWordBreaks=function(j,a){j=String(j);var f=[];var h=0;var b=false;var k=false;var g=0;var d=0;for(var e=0,c=j.length;e<c;++e){var l=j.charCodeAt(e);if(g>=a&&l!=cos.InsertWordBreaks.$$CharCode_.SPACE){f[h++]=j.substring(d,e);d=e;f[h++]=cos.InsertWordBreaks.WORD_BREAK_;g=0}if(b){if(l==cos.InsertWordBreaks.$$CharCode_.GREATER_THAN){b=false}}else{if(k){switch(l){case cos.InsertWordBreaks.$$CharCode_.SEMI_COLON:k=false;++g;break;case cos.InsertWordBreaks.$$CharCode_.LESS_THAN:k=false;b=true;break;case cos.InsertWordBreaks.$$CharCode_.SPACE:k=false;g=0;break}}else{switch(l){case cos.InsertWordBreaks.$$CharCode_.LESS_THAN:b=true;break;case cos.InsertWordBreaks.$$CharCode_.AMPERSAND:k=true;break;case cos.InsertWordBreaks.$$CharCode_.SPACE:g=0;break;default:++g;break}}}}f[h++]=j.substring(d);return f.join("")};cos.InsertWordBreaks.$$CharCode_={SPACE:32,AMPERSAND:38,SEMI_COLON:59,LESS_THAN:60,GREATER_THAN:62};cos.InsertWordBreaks.WORD_BREAK_=dojo.isIE>7?"&#8203;":dojo.isWebKit?"<wbr></wbr>":dojo.isOpera?"&shy;":"<wbr>"})();dojo.i18n._preloadLocalizations("dojo.nls.",["ROOT","ar","ca","cs","da","de","de-de","el","en","en-gb","en-us","es","es-es","fi","fi-fi","fr","fr-fr","he","he-il","hu","it","it-it","ja","ja-jp","ko","ko-kr","nl","nl-nl","no","pl","pt","pt-br","pt-pt","ru","sk","sl","sv","th","tr","xx","zh","zh-cn","zh-tw"]);dojo.provide("dijit.nls.dijit-all_en");dojo.provide("dojo.nls.colors");dojo.nls.colors._built=true;dojo.provide("dojo.nls.colors.en");dojo.nls.colors.en={lightsteelblue:"light steel blue",orangered:"orange red",midnightblue:"midnight blue",cadetblue:"cadet blue",seashell:"seashell",slategrey:"slate gray",coral:"coral",darkturquoise:"dark turquoise",antiquewhite:"antique white",mediumspringgreen:"medium spring green",salmon:"salmon",darkgrey:"dark gray",ivory:"ivory",greenyellow:"green-yellow",mistyrose:"misty rose",lightsalmon:"light salmon",silver:"silver",dimgrey:"dim gray",orange:"orange",white:"white",navajowhite:"navajo white",royalblue:"royal blue",deeppink:"deep pink",lime:"lime",oldlace:"old lace",chartreuse:"chartreuse",darkcyan:"dark cyan",yellow:"yellow",linen:"linen",olive:"olive",gold:"gold",lawngreen:"lawn green",lightyellow:"light yellow",tan:"tan",darkviolet:"dark violet",lightslategrey:"light slate gray",grey:"gray",darkkhaki:"dark khaki",green:"green",deepskyblue:"deep sky blue",aqua:"aqua",sienna:"sienna",mintcream:"mint cream",rosybrown:"rosy brown",mediumslateblue:"medium slate blue",magenta:"magenta",lightseagreen:"light sea green",cyan:"cyan",olivedrab:"olive drab",darkgoldenrod:"dark goldenrod",slateblue:"slate blue",mediumaquamarine:"medium aquamarine",lavender:"lavender",mediumseagreen:"medium sea green",maroon:"maroon",darkslategray:"dark slate gray",mediumturquoise:"medium turquoise",ghostwhite:"ghost white",darkblue:"dark blue",mediumvioletred:"medium violet-red",brown:"brown",lightgray:"light gray",sandybrown:"sandy brown",pink:"pink",firebrick:"fire brick",indigo:"indigo",snow:"snow",darkorchid:"dark orchid",turquoise:"turquoise",chocolate:"chocolate",springgreen:"spring green",moccasin:"moccasin",navy:"navy",lemonchiffon:"lemon chiffon",teal:"teal",floralwhite:"floral white",cornflowerblue:"cornflower blue",paleturquoise:"pale turquoise",purple:"purple",gainsboro:"gainsboro",plum:"plum",red:"red",blue:"blue",forestgreen:"forest green",darkgreen:"dark green",honeydew:"honeydew",darkseagreen:"dark sea green",lightcoral:"light coral",palevioletred:"pale violet-red",mediumpurple:"medium purple",saddlebrown:"saddle brown",darkmagenta:"dark magenta",thistle:"thistle",whitesmoke:"white smoke",wheat:"wheat",violet:"violet",lightskyblue:"light sky blue",goldenrod:"goldenrod",mediumblue:"medium blue",skyblue:"sky blue",crimson:"crimson",darksalmon:"dark salmon",darkred:"dark red",darkslategrey:"dark slate gray",peru:"peru",lightgrey:"light gray",lightgoldenrodyellow:"light goldenrod yellow",blanchedalmond:"blanched almond",aliceblue:"alice blue",bisque:"bisque",slategray:"slate gray",palegoldenrod:"pale goldenrod",darkorange:"dark orange",aquamarine:"aquamarine",lightgreen:"light green",burlywood:"burlywood",dodgerblue:"dodger blue",darkgray:"dark gray",lightcyan:"light cyan",powderblue:"powder blue",blueviolet:"blue-violet",orchid:"orchid",dimgray:"dim gray",beige:"beige",fuchsia:"fuchsia",lavenderblush:"lavender blush",hotpink:"hot pink",steelblue:"steel blue",tomato:"tomato",lightpink:"light pink",limegreen:"lime green",indianred:"indian red",papayawhip:"papaya whip",lightslategray:"light slate gray",gray:"gray",mediumorchid:"medium orchid",cornsilk:"cornsilk",black:"black",seagreen:"sea green",darkslateblue:"dark slate blue",khaki:"khaki",lightblue:"light blue",palegreen:"pale green",azure:"azure",peachpuff:"peach puff",darkolivegreen:"dark olive green",yellowgreen:"yellow green"};dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.en");dijit.nls.loading.en={loadingState:"Loading...",errorState:"Sorry, an error occurred"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.en");dijit.nls.common.en={buttonOk:"OK",buttonCancel:"Cancel",buttonSave:"Save",itemClose:"Close"};dojo.provide("dijit.form.nls.Textarea");dijit.form.nls.Textarea._built=true;dojo.provide("dijit.form.nls.Textarea.en");dijit.form.nls.Textarea.en={iframeEditTitle:"edit area",iframeFocusTitle:"edit area frame"};dojo.provide("dijit._editor.nls.commands");dijit._editor.nls.commands._built=true;dojo.provide("dijit._editor.nls.commands.en");dijit._editor.nls.commands.en={removeFormat:"Remove Format",copy:"Copy",paste:"Paste",selectAll:"Select All",insertOrderedList:"Numbered List",insertTable:"Insert/Edit Table",underline:"Underline",foreColor:"Foreground Color",htmlToggle:"HTML Source",formatBlock:"Paragraph Style",insertHorizontalRule:"Horizontal Rule","delete":"Delete",appleKey:"⌘${0}",insertUnorderedList:"Bullet List",tableProp:"Table Property",insertImage:"Insert Image",superscript:"Superscript",subscript:"Subscript",createLink:"Create Link",undo:"Undo",italic:"Italic",fontName:"Font Name",justifyLeft:"Align Left",unlink:"Remove Link",toggleTableBorder:"Toggle Table Border",ctrlKey:"ctrl+${0}",fontSize:"Font Size",systemShortcut:'The "${0}" action is only available in your browser using a keyboard shortcut. Use ${1}.',indent:"Indent",redo:"Redo",strikethrough:"Strikethrough",justifyFull:"Justify",justifyCenter:"Align Center",hiliteColor:"Background Color",deleteTable:"Delete Table",outdent:"Outdent",cut:"Cut",plainFormatBlock:"Paragraph Style",toggleDir:"Toggle Direction",bold:"Bold",tabIndent:"Tab Indent",justifyRight:"Align Right"};dojo.provide("dojo.cldr.nls.number");dojo.cldr.nls.number._built=true;dojo.provide("dojo.cldr.nls.number.en");dojo.cldr.nls.number.en={group:",",percentSign:"%",exponential:"E",percentFormat:"#,##0%",scientificFormat:"#E0",list:";",infinity:"∞",patternDigit:"#",minusSign:"-",decimal:".",nan:"NaN",nativeZeroDigit:"0",perMille:"‰",decimalFormat:"#,##0.###",currencyFormat:"¤#,##0.00;(¤#,##0.00)",plusSign:"+","currencySpacing-afterCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","currencySpacing-afterCurrency-insertBetween":" ","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]","currencySpacing-beforeCurrency-insertBetween":" "};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.en");dijit.nls.common.en={buttonOk:"OK",buttonCancel:"Cancel",buttonSave:"Save",itemClose:"Close"};dojo.provide("dijit.form.nls.validate");dijit.form.nls.validate._built=true;dojo.provide("dijit.form.nls.validate.en");dijit.form.nls.validate.en={rangeMessage:"This value is out of range.",invalidMessage:"The value entered is not valid.",missingMessage:"This value is required."};dojo.provide("dijit.form.nls.ComboBox");dijit.form.nls.ComboBox._built=true;dojo.provide("dijit.form.nls.ComboBox.en");dijit.form.nls.ComboBox.en={previousMessage:"Previous choices",nextMessage:"More choices"};dojo.provide("dojo.cldr.nls.currency");dojo.cldr.nls.currency._built=true;dojo.provide("dojo.cldr.nls.currency.en");dojo.cldr.nls.currency.en={HKD_displayName:"Hong Kong Dollar",CHF_displayName:"Swiss Franc",CHF_symbol:"Fr.",JPY_symbol:"¥",HKD_symbol:"HK$",CAD_displayName:"Canadian Dollar",CNY_displayName:"Chinese Yuan Renminbi",USD_symbol:"$",AUD_displayName:"Australian Dollar",JPY_displayName:"Japanese Yen",CAD_symbol:"CA$",USD_displayName:"US Dollar",CNY_symbol:"RMB",GBP_displayName:"British Pound Sterling",GBP_symbol:"£",AUD_symbol:"A$",EUR_displayName:"Euro",EUR_symbol:"€"};dojo.provide("dojo.cldr.nls.gregorian");dojo.cldr.nls.gregorian._built=true;dojo.provide("dojo.cldr.nls.gregorian.en");dojo.cldr.nls.gregorian.en={"dateFormatItem-yM":"M/yyyy","field-dayperiod":"AM/PM","dateFormatItem-yQ":"Q yyyy","field-minute":"Minute",eraNames:["Before Christ","Anno Domini"],"dateFormatItem-MMMEd":"E, MMM d","field-weekday":"Day of the Week","dateFormatItem-yQQQ":"QQQ yyyy","days-standAlone-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dateFormatItem-MMM":"LLL","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"field-era":"Era","field-hour":"Hour","dateFormatItem-y":"yyyy","timeFormat-full":"h:mm:ss a v","months-standAlone-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dateFormatItem-yMMM":"MMM yyyy","days-standAlone-narrow":["S","M","T","W","T","F","S"],eraAbbr:["BC","AD"],"dateFormat-long":"MMMM d, yyyy","timeFormat-medium":"h:mm:ss a","field-zone":"Zone","dateFormatItem-Hm":"HH:mm","dateFormat-medium":"MMM d, yyyy","dateFormatItem-Hms":"HH:mm:ss","quarters-standAlone-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],dateTimeFormat:"{1} {0}","dateFormatItem-yMMMM":"MMMM yyyy","dateFormatItem-ms":"mm:ss","field-year":"Year","quarters-standAlone-narrow":["1","2","3","4"],"months-standAlone-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"field-week":"Week","dateFormatItem-MMMMEd":"E, MMMM d","dateFormatItem-MMMd":"MMM d","timeFormat-long":"h:mm:ss a z","months-format-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"timeFormat-short":"h:mm a","field-month":"Month","dateFormatItem-MMMMd":"MMMM d","quarters-format-abbr":["Q1","Q2","Q3","Q4"],"days-format-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],pm:"PM","dateFormatItem-M":"L","days-format-narrow":["S","M","T","W","T","F","S"],"field-second":"Second","field-day":"Day","dateFormatItem-MEd":"E, M/d","months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-hm":"h:mm a",am:"AM","days-standAlone-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dateFormat-short":"M/d/yy","dateFormatItem-yMMMEd":"EEE, MMM d, yyyy","dateFormat-full":"EEEE, MMMM d, yyyy","dateFormatItem-Md":"M/d","dateFormatItem-yMEd":"EEE, M/d/yyyy","months-format-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"dateFormatItem-d":"d","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"days-format-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],eraNarrow:["B","A"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dateTimeFormats-appendItem-Era":"{0} {1}",patternChars:"GyMdkHmsSEDFwWahKzYeugAZvcL","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"quarters-format-narrow":["1","2","3","4"],"dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateTimeFormats-appendItem-Timezone":"{0} {1}"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.en");dijit.nls.common.en={buttonOk:"OK",buttonCancel:"Cancel",buttonSave:"Save",itemClose:"Close"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.en");dijit.nls.common.en={buttonOk:"OK",buttonCancel:"Cancel",buttonSave:"Save",itemClose:"Close"};dojo.provide("dijit.nls.common");dijit.nls.common._built=true;dojo.provide("dijit.nls.common.en");dijit.nls.common.en={buttonOk:"OK",buttonCancel:"Cancel",buttonSave:"Save",itemClose:"Close"};if(typeof(fw)=="undefined"){fw={}}fw.browser=(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})();fw.core={};fw.core.getElementsByTagNameNS=function(d,b){var a=null;if(fw.browser.Gecko){b=d+":"+b;a=document.getElementsByTagNameNS(null,b)}else{if(fw.browser.WebKit){b=d+":"+b;a=document.getElementsByTagName(b)}else{if(fw.browser.IE){var c=document.namespaces;if(c&&c[d]!=undefined){a=document.getElementsByTagName(b)}else{a=document.getElementsByTagName(b);if(a&&a.length>0){return a}b=d+":"+b;a=document.getElementsByTagName(b)}}else{b=d+":"+b;a=document.getElementsByTagName(b)}}}return a};fw.core.features={};fw.cos={};fw.core.addFeature=function(a,b){fw.core.features[a]=b};fw.core.getFeature=function(a){return fw.core.features[a]};fw.core.Feature=function(b,a){this.featureID=b;this.entryPoint=a};fw.core.Feature.prototype={getID:function(){return this.featureID},process:function(){this.entryPoint()}};if(typeof(fw)=="undefined"){fw={}}fw.xd={};fw.xd.Utils={};fw.xd.browser=(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})();fw.xd.Utils.log=function(a){if(typeof console!=="undefined"&&typeof console.debug!=="undefined"){if(typeof a=="string"){console.debug("fw_xd:log - "+a+"\n")}else{console.debug(a)}}};fw.xd.hashWatcherID=0;fw.xd.setHashWatcher=function(a){this.hwf=a};fw.xd.startHashWatcher=function(){if(typeof(this.hwf)!="undefind"){if(fw.xd.watcherStarted()){fw.xd.stopHashWatcher()}fw.xd._setHashWatcher(this.hwf)}};fw.xd.watcherStarted=function(){return fw.xd.hashWatcherID!=0};fw.xd.stopHashWatcher=function(){clearInterval(fw.xd.hashWatcherID);fw.xd.hashWatcherID=0;if((typeof this.handler!="undefined")&&(null!=this.handler)){fw.xd.removeEvent(window,"hashchange",this.handler);this.handler=null}};fw.xd.addEvent=function(c,a,d){var b=function(e){e=e||window.event;d()};if(c.addEventListener){c.addEventListener(a,b,false)}else{if(c.attachEvent){c.attachEvent("on"+a,b)}else{c["on"+a]=b}}return b};fw.xd.removeEvent=function(c,a,b){if(c.removeEventListener){c.removeEventListener(a,b,false)}else{if(c.detachEvent){c.detachEvent("on"+a,b)}else{c["on"+a]=null}}};fw.xd._setHashWatcher=function(a){var b=this;fw.xd.Utils.log(b);fw.xd.Utils.log("setting hash watcher...");var c=document.documentMode;var d=fw.xd.browser.IE&&(c===undefined||c<8);if("onhashchange" in window&&!d){fw.xd.Utils.log("setting hash watcher: onhashchange is supported...");if((typeof this.handler!="undefined")&&(null!=this.handler)){fw.xd.removeEvent(window,"hashchange",this.handler);this.handler=null}this.handler=fw.xd.addEvent(window,"hashchange",a)}else{fw.xd.Utils.log("setting hash watcher: watch event is NOT supported!...");if(typeof b.hash=="undefined"){b.hash=window.location.hash}fw.xd.Utils.log("setting interval function...");fw.xd.hashWatcherID=setInterval(function(){if(b.hash!==window.location.hash){fw.xd.Utils.log("hash changed, invoking handler... for value : '"+window.location.hash+"'");var e=window.location.hash;if(window.location.hash.indexOf("#")==0){e=window.location.hash.substring(1)}if(e!=""){fw.xd.Utils.log("hash changed, invoking handler... 2 for value : '"+window.location.hash+"'");b.hash=window.location.hash;a()}}},500)}};if(typeof(wem)=="undefined"){wem={}}if(typeof(wem.sso)=="undefined"){wem.sso={}}if(typeof(wem.callbacks)=="undefined"){wem.callbacks={}}wem.browser=(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(b)}})();wem.getElementsByTagNameNS=function(d,b){var a=null;if(wem.browser.Gecko){b=d+":"+b;a=document.getElementsByTagNameNS(null,b)}else{if(wem.browser.WebKit){b=d+":"+b;a=document.getElementsByTagName(b)}else{if(wem.browser.IE){var c=document.namespaces;if(c&&c[d]!=undefined){a=document.getElementsByTagName(b)}else{a=document.getElementsByTagName(b);if(a&&a.length>0){return a}b=d+":"+b;a=document.getElementsByTagName(b)}}else{b=d+":"+b;a=document.getElementsByTagName(b)}}}return a};wem.sso.Gen={};wem.sso.auth={};wem.sso.Utils={};wem.sso.desc={};wem.sso.Descriptor=function(a,b,d,c){this.tagElem=a;this.featuresUrl=b;this.width=d;this.height=c};wem.sso.$=function(a){return document.getElementById(a)};wem.sso.auth.SigninListener=function(){};wem.sso.auth.setSigninListener=function(a){wem.sso.auth.SigninListener=a};wem.sso.auth.SignInEvent=function(a){this.userID=a};wem.sso.auth.SignInEvent.prototype={getUserID:function(){return this.userID}};wem.sso.auth.buildEvent=function(a){return new wem.sso.auth.SignInEvent(a)};wem.sso.auth.signinCompleted=function(a){if(wem.sso.auth.SigninListener){wem.sso.Utils.log("invoking signin event listener");wem.sso.auth.SigninListener(a)}else{wem.sso.Utils.log("User didn't specify correct event function")}if(null!=wem.sso.$("signinform")){wem.sso.$("signinform").style.display="none"}};wem.sso.auth.signinClicked=function(){wem.sso.Utils.log("signin click event received");var a=wem.sso.desc;wem.sso.Gen.includeForm(a.featuresUrl,a.width,a.height)};wem.sso.auth.startSignin=function(e,f,c,a){var d=null;if(typeof(e)=="string"){d=document.getElementById(e)}else{d=e}var b=document.createElement("div");d.appendChild(b);b.setAttribute("id","signinform");b.style.textAlign="center";wem.sso.Gen.includeForm(f,c,a)};wem.sso.auth.cancelSignin=function(b){var a=document.getElementById(b);a.innerHTML=""};wem.sso.Gen.includeSinginButton=function(){wem.sso.Utils.log("generating signin button on the page");var a=document.createElement("div");a.setAttribute("id","signinform");tagParent=wem.sso.desc.tagElem.parentNode;tagParent.insertBefore(a,wem.sso.desc.tagElem);a.innerHTML+='<a href="javascript:void(0);" onclick="wem.sso.auth.signinClicked();"><img src="'+wem.sso.desc.featuresUrl+'/images/wem_signin.gif" border="0"/></a>'};wem.sso.hashChanged=function(){wem.sso.Utils.log("handling hash change and discovering sso events");var c=window.location.hash;wem.sso.Utils.log(c);if(c.indexOf("cosUserId")==1){fw.xd.stopHashWatcher();window.location.hash="";var a=c.substr(c.indexOf("=")+1);a=unescape(a);var b=wem.sso.auth.buildEvent(a);wem.sso.Utils.log("CAS signin finished. event discovered in hash for user #"+a+" event="+b);wem.sso.auth.signinCompleted(b)}else{if(c.indexOf("cosUserSignout")==1){wem.sso.Utils.log("CAS signout finished, stopping watcher...");fw.xd.stopHashWatcher();window.location.hash="";wem.sso.Utils.log("CAS signout finished, ivoking callabck...");wem.callbacks.signoutCallback()}}};wem.sso.Gen.onload=function(){wem.sso.Utils.log("login form onload event received");if(typeof wem.sso.Gen.iframeExtend=="undefined"||!wem.sso.Gen.iframeExtend){wem.sso.Utils.log("login form will be expanded on next load");wem.sso.Gen.iframeExtend=true}else{if(wem.sso.Gen.currentHeight==wem.sso.Gen.initialHeight){var b=parseInt(wem.sso.Gen.currentHeight)+60;wem.sso.Utils.log("login form height will be increased to "+b);var a=wem.sso.$("signinform");if((null!=a)&&(a.childNodes.length>0)){var c=a.childNodes[0];c.height=b}wem.sso.Gen.currentHeight=b}}};wem.sso.Gen.includeForm=function(b,e,a){fw.xd.setHashWatcher(wem.sso.hashChanged);fw.xd.startHashWatcher();wem.sso.Gen.iframeExtend=false;wem.sso.Gen.currentHeight=a;wem.sso.Gen.initialHeight=a;var d=wem.sso.$("signinform");var c="";if(e){c+=" width='"+e+"px' "}if(a){c+=" height='"+a+"px' "}d.innerHTML="<iframe style='border-bottom-style: none; overflow-x: hidden; overflow-y: hidden; border-right-style: none; background-color: transparent; border-top-style: none; border-left-style: none;' id='lf' frameborder='0' scrolling='no' allowtransparency='true' "+c+" src='"+b+"/sso/login.jsp?gateway=false&pageUrl="+encodeURIComponent(window.location.href)+"'  onload='wem.sso.Gen.onload()' ></iframe>";return d};wem.sso.Utils.log=function(a){if(typeof console!=="undefined"&&typeof console.debug!=="undefined"){if(typeof a=="string"){console.debug("wem:sso - "+a+"\n")}else{console.debug(a)}}};wem.sso.run=function(){wem.sso.Utils.log("discovering tags");var b=wem.getElementsByTagNameNS("wem","signin");var f=new Array();var e,c;for(c=0;c<b.length;c++){e=b[c];var d=e.getAttribute("width");if(!d){d="305"}var a=e.getAttribute("height");if(!a){a="240"}wem.sso.Utils.log("found tag <wem:signin "+ +" featuresUrl='"+e.getAttribute("featuresUrl")+"' width='"+d+"' height='"+a+"'/>");wem.sso.desc=new wem.sso.Descriptor(e,e.getAttribute("featuresUrl"),d,a);wem.sso.Gen.includeSinginButton()}};wem.callbacks.signinCallback=function(b){var a=wem.sso.Utils.getURLParam(b,"userid");var c=wem.sso.auth.buildEvent(a);wem.sso.Utils.log("CAS signin finished. callback received by feature for "+a+" event="+c);wem.sso.auth.signinCompleted(c)};wem.sso.Utils.getURLParam=function(d,e){var c="";if(d.indexOf("?")>-1){var b=d.substr(d.indexOf("?")).toLowerCase();var f=b.split("&");for(var a=0;a<f.length;a++){if(f[a].indexOf(e.toLowerCase()+"=")>-1){var g=f[a].split("=");c=g[1];break}}}return unescape(c)};if(typeof(fw)!="undefined"&&fw.core){var loginFeature=new fw.core.Feature("wem:signin",wem.sso.run);loginFeature.setSigninListener=wem.sso.auth.setSigninListener;fw.core.addFeature(loginFeature.featureID,loginFeature)}wem.sso.signout={};wem.sso.signout.Gen={};wem.sso.signout.conf={};wem.sso.signout.conf.logoutURL="http://us.sunpowercorp.com:9001/cas/logout";wem.callbacks.signoutCallback=function(){wem.sso.signout.signoutCompleted()};wem.sso.signout.signoutListener=function(){};wem.sso.signout.setSignoutListener=function(a){wem.sso.signout.signoutListener=a};wem.sso.signout.signoutCompleted=function(){wem.sso.signout.signoutListener()};wem.sso.signout.Gen.includeLink=function(c){var a=wem.sso.signout.conf.logoutURL;if(c.getAttribute("redirect")){a+="?url="+c.getAttribute("redirect")}var b=document.createElement("div");b.setAttribute("id","signoutlink");tagParent=c.parentNode;tagParent.insertBefore(b,c);b.innerHTML+='<a class="signoutlink" href="'+a+'" >signout</a>'};wem.sso.signout.process=function(){var a=wem.getElementsByTagNameNS("wem","signout");for(var b=0;b<a.length;b++){wem.sso.signout.Gen.includeLink(a[b])}};wem.sso.signout.doSignout=function(){fw.xd.setHashWatcher(wem.sso.hashChanged);fw.xd.startHashWatcher();var a;a=document.createElement("iframe");a.name=a.id="msgsender";a.src=wem.sso.signout.conf.logoutURL+"?parent_url="+encodeURIComponent(window.location.href);a.style.display="none";document.body.appendChild(a)};if(typeof(fw)!="undefined"&&fw.core){var signoutFeature=new fw.core.Feature("wem:signout",wem.sso.signout.process);signoutFeature.signoutHandler=wem.sso.signout.doSignout;signoutFeature.setSignoutListener=wem.sso.signout.setSignoutListener;fw.core.addFeature(signoutFeature.featureID,signoutFeature)}wem.sso.run();if(!cos){cos={}}cos.messages=function(){this.cName="UNKNOWN_CLASS";this.language="en"};cos.messages.prototype.get=function(){var b=this[arguments[0]];if(b){if(arguments.length>1){for(var a=1;a<arguments.length;a++){var d="\\("+a+"\\)";var c=new RegExp(d,"g");b=b.replace(c,arguments[a])}}}else{b=this.cName+"."+arguments[0]}return b};if(!cos.commons){cos.commons={}}cos.commons.messages=new cos.messages();cos.commons.messages.cName="cos.commons.messages";cos.commons.messages["format.date_formater"]="MMM d EE, y hh:mm a";cos.commons.messages["month.january.full"]="January";cos.commons.messages["month.february.full"]="February";cos.commons.messages["month.march.full"]="March";cos.commons.messages["month.april.full"]="April";cos.commons.messages["month.may.full"]="May";cos.commons.messages["month.june.full"]="June";cos.commons.messages["month.july.full"]="July";cos.commons.messages["month.august.full"]="August";cos.commons.messages["month.september.full"]="September";cos.commons.messages["month.october.full"]="October";cos.commons.messages["month.november.full"]="November";cos.commons.messages["month.december.full"]="December";cos.commons.messages["month.january.short"]="Jan";cos.commons.messages["month.february.short"]="Feb";cos.commons.messages["month.march.short"]="Mar";cos.commons.messages["month.april.short"]="Apr";cos.commons.messages["month.may.short"]="May";cos.commons.messages["month.june.short"]="Jun";cos.commons.messages["month.july.short"]="Jul";cos.commons.messages["month.august.short"]="Aug";cos.commons.messages["month.september.short"]="Sep";cos.commons.messages["month.october.short"]="Oct";cos.commons.messages["month.november.short"]="Nov";cos.commons.messages["month.december.short"]="Dec";cos.commons.messages["day.sunday.full"]="Sunday";cos.commons.messages["day.monday.full"]="Monday";cos.commons.messages["day.tuesday.full"]="Tuesday";cos.commons.messages["day.wednesday.full"]="Wednesday";cos.commons.messages["day.thursday.full"]="Thursday";cos.commons.messages["day.friday.full"]="Friday";cos.commons.messages["day.saturday.full"]="Saturday";cos.commons.messages["day.sunday.short"]="Sun";cos.commons.messages["day.monday.short"]="Mon";cos.commons.messages["day.tuesday.short"]="Tue";cos.commons.messages["day.wednesday.short"]="Wed";cos.commons.messages["day.thursday.short"]="Thu";cos.commons.messages["day.friday.short"]="Fri";cos.commons.messages["day.saturday.short"]="Sat";if(!cos.comments){cos.comments={}}cos.comments.messages=new cos.messages();cos.comments.messages.cName="cos.comments.messages";cos.comments.messages.language="en";cos.comments.messages["label.post_a_comment"]="Post a Comment";cos.comments.messages["label.post_reply"]="Post Reply";cos.comments.messages["label.name"]="Name";cos.comments.messages["label.email"]="Email";cos.comments.messages["label.comment"]="Comment";cos.comments.messages["label.captcha"]="Verification Code";cos.comments.messages["label.comments"]="Comments";cos.comments.messages["label.expand"]="Expand";cos.comments.messages["label.collapse"]="Collapse";cos.comments.messages["label.sort_by"]="Sort by";cos.comments.messages["label.sort_by_desc"]="Newest at the top";cos.comments.messages["label.sort_by_asc"]="Oldest at the top";cos.comments.messages["label.page"]="Page";cos.comments.messages["label.replies"]="Replies";cos.comments.messages["label.delete"]="Delete";cos.comments.messages["label.close"]="Close";cos.comments.messages["label.flag_content"]="Flag Content";cos.comments.messages["label.logged_in_as"]="LOGGED IN AS:";cos.comments.messages["link.expand_all"]="Expand All";cos.comments.messages["link.collapse_all"]="Collapse All";cos.comments.messages["link.edit"]="Edit";cos.comments.messages["link.reply"]="Reply";cos.comments.messages["link.delete"]="Delete";cos.comments.messages["link.flag"]="Flag";cos.comments.messages["link.no"]="No";cos.comments.messages["link.cancel"]="Cancel";cos.comments.messages["link.login"]="Login";cos.comments.messages["link.logout"]="Logout";cos.comments.messages["link.register"]="Register";cos.comments.messages["link.post_as_guest"]="Post as Guest";cos.comments.messages["link.forgot_password"]="Forgot password?";cos.comments.messages["link.edit_profile"]="Edit profile";cos.comments.messages["message.no_comments"]="There are currently no comments. Be the first to submit a comment.";cos.comments.messages["message.loading_comments"]="Loading comments ...";cos.comments.messages["message.comment_body_required"]="Comment body is required.";cos.comments.messages["message.user_name_required"]="User name is required.";cos.comments.messages["message.email_required"]="Email is required.";cos.comments.messages["message.comment_required"]="Comment is required";cos.comments.messages["message.moderated_discussion"]="This is a moderated discussion. Your comment will be visible on the website once approved.";cos.comments.messages["message.comment_is_deleted"]="Comment is being deleted. Please wait...";cos.comments.messages["message.comment_is_saved"]="Comment is being saved. Please wait...";cos.comments.messages["message.reply_is_saved"]="Reply is being saved. Please wait...";cos.comments.messages["message.comment_is_flagged"]="Comment is being flagged. Please wait...";cos.comments.messages["message.want_to_delete"]="Are you sure you want to delete this comment?";cos.comments.messages["message.saving"]="Saving ...";cos.comments.messages["message.posting"]="Posting ...";cos.comments.messages["message.report_content"]="Report this content to a moderator.";cos.comments.messages["message.empty_reply"]="The reply text cannot be empty.";cos.comments.messages["message.email_name_policy"]="Your e-mail will never be displayed or shared with third parties. Your name will be displayed with your comment.";cos.comments.messages["message.login_or_register"]="Log in to post comments. Don't have an account? Please register.";cos.comments.messages["message.info"]="Info!";cos.comments.messages["message.thank_for_submission"]="Thank you for your submission!";cos.comments.messages["error.email_invalid"]="Invalid Email.";cos.comments.messages["error.long_comment_body"]="The comment body is too long. The size limit is (1) characters.";cos.comments.messages["error.failed_render_comments"]="Failed to render comments. Reason: (1).";cos.comments.messages["error.failed_load_comments"]="Failed to load comments.";cos.comments.messages["error.failed_post_comment"]="Failed to post a comment.";cos.comments.messages["error.cos_unavailable"]="Community Server is currently unavailable. Please contact your system administrator.";if(!cos.user_service){cos.user_service={}}cos.user_service.messages=new cos.messages();cos.user_service.messages.cName="cos.user_service.messages";cos.user_service.messages.language="en";cos.user_service.messages["label.register"]="Register";cos.user_service.messages["label.username"]="Username";cos.user_service.messages["label.password"]="Password";cos.user_service.messages["label.confirm_password"]="Confirm Password";cos.user_service.messages["label.email"]="Email";cos.user_service.messages["label.display_name"]="Display Name";cos.user_service.messages["label.verification_code"]="Verification Code";cos.user_service.messages["label.forgot_password"]="Forgot password?";cos.user_service.messages["label.edit_profile"]="Edit your profile";cos.user_service.messages["label.profile_photo"]="Profile Photo";cos.user_service.messages["link.login_here"]="Login here";cos.user_service.messages["link.cancel"]="Cancel";cos.user_service.messages["message.please_login"]="Please log in with your new username and password.";cos.user_service.messages["message.register"]="Register and become an active member of our community.";cos.user_service.messages["message.already_registered"]="Already registered?";cos.user_service.messages["message.new_password_sent"]="A new password has been sent. Please use this password to log in to your account.";cos.user_service.messages["message.enter_username_email"]="Enter your username and email.";cos.user_service.messages["message.new_password_will_sent"]="A new password will be sent to the email you provide.";cos.user_service.messages["message.edit_personal_information"]="Edit your personal information, password, and avatar.";cos.user_service.messages["error.enter_username"]="Enter a username";cos.user_service.messages["error.username_invalid"]="Username contains invalid characters";cos.user_service.messages["error.enter_password"]="Enter a password";cos.user_service.messages["error.password_invalid"]="Password contains invalid characters";cos.user_service.messages["error.long_password"]="Password must be less than 50 symbols";cos.user_service.messages["error.confirm_password"]="Confirm password";cos.user_service.messages["error.enter_email"]="Enter an email";cos.user_service.messages["error.enter_displayname"]="Enter a display name";cos.user_service.messages["error.enter_captcha"]="Enter the above value";cos.user_service.messages["error.password_not_match"]="Passwords do not match";cos.user_service.messages["error.email_invalid"]="Enter a valid email";cos.user_service.messages["error.form_submitted"]=" Please wait, the form is being submitted.";cos.user_service.messages["error.not_implemented"]="Not implemented";var cos=cos||{};cos.net={};cos.global=this;cos.log=function(a,b){if(b<=cos.log.level){if(typeof console!=="undefined"){console.log("cos_base: - "+a+"\n")}}};cos.info=function(a){cos.log(a,cos.INFO)};cos.debug=function(a){cos.log(a,cos.DEBUG)};cos.DEBUG=2;cos.INFO=1;cos.MAX_SINGLE_URL_LENGTH=400;cos.log.level=cos.DEBUG;cos.browser=(function(){var c=navigator.userAgent;var a=navigator.appVersion;var b=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!b,IE7:(a.indexOf("MSIE 7.")==-1)?false:true,IE8:((a.indexOf("MSIE 8.")==-1)?false:true)&&(document.documentMode===undefined||document.documentMode==8),Opera:b,WebKit:c.indexOf("AppleWebKit/")>-1,Gecko:c.indexOf("Gecko")>-1&&c.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile.*Safari/.test(c)}})();cos.provide=function(b){cos.debug("cos.provide: creating "+b+"");var a=b.split(".");var e="";if(cos.global.execScript){cos.global.execScript("var "+a[0])}var c=cos.global;for(var d;a.length&&(d=a.shift());){if(c[d]){c=c[d]}else{c=c[d]={}}}return c};cos.inherits=function(b,a){function c(){}c.prototype=a.prototype;b.superClass_=a.prototype;b.prototype=new c();b.prototype.constructor=b};cos.isArray=function(a){return a.constructor==Array};cos.net.Jsonp=function(a){cos.debug("cos.net.Jsonp: created for url = "+a);this._url=a;this._callbackName="cosrestcallback";this._timeout=30000};cos.net.CALLBACKS="_cos_callbacks_";cos.net.PS_VARAIBLES="_cos_pa_varaibles_";cos.net.callbackCounter=0;cos.net.Jsonp.prototype={setUrl:function(a){this._url=a},setCallbackName:function(a){this._callbackName=a},setTimeout:function(a){this._timeout=a},_escape:function(a){return encodeURIComponent(a)},_createCallbackFunc:function(b,a,c){return function(e){try{cos.debug("cos.net.Jsonp.callaback(): invoking handler... ");if(null!=c._timer){clearTimeout(c._timer);c._timer=null}a.call(b,e)}catch(d){cos.debug("cos.net.Jsonp.callaback() error:"+d)}}},_createCallbackFailureFunc:function(a,b){return function(){try{cos.debug("cos.net.Jsonp.callbackFailureFunc(): invoking handler... ");b.call(a)}catch(c){cos.debug("cos.net.Jsonp.callbackFailureFunc() error:"+c)}}},send:function(f,a,j,g){if(!cos.global[cos.net.CALLBACKS]){cos.global[cos.net.CALLBACKS]={}}var d="";if(typeof f=="undefined"||null==f){f={}}if(f){f.r=Math.random();for(var h in f){if(f.hasOwnProperty(h)){var e=f[h];d+="&"+h+"="+this._escape(e)}}}if(!(cos.browser.IE&&(d.length>=cos.MAX_SINGLE_URL_LENGTH))){var k={_timer:null};var c=this._createCallbackFailureFunc(a,g);k._timer=setTimeout(c,this._timeout);var b="_callback_"+cos.net.callbackCounter++;var o=cos.net.CALLBACKS+"."+b;var p=this._createCallbackFunc(a,j,k);cos.global[cos.net.CALLBACKS][b]=p;cos.debug("cos.net.Jsonp.send(): sending "+d);var m=document.createElement("script");m.type="text/javascript";m.id=b;m.charset="UTF-8";m.src=this._url+"?"+this._callbackName+"="+o+d;var l=document.getElementsByTagName("head")[0];l.appendChild(m)}else{this.partialSend(this._url,d,a,j,g)}},partialSend:function(a,f,b,l,j){if(!cos.global[cos.net.PS_VARAIBLES]){cos.global[cos.net.PS_VARAIBLES]={}}var o=new Array();var h=0;while(f.length>h*cos.MAX_SINGLE_URL_LENGTH){var g=(h+1)*cos.MAX_SINGLE_URL_LENGTH;if(f.length<g){g=f.length}o.push(this._escape(f.substring(h*cos.MAX_SINGLE_URL_LENGTH,g)));h++}var m={_timer:null};var e=this._createCallbackFailureFunc(b,j);m._timer=setTimeout(e,this._timeout);var d="_callback_"+cos.net.callbackCounter++;var p=cos.net.CALLBACKS+"."+d;var k=""+Math.random();cos.global[cos.net.PS_VARAIBLES][k]={self:this,callbackObj:b,callbackSuccessFunc:l,callbackFailureFunc:j,destUrl:a,submitParts:o,callbackName:this._callbackName};var q=this._createPartialSendCallbackFunc(b,l,m,k);cos.global[cos.net.CALLBACKS][d]=q;var c=this._createPartialSendCallFunc(d,p,0,k);c()},_sendPart:function(b,d){var g={_timer:null};var f=this._createCallbackFailureFunc(cos.global[cos.net.PS_VARAIBLES][d].callbackObj,cos.global[cos.net.PS_VARAIBLES][d].callbackFailureFunc);g._timer=setTimeout(f,this._timeout);var h="_callback_"+cos.net.callbackCounter++;var c=cos.net.CALLBACKS+"."+h;var e=this._createPartialSendCallbackFunc(cos.global[cos.net.PS_VARAIBLES][d].callbackObj,cos.global[cos.net.PS_VARAIBLES][d].callbackSuccessFunc,g,d);cos.global[cos.net.CALLBACKS][h]=e;var a=this._createPartialSendCallFunc(h,c,b,d);a()},_createPartialSendCallbackFunc:function(c,b,d,a){return function(f){try{cos.debug("cos.net.Jsonp.partialSendCall(): invoking handler... ");if(null!=d._timer){clearTimeout(d._timer);d._timer=null}if(typeof(f.submitId)=="undefined"){b.call(c,f)}else{cos.global[cos.net.PS_VARAIBLES][f.submitId].self._sendPart(f.nextPartNo,f.submitId)}}catch(e){cos.debug("cos.net.Jsonp.partialSendCall() error:"+e)}}},_createPartialSendCallFunc:function(d,b,c,a){return function(){try{var e=document.createElement("script");e.type="text/javascript";e.id=d;e.charset="UTF-8";e.src=cos.global[cos.net.PS_VARAIBLES][a].destUrl+"?"+cos.global[cos.net.PS_VARAIBLES][a].callbackName+"="+b+"&submitId="+a+"&partNo="+c+"&r="+Math.random()+"&totalParts="+cos.global[cos.net.PS_VARAIBLES][a].submitParts.length+"&partContent="+cos.global[cos.net.PS_VARAIBLES][a].submitParts[c];var f=document.getElementsByTagName("head")[0];f.appendChild(e)}catch(g){cos.debug("cos.net.Jsonp.callaback() error:"+g)}}}};cos.provide("cos.utils");cos.utils.addScriptTag=function(b){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src",b);(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(a)};cos.utils.addCssTag=function(b){var a=document.createElement("link");a.setAttribute("rel","stylesheet");a.setAttribute("type","text/css");a.setAttribute("href",b);(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(a)};cos.provide("cos.utils.date");cos.utils.date.MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");cos.utils.date.DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");cos.utils.date.LZ=function LZ(a){return(a<0||a>9?"":"0")+a};if(cos.commons&&cos.commons.messages){cos.utils.date.MONTH_NAMES=new Array(cos.commons.messages.get("month.january.full"),cos.commons.messages.get("month.february.full"),cos.commons.messages.get("month.march.full"),cos.commons.messages.get("month.april.full"),cos.commons.messages.get("month.may.full"),cos.commons.messages.get("month.june.full"),cos.commons.messages.get("month.july.full"),cos.commons.messages.get("month.august.full"),cos.commons.messages.get("month.september.full"),cos.commons.messages.get("month.october.full"),cos.commons.messages.get("month.november.full"),cos.commons.messages.get("month.december.full"),cos.commons.messages.get("month.january.short"),cos.commons.messages.get("month.february.short"),cos.commons.messages.get("month.march.short"),cos.commons.messages.get("month.april.short"),cos.commons.messages.get("month.may.short"),cos.commons.messages.get("month.june.short"),cos.commons.messages.get("month.july.short"),cos.commons.messages.get("month.august.short"),cos.commons.messages.get("month.september.short"),cos.commons.messages.get("month.october.short"),cos.commons.messages.get("month.november.short"),cos.commons.messages.get("month.ecember.short"));cos.utils.date.DAY_NAMES=new Array(cos.commons.messages.get("day.sunday.full"),cos.commons.messages.get("day.monday.full"),cos.commons.messages.get("day.tuesday.full"),cos.commons.messages.get("day.wednesday.full"),cos.commons.messages.get("day.thursday.full"),cos.commons.messages.get("day.friday.full"),cos.commons.messages.get("day.saturday.full"),cos.commons.messages.get("day.sunday.short"),cos.commons.messages.get("day.monday.short"),cos.commons.messages.get("day.tuesday.short"),cos.commons.messages.get("day.wednesday.short"),cos.commons.messages.get("day.thursday.short"),cos.commons.messages.get("day.friday.short"),cos.commons.messages.get("day.saturday.short"))}cos.utils.date.isDate=function isDate(c,b){var a=cos.utils.date.getDateFromFormat(c,b);if(a==0){return false}return true};cos.utils.date.compareDates=function compareDates(e,f,c,d){var b=cos.utils.date.getDateFromFormat(e,f);var a=cos.utils.date.getDateFromFormat(c,d);if(b==0||a==0){return -1}else{if(b>a){return 1}}return 0};cos.utils.date.formatDate=function formatDate(L,G){G=G+"";var o="";var x=0;var J="";var f="";var l=L.getYear()+"";var g=L.getMonth()+1;var I=L.getDate();var q=L.getDay();var p=L.getHours();var A=L.getMinutes();var t=L.getSeconds();var v,w,b,u,N,e,F,D,B,r,P,p,O,j,a,C;var z=new Object();if(l.length<4){l=""+(l-0+1900)}z.y=""+l;z.yyyy=l;z.yy=l.substring(2,4);z.M=g;z.MM=cos.utils.date.LZ(g);z.MMM=cos.utils.date.MONTH_NAMES[g-1];z.NNN=cos.utils.date.MONTH_NAMES[g+11];z.d=I;z.dd=cos.utils.date.LZ(I);z.E=cos.utils.date.DAY_NAMES[q+7];z.EE=cos.utils.date.DAY_NAMES[q];z.H=p;z.HH=cos.utils.date.LZ(p);if(p==0){z.h=12}else{if(p>12){z.h=p-12}else{z.h=p}}z.hh=cos.utils.date.LZ(z.h);if(p>11){z.K=p-12}else{z.K=p}z.k=p+1;z.KK=cos.utils.date.LZ(z.K);z.kk=cos.utils.date.LZ(z.k);if(p>11){z.a="PM"}else{z.a="AM"}z.m=A;z.mm=cos.utils.date.LZ(A);z.s=t;z.ss=cos.utils.date.LZ(t);while(x<G.length){J=G.charAt(x);f="";while((G.charAt(x)==J)&&(x<G.length)){f+=G.charAt(x++)}if(z[f]!=null){o=o+z[f]}else{o=o+f}}return o};cos.utils.date._isInteger=function _isInteger(c){var b="1234567890";for(var a=0;a<c.length;a++){if(b.indexOf(c.charAt(a))==-1){return false}}return true};cos.utils.date._getInt=function _getInt(f,d,e,c){for(var a=c;a>=e;a--){var b=f.substring(d,d+a);if(b.length<e){return null}if(cos.utils.date._isInteger(b)){return b}}return null};cos.utils.date.getDateFromFormat=function getDateFromFormat(z,q){z=z+"";q=q+"";var w=0;var l=0;var s="";var f="";var v="";var h,g;var b=new Date();var j=b.getYear();var u=b.getMonth()+1;var t=1;var d=b.getHours();var r=b.getMinutes();var o=b.getSeconds();var k="";while(l<q.length){s=q.charAt(l);f="";while((q.charAt(l)==s)&&(l<q.length)){f+=q.charAt(l++)}if(f=="yyyy"||f=="yy"||f=="y"){if(f=="yyyy"){h=4;g=4}if(f=="yy"){h=2;g=2}if(f=="y"){h=2;g=4}j=cos.utils.date._getInt(z,w,h,g);if(j==null){return 0}w+=j.length;if(j.length==2){if(j>70){j=1900+(j-0)}else{j=2000+(j-0)}}}else{if(f=="MMM"||f=="NNN"){u=0;for(var p=0;p<cos.utils.date.MONTH_NAMES.length;p++){var e=cos.utils.date.MONTH_NAMES[p];if(z.substring(w,w+e.length).toLowerCase()==e.toLowerCase()){if(f=="MMM"||(f=="NNN"&&p>11)){u=p+1;if(u>12){u-=12}w+=e.length;break}}}if((u<1)||(u>12)){return 0}}else{if(f=="EE"||f=="E"){for(var p=0;p<cos.utils.date.DAY_NAMES.length;p++){var m=cos.utils.date.DAY_NAMES[p];if(z.substring(w,w+m.length).toLowerCase()==m.toLowerCase()){w+=m.length;break}}}else{if(f=="MM"||f=="M"){u=cos.utils.date._getInt(z,w,f.length,2);if(u==null||(u<1)||(u>12)){return 0}w+=u.length}else{if(f=="dd"||f=="d"){t=cos.utils.date._getInt(z,w,f.length,2);if(t==null||(t<1)||(t>31)){return 0}w+=t.length}else{if(f=="hh"||f=="h"){d=cos.utils.date._getInt(z,w,f.length,2);if(d==null||(d<1)||(d>12)){return 0}w+=d.length}else{if(f=="HH"||f=="H"){d=cos.utils.date._getInt(z,w,f.length,2);if(d==null||(d<0)||(d>23)){return 0}w+=d.length}else{if(f=="KK"||f=="K"){d=cos.utils.date._getInt(z,w,f.length,2);if(d==null||(d<0)||(d>11)){return 0}w+=d.length}else{if(f=="kk"||f=="k"){d=cos.utils.date._getInt(z,w,f.length,2);if(d==null||(d<1)||(d>24)){return 0}w+=d.length;d--}else{if(f=="mm"||f=="m"){r=cos.utils.date._getInt(z,w,f.length,2);if(r==null||(r<0)||(r>59)){return 0}w+=r.length}else{if(f=="ss"||f=="s"){o=cos.utils.date._getInt(z,w,f.length,2);if(o==null||(o<0)||(o>59)){return 0}w+=o.length}else{if(f=="a"){if(z.substring(w,w+2).toLowerCase()=="am"){k="AM"}else{if(z.substring(w,w+2).toLowerCase()=="pm"){k="PM"}else{return 0}}w+=2}else{if(z.substring(w,w+f.length)!=f){return 0}else{w+=f.length}}}}}}}}}}}}}}if(w!=z.length){return 0}if(u==2){if(((j%4==0)&&(j%100!=0))||(j%400==0)){if(t>29){return 0}}else{if(t>28){return 0}}}if((u==4)||(u==6)||(u==9)||(u==11)){if(t>30){return 0}}if(d<12&&k=="PM"){d=d-0+12}else{if(d>11&&k=="AM"){d-=12}}var a=new Date(j,u-1,t,d,r,o);return a.getTime()};cos.utils.date.parseDate=function parseDate(h){var f=(arguments.length==2)?arguments[1]:false;generalFormats=new Array("y-M-d","MMM d, y","MMM d,y","y-MMM-d","d-MMM-y","MMM d");monthFirst=new Array("M/d/y","M-d-y","M.d.y","MMM-d","M/d","M-d");dateFirst=new Array("d/M/y","d-M-y","d.M.y","d-MMM","d/M","d-M");var b=new Array("generalFormats",f?"dateFirst":"monthFirst",f?"monthFirst":"dateFirst");var g=null;for(var e=0;e<b.length;e++){var a=window[b[e]];for(var c=0;c<a.length;c++){g=cos.utils.date.getDateFromFormat(h,a[c]);if(g!=0){return new Date(g)}}}return null};djConfig.load_wem_scripts();dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.require("dojox.dtl._HtmlTemplated");dojo.require("dojox.dtl.tag.logic");dojo.require("fw.dijit.UITextarea");dojo.addOnLoad(function(){djConfig.load_users_scripts();dojo.provide("fw.dijit.UIComment");dojo.require("dijit._Widget");var globalCommentActivity=false;dojo.declare("fw.dijit.UIComment",dijit._Widget,{btnNode:"",mainCommentNode:"",animationDelay:400,animationDelay1:200,hideTimer:"",firstHideTimer:"",hideReplyTimer:new Array(),editMode:false,replyEditMode:new Array(),postCreate:function(){this.inherited(arguments);this.btnNode=dojo.query("#"+this.id+" .comments_repliesExpandBtn")[0];if(this.btnNode){dojo.connect(this.btnNode,"onclick",dojo.hitch(this,"showReplies"))}else{this.btnNode=dojo.query("#"+this.id+" .comments_repliesCollapseBtn")[0];if(this.btnNode){dojo.connect(this.btnNode,"onclick",dojo.hitch(this,"hideReplies"))}}this.mainCommentNode=dojo.query("#"+this.id+" .comments_mainComment")[0];dojo.connect(this.mainCommentNode,"onmouseover",dojo.hitch(this,"highlight"));dojo.connect(this.mainCommentNode,"onmouseout",dojo.hitch(this,"unhighlight"));this.actionsNode=dojo.query("#"+this.id+" .comments_commentActions")[0]},replyShowActions:function(n,index){if(!globalCommentActivity){clearTimeout(this.hideReplyTimer[index]);n.id="activecomment"+index;var node=dojo.query("#"+this.id+" #activecomment"+index+" .comments_commentBody .comments_commentActions")[0];if(n.className!="comments_replyContentOver"||node.style.opacity==0){n.className="comments_replyContentOver";node.style.opacity=0;node.style.visibility="visible";dojo.fadeIn({node:node,duration:this.animationDelay}).play()}}},replyHideActions:function(n,index){if(!this.replyEditMode[index]){this.hideReplyTimer[index]=setTimeout(dojo.hitch(this,"replyHideActions1",n,index),this.animationDelay1)}},replyHideActions1:function(n,index){n.className="comments_replyContent";var node=dojo.query("#activecomment"+index+" .comments_commentBody .comments_commentActions")[0];n.style.opacity=100;dojo.fadeOut({node:node,duration:this.animationDelay1}).play();setTimeout(dojo.hitch(this,"replyHideActions2",node),this.animationDelay1);n.id="";clearTimeout(this.hideReplyTimer[index])},replyHideActions2:function(node){},showReplies:function(){if(this.btnNode){dojo.query("#"+this.id+" .comments_reply").forEach(function(n){n.style.display="block";var btnNode=dojo.query("#"+n.id+" .comments_repliesExpandBtn")[0];if(btnNode){btnNode.className="comments_repliesCollapseBtn";btnNode.title="Collapse";dojo.connect(btnNode,"onclick",dojo.hitch(dijit.byId(n.id+"uidijit"),"hideReplies"))}});this.btnNode.showing=true;this.btnNode.className="comments_repliesCollapseBtn";this.btnNode.title="Collapse";dojo.connect(this.btnNode,"onclick",dojo.hitch(this,"hideReplies"))}},hideReplies:function(){if(this.btnNode){dojo.query("#"+this.id+" .comments_reply").forEach(function(n){n.style.display="none"});this.btnNode.showing=false;this.btnNode.className="comments_repliesExpandBtn";this.btnNode.title="Expand";dojo.connect(this.btnNode,"onclick",dojo.hitch(this,"showReplies"))}},highlight:function(){if(!globalCommentActivity){clearTimeout(this.firstHideTimer);clearTimeout(this.hideTimer);if(this.mainCommentNode.className!="comments_mainCommentOver"){this.mainCommentNode.className="comments_mainCommentOver";this.actionsNode.style.opacity=0;this.actionsNode.style.visibility="visible";dojo.fadeIn({node:this.actionsNode,duration:this.animationDelay}).play()}}},unhighlight:function(){if(!this.editMode){this.firstHideTimer=setTimeout(dojo.hitch(this,"startHideActions"),200)}},startHideActions:function(){this.mainCommentNode.className="comments_mainComment";this.actionsNode.style.opacity=100;dojo.fadeOut({node:this.actionsNode,duration:this.animationDelay1}).play();this.hideTimer=setTimeout(dojo.hitch(this,"hideActions"),this.animationDelay)},hideActions:function(){this.actionsNode.style.visibility="hidden";clearTimeout(this.hideTimer)},highlightReply:function(n){n.className="comments_replyContentOver"},unhighlightReply:function(){n.className="comments_replyContent"}});fw.dijit.UIComment.expandAll=function(){dojo.query(".comments_comment").forEach(function(n){dijit.byId(n.id+"uidijit").showReplies()})};fw.dijit.UIComment.collapseAll=function(){dojo.query(".comments_comment").forEach(function(n){dijit.byId(n.id+"uidijit").hideReplies()})};fw.dijit.UIComment.changeView=function(type){if(type=="thumbs"){dojo.query(".comments_comment .comments_commentPic").forEach(function(n){n.style.display="block"});dojo.query(".comments_comment .comments_commentBodyFull").forEach(function(n){n.className="comments_commentBody"});dojo.query(".comments_comments .comments_links a").forEach(function(n){if(n.type!="thumbs"){n.className=""}else{n.className="comments_selected"}})}else{dojo.query(".comments_comment .comments_commentPic").forEach(function(n){n.style.display="none"});dojo.query(".comments_comment .comments_commentBody").forEach(function(n){n.className="comments_commentBodyFull"});dojo.query(".comments_comments .comments_links a").forEach(function(n){if(n.type!="list"){n.className=""}else{n.className="comments_selected"}})}};var casIdPUrl="http://us.sunpowercorp.com:9001/cas";var casAuthUrl="http://us.sunpowercorp.com:9001/cos-service/";casAuthUrl=casAuthUrl.substr(0,casAuthUrl.length-1);var cosDataRepUrl="http://us.sunpowercorp.com:9001/cos-service/";var casUsersUrl="http://us.sunpowercorp.com:9001/user-service/";dojo.registerModulePath("comments",cosDataRepUrl+"widgets/comments");dojo.declare("cos.comments.CommentConfig",null,{attributes:{},settings:{},session:null,MAX_FLAGGED:2,MAX_THREAD_DEPTH:9,orderingAsc:true,threading:false,pagination:false,paginationFrame:0,isGuest:true,showCommentList:false,commentMaxLen:450,commentBoxTop:true,session:null,permissions:{},flaggingModeAll:true,flaggingModeRegistered:false,flaggingModeDisabled:false,flaggingHide:false,flaggingNoteRequired:false,usersprofiles:null,usersUrl:null,itemsCount:0,init:function(sess,config,usrsprofiles,usrUrl){for(var i=0;i<config.entry.length;++i){var elem=config.entry[i];comments.log("config: "+elem.key+"="+elem.value);this.settings[elem.key]=elem.value}this.usersUrl=usrUrl;this.session=sess;this.usersprofiles=usrsprofiles;this.orderingAsc=(this.settings.order_by.indexOf("_asc")>0);comments.log("config: orderingAsc="+this.orderingAsc);this.threading=(this.settings.structure!="1");comments.log("config: threading="+this.threading);if(this.threading){this.MAX_THREAD_DEPTH=this.settings.structure}this.pagination=(this.settings.pagination!="0");comments.log("config: pagination="+this.pagination);this.isGuest=(sess.guest=="true");comments.log("config: isGuest="+this.isGuest);this.commentMaxLen=this.settings.max_len;comments.log("config: commentMaxLen="+this.commentMaxLen);this.commentBoxTop=this.settings.form_position=="top";comments.log("config: commentBoxTop="+this.commentBoxTop);this.flaggingModeAll=(this.settings.moderation_flagging=="0");comments.log("config: flaggingModeAll="+this.flaggingModeAll);this.flaggingModeRegistered=(this.settings.moderation_flagging=="1");comments.log("config: flaggingModeRegistered="+this.flaggingModeRegistered);this.flaggingModeDisabled=this.settings.moderation_flagging=="2";comments.log("config: flaggingModeDisabled="+this.flaggingModeDisabled);this.flaggingHide=this.settings.moderation_flagging_hide=="true";comments.log("config: flaggingHide="+this.flaggingHide);this.flaggingNoteRequired=this.settings.moderation_flagging_note_required=="true";comments.log("config: flaggingNoteRequired="+this.flaggingNoteRequired);this.permissions.commentingEnabled=this.settings.submission_enabled=="yes";this.permissions.showPostedComments=this.settings.show_posted_comments=="1";this.permissions.guestPostsAllowed=this.settings.submission_policy=="guests";this.permissions.guestNameRequired=this.settings.guest_name_required=="true";this.permissions.guestEmailRequired=this.settings.guest_email_required=="true";this.permissions.modificationAllowed=this.settings.modification_allowed=="true";comments.log("config: init finished")},getConfigValue:function(conf,entryName){for(var i=0;i<conf.length;++i){var elem=conf[i];if(elem.key==entryName){return elem.value}}return""},getUserProfileByID:function(id){var ret=null;if(null!=this.usersprofiles){if(typeof(this.usersprofiles.length)!="undefined"){for(var i=0;i<this.usersprofiles.length;++i){if(id==this.usersprofiles[i].userid){ret=this.usersprofiles[i];break}}}else{if(id==this.usersprofiles.userid){ret=this.usersprofiles}}}if((null==ret)&&(null!=this.session)&&(this.session.userID==id)&&(typeof(this.session.avatar)!="undefined")){ret={userid:this.session.userID,displayname:this.session.displayName,userpicurl:this.session.avatar}}return ret},addOrUpdateUserProfile:function(profile){if(null!=profile){if((typeof(this.usersprofiles)!="undefined")&&(typeof(this.usersprofiles.length)!="undefined")){var profileUpdated=false;for(var i=0;i<this.usersprofiles.length;++i){if(profile.userid==this.usersprofiles[i].userid){this.usersprofiles[i]=profile;profileUpdated=true;break}}if(profileUpdated==false){this.usersprofiles[this.usersprofiles.length]=profile}}else{this.usersprofiles=new Array(1);this.usersprofiles[0]=profile}}}});dojo.declare("cos.comments.views.Comment",[dijit._Widget,dojox.dtl._HtmlTemplated],{parentWidget:null,comment:null,dataURL:null,siteid:null,feedid:null,deletingInProgress:false,deleteWidget:null,canFlagIt:false,flagWidget:null,flaggingInProgress:false,editWidget:null,editingInProgress:false,replyWidget:null,replyingInProgress:false,isGuest:true,sessionUserid:null,config:null,parent:null,canEditDelete:false,canReply:false,approved:false,widgetsInTemplate:true,userprofile:null,uiUserTitle:null,userPic:null,uidijit:null,message_expand:cos.comments.messages.get("label.expand"),message_collapse:cos.comments.messages.get("label.collapse"),message_replies:cos.comments.messages.get("label.replies"),message_moderated_discussion:cos.comments.messages.get("message.moderated_discussion"),message_edit:cos.comments.messages.get("link.edit"),message_reply:cos.comments.messages.get("link.reply"),message_delete:cos.comments.messages.get("link.delete"),message_flag:cos.comments.messages.get("link.flag"),templateString:"	           <div>    {% if parent %}    <div class='comments_reply' style='display:block;' id='comment{{comment.id}}'>        <div dojoAttachPoint='fwUIComment' id='comment{{comment.id}}uidijit'>            <div class='comments_mainComment'>                <div class='comments_commentPic'>                    <div class='comments_usersThumb'><img dojoAttachPoint='userPicImg' src='{{userPic}}' border='0'/></div>                </div>                <div class='comments_commentBody'>                    <div class='comments_username comments_left' dojoAttachPoint='uiUserTitleDiv'>&nbsp;</div><div class='comments_date comments_left'>{{comment.dateCreated}}</div>                    {% ifequal config.threading true %}                        <div dojoAttachPoint='repliesLink' style='display: none;' class='comments_right comments_replieslabel'><a class='comments_repliesCollapseBtn' title='{{message_collapse}}'>(<div style='display: inline;' dojoAttachPoint='repliesCount'></div>)&nbsp;{{message_replies}}</a></div>                    {% endifequal %}                    <div class='comments_clear'></div>                    <div class='comments_content' id='comment-body-cont-{{comment.id}}' dojoAttachPoint='commentBodyCont'>                    <!-- description is populated in postCreate via innerHTML -->                        <div id='content{{comment.id}}' dojoAttachPoint='commentBody'></div>                    </div>                    <div class='comments_pendingComment'  dojoAttachPoint='moderationMessage' style='display:none;'>                        <br/>{{message_moderated_discussion}}                    </div>                    <div class='comments_commentActions' style='opacity: 0; visibility: hidden;'>                        {% ifequal canEditDelete true %}                        <a href='javascript:void(0);' class='comments_editBtn' dojoAttachEvent='onclick:_onEditClick'>{{message_edit}}</a>                        {% endifequal %}                        {% ifequal canReply true %}                        <a href='javascript:void(0);' class='comments_replyBtn' dojoAttachEvent='onclick:_onReplyClick'>{{message_reply}}</a>                        {% endifequal %}                        {% ifequal canEditDelete true %}                        <a href='javascript:void(0);' class='comments_deleteBtn' dojoAttachEvent='onclick:_onDeleteClick'>{{message_delete}}</a>                        {% endifequal %}                        {% ifequal canFlagIt true %}                        <a href='javascript:void(0);' class='comments_flagBtn' dojoAttachPoint='commentFlagItSection' dojoAttachEvent='onclick:_onFlagClick'>{{message_flag}}</a>                        {% endifequal %}                    </div>                    <div id='comment-reply-cont-{{comment.id}}' dojoAttachPoint='commentReplyFormCont'></div>                    <div id='comment-flagit-cont-{{comment.id}}' dojoAttachPoint='commentFlagItCont'></div>                    <div id='comment-delete-cont-{{comment.id}}' dojoAttachPoint='commentDeleteCont'></div>                </div>            </div>            <div id='comment-replies-cont-{{comment.id}}' dojoAttachPoint='commentRepliesCont'></div>        </div>    </div>    {% else %}    <div class='comments_comment' id='comment{{comment.id}}'>        <div dojoAttachPoint='fwUIComment' id='comment{{comment.id}}uidijit'>            <div class='comments_mainComment'>                <div class='comments_commentPic'>                    <div class='comments_usersThumb'><img dojoAttachPoint='userPicImg' src='{{userPic}}' border='0'/></div>                </div>                <div class='comments_commentBody'>                    <div class='comments_username comments_left' dojoAttachPoint='uiUserTitleDiv' >&nbsp;</div><div class='comments_date comments_left'>{{comment.dateCreated}}</div>                    {% ifequal config.threading true %}                        <div dojoAttachPoint='repliesLink' style='display: none;' class='comments_right comments_replieslabel'><a class='comments_repliesCollapseBtn' title='{{message_collapse}}'>(<div style='display: inline;' dojoAttachPoint='repliesCount'></div>)&nbsp;{{message_replies}}</a></div>                    {% endifequal %}                    <div class='comments_clear'></div>                    <div class='comments_content' id='comment-body-cont-{{comment.id}}' dojoAttachPoint='commentBodyCont'>                    <!-- description is populated in postCreate via innerHTML -->                        <div id='content{{comment.id}}' dojoAttachPoint='commentBody'></div>                    </div>                    <div class='comments_pendingComment'   dojoAttachPoint='moderationMessage' style='display:none;'>                        <br/>{{message_moderated_discussion}}                    </div>                    <div class='comments_clear'></div>                    <div class='comments_commentActions' style='opacity: 0; visibility: hidden;'>                        {% ifequal canEditDelete true %}                        <a href='javascript:void(0);' class='comments_editBtn' dojoAttachEvent='onclick:_onEditClick'>{{message_edit}}</a>                        {% endifequal %}                        {% ifequal canReply true %}                        <a href='javascript:void(0);' class='comments_replyBtn' dojoAttachEvent='onclick:_onReplyClick'>{{message_reply}}</a>                        {% endifequal %}                        {% ifequal canEditDelete true %}                        <a href='javascript:void(0);' class='comments_deleteBtn' dojoAttachEvent='onclick:_onDeleteClick'>{{message_delete}}</a>                        {% endifequal %}                        {% ifequal canFlagIt true %}                        <a href='javascript:void(0);' class='comments_flagBtn' dojoAttachPoint='commentFlagItSection' dojoAttachEvent='onclick:_onFlagClick'>{{message_flag}}</a>                        {% endifequal %}                    </div>                    <div id='comment-reply-cont-{{comment.id}}' dojoAttachPoint='commentReplyFormCont'></div>                    <div id='comment-flagit-cont-{{comment.id}}' dojoAttachPoint='commentFlagItCont'></div>                    <div id='comment-delete-cont-{{comment.id}}' dojoAttachPoint='commentDeleteCont'></div>                </div>            </div>            <div id='comment-replies-cont-{{comment.id}}' dojoAttachPoint='commentRepliesCont'></div>        </div>    </div>    {% endif %}</div>		                ",buildRendering:function(){if((null==this.userprofile)&&(this.comment!=null)&&(typeof(this.comment.owner)!="undefined")){this.userprofile=this.config.getUserProfileByID(this.comment.owner)}if(null!=this.userprofile){this.uiUserTitle=this.userprofile.displayname}else{if((this.comment!=null)&&(typeof(this.comment.guestName)!="undefined")&&this.comment.guestName!=""){this.uiUserTitle=this.comment.guestName}else{if((this.comment!=null)&&(typeof(this.comment.ownerName)!="undefined")){this.uiUserTitle=this.comment.ownerName}else{this.uiUserTitle=""}}}if((null!=this.userprofile)&&(typeof(this.userprofile.userpicurl)!="undefined")){this.userPic=this.config.usersUrl+this.userprofile.userpicurl+"?dc="+new Date().getTime()}else{this.userPic=this.dataURL+"images/user.png"}if(this.config.permissions.modificationAllowed&&(this.isGuest==false)&&(null!=this.sessionUserid)&&(this.sessionUserid==this.comment.owner)){this.canEditDelete=true}this.approved=this.canShowComment(this.comment);if(this.comment.level<this.config.MAX_THREAD_DEPTH&&this.config.threading&&this.approved&&(!this.config.isGuest||this.config.permissions.guestPostsAllowed)){this.canReply=true}if(this.approved&&((this.isGuest==true)||(this.isGuest==false&&null!=this.sessionUserid&&this.sessionUserid!=this.comment.owner))&&!this.config.flaggingModeDisabled&&(this.config.flaggingModeAll||(this.config.flaggingModeRegistered&&!this.config.isGuest))&&(!this.config.flaggingHide||(this.config.flaggingHide&&this.comment.flaggedCount<this.config.MAX_FLAGGED))){var flagCookie=fw.cos.cm.Utils.getFlagingCookie(this.config.session.userID,this.comment.id);if(null==flagCookie){this.canFlagIt=true}}if(this.comment==null){this.comment={commentid:"some id",author:"",authorpic:"",date:"",body:""}}if(typeof this.comment.id=="undefined"){alert("Error comment must have an id")}else{if(typeof this.comment.owner=="undefined"){this.comment.owner=""}if(typeof this.comment.authorpic=="undefined"){this.comment.authorpic=""}if((typeof this.comment.dateCreated=="undefined")||this.comment.dateCreatedTimestamp=="0"){this.comment.dateCreated=""}else{this.comment.dateCreated=cos.utils.date.formatDate(new Date(parseFloat(this.comment.dateCreatedTimestamp)),cos.commons.messages.get("format.date_formater"))}if(typeof this.comment.description=="undefined"){this.comment.description=""}this.inherited(arguments)}},postCreate:function(){this.inherited(arguments);this.uiUserTitleDiv.innerHTML=cos.InsertWordBreaks(cos.escapeHtml(this.uiUserTitle),5);this.userPicImg.src=this.userPic;this.uidijit=new fw.dijit.UIComment({},this.fwUIComment);this.commentBody.innerHTML=cos.InsertWordBreaks(this.comment.description,5);this.renderModerationMessage()},renderModerationMessage:function(){if(this.approved===true){this.moderationMessage.style.display="none"}else{this.moderationMessage.style.display="block"}},canShowComment:function(commentObj){return commentObj.stateValue=="approved.all"},_onDeleteClick:function(event){if(this.deletingInProgress==false&&globalCommentActivity==false){this.uidijit.editMode=true;globalCommentActivity=true;var deleteAreaDiv=document.createElement("div");this.commentDeleteCont.appendChild(deleteAreaDiv);this.deleteWidget=new CommentDeleteArea({comment:this.comment,parent:this,siteid:this.siteid,feedid:this.feedid,dataURL:this.dataURL},deleteAreaDiv)}return false},_onEditClick:function(event){if(this.editingInProgress==false&&globalCommentActivity==false){this.uidijit.editMode=true;globalCommentActivity=true;this.editingInProgress=true;var commentheight=this.commentBody.clientHeight;if(dojo.isIE){commentheight=this.commentBody.offsetHeight}this.commentBody.style.visibility="hidden";this.commentBody.style.position="absolute";var editAreaDiv=document.createElement("div");this.commentReplyFormCont.appendChild(editAreaDiv);this.editWidget=new EditCommentArea({comment:this.comment,siteid:this.siteid,feedid:this.feedid,parent:this,height:commentheight,dataURL:this.dataURL,config:this.config},editAreaDiv)}window.scrollBy(0,60);return false},_onFlagClick:function(event){if(this.flaggingInProgress==false&&globalCommentActivity==false){this.uidijit.editMode=true;globalCommentActivity=true;this.flaggingInProgress=true;var flagAreaDiv=document.createElement("div");this.commentFlagItCont.appendChild(flagAreaDiv);this.flagWidget=new CommentFlagArea({commentid:this.comment.id,parent:this,siteid:this.siteid,feedid:this.feedid,dataURL:this.dataURL,comment:this.comment,config:this.config},flagAreaDiv)}window.scrollBy(0,60);return false},_onReplyClick:function(event){if(this.replyingInProgress==false&&globalCommentActivity==false){this.uidijit.editMode=true;globalCommentActivity=true;this.replyingInProgress=true;var replyAreaDiv=document.createElement("div");this.commentReplyFormCont.appendChild(replyAreaDiv);this.replyWidget=new CommentReplyArea({parent:this,parentid:this.comment.id,siteid:this.siteid,feedid:this.feedid,dataURL:this.dataURL,config:this.config,isGuest:this.isGuest},replyAreaDiv)}window.scrollBy(0,60);return false},removeFlagArea:function(){if(this.flagWidget!=null&&(this.flaggingInProgress==true)){this.flagWidget.destroy(false);this.flaggingInProgress=false;this.uidijit.editMode=false;this.uidijit.unhighlight()}},removeDeleteArea:function(){if(this.deleteWidget!=null){this.deleteWidget.destroy(false);this.uidijit.editMode=false;this.uidijit.unhighlight()}},removeEditArea:function(){if((this.editingInProgress==true)&&(this.editWidget!=null)){this.editWidget.destroy(false);this.commentBody.style.visibility="visible";this.commentBody.style.position="";this.editingInProgress=false;this.uidijit.editMode=false;this.uidijit.unhighlight()}},finishEditing:function(respComment){this.commentBody.innerHTML=cos.InsertWordBreaks(respComment.description,5);this.comment.description=respComment.description;this.removeEditArea();this.approved=this.canShowComment(respComment);this.renderModerationMessage()},removeReplyArea:function(){if((this.replyingInProgress==true)&&(this.replyWidget!=null)){this.replyWidget.destroy(false);this.replyingInProgress=false;this.parentWidget.currentReplyForm=null;this.uidijit.editMode=false;this.uidijit.unhighlight()}},finishReplying:function(){this.removeReplyArea()},updateUserSessionInformation:function(userid,isGuestUser){this.isGuest=isGuestUser;this.sessionUserid=userid;if(this.config.permissions.modificationAllowed&&(this.isGuest==false)&&(null!=this.sessionUserid)&&(this.sessionUserid==this.comment.owner)){}else{}},getTopOffset:function(e){var top=0;while(e.offsetParent){top+=e.offsetTop;e=e.offsetParent}top+=e.offsetTop;return top-50},focus:function(){var topOffset=this.getTopOffset(this.commentBodyCont);window.scroll(0,topOffset)}});dojo.require("fw.dijit.UITextarea");dojo.declare("EditCommentArea",[dijit._Widget,dijit._Templated],{comment:null,siteid:null,feedid:null,parent:null,widgetsInTemplate:true,height:null,dataURL:null,config:null,underSave:false,message_cancel:cos.comments.messages.get("link.cancel"),message_close:cos.comments.messages.get("label.close"),message_saving:cos.comments.messages.get("message.saving"),language:cos.comments.messages.language,templateString:"	                    <div>    <br/><div dojoType='fw.dijit.UITextarea' style='margin-left:0px; width:100%;' dojoAttachPoint='editCommentText'>${comment.description}</div>    <div class='UIWarningBox' style='opacity: 1;'>        <div class='noneIcon'></div>        <div class='comments_left'>            <a href='javascript:void(0);' dojoAttachEvent='onclick:_onSaveClick'><img border='0' src='${dataURL}images/buttons/${language}/save.png'/></a>            <a class='comments_replyCancel' href='javascript:void(0);' dojoAttachEvent='onclick:_onCancelClick'>${message_cancel}</a>        </div>        <div class='comments_right'>            <a class='UIWarningBoxClose' title='${message_close}' dojoAttachEvent='onclick:_onCancelClick'></a>        </div>        <div class='comments_clear'></div>    </div>    <div dojoAttachPoint='savingDiv' style='visibility: hidden; position: absolute;'><img src='${dataURL}images/ajax-loader.gif' border='0'></img><span>${message_saving}</span></div></div>			                                    ",postCreate:function(){var editAreaHeight=50;if(this.height>editAreaHeight){editAreaHeight=this.height+20}this.editCommentText.setHeight(editAreaHeight);this.editCommentText.focus()},_onSaveClick:function(event){if(dojo.trim(this.editCommentText.getValue())==""){alert(cos.comments.messages.get("message.comment_required"));this.editCommentText.focus()}else{if(this.editCommentText.getValue().length>this.config.commentMaxLen){alert(cos.comments.messages.get("error.long_comment_body",this.config.commentMaxLen));this.editCommentText.focus()}else{if(this.underSave==false){this.underSave=true;this.savingDiv.style.visibility="visible";this.savingDiv.style.position="";fw.cos.cm.jsonp.UpdateComment(this.comment.id,this.siteid,this.feedid,this.editCommentText.getValue())}else{alert(cos.comments.messages.get("message.comment_is_saved"))}}}globalCommentActivity=false},_onCancelClick:function(event){if(this.underSave==false){this.parent.removeEditArea()}else{alert(cos.comments.messages.get("message.comment_is_saved"))}globalCommentActivity=false}});dojo.declare("CommentDeleteArea",[dijit._Widget,dijit._Templated],{comment:null,siteid:null,feedid:null,parent:null,dataURL:null,underDelete:false,message_delete:cos.comments.messages.get("label.delete"),message_want_to_delete:cos.comments.messages.get("message.want_to_delete"),message_no:cos.comments.messages.get("link.no"),message_close:cos.comments.messages.get("label.close"),language:cos.comments.messages.language,templateString:"                        <div>    <div class='UIWarningBox' style='opacity: 1;'>        <div class='noneIcon'></div>        <div class='comments_left'>            <b>${message_delete}</b>            <br/>            ${message_want_to_delete}            <div class='comments_formBtnSpacing'></div>            <a href='javascript:void(0);' dojoAttachEvent='onclick:_onDeleteClick'><img border='0' src='${dataURL}images/buttons/${language}/yes.png'/></a>            <a class='comments_replyCancel' href='javascript:void(0);' dojoAttachEvent='onclick:_onCloseClick'>${message_no}</a>        </div>        <div class='comments_right'>            <a class='UIWarningBoxClose' title='${message_close}' dojoAttachEvent='onclick:_onCloseClick'></a>        </div>        <div class='comments_clear'></div>    </div></div>                                                ",_onDeleteClick:function(event){if(this.underDelete==false){this.underDelete=true;fw.cos.cm.jsonp.deleteComment(this.comment.id,this.siteid,this.feedid)}else{alert(cos.comments.messages.get("message.comment_is_deleted"))}globalCommentActivity=false},_onCloseClick:function(event){if(this.underDelete==false){this.parent.removeDeleteArea()}else{alert(cos.comments.messages.get("message.comment_is_deleted"))}globalCommentActivity=false}});dojo.require("fw.dijit.UIInput");dojo.require("fw.dijit.UITextarea");dojo.declare("CommentReplyArea",[dijit._Widget,dojox.dtl._HtmlTemplated],{parent:null,parentid:null,widgetsInTemplate:true,siteid:null,feedid:null,dataURL:null,permissions:null,isGuest:false,saveInProgress:false,config:null,message_post_reply:cos.comments.messages.get("label.post_reply"),message_cancel:cos.comments.messages.get("link.cancel"),message_close:cos.comments.messages.get("label.close"),message_posting:cos.comments.messages.get("message.posting"),language:cos.comments.messages.language,templateString:"	                    <div>    <div class='UIWarningBox' dojoattachpoint='mainNode' style='opacity: 1;'>        <div class='noneIcon'></div>        <div class='comments_left' style='width: 90%;'>            <b>{{message_post_reply}}</b>            {% ifequal isGuest true%}              {% ifequal config.permissions.guestPostsAllowed true %}                   <br/><br/>              	   <div>                        <input type='text' dojoType='fw.dijit.UIInput' dojoAttachPoint='replyUser'/>              	   </div>              	{% ifequal config.permissions.guestEmailRequired  true %}                    <br/><br/>            		<div>                        <input type='text' dojoType='fw.dijit.UIInput' dojoAttachPoint='replyEmail'/>            		</div>              	{% endifequal %}              {% endifequal %}                   <br/><br/>                   <img dojoAttachPoint='captchaPictureReply' src='' name='cos_captcha_reply'>                   <br/>              	   <div>                        <input type='text' dojoType='fw.dijit.UIInput' dojoAttachPoint='replyCaptcha'/>              	   </div>            {% endifequal %}            <br/><br/>            <div dojoType='fw.dijit.UITextarea' style='width: 100%;' dojoAttachPoint='commentReplyText'></div>            <div class='comments_formBtnSpacing'></div>            <a href='javascript:void(0);' dojoAttachEvent='onclick:_onSaveClick'><img border='0' src='{{dataURL}}images/buttons/{{language}}/submit.png'></img></a>            <a class='comments_replyCancel' href='javascript:void(0);' dojoAttachEvent='onclick:_onCancelClick'>{{message_cancel}}</a>        </div>        <div class='comments_right'>            <a class='UIWarningBoxClose' title='{{message_close}}' dojoAttachEvent='onclick:_onCancelClick'></a>        </div>        <div class='comments_clear'/></div>    </div>    <div dojoAttachPoint='replySaving' style='visibility: hidden; position: absolute;'><img src='{{dataURL}}images/ajax-loader.gif' border='0'></img><span>{{message_posting}}</span></div></div>			                                    ",postCreate:function(){if(typeof this.commentReplyText!="undefined"){this.commentReplyText.scrollOnFocus=false}if(typeof this.captchaPictureReply!="undefined"){this.captchaPictureReply.src=this.dataURL+"captcha.jpg?r="+Math.random()+"&oldimage=true"}if(typeof this.replyUser!="undefined"){this.replyUser.setDefaultTitle(cos.comments.messages.get("label.name"));this.replyUser.scrollOnFocus=false}if(typeof this.replyCaptcha!="undefined"){this.replyCaptcha.setDefaultTitle(cos.comments.messages.get("label.captcha"));this.replyCaptcha.scrollOnFocus=false}if(typeof this.replyEmail!="undefined"){this.replyEmail.setDefaultTitle(cos.comments.messages.get("label.email"));this.replyEmail.scrollOnFocus=false}this.commentReplyText.focus()},_onSaveClick:function(event){if(this.saveInProgress==false){this.saveInProgress=true;var errMsg="";var hasErrors=false;if(dojo.trim(this.commentReplyText.getValue())==""){errMsg=cos.comments.messages.get("message.empty_reply");hasErrors=true}if(this.commentReplyText.getValue().length>this.config.commentMaxLen){errMsg=cos.comments.messages.get("error.long_comment_body",this.config.commentMaxLen);hasErrors=true}if(this.isGuest){if(this.config.permissions.guestPostsAllowed==true){if(this.config.permissions.guestNameRequired){this.replyUser.hideError();if(this.replyUser.value==null||this.replyUser.value.replace(/^\s*|\s*$/g,"")==""){this.replyUser.showError(cos.comments.messages.get("message.user_name_required"));hasErrors=true}}if(this.config.permissions.guestEmailRequired){this.replyEmail.hideError();if(this.replyEmail.value==null||this.replyEmail.value.replace(/^\s*|\s*$/g,"")==""){this.replyEmail.showError(cos.comments.messages.get("message.email_required"));hasErrors=true}else{if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(this.replyEmail.value)){this.replyEmail.showError(cos.comments.messages.get("error.email_invalid"));hasErrors=true}}}}}if(hasErrors){if(errMsg!=""){alert(errMsg)}this.saveInProgress=false;this.commentReplyText.focus();return}var commArr={username:null,email:null,comment:this.commentReplyText.getValue(),permissions:this.permissions,isguest:this.isGuest,parentid:this.parentid,commentsStructure:this.config.attributes.structure};if(this.isGuest){if(this.config.permissions.guestPostsAllowed==true){if(this.replyUser.value.replace(/^\s*|\s*$/g,"")!=""){commArr.username=this.replyUser.value}if(this.config.permissions.guestEmailRequired){commArr.email=this.replyEmail.value}commArr.captcha=this.replyCaptcha.value}}this.replySaving.style.display="block";this.replySaving.style.position="";this.parent.parentWidget.currentReplyForm=this;fw.cos.cm.jsonp.postComment(commArr,this.siteid,this.feedid,this.config)}else{alert(cos.comments.messages.get("message.reply_is_saved"))}globalCommentActivity=false},_onCancelClick:function(event){if(this.saveInProgress==false){this.parent.removeReplyArea()}else{alert(cos.comments.messages.get("message.reply_is_saved"))}globalCommentActivity=false}});dojo.declare("CommentFlagArea",[dijit._Widget,dijit._Templated],{commentid:null,siteid:null,feedid:null,parent:null,dataURL:null,underFlag:false,comment:null,config:null,message_flag:cos.comments.messages.get("label.flag_content"),message_report_content:cos.comments.messages.get("message.report_content"),message_cancel:cos.comments.messages.get("link.cancel"),message_close:cos.comments.messages.get("label.close"),language:cos.comments.messages.language,templateString:"                        <div>    <div class='UIWarningBox' style='opacity: 1;'>        <div class='noneIcon'></div>        <div class='comments_left'>            <b>${message_flag}</b>            <br/>            ${message_report_content}            <div class='comments_formBtnSpacing'></div>            <a href='javascript:void(0);' dojoAttachEvent='onclick:_onFlagClick'><img border='0' src='${dataURL}images/buttons/${language}/flag.png'/></a>            <a class='comments_replyCancel' href='javascript:void(0);' dojoAttachEvent='onclick:_onCloseClick'>${message_cancel}</a>        </div>        <div class='comments_right'>            <a class='UIWarningBoxClose' title='${message_close}' dojoAttachEvent='onclick:_onCloseClick'></a>        </div>        <div class='comments_clear'></div>    </div></div>                                                ",_onFlagClick:function(event){if(this.underFlag==false){this.underFlag=true;fw.cos.cm.jsonp.flagComment(this.commentid,this.siteid,this.feedid);this.parent.commentFlagItSection.style.display="none"}else{alert(cos.comments.messages.get("message.comment_is_flagged"))}globalCommentActivity=false},_onCloseClick:function(event){if(this.underFlag==false){this.parent.removeFlagArea()}else{alert(cos.comments.messages.get("message.comment_is_flagged"))}globalCommentActivity=false}});dojo.declare("cos.comments.views.Comments",[dijit._Widget,dijit._Templated],{comments:new Array(),resid:null,siteid:null,locale:null,dataURL:null,authUrl:null,usersUrl:null,signinFeature:null,signoutFeature:null,widgetsInTemplate:true,resourceTitle:null,postCommentsForm:null,pageNo:1,csPaginationElem:null,csControlsElem:null,permissions:null,guest:null,showComments:null,commentsMaxLength:null,commentBoxAtTop:null,commentsMap:{},repliesCountMap:{},threading:false,focusOnForm:false,boot:true,config:null,currentReplyForm:null,message_no_comments:cos.comments.messages.get("message.no_comments"),templateString:"	    <div class='fw' ><div class='comments_center' id='comments'><div id='messages'></div><div dojoAttachPoint='csBody' class='comments_comments'>  <div dojoAttachPoint='csBodyPostCommentTop'></div>  <div dojoAttachPoint='csBodyControls'></div>  <div dojoAttachPoint='csBodyPostedComments'></div>  <div dojoAttachPoint='csBodyNewComments' style='display: none;'></div>  <div dojoAttachPoint='csBodyNoComments' style='display: none;'>${message_no_comments}</div>  <div dojoAttachPoint='csBodyPostCommentBottom'></div></div><div dojoAttachPoint='csDataRepId'></div></div><div style='display:none;'><iframe src='${usersUrl}index.jsp'></iframe></div></div>	    ",buildRendering:function(){var head=document.getElementsByTagName("head")[0];var link=document.createElement("link");link.type="text/css";link.rel="stylesheet";link.href=this.dataURL+"skin/comments/"+this.siteid+".css";head.appendChild(link);fw.cos.cm.jsonp.getCommentsFeed(this);this.inherited(arguments)},postCreate:function(){this.pendingStatus(true);this.inherited(arguments)},pendingStatus:function(show){if(show===true){this.csBody.style.display="none";comments.ui.showInfoMessage(cos.comments.messages.get("message.loading_comments"))}else{comments.ui.clearInfoMessage();this.csBody.style.display="block"}},renderComments:function(items,config,onCompleteHandler){this.deleteAll();this.config=config;this.config.attributes=this.attributes;fw.cos.cm.Utils.log("start comment rendering for resource_id="+this.resid+", site_id="+this.siteid);this.threading=config.threading;fw.cos.cm.Utils.log("Threading = "+config.threading+" for feed #"+this.resid);this.guest=this.config.session.guest=="true";this.showComments=this.config.permissions.showPostedComments;if(null!=this.csControlsElem){this.csControlsElem.destroy()}if(this.showComments){var controlsDiv=document.createElement("div");this.csBodyControls.appendChild(controlsDiv);this.csControlsElem=new cos.comments.views.CommentsControls({config:this.config,parent:this,itemsCount:this.config.itemsCount},controlsDiv)}var showSignInForm=false;var showPostCommentForm=true;if(!this.config.permissions.commentingEnabled){showPostCommentForm=false}else{if(this.guest){showSignInForm=true}}if(showSignInForm){this.includeSigninForm()}this.addComments(items,onCompleteHandler);this.pendingStatus(false);if(showPostCommentForm){this.includePostCommentForm()}},setSessionUserProfile:function(profile){if(this.postCommentsForm.csSigninElem!==null){this.postCommentsForm.csSigninElem.setUserProfile(profile)}},addComments:function(comments,onCompleteHandler){if(comments instanceof Array){if(comments.length>0){this.recursiveAddComments(comments,0,onCompleteHandler)}else{this.showNoCommentsMessage(true)}}else{if(comments){this.addComment(comments,false)}else{this.showNoCommentsMessage(true);comments.log("no existing comments to render")}}},recursiveAddComments:function(comments,from,onCompleteHandler){var begin=new Date().getTime();var needToFork=false;for(var i=from;i<comments.length;i++){this.addComment(comments[i],false);if(new Date().getTime()-begin>500){from=i+1;needToFork=true;break}}if(needToFork){var self=this;setTimeout(function(){self.recursiveAddComments(comments,from,onCompleteHandler)},0)}else{if(null!=onCompleteHandler){onCompleteHandler.call()}}},incRepliesCount:function(parentID){parentComment=this.commentsMap[parentID];if(null!=parentComment){if(null==this.repliesCountMap[parentID]){this.repliesCountMap[parentID]=1}else{this.repliesCountMap[parentID]++}parentComment.repliesCount.innerHTML=this.repliesCountMap[parentID];this.incRepliesCount(parentComment.comment.parentID)}return false},decRepliesCount:function(parentID,count){parentComment=this.commentsMap[parentID];if(null!=parentComment){if(null!=this.repliesCountMap[parentID]&&0<this.repliesCountMap[parentID]){this.repliesCountMap[parentID]-=count}if(this.repliesCountMap[parentID]>0){parentComment.repliesCount.innerHTML=this.repliesCountMap[parentID]}else{this.repliesCountMap[parentID]=0;parentComment.repliesLink.style.display="none"}this.decRepliesCount(parentComment.comment.parentID,count)}return false},addComment:function(comment,isNew){if(typeof comment=="undefined"||null==comment||comment==""){comments.log("cannot render empty comment object");return}var isGuest=this.guest;var sessionUserid=this.config.session.userID;var commentDiv=document.createElement("div");commentDiv.id="comment-cont-"+comment.id;fw.cos.cm.Utils.log("start comment generation for "+commentDiv.id);var parentComment=null;if(this.config.threading){fw.cos.cm.Utils.log("looking for parent to attach: #"+comment.parentid);parentComment=this.commentsMap[comment.parentID];fw.cos.cm.Utils.log("Found parent object  #"+parentComment);if(null!=parentComment){fw.cos.cm.Utils.log("appending child to parent node: "+comment.id);parentComment.commentRepliesCont.appendChild(commentDiv);parentComment.repliesLink.style.display="block";this.incRepliesCount(comment.parentID);parentComment.removeReplyArea()}else{fw.cos.cm.Utils.log("warning: cannot find parent node by #"+comment.parentID+" for comment #"+comment.id+", adding a comment at first level");if(isNew){this.csBodyNewComments.style.display="block";this.csBodyNewComments.appendChild(commentDiv)}else{this.csBodyPostedComments.appendChild(commentDiv)}}}else{if(this.csBodyPostedComments.childNodes.length>0&&!this.config.orderingAsc&&isNew){this.csBodyPostedComments.insertBefore(commentDiv,this.csBodyPostedComments.childNodes[0])}else{if(isNew){this.csBodyNewComments.style.display="block";this.csBodyNewComments.appendChild(commentDiv)}else{this.csBodyPostedComments.appendChild(commentDiv)}}}var comment=new cos.comments.views.Comment({parentWidget:this,comment:comment,dataURL:this.dataURL,siteid:this.siteid,feedid:this.resid,isGuest:isGuest,sessionUserid:sessionUserid,config:this.config,parent:parentComment},commentDiv);if(isNew){comment.focus();this.csControlsElem.itemsCount++;this.csControlsElem.refreshItemsCount()}this.comments.push(comment);this.commentsMap[comment.comment.id]=comment;this.showNoCommentsMessage(false)},deleteComment:function(commentid){for(var i=0;i<this.comments.length;++i){if(commentid==this.comments[i].comment.id){var toDelete=this.comments[i];var decCount=1;if(null!=this.repliesCountMap[toDelete.comment.id]){decCount+=this.repliesCountMap[toDelete.comment.id]}this.decRepliesCount(toDelete.comment.parentID,decCount);toDelete.uidijit.destroy(false);toDelete.destroy(false);this.comments.splice(i,1);break}}delete this.commentsMap[commentid];this.csControlsElem.itemsCount-=decCount;this.csControlsElem.refreshItemsCount();if(!this.comments.length||this.comments.length==0){this.showNoCommentsMessage(true)}},showNoCommentsMessage:function(show){if(show===true&&this.config.permissions.showPostedComments===true){this.csBodyNoComments.style.display="block"}else{this.csBodyNoComments.style.display="none"}},includePostCommentForm:function(){fw.cos.cm.Utils.log("Start including post form for feed #"+this.resid);if(this.postCommentsForm!=null){this.postCommentsForm.deleteAll();this.postCommentsForm.destroy(false);this.postCommentsForm=null}var postCommentFormPlace=document.createElement("div");if(this.config.commentBoxTop){this.csBodyPostCommentTop.appendChild(postCommentFormPlace)}else{this.csBodyPostCommentBottom.appendChild(postCommentFormPlace)}this.postCommentsForm=new cos.comments.views.PostCommentForm({parent:this,siteid:this.siteid,signoutFeature:this.signoutFeature,authUrl:this.authUrl,usersUrl:this.usersUrl,feedid:this.resid,dataURL:this.dataURL,isGuest:this.guest,setFocus:!this.boot&&this.focusOnForm,config:this.config},postCommentFormPlace);if(this.focusOnForm===true){this.focusOnForm=false}},finishEditing:function(respComment){var editedComment=this.commentsMap[respComment.id];if(null!=editedComment){editedComment.finishEditing(respComment)}else{fw.cos.cm.Utils.log("Failed to find comment object by id# "+respComment.id)}},finishFlaging:function(commentid){var flagedComment=this.commentsMap[commentid];if(null!=flagedComment){flagedComment.removeFlagArea()}else{fw.cos.cm.Utils.log("Failed to find comment object by id# "+commentid)}},finishEditingError:function(commentid){var editedComment=this.commentsMap[commentid];if(null!=editedComment){editedComment.removeEditArea()}},includeSigninForm:function(){this.signinFeature.setSigninListener(fw.cos.cm.signinListener);this.signinFeature.process()},cleanPostCommentForm:function(){if(null!=this.postCommentsForm){this.postCommentsForm.commentBodyText.cleanValue();if(null!=this.postCommentsForm.commentCaptcha){this.postCommentsForm.commentCaptcha.hideError();this.postCommentsForm.commentCaptcha.setValue("")}}},deleteAll:function(){this.deleteComments();if(null!=this.csSigninElem){this.csSigninElem.destroy(false);this.csSigninElem=null}if(null!=this.postCommentsForm){this.postCommentsForm.deleteAll();this.postCommentsForm.destroy(false);this.postCommentsForm=null}this.repliesCountMap={}},deleteComments:function(){for(var key in this.commentsMap){var uidijit=dijit.byId("comment"+key+"uidijit");if(null!=uidijit){uidijit.destroy(false)}this.commentsMap[key].destroy(false)}this.comments=new Array()},refreshFeed:function(postformFocus){this.pendingStatus(true);comments.log("Comments.refreshFeed("+postformFocus+")");if(typeof postformFocus!="undefined"){this.focusOnForm=postformFocus}this.deleteAll();fw.cos.cm.jsonp.getCommentsFeed(this)},handleWrongCaptcha:function(message){if(this.currentReplyForm!=null){this.currentReplyForm.saveInProgress=false;this.currentReplyForm.replyCaptcha.showError(message);this.currentReplyForm.captchaPictureReply.src=this.dataURL+"/captcha.jpg?r="+Math.random()}else{this.postCommentsForm.commentCaptcha.showError(message);this.postCommentsForm.captchaPicture.src=this.dataURL+"/captcha.jpg?r="+Math.random()}}});dojo.declare("cos.comments.views.CommentsControls",[dijit._Widget,dijit._Templated],{config:null,parent:null,paginationElem:null,itemsCount:0,message_comments:cos.comments.messages.get("label.comments"),message_expand_all:cos.comments.messages.get("link.expand_all"),message_collapse_all:cos.comments.messages.get("link.collapse_all"),message_sort_by:cos.comments.messages.get("label.sort_by"),message_sort_by_desc:cos.comments.messages.get("label.sort_by_desc"),message_sort_by_asc:cos.comments.messages.get("label.sort_by_asc"),templateString:"                <div>    <br/>    <div class='comments_title comments_left'>(<div dojoAttachPoint='commentsCountDiv' style='display: inline;'></div>) ${message_comments}</div>    <div class='comments_right comments_blinks' dojoAttachPoint='expandCollapseCont' style='display: none;'>    <a href='javascript:fw.dijit.UIComment.expandAll()'>${message_expand_all}</a> | <a href='javascript:fw.dijit.UIComment.collapseAll()'>${message_collapse_all}</a>    </div>    <div class='comments_clear'></div>    <br/>    <div class='comments_left' dojoAttachPoint='orderByCont'>        <span class='comments_sortlabel'>${message_sort_by}</span>        <select id='simplecb' dojoAttachEvent='onchange:_onOrderChange' dojoAttachPoint='orderByControl'>            <option value='false'>${message_sort_by_desc}</option>            <option value='true'>${message_sort_by_asc}</option>        </select>    </div>    <div class='comments_right comments_plinks' dojoAttachPoint='paginationCont'></div>    <div class='comments_clear'></div>    <div class='comments_mb20'></div></div>                        ",postCreate:function(){this.refreshItemsCount();if(this.config.threading){this.orderByCont.style.display="none";this.expandCollapseCont.style.display="block"}else{if(this.config.pagination&&this.config.paginationFrame>0){var paginationDiv=document.createElement("div");this.paginationCont.appendChild(paginationDiv);this.paginationElem=new cos.comments.views.CommentsPagination({parent:this.parent},paginationDiv)}var i;for(i=0;i<this.orderByControl.options.length;i++){if(this.orderByControl.options[i].value==this.config.orderingAsc.toString()){this.orderByControl.selectedIndex=i;break}}}},_onOrderChange:function(event){this.parent.config.orderingAsc=(this.orderByControl.value==="true");fw.cos.cm.Utils.saveOrderingCookie(this.orderByControl.value);this.parent.pageNo="1";this.parent.refreshFeed()},refreshItemsCount:function(){this.commentsCountDiv.innerHTML=this.itemsCount}});dojo.declare("cos.comments.views.CommentsPagination",[dijit._Widget,dijit._Templated],{parent:null,changingPageInProgress:false,message_page:cos.comments.messages.get("label.page"),templateString:"               <div>    ${message_page}&nbsp;    <div dojoAttachPoint='prevPageDiv' style='display: none;'><a href='javascript:void(0);' dojoAttachEvent='onclick:_onPreviousClick'>&lt;</a></div>    <div dojoAttachPoint='prev2PageDiv' style='display: none;'><a href='javascript:void(0);' dojoAttachEvent='onclick:_onMinus2Click'><div dojoAttachPoint='prev2PageNoDiv' style='display: inline;'></div></a></div>    <div dojoAttachPoint='prev1PageDiv' style='display: none;'><a href='javascript:void(0);' dojoAttachEvent='onclick:_onPreviousClick'><div dojoAttachPoint='prev1PageNoDiv' style='display: inline;'></div></a></div>    &nbsp;<div dojoAttachPoint='currentPageNoDiv' style='display: inline;'>1</div>    <div dojoAttachPoint='next1PageDiv' style='display: none;'><a href='javascript:void(0);' dojoAttachEvent='onclick:_onNextClick'><div dojoAttachPoint='next1PageNoDiv' style='display: inline;'>2</div></a></div>    <div dojoAttachPoint='next2PageDiv' style='display: none;'><a href='javascript:void(0);' dojoAttachEvent='onclick:_onPlus2Click'><div dojoAttachPoint='next2PageNoDiv' style='display: inline;'>3</div></a></div>    &nbsp;<div dojoAttachPoint='nextPageDiv' style='display: none;'><a href='javascript:void(0);' dojoAttachEvent='onclick:_onNextClick'>&gt;</a></div></div>                        ",postCreate:function(){this.refresh(this.parent.config.paginationFrame)},_onNextClick:function(event){if(this.changingPageInProgress==false){this.parent.pageNo++;fw.cos.cm.jsonp.getCommentsPage(this.parent);this.changingPageInProgress=true}return false},_onPreviousClick:function(event){if(this.parent.pageNo>1&&this.changingPageInProgress==false){this.parent.pageNo--;fw.cos.cm.jsonp.getCommentsPage(this.parent);this.changingPageInProgress=true}return false},_onPlus2Click:function(event){if(this.changingPageInProgress==false){this.parent.pageNo=parseInt(this.parent.pageNo)+2;fw.cos.cm.jsonp.getCommentsPage(this.parent);this.changingPageInProgress=true}return false},_onMinus2Click:function(event){if(this.parent.pageNo>2&&this.changingPageInProgress==false){this.parent.pageNo=this.parent.pageNo-2;fw.cos.cm.jsonp.getCommentsPage(this.parent);this.changingPageInProgress=true}return false},refresh:function(itemsPaginationFrame){if(this.parent.pageNo>2){this.prev2PageNoDiv.innerHTML=this.parent.pageNo-2;this.prev2PageDiv.style.display="inline"}else{this.prev2PageDiv.style.display="none"}if(this.parent.pageNo>1){this.prevPageDiv.style.display="inline";this.prev1PageNoDiv.innerHTML=this.parent.pageNo-1;this.prev1PageDiv.style.display="inline"}else{this.prevPageDiv.style.display="none";this.prev1PageDiv.style.display="none"}this.currentPageNoDiv.innerHTML=this.parent.pageNo;if(itemsPaginationFrame>0){this.nextPageDiv.style.display="inline";this.next1PageNoDiv.innerHTML=parseInt(this.parent.pageNo)+1;this.next1PageDiv.style.display="inline"}else{this.nextPageDiv.style.display="none";this.next1PageDiv.style.display="none"}if(itemsPaginationFrame>1){this.next2PageNoDiv.innerHTML=parseInt(this.parent.pageNo)+2;this.next2PageDiv.style.display="inline"}else{this.next2PageDiv.style.display="none"}globalCommentActivity=false;this.changingPageInProgress=false}});dojo.require("fw.dijit.UIInput");dojo.require("fw.dijit.UITextarea");dojo.declare("cos.comments.views.PostCommentForm",[dijit._Widget,dojox.dtl._HtmlTemplated],{parent:null,siteid:null,feedid:null,dataURL:null,isGuest:null,widgetsInTemplate:true,config:null,csSigninElem:null,commentBodyText:null,signoutFeature:null,authUrl:null,usersUrl:null,showGuestForm:false,showEmailBox:false,showCommentBox:false,setFocus:false,showTitle:false,caprnd:Math.random(),message_post_comment:cos.comments.messages.get("label.post_a_comment"),message_name:cos.comments.messages.get("label.name"),message_email:cos.comments.messages.get("label.email"),message_comment:cos.comments.messages.get("label.comment"),message_captcha:cos.comments.messages.get("label.captcha"),templateString:"	                    <div class='comments_postComment'>    <div class='comments_title'  id='comments_title_id'>{{message_post_comment}}</div>    <div class='comments_mb20'/></div>    <div dojoAttachPoint='csSigninId'></div>    <div dojoAttachPoint='postCommentFormCont'>        <div class='comments_mb20'/></div>{% ifequal showGuestForm true %}<div class='comments_col1'>                    <div class='comments_title comments_right'>{{message_name}}</div>                </div>                <div class='comments_col2'>                    <input type='text' dojoType='fw.dijit.UIInput' id='cos_comment_name_dijit'  dojoAttachPoint='commentUserName' maxlength='100'/>                </div>                <div class='comments_clear'></div>{% ifequal showEmailBox true %}<div class='comments_col1'>                    <div class='comments_title comments_right'>{{message_email}}</div>                </div>                <div class='comments_col2'>                    <input type='text' dojoType='fw.dijit.UIInput' id='cos_comment_email_dijit' dojoAttachPoint='commentEmail'/>                </div>                <div class='comments_clear'></div>{% endifequal %}<div class='comments_col1'>                </div>                <div class='comments_col2'>                    <img dojoAttachPoint='captchaPicture' src='' name='cos_captcha'>                </div>                <div class='comments_clear'></div>                <div class='comments_col1'>                    <div class='comments_title comments_right'>{{message_captcha}}</div>                </div>                <div class='comments_col2'>                    <input type='text' dojoType='fw.dijit.UIInput' id='cos_comment_captcha_dijit' dojoAttachPoint='commentCaptcha'/>                </div>                <div class='comments_clear'></div>				{% endifequal %}{% ifequal showCommentBox true %}<div>                <div class='comments_clear'></div>                <div class='comments_col1'>                    <div class='comments_title comments_right'>{{message_comment}}</div>                </div>                <div class='comments_col2' id='post_comment'>                    <div dojoType='fw.dijit.UITextarea' id='cos_comment_body_dijit' dojoAttachPoint='commentBodyText' style='width:95%;'></div>                    <div class='comments_clear'></div>                    <div class='comments_formBtnSpacing'></div>                    <a href='javascript:void(0);' dojoAttachEvent='onclick:_postComment'><img dojoAttachPoint='submitImg' src='' border='0'/></a>                </div>                <div class='comments_clear'></div>                <br/>            </div>{% endifequal %}</div></div>			",buildRendering:function(){fw.cos.cm.Utils.log("postcommentform: build rendering ctor begin");this.deleteAll();this.showGuestForm=this.isGuest===true&&this.config.permissions.guestPostsAllowed===true;this.showEmailBox=this.showGuestForm===true&&this.config.permissions.guestEmailRequired===true;this.showCommentBox=this.isGuest===false||this.showGuestForm;this.inherited(arguments);if(this.captchaPicture){this.captchaPicture.src=this.dataURL+"captcha.jpg?r="+Math.random()}fw.cos.cm.Utils.log("postcommentform: build rendering ctor finish")},postCreate:function(){comments.log("PostCommentForm.postCreate beginning....");try{if(null!=this.commentBodyText){this.commentBodyText.scrollOnFocus=false}if(typeof this.commentUserName!="undefined"){this.commentUserName.scrollOnFocus=false}if(typeof this.commentEmail!="undefined"){this.commentEmail.scrollOnFocus=false}if(typeof this.submitImg!="undefined"){this.submitImg.src=this.dataURL+"images/buttons/"+cos.comments.messages.language+"/submit.png"}fw.cos.cm.Utils.log("postform: postCreate "+this.isGuest);var signinDiv=document.createElement("div");this.csSigninId.appendChild(signinDiv);fw.cos.cm.Utils.log("including Signin view for "+this.isGuest);if(null!=this.csSigninElem){this.csSigninElem.destroy(false)}comments.log("PostCommentForm.postCreate including signin bar...");this.csSigninElem=new cos.comments.views.Signin({provider:this.config.session.provider,userTitle:this.config.session.displayName,parent:this,isGuest:this.isGuest,userPic:fw.cos.cm.Conf.DataRepUrl+this.config.session.avatar,signoutFeature:this.signoutFeature,authUrl:this.authUrl,usersUrl:this.usersUrl,userprofile:this.config.getUserProfileByID(this.config.session.userID)},signinDiv);comments.log("PostCommentForm.postCreate signin bar included.");this.inherited(arguments);comments.log("PostCommentForm.postCreate finished.");comments.log("postform.setFocus:");comments.log(this.setFocus);if(this.showCommentBox===true&&null!=this.commentBodyText&&this.setFocus===true){comments.log("scrolling to comment form...");if(typeof this.commentUserName!="undefined"&&null!=this.commentUserName){this.commentUserName.focus()}else{this.commentBodyText.focus()}var formContainer=dojo.byId("comments_title_id");fw.cos.cm.scrollTo(formContainer);comments.log("PostCommentForm.postCreate setFocus applied");this.setFocus=false}}catch(err){comments.log("ERROR PostCommentForm.postCreate  "+err);throw err}},deleteAll:function(){fw.cos.cm.Utils.log("releasing resources on postform");if(null!=dijit.byId("cos_comment_name_dijit")){dijit.byId("cos_comment_name_dijit").destroy(false)}if(null!=dijit.byId("cos_comment_email_dijit")){dijit.byId("cos_comment_email_dijit").destroy(false)}if(null!=dijit.byId("cos_comment_captcha_dijit")){dijit.byId("cos_comment_captcha_dijit").destroy(false)}if(null!=dijit.byId("cos_comment_body_dijit")){dijit.byId("cos_comment_body_dijit").destroy(false)}},_postComment:function(event){if(dojo.trim(this.commentBodyText.getValue())==""){comments.ui.showErrorMessage(cos.comments.messages.get("message.comment_body_required"));this.commentBodyText.focus();return}else{var commArr={username:null,email:null,comment:this.commentBodyText.getValue(),config:this.config,isguest:this.isGuest,captcha:null};if(this.isGuest){if(this.config.permissions.guestPostsAllowed==true){if(this.commentUserName.value.replace(/^\s*|\s*$/g,"")!=""){commArr.username=this.commentUserName.value}if(this.config.permissions.guestEmailRequired){commArr.email=this.commentEmail.value}commArr.captcha=this.commentCaptcha.value}}var hasErrors=false;if(commArr.comment.length>this.config.commentMaxLen){hasErrors=true;comments.ui.showErrorMessage(cos.comments.messages.get("error.long_comment_body",this.config.commentMaxLen));this.commentBodyText.focus()}if(this.isGuest){if(this.config.permissions.guestPostsAllowed==true){if(this.config.permissions.guestNameRequired){this.commentUserName.hideError();if(commArr.username==null||commArr.username.replace(/^\s*|\s*$/g,"")==""){hasErrors=true;this.commentUserName.showError(cos.comments.messages.get("message.user_name_required"))}}if(this.config.permissions.guestEmailRequired){this.commentEmail.hideError();if(commArr.email==null||commArr.email.replace(/^\s*|\s*$/g,"")==""){hasErrors=true;this.commentEmail.showError(cos.comments.messages.get("message.email_required"))}else{if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(commArr.email)){hasErrors=true;this.commentEmail.showError(cos.comments.messages.get("error.email_invalid"))}}}}}if(!hasErrors){comments.ui.clearInfoMessage();this.parent.currentReplyForm=null;fw.cos.cm.jsonp.postComment(commArr,this.siteid,this.feedid,this.config)}}return false}});dojo.declare("cos.comments.views.Signin",[dijit._Widget,dojox.dtl._HtmlTemplated],{templateString:"	           {% ifequal isGuest true %}	<div>        <a href='javascript:void(0);' dojoAttachEvent='onclick:_onSigninClick'>{{message_login}}</a> | <a href='javascript:void(0);'  dojoAttachEvent='onclick:_onRegisterClick'>{{message_register}}</a>{% ifequal parent.config.permissions.guestPostsAllowed true%} | <a href='javascript:void(0);'  dojoAttachEvent='onclick:_onPostAnonymous'>{{message_post_as_guest}}</a>{% endifequal  %}        <br/>        <div dojoAttachPoint='loginRegiserCont'>            <div dojoAttachPoint='loginRegiserContMsg' style='display: inline;'>{% ifequal parent.config.permissions.guestPostsAllowed true%}{{message_email_name_policy}}{% else %}{{message_login_or_register}}{% endifequal  %}</div><br>        </div>        <div dojoAttachPoint='loginMessageCont' style='display: none;'>           <div class='infobox'><b>{{message_info}}</b>&nbsp;<div dojoAttachPoint='loginMessageContMsg' style='display: inline;'>&nbsp;</div></div>        </div>        <div class='comments_mb20'/></div>        <div class='comments_hr'></div>        <div align='center'>             <div class='logincont' dojoAttachPoint='logincont'>               <div id='loginDiv'>               </div>               <div class='logincontForgorPwd'><a href='javascript:void(0);' dojoAttachEvent='onclick:_onForgotPasswordClick'>{{message_forgot_password}}</a></div>             </div>        </div>	</div>{% else %}    <div>        <div class='comments_col1'>            <div class='comments_usersThumb comments_right' dojoAttachPoint='usernamePic'><img dojoAttachPoint='userPicImg' src='{{userPic}}' border='0'/></div>        </div>        <div class='comments_col2'>            <div class='comments_userDetails comments_left'>                <div class='comments_small'>{{message_loged_in_as}}</div>                <div class='comments_username' dojoAttachPoint='usernameDiv'>&nbsp;</div>            </div>            <div class='comments_userActions comments_left'>                <a href='javascript:void(0)' dojoAttachEvent='onclick:_onEditProfileClick'>{{message_edit_profile}}</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='javascript:void(0)' dojoAttachEvent='onclick:_onSignoutClick'>{{message_logout}}</a>            </div>            <div class='comments_clear'></div>        </div>        <div class='comments_mb20'/></div>    </div>{% endifequal  %}		                ",provider:null,userPic:null,authUrl:null,usersUrl:null,isGuest:null,signoutFeature:null,parent:null,isSigninShown:false,userprofile:null,message_login:cos.comments.messages.get("link.login"),message_register:cos.comments.messages.get("link.register"),message_post_as_guest:cos.comments.messages.get("link.post_as_guest"),message_email_name_policy:cos.comments.messages.get("message.email_name_policy"),message_login_or_register:cos.comments.messages.get("message.login_or_register"),message_info:cos.comments.messages.get("message.info"),message_forgot_password:cos.comments.messages.get("link.forgot_password"),message_loged_in_as:cos.comments.messages.get("label.logged_in_as"),message_edit_profile:cos.comments.messages.get("link.edit_profile"),message_logout:cos.comments.messages.get("link.logout"),postCreate:function(){if(null!=this.userprofile){this.usernameDiv.innerHTML=cos.InsertWordBreaks(cos.escapeHtml(this.userprofile.displayname),5);if(typeof(this.userprofile.userpicurl)!="undefined"){this.userPicImg.src=this.usersUrl+this.userprofile.userpicurl+"?dc="+new Date().getTime()}}},_onSignoutClick:function(event){this.signoutFeature.setSignoutListener(fw.cos.cm.signoutListener);this.signoutFeature.signoutHandler();return false},_onSigninClick:function(event){if(this.isSigninShown==false){this.logincont.style.visibility="visible";this.logincont.style.display="block";this.parent.postCommentFormCont.style.display="none";wem.sso.auth.startSignin("loginDiv",this.authUrl,320,115);this.isSigninShown=true;window.scrollBy(0,80)}return false},_onRegisterClick:function(event){this.revertMsg();wem_users_register.showDialog(this);return false},_onRegisterClickCallback:function(msg){this.loginRegiserCont.style.display="none";this.loginMessageContMsg.innerHTML=msg;this.loginMessageCont.style.display="inline"},_onForgotPasswordClick:function(){this.revertMsg();wem_users_forgotpassword.showDialog(this);return false},_onForgotPasswordCallback:function(msg){this.loginRegiserCont.style.display="none";this.loginMessageContMsg.innerHTML=msg;this.loginMessageCont.style.display="inline";this._onSigninClick(null)},_onEditProfileClick:function(event){wem_users_edtprofile.showDialog(this);return false},_onPostAnonymous:function(event){if(this.isSigninShown==true){this.logincont.style.visibility="hidden";this.logincont.style.display="none";this.parent.postCommentFormCont.style.display="none";wem.sso.auth.cancelSignin("loginDiv");this.isSigninShown=false;if(this.parent.config.permissions.guestPostsAllowed){this.parent.postCommentFormCont.style.display="block"}}this.parent.commentUserName.focus();return false},setUserProfile:function(profile){if(null!=profile){this.usernameDiv.innerHTML=profile.displayname;if(typeof(profile.userpicurl)!="undefined"){this.userPicImg.src=this.usersUrl+profile.userpicurl+"?dc="+new Date().getTime()}profile.userid=this.parent.config.session.userID;this.parent.config.addOrUpdateUserProfile(profile);fw.cos.cm.jsonp.getSession(this.parent.siteid,this.parent.feedid,"true")}return false},revertMsg:function(profile){this.loginRegiserCont.style.display="inline";this.loginMessageCont.style.display="none"}});if(typeof(fw)=="undefined"||typeof(fw.core)=="undefined"||typeof(fw.cos)=="undefined"){throw"core feature library is requried"}var commentsTags=new Array();fw.cos.cm={};fw.cos.cm.jsonp={};fw.cos.cm.jsonp.version="0.1";fw.cos.cm.Conf={};fw.cos.cm.Auth={};fw.cos.cm.Utils={};fw.cos.cm.Session={};fw.cos.cm.Utils.orderCookieName="comments-ascOrdering";fw.cos.cm.Utils.flagCookieName="comment-flaging-";fw.cos.cm.Conf.IdPUrl=casIdPUrl;fw.cos.cm.Conf.AuthUrl=casAuthUrl;fw.cos.cm.Conf.DataRepUrl=cosDataRepUrl;fw.cos.cm.Conf.UsersUrl=casUsersUrl;var comments;if(typeof comments=="undefined"){comments={}}comments.ui={};comments.ui.showInfoMessage=function(msg){document.getElementById("messages").innerHTML="<div style='margin-top:20px;color:#333333; border:1px solid #dbdfe1; height:24px; line-height:24px; font-size:14px; background-color:#FFFFFF;padding-left:35px;margin-bottom:10px;font-family: Tahoma,Verdana,Geneva,sans-serif;'>"+msg+"</div>"};comments.ui.clearInfoMessage=function(){document.getElementById("messages").innerHTML=""};comments.ui.showErrorMessage=function(msg){document.getElementById("messages").innerHTML="<div style='margin-top:20px;color:#990000; border:1px solid #dbdfe1; height:24px; line-height:24px; font-size:14px; background-color:#FFFFFF;padding-left:35px;margin-bottom:10px;font-family: Tahoma,Verdana,Geneva,sans-serif;'>"+msg+"</div>";comments.ui.focusMessage()};comments.ui.focusMessage=function(){var e=document.getElementById("messages");var top=0;while(e.offsetParent){top+=e.offsetTop;e=e.offsetParent}top+=e.offsetTop;window.scroll(0,top-50)};comments.rest={};comments.rest.call=function(method,params,callbackName){var scriptUrl=fw.cos.cm.Conf.DataRepUrl+"rest/v"+fw.cos.cm.jsonp.version+"/"+method+".js?";if(null==params){params={}}params.r=Math.random();fw.cos.cm.jsonp.callURL(method,params,callbackName,scriptUrl)};comments.log=function(msg){if(typeof console!=="undefined"&&typeof console.log!="undefined"){console.log("cos:comments - "+msg+"\n")}};fw.cos.cm.scrollTo=function(element){var pos=fw.cos.cm.cumulativeOffset(element);window.scrollTo(pos[0],pos[1])};fw.cos.cm.cumulativeOffset=function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent}while(element);return[valueL,valueT]};fw.cos.cm.Utils.log=function(msg){if(typeof console!=="undefined"){console.log("cos:comments - "+msg+"\n")}};fw.cos.cm.load=function(tagObject){var tagName=tagObject.name;var attributes=tagObject.attributes;var element=tagObject.element;if(tagName=="comments"){if(!attributes.resource_id){attributes.resource_id=dojox.encoding.digests.MD5(window.location.pathname+window.location.search,dojox.encoding.digests.outputTypes.Hex)}if(!attributes.resource_title){attributes.resource_title=document.title}if(typeof(attributes.resource_url)=="undefined"){var loc=window.location;attributes.resource_url=loc.protocol+"//"+loc.host+loc.pathname+loc.search}var commentsTag=new cos.comments.views.Comments({attributes:attributes,resid:attributes.resource_id,siteid:attributes.site_id,dataURL:fw.cos.cm.Conf.DataRepUrl,authUrl:fw.cos.cm.Conf.AuthUrl,usersUrl:fw.cos.cm.Conf.UsersUrl,resourceTitle:attributes.resource_title,signinFeature:fw.core.getFeature("wem:signin"),signoutFeature:fw.core.getFeature("wem:signout")},element);commentsTags.push(commentsTag)}};fw.cos.cm.run=function(){fw.cos.cm.Utils.log("Start processing cos:comments tags ");if(cos!=undefined){if(cos.pageWidgets!=undefined){for(var i=0;i<cos.pageWidgets.length;i++){if(cos.pageWidgets[i].name=="comments"){fw.cos.cm.load(cos.pageWidgets[i])}}}}};fw.cos.cm.Utils.saveOrderingCookie=function(value){fw.cos.cm.Utils.saveCookie(fw.cos.cm.Utils.orderCookieName,value);return false};fw.cos.cm.Utils.saveFlagingCookie=function(userID,commentID,value){fw.cos.cm.Utils.saveCookie(fw.cos.cm.Utils.getFlagingCookieKey(userID,commentID),value);return false};fw.cos.cm.Utils.getFlagingCookieKey=function(userID,commentID){return fw.cos.cm.Utils.flagCookieName+userID+"-"+commentID};fw.cos.cm.Utils.saveCookie=function(name,value){var cookie=fw.cos.cm.Utils.getCookie(name);cookie="";var expires=30*1000*60*60*24;var expires_date=new Date(new Date().getTime()+(expires));document.cookie=name+"="+value+";expires="+expires_date.toGMTString()+";path=/";return false};fw.cos.cm.Utils.getFlagingCookie=function(userID,commentID){return fw.cos.cm.Utils.getCookie(fw.cos.cm.Utils.getFlagingCookieKey(userID,commentID))};fw.cos.cm.Utils.getCookie=function(name){var cookie=" "+document.cookie;var search=" "+name+"=";var setStr=null;var offset=0;var end=0;if(cookie.length>0){offset=cookie.indexOf(search);if(offset!=-1){offset+=search.length;end=cookie.indexOf(";",offset);if(end==-1){end=cookie.length}setStr=unescape(cookie.substring(offset,end))}}return(setStr)};fw.cos.cm.jsonp.callURL=function(method,params,callback,scriptUrl){fw.cos.cm.Utils.log("call method: "+method);var funcLoad=function(resp,ioArgs){fw.cos.cm.Utils.log("callback run");var callBackFunction=eval(this.load.callback);if(!callBackFunction){fw.cos.cm.Utils.log("can not find function:"+this.load.callback);return}if(resp.status&&resp.status=="success"){if(resp.message!=""&&resp.message!="OK"){comments.ui.showInfoMessage(resp.message)}fw.cos.cm.Utils.log("Success requesting jsonp/"+this.load.method+": "+resp.message)}else{if(resp.message!=""&&resp.errorcode=="0"){comments.ui.showErrorMessage(resp.message)}fw.cos.cm.Utils.log("Error requesting jsonp/"+this.load.method+": "+resp.message)}fw.cos.cm.Utils.log("jsonp callback: "+this.load.callback);callBackFunction(resp)};funcLoad.callback=callback;funcLoad.method=method;var jsonpArgs={url:scriptUrl,callbackParamName:"cosrestcallback",content:params,load:funcLoad,timeout:30000,error:function(error){comments.ui.showInfoMessage(cos.comments.messages.get("error.cos_unavailable"))}};if(fw.browser.IE&&/MSIE 6/i.test(navigator.userAgent)){var ieFunk=function(){dojo.io.script.get(jsonpArgs)};window.setTimeout(ieFunk,0)}else{dojo.io.script.get(jsonpArgs)}};fw.cos.cm.jsonp.call=function(method,params,callback,scriptUrl){var scriptUrl=fw.cos.cm.Conf.DataRepUrl+"jsonp/"+fw.cos.cm.jsonp.version+"/"+method+".js";fw.cos.cm.jsonp.callURL(method,params,callback,scriptUrl)};fw.cos.cm.signinListener=function(msg){fw.cos.cm.Utils.log("received signin completed event,refreshing feed...	");fw.cos.cm.refreshAllFeeds(true);fw.cos.cm.focusOnComments()};fw.cos.cm.signoutListener=function(){fw.cos.cm.Utils.log("received signout finished event,refreshing feed...	");fw.cos.cm.refreshAllFeeds();fw.cos.cm.focusOnComments()};fw.cos.cm.focusOnComments=function(){fw.cos.cm.Utils.log("focusing on comments feed...");var feedContainer=dojo.byId("comments");if("scrollIntoView" in feedContainer){feedContainer.scrollIntoView(true)}else{window.location.hash="comments"}};fw.cos.cm.jsonp.getCommentsFeed=function(comment){fw.cos.cm.Utils.log("Sending getFeed");var attributes=comment.attributes;var params={};for(var key in attributes){params[key]=attributes[key]}var orderCookie=fw.cos.cm.Utils.getCookie(fw.cos.cm.Utils.orderCookieName);if(null!=orderCookie){if(orderCookie=="true"){params.order_by="date_asc"}else{params.order_by="date_desc"}}comments.rest.call("tags/comments/feed",params,"fw.cos.cm.jsonp.getFeedResponse")};fw.cos.cm.doSignout=function(){wem.sso.signout.doSignout()};fw.cos.cm.jsonp.getFeedResponse=function(resp){comments.log("getFeedResponse came from server");if(resp.status&&resp.status=="success"){if(resp.message!=""&&resp.message!="OK"){comments.ui.showInfoMessage(resp.message)}fw.cos.cm.Utils.log("Received getFeedResponse ");for(var i=0;i<commentsTags.length;i++){if(commentsTags[i].resid==resp.resource_id&&commentsTags[i].siteid==resp.site_id){var conf=new cos.comments.CommentConfig();conf.init(resp.session,resp.settings,resp.usersprofiles,fw.cos.cm.Conf.UsersUrl);conf.paginationFrame=resp.itemsPaginationFrame;conf.itemsCount=resp.itemsCount;var data=resp.items;if(typeof data=="undefined"){data=[]}fw.cos.cm.Utils.log("rendering comments... ");try{var handler=null;if(conf.threading&&resp.itemsPaginationFrame>0){var lastId=null;if(data instanceof Array){if(data.length>0){lastId=data[data.length-1].id}}var commentTag=commentsTags[i];handler=function(){commentTag.pageNo=2;fw.cos.cm.jsonp.getCommentsPage(commentTag,lastId)}}commentsTags[i].renderComments(data,conf,handler)}catch(err){comments.ui.showErrorMessage(cos.comments.messages.get("error.failed_render_comments",err))}commentsTags[i].boot=false;fw.cos.cm.Utils.log("setting session user: "+resp.session.displayName);break}}}else{if(resp.message&&resp.message!=""){comments.ui.showErrorMessage(resp.message)}else{comments.ui.showErrorMessage(cos.comments.messages.get("error.failed_load_comments"))}fw.cos.cm.Utils.log("Error requesting fw.cos.cm.jsonp.getFeed"+resp.message)}};fw.cos.cm.jsonp.getCommentsPage=function(comment,lastRecordId){fw.cos.cm.Utils.log("Sending getCommentsPage");var attributes=comment.attributes;var params={};for(var key in attributes){params[key]=attributes[key]}var orderCookie=fw.cos.cm.Utils.getCookie(fw.cos.cm.Utils.orderCookieName);if(null!=orderCookie){if(orderCookie=="true"){params.order_by="date_asc"}else{params.order_by="date_desc"}}if(lastRecordId){params.from_id=lastRecordId}comments.rest.call("tags/comments/page/"+comment.pageNo,params,"fw.cos.cm.jsonp.getCommentsPageResponse")};fw.cos.cm.jsonp.getCommentsPageResponse=function(resp){comments.log("getCommentsPageResponse came from server");if(resp.status&&resp.status=="success"){fw.cos.cm.Utils.log("Received getCommentsPageResponse ");for(var i=0;i<commentsTags.length;i++){if(commentsTags[i].resid==resp.resource_id&&commentsTags[i].siteid==resp.site_id){var conf=commentsTags[i].config;var data=resp.items;if(typeof data=="undefined"){data=[]}if(conf.threading){var handler=null;if(resp.itemsPaginationFrame>0){var lastId=null;if(data instanceof Array){if(data.length>0){lastId=data[data.length-1].id}}var commentTag=commentsTags[i];handler=function(){commentTag.pageNo=commentTag.pageNo+1;fw.cos.cm.jsonp.getCommentsPage(commentTag,lastId)}}commentsTags[i].addComments(data,handler)}else{commentsTags[i].deleteComments();commentsTags[i].addComments(data);commentsTags[i].csControlsElem.paginationElem.refresh(resp.itemsPaginationFrame)}break}}}else{if(resp.message!=""){comments.ui.showErrorMessage(resp.message)}fw.cos.cm.Utils.log("Error requesting fw.cos.cm.jsonp.getCommentsPage"+resp.message)}};fw.cos.cm.jsonp.postComment=function(commArr,siteid,feedid,config){var commentBody=commArr.comment;var username=commArr.username;var email=commArr.email;var parent=commArr.parentid;var captcha=commArr.captcha;var commentsStructure=commArr.commentsStructure;var params={site_id:siteid,resource_id:feedid,comment_body:commentBody};if(config.isGuest){if(config.permissions.guestPostsAllowed==true){if((null!=username)&&(username.replace(/^\s*|\s*$/g,"")!="")){params.username=username}if((email!=null)&&(email.replace(/^\s*|\s*$/g,"")!="")){params.email=email}}params.captcha=captcha}if(commentsStructure!=null&&(typeof commentsStructure!="undefined")){params.structure=commentsStructure}if(parent!=null){params.parent_id=parent}fw.cos.cm.pendingCommentBody=commentBody;fw.cos.cm.Utils.log("Sending getFeed");comments.rest.call("tags/comments/postComment",params,"fw.cos.cm.jsonp.postCommentResponse");comments.ui.showInfoMessage(cos.comments.messages.get("message.posting"))};fw.cos.cm.jsonp.postCommentResponse=function(resp){fw.cos.cm.Utils.log("Received postCommentResponse ");if(resp.status&&resp.status=="success"){var captcha=document.images.cos_captcha;if(captcha){var oldurl=captcha.src.split("?")[0];captcha.src=oldurl+"?r"+Math.random()}comments.ui.clearInfoMessage();var data=resp.items;for(var i=0;i<commentsTags.length;i++){if(commentsTags[i].resid==resp.resource_id&&commentsTags[i].siteid==resp.site_id){var conf=new cos.comments.CommentConfig();conf.init(resp.session,resp.settings);if(conf.permissions.showPostedComments){var data=resp.items;commentsTags[i].addComment(data,true)}else{alert(cos.comments.messages.get("message.thank_for_submission"))}commentsTags[i].cleanPostCommentForm();break}}}else{if(resp.errorcode=="102"){for(var i=0;i<commentsTags.length;i++){if(commentsTags[i].resid==resp.resource_id&&commentsTags[i].siteid==resp.site_id){commentsTags[i].handleWrongCaptcha(resp.message);break}}return}if(resp.message!=""){comments.ui.showErrorMessage(resp.message)}else{comments.ui.showErrorMessage(cos.comments.messages.get("error.failed_post_comment"))}fw.cos.cm.Utils.log("Error requesting fw.cos.cm.jsonp.postComment"+resp.message)}};fw.cos.cm.refreshAllFeeds=function(postformFocus){var i;for(i=0;i<commentsTags.length;i++){commentsTags[i].refreshFeed(postformFocus)}};fw.cos.cm.jsonp.deleteComment=function(commentid,siteid,feedid){var params={site_id:siteid,resource_id:feedid,comment_id:commentid};comments.rest.call("tags/comments/deleteComment",params,"fw.cos.cm.jsonp.deleteCommentResponse")};fw.cos.cm.jsonp.deleteCommentResponse=function(resp){fw.cos.cm.Utils.log("Received deleteCommentResponse ");if(resp.status&&resp.status=="success"){fw.cos.cm.Utils.log("Received success for deleteCommentResponse ");for(var i=0;i<commentsTags.length;i++){if(commentsTags[i].resid==resp.resource_id&&commentsTags[i].siteid==resp.site_id){commentsTags[i].deleteComment(resp.comment_id);break}}}else{if(resp.message!=""){comments.ui.showErrorMessage(resp.message)}fw.cos.cm.Utils.log("Error requesting fw.cos.cm.jsonp.deleteComment"+resp.message)}};fw.cos.cm.jsonp.flagComment=function(commentid,siteid,feedid){var params={site_id:siteid,resource_id:feedid,comment_id:commentid};comments.rest.call("tags/comments/flagComment",params,"fw.cos.cm.jsonp.flagCommentResponse")};fw.cos.cm.jsonp.flagCommentResponse=function(resp){fw.cos.cm.Utils.log("processing fw.cos.cm.jsonp.flagCommentResponse ");for(var i=0;i<commentsTags.length;i++){if(commentsTags[i].resid==resp.resource_id&&commentsTags[i].siteid==resp.site_id){commentsTags[i].finishFlaging(resp.comment_id);break}}if(resp.status&&resp.status=="success"){fw.cos.cm.Utils.log("Flagged successfully");fw.cos.cm.Utils.saveFlagingCookie(resp.session.userID,resp.comment_id,"true")}else{if(resp.message!=""){comments.ui.showErrorMessage(resp.message)}}};fw.cos.cm.jsonp.UpdateComment=function(commentid,siteid,feedid,newCommentText){var params={site_id:siteid,resource_id:feedid,comment_id:commentid,comment_body:newCommentText};comments.rest.call("tags/comments/updateComment",params,"fw.cos.cm.jsonp.UpdateCommentResponse")};fw.cos.cm.jsonp.UpdateCommentResponse=function(resp){if(resp.status&&resp.status=="success"){for(var i=0;i<commentsTags.length;i++){if(commentsTags[i].resid==resp.resource_id&&commentsTags[i].siteid==resp.site_id){commentsTags[i].finishEditing(resp.items);break}}}else{for(var i=0;i<commentsTags.length;i++){if(commentsTags[i].resid==resp.resource_id&&commentsTags[i].siteid==resp.site_id){commentsTags[i].finishEditingError(resp.items.id);break}}if(resp.message!=""){comments.ui.showErrorMessage(resp.message)}fw.cos.cm.Utils.log("Error requesting fw.cos.cm.jsonp.updateComment "+resp.message)}};fw.cos.cm.jsonp.getSession=function(siteid,feedid,refreshsession){var params={site_id:siteid,resource_id:feedid,inc_session_version:refreshsession};comments.rest.call("tags/comments/getSession",params,"fw.cos.cm.jsonp.getSessionResponse");return false};fw.cos.cm.jsonp.getSessionResponse=function(resp){fw.cos.cm.Utils.log("Received getSessionResponse ");if(resp.status&&resp.status=="success"){fw.cos.cm.Utils.log("Received success for getSessionResponse ");for(var i=0;i<commentsTags.length;i++){if(commentsTags[i].resid==resp.resource_id&&commentsTags[i].siteid==resp.site_id){var conf=commentsTags[i].config;conf.session=resp.session}}}else{if(resp.message!=""){comments.ui.showErrorMessage(resp.message)}fw.cos.cm.Utils.log("Error requesting fw.cos.cm.jsonp.getSession"+resp.message)}};var cmFeature=new fw.core.Feature("cos.comments",fw.cos.cm.run);fw.core.addFeature(cmFeature.featureID,cmFeature);dojo.addOnLoad(function(){cmFeature.process()})});
