if(typeof dojo=="undefined"){(function(){if(typeof this["djConfig"]=="undefined"){this.djConfig={};}if((!this["console"])||(!console.firebug)){this.console={};}var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","log","profile","profileEnd","time","timeEnd","trace","warn"];var i=0,tn;while(tn=cn[i++]){if(!console[tn]){console[tn]=function(){};}}if(typeof this["dojo"]=="undefined"){this.dojo={};}dojo.global=this;var _4={isDebug:false,allowQueryConfig:false,baseScriptUri:"",baseRelativePath:"",libraryScriptUri:"",preventBackButtonFix:true,delayMozLoadingFix:false};for(var _5 in _4){if(typeof djConfig[_5]=="undefined"){djConfig[_5]=_4[_5];}}var _6=["Browser","Rhino","Spidermonkey","Mobile"];var t;while(t=_6.shift()){dojo["is"+t]=false;}})();dojo.locale=djConfig.locale;dojo.version={major:0,minor:0,patch:0,flag:"dev",revision:Number("$Rev: 10315 $".match(/[0-9]+/)[0]),toString:function(){with(dojo.version){return major+"."+minor+"."+patch+flag+" ("+revision+")";}}};dojo._getProp=function(_8,_9,_a){var _b=_a||dojo.global;for(var i=0,p;_b&&(p=_8[i]);i++){_b=(p in _b?_b[p]:(_9?_b[p]={}:undefined));}return _b;};dojo.setObject=function(_e,_f,_10){var _11=_e.split("."),p=_11.pop(),obj=dojo._getProp(_11,true,_10);return(obj&&p?(obj[p]=_f):undefined);};dojo.getObject=function(_14,_15,_16){return dojo._getProp(_14.split("."),_15,_16);};dojo.exists=function(_17,obj){return !!dojo.getObject(_17,false,obj);};dojo["eval"]=function(_19){return dojo.global.eval?dojo.global.eval(_19):eval(_19);};dojo.deprecated=function(_1a,_1b,_1c){var _1d="DEPRECATED: "+_1a;if(_1b){_1d+=" "+_1b;}if(_1c){_1d+=" -- will be removed in version: "+_1c;}console.debug(_1d);};dojo.experimental=function(_1e,_1f){var _20="EXPERIMENTAL: "+_1e+" -- APIs subject to change without notice.";if(_1f){_20+=" "+_1f;}console.debug(_20);};(function(){var _21={_loadedModules:{},_inFlightCount:0,_hasResource:{},_modulePrefixes:{dojo:{name:"dojo",value:"."},doh:{name:"doh",value:"../util/doh"},tests:{name:"tests",value:"tests"}},_moduleHasPrefix:function(_22){var mp=this._modulePrefixes;return Boolean(mp[_22]&&mp[_22].value);},_getModulePrefix:function(_24){var mp=this._modulePrefixes;if(this._moduleHasPrefix(_24)){return mp[_24].value;}return _24;},_loadedUrls:[],_postLoad:false,_loaders:[],_unloaders:[],_loadNotifying:false};for(var _26 in _21){dojo[_26]=_21[_26];}})();dojo._loadPath=function(_27,_28,cb){var uri=(((_27.charAt(0)=="/"||_27.match(/^\w+:/)))?"":this.baseUrl)+_27;if(djConfig.cacheBust&&dojo.isBrowser){uri+="?"+String(djConfig.cacheBust).replace(/\W+/g,"");}try{return !_28?this._loadUri(uri,cb):this._loadUriAndCheck(uri,_28,cb);}catch(e){console.debug(e);return false;}};dojo._loadUri=function(uri,cb){if(this._loadedUrls[uri]){return true;}var _2d=this._getText(uri,true);if(!_2d){return false;}this._loadedUrls[uri]=true;this._loadedUrls.push(uri);if(cb){_2d="("+_2d+")";}var _2e=dojo["eval"](_2d+"\r\n//@ sourceURL="+uri);if(cb){cb(_2e);}return true;};dojo._loadUriAndCheck=function(uri,_30,cb){var ok=false;try{ok=this._loadUri(uri,cb);}catch(e){console.debug("failed loading ",uri," with error: ",e);}return Boolean(ok&&this._loadedModules[_30]);};dojo.loaded=function(){this._loadNotifying=true;this._postLoad=true;var mll=this._loaders;this._loaders=[];for(var x=0;x<mll.length;x++){mll[x]();}this._loadNotifying=false;if(dojo._postLoad&&dojo._inFlightCount==0&&this._loaders.length>0){dojo._callLoaded();}};dojo.unloaded=function(){var mll=this._unloaders;while(mll.length){(mll.pop())();}};dojo.addOnLoad=function(obj,_37){var d=dojo;if(arguments.length==1){d._loaders.push(obj);}else{if(arguments.length>1){d._loaders.push(function(){obj[_37]();});}}if(d._postLoad&&d._inFlightCount==0&&!d._loadNotifying){d._callLoaded();}};dojo.addOnUnload=function(obj,_3a){var d=dojo;if(arguments.length==1){d._unloaders.push(obj);}else{if(arguments.length>1){d._unloaders.push(function(){obj[_3a]();});}}};dojo._modulesLoaded=function(){if(this._postLoad){return;}if(this._inFlightCount>0){console.debug("files still in flight!");return;}dojo._callLoaded();};dojo._callLoaded=function(){if(typeof setTimeout=="object"||(djConfig.useXDomain&&dojo.isOpera)){setTimeout("dojo.loaded();",0);}else{dojo.loaded();}};dojo._getModuleSymbols=function(_3c){var _3d=_3c.split(".");for(var i=_3d.length;i>0;i--){var _3f=_3d.slice(0,i).join(".");if((i==1)&&!this._moduleHasPrefix(_3f)){_3d[0]="../"+_3d[0];}else{var _40=this._getModulePrefix(_3f);if(_40!=_3f){_3d.splice(0,i,_40);break;}}}return _3d;};dojo._global_omit_module_check=false;dojo._loadModule=function(_41,_42,_43){_43=this._global_omit_module_check||_43;var _44=this._loadedModules[_41];if(_44){return _44;}var _45=_41.split(".");var _46=this._getModuleSymbols(_41);var _47=((_46[0].charAt(0)!="/")&&!_46[0].match(/^\w+:/));var _48=_46[_46.length-1];var _49;if(_48=="*"){_41=_45.slice(0,-1).join(".");_46.pop();_49=_46.join("/")+"/"+(djConfig.packageFileName||"__package__")+".js";if(_47&&_49.charAt(0)=="/"){_49=_49.slice(1);}}else{_49=_46.join("/")+".js";_41=_45.join(".");}var _4a=(!_43)?_41:null;var ok=this._loadPath(_49,_4a);if((!ok)&&(!_43)){throw new Error("Could not load '"+_41+"'; last tried '"+_49+"'");}if((!_43)&&(!this["_isXDomain"])){_44=this._loadedModules[_41];if(!_44){throw new Error("symbol '"+_41+"' is not defined after loading '"+_49+"'");}}return _44;};dojo.require=dojo._loadModule;dojo.provide=function(_4c){var _4d=_4c+"";var _4e=_4d;var _4f=_4c.split(/\./);if(_4f[_4f.length-1]=="*"){_4f.pop();_4e=_4f.join(".");}var _50=dojo.getObject(_4e,true);this._loadedModules[_4d]=_50;this._loadedModules[_4e]=_50;return _50;};dojo.platformRequire=function(_51){var _52=_51.common||[];var _53=_52.concat(_51[dojo._name]||_51["default"]||[]);for(var x=0;x<_53.length;x++){var _55=_53[x];if(_55.constructor==Array){dojo._loadModule.apply(dojo,_55);}else{dojo._loadModule(_55);}}};dojo.requireIf=function(_56,_57){if(_56===true){var _58=[];for(var i=1;i<arguments.length;i++){_58.push(arguments[i]);}dojo.require.apply(dojo,_58);}};dojo.requireAfterIf=dojo.requireIf;dojo.registerModulePath=function(_5a,_5b){this._modulePrefixes[_5a]={name:_5a,value:_5b};};dojo.requireLocalization=function(_5c,_5d,_5e,_5f){dojo.require("dojo.i18n");dojo.i18n._requireLocalization.apply(dojo.hostenv,arguments);};(function(){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 _66=new dojo._Url(_a[i]+"");var _67=new dojo._Url(uri+"");if((_66.path=="")&&(!_66.scheme)&&(!_66.authority)&&(!_66.query)){if(_66.fragment!=n){_67.fragment=_66.fragment;}_66=_67;}else{if(!_66.scheme){_66.scheme=_67.scheme;if(!_66.authority){_66.authority=_67.authority;if(_66.path.charAt(0)!="/"){var _68=_67.path.substring(0,_67.path.lastIndexOf("/")+1)+_66.path;var _69=_68.split("/");for(var j=0;j<_69.length;j++){if(_69[j]=="."){if(j==_69.length-1){_69[j]="";}else{_69.splice(j,1);j--;}}else{if(j>0&&!(j==1&&_69[0]=="")&&_69[j]==".."&&_69[j-1]!=".."){if(j==(_69.length-1)){_69.splice(j,1);_69[j-1]="";}else{_69.splice(j-1,2);j-=2;}}}}_66.path=_69.join("/");}}}}uri="";if(_66.scheme){uri+=_66.scheme+":";}if(_66.authority){uri+="//"+_66.authority;}uri+=_66.path;if(_66.query){uri+="?"+_66.query;}if(_66.fragment){uri+="#"+_66.fragment;}}this.uri=uri.toString();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[5];this.port=r[7]||n;}};dojo._Url.prototype.toString=function(){return this.uri;};})();dojo.moduleUrl=function(_6c,url){var loc=dojo._getModuleSymbols(_6c).join("/");if(!loc){return null;}if(loc.lastIndexOf("/")!=loc.length-1){loc+="/";}var _6f=loc.indexOf(":");if(loc.charAt(0)!="/"&&(_6f==-1||_6f>loc.indexOf("/"))){loc=dojo.baseUrl+loc;}return new dojo._Url(loc,url);};if(typeof window!="undefined"){dojo.isBrowser=true;dojo._name="browser";(function(){var d=dojo;if(document&&document.getElementsByTagName){var _71=document.getElementsByTagName("script");var _72=/dojo(\.xd)?\.js([\?\.]|$)/i;for(var i=0;i<_71.length;i++){var src=_71[i].getAttribute("src");if(!src){continue;}var m=src.match(_72);if(m){if(!djConfig.baseUrl){djConfig.baseUrl=src.substring(0,m.index);}var cfg=_71[i].getAttribute("djConfig");if(cfg){var _77=eval("({ "+cfg+" })");for(var x in _77){djConfig[x]=_77[x];}}break;}}}d.baseUrl=djConfig.baseUrl;var n=navigator;var dua=n.userAgent;var dav=n.appVersion;var tv=parseFloat(dav);d.isOpera=(dua.indexOf("Opera")>=0)?tv:0;d.isKhtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0)?tv:0;d.isSafari=(dav.indexOf("Safari")>=0)?tv:0;var _7d=dua.indexOf("Gecko");d.isMozilla=d.isMoz=((_7d>=0)&&(!d.isKhtml))?tv:0;d.isFF=0;d.isIE=0;d.isGears=0;try{if(d.isMoz){d.isFF=parseFloat(dua.split("Firefox/")[1].split(" ")[0]);}if((document.all)&&(!d.isOpera)){d.isIE=parseFloat(dav.split("MSIE ")[1].split(";")[0]);}}catch(e){}if(dojo.isIE&&(window.location.protocol==="file:")){djConfig.ieForceActiveXXhr=true;}d._gearsObject=function(){var _7e;var _7f;var _80=d.getObject("google.gears");if(_80){return _80;}if(typeof GearsFactory!="undefined"){_7e=new GearsFactory();}else{if(d.isIE){try{_7e=new ActiveXObject("Gears.Factory");}catch(e){}}else{if(navigator.mimeTypes["application/x-googlegears"]){_7e=document.createElement("object");_7e.setAttribute("type","application/x-googlegears");_7e.setAttribute("width",0);_7e.setAttribute("height",0);_7e.style.display="none";document.documentElement.appendChild(_7e);}}}if(!_7e){return null;}dojo.setObject("google.gears.factory",_7e);return dojo.getObject("google.gears");};var _81=d._gearsObject();if(_81){d.isGears=true;}var cm=document.compatMode;d.isQuirks=(cm=="BackCompat")||(cm=="QuirksMode")||(d.isIE<6);d.locale=djConfig.locale||(d.isIE?n.userLanguage:n.language).toLowerCase();d._println=console.debug;d._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];d._xhrObj=function(){var _83=null;var _84=null;if(!dojo.isIE||!djConfig.ieForceActiveXXhr){try{_83=new XMLHttpRequest();}catch(e){}}if(!_83){for(var i=0;i<3;++i){var _86=dojo._XMLHTTP_PROGIDS[i];try{_83=new ActiveXObject(_86);}catch(e){_84=e;}if(_83){dojo._XMLHTTP_PROGIDS=[_86];break;}}}if(!_83){throw new Error("XMLHTTP not available: "+_84);}return _83;};d._isDocumentOk=function(_87){var _88=_87.status||0;return((_88>=200)&&(_88<300))||(_88==304)||(_88==1223)||(!_88&&(location.protocol=="file:"||location.protocol=="chrome:"));};var _89=document.getElementsByTagName("base");var _8a=(_89&&_89.length>0);d._getText=function(uri,_8c){var _8d=this._xhrObj();if(!_8a&&dojo._Url){uri=(new dojo._Url(window.location,uri)).toString();}_8d.open("GET",uri,false);try{_8d.send(null);if(!d._isDocumentOk(_8d)){var err=Error("Unable to load "+uri+" status:"+_8d.status);err.status=_8d.status;err.responseText=_8d.responseText;throw err;}}catch(e){if(_8c){return null;}throw e;}return _8d.responseText;};})();dojo._initFired=false;dojo._loadInit=function(e){dojo._initFired=true;var _90=(e&&e.type)?e.type.toLowerCase():"load";if(arguments.callee.initialized||(_90!="domcontentloaded"&&_90!="load")){return;}arguments.callee.initialized=true;if(typeof dojo._khtmlTimer!="undefined"){clearInterval(dojo._khtmlTimer);delete dojo._khtmlTimer;}if(dojo._inFlightCount==0){dojo._modulesLoaded();}};if(document.addEventListener){if(dojo.isOpera||(dojo.isMoz&&(djConfig.enableMozDomContentLoaded===true))){document.addEventListener("DOMContentLoaded",dojo._loadInit,null);}window.addEventListener("load",dojo._loadInit,null);}if(/(WebKit|khtml)/i.test(navigator.userAgent)){dojo._khtmlTimer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){dojo._loadInit();}},10);}(function(){var _w=window;var _92=function(_93,fp){var _95=_w[_93]||function(){};_w[_93]=function(){fp.apply(_w,arguments);_95.apply(_w,arguments);};};if(dojo.isIE){document.write('<script defer src="//:" onreadystatechange="if(this.readyState==\'complete\'){dojo._loadInit();}"><\/script>');var _96=true;_92("onbeforeunload",function(){_w.setTimeout(function(){_96=false;},0);});_92("onunload",function(){if(_96){dojo.unloaded();}});try{document.namespaces.add("v","urn:schemas-microsoft-com:vml");document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)");}catch(e){}}else{_92("onbeforeunload",function(){dojo.unloaded();});}})();dojo._writeIncludes=function(){};dojo.doc=window.document||null;dojo.body=function(){return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];};dojo.setContext=function(_97,_98){dojo.global=_97;dojo.doc=_98;};dojo._fireCallback=function(_99,_9a,_9b){if((_9a)&&((typeof _99=="string")||(_99 instanceof String))){_99=_9a[_99];}return(_9a?_99.apply(_9a,_9b||[]):_99());};dojo.withGlobal=function(_9c,_9d,_9e,_9f){var _a0;var _a1=dojo.global;var _a2=dojo.doc;try{dojo.setContext(_9c,_9c.document);_a0=dojo._fireCallback(_9d,_9e,_9f);}finally{dojo.setContext(_a1,_a2);}return _a0;};dojo.withDoc=function(_a3,_a4,_a5,_a6){var _a7;var _a8=dojo.doc;try{dojo.doc=_a3;_a7=dojo._fireCallback(_a4,_a5,_a6);}finally{dojo.doc=_a8;}return _a7;};if(djConfig.modulePaths){for(var param in djConfig.modulePaths){dojo.registerModulePath(param,djConfig.modulePaths[param]);}}}if(djConfig.isDebug){if(!console.firebug){dojo.require("dojo._firebug.firebug");}}}if(!dojo._hasResource["dojo._base.lang"]){dojo._hasResource["dojo._base.lang"]=true;dojo.provide("dojo._base.lang");dojo.isString=function(it){return(typeof it=="string"||it instanceof String);};dojo.isArray=function(it){return(it&&it instanceof Array||typeof it=="array"||((typeof dojo.NodeList!="undefined")&&(it instanceof dojo.NodeList)));};if(dojo.isBrowser&&dojo.isSafari){dojo.isFunction=function(it){if((typeof(it)=="function")&&(it=="[object NodeList]")){return false;}return(typeof it=="function"||it instanceof Function);};}else{dojo.isFunction=function(it){return(typeof it=="function"||it instanceof Function);};}dojo.isObject=function(it){if(typeof it=="undefined"){return false;}return(it===null||typeof it=="object"||dojo.isArray(it)||dojo.isFunction(it));};dojo.isArrayLike=function(it){var d=dojo;if((!it)||(typeof it=="undefined")){return false;}if(d.isString(it)){return false;}if(d.isFunction(it)){return false;}if(d.isArray(it)){return true;}if((it.tagName)&&(it.tagName.toLowerCase()=="form")){return false;}if(isFinite(it.length)){return true;}return false;};dojo.isAlien=function(it){if(!it){return false;}return !dojo.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));};dojo._mixin=function(obj,_b2){var _b3={};for(var x in _b2){if((typeof _b3[x]=="undefined")||(_b3[x]!=_b2[x])){obj[x]=_b2[x];}}if(dojo.isIE){var p=_b2.toString;if((typeof(p)=="function")&&(p!=obj.toString)&&(p!=_b3.toString)&&(p!="\nfunction toString() {\n    [native code]\n}\n")){obj.toString=_b2.toString;}}return obj;};dojo.mixin=function(obj,_b7){for(var i=1,l=arguments.length;i<l;i++){dojo._mixin(obj,arguments[i]);}return obj;};dojo.extend=function(_ba,_bb){for(var i=1,l=arguments.length;i<l;i++){dojo._mixin(_ba.prototype,arguments[i]);}return _ba;};dojo._hitchArgs=function(_be,_bf){var pre=dojo._toArray(arguments,2);var _c1=dojo.isString(_bf);return function(){var _c2=dojo._toArray(arguments);var f=(_c1?(_be||dojo.global)[_bf]:_bf);return(f)&&(f.apply(_be||this,pre.concat(_c2)));};};dojo.hitch=function(_c4,_c5){if(arguments.length>2){return dojo._hitchArgs.apply(dojo,arguments);}if(!_c5){_c5=_c4;_c4=null;}if(dojo.isString(_c5)){_c4=_c4||dojo.global;if(!_c4[_c5]){throw (['dojo.hitch: scope["',_c5,'"] is null (scope="',_c4,'")'].join(""));}return function(){return _c4[_c5].apply(_c4,arguments||[]);};}else{return(!_c4?_c5:function(){return _c5.apply(_c4,arguments||[]);});}};dojo._delegate=function(obj,_c7){function TMP(){}TMP.prototype=obj;var tmp=new TMP();if(_c7){dojo.mixin(tmp,_c7);}return tmp;};dojo.partial=function(_c9){var arr=[null];return dojo.hitch.apply(dojo,arr.concat(dojo._toArray(arguments)));};dojo._toArray=function(obj,_cc){var arr=[];for(var x=_cc||0;x<obj.length;x++){arr.push(obj[x]);}return arr;};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;}else{if(dojo.isObject(o)){if(o.nodeType&&o.cloneNode){return o.cloneNode(true);}else{var r=new o.constructor();for(var i in o){if(!(i in r)||r[i]!=o[i]){r[i]=dojo.clone(o[i]);}}return r;}}}return o;};dojo.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(_d3,_d4,_d5){if(dojo.isFunction(_d5)||(arguments.length>3)){dojo.deprecated("dojo.declare: for class '"+_d3+"' pass initializer function as 'constructor' property instead of as a separate argument.","","1.0");var c=_d5;_d5=arguments[3]||{};_d5.constructor=c;}var dd=arguments.callee,_d8=null;if(dojo.isArray(_d4)){_d8=_d4;_d4=_d8.shift();}if(_d8){for(var i=0,m;i<_d8.length;i++){m=_d8[i];if(!m){throw ("Mixin #"+i+" to declaration of "+_d3+" is null. It's likely a required module is not loaded.");}_d4=dd._delegate(_d4,m);}}var _db=(_d5||0).constructor,_dc=dd._delegate(_d4),fn;for(var i in _d5){if(dojo.isFunction(fn=_d5[i])&&(!0[i])){fn.nom=i;}}dojo.extend(_dc,{declaredClass:_d3,_constructor:_db,preamble:null},_d5||0);_dc.prototype.constructor=_dc;return dojo.setObject(_d3,_dc);};dojo.mixin(dojo.declare,{_delegate:function(_de,_df){var bp=(_de||0).prototype,mp=(_df||0).prototype;var _e2=dojo.declare._makeCtor();dojo.mixin(_e2,{superclass:bp,mixin:mp});if(_de){_e2.prototype=dojo._delegate(bp);}dojo.extend(_e2,dojo.declare._core,mp||0,{_constructor:null});_e2.prototype.constructor=_e2;_e2.prototype.declaredClass=(bp||0).declaredClass+"_"+(mp||0).declaredClass;dojo.setObject(_e2.prototype.declaredClass,_e2);return _e2;},_makeCtor:function(){return function(){this._construct(arguments);};},_core:{_construct:function(_e3){var c=_e3.callee,s=c.superclass,ct=s&&s.constructor,m=c.mixin,mct=m&&m.constructor,a=_e3,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,_e3);}},_findMixin:function(_ec){var c=this.constructor,p,m;while(c){p=c.superclass;m=c.mixin;if(m==_ec||(m instanceof _ec.constructor)){return p;}if(m&&(m=m._findMixin(_ec))){return m;}c=p&&p.constructor;}},_findMethod:function(_f0,_f1,_f2,has){var p=_f2,c,m,f;do{c=p.constructor;m=c.mixin;if(m&&(m=this._findMethod(_f0,_f1,m,has))){return m;}if((f=p[_f0])&&(has==(f==_f1))){return p;}p=c.superclass;}while(p);return !has&&(p=this._findMixin(_f2))&&this._findMethod(_f0,_f1,p,has);},inherited:function(_f8,_f9,_fa){var a=arguments;if(!dojo.isString(a[0])){_fa=_f9;_f9=_f8;_f8=_f9.callee.nom;}var c=_f9.callee,p=this.constructor.prototype,a=_fa||_f9,fn,mp;if(this[_f8]!=c||p[_f8]==c){mp=this._findMethod(_f8,c,p,true);if(!mp){throw (this.declaredClass+': name argument ("'+_f8+'") to inherited must match callee (declare.js)');}p=this._findMethod(_f8,c,mp,false);}fn=p&&p[_f8];if(!fn){console.debug(mp.declaredClass+': no inherited "'+_f8+'" was found (declare.js)');return;}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);for(var i in ls){if(!(i in ap)){ls[i].apply(this,arguments);}}return r;};},add:function(_106,_107,_108){_106=_106||dojo.global;var f=_106[_107];if(!f||!f._listeners){var d=dojo._listener.getDispatcher();d.target=f;d._listeners=[];f=_106[_107]=d;}return f._listeners.push(_108);},remove:function(_10b,_10c,_10d){var f=(_10b||dojo.global)[_10c];if(f&&f._listeners&&_10d--){delete f._listeners[_10d];}}};dojo.connect=function(obj,_110,_111,_112,_113){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,_11a,_11b,_11c){var l=dojo._listener,h=l.add(obj,_11a,dojo.hitch(_11b,_11c));return[obj,_11a,h,l];};dojo.disconnect=function(_11f){if(_11f&&_11f[0]!==undefined){dojo._disconnect.apply(this,_11f);delete _11f[0];}};dojo._disconnect=function(obj,_121,_122,_123){_123.remove(obj,_121,_122);};dojo._topics={};dojo.subscribe=function(_124,_125,_126){return[_124,dojo._listener.add(dojo._topics,_124,dojo.hitch(_125,_126))];};dojo.unsubscribe=function(_127){if(_127){dojo._listener.remove(dojo._topics,_127[0],_127[1]);}};dojo.publish=function(_128,args){var f=dojo._topics[_128];(f)&&(f.apply(this,args||[]));};dojo.connectPublisher=function(_12b,obj,_12d){var pf=function(){dojo.publish(_12b,arguments);};return(_12d)?dojo.connect(obj,_12d,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(_12f){this.chain=[];this.id=this._nextId();this.fired=-1;this.paused=0;this.results=[null,null];this.canceller=_12f;this.silentlyCancelled=false;};dojo.extend(dojo.Deferred,{_nextId:(function(){var n=1;return function(){return n++;};})(),cancel:function(){if(this.fired==-1){if(this.canceller){this.canceller(this);}else{this.silentlyCancelled=true;}if(this.fired==-1){var err=new Error("Deferred Cancelled");err.dojoType="cancel";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 _137=dojo.hitch(cb,cbfn);if(arguments.length>2){_137=dojo.partial(_137,arguments,2);}return this.addCallbacks(_137,_137);},addCallback:function(cb,cbfn){var _13a=dojo.hitch(cb,cbfn);if(arguments.length>2){_13a=dojo.partial(_13a,arguments,2);}return this.addCallbacks(_13a,null);},addErrback:function(cb,cbfn){var _13d=dojo.hitch(cb,cbfn);if(arguments.length>2){_13d=dojo.partial(_13d,arguments,2);}return this.addCallbacks(null,_13d);},addCallbacks:function(cb,eb){this.chain.push([cb,eb]);if(this.fired>=0){this._fire();}return this;},_fire:function(){var _140=this.chain;var _141=this.fired;var res=this.results[_141];var self=this;var cb=null;while((_140.length>0)&&(this.paused==0)){var f=_140.shift()[_141];if(!f){continue;}try{res=f(res);_141=((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++;}}catch(err){console.debug(err);_141=1;res=err;}}this.fired=_141;this.results[_141]=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){try{return eval("("+json+")");}catch(e){console.debug(e);return 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,_14a,_14b){_14b=_14b||"";var _14c=(_14a?_14b+dojo.toJsonIndentStr:"");var _14d=(_14a?"\n":"");var _14e=typeof(it);if(_14e=="undefined"){return"undefined";}else{if((_14e=="number")||(_14e=="boolean")){return it+"";}else{if(it===null){return"null";}}}if(_14e=="string"){return dojo._escapeString(it);}var _14f=arguments.callee;var _150;if(typeof it.__json__=="function"){_150=it.__json__();if(it!==_150){return _14f(_150,_14a,_14c);}}if(typeof it.json=="function"){_150=it.json();if(it!==_150){return _14f(_150,_14a,_14c);}}if(dojo.isArray(it)){var res=[];for(var i=0;i<it.length;i++){var val=_14f(it[i],_14a,_14c);if(typeof(val)!="string"){val="undefined";}res.push(_14d+_14c+val);}return"["+res.join(", ")+_14d+_14b+"]";}if(_14e=="function"){return null;}var _154=[];for(var key in it){var _156;if(typeof(key)=="number"){_156='"'+key+'"';}else{if(typeof(key)=="string"){_156=dojo._escapeString(key);}else{continue;}}val=_14f(it[key],_14a,_14c);if(typeof(val)!="string"){continue;}_154.push(_14d+_14c+_156+": "+val);}return"{"+_154.join(", ")+_14d+_14b+"}";};}if(!dojo._hasResource["dojo._base.array"]){dojo._hasResource["dojo._base.array"]=true;dojo.provide("dojo._base.array");(function(){var _157=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(_15b,_15c,_15d,_15e){var i=0,step=1,end=_15b.length;if(_15e){i=end-1;step=end=-1;}for(i=_15d||i;i!=end;i+=step){if(_15b[i]==_15c){return i;}}return -1;},lastIndexOf:function(_162,_163,_164){return dojo.indexOf(_162,_163,_164,true);},forEach:function(arr,_166,obj){if(!arr||!arr.length){return;}var _p=_157(arr,obj,_166);arr=_p[0];for(var i=0,l=_p[0].length;i<l;i++){_p[2].call(_p[1],arr[i],i,arr);}},_everyOrSome:function(_16b,arr,_16d,obj){var _p=_157(arr,obj,_16d);arr=_p[0];for(var i=0,l=arr.length;i<l;i++){var _172=!!_p[2].call(_p[1],arr[i],i,arr);if(_16b^_172){return _172;}}return _16b;},every:function(arr,_174,_175){return this._everyOrSome(true,arr,_174,_175);},some:function(arr,_177,_178){return this._everyOrSome(false,arr,_177,_178);},map:function(arr,func,obj){var _p=_157(arr,obj,func);arr=_p[0];var _17d=((arguments[3])?(new arguments[3]()):[]);for(var i=0;i<arr.length;++i){_17d.push(_p[2].call(_p[1],arr[i],i,arr));}return _17d;},filter:function(arr,_180,obj){var _p=_157(arr,obj,_180);arr=_p[0];var _183=[];for(var i=0;i<arr.length;i++){if(_p[2].call(_p[1],arr[i],i,arr)){_183.push(arr[i]);}}return _183;}});})();}if(!dojo._hasResource["dojo._base.Color"]){dojo._hasResource["dojo._base.Color"]=true;dojo.provide("dojo._base.Color");dojo.Color=function(_185){if(_185){this.setColor(_185);}};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(_18b){var d=dojo;if(d.isString(_18b)){d.colorFromString(_18b,this);}else{if(d.isArray(_18b)){d.colorFromArray(_18b,this);}else{this._set(_18b.r,_18b.g,_18b.b,_18b.a);if(!(_18b 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=dojo.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(_192){var t=this,rgb=t.r+", "+t.g+", "+t.b;return(_192?"rgba("+rgb+", "+t.a:"rgb("+rgb)+")";},toString:function(){return this.toCss(true);}});dojo.blendColors=function(_195,end,_197,obj){var d=dojo,t=obj||new dojo.Color();d.forEach(["r","g","b","a"],function(x){t[x]=_195[x]+(end[x]-_195[x])*_197;if(x!="a"){t[x]=Math.round(t[x]);}});return t.sanitize();};dojo.colorFromRgb=function(_19c,obj){var m=_19c.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return m&&dojo.colorFromArray(m[1].split(/\s*,\s*/),obj);};dojo.colorFromHex=function(_19f,obj){var d=dojo,t=obj||new d.Color(),bits=(_19f.length==4)?4:8,mask=(1<<bits)-1;_19f=Number("0x"+_19f.substr(1));if(isNaN(_19f)){return null;}d.forEach(["b","g","r"],function(x){var c=_19f&mask;_19f>>=bits;t[x]=bits==4?17*c:c;});t.a=1;return t;};dojo.colorFromArray=function(a,obj){var t=obj||new dojo.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=dojo.Color.named[str];return a&&dojo.colorFromArray(a,obj)||dojo.colorFromRgb(str,obj)||dojo.colorFromHex(str,obj);};}if(!dojo._hasResource["dojo._base"]){dojo._hasResource["dojo._base"]=true;dojo.provide("dojo._base");}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,_1af,fp){if(!node){return;}_1af=del._normalizeEventName(_1af);fp=del._fixCallback(_1af,fp);node.addEventListener(_1af,fp,false);return fp;},remove:function(node,_1b2,_1b3){(node)&&(node.removeEventListener(del._normalizeEventName(_1b2),_1b3,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,_1b9){switch(evt.type){case"keypress":del._setKeyChar(evt);break;}return evt;},_setKeyChar:function(evt){evt.keyChar=(evt.charCode?String.fromCharCode(evt.charCode):"");}};dojo.fixEvent=function(evt,_1bc){return del._fixEvent(evt,_1bc);};dojo.stopEvent=function(evt){evt.preventDefault();evt.stopPropagation();};var _1be=dojo._listener;dojo._connect=function(obj,_1c0,_1c1,_1c2,_1c3){var _1c4=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);var lid=!_1c4?0:(!_1c3?1:2),l=[dojo._listener,del,_1be][lid];var h=l.add(obj,_1c0,dojo.hitch(_1c1,_1c2));return[obj,_1c0,h,lid];};dojo._disconnect=function(obj,_1c9,_1ca,_1cb){([dojo._listener,del,_1be][_1cb]).remove(obj,_1c9,_1ca);};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){_trySetKeyCode=function(e,code){try{return(e.keyCode=code);}catch(e){return 0;}};var iel=dojo._listener;if(!djConfig._allow_leaks){_1be=iel=dojo._ie_listener={handlers:[],add:function(_1cf,_1d0,_1d1){_1cf=_1cf||dojo.global;var f=_1cf[_1d0];if(!f||!f._listeners){var d=dojo._getIeDispatcher();d.target=f&&(ieh.push(f)-1);d._listeners=[];f=_1cf[_1d0]=d;}return f._listeners.push(ieh.push(_1d1)-1);},remove:function(_1d5,_1d6,_1d7){var f=(_1d5||dojo.global)[_1d6],l=f&&f._listeners;if(f&&l&&_1d7--){delete ieh[l[_1d7]];delete l[_1d7];}}};var ieh=iel.handlers;}dojo.mixin(del,{add:function(node,_1db,fp){if(!node){return;}_1db=del._normalizeEventName(_1db);if(_1db=="onkeypress"){var kd=node.onkeydown;if(!kd||!kd._listeners||!kd._stealthKeydown){del.add(node,"onkeydown",del._stealthKeyDown);node.onkeydown._stealthKeydown=true;}}return iel.add(node,_1db,del._fixCallback(fp));},remove:function(node,_1df,_1e0){iel.remove(node,del._normalizeEventName(_1df),_1e0);},_normalizeEventName:function(_1e1){return(_1e1.slice(0,2)!="on"?"on"+_1e1:_1e1);},_nop:function(){},_fixEvent:function(evt,_1e3){if(!evt){var w=(_1e3)&&((_1e3.ownerDocument||_1e3.document||_1e3).parentWindow)||window;evt=w.event;}if(!evt){return(evt);}evt.target=evt.srcElement;evt.currentTarget=(_1e3||evt.srcElement);evt.layerX=evt.offsetX;evt.layerY=evt.offsetY;var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;var _1e7=((dojo.isIE<6)||(doc.compatMode=="BackCompat"))?doc.body:doc.documentElement;var _1e8=dojo._getIeDocumentElementOffset();evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(_1e7.scrollLeft||0)-_1e8.x;evt.pageY=evt.clientY+(_1e7.scrollTop||0)-_1e8.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;},_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},_stealthKeyDown:function(evt){var kp=evt.currentTarget.onkeypress;if(!kp||!kp._listeners){return;}var k=evt.keyCode;var _1ee=(k!=13)&&(k!=32)&&(k!=27)&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_1ee||evt.ctrlKey){var c=(_1ee?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,_1f3){var faux=dojo.mixin({},evt,_1f3);del._setKeyChar(faux);faux.preventDefault=function(){evt.preventDefault();};faux.stopPropagation=function(){evt.stopPropagation();};return faux;};if(dojo.isOpera){dojo.mixin(del,{_fixEvent:function(evt,_1f6){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.isSafari){dojo.mixin(del,{_fixEvent:function(evt,_1f9){switch(evt.type){case"keypress":var c=evt.charCode,s=evt.shiftKey,k=evt.keyCode;k=k||_1fd[evt.keyIdentifier]||0;if(evt.keyIdentifier=="Enter"){c=0;}else{if((evt.ctrlKey)&&(c>0)&&(c<27)){c+=96;}else{if(c==dojo.keys.SHIFT_TAB){c=dojo.keys.TAB;s=true;}else{c=(c>=32&&c<63232?c:0);}}}return del._synthesizeEvent(evt,{charCode:c,shiftKey:s,keyCode:k});}return evt;}});dojo.mixin(dojo.keys,{SHIFT_TAB:25,UP_ARROW:63232,DOWN_ARROW:63233,LEFT_ARROW:63234,RIGHT_ARROW:63235,F1:63236,F2:63237,F3:63238,F4:63239,F5:63240,F6:63241,F7:63242,F8:63243,F9:63244,F10:63245,F11:63246,F12:63247,PAUSE:63250,DELETE:63272,HOME:63273,END:63275,PAGE_UP:63276,PAGE_DOWN:63277,INSERT:63302,PRINT_SCREEN:63248,SCROLL_LOCK:63249,NUM_LOCK:63289});var dk=dojo.keys,_1fd={Up:dk.UP_ARROW,Down:dk.DOWN_ARROW,Left:dk.LEFT_ARROW,Right:dk.RIGHT_ARROW,PageUp:dk.PAGE_UP,PageDown:dk.PAGE_DOWN};}})();if(dojo.isIE){dojo._getIeDispatcher=function(){return function(){var ap=Array.prototype,h=dojo._ie_listener.handlers,c=arguments.callee,ls=c._listeners,t=h[c.target];var r=t&&t.apply(this,arguments);for(var i in ls){if(!(i in ap)){h[ls[i]].apply(this,arguments);}}return r;};};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)){return te;}else{var eles=_d.all[id];if(!eles){return;}if(!eles.length){return eles;}var i=0;while(te=eles[i++]){if(te.attributes.id.value==id){return te;}}}}else{return id;}};}else{dojo.byId=function(id,doc){if(dojo.isString(id)){return(doc||dojo.doc).getElementById(id);}else{return id;}};}(function(){var _211=null;dojo._destroyElement=function(node){node=dojo.byId(node);try{if(!_211){_211=document.createElement("div");}_211.appendChild(node.parentNode?node.parentNode.removeChild(node):node);_211.innerHTML="";}catch(e){}};dojo.isDescendant=function(node,_214){try{node=dojo.byId(node);_214=dojo.byId(_214);while(node){if(node===_214){return true;}node=node.parentNode;}}catch(e){}return false;};dojo.setSelectable=function(node,_216){node=dojo.byId(node);if(dojo.isMozilla){node.style.MozUserSelect=(_216)?"normal":"none";}else{if(dojo.isKhtml){node.style.KhtmlUserSelect=(_216)?"auto":"none";}else{if(dojo.isIE){node.unselectable=(_216)?"":"on";dojo.query("*",node).forEach(function(_217){_217.unselectable=(_216)?"":"on";});}}}};var _218=function(node,ref){ref.parentNode.insertBefore(node,ref);return true;};var _21b=function(node,ref){var pn=ref.parentNode;if(ref==pn.lastChild){pn.appendChild(node);}else{return _218(node,ref.nextSibling);}return true;};dojo.place=function(node,_220,_221){if((!node)||(!_220)||(typeof _221=="undefined")){return false;}node=dojo.byId(node);_220=dojo.byId(_220);if(typeof _221=="number"){var cn=_220.childNodes;if(((_221==0)&&(cn.length==0))||(cn.length==_221)){_220.appendChild(node);return true;}if(_221==0){return _218(node,_220.firstChild);}return _21b(node,cn[_221-1]);}switch(_221.toLowerCase()){case"before":return _218(node,_220);case"after":return _21b(node,_220);case"first":if(_220.firstChild){return _218(node,_220.firstChild);}else{_220.appendChild(node);return true;}break;default:_220.appendChild(node);return true;}};dojo.boxModel="content-box";if(dojo.isIE){var _dcm=document.compatMode;dojo.boxModel=(_dcm=="BackCompat")||(_dcm=="QuirksMode")||(dojo.isIE<6)?"border-box":"content-box";}var gcs,dv=document.defaultView;if(dojo.isSafari){gcs=function(node){var s=dv.getComputedStyle(node,null);if(!s&&node.style){node.style.display="";s=dv.getComputedStyle(node,null);}return s||{};};}else{if(dojo.isIE){gcs=function(node){return node.currentStyle;};}else{gcs=function(node){return dv.getComputedStyle(node,null);};}}dojo.getComputedStyle=gcs;if(!dojo.isIE){dojo._toPixelValue=function(_22a,_22b){return parseFloat(_22b)||0;};}else{dojo._toPixelValue=function(_22c,_22d){if(!_22d){return 0;}if(_22d=="medium"){return 4;}if(_22d.slice&&(_22d.slice(-2)=="px")){return parseFloat(_22d);}with(_22c){var _22e=style.left;var _22f=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=_22d;_22d=style.pixelLeft;}catch(e){_22d=0;}style.left=_22e;runtimeStyle.left=_22f;}return _22d;};}dojo._getOpacity=(dojo.isIE?function(node){try{return(node.filters.alpha.opacity/100);}catch(e){return 1;}}:function(node){return dojo.getComputedStyle(node).opacity;});dojo._setOpacity=(dojo.isIE?function(node,_233){if(_233==1){node.style.cssText=node.style.cssText.replace(/FILTER:[^;]*;/i,"");if(node.nodeName.toLowerCase()=="tr"){dojo.query("> td",node).forEach(function(i){i.style.cssText=i.style.cssText.replace(/FILTER:[^;]*;/i,"");});}}else{var o="Alpha(Opacity="+(_233*100)+")";node.style.filter=o;}if(node.nodeName.toLowerCase()=="tr"){dojo.query("> td",node).forEach(function(i){i.style.filter=o;});}return _233;}:function(node,_238){return node.style.opacity=_238;});var _239={width:true,height:true,left:true,top:true};var _23a=function(node,type,_23d){type=type.toLowerCase();if(_239[type]===true){return dojo._toPixelValue(node,_23d);}else{if(_239[type]===false){return _23d;}else{if((type.indexOf("margin")>=0)||(type.indexOf("padding")>=0)||(type.indexOf("width")>=0)||(type.indexOf("height")>=0)||(type.indexOf("max")>=0)||(type.indexOf("min")>=0)||(type.indexOf("offset")>=0)){_239[type]=true;return dojo._toPixelValue(node,_23d);}else{_239[type]=false;return _23d;}}}};dojo.style=function(node,_23f,_240){var n=dojo.byId(node),args=arguments.length,op=(_23f=="opacity");if(args==3){return op?dojo._setOpacity(n,_240):n.style[_23f]=_240;}if(args==2&&op){return dojo._getOpacity(n);}var s=dojo.getComputedStyle(n);return(args==1)?s:_23a(n,_23f,s[_23f]);};dojo._getPadExtents=function(n,_246){var s=_246||gcs(n),px=dojo._toPixelValue,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,_24c){var ne="none",px=dojo._toPixelValue,s=_24c||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,_253){var s=_253||gcs(n),p=dojo._getPadExtents(n,s),b=dojo._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,_258){var s=_258||gcs(n),px=dojo._toPixelValue,l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);if(dojo.isSafari&&(s.position!="absolute")){r=l;}return{l:l,t:t,w:l+r,h:t+b};};dojo._getMarginBox=function(node,_260){var s=_260||gcs(node),me=dojo._getMarginExtents(node,s);var l=node.offsetLeft-me.l,t=node.offsetTop-me.t;if(dojo.isMoz){var sl=parseFloat(s.left),st=parseFloat(s.top);if(!isNaN(sl)&&!isNaN(st)){l=sl,t=st;}else{var p=node.parentNode;if(p&&p.style){var pcs=gcs(p);if(pcs.overflow!="visible"){var be=dojo._getBorderExtents(p,pcs);l+=be.l,t+=be.t;}}}}else{if(dojo.isOpera){var p=node.parentNode;if(p){var be=dojo._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,_26b){var s=_26b||gcs(node),pe=dojo._getPadExtents(node,s),be=dojo._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(dojo.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,_272){var s=_272||gcs(node),pe=dojo._getPadExtents(node,s),cb=dojo._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";with(node.style){if(!isNaN(l)){left=l+u;}if(!isNaN(t)){top=t+u;}if(w>=0){width=w+u;}if(h>=0){height=h+u;}}};dojo._usesBorderBox=function(node){var n=node.tagName;return(dojo.boxModel=="border-box")||(n=="TABLE")||(n=="BUTTON");};dojo._setContentSize=function(node,_27f,_280,_281){var bb=dojo._usesBorderBox(node);if(bb){var pb=dojo._getPadBorderExtents(node,_281);if(_27f>=0){_27f+=pb.w;}if(_280>=0){_280+=pb.h;}}dojo._setBox(node,NaN,NaN,_27f,_280);};dojo._setMarginBox=function(node,_285,_286,_287,_288,_289){var s=_289||dojo.getComputedStyle(node);var bb=dojo._usesBorderBox(node),pb=bb?_28d:dojo._getPadBorderExtents(node,s),mb=dojo._getMarginExtents(node,s);if(_287>=0){_287=Math.max(_287-pb.w-mb.w,0);}if(_288>=0){_288=Math.max(_288-pb.h-mb.h,0);}dojo._setBox(node,_285,_286,_287,_288);};var _28d={l:0,t:0,w:0,h:0};dojo.marginBox=function(node,box){var n=dojo.byId(node),s=gcs(n),b=box;return !b?dojo._getMarginBox(n,s):dojo._setMarginBox(n,b.l,b.t,b.w,b.h,s);};dojo.contentBox=function(node,box){var n=dojo.byId(node),s=gcs(n),b=box;return !b?dojo._getContentBox(n,s):dojo._setContentSize(n,b.w,b.h,s);};var _299=function(node,prop){if(!(node=(node||0).parentNode)){return 0;}var val,_29d=0,_b=dojo.body();while(node&&node.style){if(gcs(node).position=="fixed"){return 0;}val=node[prop];if(val){_29d+=val-0;if(node==_b){break;}}node=node.parentNode;}return _29d;};dojo._docScroll=function(){var _b=dojo.body();var _w=dojo.global;var de=dojo.doc.documentElement;return{y:(_w.pageYOffset||de.scrollTop||_b.scrollTop||0),x:(_w.pageXOffset||dojo._fixIeBiDiScrollLeft(de.scrollLeft)||_b.scrollLeft||0)};};dojo._isBodyLtr=function(){return typeof dojo._bodyLtr=="undefined"?(dojo._bodyLtr=dojo.getComputedStyle(dojo.body()).direction=="ltr"):dojo._bodyLtr;};dojo._getIeDocumentElementOffset=function(){var de=dojo.doc.documentElement;if(dojo.isIE>=7){return{x:de.getBoundingClientRect().left,y:de.getBoundingClientRect().top};}else{return{x:dojo._isBodyLtr()||window.parent==window?de.clientLeft:de.offsetWidth-de.clientWidth-de.clientLeft,y:de.clientTop};}};dojo._fixIeBiDiScrollLeft=function(_2a3){if(dojo.isIE&&!dojo._isBodyLtr()){var de=dojo.doc.documentElement;return _2a3+de.clientWidth-de.scrollWidth;}return _2a3;};dojo._abs=function(node,_2a6){var _2a7=node.ownerDocument;var ret={x:0,y:0};var _2a9=false;var db=dojo.body();if(dojo.isIE){var _2ab=node.getBoundingClientRect();var _2ac=dojo._getIeDocumentElementOffset();ret.x=_2ab.left-_2ac.x;ret.y=_2ab.top-_2ac.y;}else{if(_2a7.getBoxObjectFor){var bo=_2a7.getBoxObjectFor(node);ret.x=bo.x-_299(node,"scrollLeft");ret.y=bo.y-_299(node,"scrollTop");}else{if(node.offsetParent){_2a9=true;var _2ae;if(dojo.isSafari&&(gcs(node).position=="absolute")&&(node.parentNode==db)){_2ae=db;}else{_2ae=db.parentNode;}if(node.parentNode!=db){var nd=node;if(dojo.isOpera){nd=db;}ret.x-=_299(nd,"scrollLeft");ret.y-=_299(nd,"scrollTop");}var _2b0=node;do{var n=_2b0.offsetLeft;if(!dojo.isOpera||n>0){ret.x+=isNaN(n)?0:n;}var m=_2b0.offsetTop;ret.y+=isNaN(m)?0:m;_2b0=_2b0.offsetParent;}while((_2b0!=_2ae)&&_2b0);}else{if(node.x&&node.y){ret.x+=isNaN(node.x)?0:node.x;ret.y+=isNaN(node.y)?0:node.y;}}}}if(_2a9||_2a6){var _2b3=dojo._docScroll();var m=_2a9?(!_2a6?-1:0):1;ret.y+=m*_2b3.y;ret.x+=m*_2b3.x;}return ret;};dojo.coords=function(node,_2b5){var n=dojo.byId(node),s=gcs(n),mb=dojo._getMarginBox(n,s);var abs=dojo._abs(n,_2b5);mb.x=abs.x;mb.y=abs.y;return mb;};})();dojo.hasClass=function(node,_2bb){return((" "+node.className+" ").indexOf(" "+_2bb+" ")>=0);};dojo.addClass=function(node,_2bd){var cls=node.className;if((" "+cls+" ").indexOf(" "+_2bd+" ")<0){node.className=cls+(cls?" ":"")+_2bd;}};dojo.removeClass=function(node,_2c0){var t=dojo.trim((" "+node.className+" ").replace(" "+_2c0+" "," "));if(node.className!=t){node.className=t;}};dojo.toggleClass=function(node,_2c3,_2c4){if(typeof _2c4=="undefined"){_2c4=!dojo.hasClass(node,_2c3);}dojo[_2c4?"addClass":"removeClass"](node,_2c3);};}if(!dojo._hasResource["dojo._base.NodeList"]){dojo._hasResource["dojo._base.NodeList"]=true;dojo.provide("dojo._base.NodeList");(function(){var d=dojo;dojo.NodeList=function(){var args=arguments;if((args.length==1)&&(typeof args[0]=="number")){this.length=parseInt(args[0]);}else{if(args.length){d.forEach(args,function(i){this.push(i);},this);}}};dojo.NodeList.prototype=new Array;if(d.isIE){var _2c8=function(_2c9){return("var a2 = parent."+_2c9+"; var ap = Array.prototype; var a2p = a2.prototype; for(var x in a2p){ ap[x] = a2p[x]; } parent."+_2c9+" = Array; ");};var scs=_2c8("dojo.NodeList");var _2cb=window.createPopup();_2cb.document.write("<script>"+scs+"<\/script>");_2cb.show(1,1,1,1);}dojo.extend(dojo.NodeList,{indexOf:function(_2cc,_2cd){return d.indexOf(this,_2cc,_2cd);},lastIndexOf:function(_2ce,_2cf){var aa=d._toArray(arguments);aa.unshift(this);return d.lastIndexOf.apply(d,aa);},every:function(_2d1,_2d2){return d.every(this,_2d1,_2d2);},some:function(_2d3,_2d4){return d.some(this,_2d3,_2d4);},forEach:function(_2d5,_2d6){d.forEach(this,_2d5,_2d6);return this;},map:function(func,obj){return d.map(this,func,obj,d.NodeList);},coords:function(){return d.map(this,d.coords);},style:function(_2d9,_2da){var aa=d._toArray(arguments);aa.unshift(this[0]);var s=d.style.apply(d,aa);return(arguments.length>1)?this:s;},styles:function(_2dd,_2de){var aa=d._toArray(arguments);aa.unshift(null);var s=this.map(function(i){aa[0]=i;return d.style.apply(d,aa);});return(arguments.length>1)?this:s;},addClass:function(_2e2){return this.forEach(function(i){dojo.addClass(i,_2e2);});},removeClass:function(_2e4){return this.forEach(function(i){dojo.removeClass(i,_2e4);});},place:function(_2e6,_2e7){var item=d.query(_2e6)[0];_2e7=_2e7||"last";for(var x=0;x<this.length;x++){d.place(this[x],item,_2e7);}return this;},connect:function(_2ea,_2eb,_2ec){this.forEach(function(item){d.connect(item,_2ea,_2eb,_2ec);});return this;},orphan:function(_2ee){var _2ef=(_2ee)?d._filterQueryResult(this,_2ee):this;_2ef.forEach(function(item){if(item.parentNode){item.parentNode.removeChild(item);}});return _2ef;},adopt:function(_2f1,_2f2){var item=this[0];return d.query(_2f1).forEach(function(ai){d.place(ai,item,(_2f2||"last"));});},query:function(_2f5){_2f5=_2f5||"";var ret=new d.NodeList();this.forEach(function(item){d.query(_2f5,item).forEach(function(_2f8){if(typeof _2f8!="undefined"){ret.push(_2f8);}});});return ret;},filter:function(_2f9){var _2fa=this;var _a=arguments;var r=new d.NodeList();var rp=function(t){if(typeof t!="undefined"){r.push(t);}};if(d.isString(_2f9)){_2fa=d._filterQueryResult(this,_a[0]);if(_a.length==1){return _2fa;}d.forEach(d.filter(_2fa,_a[1],_a[2]),rp);return r;}d.forEach(d.filter(_2fa,_a[0],_a[1]),rp);return r;},addContent:function(_2ff,_300){var ta=d.doc.createElement("span");if(d.isString(_2ff)){ta.innerHTML=_2ff;}else{ta.appendChild(_2ff);}var ct=((_300=="first")||(_300=="after"))?"lastChild":"firstChild";this.forEach(function(item){var tn=ta.cloneNode(true);while(tn[ct]){d.place(tn[ct],item,_300);}});return this;},_anim:function(_305,args){var _307=[];args=args||{};this.forEach(function(item){var _309={node:item};d.mixin(_309,args);_307.push(d[_305](_309));});return d.fx.combine(_307);},fadeIn:function(args){return this._anim("fadeIn",args);},fadeOut:function(args){return this._anim("fadeOut",args);},animateProperty:function(args){return this._anim("animateProperty",args);}});dojo.forEach(["mouseover","click","mouseout","mousemove","blur","mousedown","mouseup","mousemove","keydown","keyup","keypress"],function(evt){var _oe="on"+evt;dojo.NodeList.prototype[_oe]=function(a,b){return this.connect(_oe,a,b);};});})();}if(!dojo._hasResource["dojo._base.query"]){dojo._hasResource["dojo._base.query"]=true;dojo.provide("dojo._base.query");(function(){var d=dojo;var _312=function(q){return[q.indexOf("#"),q.indexOf("."),q.indexOf("["),q.indexOf(":")];};var _314=function(_315,_316){var ql=_315.length;var i=_312(_315);var end=ql;for(var x=_316;x<i.length;x++){if(i[x]>=0){if(i[x]<end){end=i[x];}}}return(end<0)?ql:end;};var _31b=function(_31c){var i=_312(_31c);if(i[0]!=-1){return _31c.substring(i[0]+1,_314(_31c,1));}else{return"";}};var _31e=function(_31f){var _320;var i=_312(_31f);if((i[0]==0)||(i[1]==0)){_320=0;}else{_320=_314(_31f,0);}return((_320>0)?_31f.substr(0,_320).toLowerCase():"*");};var _322=function(arr){var ret=-1;for(var x=0;x<arr.length;x++){var ta=arr[x];if(ta>=0){if((ta>ret)||(ret==-1)){ret=ta;}}}return ret;};var _327=function(_328){var i=_312(_328);if(-1==i[1]){return"";}var di=i[1]+1;var _32b=_322(i.slice(2));if(di<_32b){return _328.substring(di,_32b);}else{if(-1==_32b){return _328.substr(di);}else{return"";}}};var _32c=[{key:"|=",match:function(attr,_32e){return"[contains(concat(' ',@"+attr+",' '), ' "+_32e+"-')]";}},{key:"~=",match:function(attr,_330){return"[contains(concat(' ',@"+attr+",' '), ' "+_330+" ')]";}},{key:"^=",match:function(attr,_332){return"[starts-with(@"+attr+", '"+_332+"')]";}},{key:"*=",match:function(attr,_334){return"[contains(@"+attr+", '"+_334+"')]";}},{key:"$=",match:function(attr,_336){return"[substring(@"+attr+", string-length(@"+attr+")-"+(_336.length-1)+")='"+_336+"']";}},{key:"!=",match:function(attr,_338){return"[not(@"+attr+"='"+_338+"')]";}},{key:"=",match:function(attr,_33a){return"[@"+attr+"='"+_33a+"']";}}];var _33b=function(_33c,_33d,_33e,_33f){var _340;var i=_312(_33d);if(i[2]>=0){var _342=_33d.indexOf("]",i[2]);var _343=_33d.substring(i[2]+1,_342);while(_343&&_343.length){if(_343.charAt(0)=="@"){_343=_343.slice(1);}_340=null;for(var x=0;x<_33c.length;x++){var ta=_33c[x];var tci=_343.indexOf(ta.key);if(tci>=0){var attr=_343.substring(0,tci);var _348=_343.substring(tci+ta.key.length);if((_348.charAt(0)=='"')||(_348.charAt(0)=="'")){_348=_348.substring(1,_348.length-1);}_340=ta.match(d.trim(attr),d.trim(_348));break;}}if((!_340)&&(_343.length)){_340=_33e(_343);}if(_340){_33f(_340);}_343=null;var _349=_33d.indexOf("[",_342);if(0<=_349){_342=_33d.indexOf("]",_349);if(0<=_342){_343=_33d.substring(_349+1,_342);}}}}};var _34a=function(_34b){var _34c=".";var _34d=_34b.split(" ");while(_34d.length){var tqp=_34d.shift();var _34f;if(tqp==">"){_34f="/";tqp=_34d.shift();}else{_34f="//";}var _350=_31e(tqp);_34c+=_34f+_350;var id=_31b(tqp);if(id.length){_34c+="[@id='"+id+"'][1]";}var cn=_327(tqp);if(cn.length){var _353=" ";if(cn.charAt(cn.length-1)=="*"){_353="";cn=cn.substr(0,cn.length-1);}_34c+="[contains(concat(' ',@class,' '), ' "+cn+_353+"')]";}_33b(_32c,tqp,function(_354){return"[@"+_354+"]";},function(_355){_34c+=_355;});}return _34c;};var _356={};var _357=function(path){if(_356[path]){return _356[path];}var doc=d.doc;var _35a=_34a(path);var tf=function(_35c){var ret=[];var _35e;try{_35e=doc.evaluate(_35a,_35c,null,XPathResult.ANY_TYPE,null);}catch(e){console.debug("failure in exprssion:",_35a,"under:",_35c);console.debug(e);}var _35f=_35e.iterateNext();while(_35f){ret.push(_35f);_35f=_35e.iterateNext();}return ret;};return _356[path]=tf;};var _360={};var _361={};var _362=function(_363,_364){if(!_363){return _364;}if(!_364){return _363;}return function(){return _363.apply(window,arguments)&&_364.apply(window,arguments);};};var _365=function(_366,_367,_368,idx){var nidx=idx+1;var _36b=(_367.length==nidx);var tqp=_367[idx];if(tqp==">"){var ecn=_366.childNodes;if(!ecn.length){return;}nidx++;_36b=(_367.length==nidx);var tf=_36f(_367[idx+1]);for(var x=0,te;x<ecn.length,te=ecn[x];x++){if(tf(te)){if(_36b){_368.push(te);}else{_365(te,_367,_368,nidx);}}}}var _372=_373(tqp)(_366);if(_36b){while(_372.length){_368.push(_372.shift());}}else{while(_372.length){_365(_372.shift(),_367,_368,nidx);}}};var _374=function(_375,_376){var ret=[];var x=_375.length-1,te;while(te=_375[x--]){_365(te,_376,ret,0);}return ret;};var _36f=function(_37a){if(_360[_37a]){return _360[_37a];}var ff=null;var _37c=_31e(_37a);if(_37c!="*"){ff=_362(ff,function(elem){return((elem.nodeType==1)&&(_37c==elem.tagName.toLowerCase()));});}var _37e=_31b(_37a);if(_37e.length){ff=_362(ff,function(elem){return((elem.nodeType==1)&&(elem.id==_37e));});}if(Math.max.apply(this,_312(_37a).slice(1))>=0){ff=_362(ff,_380(_37a));}return _360[_37a]=ff;};var _381=function(node){var pn=node.parentNode;var pnc=pn.childNodes;var nidx=-1;var _386=pn.firstChild;if(!_386){return nidx;}var ci=node.__cachedIndex;var cl=pn.__cachedLength;if(((typeof cl=="number")&&(cl!=pnc.length))||(typeof ci!="number")){pn.__cachedLength=pnc.length;var idx=1;do{if(_386===node){nidx=idx;}if(_386.nodeType==1){_386.__cachedIndex=idx;idx++;}_386=_386.nextSibling;}while(_386);}else{nidx=ci;}return nidx;};var _38a=0;var _38b=function(elem,attr){var _38e="";if(attr=="class"){return elem.className||_38e;}if(attr=="for"){return elem.htmlFor||_38e;}return elem.getAttribute(attr,2)||_38e;};var _38f=[{key:"|=",match:function(attr,_391){var _392=" "+_391+"-";return function(elem){var ea=" "+(elem.getAttribute(attr,2)||"");return((ea==_391)||(ea.indexOf(_392)==0));};}},{key:"^=",match:function(attr,_396){return function(elem){return(_38b(elem,attr).indexOf(_396)==0);};}},{key:"*=",match:function(attr,_399){return function(elem){return(_38b(elem,attr).indexOf(_399)>=0);};}},{key:"~=",match:function(attr,_39c){var tval=" "+_39c+" ";return function(elem){var ea=" "+_38b(elem,attr)+" ";return(ea.indexOf(tval)>=0);};}},{key:"$=",match:function(attr,_3a1){var tval=" "+_3a1;return function(elem){var ea=" "+_38b(elem,attr);return(ea.lastIndexOf(_3a1)==(ea.length-_3a1.length));};}},{key:"!=",match:function(attr,_3a6){return function(elem){return(_38b(elem,attr)!=_3a6);};}},{key:"=",match:function(attr,_3a9){return function(elem){return(_38b(elem,attr)==_3a9);};}}];var _3ab=[{key:"first-child",match:function(name,_3ad){return function(elem){if(elem.nodeType!=1){return false;}var fc=elem.previousSibling;while(fc&&(fc.nodeType!=1)){fc=fc.previousSibling;}return(!fc);};}},{key:"last-child",match:function(name,_3b1){return function(elem){if(elem.nodeType!=1){return false;}var nc=elem.nextSibling;while(nc&&(nc.nodeType!=1)){nc=nc.nextSibling;}return(!nc);};}},{key:"empty",match:function(name,_3b5){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;};}},{key:"contains",match:function(name,_3bc){return function(elem){return(elem.innerHTML.indexOf(_3bc)>=0);};}},{key:"not",match:function(name,_3bf){var ntf=_36f(_3bf);return function(elem){return(!ntf(elem));};}},{key:"nth-child",match:function(name,_3c3){var pi=parseInt;if(_3c3=="odd"){return function(elem){return(((_381(elem))%2)==1);};}else{if((_3c3=="2n")||(_3c3=="even")){return function(elem){return((_381(elem)%2)==0);};}else{if(_3c3.indexOf("0n+")==0){var _3c7=pi(_3c3.substr(3));return function(elem){return(elem.parentNode.childNodes[_3c7-1]===elem);};}else{if((_3c3.indexOf("n+")>0)&&(_3c3.length>3)){var _3c9=_3c3.split("n+",2);var pred=pi(_3c9[0]);var idx=pi(_3c9[1]);return function(elem){return((_381(elem)%pred)==idx);};}else{if(_3c3.indexOf("n")==-1){var _3c7=pi(_3c3);return function(elem){return(_381(elem)==_3c7);};}}}}}}}];var _380=function(_3ce){var _3cf=(_361[_3ce]||_360[_3ce]);if(_3cf){return _3cf;}var ff=null;var i=_312(_3ce);if(i[0]>=0){var tn=_31e(_3ce);if(tn!="*"){ff=_362(ff,function(elem){return(elem.tagName.toLowerCase()==tn);});}}var _3d4;var _3d5=_327(_3ce);if(_3d5.length){var _3d6=_3d5.charAt(_3d5.length-1)=="*";if(_3d6){_3d5=_3d5.substr(0,_3d5.length-1);}var re=new RegExp("(?:^|\\s)"+_3d5+(_3d6?".*":"")+"(?:\\s|$)");ff=_362(ff,function(elem){return re.test(elem.className);});}if(i[3]>=0){var _3d9=_3ce.substr(i[3]+1);var _3da="";var obi=_3d9.indexOf("(");var cbi=_3d9.lastIndexOf(")");if((0<=obi)&&(0<=cbi)&&(cbi>obi)){_3da=_3d9.substring(obi+1,cbi);_3d9=_3d9.substr(0,obi);}_3d4=null;for(var x=0;x<_3ab.length;x++){var ta=_3ab[x];if(ta.key==_3d9){_3d4=ta.match(_3d9,_3da);break;}}if(_3d4){ff=_362(ff,_3d4);}}var _3df=(d.isIE)?function(cond){var clc=cond.toLowerCase();return function(elem){return elem[cond]||elem[clc];};}:function(cond){return function(elem){return(elem&&elem.getAttribute&&elem.hasAttribute(cond));};};_33b(_38f,_3ce,_3df,function(_3e5){ff=_362(ff,_3e5);});if(!ff){ff=function(){return true;};}return _361[_3ce]=ff;};var _3e6={};var _373=function(_3e7,root){var fHit=_3e6[_3e7];if(fHit){return fHit;}var i=_312(_3e7);var id=_31b(_3e7);if(i[0]==0){return _3e6[_3e7]=function(root){return[d.byId(id)];};}var _3ed=_380(_3e7);var _3ee;if(i[0]>=0){_3ee=function(root){var te=d.byId(id);if(_3ed(te)){return[te];}};}else{var tret;var tn=_31e(_3e7);if(Math.max.apply(this,_312(_3e7))==-1){_3ee=function(root){var ret=[];var te,x=0,tret=root.getElementsByTagName(tn);while(te=tret[x++]){ret.push(te);}return ret;};}else{_3ee=function(root){var ret=[];var te,x=0,tret=root.getElementsByTagName(tn);while(te=tret[x++]){if(_3ed(te)){ret.push(te);}}return ret;};}}return _3e6[_3e7]=_3ee;};var _3fb={};var _3fc={">":function(root){var ret=[];var te,x=0,tret=root.childNodes;while(te=tret[x++]){if(te.nodeType==1){ret.push(te);}}return ret;}};var _402=function(_403){if(0>_403.indexOf(" ")){return _373(_403);}var sqf=function(root){var _406=_403.split(" ");var _407;if(_406[0]==">"){_407=[root];}else{_407=_373(_406.shift())(root);}return _374(_407,_406);};return sqf;};var _408=((document.evaluate&&!d.isSafari)?function(_409){var _40a=_409.split(" ");if((document.evaluate)&&(_409.indexOf(":")==-1)&&((true))){if(((_40a.length>2)&&(_409.indexOf(">")==-1))||(_40a.length>3)||(_409.indexOf("[")>=0)||((1==_40a.length)&&(0<=_409.indexOf(".")))){return _357(_409);}}return _402(_409);}:_402);var _40b=function(_40c){if(_3fc[_40c]){return _3fc[_40c];}if(0>_40c.indexOf(",")){return _3fc[_40c]=_408(_40c);}else{var _40d=_40c.split(/\s*,\s*/);var tf=function(root){var _410=0;var ret=[];var tp;while(tp=_40d[_410++]){ret=ret.concat(_408(tp,tp.indexOf(" "))(root));}return ret;};return _3fc[_40c]=tf;}};var _413=0;var _zip=function(arr){var ret=new d.NodeList();if(!arr){return ret;}if(arr[0]){ret.push(arr[0]);}if(arr.length<2){return ret;}_413++;arr[0]["_zipIdx"]=_413;for(var x=1,te;te=arr[x];x++){if(arr[x]["_zipIdx"]!=_413){ret.push(te);}te._zipIdx=_413;}return ret;};d.query=function(_419,root){if(typeof _419!="string"){return new d.NodeList(_419);}if(typeof root=="string"){root=d.byId(root);}return _zip(_40b(_419)(root||d.doc));};d._filterQueryResult=function(_41b,_41c){var tnl=new d.NodeList();var ff=(_41c)?_36f(_41c):function(){return true;};for(var x=0,te;te=_41b[x];x++){if(ff(te)){tnl.push(te);}}return tnl;};})();}if(!dojo._hasResource["dojo._base.xhr"]){dojo._hasResource["dojo._base.xhr"]=true;dojo.provide("dojo._base.xhr");dojo.formToObject=function(_421){var ret={};var iq="input[type!=file][type!=submit][type!=image][type!=reset][type!=button], select, textarea";dojo.query(iq,_421).filter(function(node){return(!node.disabled);}).forEach(function(item){var _in=item.name;var type=(item.type||"").toLowerCase();if((type=="radio")||(type=="checkbox")){if(item.checked){ret[_in]=item.value;}}else{if(item.multiple){var ria=ret[_in]=[];dojo.query("option[selected]",item).forEach(function(opt){ria.push(opt.value);});}else{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 ec=encodeURIComponent;var ret="";var _42d={};for(var x in map){if(map[x]!=_42d[x]){if(dojo.isArray(map[x])){for(var y=0;y<map[x].length;y++){ret+=ec(x)+"="+ec(map[x][y])+"&";}}else{ret+=ec(x)+"="+ec(map[x])+"&";}}}if((ret.length)&&(ret.charAt(ret.length-1)=="&")){ret=ret.substr(0,ret.length-1);}return ret;};dojo.formToQuery=function(_430){return dojo.objectToQuery(dojo.formToObject(_430));};dojo.formToJson=function(_431){return dojo.toJson(dojo.formToObject(_431));};dojo.queryToObject=function(str){var ret={};var qp=str.split("&");var dc=decodeURIComponent;dojo.forEach(qp,function(item){if(item.length){var _437=item.split("=");var name=dc(_437.shift());var val=dc(_437.join("="));if(dojo.isString(ret[name])){ret[name]=[ret[name]];}if(dojo.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){if(!djConfig.usePlainJson){console.debug("please consider using a mimetype of text/json-comment-filtered to avoid potential security issues with JSON endpoints (use djConfig.usePlainJson=true to turn off this message)");}return dojo.fromJson(xhr.responseText);},"json-comment-optional":function(xhr){var _43d=xhr.responseText;var _43e=_43d.indexOf("/*");var _43f=_43d.lastIndexOf("*/");if((_43e==-1)||(_43f==-1)){return dojo.fromJson(xhr.responseText);}return dojo.fromJson(_43d.substring(_43e+2,_43f));},"json-comment-filtered":function(xhr){var _441=xhr.responseText;var _442=_441.indexOf("/*");var _443=_441.lastIndexOf("*/");if((_442==-1)||(_443==-1)){console.debug("your JSON wasn't comment filtered!");return"";}return dojo.fromJson(_441.substring(_442+2,_443));},javascript:function(xhr){return dojo.eval(xhr.responseText);},xml:function(xhr){if(dojo.isIE&&!xhr.responseXML){dojo.forEach(["MSXML2","Microsoft","MSXML","MSXML3"],function(i){try{var doc=new ActiveXObject(prefixes[i]+".XMLDOM");doc.async=false;doc.loadXML(xhr.responseText);return doc;}catch(e){}});}else{return xhr.responseXML;}}};(function(){dojo._ioSetArgs=function(args,_449,_44a,_44b){var _44c={};_44c.args=args;var _44d=null;if(args.form){var form=dojo.byId(args.form);var _44f=form.getAttributeNode("action");_44c.url=args.url||(_44f?_44f.value:null);_44d=dojo.formToObject(form);}else{_44c.url=args.url;}var _450=[{}];if(_44d){_450.push(_44d);}if(args.content){_450.push(args.content);}if(args.preventCache){_450.push({"dojo.preventCache":new Date().valueOf()});}_44c.query=dojo.objectToQuery(dojo.mixin.apply(null,_450));_44c.handleAs=args.handleAs||"text";var d=new dojo.Deferred(_449);d.addCallbacks(_44a,function(_452){return _44b(_452,d);});var ld=args.load;if(ld&&dojo.isFunction(ld)){d.addCallback(function(_454){return ld.call(args,_454,_44c);});}var err=args.error;if(err&&dojo.isFunction(err)){d.addErrback(function(_456){return err.call(args,_456,_44c);});}var _457=args.handle;if(_457&&dojo.isFunction(_457)){d.addBoth(function(_458){return _457.call(args,_458,_44c);});}d.ioArgs=_44c;return d;};var _459=function(dfd){dfd.canceled=true;var xhr=dfd.ioArgs.xhr;if(typeof xhr.abort=="function"){xhr.abort();}};var _45c=function(dfd){return dojo._contentHandlers[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);};var _45e=function(_45f,dfd){console.debug(_45f);return _45f;};var _461=function(args){var dfd=dojo._ioSetArgs(args,_459,_45c,_45e);dfd.ioArgs.xhr=dojo._xhrObj(dfd.ioArgs.args);return dfd;};var _464=null;var _465=[];var _466=function(){var now=(new Date()).getTime();if(!dojo._blockAsync){dojo.forEach(_465,function(tif,_469){if(!tif){return;}var dfd=tif.dfd;try{if(!dfd||dfd.canceled||!tif.validCheck(dfd)){_465.splice(_469,1);return;}if(tif.ioCheck(dfd)){_465.splice(_469,1);tif.resHandle(dfd);}else{if(dfd.startTime){if(dfd.startTime+(dfd.ioArgs.args.timeout||0)<now){_465.splice(_469,1);var err=new Error("timeout exceeded");err.dojoType="timeout";dfd.errback(err);dfd.cancel();}}}}catch(e){console.debug(e);dfd.errback(new Error("_watchInFlightError!"));}});}if(!_465.length){clearInterval(_464);_464=null;return;}};dojo._ioCancelAll=function(){try{dojo.forEach(_465,function(i){i.dfd.cancel();});}catch(e){}};if(dojo.isIE){dojo.addOnUnload(dojo._ioCancelAll);}dojo._ioWatch=function(dfd,_46e,_46f,_470){if(dfd.ioArgs.args.timeout){dfd.startTime=(new Date()).getTime();}_465.push({dfd:dfd,validCheck:_46e,ioCheck:_46f,resHandle:_470});if(!_464){_464=setInterval(_466,50);}_466();};var _471="application/x-www-form-urlencoded";var _472=function(dfd){return dfd.ioArgs.xhr.readyState;};var _474=function(dfd){return 4==dfd.ioArgs.xhr.readyState;};var _476=function(dfd){if(dojo._isDocumentOk(dfd.ioArgs.xhr)){dfd.callback(dfd);}else{dfd.errback(new Error("bad http response code:"+dfd.ioArgs.xhr.status));}};var _478=function(type,dfd){var _47b=dfd.ioArgs;var args=_47b.args;_47b.xhr.open(type,_47b.url,(args.sync!==true),(args.user?args.user:undefined),(args.password?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{_47b.xhr.setRequestHeader(hdr,args.headers[hdr]);}}}_47b.xhr.setRequestHeader("Content-Type",(args.contentType||_471));try{_47b.xhr.send(_47b.query);}catch(e){dfd.cancel();}dojo._ioWatch(dfd,_472,_474,_476);return dfd;};dojo._ioAddQueryToUrl=function(_47e){if(_47e.query.length){_47e.url+=(_47e.url.indexOf("?")==-1?"?":"&")+_47e.query;_47e.query=null;}};dojo.xhrGet=function(args){var dfd=_461(args);dojo._ioAddQueryToUrl(dfd.ioArgs);return _478("GET",dfd);};dojo.xhrPost=function(args){return _478("POST",_461(args));};dojo.rawXhrPost=function(args){var dfd=_461(args);dfd.ioArgs.query=args.postData;return _478("POST",dfd);};dojo.xhrPut=function(args){return _478("PUT",_461(args));};dojo.rawXhrPut=function(args){var dfd=_461(args);var _487=dfd.ioArgs;if(args.putData){_487.query=args.putData;args.putData=null;}return _478("PUT",dfd);};dojo.xhrDelete=function(args){var dfd=_461(args);dojo._ioAddQueryToUrl(dfd.ioArgs);return _478("DELETE",dfd);};dojo.wrapForm=function(_48a){throw new Error("dojo.wrapForm not yet implemented");};})();}if(!dojo._hasResource["dojo._base.fx"]){dojo._hasResource["dojo._base.fx"]=true;dojo.provide("dojo._base.fx");dojo._Line=function(_48b,end){this.start=_48b;this.end=end;this.getValue=function(n){return((this.end-this.start)*n)+this.start;};};dojo.declare("dojo._Animation",null,{constructor:function(args){dojo.mixin(this,args);if(dojo.isArray(this.curve)){this.curve=new dojo._Line(this.curve[0],this.curve[1]);}},curve:null,duration:1000,easing:null,repeat:0,rate:10,delay:null,beforeBegin:null,onBegin:null,onAnimate:null,onEnd:null,onPlay:null,onPause:null,onStop:null,_active:false,_paused:false,_startTime:null,_endTime:null,_timer:null,_percent:0,_startRepeatCount:0,fire:function(evt,args){if(this[evt]){this[evt].apply(this,args||[]);}return this;},play:function(_491,_492){if(_492){clearTimeout(this._timer);this._active=this._paused=false;this._percent=0;}else{if(this._active&&!this._paused){return this;}}this.fire("beforeBegin");var d=_491||this.delay;if(d>0){setTimeout(dojo.hitch(this,function(){this.play(null,_492);}),d);return this;}this._startTime=new Date().valueOf();if(this._paused){this._startTime-=this.duration*this._percent;}this._endTime=this._startTime+this.duration;this._active=true;this._paused=false;var _494=this.curve.getValue(this._percent);if(!this._percent){if(!this._startRepeatCount){this._startRepeatCount=this.repeat;}this.fire("onBegin",[_494]);}this.fire("onPlay",[_494]);this._cycle();return this;},pause:function(){clearTimeout(this._timer);if(!this._active){return this;}this._paused=true;this.fire("onPause",[this.curve.getValue(this._percent)]);return this;},gotoPercent:function(pct,_496){clearTimeout(this._timer);this._active=this._paused=true;this._percent=pct*100;if(_496){this.play();}return this;},stop:function(_497){if(!this._timer){return;}clearTimeout(this._timer);if(_497){this._percent=1;}this.fire("onStop",[this.curve.getValue(this._percent)]);this._active=this._paused=false;return this;},status:function(){if(this._active){return this._paused?"paused":"playing";}return"stopped";},_cycle:function(){clearTimeout(this._timer);if(this._active){var curr=new Date().valueOf();var step=(curr-this._startTime)/(this._endTime-this._startTime);if(step>=1){step=1;}this._percent=step;if(this.easing){step=this.easing(step);}this.fire("onAnimate",[this.curve.getValue(step)]);if(step<1){this._timer=setTimeout(dojo.hitch(this,"_cycle"),this.rate);}else{this._active=false;if(this.repeat>0){this.repeat--;this.play(null,true);}else{if(this.repeat==-1){this.play(null,true);}else{if(this._startRepeatCount){this.repeat=this._startRepeatCount;this._startRepeatCount=0;}}}this._percent=0;this.fire("onEnd");}}return this;}});(function(){var _49a=function(node){if(dojo.isIE){var ns=node.style;if(!ns.zoom.length&&dojo.style(node,"zoom")=="normal"){ns.zoom="1";}if(!ns.width.length&&dojo.style(node,"width")=="auto"){ns.width="auto";}}};dojo._fade=function(args){if(typeof args.end=="undefined"){throw new Error("dojo._fade needs an end value");}args.node=dojo.byId(args.node);var _49e=dojo.mixin({properties:{}},args);var _49f=(_49e.properties.opacity={});_49f.start=(typeof _49e.start=="undefined")?function(){return Number(dojo.style(_49e.node,"opacity"));}:_49e.start;_49f.end=_49e.end;var anim=dojo.animateProperty(_49e);dojo.connect(anim,"beforeBegin",null,function(){_49a(_49e.node);});return anim;};dojo.fadeIn=function(args){return dojo._fade(dojo.mixin({end:1},args));};dojo.fadeOut=function(args){return dojo._fade(dojo.mixin({end:0},args));};if(dojo.isKhtml&&!dojo.isSafari){dojo._defaultEasing=function(n){return parseFloat("0.5")+((Math.sin((n+parseFloat("1.5"))*Math.PI))/2);};}else{dojo._defaultEasing=function(n){return 0.5+((Math.sin((n+1.5)*Math.PI))/2);};}var _4a5=function(_4a6){this._properties=_4a6;for(var p in _4a6){var prop=_4a6[p];if(prop.start instanceof dojo.Color){prop.tempColor=new dojo.Color();}}this.getValue=function(r){var ret={};for(var p in this._properties){var prop=this._properties[p];var _4ad=null;if(prop.start instanceof dojo.Color){_4ad=dojo.blendColors(prop.start,prop.end,r,prop.tempColor).toCss();}else{if(!dojo.isArray(prop.start)){_4ad=((prop.end-prop.start)*r)+prop.start+(p!="opacity"?prop.units||"px":"");}}ret[p]=_4ad;}return ret;};};dojo.animateProperty=function(args){args.node=dojo.byId(args.node);if(!args.easing){args.easing=dojo._defaultEasing;}var anim=new dojo._Animation(args);dojo.connect(anim,"beforeBegin",anim,function(){var pm={};for(var p in this.properties){var prop=pm[p]=dojo.mixin({},this.properties[p]);if(dojo.isFunction(prop.start)){prop.start=prop.start();}if(dojo.isFunction(prop.end)){prop.end=prop.end();}var _4b3=(p.toLowerCase().indexOf("color")>=0);function getStyle(node,p){switch(p){case"height":return node.offsetHeight;case"width":return node.offsetWidth;}var v=dojo.style(node,p);return(p=="opacity")?Number(v):parseFloat(v);}if(typeof prop.end=="undefined"){prop.end=getStyle(this.node,p);}else{if(typeof prop.start=="undefined"){prop.start=getStyle(this.node,p);}}if(_4b3){prop.start=new dojo.Color(prop.start);prop.end=new dojo.Color(prop.end);}else{prop.start=(p=="opacity")?Number(prop.start):parseFloat(prop.start);}}this.curve=new _4a5(pm);});dojo.connect(anim,"onAnimate",anim,function(_4b7){for(var s in _4b7){dojo.style(this.node,s,_4b7[s]);}});return anim;};})();}if(!dojo._hasResource["dojo.cookie"]){dojo._hasResource["dojo.cookie"]=true;dojo.provide("dojo.cookie");dojo.cookie=function(_1,_2,_3){var c=document.cookie;if(arguments.length==1){var _5=c.lastIndexOf(_1+"=");if(_5==-1){return null;}var _6=_5+_1.length+1;var _7=c.indexOf(";",_5+_1.length+1);if(_7==-1){_7=c.length;}return decodeURIComponent(c.substring(_6,_7));}else{_3=_3||{};_2=encodeURIComponent(_2);if(typeof(_3.expires)=="number"){var d=new Date();d.setTime(d.getTime()+(_3.expires*24*60*60*1000));_3.expires=d;}document.cookie=_1+"="+_2+(_3.expires?"; expires="+_3.expires.toUTCString():"")+(_3.path?"; path="+_3.path:"")+(_3.domain?"; domain="+_3.domain:"")+(_3.secure?"; secure":"");return null;}};}if(!dojo._hasResource["dojo.dnd.common"]){dojo._hasResource["dojo.dnd.common"]=true;dojo.provide("dojo.dnd.common");dojo.dnd._copyKey=navigator.appVersion.indexOf("Macintosh")<0?"ctrlKey":"metaKey";dojo.dnd.getCopyKeyState=function(e){return e[dojo.dnd._copyKey];};dojo.dnd._uniqueId=0;dojo.dnd.getUniqueId=function(){var id;do{id="dojoUnique"+(++dojo.dnd._uniqueId);}while(dojo.byId(id));return id;};dojo.dnd._empty={};dojo.dnd.isFormElement=function(e){var t=e.target;if(t.nodeType==3){t=t.parentNode;}return" button textarea input select option ".indexOf(" "+t.tagName.toLowerCase()+" ")>=0;};}if(!dojo._hasResource["dojo.dnd.autoscroll"]){dojo._hasResource["dojo.dnd.autoscroll"]=true;dojo.provide("dojo.dnd.autoscroll");dojo.dnd.getViewport=function(){var d=dojo.doc,dd=d.documentElement,w=window,b=dojo.body();if(dojo.isMozilla){return{w:dd.clientWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&w.innerWidth){return{w:w.innerWidth,h:w.innerHeight};}else{if(!dojo.isOpera&&dd&&dd.clientWidth){return{w:dd.clientWidth,h:dd.clientHeight};}else{if(b.clientWidth){return{w:b.clientWidth,h:b.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(e){var v=dojo.dnd.getViewport(),dx=0,dy=0;if(e.clientX<dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=-dojo.dnd.H_AUTOSCROLL_VALUE;}else{if(e.clientX>v.w-dojo.dnd.H_TRIGGER_AUTOSCROLL){dx=dojo.dnd.H_AUTOSCROLL_VALUE;}}if(e.clientY<dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=-dojo.dnd.V_AUTOSCROLL_VALUE;}else{if(e.clientY>v.h-dojo.dnd.V_TRIGGER_AUTOSCROLL){dy=dojo.dnd.V_AUTOSCROLL_VALUE;}}window.scrollBy(dx,dy);};dojo.dnd._validNodes={div:1,p:1,td:1};dojo.dnd._validOverflow={auto:1,scroll:1};dojo.dnd.autoScrollNodes=function(e){for(var n=e.target;n;){if(n.nodeType==1&&(n.tagName.toLowerCase() in dojo.dnd._validNodes)){var s=dojo.getComputedStyle(n);if(s.overflow.toLowerCase() in dojo.dnd._validOverflow){var b=dojo._getContentBox(n,s),t=dojo._abs(n,true);console.debug(b.l,b.t,t.x,t.y,n.scrollLeft,n.scrollTop);b.l+=t.x+n.scrollLeft;b.t+=t.y+n.scrollTop;var w=Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL,b.w/2),h=Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL,b.h/2),rx=e.pageX-b.l,ry=e.pageY-b.t,dx=0,dy=0;if(rx>0&&rx<b.w){if(rx<w){dx=-dojo.dnd.H_AUTOSCROLL_VALUE;}else{if(rx>b.w-w){dx=dojo.dnd.H_AUTOSCROLL_VALUE;}}}if(ry>0&&ry<b.h){if(ry<h){dy=-dojo.dnd.V_AUTOSCROLL_VALUE;}else{if(ry>b.h-h){dy=dojo.dnd.V_AUTOSCROLL_VALUE;}}}var _20=n.scrollLeft,_21=n.scrollTop;n.scrollLeft=n.scrollLeft+dx;n.scrollTop=n.scrollTop+dy;if(dx||dy){console.debug(_20+", "+_21+"\n"+dx+", "+dy+"\n"+n.scrollLeft+", "+n.scrollTop);}if(_20!=n.scrollLeft||_21!=n.scrollTop){return;}}}try{n=n.parentNode;}catch(x){n=null;}}dojo.dnd.autoScroll(e);};}if(!dojo._hasResource["dojo.dnd.move"]){dojo._hasResource["dojo.dnd.move"]=true;dojo.provide("dojo.dnd.move");dojo.dnd.Mover=function(_22,e){this.node=dojo.byId(_22);this.marginBox={l:e.pageX,t:e.pageY};var d=_22.ownerDocument,_25=dojo.connect(d,"onmousemove",this,"onFirstMove");this.events=[dojo.connect(d,"onmousemove",this,"onMouseMove"),dojo.connect(d,"onmouseup",this,"destroy"),dojo.connect(d,"ondragstart",dojo,"stopEvent"),dojo.connect(d,"onselectstart",dojo,"stopEvent"),_25];dojo.publish("/dnd/move/start",[this.node]);dojo.addClass(dojo.body(),"dojoMove");dojo.addClass(this.node,"dojoMoveItem");};dojo.extend(dojo.dnd.Mover,{onMouseMove:function(e){dojo.dnd.autoScroll(e);var m=this.marginBox;dojo.marginBox(this.node,{l:m.l+e.pageX,t:m.t+e.pageY});},onFirstMove:function(){this.node.style.position="absolute";var m=dojo.marginBox(this.node);m.l-=this.marginBox.l;m.t-=this.marginBox.t;this.marginBox=m;dojo.disconnect(this.events.pop());},destroy:function(){dojo.forEach(this.events,dojo.disconnect);dojo.publish("/dnd/move/stop",[this.node]);dojo.removeClass(dojo.body(),"dojoMove");dojo.removeClass(this.node,"dojoMoveItem");this.events=this.node=null;}});dojo.dnd.Moveable=function(_29,_2a){this.node=dojo.byId(_29);this.handle=(_2a&&_2a.handle)?dojo.byId(_2a.handle):null;if(!this.handle){this.handle=this.node;}this.delay=(_2a&&_2a.delay>0)?_2a.delay:0;this.skip=_2a&&_2a.skip;this.mover=(_2a&&_2a.mover)?_2a.mover:dojo.dnd.Mover;this.events=[dojo.connect(this.handle,"onmousedown",this,"onMouseDown"),dojo.connect(this.handle,"ondragstart",dojo,"stopEvent"),dojo.connect(this.handle,"onselectstart",dojo,"stopEvent")];};dojo.extend(dojo.dnd.Moveable,{handle:"",delay:0,skip:false,markupFactory:function(_2b,_2c){return new dojo.dnd.Moveable(_2c,_2b);},destroy:function(){dojo.forEach(this.events,dojo.disconnect);this.events=this.node=this.handle=null;},onMouseDown:function(e){if(this.skip&&dojo.dnd.isFormElement(e)){return;}if(this.delay){this.events.push(dojo.connect(this.handle,"onmousemove",this,"onMouseMove"));this.events.push(dojo.connect(this.handle,"onmouseup",this,"onMouseUp"));this._lastX=e.pageX;this._lastY=e.pageY;}else{new this.mover(this.node,e);}dojo.stopEvent(e);},onMouseMove:function(e){if(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay){this.onMouseUp(e);new this.mover(this.node,e);}dojo.stopEvent(e);},onMouseUp:function(e){dojo.disconnect(this.events.pop());dojo.disconnect(this.events.pop());}});dojo.dnd.constrainedMover=function(fun,_31){var _32=function(_33,e){dojo.dnd.Mover.call(this,_33,e);};dojo.extend(_32,dojo.dnd.Mover.prototype);dojo.extend(_32,{onMouseMove:function(e){var m=this.marginBox,c=this.constraintBox,l=m.l+e.pageX,t=m.t+e.pageY;l=l<c.l?c.l:c.r<l?c.r:l;t=t<c.t?c.t:c.b<t?c.b:t;dojo.marginBox(this.node,{l:l,t:t});},onFirstMove:function(){dojo.dnd.Mover.prototype.onFirstMove.call(this);var c=this.constraintBox=fun.call(this),m=this.marginBox;c.r=c.l+c.w-(_31?m.w:0);c.b=c.t+c.h-(_31?m.h:0);}});return _32;};dojo.dnd.boxConstrainedMover=function(box,_3d){return dojo.dnd.constrainedMover(function(){return box;},_3d);};dojo.dnd.parentConstrainedMover=function(_3e,_3f){var fun=function(){var n=this.node.parentNode,s=dojo.getComputedStyle(n),mb=dojo._getMarginBox(n,s);if(_3e=="margin"){return mb;}var t=dojo._getMarginExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(_3e=="border"){return mb;}t=dojo._getBorderExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;if(_3e=="padding"){return mb;}t=dojo._getPadExtents(n,s);mb.l+=t.l,mb.t+=t.t,mb.w-=t.w,mb.h-=t.h;return mb;};return dojo.dnd.constrainedMover(fun,_3f);};}if(!dojo._hasResource["dojo.fx"]){dojo._hasResource["dojo.fx"]=true;dojo.provide("dojo.fx");dojo.provide("dojo.fx.Toggler");dojo.fx.chain=function(_45){var _46=_45.shift();var _47=_46;dojo.forEach(_45,function(_48){dojo.connect(_47,"onEnd",_48,"play");_47=_48;});return _46;};dojo.fx.combine=function(_49){var _4a=_49.shift();dojo.forEach(_49,function(_4b){dojo.forEach(["play","pause","stop"],function(_4c){if(_4b[_4c]){dojo.connect(_4a,_4c,_4b,_4c);}},this);});return _4a;};dojo.declare("dojo.fx.Toggler",null,{constructor:function(_4d){var _t=this;dojo.mixin(_t,_4d);_t.node=_4d.node;_t._showArgs=dojo.mixin({},_4d);_t._showArgs.node=_t.node;_t._showArgs.duration=_t.showDuration;_t.showAnim=_t.showFunc(_t._showArgs);_t._hideArgs=dojo.mixin({},_4d);_t._hideArgs.node=_t.node;_t._hideArgs.duration=_t.hideDuration;_t.hideAnim=_t.hideFunc(_t._hideArgs);dojo.connect(_t.showAnim,"beforeBegin",dojo.hitch(_t.hideAnim,"stop",true));dojo.connect(_t.hideAnim,"beforeBegin",dojo.hitch(_t.showAnim,"stop",true));},node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,_showArgs:null,_showAnim:null,_hideArgs:null,_hideAnim:null,_isShowing:false,_isHiding:false,show:function(_4f){_4f=_4f||0;return this.showAnim.play(_4f);},hide:function(_50){_50=_50||0;return this.hideAnim.play(_50);}});dojo.fx.wipeIn=function(_51){_51.node=dojo.byId(_51.node);var _52=_51.node,s=_52.style;var _54=dojo.animateProperty(dojo.mixin({properties:{height:{start:function(){s.overflow="hidden";if(s.visibility=="hidden"||s.display=="none"){s.height="1px";s.display="";s.visibility="";return 1;}else{var _55=dojo.style(_52,"height");return Math.max(_55,1);}},end:function(){return _52.scrollHeight;}}}},_51));dojo.connect(_54,"onEnd",_54,function(){s.height="auto";});return _54;};dojo.fx.wipeOut=function(_56){var _57=(_56.node=dojo.byId(_56.node));var _58=dojo.animateProperty(dojo.mixin({properties:{height:{end:1}}},_56));dojo.connect(_58,"beforeBegin",_58,function(){var s=_57.style;s.overflow="hidden";s.display="";});dojo.connect(_58,"onEnd",_58,function(){var s=this.node.style;s.height="auto";s.display="none";});return _58;};dojo.fx.slideTo=function(_5b){var _5c=_5b.node=dojo.byId(_5b.node);var _5d=dojo.getComputedStyle;var top=null;var _5f=null;var _60=(function(){var _61=_5c;return function(){var pos=_5d(_61).position;top=(pos=="absolute"?_5c.offsetTop:parseInt(_5d(_5c).top)||0);_5f=(pos=="absolute"?_5c.offsetLeft:parseInt(_5d(_5c).left)||0);if(pos!="absolute"&&pos!="relative"){var ret=dojo.coords(_61,true);top=ret.y;_5f=ret.x;_61.style.position="absolute";_61.style.top=top+"px";_61.style.left=_5f+"px";}};})();_60();var _64=dojo.animateProperty(dojo.mixin({properties:{top:{start:top,end:_5b.top||0},left:{start:_5f,end:_5b.left||0}}},_5b));dojo.connect(_64,"beforeBegin",_64,_60);return _64;};}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 _65=dojo.global;var _66=dojo.doc;if(_66.selection){return !_66.selection.createRange().text;}else{if(_65.getSelection){var _67=_65.getSelection();if(dojo.isString(_67)){return !_67;}else{return _67.isCollapsed||!_67.toString();}}}},getBookmark:function(){var _68,_69=dojo.doc.selection;if(_69){var _6a=_69.createRange();if(_69.type.toUpperCase()=="CONTROL"){_68=_6a.length?dojo._toArray(_6a):null;}else{_68=_6a.getBookmark();}}else{if(dojo.global.getSelection){_69=dojo.global.getSelection();if(_69){var _6a=_69.getRangeAt(0);_68=_6a.cloneRange();}}else{console.debug("No idea how to store the current selection for this browser!");}}return _68;},moveToBookmark:function(_6b){var _6c=dojo.doc;if(_6c.selection){var _6d;if(dojo.isArray(_6b)){_6d=_6c.body.createControlRange();dojo.forEach(_6b,_6d.addElement);}else{_6d=_6c.selection.createRange();_6d.moveToBookmark(_6b);}_6d.select();}else{var _6e=dojo.global.getSelection&&dojo.global.getSelection();if(_6e&&_6e.removeAllRanges){_6e.removeAllRanges();_6e.addRange(_6b);}else{console.debug("No idea how to restore selection for this browser!");}}},getFocus:function(_6f,_70){return{node:_6f&&dojo.isDescendant(dijit._curFocus,_6f.domNode)?dijit._prevFocus:dijit._curFocus,bookmark:!dojo.withGlobal(_70||dojo.global,dijit.isCollapsed)?dojo.withGlobal(_70||dojo.global,dijit.getBookmark):null,openedForWindow:_70};},focus:function(_71){if(!_71){return;}var _72="node" in _71?_71.node:_71,_73=_71.bookmark,_74=_71.openedForWindow;if(_72){var _75=(_72.tagName.toLowerCase()=="iframe")?_72.contentWindow:_72;if(_75&&_75.focus){try{_75.focus();}catch(e){}}dijit._onFocusNode(_72);}if(_73&&dojo.withGlobal(_74||dojo.global,dijit.isCollapsed)){if(_74){_74.focus();}try{dojo.withGlobal(_74||dojo.global,moveToBookmark,null,[_73]);}catch(e){}}},_activeStack:[],registerWin:function(_76){if(!_76){_76=window;}dojo.connect(_76.document,"onmousedown",null,function(evt){dijit._ignoreNextBlurEvent=true;setTimeout(function(){dijit._ignoreNextBlurEvent=false;},0);dijit._onTouchNode(evt.target||evt.srcElement);});var _78=_76.document.body||_76.document.getElementsByTagName("body")[0];if(_78){if(dojo.isIE){_78.attachEvent("onactivate",function(evt){if(evt.srcElement.tagName.toLowerCase()!="body"){dijit._onFocusNode(evt.srcElement);}});_78.attachEvent("ondeactivate",function(evt){dijit._onBlurNode();});}else{_78.addEventListener("focus",function(evt){dijit._onFocusNode(evt.target);},true);_78.addEventListener("blur",function(evt){dijit._onBlurNode();},true);}}},_onBlurNode:function(){if(dijit._ignoreNextBlurEvent){dijit._ignoreNextBlurEvent=false;return;}dijit._prevFocus=dijit._curFocus;dijit._curFocus=null;if(dijit._blurAllTimer){clearTimeout(dijit._blurAllTimer);}dijit._blurAllTimer=setTimeout(function(){delete dijit._blurAllTimer;dijit._setStack([]);},100);},_onTouchNode:function(_7d){if(dijit._blurAllTimer){clearTimeout(dijit._blurAllTimer);delete dijit._blurAllTimer;}var _7e=[];try{while(_7d){if(_7d.dijitPopupParent){_7d=dijit.byId(_7d.dijitPopupParent).domNode;}else{if(_7d.tagName&&_7d.tagName.toLowerCase()=="body"){if(_7d===dojo.body()){break;}_7d=dojo.query("iframe").filter(function(_7f){return _7f.contentDocument.body===_7d;})[0];}else{var id=_7d.getAttribute&&_7d.getAttribute("widgetId");if(id){_7e.unshift(id);}_7d=_7d.parentNode;}}}}catch(e){}dijit._setStack(_7e);},_onFocusNode:function(_81){if(_81&&_81.tagName&&_81.tagName.toLowerCase()=="body"){return;}dijit._onTouchNode(_81);if(_81==dijit._curFocus){return;}dijit._prevFocus=dijit._curFocus;dijit._curFocus=_81;dojo.publish("focusNode",[_81]);var w=dijit.byId(_81.id);if(w&&w._setStateClass){w._focused=true;w._setStateClass();var _83=dojo.connect(_81,"onblur",function(){w._focused=false;w._setStateClass();dojo.disconnect(_83);});}},_setStack:function(_84){var _85=dijit._activeStack;dijit._activeStack=_84;for(var _86=0;_86<Math.min(_85.length,_84.length);_86++){if(_85[_86]!=_84[_86]){break;}}for(var i=_85.length-1;i>=_86;i--){var _88=dijit.byId(_85[i]);if(_88){dojo.publish("widgetBlur",[_88]);if(_88._onBlur){_88._onBlur();}}}for(var i=_86;i<_84.length;i++){var _88=dijit.byId(_84[i]);if(_88){dojo.publish("widgetFocus",[_88]);if(_88._onFocus){_88._onFocus();}}}}});dojo.addOnLoad(dijit.registerWin);}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(_89){this._hash[_89.id]=_89;},remove:function(id){delete this._hash[id];},forEach:function(_8b){for(var id in this._hash){_8b(this._hash[id]);}},filter:function(_8d){var res=new dijit.WidgetSet();this.forEach(function(_8f){if(_8d(_8f)){res.add(_8f);}});return res;},byId:function(id){return this._hash[id];},byClass:function(cls){return this.filter(function(_92){return _92.declaredClass==cls;});}});dijit.registry=new dijit.WidgetSet();dijit._widgetTypeCtr={};dijit.getUniqueId=function(_93){var id;do{id=_93+"_"+(dijit._widgetTypeCtr[_93]!==undefined?++dijit._widgetTypeCtr[_93]:dijit._widgetTypeCtr[_93]=0);}while(dijit.byId(id));return id;};if(dojo.isIE){dojo.addOnUnload(function(){dijit.registry.forEach(function(_95){_95.destroy();});});}dijit.byId=function(id){return(dojo.isString(id))?dijit.registry.byId(id):id;};dijit.byNode=function(_97){return dijit.registry.byId(_97.getAttribute("widgetId"));};}if(!dojo._hasResource["dijit._base.place"]){dojo._hasResource["dijit._base.place"]=true;dojo.provide("dijit._base.place");dijit.getViewport=function(){var _98=dojo.global;var _99=dojo.doc;var w=0,h=0;if(dojo.isMozilla){w=_99.documentElement.clientWidth;h=_98.innerHeight;}else{if(!dojo.isOpera&&_98.innerWidth){w=_98.innerWidth;h=_98.innerHeight;}else{if(dojo.isIE&&_99.documentElement&&_99.documentElement.clientHeight){w=_99.documentElement.clientWidth;h=_99.documentElement.clientHeight;}else{if(dojo.body().clientWidth){w=dojo.body().clientWidth;h=dojo.body().clientHeight;}}}}var _9c=dojo._docScroll();return{w:w,h:h,l:_9c.x,t:_9c.y};};dijit.placeOnScreen=function(_9d,pos,_9f,_a0){var _a1=dojo.map(_9f,function(_a2){return{corner:_a2,pos:pos};});return dijit._place(_9d,_a1);};dijit._place=function(_a3,_a4,_a5){var _a6=dijit.getViewport();if(!_a3.parentNode||String(_a3.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(_a3);}var _a7=null;for(var i=0;i<_a4.length;i++){var _a9=_a4[i].corner;var pos=_a4[i].pos;if(_a5){_a5(_a9);}var _ab=_a3.style.display;var _ac=_a3.style.visibility;_a3.style.visibility="hidden";_a3.style.display="";var mb=dojo.marginBox(_a3);_a3.style.display=_ab;_a3.style.visibility=_ac;var _ae=(_a9.charAt(1)=="L"?pos.x:Math.max(_a6.l,pos.x-mb.w)),_af=(_a9.charAt(0)=="T"?pos.y:Math.max(_a6.t,pos.y-mb.h)),_b0=(_a9.charAt(1)=="L"?Math.min(_a6.l+_a6.w,_ae+mb.w):pos.x),_b1=(_a9.charAt(0)=="T"?Math.min(_a6.t+_a6.h,_af+mb.h):pos.y),_b2=_b0-_ae,_b3=_b1-_af,_b4=(mb.w-_b2)+(mb.h-_b3);if(_a7==null||_b4<_a7.overflow){_a7={corner:_a9,aroundCorner:_a4[i].aroundCorner,x:_ae,y:_af,w:_b2,h:_b3,overflow:_b4};}if(_b4==0){break;}}_a3.style.left=_a7.x+"px";_a3.style.top=_a7.y+"px";return _a7;};dijit.placeOnScreenAroundElement=function(_b5,_b6,_b7,_b8){_b6=dojo.byId(_b6);var _b9=_b6.style.display;_b6.style.display="";var _ba=_b6.offsetWidth;var _bb=_b6.offsetHeight;var _bc=dojo.coords(_b6,true);_b6.style.display=_b9;var _bd=[];for(var _be in _b7){_bd.push({aroundCorner:_be,corner:_b7[_be],pos:{x:_bc.x+(_be.charAt(1)=="L"?0:_ba),y:_bc.y+(_be.charAt(0)=="T"?0:_bb)}});}return dijit._place(_b5,_bd,_b8);};}if(!dojo._hasResource["dijit._base.window"]){dojo._hasResource["dijit._base.window"]=true;dojo.provide("dijit._base.window");dijit.getDocumentWindow=function(doc){if(dojo.isSafari&&!doc._parentWindow){var fix=function(win){win.document._parentWindow=win;for(var i=0;i<win.frames.length;i++){fix(win.frames[i]);}};fix(window.top);}if(dojo.isIE&&window!==document.parentWindow&&!doc._parentWindow){doc.parentWindow.execScript("document._parentWindow = window;","Javascript");var win=doc._parentWindow;doc._parentWindow=null;return win;}return doc._parentWindow||doc.parentWindow||doc.defaultView;};}if(!dojo._hasResource["dijit._base.popup"]){dojo._hasResource["dijit._base.popup"]=true;dojo.provide("dijit._base.popup");dijit.popup=new function(){var _c4=[],_c5=1000,_c6=1;this.open=function(_c7){var _c8=_c7.popup,_c9=_c7.orient||{BL:"TL",TL:"BL"},_ca=_c7.around,id=(_c7.around&&_c7.around.id)?(_c7.around.id+"_dropdown"):("popup_"+_c6++);if(!_c7.submenu){this.closeAll();}var _cc=dojo.doc.createElement("div");_cc.id=id;_cc.className="dijitPopup";_cc.style.zIndex=_c5+_c4.length;if(_c7.parent){_cc.dijitPopupParent=_c7.parent.id;}dojo.body().appendChild(_cc);_c8.domNode.style.display="";_cc.appendChild(_c8.domNode);var _cd=new dijit.BackgroundIframe(_cc);var _ce=_ca?dijit.placeOnScreenAroundElement(_cc,_ca,_c9,_c8.orient?dojo.hitch(_c8,"orient"):null):dijit.placeOnScreen(_cc,_c7,_c9=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"]);var _cf=[];_cf.push(dojo.connect(_cc,"onkeypress",this,function(evt){if(evt.keyCode==dojo.keys.ESCAPE){_c7.onCancel();}}));if(_c8.onCancel){_cf.push(dojo.connect(_c8,"onCancel",null,_c7.onCancel));}_cf.push(dojo.connect(_c8,_c8.onExecute?"onExecute":"onChange",null,function(){if(_c4[0]&&_c4[0].onExecute){_c4[0].onExecute();}}));_c4.push({wrapper:_cc,iframe:_cd,widget:_c8,onExecute:_c7.onExecute,onCancel:_c7.onCancel,onClose:_c7.onClose,handlers:_cf});if(_c8.onOpen){_c8.onOpen(_ce);}return _ce;};this.close=function(){var _d1=_c4[_c4.length-1].widget;if(_d1.onClose){_d1.onClose();}if(!_c4.length){return;}var top=_c4.pop();var _d3=top.wrapper,_d4=top.iframe,_d1=top.widget,_d5=top.onClose;dojo.forEach(top.handlers,dojo.disconnect);if(!_d1||!_d1.domNode){return;}dojo.style(_d1.domNode,"display","none");dojo.body().appendChild(_d1.domNode);_d4.destroy();dojo._destroyElement(_d3);if(_d5){_d5();}};this.closeAll=function(){while(_c4.length){this.close();}};this.closeTo=function(_d6){while(_c4.length&&_c4[_c4.length-1].widget.id!=_d6.id){this.close();}};}();dijit._frames=new function(){var _d7=[];this.pop=function(){var _d8;if(_d7.length){_d8=_d7.pop();_d8.style.display="";}else{if(dojo.isIE){var _d9="<iframe src='javascript:\"\"' style='position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity=\"0\");'>";_d8=dojo.doc.createElement(_d9);}else{var _d8=dojo.doc.createElement("iframe");_d8.src='javascript:""';_d8.className="dijitBackgroundIframe";}_d8.tabIndex=-1;dojo.body().appendChild(_d8);}return _d8;};this.push=function(_da){_da.style.display="";if(dojo.isIE){_da.style.removeExpression("width");_da.style.removeExpression("height");}_d7.push(_da);};}();if(dojo.isIE&&dojo.isIE<7){dojo.addOnLoad(function(){var f=dijit._frames;dojo.forEach([f.pop()],f.push);});}dijit.BackgroundIframe=function(_dc){if(!_dc.id){throw new Error("no id");}if((dojo.isIE&&dojo.isIE<7)||(dojo.isFF&&dojo.isFF<3&&dojo.hasClass(dojo.body(),"dijit_a11y"))){var _dd=dijit._frames.pop();_dc.appendChild(_dd);if(dojo.isIE){_dd.style.setExpression("width","document.getElementById('"+_dc.id+"').offsetWidth");_dd.style.setExpression("height","document.getElementById('"+_dc.id+"').offsetHeight");}this.iframe=_dd;}};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(_de){if(dojo.isIE){if(dojo.marginBox(_de.parentNode).h<=_de.parentNode.scrollHeight){_de.scrollIntoView(false);}}else{if(dojo.isMozilla){_de.scrollIntoView(false);}else{var _df=_de.parentNode;var _e0=_df.scrollTop+dojo.marginBox(_df).h;var _e1=_de.offsetTop+dojo.marginBox(_de).h;if(_e0<_e1){_df.scrollTop+=(_e1-_e0);}else{if(_df.scrollTop>_de.offsetTop){_df.scrollTop-=(_df.scrollTop-_de.offsetTop);}}}}};}if(!dojo._hasResource["dijit._base.sniff"]){dojo._hasResource["dijit._base.sniff"]=true;dojo.provide("dijit._base.sniff");(function(){var d=dojo;var ie=d.isIE;var _e4=d.isOpera;var maj=Math.floor;var _e6={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_iequirks:ie&&d.isQuirks,dj_opera:_e4,dj_opera8:maj(_e4)==8,dj_opera9:maj(_e4)==9,dj_khtml:d.isKhtml,dj_safari:d.isSafari,dj_gecko:d.isMozilla};for(var p in _e6){if(_e6[p]){var _e8=dojo.doc.documentElement;if(_e8.className){_e8.className+=" "+p;}else{_e8.className=p;}}}})();}if(!dojo._hasResource["dijit._base.bidi"]){dojo._hasResource["dijit._base.bidi"]=true;dojo.provide("dijit._base.bidi");dojo.addOnLoad(function(){if(!dojo._isBodyLtr()){dojo.addClass(dojo.body(),"dijitRtl");}});}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(evt,_ea,_eb,_ec,obj,_ee,_ef){if(obj!=this._obj){this.stop();this._initialDelay=_ef?_ef:500;this._subsequentDelay=_ee?_ee:0.9;this._obj=obj;this._evt=evt;this._node=_eb;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(_ea,_ec);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(_f0,_f1,_f2,_f3,_f4,_f5){var ary=[];ary.push(dojo.connect(_f0,"onkeypress",this,function(evt){if(evt.keyCode==_f1.keyCode&&(!_f1.charCode||_f1.charCode==evt.charCode)&&((typeof _f1.ctrlKey=="undefined")||_f1.ctrlKey==evt.ctrlKey)&&((typeof _f1.altKey=="undefined")||_f1.altKey==evt.ctrlKey)&&((typeof _f1.shiftKey=="undefined")||_f1.shiftKey==evt.ctrlKey)){dojo.stopEvent(evt);dijit.typematic.trigger(_f1,_f2,_f0,_f3,_f1,_f4,_f5);}else{if(dijit.typematic._obj==_f1){dijit.typematic.stop();}}}));ary.push(dojo.connect(_f0,"onkeyup",this,function(evt){if(dijit.typematic._obj==_f1){dijit.typematic.stop();}}));return ary;},addMouseListener:function(_f9,_fa,_fb,_fc,_fd){var ary=[];ary.push(dojo.connect(_f9,"mousedown",this,function(evt){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_fa,_f9,_fb,_f9,_fc,_fd);}));ary.push(dojo.connect(_f9,"mouseup",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}));ary.push(dojo.connect(_f9,"mouseout",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}));ary.push(dojo.connect(_f9,"mousemove",this,function(evt){dojo.stopEvent(evt);}));ary.push(dojo.connect(_f9,"dblclick",this,function(evt){dojo.stopEvent(evt);if(dojo.isIE){dijit.typematic.trigger(evt,_fa,_f9,_fb,_f9,_fc,_fd);setTimeout("dijit.typematic.stop()",50);}}));return ary;},addListener:function(_104,_105,_106,_107,_108,_109,_10a){return this.addKeyListener(_105,_106,_107,_108,_109,_10a).concat(this.addMouseListener(_104,_107,_108,_109,_10a));}};}if(!dojo._hasResource["dijit._base.wai"]){dojo._hasResource["dijit._base.wai"]=true;dojo.provide("dijit._base.wai");dijit.waiNames=["waiRole","waiState"];dijit.wai={waiRole:{name:"waiRole",namespace:"http://www.w3.org/TR/xhtml2",alias:"x2",prefix:"wairole:"},waiState:{name:"waiState",namespace:"http://www.w3.org/2005/07/aaa",alias:"aaa",prefix:""},setAttr:function(node,ns,attr,_10e){if(dojo.isIE){node.setAttribute(this[ns].alias+":"+attr,this[ns].prefix+_10e);}else{node.setAttributeNS(this[ns]["namespace"],attr,this[ns].prefix+_10e);}},getAttr:function(node,ns,attr){if(dojo.isIE){return node.getAttribute(this[ns].alias+":"+attr);}else{return node.getAttributeNS(this[ns]["namespace"],attr);}},removeAttr:function(node,ns,attr){var _115=true;if(dojo.isIE){_115=node.removeAttribute(this[ns].alias+":"+attr);}else{node.removeAttributeNS(this[ns]["namespace"],attr);}return _115;},onload:function(){var div=document.createElement("div");div.id="a11yTestNode";div.style.cssText='border: 1px solid;border-color:red green;position: absolute;left: -999px;top: -999px;background-image: url("'+dojo.moduleUrl("dijit","form/templates/blank.gif")+'");';dojo.body().appendChild(div);function check(){var cs=dojo.getComputedStyle(div);if(cs){var _118=cs.backgroundImage;var _119=(cs.borderTopColor==cs.borderRightColor)||(_118!=null&&(_118=="none"||_118=="url(invalid-url:)"));dojo[_119?"addClass":"removeClass"](dojo.body(),"dijit_a11y");}}check();if(dojo.isIE){setInterval(check,4000);}}};if(dojo.isIE||dojo.isMoz){dojo._loaders.unshift(dijit.wai.onload);}}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.declare("dijit._Widget",null,{constructor:function(_11a,_11b){this.create(_11a,_11b);},id:"",lang:"",dir:"",srcNodeRef:null,domNode:null,create:function(_11c,_11d){this.srcNodeRef=dojo.byId(_11d);this._connects=[];this._attaches=[];if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_11c){dojo.mixin(this,_11c);}this.postMixInProperties();if(!this.id){this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));}dijit.registry.add(this);this.buildRendering();if(this.domNode){this.domNode.setAttribute("widgetId",this.id);if(this.srcNodeRef&&this.srcNodeRef.dir){this.domNode.dir=this.srcNodeRef.dir;}}this.postCreate();if(this.srcNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef;}},postMixInProperties:function(){},buildRendering:function(){this.domNode=this.srcNodeRef;},postCreate:function(){},startup:function(){},destroyRecursive:function(_11e){this.destroyDescendants();this.destroy();},destroy:function(_11f){this.uninitialize();dojo.forEach(this._connects,function(_120){dojo.forEach(_120,dojo.disconnect);});this.destroyRendering(_11f);dijit.registry.remove(this.id);},destroyRendering:function(_121){if(this.bgIframe){this.bgIframe.destroy();delete this.bgIframe;}if(this.domNode){dojo._destroyElement(this.domNode);delete this.domNode;}if(this.srcNodeRef){dojo._destroyElement(this.srcNodeRef);delete this.srcNodeRef;}},destroyDescendants:function(){dojo.forEach(this.getDescendants(),function(_122){_122.destroy();});},uninitialize:function(){return false;},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getDescendants:function(){var list=dojo.query("[widgetId]",this.domNode);return list.map(dijit.byNode);},nodesWithKeyClick:["input","button"],connect:function(obj,_125,_126){var _127=[];if(_125=="ondijitclick"){var w=this;if(!this.nodesWithKeyClick[obj.nodeName]){_127.push(dojo.connect(obj,"onkeydown",this,function(e){if(e.keyCode==dojo.keys.ENTER){return(dojo.isString(_126))?w[_126](e):_126.call(w,e);}else{if(e.keyCode==dojo.keys.SPACE){dojo.stopEvent(e);}}}));_127.push(dojo.connect(obj,"onkeyup",this,function(e){if(e.keyCode==dojo.keys.SPACE){return dojo.isString(_126)?w[_126](e):_126.call(w,e);}}));}_125="onclick";}_127.push(dojo.connect(obj,_125,this,_126));this._connects.push(_127);return _127;},disconnect:function(_12b){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_12b){dojo.forEach(_12b,dojo.disconnect);this._connects.splice(i,1);return;}}},isLeftToRight:function(){if(typeof this._ltr=="undefined"){this._ltr=(this.dir||dojo.getComputedStyle(this.domNode).direction)!="rtl";}return this._ltr;}});}if(!dojo._hasResource["dojo.string"]){dojo._hasResource["dojo.string"]=true;dojo.provide("dojo.string");dojo.string.pad=function(text,size,ch,end){var out=String(text);if(!ch){ch="0";}while(out.length<size){if(end){out+=ch;}else{out=ch+out;}}return out;};dojo.string.substitute=function(_132,map,_134,_135){return _132.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_136,key,_138){var _139=dojo.getObject(key,false,map);if(_138){_139=dojo.getObject(_138,false,_135)(_139);}if(_134){_139=_134(_139,key);}return _139.toString();});};dojo.string.trim=function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break;}}return str;};}if(!dojo._hasResource["dojo.date.stamp"]){dojo._hasResource["dojo.date.stamp"]=true;dojo.provide("dojo.date.stamp");dojo.date.stamp.fromISOString=function(_13c,_13d){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 _13e=dojo.date.stamp._isoRegExp.exec(_13c);var _13f=null;if(_13e){_13e.shift();_13e[1]&&_13e[1]--;_13e[6]&&(_13e[6]*=1000);if(_13d){_13d=new Date(_13d);dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _13d["get"+prop]();}).forEach(function(_141,_142){if(_13e[_142]===undefined){_13e[_142]=_141;}});}_13f=new Date(_13e[0]||1970,_13e[1]||0,_13e[2]||0,_13e[3]||0,_13e[4]||0,_13e[5]||0,_13e[6]||0);var _143=0;var _144=_13e[7]&&_13e[7].charAt(0);if(_144!="Z"){_143=((_13e[8]||0)*60)+(Number(_13e[9])||0);if(_144!="-"){_143*=-1;}}if(_144){_143-=_13f.getTimezoneOffset();}if(_143){_13f.setTime(_13f.getTime()+_143*60000);}}return _13f;};dojo.date.stamp.toISOString=function(_145,_146){var _=function(n){return(n<10)?"0"+n:n;};_146=_146||{};var _149=[];var _14a=_146.zulu?"getUTC":"get";var date="";if(_146.selector!="time"){date=[_145[_14a+"FullYear"](),_(_145[_14a+"Month"]()+1),_(_145[_14a+"Date"]())].join("-");}_149.push(date);if(_146.selector!="date"){var time=[_(_145[_14a+"Hours"]()),_(_145[_14a+"Minutes"]()),_(_145[_14a+"Seconds"]())].join(":");var _14d=_145[_14a+"Milliseconds"]();if(_146.milliseconds){time+="."+(_14d<100?"0":"")+_(_14d);}if(_146.zulu){time+="Z";}else{var _14e=_145.getTimezoneOffset();var _14f=Math.abs(_14e);time+=(_14e>0?"-":"+")+_(Math.floor(_14f/60))+":"+_(_14f%60);}_149.push(time);}return _149.join("T");};}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");dojo.parser=new function(){var d=dojo;function val2type(_151){if(d.isString(_151)){return"string";}if(typeof _151=="number"){return"number";}if(typeof _151=="boolean"){return"boolean";}if(d.isFunction(_151)){return"function";}if(d.isArray(_151)){return"array";}if(_151 instanceof Date){return"date";}if(_151 instanceof d._Url){return"url";}return"object";}function str2obj(_152,type){switch(type){case"string":return _152;case"number":return _152.length?Number(_152):NaN;case"boolean":return typeof _152=="boolean"?_152:!(_152.toLowerCase()=="false");case"function":if(d.isFunction(_152)){_152=_152.toString();_152=d.trim(_152.substring(_152.indexOf("{")+1,_152.length-1));}try{if(_152.search(/[^\w\.]+/i)!=-1){_152=d.parser._nameAnonFunc(new Function(_152),this);}return d.getObject(_152,false);}catch(e){return new Function();}case"array":return _152.split(/\s*,\s*/);case"date":switch(_152){case"":return new Date("");case"now":return new Date();default:return d.date.stamp.fromISOString(_152);}case"url":return d.baseUrl+_152;default:return d.fromJson(_152);}}var _154={};function getClassInfo(_155){if(!_154[_155]){var cls=d.getObject(_155);if(!d.isFunction(cls)){throw new Error("Could not load class '"+_155+"'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?");}var _157=cls.prototype;var _158={};for(var name in _157){if(name.charAt(0)=="_"){continue;}var _15a=_157[name];_158[name]=val2type(_15a);}_154[_155]={cls:cls,params:_158};}return _154[_155];}this._functionFromScript=function(_15b){var _15c="";var _15d="";var _15e=_15b.getAttribute("args");if(_15e){d.forEach(_15e.split(/\s*,\s*/),function(part,idx){_15c+="var "+part+" = arguments["+idx+"]; ";});}var _161=_15b.getAttribute("with");if(_161&&_161.length){d.forEach(_161.split(/\s*,\s*/),function(part){_15c+="with("+part+"){";_15d+="}";});}return new Function(_15c+_15b.innerHTML+_15d);};this._wireUpMethod=function(_163,_164){var nf=this._functionFromScript(_164);var _166=_164.getAttribute("event");if(_166){var mode=_164.getAttribute("type");if(mode&&(mode=="dojo/connect")){d.connect(_163,_166,null,nf);}else{_163[_166]=nf;}}else{nf.call(_163);}};this.instantiate=function(_168){var _169=[];d.forEach(_168,function(node){if(!node){return;}var type=node.getAttribute("dojoType");if((!type)||(!type.length)){return;}var _16c=getClassInfo(type);var _16d=_16c.cls;var ps=_16d._noScript||_16d.prototype._noScript;var _16f={};var _170=node.attributes;for(var name in _16c.params){var item=_170.getNamedItem(name);if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){continue;}var _173=_16c.params[name];_16f[name]=str2obj(item.value,_173);}if(!ps){var _174=d.query("> script[type='dojo/method'][event='preamble']",node).orphan();if(_174.length){_16f.preamble=d.parser._functionFromScript(_174[0]);}var _175=d.query("> script[type^='dojo/']",node).orphan();}var _176=_16d.markupFactory;if(!_176&&_16d.prototype){_176=_16d.prototype.markupFactory;}var _177=_176?_176(_16f,node,_16d):new _16d(_16f,node);_169.push(_177);var _178=node.getAttribute("jsId");if(_178){d.setObject(_178,_177);}if(!ps){_175.forEach(function(_179){d.parser._wireUpMethod(_177,_179);});}});d.forEach(_169,function(_17a){if(_17a&&(_17a.startup)&&((!_17a.getParent)||(!_17a.getParent()))){_17a.startup();}});return _169;};this.parse=function(_17b){var list=d.query("[dojoType]",_17b);var _17d=this.instantiate(list);return _17d;};}();(function(){var _17e=function(){if(djConfig.parseOnLoad==true){dojo.parser.parse();}};if(dojo.exists("dijit.wai.onload")&&(dijit.wai.onload===dojo._loaders[0])){dojo._loaders.splice(1,0,_17e);}else{dojo._loaders.unshift(_17e);}})();dojo.parser._anonCtr=0;dojo.parser._anon={};dojo.parser._nameAnonFunc=function(_17f,_180){var jpn="$joinpoint";var nso=(_180||dojo.parser._anon);if(dojo.isIE){var cn=_17f.__dojoNameCache;if(cn&&nso[cn]===_17f){return _17f.__dojoNameCache;}}var ret="__"+dojo.parser._anonCtr++;while(typeof nso[ret]!="undefined"){ret="__"+dojo.parser._anonCtr++;}nso[ret]=_17f;return ret;};}if(!dojo._hasResource["dijit._Templated"]){dojo._hasResource["dijit._Templated"]=true;dojo.provide("dijit._Templated");dojo.declare("dijit._Templated",null,{templateNode:null,templateString:null,templatePath:null,widgetsInTemplate:false,containerNode:null,buildRendering:function(){var _185=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString);var node;if(dojo.isString(_185)){var _187=this.declaredClass,_188=this;var tstr=dojo.string.substitute(_185,this,function(_18a,key){if(key.charAt(0)=="!"){_18a=_188[key.substr(1)];}if(typeof _18a=="undefined"){throw new Error(_187+" template:"+key);}return key.charAt(0)=="!"?_18a:_18a.toString().replace(/"/g,"&quot;");},this);node=dijit._Templated._createNodesFromText(tstr)[0];}else{node=_185.cloneNode(true);}this._attachTemplateNodes(node);if(this.srcNodeRef){dojo.style(this.styleNode||node,"cssText",this.srcNodeRef.style.cssText);if(this.srcNodeRef.className){node.className+=" "+this.srcNodeRef.className;}}this.domNode=node;if(this.srcNodeRef&&this.srcNodeRef.parentNode){this.srcNodeRef.parentNode.replaceChild(this.domNode,this.srcNodeRef);}if(this.widgetsInTemplate){var _18c=dojo.parser.parse(this.domNode);this._attachTemplateNodes(_18c,function(n,p){return n[p];});}this._fillContent(this.srcNodeRef);},_fillContent:function(_18f){var dest=this.containerNode;if(_18f&&dest){while(_18f.hasChildNodes()){dest.appendChild(_18f.firstChild);}}},_attachTemplateNodes:function(_191,_192){_192=_192||function(n,p){return n.getAttribute(p);};var _195=dojo.isArray(_191)?_191:(_191.all||_191.getElementsByTagName("*"));var x=dojo.isArray(_191)?0:-1;for(;x<_195.length;x++){var _197=(x==-1)?_191:_195[x];if(this.widgetsInTemplate&&_192(_197,"dojoType")){continue;}var _198=_192(_197,"dojoAttachPoint");if(_198){var _199,_19a=_198.split(/\s*,\s*/);while(_199=_19a.shift()){if(dojo.isArray(this[_199])){this[_199].push(_197);}else{this[_199]=_197;}}}var _19b=_192(_197,"dojoAttachEvent");if(_19b){var _19c,_19d=_19b.split(/\s*,\s*/);var trim=dojo.trim;while(_19c=_19d.shift()){if(_19c){var _19f=null;if(_19c.indexOf(":")!=-1){var _1a0=_19c.split(":");_19c=trim(_1a0[0]);_19f=trim(_1a0[1]);}else{_19c=trim(_19c);}if(!_19f){_19f=_19c;}this.connect(_197,_19c,_19f);}}}var name,_1a2=["waiRole","waiState"];while(name=_1a2.shift()){var wai=dijit.wai[name];var _1a4=_192(_197,wai.name);if(_1a4){var role="role";var val;_1a4=_1a4.split(/\s*,\s*/);while(val=_1a4.shift()){if(val.indexOf("-")!=-1){var _1a7=val.split("-");role=_1a7[0];val=_1a7[1];}dijit.wai.setAttr(_197,wai.name,role,val);}}}}}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(_1a8,_1a9){var _1aa=dijit._Templated._templateCache;var key=_1a9||_1a8;var _1ac=_1aa[key];if(_1ac){return _1ac;}if(!_1a9){_1a9=dijit._Templated._sanitizeTemplateString(dojo._getText(_1a8));}_1a9=dojo.string.trim(_1a9);if(_1a9.match(/\$\{([^\}]+)\}/g)){return(_1aa[key]=_1a9);}else{return(_1aa[key]=dijit._Templated._createNodesFromText(_1a9)[0]);}};dijit._Templated._sanitizeTemplateString=function(_1ad){if(_1ad){_1ad=_1ad.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _1ae=_1ad.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_1ae){_1ad=_1ae[1];}}else{_1ad="";}return _1ad;};if(dojo.isIE){dojo.addOnUnload(function(){var _1af=dijit._Templated._templateCache;for(var key in _1af){var _1b1=_1af[key];if(!isNaN(_1b1.nodeType)){dojo._destroyElement(_1b1);}_1af[key]=null;}});}(function(){var _1b2={cell:{re:/^<t[dh][\s\r\n>]/i,pre:"<table><tbody><tr>",post:"</tr></tbody></table>"},row:{re:/^<tr[\s\r\n>]/i,pre:"<table><tbody>",post:"</tbody></table>"},section:{re:/^<(thead|tbody|tfoot)[\s\r\n>]/i,pre:"<table>",post:"</table>"}};var tn;dijit._Templated._createNodesFromText=function(text){if(!tn){tn=dojo.doc.createElement("div");tn.style.display="none";}var _1b5="none";var _1b6=text.replace(/^\s+/,"");for(var type in _1b2){var map=_1b2[type];if(map.re.test(_1b6)){_1b5=type;text=map.pre+text+map.post;break;}}tn.innerHTML=text;dojo.body().appendChild(tn);if(tn.normalize){tn.normalize();}var tag={cell:"tr",row:"tbody",section:"table"}[_1b5];var _1ba=(typeof tag!="undefined")?tn.getElementsByTagName(tag)[0]:tn;var _1bb=[];while(_1ba.firstChild){_1bb.push(_1ba.removeChild(_1ba.firstChild));}tn.innerHTML="";return _1bb;};})();dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});}if(!dojo._hasResource["dojo.i18n"]){dojo._hasResource["dojo.i18n"]=true;dojo.provide("dojo.i18n");dojo.i18n.getLocalization=function(_1bc,_1bd,_1be){_1be=dojo.i18n.normalizeLocale(_1be);var _1bf=_1be.split("-");var _1c0=[_1bc,"nls",_1bd].join(".");var _1c1=dojo._loadedModules[_1c0];if(_1c1){var _1c2;for(var i=_1bf.length;i>0;i--){var loc=_1bf.slice(0,i).join("_");if(_1c1[loc]){_1c2=_1c1[loc];break;}}if(!_1c2){_1c2=_1c1.ROOT;}if(_1c2){var _1c5=function(){};_1c5.prototype=_1c2;return new _1c5();}}throw new Error("Bundle not found: "+_1bd+" in "+_1bc+" , locale="+_1be);};dojo.i18n.normalizeLocale=function(_1c6){var _1c7=_1c6?_1c6.toLowerCase():dojo.locale;if(_1c7=="root"){_1c7="ROOT";}return _1c7;};dojo.i18n._requireLocalization=function(_1c8,_1c9,_1ca,_1cb){var _1cc=dojo.i18n.normalizeLocale(_1ca);var _1cd=[_1c8,"nls",_1c9].join(".");var _1ce="";if(_1cb){var _1cf=_1cb.split(",");for(var i=0;i<_1cf.length;i++){if(_1cc.indexOf(_1cf[i])==0){if(_1cf[i].length>_1ce.length){_1ce=_1cf[i];}}}if(!_1ce){_1ce="ROOT";}}var _1d1=_1cb?_1ce:_1cc;var _1d2=dojo._loadedModules[_1cd];var _1d3=null;if(_1d2){if(djConfig.localizationComplete&&_1d2._built){return;}var _1d4=_1d1.replace(/-/g,"_");var _1d5=_1cd+"."+_1d4;_1d3=dojo._loadedModules[_1d5];}if(!_1d3){_1d2=dojo.provide(_1cd);var syms=dojo._getModuleSymbols(_1c8);var _1d7=syms.concat("nls").join("/");var _1d8;dojo.i18n._searchLocalePath(_1d1,_1cb,function(loc){var _1da=loc.replace(/-/g,"_");var _1db=_1cd+"."+_1da;var _1dc=false;if(!dojo._loadedModules[_1db]){dojo.provide(_1db);var _1dd=[_1d7];if(loc!="ROOT"){_1dd.push(loc);}_1dd.push(_1c9);var _1de=_1dd.join("/")+".js";_1dc=dojo._loadPath(_1de,null,function(hash){var _1e0=function(){};_1e0.prototype=_1d8;_1d2[_1da]=new _1e0();for(var j in hash){_1d2[_1da][j]=hash[j];}});}else{_1dc=true;}if(_1dc&&_1d2[_1da]){_1d8=_1d2[_1da];}else{_1d2[_1da]=_1d8;}if(_1cb){return true;}});}if(_1cb&&_1cc!=_1ce){_1d2[_1cc.replace(/-/g,"_")]=_1d2[_1ce.replace(/-/g,"_")];}};(function(){var _1e2=djConfig.extraLocale;if(_1e2){if(!_1e2 instanceof Array){_1e2=[_1e2];}var req=dojo.i18n._requireLocalization;dojo.i18n._requireLocalization=function(m,b,_1e6,_1e7){req(m,b,_1e6,_1e7);if(_1e6){return;}for(var i=0;i<_1e2.length;i++){req(m,b,_1e2[i],_1e7);}};}})();dojo.i18n._searchLocalePath=function(_1e9,down,_1eb){_1e9=dojo.i18n.normalizeLocale(_1e9);var _1ec=_1e9.split("-");var _1ed=[];for(var i=_1ec.length;i>0;i--){_1ed.push(_1ec.slice(0,i).join("-"));}_1ed.push(false);if(down){_1ed.reverse();}for(var j=_1ed.length-1;j>=0;j--){var loc=_1ed[j]||"ROOT";var stop=_1eb(loc);if(stop){break;}}};dojo.i18n._preloadLocalizations=function(_1f2,_1f3){function preload(_1f4){_1f4=dojo.i18n.normalizeLocale(_1f4);dojo.i18n._searchLocalePath(_1f4,true,function(loc){for(var i=0;i<_1f3.length;i++){if(_1f3[i]==loc){dojo.require(_1f2+"_"+loc);return true;}}return false;});}preload();var _1f7=djConfig.extraLocale||[];for(var i=0;i<_1f7.length;i++){preload(_1f7[i]);}};}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,"class":"dijitContentPane",postCreate:function(){this.domNode.title="";if(this.preload){this._loadCheck();}var _1f9=dojo.i18n.getLocalization("dijit","loading",this.lang);this.loadingMessage=dojo.string.substitute(this.loadingMessage,_1f9);this.errorMessage=dojo.string.substitute(this.errorMessage,_1f9);dojo.addClass(this.domNode,this["class"]);},startup:function(){if(!this._started){this._loadCheck();this._started=true;}},refresh:function(){return this._prepareLoad(true);},setHref:function(href){this.href=href;return this._prepareLoad();},setContent:function(data){if(!this._isDownloaded){this.href="";this._onUnloadHandler();}this._setContent(data||"");this._isDownloaded=false;if(this.parseOnLoad){this._createSubWidgets();}this._onLoadHandler();},cancel:function(){if(this._xhrDfd&&(this._xhrDfd.fired==-1)){this._xhrDfd.cancel();}delete this._xhrDfd;},destroy:function(){if(this._beingDestroyed){return;}this._onUnloadHandler();this._beingDestroyed=true;dijit.layout.ContentPane.superclass.destroy.call(this);},resize:function(size){dojo.marginBox(this.domNode,size);},_prepareLoad:function(_1fd){this.cancel();this.isLoaded=false;this._loadCheck(_1fd);},_loadCheck:function(_1fe){var _1ff=((this.open!==false)&&(this.domNode.style.display!="none"));if(this.href&&(_1fe||(this.preload&&!this._xhrDfd)||(this.refreshOnShow&&_1ff&&!this._xhrDfd)||(!this.isLoaded&&_1ff&&!this._xhrDfd))){this._downloadExternalContent();}},_downloadExternalContent:function(){this._onUnloadHandler();this._setContent(this.onDownloadStart.call(this));var self=this;var _201={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};if(dojo.isObject(this.ioArgs)){dojo.mixin(_201,this.ioArgs);}var hand=this._xhrDfd=(this.ioMethod||dojo.xhrGet)(_201);hand.addCallback(function(html){try{self.onDownloadEnd.call(self);self._isDownloaded=true;self.setContent.call(self,html);}catch(err){self._onError.call(self,"Content",err);}delete self._xhrDfd;return html;});hand.addErrback(function(err){if(!hand.cancelled){self._onError.call(self,"Download",err);}delete self._xhrDfd;return err;});},_onLoadHandler:function(){this.isLoaded=true;try{this.onLoad.call(this);}catch(e){console.error("Error "+this.widgetId+" running custom onLoad code");}},_onUnloadHandler:function(){this.isLoaded=false;this.cancel();try{this.onUnload.call(this);}catch(e){console.error("Error "+this.widgetId+" running custom onUnload code");}},_setContent:function(cont){this.destroyDescendants();try{var node=this.containerNode||this.domNode;while(node.firstChild){dojo._destroyElement(node.firstChild);}if(typeof cont=="string"){if(this.extractContent){match=cont.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(match){cont=match[1];}}node.innerHTML=cont;}else{if(cont.nodeType){node.appendChild(cont);}else{dojo.forEach(cont,function(n){node.appendChild(n.cloneNode(true));});}}}catch(e){var _208=this.onContentError(e);try{node.innerHTML=_208;}catch(e){console.error("Fatal "+this.id+" could not change content due to "+e.message,e);}}},_onError:function(type,err,_20b){var _20c=this["on"+type+"Error"].call(this,err);if(_20b){console.error(_20b,err);}else{if(_20c){this._setContent.call(this,_20c);}}},_createSubWidgets:function(){var _20d=this.containerNode||this.domNode;try{dojo.parser.parse(_20d,true);}catch(e){this._onError("Content",e,"Couldn't create widgets in "+this.id+(this.href?" from "+this.href:""));}},onLoad:function(e){},onUnload:function(e){},onDownloadStart:function(){return this.loadingMessage;},onContentError:function(_210){},onDownloadError:function(_211){return this.errorMessage;},onDownloadEnd:function(){}});}if(!dojo._hasResource["dijit.form.Form"]){dojo._hasResource["dijit.form.Form"]=true;dojo.provide("dijit.form.Form");dojo.declare("dijit.form._FormMixin",null,{execute:function(_212){},onCancel:function(){},onExecute:function(){},templateString:"<form dojoAttachPoint='containerNode' dojoAttachEvent='onsubmit:_onSubmit' enctype='multipart/form-data'></form>",_onSubmit:function(e){dojo.stopEvent(e);this.onExecute();this.execute(this.getValues());},submit:function(){this.containerNode.submit();},setValues:function(obj){var map={};dojo.forEach(this.getDescendants(),function(_216){if(!_216.name){return;}var _217=map[_216.name]||(map[_216.name]=[]);_217.push(_216);});for(var name in map){var _219=map[name],_21a=dojo.getObject(name,false,obj);if(!dojo.isArray(_21a)){_21a=[_21a];}if(_219[0].setChecked){dojo.forEach(_219,function(w,i){w.setChecked(dojo.indexOf(_21a,w.value)!=-1);});}else{dojo.forEach(_219,function(w,i){w.setValue(_21a[i]);});}}},getValues:function(){var obj={};dojo.forEach(this.getDescendants(),function(_220){var _221=_220.getValue?_220.getValue():_220.value;var name=_220.name;if(!name){return;}if(_220.setChecked){if(/Radio/.test(_220.declaredClass)){if(_220.checked){dojo.setObject(name,_221,obj);}}else{var ary=dojo.getObject(name,false,obj);if(!ary){ary=[];dojo.setObject(name,ary,obj);}if(_220.checked){ary.push(_221);}}}else{dojo.setObject(name,_221,obj);}});return obj;},isValid:function(){return dojo.every(this.getDescendants(),function(_224){return !_224.isValid||_224.isValid();});}});dojo.declare("dijit.form.Form",[dijit._Widget,dijit._Templated,dijit.form._FormMixin],null);}if(!dojo._hasResource["dijit.Dialog"]){dojo._hasResource["dijit.Dialog"]=true;dojo.provide("dijit.Dialog");dojo.declare("dijit.DialogUnderlay",[dijit._Widget,dijit._Templated],{templateString:"<div class=dijitDialogUnderlayWrapper id='${id}_underlay'><div class=dijitDialogUnderlay dojoAttachPoint='node'></div></div>",postCreate:function(){dojo.body().appendChild(this.domNode);this.bgIframe=new dijit.BackgroundIframe(this.domNode);},layout:function(){var _225=dijit.getViewport();var is=this.node.style,os=this.domNode.style;os.top=_225.t+"px";os.left=_225.l+"px";is.width=_225.w+"px";is.height=_225.h+"px";var _228=dijit.getViewport();if(_225.w!=_228.w){is.width=_228.w+"px";}if(_225.h!=_228.h){is.height=_228.h+"px";}},show:function(){this.domNode.style.display="block";this.layout();if(this.bgIframe.iframe){this.bgIframe.iframe.style.display="block";}this._resizeHandler=this.connect(window,"onresize","layout");},hide:function(){this.domNode.style.display="none";this.domNode.style.width=this.domNode.style.height="1px";if(this.bgIframe.iframe){this.bgIframe.iframe.style.display="none";}this.disconnect(this._resizeHandler);},uninitialize:function(){if(this.bgIframe){this.bgIframe.destroy();}}});dojo.declare("dijit.Dialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin],{templateString:null,templateString:'<div class="dijitDialog">\n\t\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar" tabindex="0" waiRole="dialog" title="${title}">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle">${title}</span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: hide">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText">x</span>\n\t\t</span>\n\t</div>\n\t\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent"></div>\n\t<span dojoAttachPoint="tabEnd" dojoAttachEvent="onfocus:_cycleFocus" tabindex="0"></span>\n</div>\n',title:"",duration:400,_lastFocusItem:null,postCreate:function(){dojo.body().appendChild(this.domNode);dijit.Dialog.superclass.postCreate.apply(this,arguments);this.domNode.style.display="none";this.connect(this,"onExecute","hide");this.connect(this,"onCancel","hide");},onLoad:function(){this._position();dijit.Dialog.superclass.onLoad.call(this);},_setup:function(){this._modalconnects=[];if(this.titleBar){this._moveable=new dojo.dnd.Moveable(this.domNode,{handle:this.titleBar});}this._underlay=new dijit.DialogUnderlay();var node=this.domNode;this._fadeIn=dojo.fx.combine([dojo.fadeIn({node:node,duration:this.duration}),dojo.fadeIn({node:this._underlay.domNode,duration:this.duration,onBegin:dojo.hitch(this._underlay,"show")})]);this._fadeOut=dojo.fx.combine([dojo.fadeOut({node:node,duration:this.duration,onEnd:function(){node.style.display="none";}}),dojo.fadeOut({node:this._underlay.domNode,duration:this.duration,onEnd:dojo.hitch(this._underlay,"hide")})]);},uninitialize:function(){if(this._underlay){this._underlay.destroy();}},_position:function(){var _22a=dijit.getViewport();var mb=dojo.marginBox(this.domNode);var _22c=this.domNode.style;_22c.left=(_22a.l+(_22a.w-mb.w)/2)+"px";_22c.top=(_22a.t+(_22a.h-mb.h)/2)+"px";},_findLastFocus:function(evt){this._lastFocused=evt.target;},_cycleFocus:function(evt){if(!this._lastFocusItem){this._lastFocusItem=this._lastFocused;}this.titleBar.focus();},_onKey:function(evt){if(evt.keyCode){var node=evt.target;if(node==this.titleBar&&evt.shiftKey&&evt.keyCode==dojo.keys.TAB){if(this._lastFocusItem){this._lastFocusItem.focus();}dojo.stopEvent(evt);}else{while(node){if(node==this.domNode){if(evt.keyCode==dojo.keys.ESCAPE){this.hide();}else{return;}}node=node.parentNode;}if(evt.keyCode!=dojo.keys.TAB){dojo.stopEvent(evt);}else{if(!dojo.isOpera){try{this.titleBar.focus();}catch(e){}}}}}},show:function(){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(document.documentElement,"onkeypress",this,"_onKey"));var ev=typeof(document.ondeactivate)=="object"?"ondeactivate":"onblur";this._modalconnects.push(dojo.connect(this.containerNode,ev,this,"_findLastFocus"));dojo.style(this.domNode,"opacity",0);this.domNode.style.display="block";this._loadCheck();this._position();this._fadeIn.play();this._savedFocus=dijit.getFocus(this);setTimeout(dojo.hitch(this,function(){dijit.focus(this.titleBar);}),50);},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=[];dijit.focus(this._savedFocus);},layout:function(){if(this.domNode.style.display=="block"){this._underlay.layout();this._position();}}});dojo.declare("dijit.TooltipDialog",[dijit.layout.ContentPane,dijit._Templated,dijit.form._FormMixin],{title:"",_lastFocusItem:null,templateString:null,templateString:'<div id="${id}" class="dijitTooltipDialog" >\n\t<div class="dijitTooltipContainer">\n\t\t<div  class ="dijitTooltipContents dijitTooltipFocusNode" dojoAttachPoint="containerNode" tabindex="0" waiRole="dialog"></div>\n\t</div>\n\t<span dojoAttachPoint="tabEnd" tabindex="0" dojoAttachEvent="focus:_cycleFocus"></span>\n\t<div class="dijitTooltipConnector" ></div>\n</div>\n',postCreate:function(){dijit.TooltipDialog.superclass.postCreate.apply(this,arguments);this.connect(this.containerNode,"onkeypress","_onKey");var ev=typeof(document.ondeactivate)=="object"?"ondeactivate":"onblur";this.connect(this.containerNode,ev,"_findLastFocus");this.containerNode.title=this.title;},orient:function(_233){this.domNode.className="dijitTooltipDialog  dijitTooltipAB"+(_233.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(_233.charAt(0)=="T"?"Below":"Above");},onOpen:function(pos){this.orient(pos.corner);this._loadCheck();this.containerNode.focus();},_onKey:function(evt){if(evt.keyCode==dojo.keys.ESCAPE){this.onCancel();}else{if(evt.target==this.containerNode&&evt.shiftKey&&evt.keyCode==dojo.keys.TAB){if(this._lastFocusItem){this._lastFocusItem.focus();}dojo.stopEvent(evt);}}},_findLastFocus:function(evt){this._lastFocused=evt.target;},_cycleFocus:function(evt){if(!this._lastFocusItem){this._lastFocusItem=this._lastFocused;}this.containerNode.focus();}});}if(!dojo._hasResource["dojo.AdapterRegistry"]){dojo._hasResource["dojo.AdapterRegistry"]=true;dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(_238){this.pairs=[];this.returnWrappers=_238||false;};dojo.extend(dojo.AdapterRegistry,{register:function(name,_23a,wrap,_23c,_23d){this.pairs[((_23d)?"unshift":"push")]([name,_23a,wrap,_23c]);},match:function(){for(var i=0;i<this.pairs.length;i++){var pair=this.pairs[i];if(pair[1].apply(this,arguments)){if((pair[3])||(this.returnWrappers)){return pair[2];}else{return pair[2].apply(this,arguments);}}}throw new Error("No match found");},unregister:function(name){for(var i=0;i<this.pairs.length;i++){var pair=this.pairs[i];if(pair[0]==name){this.pairs.splice(i,1);return true;}}return false;}});}if(!dojo._hasResource["dojo.io.script"]){dojo._hasResource["dojo.io.script"]=true;dojo.provide("dojo.io.script");dojo.io.script={get:function(args){var dfd=this._makeScriptDeferred(args);var _245=dfd.ioArgs;dojo._ioAddQueryToUrl(_245);this.attach(_245.id,_245.url);dojo._ioWatch(dfd,this._validCheck,this._ioCheck,this._resHandle);return dfd;},attach:function(id,url){var _248=dojo.doc.createElement("script");_248.type="text/javascript";_248.src=url;_248.id=id;dojo.doc.getElementsByTagName("head")[0].appendChild(_248);},remove:function(id){dojo._destroyElement(dojo.byId(id));if(this["jsonp_"+id]){delete this["jsonp_"+id];}},_makeScriptDeferred:function(args){var dfd=dojo._ioSetArgs(args,this._deferredCancel,this._deferredOk,this._deferredError);var _24c=dfd.ioArgs;_24c.id="dojoIoScript"+(this._counter++);_24c.canDelete=false;if(args.callbackParamName){_24c.query=_24c.query||"";if(_24c.query.length>0){_24c.query+="&";}_24c.query+=args.callbackParamName+"=dojo.io.script.jsonp_"+_24c.id+"._jsonpCallback";_24c.canDelete=true;dfd._jsonpCallback=this._jsonpCallback;this["jsonp_"+_24c.id]=dfd;}return dfd;},_deferredCancel:function(dfd){dfd.canceled=true;if(dfd.ioArgs.canDelete){dojo.io.script._deadScripts.push(dfd.ioArgs.id);}},_deferredOk:function(dfd){if(dfd.ioArgs.canDelete){dojo.io.script._deadScripts.push(dfd.ioArgs.id);}if(dfd.ioArgs.json){return dfd.ioArgs.json;}else{return dfd.ioArgs;}},_deferredError:function(_24f,dfd){if(dfd.ioArgs.canDelete){if(_24f.dojoType=="timeout"){dojo.io.script.remove(dfd.ioArgs.id);}else{dojo.io.script._deadScripts.push(dfd.ioArgs.id);}}console.debug("dojo.io.script error",_24f);return _24f;},_deadScripts:[],_counter:1,_validCheck:function(dfd){var _252=dojo.io.script;var _253=_252._deadScripts;if(_253&&_253.length>0){for(var i=0;i<_253.length;i++){_252.remove(_253[i]);}dojo.io.script._deadScripts=[];}return true;},_ioCheck:function(dfd){if(dfd.ioArgs.json){return true;}var _256=dfd.ioArgs.args.checkString;if(_256&&eval("typeof("+_256+") != 'undefined'")){return true;}return false;},_resHandle:function(dfd){if(dojo.io.script._ioCheck(dfd)){dfd.callback(dfd);}else{dfd.errback(new Error("inconceivable dojo.io.script._resHandle error"));}},_jsonpCallback:function(json){this.ioArgs.json=json;}};}if(!dojo._hasResource["dojox._cometd.cometd"]){dojo._hasResource["dojox._cometd.cometd"]=true;dojo.provide("dojox._cometd.cometd");dojox.cometd=new function(){this.initialized=false;this.connected=false;this.connectionTypes=new dojo.AdapterRegistry(true);this.version=0.1;this.minimumVersion=0.1;this.clientId=null;this._isXD=false;this.handshakeReturn=null;this.currentTransport=null;this.url=null;this.lastMessage=null;this.globalTopicChannels={};this.backlog=[];this.handleAs="json-comment-optional";this.advice;this._subscriptions=[];this.tunnelInit=function(_259,_25a){};this.tunnelCollapse=function(){console.debug("tunnel collapsed!");};this.init=function(_25b,root,_25d){if(dojo.isString(_25b)){var _25e=root;root=_25b;_25b=_25e;}_25b=_25b||{};_25b.version=this.version;_25b.minimumVersion=this.minimumVersion;_25b.channel="/meta/handshake";_25b.ext={"json-comment-filtered":true};this.url=root||djConfig.cometdRoot;if(!this.url){console.debug("no cometd root specified in djConfig and no root passed");return;}var _25f={url:this.url,handleAs:this.handleAs,content:{message:dojo.toJson([_25b])},callbackParamName:"jsonp",load:dojo.hitch(this,"finishInit"),error:function(e){console.debug("handshake error!:",e);}};var _261="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";var r=(""+window.location).match(new RegExp(_261));if(r[4]){var tmp=r[4].split(":");var _264=tmp[0];var _265=tmp[1]||"80";r=this.url.match(new RegExp(_261));if(r[4]){tmp=r[4].split(":");var _266=tmp[0];var _267=tmp[1]||"80";this._isXD=((_266!=_264)||(_267!=_265));}}if(_25d){dojo.mixin(_25f,_25d);}if(this._isXD){return dojo.io.script.get(_25f);}else{return dojo.xhrPost(_25f);}};this.finishInit=function(data){data=data[0];this.handshakeReturn=data;if(data.advice){this.advice=data.advice;}if((!data.successful)&&(!data.authSuccessful)){console.debug("cometd init failed");return;}if(data.version<this.minimumVersion){console.debug("cometd protocol version mismatch. We wanted",this.minimumVersion,"but got",data.version);return;}this.currentTransport=this.connectionTypes.match(data.supportedConnectionTypes,data.version,this._isXD);this.currentTransport.version=data.version;this.clientId=data.clientId;this.tunnelInit=dojo.hitch(this.currentTransport,"tunnelInit");this.tunnelCollapse=dojo.hitch(this.currentTransport,"tunnelCollapse");this.currentTransport.startup(data);while(this.backlog.length!=0){var cur=this.backlog.shift();var fn=cur.shift();this[fn].apply(this,cur);}dojo.addOnUnload(dojox.cometd,"disconnect");};this._getRandStr=function(){return Math.random().toString().substring(2,10);};this.deliver=function(_26b){dojo.forEach(_26b,this._deliver,this);return _26b;};this._deliver=function(_26c){if(!this.currentTransport){this.backlog.push(["deliver",_26c]);return;}if(!_26c.channel){if(_26c.success!==true){console.debug("cometd error: no channel for message!",_26c);return;}}this.lastMessage=_26c;if(_26c.advice){this.advice=_26c.advice;}if((_26c.channel)&&(_26c.channel.length>5)&&(_26c.channel.substr(0,5)=="/meta")){switch(_26c.channel){case"/meta/subscribe":if(!_26c.successful){console.debug("cometd subscription error for channel",_26c.channel,":",_26c.error);return;}dojox.cometd.subscribed(_26c.subscription,_26c);break;case"/meta/unsubscribe":if(!_26c.successful){console.debug("cometd unsubscription error for channel",_26c.channel,":",_26c.error);return;}this.unsubscribed(_26c.subscription,_26c);break;}}this.currentTransport.deliver(_26c);if(_26c.data){var _26d=(this.globalTopicChannels[_26c.channel])?_26c.channel:"/cometd"+_26c.channel;dojo.publish(_26d,[_26c]);}};this.disconnect=function(){dojo.forEach(this._subscriptions,dojo.unsubscribe);this._subscriptions=[];this.backlog=[];if(!this.currentTransport){console.debug("no current transport to disconnect from");return;}this.currentTransport.disconnect();};this.publish=function(_26e,data,_270){if(!this.currentTransport){this.backlog.push(["publish",_26e,data,_270]);return;}var _271={data:data,channel:_26e};if(_270){dojo.mixin(_271,_270);}return this.currentTransport.sendMessage(_271);};this.subscribe=function(_272,_273,_274,_275){if(!this.currentTransport){this.backlog.push(["subscribe",_272,_273,_274,_275]);return;}if((_273!==true)||(_273!==false)){var ofn=_275;_275=_274;_274=_273;_273=ofn;}if(_274){var _277=(_273)?_272:"/cometd"+_272;if(_273){this.globalTopicChannels[_272]=true;}this._subscriptions.push(dojo.subscribe(_277,_274,_275));}return this.currentTransport.sendMessage({channel:"/meta/subscribe",subscription:_272});};this.subscribed=function(_278,_279){};this.unsubscribe=function(_27a,_27b,_27c,_27d){if(!this.currentTransport){this.backlog.push(["unsubscribe",_27a,_27b,_27c,_27d]);return;}if(_27c){var _27e=(_27b)?_27a:"/cometd"+_27a;dojo.unsubscribe(_27e,_27c,_27d);}return this.currentTransport.sendMessage({channel:"/meta/unsubscribe",subscription:_27a});};this.unsubscribed=function(_27f,_280){};};dojox.cometd.longPollTransport=new function(){this.lastTimestamp=null;this.lastId=null;this.backlog=[];this.check=function(_281,_282,_283){return((!_283)&&(dojo.indexOf(_281,"long-polling")>=0));};this.tunnelInit=function(){if(dojox.cometd.connected){return;}this.openTunnelWith({message:dojo.toJson([{channel:"/meta/connect",clientId:dojox.cometd.clientId,connectionType:"long-polling"}])});};this.tunnelCollapse=function(){if(!dojox.cometd.connected){dojox.cometd.connected=false;if(dojox.cometd.advice){if(dojox.cometd.advice.reconnect=="none"){return;}if((dojox.cometd.advice.interval)&&(dojox.cometd.advice.interval>0)){setTimeout(function(){dojox.cometd.currentTransport._reconnect();},dojox.cometd.advice.interval);}else{this._reconnect();}}else{this._reconnect();}}};this._reconnect=function(){if((dojox.cometd.advice)&&(dojox.cometd.advice.reconnect=="handshake")){dojox.cometd.init(null,dojox.cometd.url);}else{if(dojox.cometd.initialized){this.openTunnelWith({message:dojo.toJson([{channel:"/meta/reconnect",connectionType:"long-polling",clientId:dojox.cometd.clientId,timestamp:this.lastTimestamp,id:this.lastId}])});}}};this.deliver=function(_284){if(_284.timestamp){this.lastTimestamp=_284.timestamp;}if(_284.id){this.lastId=_284.id;}if((_284.channel.length>5)&&(_284.channel.substr(0,5)=="/meta")){switch(_284.channel){case"/meta/connect":if(!_284.successful){console.debug("cometd connection error:",_284.error);return;}dojox.cometd.initialized=true;this.processBacklog();break;case"/meta/reconnect":if(!_284.successful){console.debug("cometd reconnection error:",_284.error);return;}break;case"/meta/subscribe":if(!_284.successful){console.debug("cometd subscription error for channel",_284.channel,":",_284.error);return;}dojox.cometd.subscribed(_284.channel);break;}}};this.openTunnelWith=function(_285,url){var d=dojo.xhrPost({url:(url||dojox.cometd.url),content:_285,handleAs:dojox.cometd.handleAs,load:dojo.hitch(this,function(data){dojox.cometd.connected=false;dojox.cometd.deliver(data);this.tunnelCollapse();}),error:function(err){console.debug("tunnel opening failed:",err);dojo.cometd.connected=false;}});dojox.cometd.connected=true;};this.processBacklog=function(){while(this.backlog.length>0){this.sendMessage(this.backlog.shift(),true);}};this.sendMessage=function(_28a,_28b){if((_28b)||(dojox.cometd.initialized)){_28a.clientId=dojox.cometd.clientId;return dojo.xhrPost({url:dojox.cometd.url||djConfig.cometdRoot,handleAs:dojox.cometd.handleAs,load:dojo.hitch(dojox.cometd,"deliver"),content:{message:dojo.toJson([_28a])}});}else{this.backlog.push(_28a);}};this.startup=function(_28c){if(dojox.cometd.initialized){return;}this.tunnelInit();};this.disconnect=function(){if(!dojox.cometd.initialized){return;}dojo.xhrPost({url:dojox.cometd.url||djConfig.cometdRoot,handleAs:dojox.cometd.handleAs,content:{message:dojo.toJson([{channel:"/meta/disconnect",clientId:dojox.cometd.clientId}])}});dojox.cometd.initialized=false;};};dojox.cometd.callbackPollTransport=new function(){this.lastTimestamp=null;this.lastId=null;this.backlog=[];this.check=function(_28d,_28e,_28f){return(dojo.indexOf(_28d,"callback-polling")>=0);};this.tunnelInit=function(){if(dojox.cometd.connected){return;}this.openTunnelWith({message:dojo.toJson([{channel:"/meta/connect",clientId:dojox.cometd.clientId,connectionType:"callback-polling"}])});};this.tunnelCollapse=function(){if(!dojox.cometd.connected){this.openTunnelWith({message:dojo.toJson([{channel:"/meta/reconnect",connectionType:"long-polling",clientId:dojox.cometd.clientId,timestamp:this.lastTimestamp,id:this.lastId}])});}};this.deliver=dojox.cometd.longPollTransport.deliver;this.openTunnelWith=function(_290,url){dojo.io.script.get({load:dojo.hitch(this,function(data){dojox.cometd.connected=false;dojox.cometd.deliver(data);this.tunnelCollapse();}),error:function(){dojox.cometd.connected=false;console.debug("tunnel opening failed");},url:(url||dojox.cometd.url),content:_290,handleAs:dojox.cometd.handleAs,callbackParamName:"jsonp"});dojox.cometd.connected=true;};this.processBacklog=function(){while(this.backlog.length>0){this.sendMessage(this.backlog.shift(),true);}};this.sendMessage=function(_293,_294){if((_294)||(dojox.cometd.initialized)){_293.clientId=dojox.cometd.clientId;var _295={url:dojox.cometd.url||djConfig.cometdRoot,handleAs:dojox.cometd.handleAs,load:dojo.hitch(dojox.cometd,"deliver"),callbackParamName:"jsonp",content:{message:dojo.toJson([_293])}};return dojo.io.script.get(_295);}else{this.backlog.push(_293);}};this.startup=function(_296){if(dojox.cometd.initialized){return;}this.tunnelInit();};this.disconnect=dojox.cometd.longPollTransport.disconnect;};dojox.cometd.connectionTypes.register("long-polling",dojox.cometd.longPollTransport.check,dojox.cometd.longPollTransport);dojox.cometd.connectionTypes.register("callback-polling",dojox.cometd.callbackPollTransport.check,dojox.cometd.callbackPollTransport);}if(!dojo._hasResource["dojox.cometd"]){dojo._hasResource["dojox.cometd"]=true;dojo.provide("dojox.cometd");}dojo.provide("dojo.nls.jiva_ROOT");dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.ROOT");dijit.nls.loading.ROOT={loadingState:"Loading...",errorState:"Sorry, an error occurred"};dojo.provide("dojo.nls.jiva_ru");dojo.provide("dijit.nls.loading.ru");dijit.nls.loading.ru={loadingState:"Загрузка...",errorState:"Все в порядке, ничего не работает."};dojo.provide("dojo.nls.jiva_en-us");dojo.provide("dijit.nls.loading");dijit.nls.loading._built=true;dojo.provide("dijit.nls.loading.en_us");dijit.nls.loading.en_us={loadingState:"Loading...",errorState:"Sorry, an error occurred"};dojo.provide("dojo.nls.jiva_en");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"};var loadingCounter=null,cometEnabled=false,dojoDebugEnabled=true,toSubscribeList=new Array(),subscribeChannelsCount=0,subscriptionSuccesfull=0,loadingCount=0;dojo.require("dojo.cookie");dojo.require("dijit.Dialog");function _log(aLogString){}function enableComet(){cometEnabled=true;dojo.require("dojox.cometd");dojo.addOnLoad(initializeComet);_log("CometD enabled");}function initializeComet(){try{if(cometEnabled&&$cometdGetSubscriptionList){dojox.cometd.init({data:"UserId:"+dojo.cookie("#_userId")},"/cometd");dojox.cometd.subscribed=cometSubscriptionSuccessfull;_log("CometD initialized");$cometdGetSubscriptionList(subscribeToCometChannels);_log("CometD subscription request sent");}}catch(ex){alert(dojo.toJson(ex));}}function subscribeToCometChannels(aAttributes){try{toSubscribeList=aAttributes.subscribedTo;if(toSubscribeList==null){toSubscribeList=new Array();}subscribeChannelsCount=toSubscribeList.length;dojox.cometd.publish("/jiva/system",{action:"initialize"});_log(" CometD » /jiva/system » { action: 'initialize'}");_log("CometD subscription list: "+dojo.toJson(toSubscribeList));cometSubscriptionSuccessfull();}catch(ex){alert(dojo.toJson(ex));}}function cometSubscriptionSuccessfull(aChannelName){if(aChannelName&&aChannelName=="/meta/subscribe"){_log("CometD subscription succesfull: "+aChannelName);return;}try{if(aChannelName){subscriptionSuccesfull++;_log("CometD subscription succesfull: "+aChannelName);}if(toSubscribeList!=0){var toSubscribe=toSubscribeList[0];toSubscribeList.splice(0,1);dojox.cometd.subscribe(toSubscribe,true,cometMessageReceived);_log("CometD subscription: "+toSubscribe);}}catch(ex){alert(dojo.toJson(ex));}if(subscriptionSuccesfull==subscribeChannelsCount&&subscribeChannelsCount!=0){dojox.cometd.publish("/jiva/system",{action:"history"});_log(" CometD » /jiva/system » { action: 'history'}");cometCommandProcessor({chat:"enable"});}}function sendCometMessage(aMessage){try{if(aMessage&&aMessage.length!=0){dojox.cometd.publish("/jiva/messages",{message:aMessage});}_log(" CometD » /jiva/messages » "+aMessage);}catch(ex){alert(dojo.toJson(ex));}}function cometMessageReceived(aReceivedData){try{if(aReceivedData.channel.substring(0,"/jiva/commands".length)=="/jiva/commands"){if(cometCommandProcessor){cometCommandProcessor(aReceivedData.data);}_log(" CometD « /jiva/commands « "+dojo.toJson(aReceivedData.data));}else{if(aReceivedData.channel.substring(0,"/jiva/users".length)=="/jiva/users"||aReceivedData.channel.substring(0,"/jiva/locations".length)=="/jiva/locations"){if(cometChatProcessor){cometChatProcessor(aReceivedData.timestamp,aReceivedData.data);}_log(" CometD « "+aReceivedData.channel+" « "+dojo.toJson(aReceivedData.data));}}}catch(ex){alert(dojo.toJson(ex));}}function showLoading(aShowOrHide){if(document.getElementById("loadingFrame")){if(loadingCounter){clearTimeout(loadingCounter);}if(aShowOrHide){loadingCount++;loadingCounter=setTimeout('dojo.byId("loadingFrame").style.visibility = "visible"; dojo.fadeIn({node: "loadingFrame", duration: 200, end: 0.4}).play(50); loadingCounter = null;',200);allButtonsOff(true);}else{loadingCount--;if(loadingCount<=0){loadingCount=0;loadingCounter=setTimeout('dojo.fadeOut({node: "loadingFrame", duration: 100, onEnd: function(){dojo.byId("loadingFrame").style.visibility = "hidden";}}).play(50); loadingCounter = null;',50);allButtonsOff(false);}}}}function allButtonsOff(aNeedOff){try{var buttons=document.getElementsByTagName("INPUT");if(buttons){var i=0;for(i=0;i<buttons.length;i++){if(buttons[i].type.toLowerCase()=="button"||buttons[i].type.toLowerCase()=="submit"){buttons[i].disabled=aNeedOff?"1":null;}}}}catch(ex){alert(ex);}}function jivaSend(aAction,aCallback,aAttributes,aObjects){showLoading(true);sendRequest({_action:aAction,_attributes:aAttributes,_objects:aObjects,_callback:aCallback});}function sendRequest(aObject){var requestText=serialize(aObject._action,aObject._attributes,aObject._objects),deferred=dojo.rawXhrPost({url:"/",error:function(aResponse,aIOArgs){processError(aResponse,aIOArgs);},contentType:"text/plain",postData:requestText,preventCache:true});deferred.addCallback(function(aResponse){processResult(aResponse,aObject._callback);return aResponse;});}function processError(aResponse,aIOArgs){showLoading(false);if(dojoDebugEnabled){console.error(aResponse);}}function processResult(aResponse,aCallback){showLoading(false);var attributes=new Array(),objects=new Array(),responseLines=aResponse.split(/\s*\n\s*/g),inObject=false,currentObjectName=null,currentObject=null,resultType="OK",resultDescription="No description";if(!aResponse){aResponse="";}for(var lineIndex=0;lineIndex<responseLines.length;lineIndex++){try{var responseLine=responseLines[lineIndex],name=null,index=null,value=null;if(lineIndex==0){resultType=responseLine;continue;}else{if(lineIndex==1){resultDescription=responseLine;if(resultType=="ERROR"||resultType=="EXCEPTION"){break;}else{continue;}}}if(responseLine.charAt(0)=="$"){inObject=true;var nameIndexRevision=responseLine.split(/[\\=\\.\s]/g);currentObjectName=nameIndexRevision[0].substring(1);currentObject=new Object();currentObject._id=new Number(nameIndexRevision[1]);currentObject._revision=new Number(nameIndexRevision[2]);currentObject._attributes=new Array();}else{if(responseLine.charAt(0)=="}"){inObject=false;objects[currentObjectName]=currentObject;currentObject=null;currentObjectName=null;}else{var equalsPosition=responseLine.indexOf("="),typeValue=responseLine.substring(equalsPosition+1),spacePosition,typeSubstring2=typeValue.substring(0,2),typeSubstring3=typeValue.substring(0,3);name=responseLine.substring(0,equalsPosition);value="";if(typeSubstring2=="s "){value=typeValue.substring(2).replace(/%n/g,"\n").replace(/%%/g,"%");}else{if(typeSubstring2=="l "||typeSubstring2=="d "){value=new Number(typeValue.substring(2));}else{if(typeSubstring2=="L."){spacePosition=typeValue.indexOf(" ");index=typeValue.substring(2,spacePosition);value=typeValue.substring(spacePosition+1).replace(/%n/g,"\n").replace(/%%/g,"%");}else{if(typeSubstring3=='M."'){spacePosition=typeValue.indexOf('" ');index=typeValue.substring(3,spacePosition);value=typeValue.substring(spacePosition+2).replace(/%n/g,"\n").replace(/%%/g,"%");}}}}var editAttributes=attributes;if(inObject){editAttributes=currentObject._attributes;}if(index==null){editAttributes[name]=value;}else{var array=editAttributes[name];if(!array){array=new Array();editAttributes[name]=array;}array[index]=value;}}}}catch(ex){alert(dojo.toJson(ex));}}if(aCallback){aCallback(attributes,objects,resultType,resultDescription);}}function $a(aName,aType,aValue){return{_name:aName,_type:aType,_value:aValue};}function serialize(aAction,aAttributes,aObjects){var result="%"+aAction+"\n",attributeName,objectName,attribute,valueIndex;for(attributeName in aAttributes){attribute=aAttributes[attributeName];if(attribute!=null&&attribute!=undefined&&attribute._value!=null&&attribute._value!=undefined){if(attribute._type=="L"){for(valueIndex in attribute._value){result+=attribute._name+"="+attribute._type+"."+valueIndex+" "+replacePercents(new String(attribute._value[valueIndex]))+"\n";}}else{if(attribute._type=="M"){for(valueIndex in attribute._value){result+=attribute._name+"="+attribute._type+'."'+valueIndex+'" '+replacePercents(new String(attribute._value[valueIndex]))+"\n";}result+=attribute._name+"="+attribute._type+" "+replacePercents(new String(attribute._value))+"\n";}else{result+=attribute._name+"="+attribute._type+" "+replacePercents(new String(attribute._value))+"\n";}}}}for(objectName in aObjects){var object=aObjects[objectName];result+="$"+object._name;if(object._id){result+="="+object._id+".";}if(object._revision){result+=object._revision;}result+=" {\n";for(attributeName in object._attributes){attribute=object._attributes[attributeName];if(attribute!=null&&attribute!=undefined&&attribute._value!=null&&attribute._value!=undefined){if(attribute._type=="L"){for(valueIndex in attribute._value){result+=attribute._name+"="+attribute._type+"."+valueIndex+" "+replacePercents(new String(attribute._value[valueIndex]))+"\n";}}else{if(attribute._type=="M"){for(valueIndex in attribute._value){result+=attribute._name+"="+attribute._type+'."'+valueIndex+'" '+replacePercents(new String(attribute._value[valueIndex]))+"\n";}result+=attribute._name+"="+attribute._type+" "+replacePercents(new String(attribute._value))+"\n";}else{result+=attribute._name+"="+attribute._type+" "+replacePercents(new String(attribute._value))+"\n";}}}}result+="}\n";}return result;}function replacePercents(aString){if(aString){return new String(aString).replace(/%/g,"%%").replace(/\n/g,"%n");}else{return"";}}function $adminAddIconToTags(TagsToAddIconTo,aCallback){var attributes=[$a("TagsToAddIconTo","s",TagsToAddIconTo)],objects=[];jivaSend("admin.AddIconToTags",aCallback,attributes,objects);}function $adminApproveTags(TagsToApprove,aCallback){var attributes=[$a("TagsToApprove","s",TagsToApprove)],objects=[];jivaSend("admin.ApproveTags",aCallback,attributes,objects);}function $adminBlockDeblockUser(Login,aCallback){var attributes=[$a("Login","s",Login)],objects=[];jivaSend("admin.BlockDeblockUser",aCallback,attributes,objects);}function $adminChangeRight(RightType,TargetType,UserId,aCallback){var attributes=[$a("RightType","s",RightType),$a("TargetType","s",TargetType),$a("UserId","l",UserId)],objects=[];jivaSend("admin.ChangeRight",aCallback,attributes,objects);}function $adminCheckAllObjects(aCallback){var attributes=[],objects=[];jivaSend("admin.CheckAllObjects",aCallback,attributes,objects);}function $adminCheckAllUsers(aCallback){var attributes=[],objects=[];jivaSend("admin.CheckAllUsers",aCallback,attributes,objects);}function $adminCheckUser(UserId,aCallback){var attributes=[$a("UserId","l",UserId)],objects=[];jivaSend("admin.CheckUser",aCallback,attributes,objects);}function $adminEditUser(AvatarId,EMail,FullName,Jabber,JobPlace,JobTitle,MailAnswers,MailComments,Password,UseGravatar,UserId,aCallback){var attributes=[$a("AvatarId","l",AvatarId),$a("EMail","s",EMail),$a("FullName","s",FullName),$a("Jabber","s",Jabber),$a("JobPlace","s",JobPlace),$a("JobTitle","s",JobTitle),$a("MailAnswers","l",MailAnswers),$a("MailComments","l",MailComments),$a("Password","s",Password),$a("UseGravatar","l",UseGravatar),$a("UserId","l",UserId)],objects=[];jivaSend("admin.EditUser",aCallback,attributes,objects);}function $adminGetAllHierarchy(aCallback){var attributes=[],objects=[];jivaSend("admin.GetAllHierarchy",aCallback,attributes,objects);}function $adminGetObjectsToApprove(aCallback){var attributes=[],objects=[];jivaSend("admin.GetObjectsToApprove",aCallback,attributes,objects);}function $adminMergeTags(NewTagName,TagsToMerge,TargetTagId,aCallback){var attributes=[$a("NewTagName","s",NewTagName),$a("TagsToMerge","s",TagsToMerge),$a("TargetTagId","l",TargetTagId)],objects=[];jivaSend("admin.MergeTags",aCallback,attributes,objects);}function $adminReSendRegistrationMail(Login,aCallback){var attributes=[$a("Login","s",Login)],objects=[];jivaSend("admin.ReSendRegistrationMail",aCallback,attributes,objects);}function $adminRebuildSearchIndex(aCallback){var attributes=[],objects=[];jivaSend("admin.RebuildSearchIndex",aCallback,attributes,objects);}function $adminRemovePassword(UserId,aCallback){var attributes=[$a("UserId","l",UserId)],objects=[];jivaSend("admin.RemovePassword",aCallback,attributes,objects);}function $adminRemoveTags(TagsToRemove,aCallback){var attributes=[$a("TagsToRemove","s",TagsToRemove)],objects=[];jivaSend("admin.RemoveTags",aCallback,attributes,objects);}function $adminRemoveUser(aUserId,aCallback){var attributes=[$a("aUserId","l",aUserId)],objects=[];jivaSend("admin.RemoveUser",aCallback,attributes,objects);}function $adminRenameTag(NewTagName,TagToRename,aCallback){var attributes=[$a("NewTagName","s",NewTagName),$a("TagToRename","s",TagToRename)],objects=[];jivaSend("admin.RenameTag",aCallback,attributes,objects);}function $adminSetStreamId(StreamId,aCallback){var attributes=[$a("StreamId","s",StreamId)],objects=[];jivaSend("admin.SetStreamId",aCallback,attributes,objects);}function $adminSetTagDescription(NewTagDescription,TagToProcess,aCallback){var attributes=[$a("NewTagDescription","s",NewTagDescription),$a("TagToProcess","s",TagToProcess)],objects=[];jivaSend("admin.SetTagDescription",aCallback,attributes,objects);}function $authenticationIsLoginned(aCallback){var attributes=[],objects=[];jivaSend("authentication.IsLoginned",aCallback,attributes,objects);}function $authenticationLogin(Login,Password,PasswordHash,aCallback){var attributes=[$a("Login","s",Login),$a("Password","s",Password),$a("PasswordHash","s",PasswordHash)],objects=[];jivaSend("authentication.Login",aCallback,attributes,objects);}function $authenticationLoginThroughTwitter(aCallback){var attributes=[],objects=[];jivaSend("authentication.LoginThroughTwitter",aCallback,attributes,objects);}function $authenticationLogout(aCallback){var attributes=[],objects=[];jivaSend("authentication.Logout",aCallback,attributes,objects);}function $authenticationRecoverPassword(Login,aCallback){var attributes=[$a("Login","s",Login)],objects=[];jivaSend("authentication.RecoverPassword",aCallback,attributes,objects);}function $authenticationSendRegistrationMail(EMail,Login,PasswordString,ReCAPTCHA,ReCAPTCHAChallenge,aCallback){var attributes=[$a("EMail","s",EMail),$a("Login","s",Login),$a("PasswordString","s",PasswordString),$a("ReCAPTCHA","s",ReCAPTCHA),$a("ReCAPTCHAChallenge","s",ReCAPTCHAChallenge)],objects=[];jivaSend("authentication.SendRegistrationMail",aCallback,attributes,objects);}function $cometdGetSubscriptionList(aCallback){var attributes=[],objects=[];jivaSend("cometd.GetSubscriptionList",aCallback,attributes,objects);}function $cometdGetUsersList(LocationId,aCallback){var attributes=[$a("LocationId","s",LocationId)],objects=[];jivaSend("cometd.GetUsersList",aCallback,attributes,objects);}function $debuggerGetObjectHistory(Id,aCallback){var attributes=[$a("Id","l",Id)],objects=[];jivaSend("debugger.GetObjectHistory",aCallback,attributes,objects);}function $debuggerGetObjects(Query,aCallback){var attributes=[$a("Query","s",Query)],objects=[];jivaSend("debugger.GetObjects",aCallback,attributes,objects);}function $debuggerRestoreObjectFromIndex(Id,aCallback){var attributes=[$a("Id","l",Id)],objects=[];jivaSend("debugger.RestoreObjectFromIndex",aCallback,attributes,objects);}function $entryAnswerWasAdded(AnswerText,QuestionId,aCallback){var attributes=[$a("AnswerText","s",AnswerText),$a("QuestionId","l",QuestionId)],objects=[];jivaSend("entry.AnswerWasAdded",aCallback,attributes,objects);}function $entryAnswerWasDeleted(AnswerId,aCallback){var attributes=[$a("AnswerId","l",AnswerId)],objects=[];jivaSend("entry.AnswerWasDeleted",aCallback,attributes,objects);}function $entryAnswerWasEdited(AnswerId,AnswerText,aCallback){var attributes=[$a("AnswerId","l",AnswerId),$a("AnswerText","s",AnswerText)],objects=[];jivaSend("entry.AnswerWasEdited",aCallback,attributes,objects);}function $entryAnswerWasSelected(AnswerId,aCallback){var attributes=[$a("AnswerId","l",AnswerId)],objects=[];jivaSend("entry.AnswerWasSelected",aCallback,attributes,objects);}function $entryCommentWasAdded(CommentText,ParentId,aCallback){var attributes=[$a("CommentText","s",CommentText),$a("ParentId","l",ParentId)],objects=[];jivaSend("entry.CommentWasAdded",aCallback,attributes,objects);}function $entryCommentWasRemoved(CommentId,aCallback){var attributes=[$a("CommentId","l",CommentId)],objects=[];jivaSend("entry.CommentWasRemoved",aCallback,attributes,objects);}function $entryDocumentWasEdited(DocumentId,ObjectData,PartId,aCallback){var attributes=[$a("DocumentId","l",DocumentId),$a("PartId","s",PartId)],objects=[{_id:ObjectData._id,_name:"ObjectData",_attributes:ObjectData}];jivaSend("entry.DocumentWasEdited",aCallback,attributes,objects);}function $entryEntryApproved(EntryId,RootId,aCallback){var attributes=[$a("EntryId","l",EntryId),$a("RootId","l",RootId)],objects=[];jivaSend("entry.EntryApproved",aCallback,attributes,objects);}function $entryEntryApprovedNot(EntryId,RootId,aCallback){var attributes=[$a("EntryId","l",EntryId),$a("RootId","l",RootId)],objects=[];jivaSend("entry.EntryApprovedNot",aCallback,attributes,objects);}function $entryFileWasEdited(FileId,ObjectData,aCallback){var attributes=[$a("FileId","l",FileId)],objects=[{_id:ObjectData._id,_name:"ObjectData",_attributes:ObjectData}];jivaSend("entry.FileWasEdited",aCallback,attributes,objects);}function $entryLoadAnswerSource(AnswerId,aCallback){var attributes=[$a("AnswerId","l",AnswerId)],objects=[];jivaSend("entry.LoadAnswerSource",aCallback,attributes,objects);}function $entryNewsWasEdited(NewsId,ObjectData,aCallback){var attributes=[$a("NewsId","l",NewsId)],objects=[{_id:ObjectData._id,_name:"ObjectData",_attributes:ObjectData}];jivaSend("entry.NewsWasEdited",aCallback,attributes,objects);}function $entryQuestionWasEdited(ObjectData,PartId,QuestionId,aCallback){var attributes=[$a("PartId","s",PartId),$a("QuestionId","l",QuestionId)],objects=[{_id:ObjectData._id,_name:"ObjectData",_attributes:ObjectData}];jivaSend("entry.QuestionWasEdited",aCallback,attributes,objects);}function $entryReviewWasEdited(ObjectData,ReviewId,aCallback){var attributes=[$a("ReviewId","l",ReviewId)],objects=[{_id:ObjectData._id,_name:"ObjectData",_attributes:ObjectData}];jivaSend("entry.ReviewWasEdited",aCallback,attributes,objects);}function $entryShortWasEdited(ObjectData,ShortId,aCallback){var attributes=[$a("ShortId","l",ShortId)],objects=[{_id:ObjectData._id,_name:"ObjectData",_attributes:ObjectData}];jivaSend("entry.ShortWasEdited",aCallback,attributes,objects);}function $entryStreamWasEdited(ObjectData,StreamId,aCallback){var attributes=[$a("StreamId","l",StreamId)],objects=[{_id:ObjectData._id,_name:"ObjectData",_attributes:ObjectData}];jivaSend("entry.StreamWasEdited",aCallback,attributes,objects);}function $generalDialogEdit(object,aCallback){var attributes=[],objects=[{_id:object._id,_name:"object",_attributes:object}];jivaSend("general.DialogEdit",aCallback,attributes,objects);}function $generalDialogSave(object,aCallback){var attributes=[],objects=[{_id:object._id,_name:"object",_attributes:object}];jivaSend("general.DialogSave",aCallback,attributes,objects);}function $generalDialogSelectObjects(loadFromAllRoots,objectType,template,aCallback){var attributes=[$a("loadFromAllRoots","s",loadFromAllRoots),$a("objectType","s",objectType),$a("template","s",template)],objects=[];jivaSend("general.DialogSelectObjects",aCallback,attributes,objects);}function $generalGetDialog(id,objectType,parentId,aCallback){var attributes=[$a("id","l",id),$a("objectType","s",objectType),$a("parentId","l",parentId)],objects=[];jivaSend("general.GetDialog",aCallback,attributes,objects);}function $objectAdd(object,parentId,aCallback){var attributes=[$a("parentId","s",parentId)],objects=[{_id:object._id,_name:"object",_attributes:object}];jivaSend("object.Add",aCallback,attributes,objects);}function $objectAttribute(id,name,type,aCallback){var attributes=[$a("id","s",id),$a("name","s",name),$a("type","s",type)],objects=[];jivaSend("object.Attribute",aCallback,attributes,objects);}function $objectAttributeSet(id,name,type,value,aCallback){var attributes=[$a("id","s",id),$a("name","s",name),$a("type","s",type),$a("value","s",value)],objects=[];jivaSend("object.AttributeSet",aCallback,attributes,objects);}function $objectEdit(id,object,aCallback){var attributes=[$a("id","l",id)],objects=[{_id:object._id,_name:"object",_attributes:object}];jivaSend("object.Edit",aCallback,attributes,objects);}function $objectGet(id,noPreWork,query,rawData,aCallback){var attributes=[$a("id","l",id),$a("noPreWork","s",noPreWork),$a("query","s",query),$a("rawData","s",rawData)],objects=[];jivaSend("object.Get",aCallback,attributes,objects);}function $objectLastUpdate(id,aCallback){var attributes=[$a("id","s",id)],objects=[];jivaSend("object.LastUpdate",aCallback,attributes,objects);}function $objectList(__Query,page,sortAttribute,sortIsAsc,sortType,aCallback){var attributes=[$a("__Query","s",__Query),$a("page","l",page),$a("sortAttribute","s",sortAttribute),$a("sortIsAsc","s",sortIsAsc),$a("sortType","s",sortType)],objects=[];jivaSend("object.List",aCallback,attributes,objects);}function $objectRemove(id,aCallback){var attributes=[$a("id","l",id)],objects=[];jivaSend("object.Remove",aCallback,attributes,objects);}function $otherSendMessageToAuthor(AuthorId,MessageText,ReCAPTCHA,ReCAPTCHAChallenge,aEMail,aName,aCallback){var attributes=[$a("AuthorId","l",AuthorId),$a("MessageText","s",MessageText),$a("ReCAPTCHA","s",ReCAPTCHA),$a("ReCAPTCHAChallenge","s",ReCAPTCHAChallenge),$a("aEMail","s",aEMail),$a("aName","s",aName)],objects=[];jivaSend("other.SendMessageToAuthor",aCallback,attributes,objects);}function $renderGet(prefixName,query,aCallback){var attributes=[$a("prefixName","s",prefixName),$a("query","s",query)],objects=[];jivaSend("render.Get",aCallback,attributes,objects);}function $renderHtml(aCallback){var attributes=[],objects=[];jivaSend("render.Html",aCallback,attributes,objects);}function $renderIndex(aCallback){var attributes=[],objects=[];jivaSend("render.Index",aCallback,attributes,objects);}function $renderList(groupByAttribute,groupByType,id,loadFromAllRoots,maxDepth,needSurroundingDiv,objectType,page,pageSize,parentDivId,parentDivPosition,query,sortAttribute,sortIsAsc,sortType,template,aCallback){var attributes=[$a("groupByAttribute","s",groupByAttribute),$a("groupByType","s",groupByType),$a("id","l",id),$a("loadFromAllRoots","s",loadFromAllRoots),$a("maxDepth","l",maxDepth),$a("needSurroundingDiv","s",needSurroundingDiv),$a("objectType","s",objectType),$a("page","l",page),$a("pageSize","l",pageSize),$a("parentDivId","s",parentDivId),$a("parentDivPosition","s",parentDivPosition),$a("query","s",query),$a("sortAttribute","s",sortAttribute),$a("sortIsAsc","s",sortIsAsc),$a("sortType","s",sortType),$a("template","s",template)],objects=[];jivaSend("render.List",aCallback,attributes,objects);}function $renderRenderWiki(EntryId,WikiSource,aCallback){var attributes=[$a("EntryId","l",EntryId),$a("WikiSource","s",WikiSource)],objects=[];jivaSend("render.RenderWiki",aCallback,attributes,objects);}function $renderSearch(searchRequest,aCallback){var attributes=[$a("searchRequest","s",searchRequest)],objects=[];jivaSend("render.Search",aCallback,attributes,objects);}function $renderSetRoot(rootObject,aCallback){var attributes=[$a("rootObject","l",rootObject)],objects=[];jivaSend("render.SetRoot",aCallback,attributes,objects);}function $renderUserActions(aCallback){var attributes=[],objects=[];jivaSend("render.UserActions",aCallback,attributes,objects);}function $rightsGet(object,right,user,aCallback){var attributes=[$a("object","s",object),$a("right","s",right),$a("user","s",user)],objects=[];jivaSend("rights.Get",aCallback,attributes,objects);}function $rightsSet(object,right,user,value,aCallback){var attributes=[$a("object","s",object),$a("right","s",right),$a("user","s",user),$a("value","s",value)],objects=[];jivaSend("rights.Set",aCallback,attributes,objects);}function $statisticsGet(aCallback){var attributes=[],objects=[];jivaSend("statistics.Get",aCallback,attributes,objects);}function $streamingAdd(ImageBinaryBase64,IsComment,StreamId,Text,aCallback){var attributes=[$a("ImageBinaryBase64","s",ImageBinaryBase64),$a("IsComment","l",IsComment),$a("StreamId","l",StreamId),$a("Text","s",Text)],objects=[];jivaSend("streaming.Add",aCallback,attributes,objects);}function $streamingGetLatest(LastLoadedId,StreamId,aCallback){var attributes=[$a("LastLoadedId","l",LastLoadedId),$a("StreamId","l",StreamId)],objects=[];jivaSend("streaming.GetLatest",aCallback,attributes,objects);}function $streamingToggleStream(StreamId,aCallback){var attributes=[$a("StreamId","l",StreamId)],objects=[];jivaSend("streaming.ToggleStream",aCallback,attributes,objects);}function $systemExportAll(aCallback){var attributes=[],objects=[];jivaSend("system.ExportAll",aCallback,attributes,objects);}function $systemRebuildSearchIndex(aCallback){var attributes=[],objects=[];jivaSend("system.RebuildSearchIndex",aCallback,attributes,objects);}function $updateShortsAdded(aCallback){var attributes=[],objects=[];jivaSend("update.ShortsAdded",aCallback,attributes,objects);}function reloadCommonData(){$authenticationIsLoginned(isLoginedCallback);try{$renderGet("user","self",updateSubDivs);}finally{$renderUserActions(showUserActions);}}function isLoginedCallback(aAttributes){if(aAttributes.Loginned=="true"){dojo.byId("userLogin").innerHTML="Пользователь: "+aAttributes.Login+'<br/><a href="#" onclick="dialogLogout(); return false;">Выйти из системы</a>';}else{dojo.byId("userLogin").innerHTML='Пользователь: Гость<br/><a href="#" onclick="dialogLogin(); return false;">Войти в систему</a><br/><a href="#" onclick="showSaveDialog(\'TypeUser\'); return false;">Зарегистрироваться</a><br/>';}}function rootReloaded(aAttributes){document.location.href="/";}function updateSubDivs(aAttributes,aObjects){var prefix=aAttributes.prefixName+".";if(!aObjects.object){return;}var objectAttributes=aObjects.object._attributes;for(var attributeName in objectAttributes){var div=document.getElementById(prefix+attributeName);if(div&&objectAttributes[attributeName]){div.innerHTML=objectAttributes[attributeName];}}}function loadPageData(aObjectType,aQuery,aParentDivId,aPageSize,aPage,aMaxDepth,aSortType,aSortAttributeName,aSortIsAsc,aTemplate,aNotNeedSurroundingDiv,aLoadFromAllRoots,aGroupBy,aGroupByType,aCallBack){if(aObjectType==null){aObjectType=(mainObjectsType==null?"Entry":mainObjectsType);}if(!aMaxDepth||aMaxDepth==""){aMaxDepth=0;}if(!aPage){aPage=1;}if(!aSortIsAsc){aSortIsAsc=false;}var needSurroundingDiv=true;if(!aNotNeedSurroundingDiv){needSurroundingDiv=true;}else{needSurroundingDiv=false;}if(aParentDivId&&dojo.byId(""+aParentDivId)){var divToAlter=document.getElementById(aParentDivId);var needToWipeIn=false;if(needToWipeIn){dojo.fx.wipeOut({node:aParentDivId,duration:100,onEnd:function(){$renderList(aGroupBy,aGroupByType,null,aLoadFromAllRoots,aMaxDepth,needSurroundingDiv,aObjectType,aPage,aPageSize,aParentDivId,null,aQuery.replace(/`/g,'"'),aSortAttributeName,aSortIsAsc,aSortType,aTemplate,aCallBack?aCallBack:updatePageData);}}).play();}else{$renderList(aGroupBy,aGroupByType,null,aLoadFromAllRoots,aMaxDepth,needSurroundingDiv,aObjectType,aPage,aPageSize,aParentDivId,null,aQuery.replace(/`/g,'"'),aSortAttributeName,aSortIsAsc,aSortType,aTemplate,aCallBack?aCallBack:updatePageData);}}}function loadSingleObject(aId,aDivId,aPositionInDiv,aNeedSurroundingDiv){if(!aNeedSurroundingDiv){aNeedSurroundingDiv=false;}if(aDivId&&dojo.byId(""+aDivId)){$renderList(null,null,aId,null,null,aNeedSurroundingDiv,null,null,null,aDivId,aPositionInDiv,"singleObject",null,null,null,null,updateSingleObject);}}function updateSingleObject(aAttributes){var parentDivId=aAttributes.parentDivId;var divToAlter=document.getElementById(parentDivId);var position=aAttributes.parentDivPosition;if(position=="top"){divToAlter.innerHTML=aAttributes.html+divToAlter.innerHTML;}else{if(position=="bottom"){divToAlter.innerHTML=divToAlter.innerHTML+aAttributes.html;}else{if(position=="replace"){divToAlter.innerHTML=aAttributes.html;}}}}function updatePageData(aAttributes,aObjects,aResultType,aResultDescription,aCallbackName){var parentDivId=aAttributes.parentDivId;var pageString=createPageDiv(aAttributes,parentDivId,aCallbackName);var divToAlter=document.getElementById(parentDivId);var needToWipeIn=false;if(aAttributes.html){divToAlter.innerHTML="";if(needPagesOnTop){divToAlter.innerHTML+='<div class="pagesBeforeContent" align="center">'+pageString+"</div>";}divToAlter.innerHTML+=aAttributes.html;if(needPagesOnBottom&&aAttributes.html.length>4096){divToAlter.innerHTML+='<div class="pagesAfterContent" align="center">'+pageString+"</div>";}}if(parentDivId.substring(0,18)=="categoriesSelector"){updateCategoriesSelection();}else{if(parentDivId.substring(0,8)=="comments"){correctParentOpenLinks();}}if(divToAlter.tagName=="SELECT"&&divToAlter.options.length>0){divToAlter.selectedIndex=0;if(updateRightsTable){updateRightsTable();}}if(needToWipeIn){dojo.fx.wipeIn({node:parentDivId,duration:100}).play();}try{if(typeof(window.dp)!="undefined"){dp.SyntaxHighlighter.ClipboardSwf="/js/SyntaxHighlighter/clipboard.swf";dp.SyntaxHighlighter.HighlightAll("code");var pres=document.getElementsByTagName("TEXTAREA");for(var i=0;i<pres.length;i++){var pre=pres[i];if(pre.getAttribute("name")=="code"){pre.parentNode.removeChild(pre);}}}}catch(e){alert(dojo.toJson(e));}}function correctParentOpenLinks(aElement){if(!aElement){aElement=document.body;}for(var i=0;i<aElement.childNodes.length;i++){var element=aElement.childNodes[i];if(element.id!=null&&element.id!=""){var commentsElement=document.getElementById("comments"+element.id);if(commentsElement){var aHrefElement=document.getElementById("commentsShow"+element.id);if(aHrefElement){if(commentsElement.innerHTML==""){aHrefElement.innerHTML="Посмотреть комментарии";}else{aHrefElement.innerHTML="Скрыть комментарии";}}}}correctParentOpenLinks(element);}}var _editingEntryCategories=new Array();function updateCategoriesSelection(){if(_editingEntryCategories.length!=0){for(var i=0;i<_editingEntryCategories.length;i++){var element=document.getElementById("check"+_editingEntryCategories[i]);try{element.checked=true;eval(element.getAttribute("onchange"));}catch(ex){}_editingEntryCategories.splice(i,1);i--;}if(_editingEntryCategories.length!=0){setTimeout("updateCategoriesSelection",300);}}}function removeAllButOne(aParentDivId,aDivIdToStay){document.location.hash="#id/"+aDivIdToStay;var parentDiv=document.getElementById(aParentDivId);for(var i=0;i<parentDiv.childNodes.length;i++){var element=parentDiv.childNodes[i];if(element.tagName=="DIV"&&element.id!=aDivIdToStay){parentDiv.removeChild(element);i--;}}}function createPageDiv(aAttributes,aDivToScrollId,aCallbackName){var scrollScript="scrollPageToDiv('"+aDivToScrollId+"'); ";if(!aCallbackName){aCallbackName="updatePageData";}var pagesCount=new Number(aAttributes.pagesCount);if(pagesCount<=1){return"";}var pageIndex=new Number(aAttributes.pageIndex);var pageSize=new Number(aAttributes.pageSize);var type=aAttributes.objectType;var query=aAttributes.query;var divId=aAttributes.parentDivId;var sortAttribute=aAttributes.sortAttribute;var sortType=aAttributes.sortType;var sortIsAsc=aAttributes.sortIsAsc;var template=aAttributes.template;var loadFromAllRoots=aAttributes.loadFromAllRoots;var needSurroundingDiv=aAttributes.needSurroundingDiv;var longStart=true;var startPage=pageIndex-5;if(startPage<=1){startPage=1;longStart=false;}var longEnd=true;var endPage=pageIndex+5;if(endPage>=pagesCount){endPage=pagesCount;longEnd=false;}var result="";if(pageIndex>1){result+='<div class="pagePrevious" onClick="'+scrollScript+pageLink(type,query,divId,pageIndex-1,pageSize,sortType,sortAttribute,sortIsAsc,template,needSurroundingDiv,loadFromAllRoots,aCallbackName)+'"><nobr>&larr;<span>Предыдущая</span></nobr></div>';}else{result+='<div class="pagePreviousDisabled"><nobr>&larr;<span>Предыдущая</span></nobr></div>';}if(longStart){result+='<div class="pagePage" onClick="'+scrollScript+pageLink(type,query,divId,1,pageSize,sortType,sortAttribute,sortIsAsc,template,needSurroundingDiv,loadFromAllRoots,aCallbackName)+'">1</div>';if(startPage>2){result+='<div class="pageHellip">&hellip;</div>';}}for(var i=startPage;i<=endPage;i++){if(i==pageIndex){result+='<div class="pageCurrent">'+i+"</div>";}else{result+='<div class="pagePage" onClick="'+scrollScript+pageLink(type,query,divId,i,pageSize,sortType,sortAttribute,sortIsAsc,template,needSurroundingDiv,loadFromAllRoots,aCallbackName)+'">'+i+"</div>";}}if(longEnd){if(endPage<pagesCount-1){result+='<div class="pageHellip">&hellip;</div>';}result+='<div class="pagePage" onClick="'+scrollScript+pageLink(type,query,divId,pagesCount,pageSize,sortType,sortAttribute,sortIsAsc,template,needSurroundingDiv,loadFromAllRoots,aCallbackName)+'">'+pagesCount+"</div>";}if(pageIndex<pagesCount){result+='<div class="pageNext" onClick="'+scrollScript+pageLink(type,query,divId,pageIndex+1,pageSize,sortType,sortAttribute,sortIsAsc,template,needSurroundingDiv,loadFromAllRoots,aCallbackName)+'"><nobr><span>Следующая</span>&rarr;</nobr></div>';}else{result+='<div class="pageNextDisabled"><nobr><span>Следующая</span>&rarr;</nobr></div>';}return result;}function scrollPageToDiv(aDivId){var position=findDivOffset(document.getElementById(aDivId));var currentPosition=0;if(window.scrollY){currentPosition=window.scrollY;}else{if(window.scrollTop){currentPosition=window.scrollTop;}}if(currentPosition>position){if(window.scroll){window.scroll(0,position);}else{if(window.scrollY){window.scrollY=position;}}}}function findDivOffset(aDiv){if(!aDiv){return 0;}return aDiv.offsetTop+findDivOffset(aDiv.offsetParent);}function pageLink(aType,aQuery,aDivId,aPage,aPageSize,aSortType,aSortAttribute,aSortIsAsc,template,needSurroundingDiv,loadFromAllRoots,aCallbackName){var sortAttributes="";if(aSortType&&aSortAttribute&&aSortIsAsc){sortAttributes=", '"+aSortType+"', '"+aSortAttribute+"', "+aSortIsAsc;}if(template){template=", '"+template+"'";}else{template="";}if(!aCallbackName){aCallbackName="updatePageData";}return"loadPageData('"+aType+"', '"+aQuery.replace(/\"/g,"`")+"', '"+aDivId+"', "+aPageSize+", "+aPage+", 0"+sortAttributes+template+", "+!needSurroundingDiv+", "+loadFromAllRoots+", null, null, "+aCallbackName+")";}var _objectNames=new Array();_objectNames.TypeRoot="Блоги";_objectNames.TypeFile="Файлы";_objectNames.TypeEntry="Записи";_objectNames.TypeCategory="Категории";_objectNames.TypeComment="Комментарии";_objectNames.TypeUser="Пользователи";function showSearchResults(aAttributes,aObjects){var innerHTML="";for(var attributeName in aAttributes){if(attributeName.substring(0,5)=="html."){innerHTML+='<div class="searchResultCategory">'+_objectNames[attributeName.substring(5)]+"</div>"+aAttributes[attributeName];}}document.getElementById("pageData").innerHTML=innerHTML;}function showUserActions(aAttributes,aObjects){for(var attributeName in aAttributes){var element=document.getElementById("actions."+attributeName);if(element){element.innerHTML=aAttributes[attributeName];}}}var _editSaveDialog=null;var _editSaveCallback=null;var _textareaIds=0;var debugEnabled=true;var dialogIds=0;function showSaveDialog(aObjectType,aParentId,aCallback){_editSaveCallback=aCallback;if(!_editSaveCallback){try{_editSaveCallback=eval("callback"+aObjectType+"Saved");}catch(ex){_editSaveCallback=null;}}$generalGetDialog(null,aObjectType,aParentId,renderDialog);}function showEditDialog(aId,aObjectType,aCallback){_editSaveCallback=aCallback;if(!_editSaveCallback){try{_editSaveCallback=eval("callback"+aObjectType+"Edited");}catch(ex){_editSaveCallback=null;}}$generalGetDialog(aId,null,null,renderDialog);}function renderDialog(aAttributes){var dialogDiv=document.createElement("DIV");dialogDiv.className="objectDialog";dialogDiv.innerHTML=aAttributes.dialogCode;dialogDiv.innerHTML+='<div class="dialogLeftAngle"></div><div class="dialogRightAngle"></div>';_editSaveDialog=new dijit.Dialog({id:"loginDialog"+dialogIds,title:aAttributes.dialogTitle,refreshOnShow:true,hasShadow:true},dialogDiv);_editSaveDialog.startup();document.body.appendChild(_editSaveDialog.domNode);preprocessFileFields();_editSaveDialog.show();document.body.style.overflowX="hidden";setFocusToFirstThing(_editSaveDialog.domNode);}var _wysiwygId=null;var _wikiId=null;function editWYSYWIG(aDivId){var wysiwygText=dojo.byId(aDivId);if(aDivId&&wysiwygText){_wysiwygId=aDivId;window.open("/editWYSIWYG.html","_editorWYSIWYG","width=700,height=500");}}function editWiki(aDivId){var wikiText=dojo.byId(aDivId);if(aDivId&&wikiText){_wikiId=aDivId;window.open("/editWiki.html","_editorWiki","width=700,height=500");}}function preprocessFileFields(aNode){try{if(!aNode){aNode=_editSaveDialog.domNode;}if(aNode){for(var i=0;i<aNode.childNodes.length;i++){var childNode=aNode.childNodes[i];if(childNode.className&&childNode.className=="widget_File"){initializeFileField(childNode);}else{preprocessFileFields(childNode);}}}}catch(ex){if(debugEnabled){alert(dojo.toJson(ex));}}}function setFocusToFirstThing(aNode){try{if(!aNode){aNode=_editSaveDialog.domNode;}for(var i=0;i<aNode.childNodes.length;i++){var childNode=aNode.childNodes[i];if(childNode.tagName=="INPUT"){while(dojo.byId("firstToFocus")){dojo.byId("firstToFocus").id=null;}childNode.id="firstToFocus";childNode.focus();setTimeout('dojo.byId("firstToFocus").focus()',50);return true;}if(setFocusToFirstThing(childNode)){return true;}}}catch(ex){if(debugEnabled){alert(ex);}}return false;}function cancelSaveEditDialog(){var aNode=_editSaveDialog.domNode;aNode.parentNode.removeChild(_editSaveDialog.domNode);_editSaveDialog.hide();_editSaveDialog=null;_editSaveCallback=null;document.body.style.overflowX="auto";}function submitSaveDialog(){$generalDialogSave(getJivaObjectFromDialog(),saveEditFinished);}function submitEditDialog(){$generalDialogEdit(getJivaObjectFromDialog(),saveEditFinished);}function saveEditFinished(aAttributes,aObjects,aResultType,aResultDescription){try{removeAllWarnings();}catch(ex){if(debugEnabled){alert(dojo.toJson(ex));}}if(aResultType=="ERROR"){if(aResultDescription.indexOf("Fields Check failed: ")==0){var badFields=aResultDescription.substring(21).split(/\|\|/g);for(var i in badFields){var nameHint=badFields[i].split(/\|/g);var badFieldName=nameHint[0];if(dojo.byId("labelFor_"+badFieldName)){dojo.byId("labelFor_"+badFieldName).innerHTML='<img src="/i/warning.gif" width="10" height="10" alt="!" style="margin-right: 5px;" title="'+nameHint[1]+'" alt="'+nameHint[1]+'" class="warningImage"/>'+dojo.byId("labelFor_"+badFieldName).innerHTML;}}}}else{if(aResultType=="OK"){if(_editSaveCallback){try{_editSaveCallback(aAttributes,aObjects,aResultType,aResultDescription);}catch(ex){alert(dojo.toJson(ex));}}cancelSaveEditDialog();}}}function getJivaObjectFromDialog(aNode,aObject){if(!aObject){aObject=new Array();}if(!aNode){aNode=_editSaveDialog.domNode;}if(aNode){for(var i=0;i<aNode.childNodes.length;i++){var childNode=aNode.childNodes[i];if(childNode.className&&childNode.className.substring(0,7)=="widget_"){if(childNode.tagName=="TEXTAREA"||(childNode.tagName=="DIV"&&(childNode.className=="widget_TextAreaWYSIWYG_preview"||childNode.className=="widget_TextAreaWiki_preview"))){if(childNode.tagName=="DIV"&&childNode.innerHTML!=""){aObject.push($a(childNode.getAttribute("name"),"s",childNode.innerHTML));}else{aObject.push($a(childNode.name,"s",childNode.value));}}else{if(childNode.getAttribute("type")=="checkbox"){aObject.push($a(childNode.name,"s",childNode.checked?"true":"false"));}else{if(childNode.className=="widget_PasswordField"&&childNode.value!="Hello Hacker :)"){aObject.push($a(childNode.name,"s",childNode.value));}else{if(childNode.name){aObject.push($a(childNode.name,"s",childNode.value));}}}}}getJivaObjectFromDialog(childNode,aObject);}}return aObject;}function getJivaObjectFieldFromDialog(aFieldName,aNode){if(!aNode){aNode=_editSaveDialog.domNode;}if(aNode){for(var i=0;i<aNode.childNodes.length;i++){var childNode=aNode.childNodes[i];if(childNode.className&&childNode.className.substring(0,7)=="widget_"&&childNode.name==aFieldName){return childNode;}var deeper=getJivaObjectFieldFromDialog(aFieldName,childNode);if(deeper!=null){return deeper;}}}return null;}function removeAllWarnings(aNode){var images=document.getElementsByTagName("IMG");for(var i in images){var image=images[i];if(image.className=="warningImage"){image.parentNode.removeChild(image);}}}function widgetListRemoveItem(aItemId,aListId){var div=dojo.byId(aItemId);div.parentNode.removeChild(div);var index=new Number(aItemId.substring(aListId.length+1));var fieldDiv=dojo.byId(aListId);var value=fieldDiv.value;var deleteFrom=value.indexOf("¡"+index+"∞");if(deleteFrom!=-1){var deleteTo=value.indexOf("¡",deleteFrom+1);if(deleteTo==-1){deleteTo=value.length;}value=value.substring(0,deleteFrom)+value.substring(deleteTo+1);fieldDiv.value=value;}}function widgetListAddItemAfter(aItemId,aListId){}var _objectSelectorTimer=null;var _objectSelecting=false;var _selectingElement=null;var _lastTemplate=null;var _divWithSelections=null;function selectObjectsByName(aObjectType,aElement,aLoadFromAllRoots){if(_lastTemplate==aElement.value){return;}_lastTemplate=aElement.value;if(_objectSelectorTimer){clearTimeout(_objectSelectorTimer);}if(_lastTemplate==""){if(_divWithSelections){_divWithSelections.parentNode.removeChild(_divWithSelections);_divWithSelections=null;}return;}_selectingElement=aElement;_selectingElement.style.position="relative";_objectSelectorTimer=setTimeout("updateObjectSelector('"+aObjectType+"', '"+aLoadFromAllRoots+"')",200);}function updateObjectSelector(aObjectType,aLoadFromAllRoots){if(_objectSelecting){selectObjectsByName(aObjectType,_selectingElement);}_objectSelecting=true;$generalDialogSelectObjects(aLoadFromAllRoots,aObjectType,_selectingElement.value.substring(_selectingElement.value.lastIndexOf(";")+1),objectsSelected);}function objectsSelected(aAttributes,aObjects){var selected=aAttributes.result;_objectSelecting=false;var selections="";for(var id in selected){var title=selected[id];if(selections.length!=0){selections+=", ";}selections+='<span class="objectsSelection" onclick="addSelection(\''+id+"', '"+title+"');\">"+title+"</span>";}_divWithSelections=dojo.byId("objectSelectionDivId");if(!_divWithSelections){_divWithSelections=document.createElement("DIV");_divWithSelections.id="objectSelectionDivId";_divWithSelections.className="objectSelectionDiv";}_divWithSelections.innerHTML=selections;_divWithSelections.style.position="relative";_divWithSelections.style.left="0";_divWithSelections.style.top="-10px";_selectingElement.parentNode.appendChild(_divWithSelections);}function addSelection(aId,aTitle){addElementToField(aTitle,_selectingElement,true);addElementToField(aId,dojo.byId("idsFor_"+_selectingElement.name),false);_selectingElement.value+="; ";_divWithSelections=dojo.byId("objectSelectionDivId");if(_divWithSelections){_divWithSelections.parentNode.removeChild(_divWithSelections);_divWithSelections=null;}_lastTemplate=null;_selectingElement.focus();}function addElementToField(aNewElement,aField,aNeedPop){var elements=aField.value.split(/\s*;\s*/g);if(aNeedPop){elements.pop();}elements.push(aNewElement);var newElements="";for(var i in elements){if(newElements.indexOf(elements[i])==-1){if(newElements.length!=0){newElements+="; ";}newElements+=elements[i];}}aField.value=newElements;}function enterPressed(event){var keycode;if(window.event){keycode=window.event.keyCode;}else{if(event){keycode=event.which;}else{return false;}}return(keycode==13);}function showRemoveDialog(aId,aCallback){if(confirm("Вы уверены, что хотите удалить объект?")){$objectRemove(aId,aCallback?aCallback:responseRemoveObject);}}function responseRemoveObject(aAttributes){var element=dojo.byId(""+aAttributes.id);if(element&&element.parentNode){element.parentNode.removeChild(element);}}var needPagesOnTop=true,needPagesOnBottom=true,_loginDialog=null,_loginLast="",_registerDialog=null,_registerLogin="",_registerEMail="",_registerPassword="",_registerPassword2="";searchSectionsDone=0,searchSectionsCount=5,somethingFound=false,_editingAnswerId=-1;_currentUserLogin="",_currentUserId=-1,_lastCommentButtonPressed=null,_lastLoadedStreamElementId=-1,_isStreamEditable=false,_streamIsAlreadyLoading=false;function preload(){new Image().src="/i/hover/headerButtonLeft.png";new Image().src="/i/hover/headerButtonBackground.png";new Image().src="/i/hover/menuLeftRound.png";new Image().src="/i/hover/menuApps.png";new Image().src="/i/hover/menuDocuments.png";new Image().src="/i/hover/menuEvents.png";new Image().src="/i/hover/menuForum.png";new Image().src="/i/hover/menuLinks.png";new Image().src="/i/hover/menuNews.png";new Image().src="/i/hover/menuQuestions.png";if(document.location.hash&&dojo.byId(document.location.hash.substr(1))){dojo.byId(document.location.hash.substr(1)).style.backgroundColor="#ffffaa";if(document.location.hash.substr(1,6)=="answer"){dojo.byId(document.location.hash.substr(1)).style.paddingLeft="4px";dojo.byId(document.location.hash.substr(1)).style.paddingRight="4px";dojo.byId(document.location.hash.substr(1)).style.paddingBottom="4px";}}}function dialogLogout(){if(confirm("Вы уверены, что хотите выйти?")){$authenticationLogout(responseLogout);}return false;}function responseLogout(){document.location.reload();}function startPasswordRecover(){dojo.byId("loginLabelLogin").innerHTML="Логин (если помните)";dojo.byId("loginInputPassword").style.display="none";dojo.byId("loginLabelPassword").innerHTML="";dojo.byId("loginLabelPasswordRecover").innerHTML="";dojo.byId("loginButtonSubmit").innerHTML="Вспомнить";dojo.byId("loginInputLogin").focus();}function dialogLogin(){if(!_loginLast){_loginLast=dojo.cookie("##_userLastLogin");if(!_loginLast){_loginLast="";}}var dialogDiv=dojo.byId("loginFormWrapper").childNodes[0];dialogDiv.parentNode.removeChild(dialogDiv);if(!_loginDialog){_loginDialog=new dijit.Dialog({id:"loginDialog",title:"",refreshOnShow:true,hasTitle:false,hasShadow:false},dialogDiv);}_loginDialog.startup();document.body.appendChild(_loginDialog.domNode);_loginDialog.show();if(_loginLast){setTimeout('dojo.byId("loginInputLogin").value="'+_loginLast+'"; dojo.byId("loginInputPassword").focus();',50);}else{setTimeout('dojo.byId("loginInputLogin").focus();',50);}document.body.style.overflowX="hidden";return false;}function hideLoginDialog(){_loginDialog.hide();var login=dojo.byId("loginInputLogin").value,password=dojo.byId("loginInputPassword").value,dialogDiv=dojo.byId("loginForm"),newLoginFormToMove=document.createElement("DIV");dialogDiv.parentNode.removeChild(dialogDiv);newLoginFormToMove.appendChild(dialogDiv);dojo.byId("loginFormWrapper").appendChild(newLoginFormToMove);dojo.byId("loginInputLogin").value=login;dojo.byId("loginInputPassword").value=password;_loginDialog=null;document.body.style.overflowX="auto";}function submitLogin(){_loginLast=dojo.byId("loginInputLogin").value;dojo.cookie("##_userLastLogin",_loginLast);if(dojo.byId("loginInputPassword").style.display=="none"){$authenticationRecoverPassword(_loginLast,responsePasswordRecovered);}else{$authenticationLogin(_loginLast,dojo.byId("loginInputPassword").value,null,responseLogin);hideLoginDialog();}}function loginThroughTwitter(){$authenticationLoginThroughTwitter(loginThroughTwitterCallback);}function loginThroughTwitterCallback(aAttributes,aObjects){document.location=aAttributes.AuthorizationURL;}function responsePasswordRecovered(aAttributes,aObjects,aResultType){if(aResultType=="OK"){alert("Подробности по продолжению процедуры восстановления пароля высланы вам в ящик e-mail");hideLoginDialog();}else{alert("Пользователь с указанным логином не найден, восстановление невозможно");}}function responseLogin(aAttributes,aObjects,aResultType,aResultDescription){if(aResultType=="OK"){document.location.reload();}else{if(aResultDescription=="NotActivated"){alert("Данная учетная запись не была активирована. Ссылка для активации должна была прийти вам в почту");}else{alert("Введен неверный логин или пароль. \nПопробуйте еще раз");dialogLogin();}}}function dialogRegister(){var dialogDiv=document.createElement("DIV");dialogDiv.innerHTML='<div id="registerForm"><div id="registerLabelTitle">Регистрация</div><div id="registerLabelLogin">Имя пользователя:</div><input type="text" id="registerInputLogin" value="'+_registerLogin+'"/><div id="registerLabelEMail">E-mail:</div><input type="text" id="registerInputEMail" value="'+_registerEMail+'"/><div id="registerLabelPassword">Пароль:</div><input type="password" id="registerInputPassword" value="'+_registerPassword+'"/><div id="registerLabelPassword2">Еще раз пароль:</div><input type="password" id="registerInputPassword2" value="'+_registerPassword2+'"/><div id="loginButtonCancel" onclick="_registerDialog.domNode.parentNode.removeChild(_registerDialog.domNode); _registerDialog.hide(); _registerDialog=null;  document.body.style.overflowX = \'auto\';">Передумал</div><div id="loginButtonSubmit" onclick="submitRegister();">Продолжить</div><div id="recaptcha_div"></div></div>';if(!_registerDialog){_registerDialog=new dijit.Dialog({id:"registerDialog",title:"",refreshOnShow:true,hasTitle:false,hasShadow:false},dialogDiv);}_registerDialog.startup();document.body.appendChild(_registerDialog.domNode);_registerDialog.show();setTimeout('dojo.byId("registerInputLogin").focus();',50);document.body.style.overflowX="hidden";setTimeout('Recaptcha.create("6LeTXQcAAAAAACdAttrJ-V-SPNKa0iMv9kDKTH6F", "recaptcha_div", { theme: "white" });',50);return false;}function submitRegister(){_registerLogin=dojo.byId("registerInputLogin").value;_registerEMail=dojo.byId("registerInputEMail").value;_registerPassword=dojo.byId("registerInputPassword").value;_registerPassword2=dojo.byId("registerInputPassword2").value;if(_registerPassword!=_registerPassword2){alert("Пароли не совпадают, повторите еще раз");dojo.byId("registerInputPassword").focus();}else{if(_registerPassword==""){alert("Введите непустой пароль");dojo.byId("registerInputPassword").focus();}else{if(_registerLogin==""){alert("Введите непустое имя пользователя");dojo.byId("registerInputLogin").focus();}else{$authenticationSendRegistrationMail(_registerEMail,_registerLogin,_registerPassword,Recaptcha.get_response(),Recaptcha.get_challenge(),responseRegister);var aNode=_registerDialog.domNode;aNode.parentNode.removeChild(_registerDialog.domNode);_registerDialog.hide();_registerDialog=null;document.body.style.overflowX="auto";}}}}function responseRegister(aAttributes,aObjects,aResultType,aResultDescription){if(aResultType=="OK"){alert("По указанному адресу выслано письмо с дальнейшими инструкциями. Если оно не приходит, посмотрите в спаме");}else{if(aResultDescription=="ReCAPTCHA.failed"){alert("Вы неправильно ввели буквы с картинки. Попробуйте еще раз");dialogRegister();}else{if(aResultDescription=="AlreadyExists"){alert("Пользователь с указанным логином уже существует. Попробуйте другой");dialogRegister();}else{if(aResultDescription=="WrongEMail"){alert("Указанная в качестве EMail строка не похожа на EMail, введите другой пожалуйста");dialogRegister();}else{if(aResultDescription=="SimplePassword"){alert("Слишком простой пароль. Даже я, сервер, подобрал его на раз");dialogRegister();}else{alert("Что-то пошло не так. Попробуйте еще раз");}}}}}}function reloadPage(){document.location.reload();}function updateNews(){loadPageData("EntryNews","","newsList",10,1,1,"Long","PublishDateTime",false,"newsindex",true,true,null,null,putDaysIntoNews);}function putDaysIntoNews(aAttributes,aObjects,aResultType,aResultDescription){updatePageData(aAttributes,aObjects,aResultType,aResultDescription,"putDaysIntoNews");removeSubsequentDaysFromNews();}function removeSubsequentDaysFromNews(){var newsItems=document.getElementById("newsList").getElementsByTagName("DIV"),newsItem,innerItems,lastDay="",lastDayDiv=null,i,j;for(i in newsItems){if(newsItems[i].className=="newsDayDay"){if(newsItems[i].innerHTML!=lastDay){lastDay=newsItems[i].innerHTML;lastDayDiv=newsItems[i].parentNode;}else{newsItems[i].innerHTML="";innerItems=newsItems[i].parentNode.childNodes;newsItem=null;for(j in innerItems){if(innerItems[j].className=="newsItem"){newsItem=innerItems[j];break;}}try{newsItems[i].parentNode.removeChild(newsItem);newsItems[i].parentNode.parentNode.removeChild(newsItems[i].parentNode);lastDayDiv.appendChild(newsItem);}catch(e){alert(dojo.toJson(e));}}}}}function updateDocs(){loadPageData("EntryDocument","","docsList",10,1,1,"Long","PublishDateTime",false,"default",true,true);}function updateQuestions(){loadPageData("EntryQuestion","","questionsList",20,1,1,"Long","PublishDateTime",false,"default",true,true);}function updateShorts(){loadPageData("EntryShort","","shortsList",5,1,1,"Long","PublishDateTime",false,"default",true,true);}function updateSections(){loadPageData("Root","(Id, `NotEquals`, `1`)","sectionsList",10000,1,1,"String","Title",true);}function updateAnswers(aQuestionId){loadPageData("Answer","(Number, `Long`, `ParentQuestionId`, `Equals`, `"+aQuestionId+"`)","answersList",20,1,1,"String","CreatedTime",true);}function rebuildSearchIndex(){$systemRebuildSearchIndex(indexRebuilded);}function indexRebuilded(){alert("Search index was rebuilded.");}function updateSearchResults(aSearchString){searchSectionsDone=0;searchSectionsCount=3;somethingFound=false;dojo.byId("searchText").value=aSearchString;dojo.byId("nothingFound").innerHTML="Ищем…";dojo.byId("nothingFound").style.display="block";loadPageData("EntryNews","(FullText, `"+aSearchString+"`)","searchNews",10,1,1,"Long","Date",false,"search",false,true,null,null,searchNewsLoaded);loadPageData("EntryDocument","(FullText, `"+aSearchString+"`)","searchDocuments",10,1,1,"Long","Date",false,"search",false,true,null,null,searchDocumentsLoaded);loadPageData("EntryQuestion","(FullText, `"+aSearchString+"`)","searchQA",10,1,1,"Long","Date",false,"search",false,true,null,null,searchQuestionsLoaded);loadPageData("EntryShort","(FullText, `"+aSearchString+"`)","searchShorts",10,1,1,"Long","Date",false,"search",false,true,null,null,searchShortsLoaded);}function updateTagSearchResults(aTagId){searchSectionsDone=0;searchSectionsCount=3;somethingFound=false;dojo.byId("nothingFound").innerHTML="Ищем…";dojo.byId("nothingFound").style.display="block";loadPageData("EntryNews","(List, `TagIds`, `Contains`, `"+aTagId+"`)","searchNews",10,1,1,"Long","Date",false,"search",false,true,null,null,searchNewsLoaded);loadPageData("EntryDocument","(List, `TagIds`, `Contains`, `"+aTagId+"`)","searchDocuments",10,1,1,"Long","Date",false,"search",false,true,null,null,searchDocumentsLoaded);loadPageData("EntryQuestion","(List, `TagIds`, `Contains`, `"+aTagId+"`)","searchQA",10,1,1,"Long","Date",false,"search",false,true,null,null,searchQuestionsLoaded);loadPageData("EntryShort","(List, `TagIds`, `Contains`, `"+aTagId+"`)","searchShorts",10,1,1,"Long","Date",false,"search",false,true,null,null,searchShortsLoaded);}function checkIfAnythingFound(){if(searchSectionsDone==searchSectionsCount&&!somethingFound){dojo.byId("nothingFound").innerHTML="Ничего не нашлось";dojo.byId("nothingFound").style.display="block";}}function insertHeader(aListDivId,aHeaderText){var list=dojo.byId(aListDivId),parent=list.parentNode,header=document.createElement("H1");parent.removeChild(list);header.innerHTML='<div class="pageHeader">'+aHeaderText+"</div>";parent.appendChild(header);parent.appendChild(list);if(somethingFound){dojo.byId("nothingFound").innerHTML="";dojo.byId("nothingFound").style.display="none";}}function searchNewsLoaded(aAttributes,aObjects){searchSectionsDone++;if(!aAttributes.html){var toRemove=dojo.byId("lastNews");toRemove.parentNode.removeChild(toRemove);checkIfAnythingFound();}else{somethingFound=true;updatePageData(aAttributes,aObjects);insertHeader("searchNews","Новости");}}function searchDocumentsLoaded(aAttributes,aObjects){searchSectionsDone++;if(!aAttributes.html){var toRemove=dojo.byId("lastDocuments");toRemove.parentNode.removeChild(toRemove);checkIfAnythingFound();}else{somethingFound=true;updatePageData(aAttributes,aObjects);insertHeader("searchDocuments","Документы");}}function searchQuestionsLoaded(aAttributes,aObjects){searchSectionsDone++;if(!aAttributes.html){var toRemove=dojo.byId("lastQuestions");toRemove.parentNode.removeChild(toRemove);checkIfAnythingFound();}else{somethingFound=true;updatePageData(aAttributes,aObjects);insertHeader("searchQA","Вопросы");}}function searchShortsLoaded(aAttributes,aObjects){searchSectionsDone++;if(!aAttributes.html){var toRemove=dojo.byId("lastShorts");toRemove.parentNode.removeChild(toRemove);checkIfAnythingFound();}else{somethingFound=true;updatePageData(aAttributes,aObjects);insertHeader("searchShorts","Заметки");}}function searchOnSite(){if(dojo.byId("searchText").value){document.location="/search/"+dojo.byId("searchText").value;return false;}else{return false;}}function approveEntry(aEntryId,aRootId,aCallback){$entryEntryApproved(aEntryId,aRootId,aCallback);}function unapproveEntry(aEntryId,aRootId,aCallback){$entryEntryApprovedNot(aEntryId,aRootId,aCallback);}function saveUser(aUserId){var newPassword=null;if(dojo.byId("edit_newPassword").value!=""&&dojo.byId("edit_newPassword").value!=dojo.byId("edit_newPassword2").value){alert("Пароли не совпадают, повторите еще раз");return;}else{if(dojo.byId("edit_newPassword").value!=""){newPassword=dojo.byId("edit_newPassword").value;}}$adminEditUser(newAvatarJivaId,dojo.byId("edit_email").value,dojo.byId("edit_authorFullName")?dojo.byId("edit_authorFullName").value:null,dojo.byId("edit_authorJabber")?dojo.byId("edit_authorJabber").value:null,dojo.byId("edit_authorWorkPlace")?dojo.byId("edit_authorWorkPlace").value:null,dojo.byId("edit_authorWorkTitle")?dojo.byId("edit_authorWorkTitle").value:null,dojo.byId("checkbox_mailNewAnswers").checked?1:0,dojo.byId("checkbox_mailNewComments").checked?1:0,newPassword,dojo.byId("checkbox_useGravatar").checked?1:0,aUserId,userWasSaved);}function userWasSaved(aAttributes,aObjects,aResultType,aResultDescription){if(aResultType=="OK"){document.location="/user/"+aAttributes.UserId;}else{if(aResultDescription=="WrongEMail"){alert("Указанная в качестве EMail строка не похожа на EMail, введите другой пожалуйста");}else{if(aResultDescription=="SimplePassword"){alert("Слишком простой пароль. Даже я, сервер, подобрал его на раз");}else{alert("Result Description: "+aResultDescription);}}}}function postAnswer(aTextAreaId,aQuestionId){$entryAnswerWasAdded(dojo.byId(aTextAreaId).value,aQuestionId,function(){document.location.reload();});}function removeAnswer(aAnswerId){if(confirm("Вы уверены, что хотите удалить ответ?")){$entryAnswerWasDeleted(aAnswerId,function(){document.location.reload();});}}function editAnswer(aAnswerId){dojo.byId("answerContent_"+aAnswerId).innerHTML='<h1>Отредактировать ответ</h1><div class="editTextarea" style="height: 400px;"><textarea id="edit_answerLong_'+aAnswerId+'Wiki">Source is loading…</textarea><div id="preview_answerLong_'+aAnswerId+'Wiki" class="edit_preview"></div><div class="edit_hint">Текст ответа на вопрос (вики-форматирование) <span onclick="togglePreview(\'answerLong_'+aAnswerId+'\', this); return false;">Предпросмотр</span></div></div><div style="clear: both;"></div><div class="funkyButton" style="float: right; width: 400px; font-size: 11pt; z-index: 14999; margin-bottom: 40px; clear: both;" onclick="postEditedAnswer(\'edit_answerLong_'+aAnswerId+"Wiki', "+aAnswerId+');">Отослать отредактированный ответ</div><div style="clear: both;"></div>';_editingAnswerId=aAnswerId;$entryLoadAnswerSource(aAnswerId,answerSourceLoaded);}function answerSourceLoaded(aAttributes){dojo.byId("edit_answerLong_"+_editingAnswerId+"Wiki").value=aAttributes.AnswerSource;dojo.byId("edit_answerLong_"+_editingAnswerId+"Wiki").focus();}function postEditedAnswer(aTextAreaId,aAnswerId){$entryAnswerWasEdited(aAnswerId,dojo.byId(aTextAreaId).value,function(){document.location.reload();});}function selectAnswer(aAnswerId){$entryAnswerWasSelected(aAnswerId,function(){document.location.reload();});}function startCommenting(aObjectId,aUserId,aUserLogin,aButton){if(_lastCommentButtonPressed==aButton){aButton.innerHTML="Комментировать";_lastCommentButtonPressed=null;submitNewComment(aObjectId);}else{aButton.innerHTML="Сохранить";_lastCommentButtonPressed=aButton;if(dojo.byId("newCommentField")){dojo.byId("newCommentField").parentNode.removeChild(dojo.byId("newCommentField"));}_currentUserId=aUserId;_currentUserLogin=aUserLogin;var newCommentDiv=document.createElement("DIV");newCommentDiv.innerHTML='<div class="commentText" id="newCommentField"><textarea class="commentTextArea" style="border: 1px solid gray; padding: 8px;" onkeyup="commentChanged(event, '+aObjectId+');" maxlength="512" id="newCommentInput"></textarea></div>';dojo.byId("comments_"+aObjectId).appendChild(newCommentDiv);dojo.byId("newCommentInput").focus();}}function commentChanged(event,aObjectId){if(!event){event=window.event;}if(event.keyCode==13&&event.ctrlKey){if(_lastCommentButtonPressed!=null){_lastCommentButtonPressed.innerHTML="Комментировать";_lastCommentButtonPressed=null;}submitNewComment(aObjectId);}}function submitNewComment(aObjectId){var commentText=dojo.byId("newCommentInput").value;if(commentText.length>512){commentText=commentText.substr(0,512);}if(commentText){$entryCommentWasAdded(commentText,aObjectId,commentAddedSuccesfully);}}function commentAddedSuccesfully(aAttributes,aObjects,aResultType){if(aResultType=="OK"){dojo.byId("newCommentField").parentNode.removeChild(dojo.byId("newCommentField"));var newCommentDiv=document.createElement("DIV");newCommentDiv.innerHTML='<div class="commentText">'+aAttributes.CommentText+'<div class="commentNotText"> — <a href="/user/'+_currentUserId+'"><span class="commentAuthor">'+_currentUserLogin+'</span></a> <span class="commentRemoveText" onclick="removeComment('+aAttributes.CommentId+', this); return false;">Удалить</span></div></div>';dojo.byId("comments_"+aAttributes.ParentId).appendChild(newCommentDiv);}else{alert("Comment adding failed. Kick a developer, please. :)");}}function removeComment(aCommentId,aSpan){if(confirm("Вы правда решились удалить комментарий?")){aSpan.parentNode.parentNode.parentNode.removeChild(aSpan.parentNode.parentNode);$entryCommentWasRemoved(aCommentId);}}function sendMessageToAuthor(aAuthorId,aMessageText,aReCAPTCHA,aReCAPTCHAChallenge,aEMail,aName,aCallback){$otherSendMessageToAuthor(aAuthorId,aMessageText,aReCAPTCHA,aReCAPTCHAChallenge,aEMail,aName,aCallback);}function enableStreamEdit(){_isStreamEditable=true;}function addStreamElement(aStreamId){if(dojo.byId("edit_textWiki").value==""){return;}$streamingAdd(newImageJivaId,0,aStreamId,dojo.byId("edit_textWiki").value,addToStreamCallback);newImageJivaId=null;if(dojo.byId("edit_textWiki")){dojo.byId("edit_textWiki").value="";dojo.byId("edit_textWiki").focus();}dojo.byId("loadedImageName").innerHTML="";}function addCommentStreamElement(aStreamId){$streamingAdd(null,1,aStreamId,dojo.byId("edit_commentWiki").value,addCommentToStreamCallback);if(dojo.byId("edit_commentWiki")){dojo.byId("edit_commentWiki").value="";dojo.byId("edit_commentWiki").focus();}}function addToStreamCallback(aAttributes){updateAllStream(aAttributes.StreamId,false);}function addCommentToStreamCallback(aAttributes,aObjects,aResultType,aResultDescription){if(aResultType=="OK"){updateAllStream(aAttributes.StreamId,false);}else{alert(aResultDescription);}}function updateAllStream(aStreamId,aNeedSetTimeout){if(!_streamIsAlreadyLoading){_streamIsAlreadyLoading=true;$streamingGetLatest(_lastLoadedStreamElementId,aStreamId,updateStreamCallback);if(aNeedSetTimeout){setTimeout("updateAllStream("+aStreamId+", "+(aNeedSetTimeout?"true":"false")+");",20000);}}}function toggleStream(aStreamId){if(confirm("Вы уверены?")){$streamingToggleStream(aStreamId,streamWasToggled);}}function streamWasToggled(aStreamId){document.location.reload();}function updateStreamCallback(aAttributes,aObjects){var count=aAttributes.NextElementsCount,comments=aAttributes.NextCommentsCount,objWithData=aObjects.NextElements,objWithComments=aObjects.NextComments,commentDivs,toRemove=0,i=0;processElements(count,objWithData,"streamElements",false);processElements(comments,objWithComments,"commentElements",true);_streamIsAlreadyLoading=false;commentDivs=document.getElementById("commentElements").childNodes;toRemove=commentDivs.length-100;for(i=0;i<toRemove;i++){document.getElementById("commentElements").removeChild(commentDivs[100]);commentDivs=document.getElementById("commentElements").childNodes;}}function processElements(count,objWithData,aDivIdToInsertTo,aIsComment){var i=0,text="",date,prevDate,elementColor,elementUserId,elementUserLogin,imageId,elementId;prevDate="";for(i=0;i<count;i++){elementId=objWithData._attributes["id"+i];if(dojo.byId("streamElement_id_"+elementId)){continue;}_lastLoadedStreamElementId=elementId;date=objWithData._attributes["d"+i].substr(0,5);if(date==prevDate){date="";}else{prevDate=date;}elementUserLogin=objWithData._attributes["un"+i];if(elementUserLogin){elementUserLogin+=": ";}else{elementUserLogin="";}if(!aIsComment){imageId=objWithData._attributes["i"+i];elementColor=objWithData._attributes["c"+i];elementUserId=objWithData._attributes["u"+i];text='<div class="streamElement" id="streamElement_id_'+elementId+'"><div class="streamElementDate">'+date+"</div>"+(_isStreamEditable?'<div class="streamElementButtons"><div class="funkyButton" style="min-width: 50px; padding: 1px;" onclick="removeStreamElement('+elementId+');" style="display: inline-block;">Удалить</div></div>':"")+(imageId?'<div class="streamElementImage"><a href="/'+imageId+'.upload" target="_blank"><img src="/'+imageId+'.thumbnail"/></a></div>':"")+(objWithData._attributes["t"+i]?'<div class="streamElementText" style="color: #'+elementColor+';"><span style="float: left; margin-top: 1px; margin-right: 4px; font-weight: bold;">'+elementUserLogin+"</span>"+objWithData._attributes["t"+i]+"</div>":"")+'<div style="clear: both;"></div></div>'+text;}else{text='<div class="streamComment" id="streamElement_id_'+elementId+'">'+(_isStreamEditable?'<div class="streamCommentButtons"><div class="funkyButton" style="min-width: 50px; padding: 0;" onclick="removeStreamElement('+elementId+');" style="display: inline-block;">Удалить</div></div>':"")+(objWithData._attributes["t"+i]?'<div class="streamElementText"><span class="streamElementUserLogin">'+elementUserLogin+"</span>"+objWithData._attributes["t"+i]+"</div>":"")+"</div>"+text;}}dojo.byId(aDivIdToInsertTo).innerHTML=text+dojo.byId(aDivIdToInsertTo).innerHTML;}function removeStreamElement(aElementId){if(confirm("Вы уверены, что хотите удалить элемент?")){$objectRemove(aElementId,streamElementWasRemoved);}}function streamElementWasRemoved(aAttributes){var element=dojo.byId("streamElement_id_"+aAttributes.id);if(element&&element.parentNode){element.parentNode.removeChild(element);}}
