/*
	Copyright (c) 2004-2006, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/community/licensing.shtml
*/

/*
	This is a compiled version of Dojo, built for deployment and not for
	development. To get an editable version, please visit:

		http://dojotoolkit.org

	for documentation and information on getting the source.
*/

if(typeof dojo=="undefined"){
var dj_global=this;
var dj_currentContext=this;
function dj_undef(_1,_2){
return (typeof (_2||dj_currentContext)[_1]=="undefined");
}
if(dj_undef("djConfig",this)){
var djConfig={};
}
if(dj_undef("dojo",this)){
var dojo={};
}
dojo.global=function(){
return dj_currentContext;
};
dojo.locale=djConfig.locale;
dojo.version={major:0,minor:0,patch:0,flag:"dev",revision:Number("$Rev: 6824 $".match(/[0-9]+/)[0]),toString:function(){
with(dojo.version){
return major+"."+minor+"."+patch+flag+" ("+revision+")";
}
}};
dojo.evalProp=function(_3,_4,_5){
if((!_4)||(!_3)){
return undefined;
}
if(!dj_undef(_3,_4)){
return _4[_3];
}
return (_5?(_4[_3]={}):undefined);
};
dojo.parseObjPath=function(_6,_7,_8){
var _9=(_7||dojo.global());
var _a=_6.split(".");
var _b=_a.pop();
for(var i=0,l=_a.length;i<l&&_9;i++){
_9=dojo.evalProp(_a[i],_9,_8);
}
return {obj:_9,prop:_b};
};
dojo.evalObjPath=function(_e,_f){
if(typeof _e!="string"){
return dojo.global();
}
if(_e.indexOf(".")==-1){
return dojo.evalProp(_e,dojo.global(),_f);
}
var ref=dojo.parseObjPath(_e,dojo.global(),_f);
if(ref){
return dojo.evalProp(ref.prop,ref.obj,_f);
}
return null;
};
dojo.errorToString=function(_11){
if(!dj_undef("message",_11)){
return _11.message;
}else{
if(!dj_undef("description",_11)){
return _11.description;
}else{
return _11;
}
}
};
dojo.raise=function(_12,_13){
if(_13){
_12=_12+": "+dojo.errorToString(_13);
}else{
_12=dojo.errorToString(_12);
}
try{
if(djConfig.isDebug){
dojo.hostenv.println("FATAL exception raised: "+_12);
}
}
catch(e){
}
throw _13||Error(_12);
};
dojo.debug=function(){
};
dojo.debugShallow=function(obj){
};
dojo.profile={start:function(){
},end:function(){
},stop:function(){
},dump:function(){
}};
function dj_eval(_15){
return dj_global.eval?dj_global.eval(_15):eval(_15);
}
dojo.unimplemented=function(_16,_17){
var _18="'"+_16+"' not implemented";
if(_17!=null){
_18+=" "+_17;
}
dojo.raise(_18);
};
dojo.deprecated=function(_19,_1a,_1b){
var _1c="DEPRECATED: "+_19;
if(_1a){
_1c+=" "+_1a;
}
if(_1b){
_1c+=" -- will be removed in version: "+_1b;
}
dojo.debug(_1c);
};
dojo.render=(function(){
function vscaffold(_1d,_1e){
var tmp={capable:false,support:{builtin:false,plugin:false},prefixes:_1d};
for(var i=0;i<_1e.length;i++){
tmp[_1e[i]]=false;
}
return tmp;
}
return {name:"",ver:dojo.version,os:{win:false,linux:false,osx:false},html:vscaffold(["html"],["ie","opera","khtml","safari","moz"]),svg:vscaffold(["svg"],["corel","adobe","batik"]),vml:vscaffold(["vml"],["ie"]),swf:vscaffold(["Swf","Flash","Mm"],["mm"]),swt:vscaffold(["Swt"],["ibm"])};
})();
dojo.hostenv=(function(){
var _21={isDebug:false,allowQueryConfig:false,baseScriptUri:"",baseRelativePath:"",libraryScriptUri:"",iePreventClobber:false,ieClobberMinimal:true,preventBackButtonFix:true,delayMozLoadingFix:false,searchIds:[],parseWidgets:true};
if(typeof djConfig=="undefined"){
djConfig=_21;
}else{
for(var _22 in _21){
if(typeof djConfig[_22]=="undefined"){
djConfig[_22]=_21[_22];
}
}
}
return {name_:"(unset)",version_:"(unset)",getName:function(){
return this.name_;
},getVersion:function(){
return this.version_;
},getText:function(uri){
dojo.unimplemented("getText","uri="+uri);
}};
})();
dojo.hostenv.getBaseScriptUri=function(){
if(djConfig.baseScriptUri.length){
return djConfig.baseScriptUri;
}
var uri=new String(djConfig.libraryScriptUri||djConfig.baseRelativePath);
if(!uri){
dojo.raise("Nothing returned by getLibraryScriptUri(): "+uri);
}
var _25=uri.lastIndexOf("/");
djConfig.baseScriptUri=djConfig.baseRelativePath;
return djConfig.baseScriptUri;
};
(function(){
var _26={pkgFileName:"__package__",loading_modules_:{},loaded_modules_:{},addedToLoadingCount:[],removedFromLoadingCount:[],inFlightCount:0,modulePrefixes_:{dojo:{name:"dojo",value:"src"}},setModulePrefix:function(_27,_28){
this.modulePrefixes_[_27]={name:_27,value:_28};
},moduleHasPrefix:function(_29){
var mp=this.modulePrefixes_;
return Boolean(mp[_29]&&mp[_29].value);
},getModulePrefix:function(_2b){
if(this.moduleHasPrefix(_2b)){
return this.modulePrefixes_[_2b].value;
}
return _2b;
},getTextStack:[],loadUriStack:[],loadedUris:[],post_load_:false,modulesLoadedListeners:[],unloadListeners:[],loadNotifying:false};
for(var _2c in _26){
dojo.hostenv[_2c]=_26[_2c];
}
})();
dojo.hostenv.loadPath=function(_2d,_2e,cb){
var uri;
if(_2d.charAt(0)=="/"||_2d.match(/^\w+:/)){
uri=_2d;
}else{
uri=this.getBaseScriptUri()+_2d;
}
if(djConfig.cacheBust&&dojo.render.html.capable){
uri+="?"+String(djConfig.cacheBust).replace(/\W+/g,"");
}
try{
return !_2e?this.loadUri(uri,cb):this.loadUriAndCheck(uri,_2e,cb);
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.hostenv.loadUri=function(uri,cb){
if(this.loadedUris[uri]){
return true;
}
var _33=this.getText(uri,null,true);
if(!_33){
return false;
}
this.loadedUris[uri]=true;
if(cb){
_33="("+_33+")";
}
var _34=dj_eval(_33);
if(cb){
cb(_34);
}
return true;
};
dojo.hostenv.loadUriAndCheck=function(uri,_36,cb){
var ok=true;
try{
ok=this.loadUri(uri,cb);
}
catch(e){
dojo.debug("failed loading ",uri," with error: ",e);
}
return Boolean(ok&&this.findModule(_36,false));
};
dojo.loaded=function(){
};
dojo.unloaded=function(){
};
dojo.hostenv.loaded=function(){
this.loadNotifying=true;
this.post_load_=true;
var mll=this.modulesLoadedListeners;
for(var x=0;x<mll.length;x++){
mll[x]();
}
this.modulesLoadedListeners=[];
this.loadNotifying=false;
dojo.loaded();
};
dojo.hostenv.unloaded=function(){
var mll=this.unloadListeners;
while(mll.length){
(mll.pop())();
}
dojo.unloaded();
};
dojo.addOnLoad=function(obj,_3d){
var dh=dojo.hostenv;
if(arguments.length==1){
dh.modulesLoadedListeners.push(obj);
}else{
if(arguments.length>1){
dh.modulesLoadedListeners.push(function(){
obj[_3d]();
});
}
}
if(dh.post_load_&&dh.inFlightCount==0&&!dh.loadNotifying){
dh.callLoaded();
}
};
dojo.addOnUnload=function(obj,_40){
var dh=dojo.hostenv;
if(arguments.length==1){
dh.unloadListeners.push(obj);
}else{
if(arguments.length>1){
dh.unloadListeners.push(function(){
obj[_40]();
});
}
}
};
dojo.hostenv.modulesLoaded=function(){
if(this.post_load_){
return;
}
if(this.loadUriStack.length==0&&this.getTextStack.length==0){
if(this.inFlightCount>0){
dojo.debug("files still in flight!");
return;
}
dojo.hostenv.callLoaded();
}
};
dojo.hostenv.callLoaded=function(){
if(typeof setTimeout=="object"){
setTimeout("dojo.hostenv.loaded();",0);
}else{
dojo.hostenv.loaded();
}
};
dojo.hostenv.getModuleSymbols=function(_42){
var _43=_42.split(".");
for(var i=_43.length;i>0;i--){
var _45=_43.slice(0,i).join(".");
if((i==1)&&!this.moduleHasPrefix(_45)){
_43[0]="../"+_43[0];
}else{
var _46=this.getModulePrefix(_45);
if(_46!=_45){
_43.splice(0,i,_46);
break;
}
}
}
return _43;
};
dojo.hostenv._global_omit_module_check=false;
dojo.hostenv.loadModule=function(_47,_48,_49){
if(!_47){
return;
}
_49=this._global_omit_module_check||_49;
var _4a=this.findModule(_47,false);
if(_4a){
return _4a;
}
if(dj_undef(_47,this.loading_modules_)){
this.addedToLoadingCount.push(_47);
}
this.loading_modules_[_47]=1;
var _4b=_47.replace(/\./g,"/")+".js";
var _4c=_47.split(".");
var _4d=this.getModuleSymbols(_47);
var _4e=((_4d[0].charAt(0)!="/")&&!_4d[0].match(/^\w+:/));
var _4f=_4d[_4d.length-1];
var ok;
if(_4f=="*"){
_47=_4c.slice(0,-1).join(".");
while(_4d.length){
_4d.pop();
_4d.push(this.pkgFileName);
_4b=_4d.join("/")+".js";
if(_4e&&_4b.charAt(0)=="/"){
_4b=_4b.slice(1);
}
ok=this.loadPath(_4b,!_49?_47:null);
if(ok){
break;
}
_4d.pop();
}
}else{
_4b=_4d.join("/")+".js";
_47=_4c.join(".");
var _51=!_49?_47:null;
ok=this.loadPath(_4b,_51);
if(!ok&&!_48){
_4d.pop();
while(_4d.length){
_4b=_4d.join("/")+".js";
ok=this.loadPath(_4b,_51);
if(ok){
break;
}
_4d.pop();
_4b=_4d.join("/")+"/"+this.pkgFileName+".js";
if(_4e&&_4b.charAt(0)=="/"){
_4b=_4b.slice(1);
}
ok=this.loadPath(_4b,_51);
if(ok){
break;
}
}
}
if(!ok&&!_49){
dojo.raise("Could not load '"+_47+"'; last tried '"+_4b+"'");
}
}
if(!_49&&!this["isXDomain"]){
_4a=this.findModule(_47,false);
if(!_4a){
dojo.raise("symbol '"+_47+"' is not defined after loading '"+_4b+"'");
}
}
return _4a;
};
dojo.hostenv.startPackage=function(_52){
var _53=String(_52);
var _54=_53;
var _55=_52.split(/\./);
if(_55[_55.length-1]=="*"){
_55.pop();
_54=_55.join(".");
}
var _56=dojo.evalObjPath(_54,true);
this.loaded_modules_[_53]=_56;
this.loaded_modules_[_54]=_56;
return _56;
};
dojo.hostenv.findModule=function(_57,_58){
var lmn=String(_57);
if(this.loaded_modules_[lmn]){
return this.loaded_modules_[lmn];
}
if(_58){
dojo.raise("no loaded module named '"+_57+"'");
}
return null;
};
dojo.kwCompoundRequire=function(_5a){
var _5b=_5a["common"]||[];
var _5c=_5a[dojo.hostenv.name_]?_5b.concat(_5a[dojo.hostenv.name_]||[]):_5b.concat(_5a["default"]||[]);
for(var x=0;x<_5c.length;x++){
var _5e=_5c[x];
if(_5e.constructor==Array){
dojo.hostenv.loadModule.apply(dojo.hostenv,_5e);
}else{
dojo.hostenv.loadModule(_5e);
}
}
};
dojo.require=function(_5f){
dojo.hostenv.loadModule.apply(dojo.hostenv,arguments);
};
dojo.requireIf=function(_60,_61){
var _62=arguments[0];
if((_62===true)||(_62=="common")||(_62&&dojo.render[_62].capable)){
var _63=[];
for(var i=1;i<arguments.length;i++){
_63.push(arguments[i]);
}
dojo.require.apply(dojo,_63);
}
};
dojo.requireAfterIf=dojo.requireIf;
dojo.provide=function(_65){
return dojo.hostenv.startPackage.apply(dojo.hostenv,arguments);
};
dojo.registerModulePath=function(_66,_67){
return dojo.hostenv.setModulePrefix(_66,_67);
};
dojo.setModulePrefix=function(_68,_69){
dojo.deprecated("dojo.setModulePrefix(\""+_68+"\", \""+_69+"\")","replaced by dojo.registerModulePath","0.5");
return dojo.registerModulePath(_68,_69);
};
dojo.exists=function(obj,_6b){
var p=_6b.split(".");
for(var i=0;i<p.length;i++){
if(!obj[p[i]]){
return false;
}
obj=obj[p[i]];
}
return true;
};
dojo.hostenv.normalizeLocale=function(_6e){
var _6f=_6e?_6e.toLowerCase():dojo.locale;
if(_6f=="root"){
_6f="ROOT";
}
return _6f;
};
dojo.hostenv.searchLocalePath=function(_70,_71,_72){
_70=dojo.hostenv.normalizeLocale(_70);
var _73=_70.split("-");
var _74=[];
for(var i=_73.length;i>0;i--){
_74.push(_73.slice(0,i).join("-"));
}
_74.push(false);
if(_71){
_74.reverse();
}
for(var j=_74.length-1;j>=0;j--){
var loc=_74[j]||"ROOT";
var _78=_72(loc);
if(_78){
break;
}
}
};
dojo.hostenv.localesGenerated=["ROOT","es-es","es","it-it","pt-br","de","fr-fr","zh-cn","pt","en-us","zh","fr","zh-tw","it","en-gb","xx","de-de","ko-kr","ja-jp","ko","en","ja"];
dojo.hostenv.registerNlsPrefix=function(){
dojo.registerModulePath("nls","nls");
};
dojo.hostenv.preloadLocalizations=function(){
if(dojo.hostenv.localesGenerated){
dojo.hostenv.registerNlsPrefix();
function preload(_79){
_79=dojo.hostenv.normalizeLocale(_79);
dojo.hostenv.searchLocalePath(_79,true,function(loc){
for(var i=0;i<dojo.hostenv.localesGenerated.length;i++){
if(dojo.hostenv.localesGenerated[i]==loc){
dojo["require"]("nls.dojo_"+loc);
return true;
}
}
return false;
});
}
preload();
var _7c=djConfig.extraLocale||[];
for(var i=0;i<_7c.length;i++){
preload(_7c[i]);
}
}
dojo.hostenv.preloadLocalizations=function(){
};
};
dojo.requireLocalization=function(_7e,_7f,_80,_81){
dojo.hostenv.preloadLocalizations();
var _82=dojo.hostenv.normalizeLocale(_80);
var _83=[_7e,"nls",_7f].join(".");
var _84="";
if(_81){
var _85=_81.split(",");
for(var i=0;i<_85.length;i++){
if(_82.indexOf(_85[i])==0){
if(_85[i].length>_84.length){
_84=_85[i];
}
}
}
if(!_84){
_84="ROOT";
}
}
var _87=_81?_84:_82;
var _88=dojo.hostenv.findModule(_83);
var _89=null;
if(_88){
if(djConfig.localizationComplete&&_88._built){
return;
}
var _8a=_87.replace("-","_");
var _8b=_83+"."+_8a;
_89=dojo.hostenv.findModule(_8b);
}
if(!_89){
_88=dojo.hostenv.startPackage(_83);
var _8c=dojo.hostenv.getModuleSymbols(_7e);
var _8d=_8c.concat("nls").join("/");
var _8e;
dojo.hostenv.searchLocalePath(_87,_81,function(loc){
var _90=loc.replace("-","_");
var _91=_83+"."+_90;
var _92=false;
if(!dojo.hostenv.findModule(_91)){
dojo.hostenv.startPackage(_91);
var _93=[_8d];
if(loc!="ROOT"){
_93.push(loc);
}
_93.push(_7f);
var _94=_93.join("/")+".js";
_92=dojo.hostenv.loadPath(_94,null,function(_95){
var _96=function(){
};
_96.prototype=_8e;
_88[_90]=new _96();
for(var j in _95){
_88[_90][j]=_95[j];
}
});
}else{
_92=true;
}
if(_92&&_88[_90]){
_8e=_88[_90];
}else{
_88[_90]=_8e;
}
if(_81){
return true;
}
});
}
if(_81&&_82!=_84){
_88[_82.replace("-","_")]=_88[_84.replace("-","_")];
}
};
(function(){
var _98=djConfig.extraLocale;
if(_98){
if(!_98 instanceof Array){
_98=[_98];
}
var req=dojo.requireLocalization;
dojo.requireLocalization=function(m,b,_9c,_9d){
req(m,b,_9c,_9d);
if(_9c){
return;
}
for(var i=0;i<_98.length;i++){
req(m,b,_98[i],_9d);
}
};
}
})();
}
if(typeof window!="undefined"){
(function(){
if(djConfig.allowQueryConfig){
var _9f=document.location.toString();
var _a0=_9f.split("?",2);
if(_a0.length>1){
var _a1=_a0[1];
var _a2=_a1.split("&");
for(var x in _a2){
var sp=_a2[x].split("=");
if((sp[0].length>9)&&(sp[0].substr(0,9)=="djConfig.")){
var opt=sp[0].substr(9);
try{
djConfig[opt]=eval(sp[1]);
}
catch(e){
djConfig[opt]=sp[1];
}
}
}
}
}
if(((djConfig["baseScriptUri"]=="")||(djConfig["baseRelativePath"]==""))&&(document&&document.getElementsByTagName)){
var _a6=document.getElementsByTagName("script");
var _a7=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i;
for(var i=0;i<_a6.length;i++){
var src=_a6[i].getAttribute("src");
if(!src){
continue;
}
var m=src.match(_a7);
if(m){
var _ab=src.substring(0,m.index);
if(src.indexOf("bootstrap1")>-1){
_ab+="../";
}
if(!this["djConfig"]){
djConfig={};
}
if(djConfig["baseScriptUri"]==""){
djConfig["baseScriptUri"]=_ab;
}
if(djConfig["baseRelativePath"]==""){
djConfig["baseRelativePath"]=_ab;
}
break;
}
}
}
var dr=dojo.render;
var drh=dojo.render.html;
var drs=dojo.render.svg;
var dua=(drh.UA=navigator.userAgent);
var dav=(drh.AV=navigator.appVersion);
var t=true;
var f=false;
drh.capable=t;
drh.support.builtin=t;
dr.ver=parseFloat(drh.AV);
dr.os.mac=dav.indexOf("Macintosh")>=0;
dr.os.win=dav.indexOf("Windows")>=0;
dr.os.linux=dav.indexOf("X11")>=0;
drh.opera=dua.indexOf("Opera")>=0;
drh.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0);
drh.safari=dav.indexOf("Safari")>=0;
var _b3=dua.indexOf("Gecko");
drh.mozilla=drh.moz=(_b3>=0)&&(!drh.khtml);
if(drh.mozilla){
drh.geckoVersion=dua.substring(_b3+6,_b3+14);
}
drh.ie=(document.all)&&(!drh.opera);
drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0;
drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0;
drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0;
drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0;
var cm=document["compatMode"];
drh.quirks=(cm=="BackCompat")||(cm=="QuirksMode")||drh.ie55||drh.ie50;
dojo.locale=dojo.locale||(drh.ie?navigator.userLanguage:navigator.language).toLowerCase();
dr.vml.capable=drh.ie;
drs.capable=f;
drs.support.plugin=f;
drs.support.builtin=f;
var _b5=window["document"];
var tdi=_b5["implementation"];
if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0"))){
drs.capable=t;
drs.support.builtin=t;
drs.support.plugin=f;
}
if(drh.safari){
var tmp=dua.split("AppleWebKit/")[1];
var ver=parseFloat(tmp.split(" ")[0]);
if(ver>=420){
drs.capable=t;
drs.support.builtin=t;
drs.support.plugin=f;
}
}else{
}
})();
dojo.hostenv.startPackage("dojo.hostenv");
dojo.render.name=dojo.hostenv.name_="browser";
dojo.hostenv.searchIds=[];
dojo.hostenv._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
dojo.hostenv.getXmlhttpObject=function(){
var _b9=null;
var _ba=null;
try{
_b9=new XMLHttpRequest();
}
catch(e){
}
if(!_b9){
for(var i=0;i<3;++i){
var _bc=dojo.hostenv._XMLHTTP_PROGIDS[i];
try{
_b9=new ActiveXObject(_bc);
}
catch(e){
_ba=e;
}
if(_b9){
dojo.hostenv._XMLHTTP_PROGIDS=[_bc];
break;
}
}
}
if(!_b9){
return dojo.raise("XMLHTTP not available",_ba);
}
return _b9;
};
dojo.hostenv._blockAsync=false;
dojo.hostenv.getText=function(uri,_be,_bf){
if(!_be){
this._blockAsync=true;
}
var _c0=this.getXmlhttpObject();
function isDocumentOk(_c1){
var _c2=_c1["status"];
return Boolean((!_c2)||((200<=_c2)&&(300>_c2))||(_c2==304));
}
if(_be){
var _c3=this,_c4=null,gbl=dojo.global();
var xhr=dojo.evalObjPath("dojo.io.XMLHTTPTransport");
_c0.onreadystatechange=function(){
if(_c4){
gbl.clearTimeout(_c4);
_c4=null;
}
if(_c3._blockAsync||(xhr&&xhr._blockAsync)){
_c4=gbl.setTimeout(function(){
_c0.onreadystatechange.apply(this);
},10);
}else{
if(4==_c0.readyState){
if(isDocumentOk(_c0)){
_be(_c0.responseText);
}
}
}
};
}
_c0.open("GET",uri,_be?true:false);
try{
_c0.send(null);
if(_be){
return null;
}
if(!isDocumentOk(_c0)){
var err=Error("Unable to load "+uri+" status:"+_c0.status);
err.status=_c0.status;
err.responseText=_c0.responseText;
throw err;
}
}
catch(e){
this._blockAsync=false;
if((_bf)&&(!_be)){
return null;
}else{
throw e;
}
}
this._blockAsync=false;
return _c0.responseText;
};
dojo.hostenv.defaultDebugContainerId="dojoDebug";
dojo.hostenv._println_buffer=[];
dojo.hostenv._println_safe=false;
dojo.hostenv.println=function(_c8){
if(!dojo.hostenv._println_safe){
dojo.hostenv._println_buffer.push(_c8);
}else{
try{
var _c9=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId);
if(!_c9){
_c9=dojo.body();
}
var div=document.createElement("div");
div.appendChild(document.createTextNode(_c8));
_c9.appendChild(div);
}
catch(e){
try{
document.write("<div>"+_c8+"</div>");
}
catch(e2){
window.status=_c8;
}
}
}
};
dojo.addOnLoad(function(){
dojo.hostenv._println_safe=true;
while(dojo.hostenv._println_buffer.length>0){
dojo.hostenv.println(dojo.hostenv._println_buffer.shift());
}
});
function dj_addNodeEvtHdlr(_cb,_cc,fp){
var _ce=_cb["on"+_cc]||function(){
};
_cb["on"+_cc]=function(){
fp.apply(_cb,arguments);
_ce.apply(_cb,arguments);
};
return true;
}
function dj_load_init(e){
var _d0=(e&&e.type)?e.type.toLowerCase():"load";
if(arguments.callee.initialized||(_d0!="domcontentloaded"&&_d0!="load")){
return;
}
arguments.callee.initialized=true;
if(typeof (_timer)!="undefined"){
clearInterval(_timer);
delete _timer;
}
var _d1=function(){
if(dojo.render.html.ie){
dojo.hostenv.makeWidgets();
}
};
if(dojo.hostenv.inFlightCount==0){
_d1();
dojo.hostenv.modulesLoaded();
}else{
dojo.hostenv.modulesLoadedListeners.unshift(_d1);
}
}
if(document.addEventListener){
if(dojo.render.html.opera||(dojo.render.html.moz&&!djConfig.delayMozLoadingFix)){
document.addEventListener("DOMContentLoaded",dj_load_init,null);
}
window.addEventListener("load",dj_load_init,null);
}
if(dojo.render.html.ie&&dojo.render.os.win){
document.attachEvent("onreadystatechange",function(e){
if(document.readyState=="complete"){
dj_load_init();
}
});
}
if(/(WebKit|khtml)/i.test(navigator.userAgent)){
var _timer=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
dj_load_init();
}
},10);
}
if(dojo.render.html.ie){
dj_addNodeEvtHdlr(window,"beforeunload",function(){
dojo.hostenv._unloading=true;
window.setTimeout(function(){
dojo.hostenv._unloading=false;
},0);
});
}
dj_addNodeEvtHdlr(window,"unload",function(){
dojo.hostenv.unloaded();
if((!dojo.render.html.ie)||(dojo.render.html.ie&&dojo.hostenv._unloading)){
dojo.hostenv.unloaded();
}
});
dojo.hostenv.makeWidgets=function(){
var _d3=[];
if(djConfig.searchIds&&djConfig.searchIds.length>0){
_d3=_d3.concat(djConfig.searchIds);
}
if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){
_d3=_d3.concat(dojo.hostenv.searchIds);
}
if((djConfig.parseWidgets)||(_d3.length>0)){
if(dojo.evalObjPath("dojo.widget.Parse")){
var _d4=new dojo.xml.Parse();
if(_d3.length>0){
for(var x=0;x<_d3.length;x++){
var _d6=document.getElementById(_d3[x]);
if(!_d6){
continue;
}
var _d7=_d4.parseElement(_d6,null,true);
dojo.widget.getParser().createComponents(_d7);
}
}else{
if(djConfig.parseWidgets){
var _d7=_d4.parseElement(dojo.body(),null,true);
dojo.widget.getParser().createComponents(_d7);
}
}
}
}
};
dojo.addOnLoad(function(){
if(!dojo.render.html.ie){
dojo.hostenv.makeWidgets();
}
});
try{
if(dojo.render.html.ie){
document.namespaces.add("v","urn:schemas-microsoft-com:vml");
document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)");
}
}
catch(e){
}
dojo.hostenv.writeIncludes=function(){
};
if(!dj_undef("document",this)){
dj_currentDocument=this.document;
}
dojo.doc=function(){
return dj_currentDocument;
};
dojo.body=function(){
return dojo.doc().body||dojo.doc().getElementsByTagName("body")[0];
};
dojo.byId=function(id,doc){
if((id)&&((typeof id=="string")||(id instanceof String))){
if(!doc){
doc=dj_currentDocument;
}
var ele=doc.getElementById(id);
if(ele&&(ele.id!=id)&&doc.all){
ele=null;
eles=doc.all[id];
if(eles){
if(eles.length){
for(var i=0;i<eles.length;i++){
if(eles[i].id==id){
ele=eles[i];
break;
}
}
}else{
ele=eles;
}
}
}
return ele;
}
return id;
};
dojo.setContext=function(_dc,_dd){
dj_currentContext=_dc;
dj_currentDocument=_dd;
};
dojo._fireCallback=function(_de,_df,_e0){
if((_df)&&((typeof _de=="string")||(_de instanceof String))){
_de=_df[_de];
}
return (_df?_de.apply(_df,_e0||[]):_de());
};
dojo.withGlobal=function(_e1,_e2,_e3,_e4){
var _e5;
var _e6=dj_currentContext;
var _e7=dj_currentDocument;
try{
dojo.setContext(_e1,_e1.document);
_e5=dojo._fireCallback(_e2,_e3,_e4);
}
finally{
dojo.setContext(_e6,_e7);
}
return _e5;
};
dojo.withDoc=function(_e8,_e9,_ea,_eb){
var _ec;
var _ed=dj_currentDocument;
try{
dj_currentDocument=_e8;
_ec=dojo._fireCallback(_e9,_ea,_eb);
}
finally{
dj_currentDocument=_ed;
}
return _ec;
};
}
(function(){
if(typeof dj_usingBootstrap!="undefined"){
return;
}
var _ee=false;
var _ef=false;
var _f0=false;
if((typeof this["load"]=="function")&&((typeof this["Packages"]=="function")||(typeof this["Packages"]=="object"))){
_ee=true;
}else{
if(typeof this["load"]=="function"){
_ef=true;
}else{
if(window.widget){
_f0=true;
}
}
}
var _f1=[];
if((this["djConfig"])&&((djConfig["isDebug"])||(djConfig["debugAtAllCosts"]))){
_f1.push("debug.js");
}
if((this["djConfig"])&&(djConfig["debugAtAllCosts"])&&(!_ee)&&(!_f0)){
_f1.push("browser_debug.js");
}
var _f2=djConfig["baseScriptUri"];
if((this["djConfig"])&&(djConfig["baseLoaderUri"])){
_f2=djConfig["baseLoaderUri"];
}
for(var x=0;x<_f1.length;x++){
var _f4=_f2+"src/"+_f1[x];
if(_ee||_ef){
load(_f4);
}else{
try{
document.write("<scr"+"ipt type='text/javascript' src='"+_f4+"'></scr"+"ipt>");
}
catch(e){
var _f5=document.createElement("script");
_f5.src=_f4;
document.getElementsByTagName("head")[0].appendChild(_f5);
}
}
}
})();
dojo.provide("dojo.date.common");
dojo.date.setDayOfYear=function(_f6,_f7){
_f6.setMonth(0);
_f6.setDate(_f7);
return _f6;
};
dojo.date.getDayOfYear=function(_f8){
var _f9=_f8.getFullYear();
var _fa=new Date(_f9-1,11,31);
return Math.floor((_f8.getTime()-_fa.getTime())/86400000);
};
dojo.date.setWeekOfYear=function(_fb,_fc,_fd){
if(arguments.length==1){
_fd=0;
}
dojo.unimplemented("dojo.date.setWeekOfYear");
};
dojo.date.getWeekOfYear=function(_fe,_ff){
if(arguments.length==1){
_ff=0;
}
var _100=new Date(_fe.getFullYear(),0,1);
var day=_100.getDay();
_100.setDate(_100.getDate()-day+_ff-(day>_ff?7:0));
return Math.floor((_fe.getTime()-_100.getTime())/604800000);
};
dojo.date.setIsoWeekOfYear=function(_102,week,_104){
if(arguments.length==1){
_104=1;
}
dojo.unimplemented("dojo.date.setIsoWeekOfYear");
};
dojo.date.getIsoWeekOfYear=function(_105,_106){
if(arguments.length==1){
_106=1;
}
dojo.unimplemented("dojo.date.getIsoWeekOfYear");
};
dojo.date.shortTimezones=["IDLW","BET","HST","MART","AKST","PST","MST","CST","EST","AST","NFT","BST","FST","AT","GMT","CET","EET","MSK","IRT","GST","AFT","AGTT","IST","NPT","ALMT","MMT","JT","AWST","JST","ACST","AEST","LHST","VUT","NFT","NZT","CHAST","PHOT","LINT"];
dojo.date.timezoneOffsets=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,540,570,600,630,660,690,720,765,780,840];
dojo.date.getDaysInMonth=function(_107){
var _108=_107.getMonth();
var days=[31,28,31,30,31,30,31,31,30,31,30,31];
if(_108==1&&dojo.date.isLeapYear(_107)){
return 29;
}else{
return days[_108];
}
};
dojo.date.isLeapYear=function(_10a){
var year=_10a.getFullYear();
return (year%400==0)?true:(year%100==0)?false:(year%4==0)?true:false;
};
dojo.date.getTimezoneName=function(_10c){
var str=_10c.toString();
var tz="";
var _10f;
var pos=str.indexOf("(");
if(pos>-1){
pos++;
tz=str.substring(pos,str.indexOf(")"));
}else{
var pat=/([A-Z\/]+) \d{4}$/;
if((_10f=str.match(pat))){
tz=_10f[1];
}else{
str=_10c.toLocaleString();
pat=/ ([A-Z\/]+)$/;
if((_10f=str.match(pat))){
tz=_10f[1];
}
}
}
return tz=="AM"||tz=="PM"?"":tz;
};
dojo.date.getOrdinal=function(_112){
var date=_112.getDate();
if(date%100!=11&&date%10==1){
return "st";
}else{
if(date%100!=12&&date%10==2){
return "nd";
}else{
if(date%100!=13&&date%10==3){
return "rd";
}else{
return "th";
}
}
}
};
dojo.date.compareTypes={DATE:1,TIME:2};
dojo.date.compare=function(_114,_115,_116){
var dA=_114;
var dB=_115||new Date();
var now=new Date();
with(dojo.date.compareTypes){
var opt=_116||(DATE|TIME);
var d1=new Date((opt&DATE)?dA.getFullYear():now.getFullYear(),(opt&DATE)?dA.getMonth():now.getMonth(),(opt&DATE)?dA.getDate():now.getDate(),(opt&TIME)?dA.getHours():0,(opt&TIME)?dA.getMinutes():0,(opt&TIME)?dA.getSeconds():0);
var d2=new Date((opt&DATE)?dB.getFullYear():now.getFullYear(),(opt&DATE)?dB.getMonth():now.getMonth(),(opt&DATE)?dB.getDate():now.getDate(),(opt&TIME)?dB.getHours():0,(opt&TIME)?dB.getMinutes():0,(opt&TIME)?dB.getSeconds():0);
}
if(d1.valueOf()>d2.valueOf()){
return 1;
}
if(d1.valueOf()<d2.valueOf()){
return -1;
}
return 0;
};
dojo.date.dateParts={YEAR:0,MONTH:1,DAY:2,HOUR:3,MINUTE:4,SECOND:5,MILLISECOND:6,QUARTER:7,WEEK:8,WEEKDAY:9};
dojo.date.add=function(dt,_11e,incr){
if(typeof dt=="number"){
dt=new Date(dt);
}
function fixOvershoot(){
if(sum.getDate()<dt.getDate()){
sum.setDate(0);
}
}
var sum=new Date(dt);
with(dojo.date.dateParts){
switch(_11e){
case YEAR:
sum.setFullYear(dt.getFullYear()+incr);
fixOvershoot();
break;
case QUARTER:
incr*=3;
case MONTH:
sum.setMonth(dt.getMonth()+incr);
fixOvershoot();
break;
case WEEK:
incr*=7;
case DAY:
sum.setDate(dt.getDate()+incr);
break;
case WEEKDAY:
var dat=dt.getDate();
var _122=0;
var days=0;
var strt=0;
var trgt=0;
var adj=0;
var mod=incr%5;
if(mod==0){
days=(incr>0)?5:-5;
_122=(incr>0)?((incr-5)/5):((incr+5)/5);
}else{
days=mod;
_122=parseInt(incr/5);
}
strt=dt.getDay();
if(strt==6&&incr>0){
adj=1;
}else{
if(strt==0&&incr<0){
adj=-1;
}
}
trgt=(strt+days);
if(trgt==0||trgt==6){
adj=(incr>0)?2:-2;
}
sum.setDate(dat+(7*_122)+days+adj);
break;
case HOUR:
sum.setHours(sum.getHours()+incr);
break;
case MINUTE:
sum.setMinutes(sum.getMinutes()+incr);
break;
case SECOND:
sum.setSeconds(sum.getSeconds()+incr);
break;
case MILLISECOND:
sum.setMilliseconds(sum.getMilliseconds()+incr);
break;
default:
break;
}
}
return sum;
};
dojo.date.diff=function(dtA,dtB,_12a){
if(typeof dtA=="number"){
dtA=new Date(dtA);
}
if(typeof dtB=="number"){
dtB=new Date(dtB);
}
var _12b=dtB.getFullYear()-dtA.getFullYear();
var _12c=(dtB.getMonth()-dtA.getMonth())+(_12b*12);
var _12d=dtB.getTime()-dtA.getTime();
var _12e=_12d/1000;
var _12f=_12e/60;
var _130=_12f/60;
var _131=_130/24;
var _132=_131/7;
var _133=0;
with(dojo.date.dateParts){
switch(_12a){
case YEAR:
_133=_12b;
break;
case QUARTER:
var mA=dtA.getMonth();
var mB=dtB.getMonth();
var qA=Math.floor(mA/3)+1;
var qB=Math.floor(mB/3)+1;
qB+=(_12b*4);
_133=qB-qA;
break;
case MONTH:
_133=_12c;
break;
case WEEK:
_133=parseInt(_132);
break;
case DAY:
_133=_131;
break;
case WEEKDAY:
var days=Math.round(_131);
var _139=parseInt(days/7);
var mod=days%7;
if(mod==0){
days=_139*5;
}else{
var adj=0;
var aDay=dtA.getDay();
var bDay=dtB.getDay();
_139=parseInt(days/7);
mod=days%7;
var _13e=new Date(dtA);
_13e.setDate(_13e.getDate()+(_139*7));
var _13f=_13e.getDay();
if(_131>0){
switch(true){
case aDay==6:
adj=-1;
break;
case aDay==0:
adj=0;
break;
case bDay==6:
adj=-1;
break;
case bDay==0:
adj=-2;
break;
case (_13f+mod)>5:
adj=-2;
break;
default:
break;
}
}else{
if(_131<0){
switch(true){
case aDay==6:
adj=0;
break;
case aDay==0:
adj=1;
break;
case bDay==6:
adj=2;
break;
case bDay==0:
adj=1;
break;
case (_13f+mod)<0:
adj=2;
break;
default:
break;
}
}
}
days+=adj;
days-=(_139*2);
}
_133=days;
break;
case HOUR:
_133=_130;
break;
case MINUTE:
_133=_12f;
break;
case SECOND:
_133=_12e;
break;
case MILLISECOND:
_133=_12d;
break;
default:
break;
}
}
return Math.round(_133);
};
dojo.provide("dojo.lang.common");
dojo.lang.inherits=function(_140,_141){
if(!dojo.lang.isFunction(_141)){
dojo.raise("dojo.inherits: superclass argument ["+_141+"] must be a function (subclass: ["+_140+"']");
}
_140.prototype=new _141();
_140.prototype.constructor=_140;
_140.superclass=_141.prototype;
_140["super"]=_141.prototype;
};
dojo.lang._mixin=function(obj,_143){
var tobj={};
for(var x in _143){
if((typeof tobj[x]=="undefined")||(tobj[x]!=_143[x])){
obj[x]=_143[x];
}
}
if(dojo.render.html.ie&&(typeof (_143["toString"])=="function")&&(_143["toString"]!=obj["toString"])&&(_143["toString"]!=tobj["toString"])){
obj.toString=_143.toString;
}
return obj;
};
dojo.lang.mixin=function(obj,_147){
for(var i=1,l=arguments.length;i<l;i++){
dojo.lang._mixin(obj,arguments[i]);
}
return obj;
};
dojo.lang.extend=function(_14a,_14b){
for(var i=1,l=arguments.length;i<l;i++){
dojo.lang._mixin(_14a.prototype,arguments[i]);
}
return _14a;
};
dojo.inherits=dojo.lang.inherits;
dojo.mixin=dojo.lang.mixin;
dojo.extend=dojo.lang.extend;
dojo.lang.find=function(_14e,_14f,_150,_151){
if(!dojo.lang.isArrayLike(_14e)&&dojo.lang.isArrayLike(_14f)){
dojo.deprecated("dojo.lang.find(value, array)","use dojo.lang.find(array, value) instead","0.5");
var temp=_14e;
_14e=_14f;
_14f=temp;
}
var _153=dojo.lang.isString(_14e);
if(_153){
_14e=_14e.split("");
}
if(_151){
var step=-1;
var i=_14e.length-1;
var end=-1;
}else{
var step=1;
var i=0;
var end=_14e.length;
}
if(_150){
while(i!=end){
if(_14e[i]===_14f){
return i;
}
i+=step;
}
}else{
while(i!=end){
if(_14e[i]==_14f){
return i;
}
i+=step;
}
}
return -1;
};
dojo.lang.indexOf=dojo.lang.find;
dojo.lang.findLast=function(_157,_158,_159){
return dojo.lang.find(_157,_158,_159,true);
};
dojo.lang.lastIndexOf=dojo.lang.findLast;
dojo.lang.inArray=function(_15a,_15b){
return dojo.lang.find(_15a,_15b)>-1;
};
dojo.lang.isObject=function(it){
if(typeof it=="undefined"){
return false;
}
return (typeof it=="object"||it===null||dojo.lang.isArray(it)||dojo.lang.isFunction(it));
};
dojo.lang.isArray=function(it){
return (it&&it instanceof Array||typeof it=="array");
};
dojo.lang.isArrayLike=function(it){
if((!it)||(dojo.lang.isUndefined(it))){
return false;
}
if(dojo.lang.isString(it)){
return false;
}
if(dojo.lang.isFunction(it)){
return false;
}
if(dojo.lang.isArray(it)){
return true;
}
if((it.tagName)&&(it.tagName.toLowerCase()=="form")){
return false;
}
if(dojo.lang.isNumber(it.length)&&isFinite(it.length)){
return true;
}
return false;
};
dojo.lang.isFunction=function(it){
return (it instanceof Function||typeof it=="function");
};
(function(){
if((dojo.render.html.capable)&&(dojo.render.html["safari"])){
dojo.lang.isFunction=function(it){
if((typeof (it)=="function")&&(it=="[object NodeList]")){
return false;
}
return (it instanceof Function||typeof it=="function");
};
}
})();
dojo.lang.isString=function(it){
return (typeof it=="string"||it instanceof String);
};
dojo.lang.isAlien=function(it){
if(!it){
return false;
}
return !dojo.lang.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));
};
dojo.lang.isBoolean=function(it){
return (it instanceof Boolean||typeof it=="boolean");
};
dojo.lang.isNumber=function(it){
return (it instanceof Number||typeof it=="number");
};
dojo.lang.isUndefined=function(it){
return ((typeof (it)=="undefined")&&(it==undefined));
};
dojo.provide("dojo.lang.func");
dojo.lang.hitch=function(_166,_167){
var fcn=(dojo.lang.isString(_167)?_166[_167]:_167)||function(){
};
return function(){
return fcn.apply(_166,arguments);
};
};
dojo.lang.anonCtr=0;
dojo.lang.anon={};
dojo.lang.nameAnonFunc=function(_169,_16a,_16b){
var nso=(_16a||dojo.lang.anon);
if((_16b)||((dj_global["djConfig"])&&(djConfig["slowAnonFuncLookups"]==true))){
for(var x in nso){
try{
if(nso[x]===_169){
return x;
}
}
catch(e){
}
}
}
var ret="__"+dojo.lang.anonCtr++;
while(typeof nso[ret]!="undefined"){
ret="__"+dojo.lang.anonCtr++;
}
nso[ret]=_169;
return ret;
};
dojo.lang.forward=function(_16f){
return function(){
return this[_16f].apply(this,arguments);
};
};
dojo.lang.curry=function(_170,func){
var _172=[];
_170=_170||dj_global;
if(dojo.lang.isString(func)){
func=_170[func];
}
for(var x=2;x<arguments.length;x++){
_172.push(arguments[x]);
}
var _174=(func["__preJoinArity"]||func.length)-_172.length;
function gather(_175,_176,_177){
var _178=_177;
var _179=_176.slice(0);
for(var x=0;x<_175.length;x++){
_179.push(_175[x]);
}
_177=_177-_175.length;
if(_177<=0){
var res=func.apply(_170,_179);
_177=_178;
return res;
}else{
return function(){
return gather(arguments,_179,_177);
};
}
}
return gather([],_172,_174);
};
dojo.lang.curryArguments=function(_17c,func,args,_17f){
var _180=[];
var x=_17f||0;
for(x=_17f;x<args.length;x++){
_180.push(args[x]);
}
return dojo.lang.curry.apply(dojo.lang,[_17c,func].concat(_180));
};
dojo.lang.tryThese=function(){
for(var x=0;x<arguments.length;x++){
try{
if(typeof arguments[x]=="function"){
var ret=(arguments[x]());
if(ret){
return ret;
}
}
}
catch(e){
dojo.debug(e);
}
}
};
dojo.lang.delayThese=function(farr,cb,_186,_187){
if(!farr.length){
if(typeof _187=="function"){
_187();
}
return;
}
if((typeof _186=="undefined")&&(typeof cb=="number")){
_186=cb;
cb=function(){
};
}else{
if(!cb){
cb=function(){
};
if(!_186){
_186=0;
}
}
}
setTimeout(function(){
(farr.shift())();
cb();
dojo.lang.delayThese(farr,cb,_186,_187);
},_186);
};
dojo.provide("dojo.lang.extras");
dojo.lang.setTimeout=function(func,_189){
var _18a=window,_18b=2;
if(!dojo.lang.isFunction(func)){
_18a=func;
func=_189;
_189=arguments[2];
_18b++;
}
if(dojo.lang.isString(func)){
func=_18a[func];
}
var args=[];
for(var i=_18b;i<arguments.length;i++){
args.push(arguments[i]);
}
return dojo.global().setTimeout(function(){
func.apply(_18a,args);
},_189);
};
dojo.lang.clearTimeout=function(_18e){
dojo.global().clearTimeout(_18e);
};
dojo.lang.getNameInObj=function(ns,item){
if(!ns){
ns=dj_global;
}
for(var x in ns){
if(ns[x]===item){
return new String(x);
}
}
return null;
};
dojo.lang.shallowCopy=function(obj,deep){
var i,ret;
if(obj===null){
return null;
}
if(dojo.lang.isObject(obj)){
ret=new obj.constructor();
for(i in obj){
if(dojo.lang.isUndefined(ret[i])){
ret[i]=deep?dojo.lang.shallowCopy(obj[i],deep):obj[i];
}
}
}else{
if(dojo.lang.isArray(obj)){
ret=[];
for(i=0;i<obj.length;i++){
ret[i]=deep?dojo.lang.shallowCopy(obj[i],deep):obj[i];
}
}else{
ret=obj;
}
}
return ret;
};
dojo.lang.firstValued=function(){
for(var i=0;i<arguments.length;i++){
if(typeof arguments[i]!="undefined"){
return arguments[i];
}
}
return undefined;
};
dojo.lang.getObjPathValue=function(_197,_198,_199){
with(dojo.parseObjPath(_197,_198,_199)){
return dojo.evalProp(prop,obj,_199);
}
};
dojo.lang.setObjPathValue=function(_19a,_19b,_19c,_19d){
dojo.deprecated("dojo.lang.setObjPathValue","use dojo.parseObjPath and the '=' operator","0.6");
if(arguments.length<4){
_19d=true;
}
with(dojo.parseObjPath(_19a,_19c,_19d)){
if(obj&&(_19d||(prop in obj))){
obj[prop]=_19b;
}
}
};
dojo.provide("dojo.lang.declare");
dojo.lang.declare=function(_19e,_19f,init,_1a1){
if((dojo.lang.isFunction(_1a1))||((!_1a1)&&(!dojo.lang.isFunction(init)))){
var temp=_1a1;
_1a1=init;
init=temp;
}
var _1a3=[];
if(dojo.lang.isArray(_19f)){
_1a3=_19f;
_19f=_1a3.shift();
}
if(!init){
init=dojo.evalObjPath(_19e,false);
if((init)&&(!dojo.lang.isFunction(init))){
init=null;
}
}
var ctor=dojo.lang.declare._makeConstructor();
var scp=(_19f?_19f.prototype:null);
if(scp){
scp.prototyping=true;
ctor.prototype=new _19f();
scp.prototyping=false;
}
ctor.superclass=scp;
ctor.mixins=_1a3;
for(var i=0,l=_1a3.length;i<l;i++){
dojo.lang.extend(ctor,_1a3[i].prototype);
}
ctor.prototype.initializer=null;
ctor.prototype.declaredClass=_19e;
if(dojo.lang.isArray(_1a1)){
dojo.lang.extend.apply(dojo.lang,[ctor].concat(_1a1));
}else{
dojo.lang.extend(ctor,(_1a1)||{});
}
dojo.lang.extend(ctor,dojo.lang.declare._common);
ctor.prototype.constructor=ctor;
ctor.prototype.initializer=(ctor.prototype.initializer)||(init)||(function(){
});
var _1a8=dojo.parseObjPath(_19e,null,true);
_1a8.obj[_1a8.prop]=ctor;
return ctor;
};
dojo.lang.declare._makeConstructor=function(){
return function(){
var self=this._getPropContext();
var s=self.constructor.superclass;
if((s)&&(s.constructor)){
if(s.constructor==arguments.callee){
this._inherited("constructor",arguments);
}else{
this._contextMethod(s,"constructor",arguments);
}
}
var ms=(self.constructor.mixins)||([]);
for(var i=0,m;(m=ms[i]);i++){
(((m.prototype)&&(m.prototype.initializer))||(m)).apply(this,arguments);
}
if((!this.prototyping)&&(self.initializer)){
self.initializer.apply(this,arguments);
}
};
};
dojo.lang.declare._common={_getPropContext:function(){
return (this.___proto||this);
},_contextMethod:function(_1ae,_1af,args){
var _1b1,_1b2=this.___proto;
this.___proto=_1ae;
try{
_1b1=_1ae[_1af].apply(this,(args||[]));
}
catch(e){
throw e;
}
finally{
this.___proto=_1b2;
}
return _1b1;
},_inherited:function(prop,args){
var p=this._getPropContext();
do{
if((!p.constructor)||(!p.constructor.superclass)){
return;
}
p=p.constructor.superclass;
}while(!(prop in p));
return (dojo.lang.isFunction(p[prop])?this._contextMethod(p,prop,args):p[prop]);
},inherited:function(prop,args){
dojo.deprecated("'inherited' method is dangerous, do not up-call! 'inherited' is slated for removal in 0.5; name your super class (or use superclass property) instead.","0.5");
this._inherited(prop,args);
}};
dojo.declare=dojo.lang.declare;
dojo.provide("dojo.dnd.DragAndDrop");
dojo.declare("dojo.dnd.DragSource",null,{type:"",onDragEnd:function(evt){
},onDragStart:function(evt){
},onSelected:function(evt){
},unregister:function(){
dojo.dnd.dragManager.unregisterDragSource(this);
},reregister:function(){
dojo.dnd.dragManager.registerDragSource(this);
}});
dojo.declare("dojo.dnd.DragObject",null,{type:"",register:function(){
var dm=dojo.dnd.dragManager;
if(dm["registerDragObject"]){
dm.registerDragObject(this);
}
},onDragStart:function(evt){
},onDragMove:function(evt){
},onDragOver:function(evt){
},onDragOut:function(evt){
},onDragEnd:function(evt){
},onDragLeave:dojo.lang.forward("onDragOut"),onDragEnter:dojo.lang.forward("onDragOver"),ondragout:dojo.lang.forward("onDragOut"),ondragover:dojo.lang.forward("onDragOver")});
dojo.declare("dojo.dnd.DropTarget",null,{acceptsType:function(type){
if(!dojo.lang.inArray(this.acceptedTypes,"*")){
if(!dojo.lang.inArray(this.acceptedTypes,type)){
return false;
}
}
return true;
},accepts:function(_1c2){
if(!dojo.lang.inArray(this.acceptedTypes,"*")){
for(var i=0;i<_1c2.length;i++){
if(!dojo.lang.inArray(this.acceptedTypes,_1c2[i].type)){
return false;
}
}
}
return true;
},unregister:function(){
dojo.dnd.dragManager.unregisterDropTarget(this);
},onDragOver:function(evt){
},onDragOut:function(evt){
},onDragMove:function(evt){
},onDropStart:function(evt){
},onDrop:function(evt){
},onDropEnd:function(){
}},function(){
this.acceptedTypes=[];
});
dojo.dnd.DragEvent=function(){
this.dragSource=null;
this.dragObject=null;
this.target=null;
this.eventStatus="success";
};
dojo.declare("dojo.dnd.DragManager",null,{selectedSources:[],dragObjects:[],dragSources:[],registerDragSource:function(_1c9){
},dropTargets:[],registerDropTarget:function(_1ca){
},lastDragTarget:null,currentDragTarget:null,onKeyDown:function(){
},onMouseOut:function(){
},onMouseMove:function(){
},onMouseUp:function(){
}});
dojo.provide("dojo.lang.array");
dojo.lang.mixin(dojo.lang,{has:function(obj,name){
try{
return typeof obj[name]!="undefined";
}
catch(e){
return false;
}
},isEmpty:function(obj){
if(dojo.lang.isObject(obj)){
var tmp={};
var _1cf=0;
for(var x in obj){
if(obj[x]&&(!tmp[x])){
_1cf++;
break;
}
}
return _1cf==0;
}else{
if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){
return obj.length==0;
}
}
},map:function(arr,obj,_1d3){
var _1d4=dojo.lang.isString(arr);
if(_1d4){
arr=arr.split("");
}
if(dojo.lang.isFunction(obj)&&(!_1d3)){
_1d3=obj;
obj=dj_global;
}else{
if(dojo.lang.isFunction(obj)&&_1d3){
var _1d5=obj;
obj=_1d3;
_1d3=_1d5;
}
}
if(Array.map){
var _1d6=Array.map(arr,_1d3,obj);
}else{
var _1d6=[];
for(var i=0;i<arr.length;++i){
_1d6.push(_1d3.call(obj,arr[i]));
}
}
if(_1d4){
return _1d6.join("");
}else{
return _1d6;
}
},reduce:function(arr,_1d9,obj,_1db){
var _1dc=_1d9;
if(arguments.length==1){
dojo.debug("dojo.lang.reduce called with too few arguments!");
return false;
}else{
if(arguments.length==2){
_1db=_1d9;
_1dc=arr.shift();
}else{
if(arguments.lenght==3){
if(dojo.lang.isFunction(obj)){
_1db=obj;
obj=null;
}
}else{
if(dojo.lang.isFunction(obj)){
var tmp=_1db;
_1db=obj;
obj=tmp;
}
}
}
}
var ob=obj?obj:dj_global;
dojo.lang.map(arr,function(val){
_1dc=_1db.call(ob,_1dc,val);
});
return _1dc;
},forEach:function(_1e0,_1e1,_1e2){
if(dojo.lang.isString(_1e0)){
_1e0=_1e0.split("");
}
if(Array.forEach){
Array.forEach(_1e0,_1e1,_1e2);
}else{
if(!_1e2){
_1e2=dj_global;
}
for(var i=0,l=_1e0.length;i<l;i++){
_1e1.call(_1e2,_1e0[i],i,_1e0);
}
}
},_everyOrSome:function(_1e5,arr,_1e7,_1e8){
if(dojo.lang.isString(arr)){
arr=arr.split("");
}
if(Array.every){
return Array[_1e5?"every":"some"](arr,_1e7,_1e8);
}else{
if(!_1e8){
_1e8=dj_global;
}
for(var i=0,l=arr.length;i<l;i++){
var _1eb=_1e7.call(_1e8,arr[i],i,arr);
if(_1e5&&!_1eb){
return false;
}else{
if((!_1e5)&&(_1eb)){
return true;
}
}
}
return Boolean(_1e5);
}
},every:function(arr,_1ed,_1ee){
return this._everyOrSome(true,arr,_1ed,_1ee);
},some:function(arr,_1f0,_1f1){
return this._everyOrSome(false,arr,_1f0,_1f1);
},filter:function(arr,_1f3,_1f4){
var _1f5=dojo.lang.isString(arr);
if(_1f5){
arr=arr.split("");
}
var _1f6;
if(Array.filter){
_1f6=Array.filter(arr,_1f3,_1f4);
}else{
if(!_1f4){
if(arguments.length>=3){
dojo.raise("thisObject doesn't exist!");
}
_1f4=dj_global;
}
_1f6=[];
for(var i=0;i<arr.length;i++){
if(_1f3.call(_1f4,arr[i],i,arr)){
_1f6.push(arr[i]);
}
}
}
if(_1f5){
return _1f6.join("");
}else{
return _1f6;
}
},unnest:function(){
var out=[];
for(var i=0;i<arguments.length;i++){
if(dojo.lang.isArrayLike(arguments[i])){
var add=dojo.lang.unnest.apply(this,arguments[i]);
out=out.concat(add);
}else{
out.push(arguments[i]);
}
}
return out;
},toArray:function(_1fb,_1fc){
var _1fd=[];
for(var i=_1fc||0;i<_1fb.length;i++){
_1fd.push(_1fb[i]);
}
return _1fd;
}});
dojo.provide("dojo.event.common");
dojo.event=new function(){
this._canTimeout=dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]);
function interpolateArgs(args,_200){
var dl=dojo.lang;
var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(args.length>2)?args[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false};
switch(args.length){
case 0:
return;
case 1:
return;
case 2:
ao.srcFunc=args[0];
ao.adviceFunc=args[1];
break;
case 3:
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=args[0];
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
}else{
if((dl.isString(args[1]))&&(dl.isString(args[2]))){
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
}else{
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){
ao.adviceType="after";
ao.srcObj=args[0];
ao.srcFunc=args[1];
var _203=dl.nameAnonFunc(args[2],ao.adviceObj,_200);
ao.adviceFunc=_203;
}else{
if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=dj_global;
var _203=dl.nameAnonFunc(args[0],ao.srcObj,_200);
ao.srcFunc=_203;
ao.adviceObj=args[1];
ao.adviceFunc=args[2];
}
}
}
}
break;
case 4:
if((dl.isObject(args[0]))&&(dl.isObject(args[2]))){
ao.adviceType="after";
ao.srcObj=args[0];
ao.srcFunc=args[1];
ao.adviceObj=args[2];
ao.adviceFunc=args[3];
}else{
if((dl.isString(args[0]))&&(dl.isString(args[1]))&&(dl.isObject(args[2]))){
ao.adviceType=args[0];
ao.srcObj=dj_global;
ao.srcFunc=args[1];
ao.adviceObj=args[2];
ao.adviceFunc=args[3];
}else{
if((dl.isString(args[0]))&&(dl.isFunction(args[1]))&&(dl.isObject(args[2]))){
ao.adviceType=args[0];
ao.srcObj=dj_global;
var _203=dl.nameAnonFunc(args[1],dj_global,_200);
ao.srcFunc=_203;
ao.adviceObj=args[2];
ao.adviceFunc=args[3];
}else{
if((dl.isString(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))&&(dl.isFunction(args[3]))){
ao.srcObj=args[1];
ao.srcFunc=args[2];
var _203=dl.nameAnonFunc(args[3],dj_global,_200);
ao.adviceObj=dj_global;
ao.adviceFunc=_203;
}else{
if(dl.isObject(args[1])){
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=dj_global;
ao.adviceFunc=args[3];
}else{
if(dl.isObject(args[2])){
ao.srcObj=dj_global;
ao.srcFunc=args[1];
ao.adviceObj=args[2];
ao.adviceFunc=args[3];
}else{
ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global;
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
ao.aroundFunc=args[3];
}
}
}
}
}
}
break;
case 6:
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=args[3];
ao.adviceFunc=args[4];
ao.aroundFunc=args[5];
ao.aroundObj=dj_global;
break;
default:
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=args[3];
ao.adviceFunc=args[4];
ao.aroundObj=args[5];
ao.aroundFunc=args[6];
ao.once=args[7];
ao.delay=args[8];
ao.rate=args[9];
ao.adviceMsg=args[10];
break;
}
if(dl.isFunction(ao.aroundFunc)){
var _203=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,_200);
ao.aroundFunc=_203;
}
if(dl.isFunction(ao.srcFunc)){
ao.srcFunc=dl.getNameInObj(ao.srcObj,ao.srcFunc);
}
if(dl.isFunction(ao.adviceFunc)){
ao.adviceFunc=dl.getNameInObj(ao.adviceObj,ao.adviceFunc);
}
if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){
ao.aroundFunc=dl.getNameInObj(ao.aroundObj,ao.aroundFunc);
}
if(!ao.srcObj){
dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc);
}
if(!ao.adviceObj){
dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc);
}
if(!ao.adviceFunc){
dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc);
dojo.debugShallow(ao);
}
return ao;
}
this.connect=function(){
if(arguments.length==1){
var ao=arguments[0];
}else{
var ao=interpolateArgs(arguments,true);
}
if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){
if(dojo.render.html.ie){
ao.srcFunc="onkeydown";
this.connect(ao);
}
ao.srcFunc="onkeypress";
}
if(dojo.lang.isArray(ao.srcObj)&&ao.srcObj!=""){
var _205={};
for(var x in ao){
_205[x]=ao[x];
}
var mjps=[];
dojo.lang.forEach(ao.srcObj,function(src){
if((dojo.render.html.capable)&&(dojo.lang.isString(src))){
src=dojo.byId(src);
}
_205.srcObj=src;
mjps.push(dojo.event.connect.call(dojo.event,_205));
});
return mjps;
}
var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc);
if(ao.adviceFunc){
var mjp2=dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj,ao.adviceFunc);
}
mjp.kwAddAdvice(ao);
return mjp;
};
this.log=function(a1,a2){
var _20d;
if((arguments.length==1)&&(typeof a1=="object")){
_20d=a1;
}else{
_20d={srcObj:a1,srcFunc:a2};
}
_20d.adviceFunc=function(){
var _20e=[];
for(var x=0;x<arguments.length;x++){
_20e.push(arguments[x]);
}
dojo.debug("("+_20d.srcObj+")."+_20d.srcFunc,":",_20e.join(", "));
};
this.kwConnect(_20d);
};
this.connectBefore=function(){
var args=["before"];
for(var i=0;i<arguments.length;i++){
args.push(arguments[i]);
}
return this.connect.apply(this,args);
};
this.connectAround=function(){
var args=["around"];
for(var i=0;i<arguments.length;i++){
args.push(arguments[i]);
}
return this.connect.apply(this,args);
};
this.connectOnce=function(){
var ao=interpolateArgs(arguments,true);
ao.once=true;
return this.connect(ao);
};
this._kwConnectImpl=function(_215,_216){
var fn=(_216)?"disconnect":"connect";
if(typeof _215["srcFunc"]=="function"){
_215.srcObj=_215["srcObj"]||dj_global;
var _218=dojo.lang.nameAnonFunc(_215.srcFunc,_215.srcObj,true);
_215.srcFunc=_218;
}
if(typeof _215["adviceFunc"]=="function"){
_215.adviceObj=_215["adviceObj"]||dj_global;
var _218=dojo.lang.nameAnonFunc(_215.adviceFunc,_215.adviceObj,true);
_215.adviceFunc=_218;
}
_215.srcObj=_215["srcObj"]||dj_global;
_215.adviceObj=_215["adviceObj"]||_215["targetObj"]||dj_global;
_215.adviceFunc=_215["adviceFunc"]||_215["targetFunc"];
return dojo.event[fn](_215);
};
this.kwConnect=function(_219){
return this._kwConnectImpl(_219,false);
};
this.disconnect=function(){
if(arguments.length==1){
var ao=arguments[0];
}else{
var ao=interpolateArgs(arguments,true);
}
if(!ao.adviceFunc){
return;
}
if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){
if(dojo.render.html.ie){
ao.srcFunc="onkeydown";
this.disconnect(ao);
}
ao.srcFunc="onkeypress";
}
if(!ao.srcObj[ao.srcFunc]){
return null;
}
var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc,true);
mjp.removeAdvice(ao.adviceObj,ao.adviceFunc,ao.adviceType,ao.once);
return mjp;
};
this.kwDisconnect=function(_21c){
return this._kwConnectImpl(_21c,true);
};
};
dojo.event.MethodInvocation=function(_21d,obj,args){
this.jp_=_21d;
this.object=obj;
this.args=[];
for(var x=0;x<args.length;x++){
this.args[x]=args[x];
}
this.around_index=-1;
};
dojo.event.MethodInvocation.prototype.proceed=function(){
this.around_index++;
if(this.around_index>=this.jp_.around.length){
return this.jp_.object[this.jp_.methodname].apply(this.jp_.object,this.args);
}else{
var ti=this.jp_.around[this.around_index];
var mobj=ti[0]||dj_global;
var meth=ti[1];
return mobj[meth].call(mobj,this);
}
};
dojo.event.MethodJoinPoint=function(obj,_225){
this.object=obj||dj_global;
this.methodname=_225;
this.methodfunc=this.object[_225];
this.squelch=false;
};
dojo.event.MethodJoinPoint.getForMethod=function(obj,_227){
if(!obj){
obj=dj_global;
}
if(!obj[_227]){
obj[_227]=function(){
};
if(!obj[_227]){
dojo.raise("Cannot set do-nothing method on that object "+_227);
}
}else{
if((!dojo.lang.isFunction(obj[_227]))&&(!dojo.lang.isAlien(obj[_227]))){
return null;
}
}
var _228=_227+"$joinpoint";
var _229=_227+"$joinpoint$method";
var _22a=obj[_228];
if(!_22a){
var _22b=false;
if(dojo.event["browser"]){
if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){
_22b=true;
dojo.event.browser.addClobberNodeAttrs(obj,[_228,_229,_227]);
}
}
var _22c=obj[_227].length;
obj[_229]=obj[_227];
_22a=obj[_228]=new dojo.event.MethodJoinPoint(obj,_229);
obj[_227]=function(){
var args=[];
if((_22b)&&(!arguments.length)){
var evt=null;
try{
if(obj.ownerDocument){
evt=obj.ownerDocument.parentWindow.event;
}else{
if(obj.documentElement){
evt=obj.documentElement.ownerDocument.parentWindow.event;
}else{
if(obj.event){
evt=obj.event;
}else{
evt=window.event;
}
}
}
}
catch(e){
evt=window.event;
}
if(evt){
args.push(dojo.event.browser.fixEvent(evt,this));
}
}else{
for(var x=0;x<arguments.length;x++){
if((x==0)&&(_22b)&&(dojo.event.browser.isEvent(arguments[x]))){
args.push(dojo.event.browser.fixEvent(arguments[x],this));
}else{
args.push(arguments[x]);
}
}
}
return _22a.run.apply(_22a,args);
};
obj[_227].__preJoinArity=_22c;
}
return _22a;
};
dojo.lang.extend(dojo.event.MethodJoinPoint,{unintercept:function(){
this.object[this.methodname]=this.methodfunc;
this.before=[];
this.after=[];
this.around=[];
},disconnect:dojo.lang.forward("unintercept"),run:function(){
var obj=this.object||dj_global;
var args=arguments;
var _232=[];
for(var x=0;x<args.length;x++){
_232[x]=args[x];
}
var _234=function(marr){
if(!marr){
dojo.debug("Null argument to unrollAdvice()");
return;
}
var _236=marr[0]||dj_global;
var _237=marr[1];
if(!_236[_237]){
dojo.raise("function \""+_237+"\" does not exist on \""+_236+"\"");
}
var _238=marr[2]||dj_global;
var _239=marr[3];
var msg=marr[6];
var _23b;
var to={args:[],jp_:this,object:obj,proceed:function(){
return _236[_237].apply(_236,to.args);
}};
to.args=_232;
var _23d=parseInt(marr[4]);
var _23e=((!isNaN(_23d))&&(marr[4]!==null)&&(typeof marr[4]!="undefined"));
if(marr[5]){
var rate=parseInt(marr[5]);
var cur=new Date();
var _241=false;
if((marr["last"])&&((cur-marr.last)<=rate)){
if(dojo.event._canTimeout){
if(marr["delayTimer"]){
clearTimeout(marr.delayTimer);
}
var tod=parseInt(rate*2);
var mcpy=dojo.lang.shallowCopy(marr);
marr.delayTimer=setTimeout(function(){
mcpy[5]=0;
_234(mcpy);
},tod);
}
return;
}else{
marr.last=cur;
}
}
if(_239){
_238[_239].call(_238,to);
}else{
if((_23e)&&((dojo.render.html)||(dojo.render.svg))){
dj_global["setTimeout"](function(){
if(msg){
_236[_237].call(_236,to);
}else{
_236[_237].apply(_236,args);
}
},_23d);
}else{
if(msg){
_236[_237].call(_236,to);
}else{
_236[_237].apply(_236,args);
}
}
}
};
var _244=function(){
if(this.squelch){
try{
return _234.apply(this,arguments);
}
catch(e){
dojo.debug(e);
}
}else{
return _234.apply(this,arguments);
}
};
if((this["before"])&&(this.before.length>0)){
dojo.lang.forEach(this.before.concat(new Array()),_244);
}
var _245;
try{
if((this["around"])&&(this.around.length>0)){
var mi=new dojo.event.MethodInvocation(this,obj,args);
_245=mi.proceed();
}else{
if(this.methodfunc){
_245=this.object[this.methodname].apply(this.object,args);
}
}
}
catch(e){
if(!this.squelch){
dojo.debug(e,"when calling",this.methodname,"on",this.object,"with arguments",args);
dojo.raise(e);
}
}
if((this["after"])&&(this.after.length>0)){
dojo.lang.forEach(this.after.concat(new Array()),_244);
}
return (this.methodfunc)?_245:null;
},getArr:function(kind){
var type="after";
if((typeof kind=="string")&&(kind.indexOf("before")!=-1)){
type="before";
}else{
if(kind=="around"){
type="around";
}
}
if(!this[type]){
this[type]=[];
}
return this[type];
},kwAddAdvice:function(args){
this.addAdvice(args["adviceObj"],args["adviceFunc"],args["aroundObj"],args["aroundFunc"],args["adviceType"],args["precedence"],args["once"],args["delay"],args["rate"],args["adviceMsg"]);
},addAdvice:function(_24a,_24b,_24c,_24d,_24e,_24f,once,_251,rate,_253){
var arr=this.getArr(_24e);
if(!arr){
dojo.raise("bad this: "+this);
}
var ao=[_24a,_24b,_24c,_24d,_251,rate,_253];
if(once){
if(this.hasAdvice(_24a,_24b,_24e,arr)>=0){
return;
}
}
if(_24f=="first"){
arr.unshift(ao);
}else{
arr.push(ao);
}
},hasAdvice:function(_256,_257,_258,arr){
if(!arr){
arr=this.getArr(_258);
}
var ind=-1;
for(var x=0;x<arr.length;x++){
var aao=(typeof _257=="object")?(new String(_257)).toString():_257;
var a1o=(typeof arr[x][1]=="object")?(new String(arr[x][1])).toString():arr[x][1];
if((arr[x][0]==_256)&&(a1o==aao)){
ind=x;
}
}
return ind;
},removeAdvice:function(_25e,_25f,_260,once){
var arr=this.getArr(_260);
var ind=this.hasAdvice(_25e,_25f,_260,arr);
if(ind==-1){
return false;
}
while(ind!=-1){
arr.splice(ind,1);
if(once){
break;
}
ind=this.hasAdvice(_25e,_25f,_260,arr);
}
return true;
}});
dojo.provide("dojo.event.topic");
dojo.event.topic=new function(){
this.topics={};
this.getTopic=function(_264){
if(!this.topics[_264]){
this.topics[_264]=new this.TopicImpl(_264);
}
return this.topics[_264];
};
this.registerPublisher=function(_265,obj,_267){
var _265=this.getTopic(_265);
_265.registerPublisher(obj,_267);
};
this.subscribe=function(_268,obj,_26a){
var _268=this.getTopic(_268);
_268.subscribe(obj,_26a);
};
this.unsubscribe=function(_26b,obj,_26d){
var _26b=this.getTopic(_26b);
_26b.unsubscribe(obj,_26d);
};
this.destroy=function(_26e){
this.getTopic(_26e).destroy();
delete this.topics[_26e];
};
this.publishApply=function(_26f,args){
var _26f=this.getTopic(_26f);
_26f.sendMessage.apply(_26f,args);
};
this.publish=function(_271,_272){
var _271=this.getTopic(_271);
var args=[];
for(var x=1;x<arguments.length;x++){
args.push(arguments[x]);
}
_271.sendMessage.apply(_271,args);
};
};
dojo.event.topic.TopicImpl=function(_275){
this.topicName=_275;
this.subscribe=function(_276,_277){
var tf=_277||_276;
var to=(!_277)?dj_global:_276;
return dojo.event.kwConnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
};
this.unsubscribe=function(_27a,_27b){
var tf=(!_27b)?_27a:_27b;
var to=(!_27b)?null:_27a;
return dojo.event.kwDisconnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
};
this._getJoinPoint=function(){
return dojo.event.MethodJoinPoint.getForMethod(this,"sendMessage");
};
this.setSquelch=function(_27e){
this._getJoinPoint().squelch=_27e;
};
this.destroy=function(){
this._getJoinPoint().disconnect();
};
this.registerPublisher=function(_27f,_280){
dojo.event.connect(_27f,_280,this,"sendMessage");
};
this.sendMessage=function(_281){
};
};
dojo.provide("dojo.event.browser");
dojo._ie_clobber=new function(){
this.clobberNodes=[];
function nukeProp(node,prop){
try{
node[prop]=null;
}
catch(e){
}
try{
delete node[prop];
}
catch(e){
}
try{
node.removeAttribute(prop);
}
catch(e){
}
}
this.clobber=function(_284){
var na;
var tna;
if(_284){
tna=_284.all||_284.getElementsByTagName("*");
na=[_284];
for(var x=0;x<tna.length;x++){
if(tna[x]["__doClobber__"]){
na.push(tna[x]);
}
}
}else{
try{
window.onload=null;
}
catch(e){
}
na=(this.clobberNodes.length)?this.clobberNodes:document.all;
}
tna=null;
var _288={};
for(var i=na.length-1;i>=0;i=i-1){
var el=na[i];
try{
if(el&&el["__clobberAttrs__"]){
for(var j=0;j<el.__clobberAttrs__.length;j++){
nukeProp(el,el.__clobberAttrs__[j]);
}
nukeProp(el,"__clobberAttrs__");
nukeProp(el,"__doClobber__");
}
}
catch(e){
}
}
na=null;
};
};
if(dojo.render.html.ie){
dojo.addOnUnload(function(){
dojo._ie_clobber.clobber();
try{
if((dojo["widget"])&&(dojo.widget["manager"])){
dojo.widget.manager.destroyAll();
}
}
catch(e){
}
if(dojo.widget){
for(var name in dojo.widget._templateCache){
if(dojo.widget._templateCache[name].node){
dojo.dom.destroyNode(dojo.widget._templateCache[name].node);
dojo.widget._templateCache[name].node=null;
delete dojo.widget._templateCache[name].node;
}
}
}
try{
window.onload=null;
}
catch(e){
}
try{
window.onunload=null;
}
catch(e){
}
dojo._ie_clobber.clobberNodes=[];
});
}
dojo.event.browser=new function(){
var _28d=0;
this.normalizedEventName=function(_28e){
switch(_28e){
case "CheckboxStateChange":
case "DOMAttrModified":
case "DOMMenuItemActive":
case "DOMMenuItemInactive":
case "DOMMouseScroll":
case "DOMNodeInserted":
case "DOMNodeRemoved":
case "RadioStateChange":
return _28e;
break;
default:
return _28e.toLowerCase();
break;
}
};
this.clean=function(node){
if(dojo.render.html.ie){
dojo._ie_clobber.clobber(node);
}
};
this.addClobberNode=function(node){
if(!dojo.render.html.ie){
return;
}
if(!node["__doClobber__"]){
node.__doClobber__=true;
dojo._ie_clobber.clobberNodes.push(node);
node.__clobberAttrs__=[];
}
};
this.addClobberNodeAttrs=function(node,_292){
if(!dojo.render.html.ie){
return;
}
this.addClobberNode(node);
for(var x=0;x<_292.length;x++){
node.__clobberAttrs__.push(_292[x]);
}
};
this.removeListener=function(node,_295,fp,_297){
if(!_297){
var _297=false;
}
_295=dojo.event.browser.normalizedEventName(_295);
if((_295=="onkey")||(_295=="key")){
if(dojo.render.html.ie){
this.removeListener(node,"onkeydown",fp,_297);
}
_295="onkeypress";
}
if(_295.substr(0,2)=="on"){
_295=_295.substr(2);
}
if(node.removeEventListener){
node.removeEventListener(_295,fp,_297);
}
};
this.addListener=function(node,_299,fp,_29b,_29c){
if(!node){
return;
}
if(!_29b){
var _29b=false;
}
_299=dojo.event.browser.normalizedEventName(_299);
if((_299=="onkey")||(_299=="key")){
if(dojo.render.html.ie){
this.addListener(node,"onkeydown",fp,_29b,_29c);
}
_299="onkeypress";
}
if(_299.substr(0,2)!="on"){
_299="on"+_299;
}
if(!_29c){
var _29d=function(evt){
if(!evt){
evt=window.event;
}
var ret=fp(dojo.event.browser.fixEvent(evt,this));
if(_29b){
dojo.event.browser.stopEvent(evt);
}
return ret;
};
}else{
_29d=fp;
}
if(node.addEventListener){
node.addEventListener(_299.substr(2),_29d,_29b);
return _29d;
}else{
if(typeof node[_299]=="function"){
var _2a0=node[_299];
node[_299]=function(e){
_2a0(e);
return _29d(e);
};
}else{
node[_299]=_29d;
}
if(dojo.render.html.ie){
this.addClobberNodeAttrs(node,[_299]);
}
return _29d;
}
};
this.isEvent=function(obj){
return (typeof obj!="undefined")&&(obj)&&(typeof Event!="undefined")&&(obj.eventPhase);
};
this.currentEvent=null;
this.callListener=function(_2a3,_2a4){
if(typeof _2a3!="function"){
dojo.raise("listener not a function: "+_2a3);
}
dojo.event.browser.currentEvent.currentTarget=_2a4;
return _2a3.call(_2a4,dojo.event.browser.currentEvent);
};
this._stopPropagation=function(){
dojo.event.browser.currentEvent.cancelBubble=true;
};
this._preventDefault=function(){
dojo.event.browser.currentEvent.returnValue=false;
};
this.keys={KEY_BACKSPACE:8,KEY_TAB:9,KEY_CLEAR:12,KEY_ENTER:13,KEY_SHIFT:16,KEY_CTRL:17,KEY_ALT:18,KEY_PAUSE:19,KEY_CAPS_LOCK:20,KEY_ESCAPE:27,KEY_SPACE:32,KEY_PAGE_UP:33,KEY_PAGE_DOWN:34,KEY_END:35,KEY_HOME:36,KEY_LEFT_ARROW:37,KEY_UP_ARROW:38,KEY_RIGHT_ARROW:39,KEY_DOWN_ARROW:40,KEY_INSERT:45,KEY_DELETE:46,KEY_HELP:47,KEY_LEFT_WINDOW:91,KEY_RIGHT_WINDOW:92,KEY_SELECT:93,KEY_NUMPAD_0:96,KEY_NUMPAD_1:97,KEY_NUMPAD_2:98,KEY_NUMPAD_3:99,KEY_NUMPAD_4:100,KEY_NUMPAD_5:101,KEY_NUMPAD_6:102,KEY_NUMPAD_7:103,KEY_NUMPAD_8:104,KEY_NUMPAD_9:105,KEY_NUMPAD_MULTIPLY:106,KEY_NUMPAD_PLUS:107,KEY_NUMPAD_ENTER:108,KEY_NUMPAD_MINUS:109,KEY_NUMPAD_PERIOD:110,KEY_NUMPAD_DIVIDE:111,KEY_F1:112,KEY_F2:113,KEY_F3:114,KEY_F4:115,KEY_F5:116,KEY_F6:117,KEY_F7:118,KEY_F8:119,KEY_F9:120,KEY_F10:121,KEY_F11:122,KEY_F12:123,KEY_F13:124,KEY_F14:125,KEY_F15:126,KEY_NUM_LOCK:144,KEY_SCROLL_LOCK:145};
this.revKeys=[];
for(var key in this.keys){
this.revKeys[this.keys[key]]=key;
}
this.fixEvent=function(evt,_2a7){
if(!evt){
if(window["event"]){
evt=window.event;
}
}
if((evt["type"])&&(evt["type"].indexOf("key")==0)){
evt.keys=this.revKeys;
for(var key in this.keys){
evt[key]=this.keys[key];
}
if(evt["type"]=="keydown"&&dojo.render.html.ie){
switch(evt.keyCode){
case evt.KEY_SHIFT:
case evt.KEY_CTRL:
case evt.KEY_ALT:
case evt.KEY_CAPS_LOCK:
case evt.KEY_LEFT_WINDOW:
case evt.KEY_RIGHT_WINDOW:
case evt.KEY_SELECT:
case evt.KEY_NUM_LOCK:
case evt.KEY_SCROLL_LOCK:
case evt.KEY_NUMPAD_0:
case evt.KEY_NUMPAD_1:
case evt.KEY_NUMPAD_2:
case evt.KEY_NUMPAD_3:
case evt.KEY_NUMPAD_4:
case evt.KEY_NUMPAD_5:
case evt.KEY_NUMPAD_6:
case evt.KEY_NUMPAD_7:
case evt.KEY_NUMPAD_8:
case evt.KEY_NUMPAD_9:
case evt.KEY_NUMPAD_PERIOD:
break;
case evt.KEY_NUMPAD_MULTIPLY:
case evt.KEY_NUMPAD_PLUS:
case evt.KEY_NUMPAD_ENTER:
case evt.KEY_NUMPAD_MINUS:
case evt.KEY_NUMPAD_DIVIDE:
break;
case evt.KEY_PAUSE:
case evt.KEY_TAB:
case evt.KEY_BACKSPACE:
case evt.KEY_ENTER:
case evt.KEY_ESCAPE:
case evt.KEY_PAGE_UP:
case evt.KEY_PAGE_DOWN:
case evt.KEY_END:
case evt.KEY_HOME:
case evt.KEY_LEFT_ARROW:
case evt.KEY_UP_ARROW:
case evt.KEY_RIGHT_ARROW:
case evt.KEY_DOWN_ARROW:
case evt.KEY_INSERT:
case evt.KEY_DELETE:
case evt.KEY_F1:
case evt.KEY_F2:
case evt.KEY_F3:
case evt.KEY_F4:
case evt.KEY_F5:
case evt.KEY_F6:
case evt.KEY_F7:
case evt.KEY_F8:
case evt.KEY_F9:
case evt.KEY_F10:
case evt.KEY_F11:
case evt.KEY_F12:
case evt.KEY_F12:
case evt.KEY_F13:
case evt.KEY_F14:
case evt.KEY_F15:
case evt.KEY_CLEAR:
case evt.KEY_HELP:
evt.key=evt.keyCode;
break;
default:
if(evt.ctrlKey||evt.altKey){
var _2a9=evt.keyCode;
if(_2a9>=65&&_2a9<=90&&evt.shiftKey==false){
_2a9+=32;
}
if(_2a9>=1&&_2a9<=26&&evt.ctrlKey){
_2a9+=96;
}
evt.key=String.fromCharCode(_2a9);
}
}
}else{
if(evt["type"]=="keypress"){
if(dojo.render.html.opera){
if(evt.which==0){
evt.key=evt.keyCode;
}else{
if(evt.which>0){
switch(evt.which){
case evt.KEY_SHIFT:
case evt.KEY_CTRL:
case evt.KEY_ALT:
case evt.KEY_CAPS_LOCK:
case evt.KEY_NUM_LOCK:
case evt.KEY_SCROLL_LOCK:
break;
case evt.KEY_PAUSE:
case evt.KEY_TAB:
case evt.KEY_BACKSPACE:
case evt.KEY_ENTER:
case evt.KEY_ESCAPE:
evt.key=evt.which;
break;
default:
var _2a9=evt.which;
if((evt.ctrlKey||evt.altKey||evt.metaKey)&&(evt.which>=65&&evt.which<=90&&evt.shiftKey==false)){
_2a9+=32;
}
evt.key=String.fromCharCode(_2a9);
}
}
}
}else{
if(dojo.render.html.ie){
if(!evt.ctrlKey&&!evt.altKey&&evt.keyCode>=evt.KEY_SPACE){
evt.key=String.fromCharCode(evt.keyCode);
}
}else{
if(dojo.render.html.safari){
switch(evt.keyCode){
case 25:
evt.key=evt.KEY_TAB;
evt.shift=true;
break;
case 63232:
evt.key=evt.KEY_UP_ARROW;
break;
case 63233:
evt.key=evt.KEY_DOWN_ARROW;
break;
case 63234:
evt.key=evt.KEY_LEFT_ARROW;
break;
case 63235:
evt.key=evt.KEY_RIGHT_ARROW;
break;
case 63236:
evt.key=evt.KEY_F1;
break;
case 63237:
evt.key=evt.KEY_F2;
break;
case 63238:
evt.key=evt.KEY_F3;
break;
case 63239:
evt.key=evt.KEY_F4;
break;
case 63240:
evt.key=evt.KEY_F5;
break;
case 63241:
evt.key=evt.KEY_F6;
break;
case 63242:
evt.key=evt.KEY_F7;
break;
case 63243:
evt.key=evt.KEY_F8;
break;
case 63244:
evt.key=evt.KEY_F9;
break;
case 63245:
evt.key=evt.KEY_F10;
break;
case 63246:
evt.key=evt.KEY_F11;
break;
case 63247:
evt.key=evt.KEY_F12;
break;
case 63250:
evt.key=evt.KEY_PAUSE;
break;
case 63272:
evt.key=evt.KEY_DELETE;
break;
case 63273:
evt.key=evt.KEY_HOME;
break;
case 63275:
evt.key=evt.KEY_END;
break;
case 63276:
evt.key=evt.KEY_PAGE_UP;
break;
case 63277:
evt.key=evt.KEY_PAGE_DOWN;
break;
case 63302:
evt.key=evt.KEY_INSERT;
break;
case 63248:
case 63249:
case 63289:
break;
default:
evt.key=evt.charCode>=evt.KEY_SPACE?String.fromCharCode(evt.charCode):evt.keyCode;
}
}else{
evt.key=evt.charCode>0?String.fromCharCode(evt.charCode):evt.keyCode;
}
}
}
}
}
}
if(dojo.render.html.ie){
if(!evt.target){
evt.target=evt.srcElement;
}
if(!evt.currentTarget){
evt.currentTarget=(_2a7?_2a7:evt.srcElement);
}
if(!evt.layerX){
evt.layerX=evt.offsetX;
}
if(!evt.layerY){
evt.layerY=evt.offsetY;
}
var doc=(evt.srcElement&&evt.srcElement.ownerDocument)?evt.srcElement.ownerDocument:document;
var _2ab=((dojo.render.html.ie55)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;
if(!evt.pageX){
evt.pageX=evt.clientX+(_2ab.scrollLeft||0);
}
if(!evt.pageY){
evt.pageY=evt.clientY+(_2ab.scrollTop||0);
}
if(evt.type=="mouseover"){
evt.relatedTarget=evt.fromElement;
}
if(evt.type=="mouseout"){
evt.relatedTarget=evt.toElement;
}
this.currentEvent=evt;
evt.callListener=this.callListener;
evt.stopPropagation=this._stopPropagation;
evt.preventDefault=this._preventDefault;
}
return evt;
};
this.stopEvent=function(evt){
if(window.event){
evt.cancelBubble=true;
evt.returnValue=false;
}else{
evt.preventDefault();
evt.stopPropagation();
}
};
};
dojo.provide("dojo.event.*");
dojo.provide("dojo.dom");
dojo.dom.ELEMENT_NODE=1;
dojo.dom.ATTRIBUTE_NODE=2;
dojo.dom.TEXT_NODE=3;
dojo.dom.CDATA_SECTION_NODE=4;
dojo.dom.ENTITY_REFERENCE_NODE=5;
dojo.dom.ENTITY_NODE=6;
dojo.dom.PROCESSING_INSTRUCTION_NODE=7;
dojo.dom.COMMENT_NODE=8;
dojo.dom.DOCUMENT_NODE=9;
dojo.dom.DOCUMENT_TYPE_NODE=10;
dojo.dom.DOCUMENT_FRAGMENT_NODE=11;
dojo.dom.NOTATION_NODE=12;
dojo.dom.dojoml="http://www.dojotoolkit.org/2004/dojoml";
dojo.dom.xmlns={svg:"http://www.w3.org/2000/svg",smil:"http://www.w3.org/2001/SMIL20/",mml:"http://www.w3.org/1998/Math/MathML",cml:"http://www.xml-cml.org",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml",xul:"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",xbl:"http://www.mozilla.org/xbl",fo:"http://www.w3.org/1999/XSL/Format",xsl:"http://www.w3.org/1999/XSL/Transform",xslt:"http://www.w3.org/1999/XSL/Transform",xi:"http://www.w3.org/2001/XInclude",xforms:"http://www.w3.org/2002/01/xforms",saxon:"http://icl.com/saxon",xalan:"http://xml.apache.org/xslt",xsd:"http://www.w3.org/2001/XMLSchema",dt:"http://www.w3.org/2001/XMLSchema-datatypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",dc:"http://purl.org/dc/elements/1.1/",dcq:"http://purl.org/dc/qualifiers/1.0","soap-env":"http://schemas.xmlsoap.org/soap/envelope/",wsdl:"http://schemas.xmlsoap.org/wsdl/",AdobeExtensions:"http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"};
dojo.dom.isNode=function(wh){
if(typeof Element=="function"){
try{
return wh instanceof Element;
}
catch(e){
}
}else{
return wh&&!isNaN(wh.nodeType);
}
};
dojo.dom.getUniqueId=function(){
var _2ae=dojo.doc();
do{
var id="dj_unique_"+(++arguments.callee._idIncrement);
}while(_2ae.getElementById(id));
return id;
};
dojo.dom.getUniqueId._idIncrement=0;
dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(_2b0,_2b1){
var node=_2b0.firstChild;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.nextSibling;
}
if(_2b1&&node&&node.tagName&&node.tagName.toLowerCase()!=_2b1.toLowerCase()){
node=dojo.dom.nextElement(node,_2b1);
}
return node;
};
dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_2b3,_2b4){
var node=_2b3.lastChild;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.previousSibling;
}
if(_2b4&&node&&node.tagName&&node.tagName.toLowerCase()!=_2b4.toLowerCase()){
node=dojo.dom.prevElement(node,_2b4);
}
return node;
};
dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(node,_2b7){
if(!node){
return null;
}
do{
node=node.nextSibling;
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
if(node&&_2b7&&_2b7.toLowerCase()!=node.tagName.toLowerCase()){
return dojo.dom.nextElement(node,_2b7);
}
return node;
};
dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(node,_2b9){
if(!node){
return null;
}
if(_2b9){
_2b9=_2b9.toLowerCase();
}
do{
node=node.previousSibling;
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
if(node&&_2b9&&_2b9.toLowerCase()!=node.tagName.toLowerCase()){
return dojo.dom.prevElement(node,_2b9);
}
return node;
};
dojo.dom.moveChildren=function(_2ba,_2bb,trim){
var _2bd=0;
if(trim){
while(_2ba.hasChildNodes()&&_2ba.firstChild.nodeType==dojo.dom.TEXT_NODE){
_2ba.removeChild(_2ba.firstChild);
}
while(_2ba.hasChildNodes()&&_2ba.lastChild.nodeType==dojo.dom.TEXT_NODE){
_2ba.removeChild(_2ba.lastChild);
}
}
while(_2ba.hasChildNodes()){
_2bb.appendChild(_2ba.firstChild);
_2bd++;
}
return _2bd;
};
dojo.dom.copyChildren=function(_2be,_2bf,trim){
var _2c1=_2be.cloneNode(true);
return this.moveChildren(_2c1,_2bf,trim);
};
dojo.dom.replaceChildren=function(node,_2c3){
var _2c4=[];
if(dojo.render.html.ie){
for(var i=0;i<node.childNodes.length;i++){
_2c4.push(node.childNodes[i]);
}
}
dojo.dom.removeChildren(node);
node.appendChild(_2c3);
for(var i=0;i<_2c4.length;i++){
dojo.dom.destroyNode(_2c4[i]);
}
};
dojo.dom.removeChildren=function(node){
var _2c7=node.childNodes.length;
while(node.hasChildNodes()){
dojo.dom.removeNode(node.firstChild);
}
return _2c7;
};
dojo.dom.replaceNode=function(node,_2c9){
return node.parentNode.replaceChild(_2c9,node);
};
dojo.dom.destroyNode=function(node){
if(node.parentNode){
node=dojo.dom.removeNode(node);
}
if(node.nodeType!=3){
if(dojo.evalObjPath("dojo.event.browser.clean",false)){
dojo.event.browser.clean(node);
}
if(dojo.render.html.ie){
node.outerHTML="";
}
}
};
dojo.dom.removeNode=function(node){
if(node&&node.parentNode){
return node.parentNode.removeChild(node);
}
};
dojo.dom.getAncestors=function(node,_2cd,_2ce){
var _2cf=[];
var _2d0=(_2cd&&(_2cd instanceof Function||typeof _2cd=="function"));
while(node){
if(!_2d0||_2cd(node)){
_2cf.push(node);
}
if(_2ce&&_2cf.length>0){
return _2cf[0];
}
node=node.parentNode;
}
if(_2ce){
return null;
}
return _2cf;
};
dojo.dom.getAncestorsByTag=function(node,tag,_2d3){
tag=tag.toLowerCase();
return dojo.dom.getAncestors(node,function(el){
return ((el.tagName)&&(el.tagName.toLowerCase()==tag));
},_2d3);
};
dojo.dom.getFirstAncestorByTag=function(node,tag){
return dojo.dom.getAncestorsByTag(node,tag,true);
};
dojo.dom.isDescendantOf=function(node,_2d8,_2d9){
if(_2d9&&node){
node=node.parentNode;
}
while(node){
if(node==_2d8){
return true;
}
node=node.parentNode;
}
return false;
};
dojo.dom.innerXML=function(node){
if(node.innerXML){
return node.innerXML;
}else{
if(node.xml){
return node.xml;
}else{
if(typeof XMLSerializer!="undefined"){
return (new XMLSerializer()).serializeToString(node);
}
}
}
};
dojo.dom.createDocument=function(){
var doc=null;
var _2dc=dojo.doc();
if(!dj_undef("ActiveXObject")){
var _2dd=["MSXML2","Microsoft","MSXML","MSXML3"];
for(var i=0;i<_2dd.length;i++){
try{
doc=new ActiveXObject(_2dd[i]+".XMLDOM");
}
catch(e){
}
if(doc){
break;
}
}
}else{
if((_2dc.implementation)&&(_2dc.implementation.createDocument)){
doc=_2dc.implementation.createDocument("","",null);
}
}
return doc;
};
dojo.dom.createDocumentFromText=function(str,_2e0){
if(!_2e0){
_2e0="text/xml";
}
if(!dj_undef("DOMParser")){
var _2e1=new DOMParser();
return _2e1.parseFromString(str,_2e0);
}else{
if(!dj_undef("ActiveXObject")){
var _2e2=dojo.dom.createDocument();
if(_2e2){
_2e2.async=false;
_2e2.loadXML(str);
return _2e2;
}else{
dojo.debug("toXml didn't work?");
}
}else{
var _2e3=dojo.doc();
if(_2e3.createElement){
var tmp=_2e3.createElement("xml");
tmp.innerHTML=str;
if(_2e3.implementation&&_2e3.implementation.createDocument){
var _2e5=_2e3.implementation.createDocument("foo","",null);
for(var i=0;i<tmp.childNodes.length;i++){
_2e5.importNode(tmp.childNodes.item(i),true);
}
return _2e5;
}
return ((tmp.document)&&(tmp.document.firstChild?tmp.document.firstChild:tmp));
}
}
}
return null;
};
dojo.dom.prependChild=function(node,_2e8){
if(_2e8.firstChild){
_2e8.insertBefore(node,_2e8.firstChild);
}else{
_2e8.appendChild(node);
}
return true;
};
dojo.dom.insertBefore=function(node,ref,_2eb){
if((_2eb!=true)&&(node===ref||node.nextSibling===ref)){
return false;
}
var _2ec=ref.parentNode;
_2ec.insertBefore(node,ref);
return true;
};
dojo.dom.insertAfter=function(node,ref,_2ef){
var pn=ref.parentNode;
if(ref==pn.lastChild){
if((_2ef!=true)&&(node===ref)){
return false;
}
pn.appendChild(node);
}else{
return this.insertBefore(node,ref.nextSibling,_2ef);
}
return true;
};
dojo.dom.insertAtPosition=function(node,ref,_2f3){
if((!node)||(!ref)||(!_2f3)){
return false;
}
switch(_2f3.toLowerCase()){
case "before":
return dojo.dom.insertBefore(node,ref);
case "after":
return dojo.dom.insertAfter(node,ref);
case "first":
if(ref.firstChild){
return dojo.dom.insertBefore(node,ref.firstChild);
}else{
ref.appendChild(node);
return true;
}
break;
default:
ref.appendChild(node);
return true;
}
};
dojo.dom.insertAtIndex=function(node,_2f5,_2f6){
var _2f7=_2f5.childNodes;
if(!_2f7.length||_2f7.length==_2f6){
_2f5.appendChild(node);
return true;
}
if(_2f6==0){
return dojo.dom.prependChild(node,_2f5);
}
return dojo.dom.insertAfter(node,_2f7[_2f6-1]);
};
dojo.dom.textContent=function(node,text){
if(arguments.length>1){
var _2fa=dojo.doc();
dojo.dom.replaceChildren(node,_2fa.createTextNode(text));
return text;
}else{
if(node.textContent!=undefined){
return node.textContent;
}
var _2fb="";
if(node==null){
return _2fb;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
_2fb+=dojo.dom.textContent(node.childNodes[i]);
break;
case 3:
case 2:
case 4:
_2fb+=node.childNodes[i].nodeValue;
break;
default:
break;
}
}
return _2fb;
}
};
dojo.dom.hasParent=function(node){
return Boolean(node&&node.parentNode&&dojo.dom.isNode(node.parentNode));
};
dojo.dom.isTag=function(node){
if(node&&node.tagName){
for(var i=1;i<arguments.length;i++){
if(node.tagName==String(arguments[i])){
return String(arguments[i]);
}
}
}
return "";
};
dojo.dom.setAttributeNS=function(elem,_301,_302,_303){
if(elem==null||((elem==undefined)&&(typeof elem=="undefined"))){
dojo.raise("No element given to dojo.dom.setAttributeNS");
}
if(!((elem.setAttributeNS==undefined)&&(typeof elem.setAttributeNS=="undefined"))){
elem.setAttributeNS(_301,_302,_303);
}else{
var _304=elem.ownerDocument;
var _305=_304.createNode(2,_302,_301);
_305.nodeValue=_303;
elem.setAttributeNode(_305);
}
};
dojo.provide("dojo.html.common");
dojo.lang.mixin(dojo.html,dojo.dom);
dojo.html.body=function(){
dojo.deprecated("dojo.html.body() moved to dojo.body()","0.5");
return dojo.body();
};
dojo.html.getEventTarget=function(evt){
if(!evt){
evt=dojo.global().event||{};
}
var t=(evt.srcElement?evt.srcElement:(evt.target?evt.target:null));
while((t)&&(t.nodeType!=1)){
t=t.parentNode;
}
return t;
};
dojo.html.getViewport=function(){
var _308=dojo.global();
var _309=dojo.doc();
var w=0;
var h=0;
if(dojo.render.html.mozilla){
w=_309.documentElement.clientWidth;
h=_308.innerHeight;
}else{
if(!dojo.render.html.opera&&_308.innerWidth){
w=_308.innerWidth;
h=_308.innerHeight;
}else{
if(!dojo.render.html.opera&&dojo.exists(_309,"documentElement.clientWidth")){
var w2=_309.documentElement.clientWidth;
if(!w||w2&&w2<w){
w=w2;
}
h=_309.documentElement.clientHeight;
}else{
if(dojo.body().clientWidth){
w=dojo.body().clientWidth;
h=dojo.body().clientHeight;
}
}
}
}
return {width:w,height:h};
};
dojo.html.getScroll=function(){
var _30d=dojo.global();
var _30e=dojo.doc();
var top=_30d.pageYOffset||_30e.documentElement.scrollTop||dojo.body().scrollTop||0;
var left=_30d.pageXOffset||_30e.documentElement.scrollLeft||dojo.body().scrollLeft||0;
return {top:top,left:left,offset:{x:left,y:top}};
};
dojo.html.getParentByType=function(node,type){
var _313=dojo.doc();
var _314=dojo.byId(node);
type=type.toLowerCase();
while((_314)&&(_314.nodeName.toLowerCase()!=type)){
if(_314==(_313["body"]||_313["documentElement"])){
return null;
}
_314=_314.parentNode;
}
return _314;
};
dojo.html.getAttribute=function(node,attr){
node=dojo.byId(node);
if((!node)||(!node.getAttribute)){
return null;
}
var ta=typeof attr=="string"?attr:new String(attr);
var v=node.getAttribute(ta.toUpperCase());
if((v)&&(typeof v=="string")&&(v!="")){
return v;
}
if(v&&v.value){
return v.value;
}
if((node.getAttributeNode)&&(node.getAttributeNode(ta))){
return (node.getAttributeNode(ta)).value;
}else{
if(node.getAttribute(ta)){
return node.getAttribute(ta);
}else{
if(node.getAttribute(ta.toLowerCase())){
return node.getAttribute(ta.toLowerCase());
}
}
}
return null;
};
dojo.html.hasAttribute=function(node,attr){
return dojo.html.getAttribute(dojo.byId(node),attr)?true:false;
};
dojo.html.getCursorPosition=function(e){
e=e||dojo.global().event;
var _31c={x:0,y:0};
if(e.pageX||e.pageY){
_31c.x=e.pageX;
_31c.y=e.pageY;
}else{
var de=dojo.doc().documentElement;
var db=dojo.body();
_31c.x=e.clientX+((de||db)["scrollLeft"])-((de||db)["clientLeft"]);
_31c.y=e.clientY+((de||db)["scrollTop"])-((de||db)["clientTop"]);
}
return _31c;
};
dojo.html.isTag=function(node){
node=dojo.byId(node);
if(node&&node.tagName){
for(var i=1;i<arguments.length;i++){
if(node.tagName.toLowerCase()==String(arguments[i]).toLowerCase()){
return String(arguments[i]).toLowerCase();
}
}
}
return "";
};
if(dojo.render.html.ie&&!dojo.render.html.ie70){
if(window.location.href.substr(0,6).toLowerCase()!="https:"){
(function(){
var _321=dojo.doc().createElement("script");
_321.src="javascript:'dojo.html.createExternalElement=function(doc, tag){ return doc.createElement(tag); }'";
dojo.doc().getElementsByTagName("head")[0].appendChild(_321);
})();
}
}else{
dojo.html.createExternalElement=function(doc,tag){
return doc.createElement(tag);
};
}
dojo.html._callDeprecated=function(_324,_325,args,_327,_328){
dojo.deprecated("dojo.html."+_324,"replaced by dojo.html."+_325+"("+(_327?"node, {"+_327+": "+_327+"}":"")+")"+(_328?"."+_328:""),"0.5");
var _329=[];
if(_327){
var _32a={};
_32a[_327]=args[1];
_329.push(args[0]);
_329.push(_32a);
}else{
_329=args;
}
var ret=dojo.html[_325].apply(dojo.html,args);
if(_328){
return ret[_328];
}else{
return ret;
}
};
dojo.html.getViewportWidth=function(){
return dojo.html._callDeprecated("getViewportWidth","getViewport",arguments,null,"width");
};
dojo.html.getViewportHeight=function(){
return dojo.html._callDeprecated("getViewportHeight","getViewport",arguments,null,"height");
};
dojo.html.getViewportSize=function(){
return dojo.html._callDeprecated("getViewportSize","getViewport",arguments);
};
dojo.html.getScrollTop=function(){
return dojo.html._callDeprecated("getScrollTop","getScroll",arguments,null,"top");
};
dojo.html.getScrollLeft=function(){
return dojo.html._callDeprecated("getScrollLeft","getScroll",arguments,null,"left");
};
dojo.html.getScrollOffset=function(){
return dojo.html._callDeprecated("getScrollOffset","getScroll",arguments,null,"offset");
};
dojo.provide("dojo.uri.Uri");
dojo.uri=new function(){
this.dojoUri=function(uri){
return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(),uri);
};
this.moduleUri=function(_32d,uri){
var loc=dojo.hostenv.getModuleSymbols(_32d).join("/");
if(!loc){
return null;
}
if(loc.lastIndexOf("/")!=loc.length-1){
loc+="/";
}
return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri()+loc,uri);
};
this.Uri=function(){
var uri=arguments[0];
for(var i=1;i<arguments.length;i++){
if(!arguments[i]){
continue;
}
var _332=new dojo.uri.Uri(arguments[i].toString());
var _333=new dojo.uri.Uri(uri.toString());
if((_332.path=="")&&(_332.scheme==null)&&(_332.authority==null)&&(_332.query==null)){
if(_332.fragment!=null){
_333.fragment=_332.fragment;
}
_332=_333;
}else{
if(_332.scheme==null){
_332.scheme=_333.scheme;
if(_332.authority==null){
_332.authority=_333.authority;
if(_332.path.charAt(0)!="/"){
var path=_333.path.substring(0,_333.path.lastIndexOf("/")+1)+_332.path;
var segs=path.split("/");
for(var j=0;j<segs.length;j++){
if(segs[j]=="."){
if(j==segs.length-1){
segs[j]="";
}else{
segs.splice(j,1);
j--;
}
}else{
if(j>0&&!(j==1&&segs[0]=="")&&segs[j]==".."&&segs[j-1]!=".."){
if(j==segs.length-1){
segs.splice(j,1);
segs[j-1]="";
}else{
segs.splice(j-1,2);
j-=2;
}
}
}
}
_332.path=segs.join("/");
}
}
}
}
uri="";
if(_332.scheme!=null){
uri+=_332.scheme+":";
}
if(_332.authority!=null){
uri+="//"+_332.authority;
}
uri+=_332.path;
if(_332.query!=null){
uri+="?"+_332.query;
}
if(_332.fragment!=null){
uri+="#"+_332.fragment;
}
}
this.uri=uri.toString();
var _337="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";
var r=this.uri.match(new RegExp(_337));
this.scheme=r[2]||(r[1]?"":null);
this.authority=r[4]||(r[3]?"":null);
this.path=r[5];
this.query=r[7]||(r[6]?"":null);
this.fragment=r[9]||(r[8]?"":null);
if(this.authority!=null){
_337="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$";
r=this.authority.match(new RegExp(_337));
this.user=r[3]||null;
this.password=r[4]||null;
this.host=r[5];
this.port=r[7]||null;
}
this.toString=function(){
return this.uri;
};
};
};
dojo.provide("dojo.html.style");
dojo.html.getClass=function(node){
node=dojo.byId(node);
if(!node){
return "";
}
var cs="";
if(node.className){
cs=node.className;
}else{
if(dojo.html.hasAttribute(node,"class")){
cs=dojo.html.getAttribute(node,"class");
}
}
return cs.replace(/^\s+|\s+$/g,"");
};
dojo.html.getClasses=function(node){
var c=dojo.html.getClass(node);
return (c=="")?[]:c.split(/\s+/g);
};
dojo.html.hasClass=function(node,_33e){
return (new RegExp("(^|\\s+)"+_33e+"(\\s+|$)")).test(dojo.html.getClass(node));
};
dojo.html.prependClass=function(node,_340){
_340+=" "+dojo.html.getClass(node);
return dojo.html.setClass(node,_340);
};
dojo.html.addClass=function(node,_342){
if(dojo.html.hasClass(node,_342)){
return false;
}
_342=(dojo.html.getClass(node)+" "+_342).replace(/^\s+|\s+$/g,"");
return dojo.html.setClass(node,_342);
};
dojo.html.setClass=function(node,_344){
node=dojo.byId(node);
var cs=new String(_344);
try{
if(typeof node.className=="string"){
node.className=cs;
}else{
if(node.setAttribute){
node.setAttribute("class",_344);
node.className=cs;
}else{
return false;
}
}
}
catch(e){
dojo.debug("dojo.html.setClass() failed",e);
}
return true;
};
dojo.html.removeClass=function(node,_347,_348){
try{
if(!_348){
var _349=dojo.html.getClass(node).replace(new RegExp("(^|\\s+)"+_347+"(\\s+|$)"),"$1$2");
}else{
var _349=dojo.html.getClass(node).replace(_347,"");
}
dojo.html.setClass(node,_349);
}
catch(e){
dojo.debug("dojo.html.removeClass() failed",e);
}
return true;
};
dojo.html.replaceClass=function(node,_34b,_34c){
dojo.html.removeClass(node,_34c);
dojo.html.addClass(node,_34b);
};
dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2};
dojo.html.getElementsByClass=function(_34d,_34e,_34f,_350,_351){
_351=false;
var _352=dojo.doc();
_34e=dojo.byId(_34e)||_352;
var _353=_34d.split(/\s+/g);
var _354=[];
if(_350!=1&&_350!=2){
_350=0;
}
var _355=new RegExp("(\\s|^)(("+_353.join(")|(")+"))(\\s|$)");
var _356=_353.join(" ").length;
var _357=[];
if(!_351&&_352.evaluate){
var _358=".//"+(_34f||"*")+"[contains(";
if(_350!=dojo.html.classMatchType.ContainsAny){
_358+="concat(' ',@class,' '), ' "+_353.join(" ') and contains(concat(' ',@class,' '), ' ")+" ')";
if(_350==2){
_358+=" and string-length(@class)="+_356+"]";
}else{
_358+="]";
}
}else{
_358+="concat(' ',@class,' '), ' "+_353.join(" ') or contains(concat(' ',@class,' '), ' ")+" ')]";
}
var _359=_352.evaluate(_358,_34e,null,XPathResult.ANY_TYPE,null);
var _35a=_359.iterateNext();
while(_35a){
try{
_357.push(_35a);
_35a=_359.iterateNext();
}
catch(e){
break;
}
}
return _357;
}else{
if(!_34f){
_34f="*";
}
_357=_34e.getElementsByTagName(_34f);
var node,i=0;
outer:
while(node=_357[i++]){
var _35d=dojo.html.getClasses(node);
if(_35d.length==0){
continue outer;
}
var _35e=0;
for(var j=0;j<_35d.length;j++){
if(_355.test(_35d[j])){
if(_350==dojo.html.classMatchType.ContainsAny){
_354.push(node);
continue outer;
}else{
_35e++;
}
}else{
if(_350==dojo.html.classMatchType.IsOnly){
continue outer;
}
}
}
if(_35e==_353.length){
if((_350==dojo.html.classMatchType.IsOnly)&&(_35e==_35d.length)){
_354.push(node);
}else{
if(_350==dojo.html.classMatchType.ContainsAll){
_354.push(node);
}
}
}
}
return _354;
}
};
dojo.html.getElementsByClassName=dojo.html.getElementsByClass;
dojo.html.toCamelCase=function(_360){
var arr=_360.split("-"),cc=arr[0];
for(var i=1;i<arr.length;i++){
cc+=arr[i].charAt(0).toUpperCase()+arr[i].substring(1);
}
return cc;
};
dojo.html.toSelectorCase=function(_364){
return _364.replace(/([A-Z])/g,"-$1").toLowerCase();
};
dojo.html.getComputedStyle=function(node,_366,_367){
node=dojo.byId(node);
var _366=dojo.html.toSelectorCase(_366);
var _368=dojo.html.toCamelCase(_366);
if(!node||!node.style){
return _367;
}else{
if(document.defaultView&&dojo.html.isDescendantOf(node,node.ownerDocument)){
try{
var cs=document.defaultView.getComputedStyle(node,"");
if(cs){
return cs.getPropertyValue(_366);
}
}
catch(e){
if(node.style.getPropertyValue){
return node.style.getPropertyValue(_366);
}else{
return _367;
}
}
}else{
if(node.currentStyle){
return node.currentStyle[_368];
}
}
}
if(node.style.getPropertyValue){
return node.style.getPropertyValue(_366);
}else{
return _367;
}
};
dojo.html.getStyleProperty=function(node,_36b){
node=dojo.byId(node);
return (node&&node.style?node.style[dojo.html.toCamelCase(_36b)]:undefined);
};
dojo.html.getStyle=function(node,_36d){
var _36e=dojo.html.getStyleProperty(node,_36d);
return (_36e?_36e:dojo.html.getComputedStyle(node,_36d));
};
dojo.html.setStyle=function(node,_370,_371){
node=dojo.byId(node);
if(node&&node.style){
var _372=dojo.html.toCamelCase(_370);
node.style[_372]=_371;
}
};
dojo.html.setStyleText=function(_373,text){
try{
_373.style.cssText=text;
}
catch(e){
_373.setAttribute("style",text);
}
};
dojo.html.copyStyle=function(_375,_376){
if(!_376.style.cssText){
_375.setAttribute("style",_376.getAttribute("style"));
}else{
_375.style.cssText=_376.style.cssText;
}
dojo.html.addClass(_375,dojo.html.getClass(_376));
};
dojo.html.getUnitValue=function(node,_378,_379){
var s=dojo.html.getComputedStyle(node,_378);
if((!s)||((s=="auto")&&(_379))){
return {value:0,units:"px"};
}
var _37b=s.match(/(\-?[\d.]+)([a-z%]*)/i);
if(!_37b){
return dojo.html.getUnitValue.bad;
}
return {value:Number(_37b[1]),units:_37b[2].toLowerCase()};
};
dojo.html.getUnitValue.bad={value:NaN,units:""};
dojo.html.getPixelValue=function(node,_37d,_37e){
var _37f=dojo.html.getUnitValue(node,_37d,_37e);
if(isNaN(_37f.value)){
return 0;
}
if((_37f.value)&&(_37f.units!="px")){
return NaN;
}
return _37f.value;
};
dojo.html.setPositivePixelValue=function(node,_381,_382){
if(isNaN(_382)){
return false;
}
node.style[_381]=Math.max(0,_382)+"px";
return true;
};
dojo.html.styleSheet=null;
dojo.html.insertCssRule=function(_383,_384,_385){
if(!dojo.html.styleSheet){
if(document.createStyleSheet){
dojo.html.styleSheet=document.createStyleSheet();
}else{
if(document.styleSheets[0]){
dojo.html.styleSheet=document.styleSheets[0];
}else{
return null;
}
}
}
if(arguments.length<3){
if(dojo.html.styleSheet.cssRules){
_385=dojo.html.styleSheet.cssRules.length;
}else{
if(dojo.html.styleSheet.rules){
_385=dojo.html.styleSheet.rules.length;
}else{
return null;
}
}
}
if(dojo.html.styleSheet.insertRule){
var rule=_383+" { "+_384+" }";
return dojo.html.styleSheet.insertRule(rule,_385);
}else{
if(dojo.html.styleSheet.addRule){
return dojo.html.styleSheet.addRule(_383,_384,_385);
}else{
return null;
}
}
};
dojo.html.removeCssRule=function(_387){
if(!dojo.html.styleSheet){
dojo.debug("no stylesheet defined for removing rules");
return false;
}
if(dojo.render.html.ie){
if(!_387){
_387=dojo.html.styleSheet.rules.length;
dojo.html.styleSheet.removeRule(_387);
}
}else{
if(document.styleSheets[0]){
if(!_387){
_387=dojo.html.styleSheet.cssRules.length;
}
dojo.html.styleSheet.deleteRule(_387);
}
}
return true;
};
dojo.html._insertedCssFiles=[];
dojo.html.insertCssFile=function(URI,doc,_38a,_38b){
if(!URI){
return;
}
if(!doc){
doc=document;
}
var _38c=dojo.hostenv.getText(URI,false,_38b);
if(_38c===null){
return;
}
_38c=dojo.html.fixPathsInCssText(_38c,URI);
if(_38a){
var idx=-1,node,ent=dojo.html._insertedCssFiles;
for(var i=0;i<ent.length;i++){
if((ent[i].doc==doc)&&(ent[i].cssText==_38c)){
idx=i;
node=ent[i].nodeRef;
break;
}
}
if(node){
var _391=doc.getElementsByTagName("style");
for(var i=0;i<_391.length;i++){
if(_391[i]==node){
return;
}
}
dojo.html._insertedCssFiles.shift(idx,1);
}
}
var _392=dojo.html.insertCssText(_38c,doc);
dojo.html._insertedCssFiles.push({"doc":doc,"cssText":_38c,"nodeRef":_392});
if(_392&&djConfig.isDebug){
_392.setAttribute("dbgHref",URI);
}
return _392;
};
dojo.html.insertCssText=function(_393,doc,URI){
if(!_393){
return;
}
if(!doc){
doc=document;
}
if(URI){
_393=dojo.html.fixPathsInCssText(_393,URI);
}
var _396=doc.createElement("style");
_396.setAttribute("type","text/css");
var head=doc.getElementsByTagName("head")[0];
if(!head){
dojo.debug("No head tag in document, aborting styles");
return;
}else{
head.appendChild(_396);
}
if(_396.styleSheet){
var _398=function(){
try{
_396.styleSheet.cssText=_393;
}
catch(e){
dojo.debug(e);
}
};
if(_396.styleSheet.disabled){
setTimeout(_398,10);
}else{
_398();
}
}else{
var _399=doc.createTextNode(_393);
_396.appendChild(_399);
}
return _396;
};
dojo.html.fixPathsInCssText=function(_39a,URI){
if(!_39a||!URI){
return;
}
var _39c,str="",url="",_39f="[\\t\\s\\w\\(\\)\\/\\.\\\\'\"-:#=&?~]+";
var _3a0=new RegExp("url\\(\\s*("+_39f+")\\s*\\)");
var _3a1=/(file|https?|ftps?):\/\//;
regexTrim=new RegExp("^[\\s]*(['\"]?)("+_39f+")\\1[\\s]*?$");
if(dojo.render.html.ie55||dojo.render.html.ie60){
var _3a2=new RegExp("AlphaImageLoader\\((.*)src=['\"]("+_39f+")['\"]");
while(_39c=_3a2.exec(_39a)){
url=_39c[2].replace(regexTrim,"$2");
if(!_3a1.exec(url)){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=_39a.substring(0,_39c.index)+"AlphaImageLoader("+_39c[1]+"src='"+url+"'";
_39a=_39a.substr(_39c.index+_39c[0].length);
}
_39a=str+_39a;
str="";
}
while(_39c=_3a0.exec(_39a)){
url=_39c[1].replace(regexTrim,"$2");
if(!_3a1.exec(url)){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=_39a.substring(0,_39c.index)+"url("+url+")";
_39a=_39a.substr(_39c.index+_39c[0].length);
}
return str+_39a;
};
dojo.html.setActiveStyleSheet=function(_3a3){
var i=0,a,els=dojo.doc().getElementsByTagName("link");
while(a=els[i++]){
if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")){
a.disabled=true;
if(a.getAttribute("title")==_3a3){
a.disabled=false;
}
}
}
};
dojo.html.getActiveStyleSheet=function(){
var i=0,a,els=dojo.doc().getElementsByTagName("link");
while(a=els[i++]){
if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")&&!a.disabled){
return a.getAttribute("title");
}
}
return null;
};
dojo.html.getPreferredStyleSheet=function(){
var i=0,a,els=dojo.doc().getElementsByTagName("link");
while(a=els[i++]){
if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("rel").indexOf("alt")==-1&&a.getAttribute("title")){
return a.getAttribute("title");
}
}
return null;
};
dojo.html.applyBrowserClass=function(node){
var drh=dojo.render.html;
var _3af={dj_ie:drh.ie,dj_ie55:drh.ie55,dj_ie6:drh.ie60,dj_ie7:drh.ie70,dj_iequirks:drh.ie&&drh.quirks,dj_opera:drh.opera,dj_opera8:drh.opera&&(Math.floor(dojo.render.version)==8),dj_opera9:drh.opera&&(Math.floor(dojo.render.version)==9),dj_khtml:drh.khtml,dj_safari:drh.safari,dj_gecko:drh.mozilla};
for(var p in _3af){
if(_3af[p]){
dojo.html.addClass(node,p);
}
}
};
dojo.provide("dojo.html.display");
dojo.html._toggle=function(node,_3b2,_3b3){
node=dojo.byId(node);
_3b3(node,!_3b2(node));
return _3b2(node);
};
dojo.html.show=function(node){
node=dojo.byId(node);
if(dojo.html.getStyleProperty(node,"display")=="none"){
dojo.html.setStyle(node,"display",(node.dojoDisplayCache||""));
node.dojoDisplayCache=undefined;
}
};
dojo.html.hide=function(node){
node=dojo.byId(node);
if(typeof node["dojoDisplayCache"]=="undefined"){
var d=dojo.html.getStyleProperty(node,"display");
if(d!="none"){
node.dojoDisplayCache=d;
}
}
dojo.html.setStyle(node,"display","none");
};
dojo.html.setShowing=function(node,_3b8){
dojo.html[(_3b8?"show":"hide")](node);
};
dojo.html.isShowing=function(node){
return (dojo.html.getStyleProperty(node,"display")!="none");
};
dojo.html.toggleShowing=function(node){
return dojo.html._toggle(node,dojo.html.isShowing,dojo.html.setShowing);
};
dojo.html.displayMap={tr:"",td:"",th:"",img:"inline",span:"inline",input:"inline",button:"inline"};
dojo.html.suggestDisplayByTagName=function(node){
node=dojo.byId(node);
if(node&&node.tagName){
var tag=node.tagName.toLowerCase();
return (tag in dojo.html.displayMap?dojo.html.displayMap[tag]:"block");
}
};
dojo.html.setDisplay=function(node,_3be){
dojo.html.setStyle(node,"display",((_3be instanceof String||typeof _3be=="string")?_3be:(_3be?dojo.html.suggestDisplayByTagName(node):"none")));
};
dojo.html.isDisplayed=function(node){
return (dojo.html.getComputedStyle(node,"display")!="none");
};
dojo.html.toggleDisplay=function(node){
return dojo.html._toggle(node,dojo.html.isDisplayed,dojo.html.setDisplay);
};
dojo.html.setVisibility=function(node,_3c2){
dojo.html.setStyle(node,"visibility",((_3c2 instanceof String||typeof _3c2=="string")?_3c2:(_3c2?"visible":"hidden")));
};
dojo.html.isVisible=function(node){
return (dojo.html.getComputedStyle(node,"visibility")!="hidden");
};
dojo.html.toggleVisibility=function(node){
return dojo.html._toggle(node,dojo.html.isVisible,dojo.html.setVisibility);
};
dojo.html.setOpacity=function(node,_3c6,_3c7){
node=dojo.byId(node);
var h=dojo.render.html;
if(!_3c7){
if(_3c6>=1){
if(h.ie){
dojo.html.clearOpacity(node);
return;
}else{
_3c6=0.999999;
}
}else{
if(_3c6<0){
_3c6=0;
}
}
}
if(h.ie){
if(node.nodeName.toLowerCase()=="tr"){
var tds=node.getElementsByTagName("td");
for(var x=0;x<tds.length;x++){
tds[x].style.filter="Alpha(Opacity="+_3c6*100+")";
}
}
node.style.filter="Alpha(Opacity="+_3c6*100+")";
}else{
if(h.moz){
node.style.opacity=_3c6;
node.style.MozOpacity=_3c6;
}else{
if(h.safari){
node.style.opacity=_3c6;
node.style.KhtmlOpacity=_3c6;
}else{
node.style.opacity=_3c6;
}
}
}
};
dojo.html.clearOpacity=function(node){
node=dojo.byId(node);
var ns=node.style;
var h=dojo.render.html;
if(h.ie){
try{
if(node.filters&&node.filters.alpha){
ns.filter="";
}
}
catch(e){
}
}else{
if(h.moz){
ns.opacity=1;
ns.MozOpacity=1;
}else{
if(h.safari){
ns.opacity=1;
ns.KhtmlOpacity=1;
}else{
ns.opacity=1;
}
}
}
};
dojo.html.getOpacity=function(node){
node=dojo.byId(node);
var h=dojo.render.html;
if(h.ie){
var opac=(node.filters&&node.filters.alpha&&typeof node.filters.alpha.opacity=="number"?node.filters.alpha.opacity:100)/100;
}else{
var opac=node.style.opacity||node.style.MozOpacity||node.style.KhtmlOpacity||1;
}
return opac>=0.999999?1:Number(opac);
};
dojo.provide("dojo.html.layout");
dojo.html.sumAncestorProperties=function(node,prop){
node=dojo.byId(node);
if(!node){
return 0;
}
var _3d3=0;
while(node){
if(dojo.html.getComputedStyle(node,"position")=="fixed"){
return 0;
}
var val=node[prop];
if(val){
_3d3+=val-0;
if(node==dojo.body()){
break;
}
}
node=node.parentNode;
}
return _3d3;
};
dojo.html.setStyleAttributes=function(node,_3d6){
node=dojo.byId(node);
var _3d7=_3d6.replace(/(;)?\s*$/,"").split(";");
for(var i=0;i<_3d7.length;i++){
var _3d9=_3d7[i].split(":");
var name=_3d9[0].replace(/\s*$/,"").replace(/^\s*/,"").toLowerCase();
var _3db=_3d9[1].replace(/\s*$/,"").replace(/^\s*/,"");
switch(name){
case "opacity":
dojo.html.setOpacity(node,_3db);
break;
case "content-height":
dojo.html.setContentBox(node,{height:_3db});
break;
case "content-width":
dojo.html.setContentBox(node,{width:_3db});
break;
case "outer-height":
dojo.html.setMarginBox(node,{height:_3db});
break;
case "outer-width":
dojo.html.setMarginBox(node,{width:_3db});
break;
default:
node.style[dojo.html.toCamelCase(name)]=_3db;
}
}
};
dojo.html.boxSizing={MARGIN_BOX:"margin-box",BORDER_BOX:"border-box",PADDING_BOX:"padding-box",CONTENT_BOX:"content-box"};
dojo.html.getAbsolutePosition=dojo.html.abs=function(node,_3dd,_3de){
node=dojo.byId(node,node.ownerDocument);
var ret={x:0,y:0};
var bs=dojo.html.boxSizing;
if(!_3de){
_3de=bs.CONTENT_BOX;
}
var _3e1=2;
var _3e2;
switch(_3de){
case bs.MARGIN_BOX:
_3e2=3;
break;
case bs.BORDER_BOX:
_3e2=2;
break;
case bs.PADDING_BOX:
default:
_3e2=1;
break;
case bs.CONTENT_BOX:
_3e2=0;
break;
}
var h=dojo.render.html;
var db=document["body"]||document["documentElement"];
if(h.ie){
with(node.getBoundingClientRect()){
ret.x=left-2;
ret.y=top-2;
}
}else{
if(document.getBoxObjectFor){
_3e1=1;
try{
var bo=document.getBoxObjectFor(node);
ret.x=bo.x-dojo.html.sumAncestorProperties(node,"scrollLeft");
ret.y=bo.y-dojo.html.sumAncestorProperties(node,"scrollTop");
}
catch(e){
}
}else{
if(node["offsetParent"]){
var _3e6;
if((h.safari)&&(node.style.getPropertyValue("position")=="absolute")&&(node.parentNode==db)){
_3e6=db;
}else{
_3e6=db.parentNode;
}
if(node.parentNode!=db){
var nd=node;
if(dojo.render.html.opera){
nd=db;
}
ret.x-=dojo.html.sumAncestorProperties(nd,"scrollLeft");
ret.y-=dojo.html.sumAncestorProperties(nd,"scrollTop");
}
var _3e8=node;
do{
var n=_3e8["offsetLeft"];
if(!h.opera||n>0){
ret.x+=isNaN(n)?0:n;
}
var m=_3e8["offsetTop"];
ret.y+=isNaN(m)?0:m;
_3e8=_3e8.offsetParent;
}while((_3e8!=_3e6)&&(_3e8!=null));
}else{
if(node["x"]&&node["y"]){
ret.x+=isNaN(node.x)?0:node.x;
ret.y+=isNaN(node.y)?0:node.y;
}
}
}
}
if(_3dd){
var _3eb=dojo.html.getScroll();
ret.y+=_3eb.top;
ret.x+=_3eb.left;
}
var _3ec=[dojo.html.getPaddingExtent,dojo.html.getBorderExtent,dojo.html.getMarginExtent];
if(_3e1>_3e2){
for(var i=_3e2;i<_3e1;++i){
ret.y+=_3ec[i](node,"top");
ret.x+=_3ec[i](node,"left");
}
}else{
if(_3e1<_3e2){
for(var i=_3e2;i>_3e1;--i){
ret.y-=_3ec[i-1](node,"top");
ret.x-=_3ec[i-1](node,"left");
}
}
}
ret.top=ret.y;
ret.left=ret.x;
return ret;
};
dojo.html.isPositionAbsolute=function(node){
return (dojo.html.getComputedStyle(node,"position")=="absolute");
};
dojo.html._sumPixelValues=function(node,_3f0,_3f1){
var _3f2=0;
for(var x=0;x<_3f0.length;x++){
_3f2+=dojo.html.getPixelValue(node,_3f0[x],_3f1);
}
return _3f2;
};
dojo.html.getMargin=function(node){
return {width:dojo.html._sumPixelValues(node,["margin-left","margin-right"],(dojo.html.getComputedStyle(node,"position")=="absolute")),height:dojo.html._sumPixelValues(node,["margin-top","margin-bottom"],(dojo.html.getComputedStyle(node,"position")=="absolute"))};
};
dojo.html.getBorder=function(node){
return {width:dojo.html.getBorderExtent(node,"left")+dojo.html.getBorderExtent(node,"right"),height:dojo.html.getBorderExtent(node,"top")+dojo.html.getBorderExtent(node,"bottom")};
};
dojo.html.getBorderExtent=function(node,side){
return (dojo.html.getStyle(node,"border-"+side+"-style")=="none"?0:dojo.html.getPixelValue(node,"border-"+side+"-width"));
};
dojo.html.getMarginExtent=function(node,side){
return dojo.html._sumPixelValues(node,["margin-"+side],dojo.html.isPositionAbsolute(node));
};
dojo.html.getPaddingExtent=function(node,side){
return dojo.html._sumPixelValues(node,["padding-"+side],true);
};
dojo.html.getPadding=function(node){
return {width:dojo.html._sumPixelValues(node,["padding-left","padding-right"],true),height:dojo.html._sumPixelValues(node,["padding-top","padding-bottom"],true)};
};
dojo.html.getPadBorder=function(node){
var pad=dojo.html.getPadding(node);
var _3ff=dojo.html.getBorder(node);
return {width:pad.width+_3ff.width,height:pad.height+_3ff.height};
};
dojo.html.getBoxSizing=function(node){
var h=dojo.render.html;
var bs=dojo.html.boxSizing;
if(((h.ie)||(h.opera))&&node.nodeName!="IMG"){
var cm=document["compatMode"];
if((cm=="BackCompat")||(cm=="QuirksMode")){
return bs.BORDER_BOX;
}else{
return bs.CONTENT_BOX;
}
}else{
if(arguments.length==0){
node=document.documentElement;
}
var _404=dojo.html.getStyle(node,"-moz-box-sizing");
if(!_404){
_404=dojo.html.getStyle(node,"box-sizing");
}
return (_404?_404:bs.CONTENT_BOX);
}
};
dojo.html.isBorderBox=function(node){
return (dojo.html.getBoxSizing(node)==dojo.html.boxSizing.BORDER_BOX);
};
dojo.html.getBorderBox=function(node){
node=dojo.byId(node);
return {width:node.offsetWidth,height:node.offsetHeight};
};
dojo.html.getPaddingBox=function(node){
var box=dojo.html.getBorderBox(node);
var _409=dojo.html.getBorder(node);
return {width:box.width-_409.width,height:box.height-_409.height};
};
dojo.html.getContentBox=function(node){
node=dojo.byId(node);
var _40b=dojo.html.getPadBorder(node);
return {width:node.offsetWidth-_40b.width,height:node.offsetHeight-_40b.height};
};
dojo.html.setContentBox=function(node,args){
node=dojo.byId(node);
var _40e=0;
var _40f=0;
var isbb=dojo.html.isBorderBox(node);
var _411=(isbb?dojo.html.getPadBorder(node):{width:0,height:0});
var ret={};
if(typeof args.width!="undefined"){
_40e=args.width+_411.width;
ret.width=dojo.html.setPositivePixelValue(node,"width",_40e);
}
if(typeof args.height!="undefined"){
_40f=args.height+_411.height;
ret.height=dojo.html.setPositivePixelValue(node,"height",_40f);
}
return ret;
};
dojo.html.getMarginBox=function(node){
var _414=dojo.html.getBorderBox(node);
var _415=dojo.html.getMargin(node);
return {width:_414.width+_415.width,height:_414.height+_415.height};
};
dojo.html.setMarginBox=function(node,args){
node=dojo.byId(node);
var _418=0;
var _419=0;
var isbb=dojo.html.isBorderBox(node);
var _41b=(!isbb?dojo.html.getPadBorder(node):{width:0,height:0});
var _41c=dojo.html.getMargin(node);
var ret={};
if(typeof args.width!="undefined"){
_418=args.width-_41b.width;
_418-=_41c.width;
ret.width=dojo.html.setPositivePixelValue(node,"width",_418);
}
if(typeof args.height!="undefined"){
_419=args.height-_41b.height;
_419-=_41c.height;
ret.height=dojo.html.setPositivePixelValue(node,"height",_419);
}
return ret;
};
dojo.html.getElementBox=function(node,type){
var bs=dojo.html.boxSizing;
switch(type){
case bs.MARGIN_BOX:
return dojo.html.getMarginBox(node);
case bs.BORDER_BOX:
return dojo.html.getBorderBox(node);
case bs.PADDING_BOX:
return dojo.html.getPaddingBox(node);
case bs.CONTENT_BOX:
default:
return dojo.html.getContentBox(node);
}
};
dojo.html.toCoordinateObject=dojo.html.toCoordinateArray=function(_421,_422,_423){
if(_421 instanceof Array||typeof _421=="array"){
dojo.deprecated("dojo.html.toCoordinateArray","use dojo.html.toCoordinateObject({left: , top: , width: , height: }) instead","0.5");
while(_421.length<4){
_421.push(0);
}
while(_421.length>4){
_421.pop();
}
var ret={left:_421[0],top:_421[1],width:_421[2],height:_421[3]};
}else{
if(!_421.nodeType&&!(_421 instanceof String||typeof _421=="string")&&("width" in _421||"height" in _421||"left" in _421||"x" in _421||"top" in _421||"y" in _421)){
var ret={left:_421.left||_421.x||0,top:_421.top||_421.y||0,width:_421.width||0,height:_421.height||0};
}else{
var node=dojo.byId(_421);
var pos=dojo.html.abs(node,_422,_423);
var _427=dojo.html.getMarginBox(node);
var ret={left:pos.left,top:pos.top,width:_427.width,height:_427.height};
}
}
ret.x=ret.left;
ret.y=ret.top;
return ret;
};
dojo.html.setMarginBoxWidth=dojo.html.setOuterWidth=function(node,_429){
return dojo.html._callDeprecated("setMarginBoxWidth","setMarginBox",arguments,"width");
};
dojo.html.setMarginBoxHeight=dojo.html.setOuterHeight=function(){
return dojo.html._callDeprecated("setMarginBoxHeight","setMarginBox",arguments,"height");
};
dojo.html.getMarginBoxWidth=dojo.html.getOuterWidth=function(){
return dojo.html._callDeprecated("getMarginBoxWidth","getMarginBox",arguments,null,"width");
};
dojo.html.getMarginBoxHeight=dojo.html.getOuterHeight=function(){
return dojo.html._callDeprecated("getMarginBoxHeight","getMarginBox",arguments,null,"height");
};
dojo.html.getTotalOffset=function(node,type,_42c){
return dojo.html._callDeprecated("getTotalOffset","getAbsolutePosition",arguments,null,type);
};
dojo.html.getAbsoluteX=function(node,_42e){
return dojo.html._callDeprecated("getAbsoluteX","getAbsolutePosition",arguments,null,"x");
};
dojo.html.getAbsoluteY=function(node,_430){
return dojo.html._callDeprecated("getAbsoluteY","getAbsolutePosition",arguments,null,"y");
};
dojo.html.totalOffsetLeft=function(node,_432){
return dojo.html._callDeprecated("totalOffsetLeft","getAbsolutePosition",arguments,null,"left");
};
dojo.html.totalOffsetTop=function(node,_434){
return dojo.html._callDeprecated("totalOffsetTop","getAbsolutePosition",arguments,null,"top");
};
dojo.html.getMarginWidth=function(node){
return dojo.html._callDeprecated("getMarginWidth","getMargin",arguments,null,"width");
};
dojo.html.getMarginHeight=function(node){
return dojo.html._callDeprecated("getMarginHeight","getMargin",arguments,null,"height");
};
dojo.html.getBorderWidth=function(node){
return dojo.html._callDeprecated("getBorderWidth","getBorder",arguments,null,"width");
};
dojo.html.getBorderHeight=function(node){
return dojo.html._callDeprecated("getBorderHeight","getBorder",arguments,null,"height");
};
dojo.html.getPaddingWidth=function(node){
return dojo.html._callDeprecated("getPaddingWidth","getPadding",arguments,null,"width");
};
dojo.html.getPaddingHeight=function(node){
return dojo.html._callDeprecated("getPaddingHeight","getPadding",arguments,null,"height");
};
dojo.html.getPadBorderWidth=function(node){
return dojo.html._callDeprecated("getPadBorderWidth","getPadBorder",arguments,null,"width");
};
dojo.html.getPadBorderHeight=function(node){
return dojo.html._callDeprecated("getPadBorderHeight","getPadBorder",arguments,null,"height");
};
dojo.html.getBorderBoxWidth=dojo.html.getInnerWidth=function(){
return dojo.html._callDeprecated("getBorderBoxWidth","getBorderBox",arguments,null,"width");
};
dojo.html.getBorderBoxHeight=dojo.html.getInnerHeight=function(){
return dojo.html._callDeprecated("getBorderBoxHeight","getBorderBox",arguments,null,"height");
};
dojo.html.getContentBoxWidth=dojo.html.getContentWidth=function(){
return dojo.html._callDeprecated("getContentBoxWidth","getContentBox",arguments,null,"width");
};
dojo.html.getContentBoxHeight=dojo.html.getContentHeight=function(){
return dojo.html._callDeprecated("getContentBoxHeight","getContentBox",arguments,null,"height");
};
dojo.html.setContentBoxWidth=dojo.html.setContentWidth=function(node,_43e){
return dojo.html._callDeprecated("setContentBoxWidth","setContentBox",arguments,"width");
};
dojo.html.setContentBoxHeight=dojo.html.setContentHeight=function(node,_440){
return dojo.html._callDeprecated("setContentBoxHeight","setContentBox",arguments,"height");
};
dojo.provide("dojo.dnd.HtmlDragManager");
dojo.declare("dojo.dnd.HtmlDragManager",dojo.dnd.DragManager,{disabled:false,nestedTargets:false,mouseDownTimer:null,dsCounter:0,dsPrefix:"dojoDragSource",dropTargetDimensions:[],currentDropTarget:null,previousDropTarget:null,_dragTriggered:false,selectedSources:[],dragObjects:[],dragSources:[],currentX:null,currentY:null,lastX:null,lastY:null,mouseDownX:null,mouseDownY:null,threshold:7,dropAcceptable:false,cancelEvent:function(e){
e.stopPropagation();
e.preventDefault();
},registerDragSource:function(ds){
if(ds["domNode"]){
var dp=this.dsPrefix;
var _444=dp+"Idx_"+(this.dsCounter++);
ds.dragSourceId=_444;
this.dragSources[_444]=ds;
ds.domNode.setAttribute(dp,_444);
if(dojo.render.html.ie){
dojo.event.browser.addListener(ds.domNode,"ondragstart",this.cancelEvent);
}
}
},unregisterDragSource:function(ds){
if(ds["domNode"]){
var dp=this.dsPrefix;
var _447=ds.dragSourceId;
delete ds.dragSourceId;
delete this.dragSources[_447];
ds.domNode.setAttribute(dp,null);
if(dojo.render.html.ie){
dojo.event.browser.removeListener(ds.domNode,"ondragstart",this.cancelEvent);
}
}
},registerDropTarget:function(dt){
this.dropTargets.push(dt);
},unregisterDropTarget:function(dt){
var _44a=dojo.lang.find(this.dropTargets,dt,true);
if(_44a>=0){
this.dropTargets.splice(_44a,1);
}
},getDragSource:function(e){
var tn=e.target;
if(tn===dojo.body()){
return;
}
var ta=dojo.html.getAttribute(tn,this.dsPrefix);
while((!ta)&&(tn)){
tn=tn.parentNode;
if((!tn)||(tn===dojo.body())){
return;
}
ta=dojo.html.getAttribute(tn,this.dsPrefix);
}
return this.dragSources[ta];
},onKeyDown:function(e){
},onMouseDown:function(e){
if(this.disabled){
return;
}
if(dojo.render.html.ie){
if(e.button!=1){
return;
}
}else{
if(e.which!=1){
return;
}
}
var _450=e.target.nodeType==dojo.html.TEXT_NODE?e.target.parentNode:e.target;
if(dojo.html.isTag(_450,"button","textarea","input","select","option")){
return;
}
var ds=this.getDragSource(e);
if(!ds){
return;
}
if(!dojo.lang.inArray(this.selectedSources,ds)){
this.selectedSources.push(ds);
ds.onSelected();
}
this.mouseDownX=e.pageX;
this.mouseDownY=e.pageY;
e.preventDefault();
dojo.event.connect(document,"onmousemove",this,"onMouseMove");
},onMouseUp:function(e,_453){
if(this.selectedSources.length==0){
return;
}
this.mouseDownX=null;
this.mouseDownY=null;
this._dragTriggered=false;
e.dragSource=this.dragSource;
if((!e.shiftKey)&&(!e.ctrlKey)){
if(this.currentDropTarget){
this.currentDropTarget.onDropStart();
}
dojo.lang.forEach(this.dragObjects,function(_454){
var ret=null;
if(!_454){
return;
}
if(this.currentDropTarget){
e.dragObject=_454;
var ce=this.currentDropTarget.domNode.childNodes;
if(ce.length>0){
e.dropTarget=ce[0];
while(e.dropTarget==_454.domNode){
e.dropTarget=e.dropTarget.nextSibling;
}
}else{
e.dropTarget=this.currentDropTarget.domNode;
}
if(this.dropAcceptable){
ret=this.currentDropTarget.onDrop(e);
}else{
this.currentDropTarget.onDragOut(e);
}
}
e.dragStatus=this.dropAcceptable&&ret?"dropSuccess":"dropFailure";
dojo.lang.delayThese([function(){
try{
_454.dragSource.onDragEnd(e);
}
catch(err){
var _457={};
for(var i in e){
if(i=="type"){
_457.type="mouseup";
continue;
}
_457[i]=e[i];
}
_454.dragSource.onDragEnd(_457);
}
},function(){
_454.onDragEnd(e);
}]);
},this);
this.selectedSources=[];
this.dragObjects=[];
this.dragSource=null;
if(this.currentDropTarget){
this.currentDropTarget.onDropEnd();
}
}else{
}
dojo.event.disconnect(document,"onmousemove",this,"onMouseMove");
this.currentDropTarget=null;
},onScroll:function(){
for(var i=0;i<this.dragObjects.length;i++){
if(this.dragObjects[i].updateDragOffset){
this.dragObjects[i].updateDragOffset();
}
}
if(this.dragObjects.length){
this.cacheTargetLocations();
}
},_dragStartDistance:function(x,y){
if((!this.mouseDownX)||(!this.mouseDownX)){
return;
}
var dx=Math.abs(x-this.mouseDownX);
var dx2=dx*dx;
var dy=Math.abs(y-this.mouseDownY);
var dy2=dy*dy;
return parseInt(Math.sqrt(dx2+dy2),10);
},cacheTargetLocations:function(){
dojo.profile.start("cacheTargetLocations");
this.dropTargetDimensions=[];
dojo.lang.forEach(this.dropTargets,function(_460){
var tn=_460.domNode;
if(!tn||!_460.accepts([this.dragSource])){
return;
}
var abs=dojo.html.getAbsolutePosition(tn,true);
var bb=dojo.html.getBorderBox(tn);
this.dropTargetDimensions.push([[abs.x,abs.y],[abs.x+bb.width,abs.y+bb.height],_460]);
},this);
dojo.profile.end("cacheTargetLocations");
},onMouseMove:function(e){
if((dojo.render.html.ie)&&(e.button!=1)){
this.currentDropTarget=null;
this.onMouseUp(e,true);
return;
}
if((this.selectedSources.length)&&(!this.dragObjects.length)){
var dx;
var dy;
if(!this._dragTriggered){
this._dragTriggered=(this._dragStartDistance(e.pageX,e.pageY)>this.threshold);
if(!this._dragTriggered){
return;
}
dx=e.pageX-this.mouseDownX;
dy=e.pageY-this.mouseDownY;
}
this.dragSource=this.selectedSources[0];
dojo.lang.forEach(this.selectedSources,function(_467){
if(!_467){
return;
}
var tdo=_467.onDragStart(e);
if(tdo){
tdo.onDragStart(e);
tdo.dragOffset.y+=dy;
tdo.dragOffset.x+=dx;
tdo.dragSource=_467;
this.dragObjects.push(tdo);
}
},this);
this.previousDropTarget=null;
this.cacheTargetLocations();
}
dojo.lang.forEach(this.dragObjects,function(_469){
if(_469){
_469.onDragMove(e);
}
});
if(this.currentDropTarget){
var c=dojo.html.toCoordinateObject(this.currentDropTarget.domNode,true);
var dtp=[[c.x,c.y],[c.x+c.width,c.y+c.height]];
}
if((!this.nestedTargets)&&(dtp)&&(this.isInsideBox(e,dtp))){
if(this.dropAcceptable){
this.currentDropTarget.onDragMove(e,this.dragObjects);
}
}else{
var _46c=this.findBestTarget(e);
if(_46c.target===null){
if(this.currentDropTarget){
this.currentDropTarget.onDragOut(e);
this.previousDropTarget=this.currentDropTarget;
this.currentDropTarget=null;
}
this.dropAcceptable=false;
return;
}
if(this.currentDropTarget!==_46c.target){
if(this.currentDropTarget){
this.previousDropTarget=this.currentDropTarget;
this.currentDropTarget.onDragOut(e);
}
this.currentDropTarget=_46c.target;
e.dragObjects=this.dragObjects;
this.dropAcceptable=this.currentDropTarget.onDragOver(e);
}else{
if(this.dropAcceptable){
this.currentDropTarget.onDragMove(e,this.dragObjects);
}
}
}
},findBestTarget:function(e){
var _46e=this;
var _46f=new Object();
_46f.target=null;
_46f.points=null;
dojo.lang.every(this.dropTargetDimensions,function(_470){
if(!_46e.isInsideBox(e,_470)){
return true;
}
_46f.target=_470[2];
_46f.points=_470;
return Boolean(_46e.nestedTargets);
});
return _46f;
},isInsideBox:function(e,_472){
if((e.pageX>_472[0][0])&&(e.pageX<_472[1][0])&&(e.pageY>_472[0][1])&&(e.pageY<_472[1][1])){
return true;
}
return false;
},onMouseOver:function(e){
},onMouseOut:function(e){
}});
dojo.dnd.dragManager=new dojo.dnd.HtmlDragManager();
(function(){
var d=document;
var dm=dojo.dnd.dragManager;
dojo.event.connect(d,"onkeydown",dm,"onKeyDown");
dojo.event.connect(d,"onmouseover",dm,"onMouseOver");
dojo.event.connect(d,"onmouseout",dm,"onMouseOut");
dojo.event.connect(d,"onmousedown",dm,"onMouseDown");
dojo.event.connect(d,"onmouseup",dm,"onMouseUp");
dojo.event.connect(window,"onscroll",dm,"onScroll");
})();
dojo.provide("dojo.html.*");
dojo.provide("dojo.html.util");
dojo.html.getElementWindow=function(_477){
return dojo.html.getDocumentWindow(_477.ownerDocument);
};
dojo.html.getDocumentWindow=function(doc){
if(dojo.render.html.safari&&!doc._parentWindow){
var fix=function(win){
win.document._parentWindow=win;
for(var i=0;i<win.frames.length;i++){
fix(win.frames[i]);
}
};
fix(window.top);
}
if(dojo.render.html.ie&&window!==document.parentWindow&&!doc._parentWindow){
doc.parentWindow.execScript("document._parentWindow = window;","Javascript");
var win=doc._parentWindow;
doc._parentWindow=null;
return win;
}
return doc._parentWindow||doc.parentWindow||doc.defaultView;
};
dojo.html.gravity=function(node,e){
node=dojo.byId(node);
var _47f=dojo.html.getCursorPosition(e);
with(dojo.html){
var _480=getAbsolutePosition(node,true);
var bb=getBorderBox(node);
var _482=_480.x+(bb.width/2);
var _483=_480.y+(bb.height/2);
}
with(dojo.html.gravity){
return ((_47f.x<_482?WEST:EAST)|(_47f.y<_483?NORTH:SOUTH));
}
};
dojo.html.gravity.NORTH=1;
dojo.html.gravity.SOUTH=1<<1;
dojo.html.gravity.EAST=1<<2;
dojo.html.gravity.WEST=1<<3;
dojo.html.overElement=function(_484,e){
_484=dojo.byId(_484);
var _486=dojo.html.getCursorPosition(e);
var bb=dojo.html.getBorderBox(_484);
var _488=dojo.html.getAbsolutePosition(_484,true,dojo.html.boxSizing.BORDER_BOX);
var top=_488.y;
var _48a=top+bb.height;
var left=_488.x;
var _48c=left+bb.width;
return (_486.x>=left&&_486.x<=_48c&&_486.y>=top&&_486.y<=_48a);
};
dojo.html.renderedTextContent=function(node){
node=dojo.byId(node);
var _48e="";
if(node==null){
return _48e;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
var _490="unknown";
try{
_490=dojo.html.getStyle(node.childNodes[i],"display");
}
catch(E){
}
switch(_490){
case "block":
case "list-item":
case "run-in":
case "table":
case "table-row-group":
case "table-header-group":
case "table-footer-group":
case "table-row":
case "table-column-group":
case "table-column":
case "table-cell":
case "table-caption":
_48e+="\n";
_48e+=dojo.html.renderedTextContent(node.childNodes[i]);
_48e+="\n";
break;
case "none":
break;
default:
if(node.childNodes[i].tagName&&node.childNodes[i].tagName.toLowerCase()=="br"){
_48e+="\n";
}else{
_48e+=dojo.html.renderedTextContent(node.childNodes[i]);
}
break;
}
break;
case 3:
case 2:
case 4:
var text=node.childNodes[i].nodeValue;
var _492="unknown";
try{
_492=dojo.html.getStyle(node,"text-transform");
}
catch(E){
}
switch(_492){
case "capitalize":
var _493=text.split(" ");
for(var i=0;i<_493.length;i++){
_493[i]=_493[i].charAt(0).toUpperCase()+_493[i].substring(1);
}
text=_493.join(" ");
break;
case "uppercase":
text=text.toUpperCase();
break;
case "lowercase":
text=text.toLowerCase();
break;
default:
break;
}
switch(_492){
case "nowrap":
break;
case "pre-wrap":
break;
case "pre-line":
break;
case "pre":
break;
default:
text=text.replace(/\s+/," ");
if(/\s$/.test(_48e)){
text.replace(/^\s/,"");
}
break;
}
_48e+=text;
break;
default:
break;
}
}
return _48e;
};
dojo.html.createNodesFromText=function(txt,trim){
if(trim){
txt=txt.replace(/^\s+|\s+$/g,"");
}
var tn=dojo.doc().createElement("div");
tn.style.visibility="hidden";
dojo.body().appendChild(tn);
var _497="none";
if((/^<t[dh][\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table><tbody><tr>"+txt+"</tr></tbody></table>";
_497="cell";
}else{
if((/^<tr[\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table><tbody>"+txt+"</tbody></table>";
_497="row";
}else{
if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table>"+txt+"</table>";
_497="section";
}
}
}
tn.innerHTML=txt;
if(tn["normalize"]){
tn.normalize();
}
var _498=null;
switch(_497){
case "cell":
_498=tn.getElementsByTagName("tr")[0];
break;
case "row":
_498=tn.getElementsByTagName("tbody")[0];
break;
case "section":
_498=tn.getElementsByTagName("table")[0];
break;
default:
_498=tn;
break;
}
var _499=[];
for(var x=0;x<_498.childNodes.length;x++){
_499.push(_498.childNodes[x].cloneNode(true));
}
tn.style.display="none";
dojo.html.destroyNode(tn);
return _499;
};
dojo.html.placeOnScreen=function(node,_49c,_49d,_49e,_49f,_4a0,_4a1){
if(_49c instanceof Array||typeof _49c=="array"){
_4a1=_4a0;
_4a0=_49f;
_49f=_49e;
_49e=_49d;
_49d=_49c[1];
_49c=_49c[0];
}
if(_4a0 instanceof String||typeof _4a0=="string"){
_4a0=_4a0.split(",");
}
if(!isNaN(_49e)){
_49e=[Number(_49e),Number(_49e)];
}else{
if(!(_49e instanceof Array||typeof _49e=="array")){
_49e=[0,0];
}
}
var _4a2=dojo.html.getScroll().offset;
var view=dojo.html.getViewport();
node=dojo.byId(node);
var _4a4=node.style.display;
node.style.display="";
var bb=dojo.html.getBorderBox(node);
var w=bb.width;
var h=bb.height;
node.style.display=_4a4;
if(!(_4a0 instanceof Array||typeof _4a0=="array")){
_4a0=["TL"];
}
var _4a8,_4a9,_4aa=Infinity,_4ab;
for(var _4ac=0;_4ac<_4a0.length;++_4ac){
var _4ad=_4a0[_4ac];
var _4ae=true;
var tryX=_49c-(_4ad.charAt(1)=="L"?0:w)+_49e[0]*(_4ad.charAt(1)=="L"?1:-1);
var tryY=_49d-(_4ad.charAt(0)=="T"?0:h)+_49e[1]*(_4ad.charAt(0)=="T"?1:-1);
if(_49f){
tryX-=_4a2.x;
tryY-=_4a2.y;
}
if(tryX<0){
tryX=0;
_4ae=false;
}
if(tryY<0){
tryY=0;
_4ae=false;
}
var x=tryX+w;
if(x>view.width){
x=view.width-w;
_4ae=false;
}else{
x=tryX;
}
x=Math.max(_49e[0],x)+_4a2.x;
var y=tryY+h;
if(y>view.height){
y=view.height-h;
_4ae=false;
}else{
y=tryY;
}
y=Math.max(_49e[1],y)+_4a2.y;
if(_4ae){
_4a8=x;
_4a9=y;
_4aa=0;
_4ab=_4ad;
break;
}else{
var dist=Math.pow(x-tryX-_4a2.x,2)+Math.pow(y-tryY-_4a2.y,2);
if(_4aa>dist){
_4aa=dist;
_4a8=x;
_4a9=y;
_4ab=_4ad;
}
}
}
if(!_4a1){
node.style.left=_4a8+"px";
node.style.top=_4a9+"px";
}
return {left:_4a8,top:_4a9,x:_4a8,y:_4a9,dist:_4aa,corner:_4ab};
};
dojo.html.placeOnScreenPoint=function(node,_4b5,_4b6,_4b7,_4b8){
dojo.deprecated("dojo.html.placeOnScreenPoint","use dojo.html.placeOnScreen() instead","0.5");
return dojo.html.placeOnScreen(node,_4b5,_4b6,_4b7,_4b8,["TL","TR","BL","BR"]);
};
dojo.html.placeOnScreenAroundElement=function(node,_4ba,_4bb,_4bc,_4bd,_4be){
var best,_4c0=Infinity;
_4ba=dojo.byId(_4ba);
var _4c1=_4ba.style.display;
_4ba.style.display="";
var mb=dojo.html.getElementBox(_4ba,_4bc);
var _4c3=mb.width;
var _4c4=mb.height;
var _4c5=dojo.html.getAbsolutePosition(_4ba,true,_4bc);
_4ba.style.display=_4c1;
for(var _4c6 in _4bd){
var pos,_4c8,_4c9;
var _4ca=_4bd[_4c6];
_4c8=_4c5.x+(_4c6.charAt(1)=="L"?0:_4c3);
_4c9=_4c5.y+(_4c6.charAt(0)=="T"?0:_4c4);
pos=dojo.html.placeOnScreen(node,_4c8,_4c9,_4bb,true,_4ca,true);
if(pos.dist==0){
best=pos;
break;
}else{
if(_4c0>pos.dist){
_4c0=pos.dist;
best=pos;
}
}
}
if(!_4be){
node.style.left=best.left+"px";
node.style.top=best.top+"px";
}
return best;
};
dojo.html.scrollIntoView=function(node){
if(!node){
return;
}
if(dojo.render.html.ie){
if(dojo.html.getBorderBox(node.parentNode).height<=node.parentNode.scrollHeight){
node.scrollIntoView(false);
}
}else{
if(dojo.render.html.mozilla){
node.scrollIntoView(false);
}else{
var _4cc=node.parentNode;
var _4cd=_4cc.scrollTop+dojo.html.getBorderBox(_4cc).height;
var _4ce=node.offsetTop+dojo.html.getMarginBox(node).height;
if(_4cd<_4ce){
_4cc.scrollTop+=(_4ce-_4cd);
}else{
if(_4cc.scrollTop>node.offsetTop){
_4cc.scrollTop-=(_4cc.scrollTop-node.offsetTop);
}
}
}
}
};
dojo.provide("dojo.html.selection");
dojo.html.selectionType={NONE:0,TEXT:1,CONTROL:2};
dojo.html.clearSelection=function(){
var _4cf=dojo.global();
var _4d0=dojo.doc();
try{
if(_4cf["getSelection"]){
if(dojo.render.html.safari){
_4cf.getSelection().collapse();
}else{
_4cf.getSelection().removeAllRanges();
}
}else{
if(_4d0.selection){
if(_4d0.selection.empty){
_4d0.selection.empty();
}else{
if(_4d0.selection.clear){
_4d0.selection.clear();
}
}
}
}
return true;
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.html.disableSelection=function(_4d1){
_4d1=dojo.byId(_4d1)||dojo.body();
var h=dojo.render.html;
if(h.mozilla){
_4d1.style.MozUserSelect="none";
}else{
if(h.safari){
_4d1.style.KhtmlUserSelect="none";
}else{
if(h.ie){
_4d1.unselectable="on";
}else{
return false;
}
}
}
return true;
};
dojo.html.enableSelection=function(_4d3){
_4d3=dojo.byId(_4d3)||dojo.body();
var h=dojo.render.html;
if(h.mozilla){
_4d3.style.MozUserSelect="";
}else{
if(h.safari){
_4d3.style.KhtmlUserSelect="";
}else{
if(h.ie){
_4d3.unselectable="off";
}else{
return false;
}
}
}
return true;
};
dojo.html.selectElement=function(_4d5){
dojo.deprecated("dojo.html.selectElement","replaced by dojo.html.selection.selectElementChildren",0.5);
};
dojo.html.selectInputText=function(_4d6){
var _4d7=dojo.global();
var _4d8=dojo.doc();
_4d6=dojo.byId(_4d6);
if(_4d8["selection"]&&dojo.body()["createTextRange"]){
var _4d9=_4d6.createTextRange();
_4d9.moveStart("character",0);
_4d9.moveEnd("character",_4d6.value.length);
_4d9.select();
}else{
if(_4d7["getSelection"]){
var _4da=_4d7.getSelection();
_4d6.setSelectionRange(0,_4d6.value.length);
}
}
_4d6.focus();
};
dojo.html.isSelectionCollapsed=function(){
dojo.deprecated("dojo.html.isSelectionCollapsed","replaced by dojo.html.selection.isCollapsed",0.5);
return dojo.html.selection.isCollapsed();
};
dojo.lang.mixin(dojo.html.selection,{getType:function(){
if(dojo.doc()["selection"]){
return dojo.html.selectionType[dojo.doc().selection.type.toUpperCase()];
}else{
var _4db=dojo.html.selectionType.TEXT;
var oSel;
try{
oSel=dojo.global().getSelection();
}
catch(e){
}
if(oSel&&oSel.rangeCount==1){
var _4dd=oSel.getRangeAt(0);
if(_4dd.startContainer==_4dd.endContainer&&(_4dd.endOffset-_4dd.startOffset)==1&&_4dd.startContainer.nodeType!=dojo.dom.TEXT_NODE){
_4db=dojo.html.selectionType.CONTROL;
}
}
return _4db;
}
},isCollapsed:function(){
var _4de=dojo.global();
var _4df=dojo.doc();
if(_4df["selection"]){
return _4df.selection.createRange().text=="";
}else{
if(_4de["getSelection"]){
var _4e0=_4de.getSelection();
if(dojo.lang.isString(_4e0)){
return _4e0=="";
}else{
return _4e0.isCollapsed||_4e0.toString()=="";
}
}
}
},getSelectedElement:function(){
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
if(dojo.doc()["selection"]){
var _4e1=dojo.doc().selection.createRange();
if(_4e1&&_4e1.item){
return dojo.doc().selection.createRange().item(0);
}
}else{
var _4e2=dojo.global().getSelection();
return _4e2.anchorNode.childNodes[_4e2.anchorOffset];
}
}
},getParentElement:function(){
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
var p=dojo.html.selection.getSelectedElement();
if(p){
return p.parentNode;
}
}else{
if(dojo.doc()["selection"]){
return dojo.doc().selection.createRange().parentElement();
}else{
var _4e4=dojo.global().getSelection();
if(_4e4){
var node=_4e4.anchorNode;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.parentNode;
}
return node;
}
}
}
},getSelectedText:function(){
if(dojo.doc()["selection"]){
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
return null;
}
return dojo.doc().selection.createRange().text;
}else{
var _4e6=dojo.global().getSelection();
if(_4e6){
return _4e6.toString();
}
}
},getSelectedHtml:function(){
if(dojo.doc()["selection"]){
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
return null;
}
return dojo.doc().selection.createRange().htmlText;
}else{
var _4e7=dojo.global().getSelection();
if(_4e7&&_4e7.rangeCount){
var frag=_4e7.getRangeAt(0).cloneContents();
var div=document.createElement("div");
div.appendChild(frag);
return div.innerHTML;
}
return null;
}
},hasAncestorElement:function(_4ea){
return (dojo.html.selection.getAncestorElement.apply(this,arguments)!=null);
},getAncestorElement:function(_4eb){
var node=dojo.html.selection.getSelectedElement()||dojo.html.selection.getParentElement();
while(node){
if(dojo.html.selection.isTag(node,arguments).length>0){
return node;
}
node=node.parentNode;
}
return null;
},isTag:function(node,tags){
if(node&&node.tagName){
for(var i=0;i<tags.length;i++){
if(node.tagName.toLowerCase()==String(tags[i]).toLowerCase()){
return String(tags[i]).toLowerCase();
}
}
}
return "";
},selectElement:function(_4f0){
var _4f1=dojo.global();
var _4f2=dojo.doc();
_4f0=dojo.byId(_4f0);
if(_4f2.selection&&dojo.body().createTextRange){
try{
var _4f3=dojo.body().createControlRange();
_4f3.addElement(_4f0);
_4f3.select();
}
catch(e){
dojo.html.selection.selectElementChildren(_4f0);
}
}else{
if(_4f1["getSelection"]){
var _4f4=_4f1.getSelection();
if(_4f4["removeAllRanges"]){
var _4f3=_4f2.createRange();
_4f3.selectNode(_4f0);
_4f4.removeAllRanges();
_4f4.addRange(_4f3);
}
}
}
},selectElementChildren:function(_4f5){
var _4f6=dojo.global();
var _4f7=dojo.doc();
_4f5=dojo.byId(_4f5);
if(_4f7.selection&&dojo.body().createTextRange){
var _4f8=dojo.body().createTextRange();
_4f8.moveToElementText(_4f5);
_4f8.select();
}else{
if(_4f6["getSelection"]){
var _4f9=_4f6.getSelection();
if(_4f9["setBaseAndExtent"]){
_4f9.setBaseAndExtent(_4f5,0,_4f5,_4f5.innerText.length-1);
}else{
if(_4f9["selectAllChildren"]){
_4f9.selectAllChildren(_4f5);
}
}
}
}
},getBookmark:function(){
var _4fa;
var _4fb=dojo.doc();
if(_4fb["selection"]){
var _4fc=_4fb.selection.createRange();
_4fa=_4fc.getBookmark();
}else{
var _4fd;
try{
_4fd=dojo.global().getSelection();
}
catch(e){
}
if(_4fd){
var _4fc=_4fd.getRangeAt(0);
_4fa=_4fc.cloneRange();
}else{
dojo.debug("No idea how to store the current selection for this browser!");
}
}
return _4fa;
},moveToBookmark:function(_4fe){
var _4ff=dojo.doc();
if(_4ff["selection"]){
var _500=_4ff.selection.createRange();
_500.moveToBookmark(_4fe);
_500.select();
}else{
var _501;
try{
_501=dojo.global().getSelection();
}
catch(e){
}
if(_501&&_501["removeAllRanges"]){
_501.removeAllRanges();
_501.addRange(_4fe);
}else{
dojo.debug("No idea how to restore selection for this browser!");
}
}
},collapse:function(_502){
if(dojo.global()["getSelection"]){
var _503=dojo.global().getSelection();
if(_503.removeAllRanges){
if(_502){
_503.collapseToStart();
}else{
_503.collapseToEnd();
}
}else{
dojo.global().getSelection().collapse(_502);
}
}else{
if(dojo.doc().selection){
var _504=dojo.doc().selection.createRange();
_504.collapse(_502);
_504.select();
}
}
},remove:function(){
if(dojo.doc().selection){
var _505=dojo.doc().selection;
if(_505.type.toUpperCase()!="NONE"){
_505.clear();
}
return _505;
}else{
var _505=dojo.global().getSelection();
for(var i=0;i<_505.rangeCount;i++){
_505.getRangeAt(i).deleteContents();
}
return _505;
}
}});
dojo.provide("dojo.html.iframe");
dojo.html.iframeContentWindow=function(_507){
var win=dojo.html.getDocumentWindow(dojo.html.iframeContentDocument(_507))||dojo.html.iframeContentDocument(_507).__parent__||(_507.name&&document.frames[_507.name])||null;
return win;
};
dojo.html.iframeContentDocument=function(_509){
var doc=_509.contentDocument||((_509.contentWindow)&&(_509.contentWindow.document))||((_509.name)&&(document.frames[_509.name])&&(document.frames[_509.name].document))||null;
return doc;
};
dojo.html.BackgroundIframe=function(node){
if(dojo.render.html.ie55||dojo.render.html.ie60){
var html="<iframe src='javascript:false'"+" style='position: absolute; left: 0px; top: 0px; width: 100%; height: 100%;"+"z-index: -1; filter:Alpha(Opacity=\"0\");' "+">";
this.iframe=dojo.doc().createElement(html);
this.iframe.tabIndex=-1;
if(node){
node.appendChild(this.iframe);
this.domNode=node;
}else{
dojo.body().appendChild(this.iframe);
this.iframe.style.display="none";
}
}
};
dojo.lang.extend(dojo.html.BackgroundIframe,{iframe:null,onResized:function(){
if(this.iframe&&this.domNode&&this.domNode.parentNode){
var _50d=dojo.html.getMarginBox(this.domNode);
if(_50d.width==0||_50d.height==0){
dojo.lang.setTimeout(this,this.onResized,100);
return;
}
this.iframe.style.width=_50d.width+"px";
this.iframe.style.height=_50d.height+"px";
}
},size:function(node){
if(!this.iframe){
return;
}
var _50f=dojo.html.toCoordinateObject(node,true,dojo.html.boxSizing.BORDER_BOX);
with(this.iframe.style){
width=_50f.width+"px";
height=_50f.height+"px";
left=_50f.left+"px";
top=_50f.top+"px";
}
},setZIndex:function(node){
if(!this.iframe){
return;
}
if(dojo.dom.isNode(node)){
this.iframe.style.zIndex=dojo.html.getStyle(node,"z-index")-1;
}else{
if(!isNaN(node)){
this.iframe.style.zIndex=node;
}
}
},show:function(){
if(this.iframe){
this.iframe.style.display="block";
}
},hide:function(){
if(this.iframe){
this.iframe.style.display="none";
}
},remove:function(){
if(this.iframe){
dojo.html.removeNode(this.iframe,true);
delete this.iframe;
this.iframe=null;
}
}});
dojo.provide("dojo.gfx.color");
dojo.gfx.color.Color=function(r,g,b,a){
if(dojo.lang.isArray(r)){
this.r=r[0];
this.g=r[1];
this.b=r[2];
this.a=r[3]||1;
}else{
if(dojo.lang.isString(r)){
var rgb=dojo.gfx.color.extractRGB(r);
this.r=rgb[0];
this.g=rgb[1];
this.b=rgb[2];
this.a=g||1;
}else{
if(r instanceof dojo.gfx.color.Color){
this.r=r.r;
this.b=r.b;
this.g=r.g;
this.a=r.a;
}else{
this.r=r;
this.g=g;
this.b=b;
this.a=a;
}
}
}
};
dojo.gfx.color.Color.fromArray=function(arr){
return new dojo.gfx.color.Color(arr[0],arr[1],arr[2],arr[3]);
};
dojo.extend(dojo.gfx.color.Color,{toRgb:function(_517){
if(_517){
return this.toRgba();
}else{
return [this.r,this.g,this.b];
}
},toRgba:function(){
return [this.r,this.g,this.b,this.a];
},toHex:function(){
return dojo.gfx.color.rgb2hex(this.toRgb());
},toCss:function(){
return "rgb("+this.toRgb().join()+")";
},toString:function(){
return this.toHex();
},blend:function(_518,_519){
var rgb=null;
if(dojo.lang.isArray(_518)){
rgb=_518;
}else{
if(_518 instanceof dojo.gfx.color.Color){
rgb=_518.toRgb();
}else{
rgb=new dojo.gfx.color.Color(_518).toRgb();
}
}
return dojo.gfx.color.blend(this.toRgb(),rgb,_519);
}});
dojo.gfx.color.named={white:[255,255,255],black:[0,0,0],red:[255,0,0],green:[0,255,0],lime:[0,255,0],blue:[0,0,255],navy:[0,0,128],gray:[128,128,128],silver:[192,192,192]};
dojo.gfx.color.blend=function(a,b,_51d){
if(typeof a=="string"){
return dojo.gfx.color.blendHex(a,b,_51d);
}
if(!_51d){
_51d=0;
}
_51d=Math.min(Math.max(-1,_51d),1);
_51d=((_51d+1)/2);
var c=[];
for(var x=0;x<3;x++){
c[x]=parseInt(b[x]+((a[x]-b[x])*_51d));
}
return c;
};
dojo.gfx.color.blendHex=function(a,b,_522){
return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a),dojo.gfx.color.hex2rgb(b),_522));
};
dojo.gfx.color.extractRGB=function(_523){
var hex="0123456789abcdef";
_523=_523.toLowerCase();
if(_523.indexOf("rgb")==0){
var _525=_523.match(/rgba*\((\d+), *(\d+), *(\d+)/i);
var ret=_525.splice(1,3);
return ret;
}else{
var _527=dojo.gfx.color.hex2rgb(_523);
if(_527){
return _527;
}else{
return dojo.gfx.color.named[_523]||[255,255,255];
}
}
};
dojo.gfx.color.hex2rgb=function(hex){
var _529="0123456789ABCDEF";
var rgb=new Array(3);
if(hex.indexOf("#")==0){
hex=hex.substring(1);
}
hex=hex.toUpperCase();
if(hex.replace(new RegExp("["+_529+"]","g"),"")!=""){
return null;
}
if(hex.length==3){
rgb[0]=hex.charAt(0)+hex.charAt(0);
rgb[1]=hex.charAt(1)+hex.charAt(1);
rgb[2]=hex.charAt(2)+hex.charAt(2);
}else{
rgb[0]=hex.substring(0,2);
rgb[1]=hex.substring(2,4);
rgb[2]=hex.substring(4);
}
for(var i=0;i<rgb.length;i++){
rgb[i]=_529.indexOf(rgb[i].charAt(0))*16+_529.indexOf(rgb[i].charAt(1));
}
return rgb;
};
dojo.gfx.color.rgb2hex=function(r,g,b){
if(dojo.lang.isArray(r)){
g=r[1]||0;
b=r[2]||0;
r=r[0]||0;
}
var ret=dojo.lang.map([r,g,b],function(x){
x=new Number(x);
var s=x.toString(16);
while(s.length<2){
s="0"+s;
}
return s;
});
ret.unshift("#");
return ret.join("");
};
dojo.provide("dojo.lfx.Animation");
dojo.lfx.Line=function(_532,end){
this.start=_532;
this.end=end;
if(dojo.lang.isArray(_532)){
var diff=[];
dojo.lang.forEach(this.start,function(s,i){
diff[i]=this.end[i]-s;
},this);
this.getValue=function(n){
var res=[];
dojo.lang.forEach(this.start,function(s,i){
res[i]=(diff[i]*n)+s;
},this);
return res;
};
}else{
var diff=end-_532;
this.getValue=function(n){
return (diff*n)+this.start;
};
}
};
dojo.lfx.easeDefault=function(n){
if(dojo.render.html.khtml){
return (parseFloat("0.5")+((Math.sin((n+parseFloat("1.5"))*Math.PI))/2));
}else{
return (0.5+((Math.sin((n+1.5)*Math.PI))/2));
}
};
dojo.lfx.easeIn=function(n){
return Math.pow(n,3);
};
dojo.lfx.easeOut=function(n){
return (1-Math.pow(1-n,3));
};
dojo.lfx.easeInOut=function(n){
return ((3*Math.pow(n,2))-(2*Math.pow(n,3)));
};
dojo.lfx.IAnimation=function(){
};
dojo.lang.extend(dojo.lfx.IAnimation,{curve:null,duration:1000,easing:null,repeatCount:0,rate:25,handler:null,beforeBegin:null,onBegin:null,onAnimate:null,onEnd:null,onPlay:null,onPause:null,onStop:null,play:null,pause:null,stop:null,connect:function(evt,_541,_542){
if(!_542){
_542=_541;
_541=this;
}
_542=dojo.lang.hitch(_541,_542);
var _543=this[evt]||function(){
};
this[evt]=function(){
var ret=_543.apply(this,arguments);
_542.apply(this,arguments);
return ret;
};
return this;
},fire:function(evt,args){
if(this[evt]){
this[evt].apply(this,(args||[]));
}
return this;
},repeat:function(_547){
this.repeatCount=_547;
return this;
},_active:false,_paused:false});
dojo.lfx.Animation=function(_548,_549,_54a,_54b,_54c,rate){
dojo.lfx.IAnimation.call(this);
if(dojo.lang.isNumber(_548)||(!_548&&_549.getValue)){
rate=_54c;
_54c=_54b;
_54b=_54a;
_54a=_549;
_549=_548;
_548=null;
}else{
if(_548.getValue||dojo.lang.isArray(_548)){
rate=_54b;
_54c=_54a;
_54b=_549;
_54a=_548;
_549=null;
_548=null;
}
}
if(dojo.lang.isArray(_54a)){
this.curve=new dojo.lfx.Line(_54a[0],_54a[1]);
}else{
this.curve=_54a;
}
if(_549!=null&&_549>0){
this.duration=_549;
}
if(_54c){
this.repeatCount=_54c;
}
if(rate){
this.rate=rate;
}
if(_548){
dojo.lang.forEach(["handler","beforeBegin","onBegin","onEnd","onPlay","onStop","onAnimate"],function(item){
if(_548[item]){
this.connect(item,_548[item]);
}
},this);
}
if(_54b&&dojo.lang.isFunction(_54b)){
this.easing=_54b;
}
};
dojo.inherits(dojo.lfx.Animation,dojo.lfx.IAnimation);
dojo.lang.extend(dojo.lfx.Animation,{_startTime:null,_endTime:null,_timer:null,_percent:0,_startRepeatCount:0,play:function(_54f,_550){
if(_550){
clearTimeout(this._timer);
this._active=false;
this._paused=false;
this._percent=0;
}else{
if(this._active&&!this._paused){
return this;
}
}
this.fire("handler",["beforeBegin"]);
this.fire("beforeBegin");
if(_54f>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_550);
}),_54f);
return this;
}
this._startTime=new Date().valueOf();
if(this._paused){
this._startTime-=(this.duration*this._percent/100);
}
this._endTime=this._startTime+this.duration;
this._active=true;
this._paused=false;
var step=this._percent/100;
var _552=this.curve.getValue(step);
if(this._percent==0){
if(!this._startRepeatCount){
this._startRepeatCount=this.repeatCount;
}
this.fire("handler",["begin",_552]);
this.fire("onBegin",[_552]);
}
this.fire("handler",["play",_552]);
this.fire("onPlay",[_552]);
this._cycle();
return this;
},pause:function(){
clearTimeout(this._timer);
if(!this._active){
return this;
}
this._paused=true;
var _553=this.curve.getValue(this._percent/100);
this.fire("handler",["pause",_553]);
this.fire("onPause",[_553]);
return this;
},gotoPercent:function(pct,_555){
clearTimeout(this._timer);
this._active=true;
this._paused=true;
this._percent=pct;
if(_555){
this.play();
}
return this;
},stop:function(_556){
clearTimeout(this._timer);
var step=this._percent/100;
if(_556){
step=1;
}
var _558=this.curve.getValue(step);
this.fire("handler",["stop",_558]);
this.fire("onStop",[_558]);
this._active=false;
this._paused=false;
return this;
},status:function(){
if(this._active){
return this._paused?"paused":"playing";
}else{
return "stopped";
}
return this;
},_cycle:function(){
clearTimeout(this._timer);
if(this._active){
var curr=new Date().valueOf();
var step=(curr-this._startTime)/(this._endTime-this._startTime);
if(step>=1){
step=1;
this._percent=100;
}else{
this._percent=step*100;
}
if((this.easing)&&(dojo.lang.isFunction(this.easing))){
step=this.easing(step);
}
var _55b=this.curve.getValue(step);
this.fire("handler",["animate",_55b]);
this.fire("onAnimate",[_55b]);
if(step<1){
this._timer=setTimeout(dojo.lang.hitch(this,"_cycle"),this.rate);
}else{
this._active=false;
this.fire("handler",["end"]);
this.fire("onEnd");
if(this.repeatCount>0){
this.repeatCount--;
this.play(null,true);
}else{
if(this.repeatCount==-1){
this.play(null,true);
}else{
if(this._startRepeatCount){
this.repeatCount=this._startRepeatCount;
this._startRepeatCount=0;
}
}
}
}
}
return this;
}});
dojo.lfx.Combine=function(_55c){
dojo.lfx.IAnimation.call(this);
this._anims=[];
this._animsEnded=0;
var _55d=arguments;
if(_55d.length==1&&(dojo.lang.isArray(_55d[0])||dojo.lang.isArrayLike(_55d[0]))){
_55d=_55d[0];
}
dojo.lang.forEach(_55d,function(anim){
this._anims.push(anim);
anim.connect("onEnd",dojo.lang.hitch(this,"_onAnimsEnded"));
},this);
};
dojo.inherits(dojo.lfx.Combine,dojo.lfx.IAnimation);
dojo.lang.extend(dojo.lfx.Combine,{_animsEnded:0,play:function(_55f,_560){
if(!this._anims.length){
return this;
}
this.fire("beforeBegin");
if(_55f>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_560);
}),_55f);
return this;
}
if(_560||this._anims[0].percent==0){
this.fire("onBegin");
}
this.fire("onPlay");
this._animsCall("play",null,_560);
return this;
},pause:function(){
this.fire("onPause");
this._animsCall("pause");
return this;
},stop:function(_561){
this.fire("onStop");
this._animsCall("stop",_561);
return this;
},_onAnimsEnded:function(){
this._animsEnded++;
if(this._animsEnded>=this._anims.length){
this.fire("onEnd");
}
return this;
},_animsCall:function(_562){
var args=[];
if(arguments.length>1){
for(var i=1;i<arguments.length;i++){
args.push(arguments[i]);
}
}
var _565=this;
dojo.lang.forEach(this._anims,function(anim){
anim[_562](args);
},_565);
return this;
}});
dojo.lfx.Chain=function(_567){
dojo.lfx.IAnimation.call(this);
this._anims=[];
this._currAnim=-1;
var _568=arguments;
if(_568.length==1&&(dojo.lang.isArray(_568[0])||dojo.lang.isArrayLike(_568[0]))){
_568=_568[0];
}
var _569=this;
dojo.lang.forEach(_568,function(anim,i,_56c){
this._anims.push(anim);
if(i<_56c.length-1){
anim.connect("onEnd",dojo.lang.hitch(this,"_playNext"));
}else{
anim.connect("onEnd",dojo.lang.hitch(this,function(){
this.fire("onEnd");
}));
}
},this);
};
dojo.inherits(dojo.lfx.Chain,dojo.lfx.IAnimation);
dojo.lang.extend(dojo.lfx.Chain,{_currAnim:-1,play:function(_56d,_56e){
if(!this._anims.length){
return this;
}
if(_56e||!this._anims[this._currAnim]){
this._currAnim=0;
}
var _56f=this._anims[this._currAnim];
this.fire("beforeBegin");
if(_56d>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_56e);
}),_56d);
return this;
}
if(_56f){
if(this._currAnim==0){
this.fire("handler",["begin",this._currAnim]);
this.fire("onBegin",[this._currAnim]);
}
this.fire("onPlay",[this._currAnim]);
_56f.play(null,_56e);
}
return this;
},pause:function(){
if(this._anims[this._currAnim]){
this._anims[this._currAnim].pause();
this.fire("onPause",[this._currAnim]);
}
return this;
},playPause:function(){
if(this._anims.length==0){
return this;
}
if(this._currAnim==-1){
this._currAnim=0;
}
var _570=this._anims[this._currAnim];
if(_570){
if(!_570._active||_570._paused){
this.play();
}else{
this.pause();
}
}
return this;
},stop:function(){
var _571=this._anims[this._currAnim];
if(_571){
_571.stop();
this.fire("onStop",[this._currAnim]);
}
return _571;
},_playNext:function(){
if(this._currAnim==-1||this._anims.length==0){
return this;
}
this._currAnim++;
if(this._anims[this._currAnim]){
this._anims[this._currAnim].play(null,true);
}
return this;
}});
dojo.lfx.combine=function(_572){
var _573=arguments;
if(dojo.lang.isArray(arguments[0])){
_573=arguments[0];
}
if(_573.length==1){
return _573[0];
}
return new dojo.lfx.Combine(_573);
};
dojo.lfx.chain=function(_574){
var _575=arguments;
if(dojo.lang.isArray(arguments[0])){
_575=arguments[0];
}
if(_575.length==1){
return _575[0];
}
return new dojo.lfx.Chain(_575);
};
dojo.provide("dojo.html.color");
dojo.html.getBackgroundColor=function(node){
node=dojo.byId(node);
var _577;
do{
_577=dojo.html.getStyle(node,"background-color");
if(_577.toLowerCase()=="rgba(0, 0, 0, 0)"){
_577="transparent";
}
if(node==document.getElementsByTagName("body")[0]){
node=null;
break;
}
node=node.parentNode;
}while(node&&dojo.lang.inArray(["transparent",""],_577));
if(_577=="transparent"){
_577=[255,255,255,0];
}else{
_577=dojo.gfx.color.extractRGB(_577);
}
return _577;
};
dojo.provide("dojo.lfx.html");
dojo.lfx.html._byId=function(_578){
if(!_578){
return [];
}
if(dojo.lang.isArrayLike(_578)){
if(!_578.alreadyChecked){
var n=[];
dojo.lang.forEach(_578,function(node){
n.push(dojo.byId(node));
});
n.alreadyChecked=true;
return n;
}else{
return _578;
}
}else{
var n=[];
n.push(dojo.byId(_578));
n.alreadyChecked=true;
return n;
}
};
dojo.lfx.html.propertyAnimation=function(_57b,_57c,_57d,_57e,_57f){
_57b=dojo.lfx.html._byId(_57b);
var _580={"propertyMap":_57c,"nodes":_57b,"duration":_57d,"easing":_57e||dojo.lfx.easeDefault};
var _581=function(args){
if(args.nodes.length==1){
var pm=args.propertyMap;
if(!dojo.lang.isArray(args.propertyMap)){
var parr=[];
for(var _585 in pm){
pm[_585].property=_585;
parr.push(pm[_585]);
}
pm=args.propertyMap=parr;
}
dojo.lang.forEach(pm,function(prop){
if(dj_undef("start",prop)){
if(prop.property!="opacity"){
prop.start=parseInt(dojo.html.getComputedStyle(args.nodes[0],prop.property));
}else{
prop.start=dojo.html.getOpacity(args.nodes[0]);
}
}
});
}
};
var _587=function(_588){
var _589=[];
dojo.lang.forEach(_588,function(c){
_589.push(Math.round(c));
});
return _589;
};
var _58b=function(n,_58d){
n=dojo.byId(n);
if(!n||!n.style){
return;
}
for(var s in _58d){
try{
if(s=="opacity"){
dojo.html.setOpacity(n,_58d[s]);
}else{
n.style[s]=_58d[s];
}
}
catch(e){
dojo.debug(e);
}
}
};
var _58f=function(_590){
this._properties=_590;
this.diffs=new Array(_590.length);
dojo.lang.forEach(_590,function(prop,i){
if(dojo.lang.isFunction(prop.start)){
prop.start=prop.start(prop,i);
}
if(dojo.lang.isFunction(prop.end)){
prop.end=prop.end(prop,i);
}
if(dojo.lang.isArray(prop.start)){
this.diffs[i]=null;
}else{
if(prop.start instanceof dojo.gfx.color.Color){
prop.startRgb=prop.start.toRgb();
prop.endRgb=prop.end.toRgb();
}else{
this.diffs[i]=prop.end-prop.start;
}
}
},this);
this.getValue=function(n){
var ret={};
dojo.lang.forEach(this._properties,function(prop,i){
var _597=null;
if(dojo.lang.isArray(prop.start)){
}else{
if(prop.start instanceof dojo.gfx.color.Color){
_597=(prop.units||"rgb")+"(";
for(var j=0;j<prop.startRgb.length;j++){
_597+=Math.round(((prop.endRgb[j]-prop.startRgb[j])*n)+prop.startRgb[j])+(j<prop.startRgb.length-1?",":"");
}
_597+=")";
}else{
_597=((this.diffs[i])*n)+prop.start+(prop.property!="opacity"?prop.units||"px":"");
}
}
ret[dojo.html.toCamelCase(prop.property)]=_597;
},this);
return ret;
};
};
var anim=new dojo.lfx.Animation({beforeBegin:function(){
_581(_580);
anim.curve=new _58f(_580.propertyMap);
},onAnimate:function(_59a){
dojo.lang.forEach(_580.nodes,function(node){
_58b(node,_59a);
});
}},_580.duration,null,_580.easing);
if(_57f){
for(var x in _57f){
if(dojo.lang.isFunction(_57f[x])){
anim.connect(x,anim,_57f[x]);
}
}
}
return anim;
};
dojo.lfx.html._makeFadeable=function(_59d){
var _59e=function(node){
if(dojo.render.html.ie){
if((node.style.zoom.length==0)&&(dojo.html.getStyle(node,"zoom")=="normal")){
node.style.zoom="1";
}
if((node.style.width.length==0)&&(dojo.html.getStyle(node,"width")=="auto")){
node.style.width="auto";
}
}
};
if(dojo.lang.isArrayLike(_59d)){
dojo.lang.forEach(_59d,_59e);
}else{
_59e(_59d);
}
};
dojo.lfx.html.fade=function(_5a0,_5a1,_5a2,_5a3,_5a4){
_5a0=dojo.lfx.html._byId(_5a0);
var _5a5={property:"opacity"};
if(!dj_undef("start",_5a1)){
_5a5.start=_5a1.start;
}else{
_5a5.start=function(){
return dojo.html.getOpacity(_5a0[0]);
};
}
if(!dj_undef("end",_5a1)){
_5a5.end=_5a1.end;
}else{
dojo.raise("dojo.lfx.html.fade needs an end value");
}
var anim=dojo.lfx.propertyAnimation(_5a0,[_5a5],_5a2,_5a3);
anim.connect("beforeBegin",function(){
dojo.lfx.html._makeFadeable(_5a0);
});
if(_5a4){
anim.connect("onEnd",function(){
_5a4(_5a0,anim);
});
}
return anim;
};
dojo.lfx.html.fadeIn=function(_5a7,_5a8,_5a9,_5aa){
return dojo.lfx.html.fade(_5a7,{end:1},_5a8,_5a9,_5aa);
};
dojo.lfx.html.fadeOut=function(_5ab,_5ac,_5ad,_5ae){
return dojo.lfx.html.fade(_5ab,{end:0},_5ac,_5ad,_5ae);
};
dojo.lfx.html.fadeShow=function(_5af,_5b0,_5b1,_5b2){
_5af=dojo.lfx.html._byId(_5af);
dojo.lang.forEach(_5af,function(node){
dojo.html.setOpacity(node,0);
});
var anim=dojo.lfx.html.fadeIn(_5af,_5b0,_5b1,_5b2);
anim.connect("beforeBegin",function(){
if(dojo.lang.isArrayLike(_5af)){
dojo.lang.forEach(_5af,dojo.html.show);
}else{
dojo.html.show(_5af);
}
});
return anim;
};
dojo.lfx.html.fadeHide=function(_5b5,_5b6,_5b7,_5b8){
var anim=dojo.lfx.html.fadeOut(_5b5,_5b6,_5b7,function(){
if(dojo.lang.isArrayLike(_5b5)){
dojo.lang.forEach(_5b5,dojo.html.hide);
}else{
dojo.html.hide(_5b5);
}
if(_5b8){
_5b8(_5b5,anim);
}
});
return anim;
};
dojo.lfx.html.wipeIn=function(_5ba,_5bb,_5bc,_5bd){
_5ba=dojo.lfx.html._byId(_5ba);
var _5be=[];
dojo.lang.forEach(_5ba,function(node){
var _5c0={};
var _5c1,_5c2,_5c3;
with(node.style){
_5c1=top;
_5c2=left;
_5c3=position;
top="-9999px";
left="-9999px";
position="absolute";
display="";
}
var _5c4=dojo.html.getBorderBox(node).height;
with(node.style){
top=_5c1;
left=_5c2;
position=_5c3;
display="none";
}
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:1,end:function(){
return _5c4;
}}},_5bb,_5bc);
anim.connect("beforeBegin",function(){
_5c0.overflow=node.style.overflow;
_5c0.height=node.style.height;
with(node.style){
overflow="hidden";
_5c4="1px";
}
dojo.html.show(node);
});
anim.connect("onEnd",function(){
with(node.style){
overflow=_5c0.overflow;
_5c4=_5c0.height;
}
if(_5bd){
_5bd(node,anim);
}
});
_5be.push(anim);
});
return dojo.lfx.combine(_5be);
};
dojo.lfx.html.wipeOut=function(_5c6,_5c7,_5c8,_5c9){
_5c6=dojo.lfx.html._byId(_5c6);
var _5ca=[];
dojo.lang.forEach(_5c6,function(node){
var _5cc={};
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:function(){
return dojo.html.getContentBox(node).height;
},end:1}},_5c7,_5c8,{"beforeBegin":function(){
_5cc.overflow=node.style.overflow;
_5cc.height=node.style.height;
with(node.style){
overflow="hidden";
}
dojo.html.show(node);
},"onEnd":function(){
dojo.html.hide(node);
with(node.style){
overflow=_5cc.overflow;
height=_5cc.height;
}
if(_5c9){
_5c9(node,anim);
}
}});
_5ca.push(anim);
});
return dojo.lfx.combine(_5ca);
};
dojo.lfx.html.slideTo=function(_5ce,_5cf,_5d0,_5d1,_5d2){
_5ce=dojo.lfx.html._byId(_5ce);
var _5d3=[];
var _5d4=dojo.html.getComputedStyle;
if(dojo.lang.isArray(_5cf)){
dojo.deprecated("dojo.lfx.html.slideTo(node, array)","use dojo.lfx.html.slideTo(node, {top: value, left: value});","0.5");
_5cf={top:_5cf[0],left:_5cf[1]};
}
dojo.lang.forEach(_5ce,function(node){
var top=null;
var left=null;
var init=(function(){
var _5d9=node;
return function(){
var pos=_5d4(_5d9,"position");
top=(pos=="absolute"?node.offsetTop:parseInt(_5d4(node,"top"))||0);
left=(pos=="absolute"?node.offsetLeft:parseInt(_5d4(node,"left"))||0);
if(!dojo.lang.inArray(["absolute","relative"],pos)){
var ret=dojo.html.abs(_5d9,true);
dojo.html.setStyleAttributes(_5d9,"position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;");
top=ret.y;
left=ret.x;
}
};
})();
init();
var anim=dojo.lfx.propertyAnimation(node,{"top":{start:top,end:(_5cf.top||0)},"left":{start:left,end:(_5cf.left||0)}},_5d0,_5d1,{"beforeBegin":init});
if(_5d2){
anim.connect("onEnd",function(){
_5d2(_5ce,anim);
});
}
_5d3.push(anim);
});
return dojo.lfx.combine(_5d3);
};
dojo.lfx.html.slideBy=function(_5dd,_5de,_5df,_5e0,_5e1){
_5dd=dojo.lfx.html._byId(_5dd);
var _5e2=[];
var _5e3=dojo.html.getComputedStyle;
if(dojo.lang.isArray(_5de)){
dojo.deprecated("dojo.lfx.html.slideBy(node, array)","use dojo.lfx.html.slideBy(node, {top: value, left: value});","0.5");
_5de={top:_5de[0],left:_5de[1]};
}
dojo.lang.forEach(_5dd,function(node){
var top=null;
var left=null;
var init=(function(){
var _5e8=node;
return function(){
var pos=_5e3(_5e8,"position");
top=(pos=="absolute"?node.offsetTop:parseInt(_5e3(node,"top"))||0);
left=(pos=="absolute"?node.offsetLeft:parseInt(_5e3(node,"left"))||0);
if(!dojo.lang.inArray(["absolute","relative"],pos)){
var ret=dojo.html.abs(_5e8,true);
dojo.html.setStyleAttributes(_5e8,"position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;");
top=ret.y;
left=ret.x;
}
};
})();
init();
var anim=dojo.lfx.propertyAnimation(node,{"top":{start:top,end:top+(_5de.top||0)},"left":{start:left,end:left+(_5de.left||0)}},_5df,_5e0).connect("beforeBegin",init);
if(_5e1){
anim.connect("onEnd",function(){
_5e1(_5dd,anim);
});
}
_5e2.push(anim);
});
return dojo.lfx.combine(_5e2);
};
dojo.lfx.html.explode=function(_5ec,_5ed,_5ee,_5ef,_5f0){
var h=dojo.html;
_5ec=dojo.byId(_5ec);
_5ed=dojo.byId(_5ed);
var _5f2=h.toCoordinateObject(_5ec,true);
var _5f3=document.createElement("div");
h.copyStyle(_5f3,_5ed);
if(_5ed.explodeClassName){
_5f3.className=_5ed.explodeClassName;
}
with(_5f3.style){
position="absolute";
display="none";
var _5f4=h.getStyle(_5ec,"background-color");
backgroundColor=_5f4?_5f4.toLowerCase():"transparent";
backgroundColor=(backgroundColor=="transparent")?"rgb(221, 221, 221)":backgroundColor;
}
dojo.body().appendChild(_5f3);
with(_5ed.style){
visibility="hidden";
display="block";
}
var _5f5=h.toCoordinateObject(_5ed,true);
with(_5ed.style){
display="none";
visibility="visible";
}
var _5f6={opacity:{start:0.5,end:1}};
dojo.lang.forEach(["height","width","top","left"],function(type){
_5f6[type]={start:_5f2[type],end:_5f5[type]};
});
var anim=new dojo.lfx.propertyAnimation(_5f3,_5f6,_5ee,_5ef,{"beforeBegin":function(){
h.setDisplay(_5f3,"block");
},"onEnd":function(){
h.setDisplay(_5ed,"block");
_5f3.parentNode.removeChild(_5f3);
}});
if(_5f0){
anim.connect("onEnd",function(){
_5f0(_5ed,anim);
});
}
return anim;
};
dojo.lfx.html.implode=function(_5f9,end,_5fb,_5fc,_5fd){
var h=dojo.html;
_5f9=dojo.byId(_5f9);
end=dojo.byId(end);
var _5ff=dojo.html.toCoordinateObject(_5f9,true);
var _600=dojo.html.toCoordinateObject(end,true);
var _601=document.createElement("div");
dojo.html.copyStyle(_601,_5f9);
if(_5f9.explodeClassName){
_601.className=_5f9.explodeClassName;
}
dojo.html.setOpacity(_601,0.3);
with(_601.style){
position="absolute";
display="none";
backgroundColor=h.getStyle(_5f9,"background-color").toLowerCase();
}
dojo.body().appendChild(_601);
var _602={opacity:{start:1,end:0.5}};
dojo.lang.forEach(["height","width","top","left"],function(type){
_602[type]={start:_5ff[type],end:_600[type]};
});
var anim=new dojo.lfx.propertyAnimation(_601,_602,_5fb,_5fc,{"beforeBegin":function(){
dojo.html.hide(_5f9);
dojo.html.show(_601);
},"onEnd":function(){
_601.parentNode.removeChild(_601);
}});
if(_5fd){
anim.connect("onEnd",function(){
_5fd(_5f9,anim);
});
}
return anim;
};
dojo.lfx.html.highlight=function(_605,_606,_607,_608,_609){
_605=dojo.lfx.html._byId(_605);
var _60a=[];
dojo.lang.forEach(_605,function(node){
var _60c=dojo.html.getBackgroundColor(node);
var bg=dojo.html.getStyle(node,"background-color").toLowerCase();
var _60e=dojo.html.getStyle(node,"background-image");
var _60f=(bg=="transparent"||bg=="rgba(0, 0, 0, 0)");
while(_60c.length>3){
_60c.pop();
}
var rgb=new dojo.gfx.color.Color(_606);
var _611=new dojo.gfx.color.Color(_60c);
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:rgb,end:_611}},_607,_608,{"beforeBegin":function(){
if(_60e){
node.style.backgroundImage="none";
}
node.style.backgroundColor="rgb("+rgb.toRgb().join(",")+")";
},"onEnd":function(){
if(_60e){
node.style.backgroundImage=_60e;
}
if(_60f){
node.style.backgroundColor="transparent";
}
if(_609){
_609(node,anim);
}
}});
_60a.push(anim);
});
return dojo.lfx.combine(_60a);
};
dojo.lfx.html.unhighlight=function(_613,_614,_615,_616,_617){
_613=dojo.lfx.html._byId(_613);
var _618=[];
dojo.lang.forEach(_613,function(node){
var _61a=new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node));
var rgb=new dojo.gfx.color.Color(_614);
var _61c=dojo.html.getStyle(node,"background-image");
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:_61a,end:rgb}},_615,_616,{"beforeBegin":function(){
if(_61c){
node.style.backgroundImage="none";
}
node.style.backgroundColor="rgb("+_61a.toRgb().join(",")+")";
},"onEnd":function(){
if(_617){
_617(node,anim);
}
}});
_618.push(anim);
});
return dojo.lfx.combine(_618);
};
dojo.lang.mixin(dojo.lfx,dojo.lfx.html);
dojo.provide("dojo.lfx.*");
dojo.provide("dojo.dnd.HtmlDragAndDrop");
dojo.declare("dojo.dnd.HtmlDragSource",dojo.dnd.DragSource,{dragClass:"",onDragStart:function(){
var _61e=new dojo.dnd.HtmlDragObject(this.dragObject,this.type);
if(this.dragClass){
_61e.dragClass=this.dragClass;
}
if(this.constrainToContainer){
_61e.constrainTo(this.constrainingContainer||this.domNode.parentNode);
}
return _61e;
},setDragHandle:function(node){
node=dojo.byId(node);
dojo.dnd.dragManager.unregisterDragSource(this);
this.domNode=node;
dojo.dnd.dragManager.registerDragSource(this);
},setDragTarget:function(node){
this.dragObject=node;
},constrainTo:function(_621){
this.constrainToContainer=true;
if(_621){
this.constrainingContainer=_621;
}
},onSelected:function(){
for(var i=0;i<this.dragObjects.length;i++){
dojo.dnd.dragManager.selectedSources.push(new dojo.dnd.HtmlDragSource(this.dragObjects[i]));
}
},addDragObjects:function(el){
for(var i=0;i<arguments.length;i++){
this.dragObjects.push(dojo.byId(arguments[i]));
}
}},function(node,type){
node=dojo.byId(node);
this.dragObjects=[];
this.constrainToContainer=false;
if(node){
this.domNode=node;
this.dragObject=node;
this.type=(type)||(this.domNode.nodeName.toLowerCase());
dojo.dnd.DragSource.prototype.reregister.call(this);
}
});
dojo.declare("dojo.dnd.HtmlDragObject",dojo.dnd.DragObject,{dragClass:"",opacity:0.5,createIframe:true,disableX:false,disableY:false,createDragNode:function(){
var node=this.domNode.cloneNode(true);
if(this.dragClass){
dojo.html.addClass(node,this.dragClass);
}
if(this.opacity<1){
dojo.html.setOpacity(node,this.opacity);
}
var ltn=node.tagName.toLowerCase();
var isTr=(ltn=="tr");
if((isTr)||(ltn=="tbody")){
var doc=this.domNode.ownerDocument;
var _62b=doc.createElement("table");
if(isTr){
var _62c=doc.createElement("tbody");
_62b.appendChild(_62c);
_62c.appendChild(node);
}else{
_62b.appendChild(node);
}
var _62d=((isTr)?this.domNode:this.domNode.firstChild);
var _62e=((isTr)?node:node.firstChild);
var _62f=tdp.childNodes;
var _630=_62e.childNodes;
for(var i=0;i<_62f.length;i++){
if((_630[i])&&(_630[i].style)){
_630[i].style.width=dojo.html.getContentBox(_62f[i]).width+"px";
}
}
node=_62b;
}
if((dojo.render.html.ie55||dojo.render.html.ie60)&&this.createIframe){
with(node.style){
top="0px";
left="0px";
}
var _632=document.createElement("div");
_632.appendChild(node);
this.bgIframe=new dojo.html.BackgroundIframe(_632);
_632.appendChild(this.bgIframe.iframe);
node=_632;
}
node.style.zIndex=999;
return node;
},onDragStart:function(e){
dojo.html.clearSelection();
this.scrollOffset=dojo.html.getScroll().offset;
this.dragStartPosition=dojo.html.getAbsolutePosition(this.domNode,true);
this.dragOffset={y:this.dragStartPosition.y-e.pageY,x:this.dragStartPosition.x-e.pageX};
this.dragClone=this.createDragNode();
this.containingBlockPosition=this.domNode.offsetParent?dojo.html.getAbsolutePosition(this.domNode.offsetParent,true):{x:0,y:0};
if(this.constrainToContainer){
this.constraints=this.getConstraints();
}
with(this.dragClone.style){
position="absolute";
top=this.dragOffset.y+e.pageY+"px";
left=this.dragOffset.x+e.pageX+"px";
}
dojo.body().appendChild(this.dragClone);
dojo.event.topic.publish("dragStart",{source:this});
},getConstraints:function(){
if(this.constrainingContainer.nodeName.toLowerCase()=="body"){
var _634=dojo.html.getViewport();
var _635=_634.width;
var _636=_634.height;
var _637=dojo.html.getScroll().offset;
var x=_637.x;
var y=_637.y;
}else{
var _63a=dojo.html.getContentBox(this.constrainingContainer);
_635=_63a.width;
_636=_63a.height;
x=this.containingBlockPosition.x+dojo.html.getPixelValue(this.constrainingContainer,"padding-left",true)+dojo.html.getBorderExtent(this.constrainingContainer,"left");
y=this.containingBlockPosition.y+dojo.html.getPixelValue(this.constrainingContainer,"padding-top",true)+dojo.html.getBorderExtent(this.constrainingContainer,"top");
}
var mb=dojo.html.getMarginBox(this.domNode);
return {minX:x,minY:y,maxX:x+_635-mb.width,maxY:y+_636-mb.height};
},updateDragOffset:function(){
var _63c=dojo.html.getScroll().offset;
if(_63c.y!=this.scrollOffset.y){
var diff=_63c.y-this.scrollOffset.y;
this.dragOffset.y+=diff;
this.scrollOffset.y=_63c.y;
}
if(_63c.x!=this.scrollOffset.x){
var diff=_63c.x-this.scrollOffset.x;
this.dragOffset.x+=diff;
this.scrollOffset.x=_63c.x;
}
},onDragMove:function(e){
this.updateDragOffset();
var x=this.dragOffset.x+e.pageX;
var y=this.dragOffset.y+e.pageY;
if(this.constrainToContainer){
if(x<this.constraints.minX){
x=this.constraints.minX;
}
if(y<this.constraints.minY){
y=this.constraints.minY;
}
if(x>this.constraints.maxX){
x=this.constraints.maxX;
}
if(y>this.constraints.maxY){
y=this.constraints.maxY;
}
}
this.setAbsolutePosition(x,y);
dojo.event.topic.publish("dragMove",{source:this});
},setAbsolutePosition:function(x,y){
if(!this.disableY){
this.dragClone.style.top=y+"px";
}
if(!this.disableX){
this.dragClone.style.left=x+"px";
}
},onDragEnd:function(e){
switch(e.dragStatus){
case "dropSuccess":
dojo.html.removeNode(this.dragClone);
this.dragClone=null;
break;
case "dropFailure":
var _644=dojo.html.getAbsolutePosition(this.dragClone,true);
var _645={left:this.dragStartPosition.x+1,top:this.dragStartPosition.y+1};
var anim=dojo.lfx.slideTo(this.dragClone,_645,300);
var _647=this;
dojo.event.connect(anim,"onEnd",function(e){
dojo.html.removeNode(_647.dragClone);
_647.dragClone=null;
});
anim.play();
break;
}
dojo.event.topic.publish("dragEnd",{source:this});
},constrainTo:function(_649){
this.constrainToContainer=true;
if(_649){
this.constrainingContainer=_649;
}else{
this.constrainingContainer=this.domNode.parentNode;
}
}},function(node,type){
this.domNode=dojo.byId(node);
this.type=type;
this.constrainToContainer=false;
this.dragSource=null;
dojo.dnd.DragObject.prototype.register.call(this);
});
dojo.declare("dojo.dnd.HtmlDropTarget",dojo.dnd.DropTarget,{vertical:false,onDragOver:function(e){
if(!this.accepts(e.dragObjects)){
return false;
}
this.childBoxes=[];
for(var i=0,_64e;i<this.domNode.childNodes.length;i++){
_64e=this.domNode.childNodes[i];
if(_64e.nodeType!=dojo.html.ELEMENT_NODE){
continue;
}
var pos=dojo.html.getAbsolutePosition(_64e,true);
var _650=dojo.html.getBorderBox(_64e);
this.childBoxes.push({top:pos.y,bottom:pos.y+_650.height,left:pos.x,right:pos.x+_650.width,height:_650.height,width:_650.width,node:_64e});
}
return true;
},_getNodeUnderMouse:function(e){
for(var i=0,_653;i<this.childBoxes.length;i++){
with(this.childBoxes[i]){
if(e.pageX>=left&&e.pageX<=right&&e.pageY>=top&&e.pageY<=bottom){
return i;
}
}
}
return -1;
},createDropIndicator:function(){
this.dropIndicator=document.createElement("div");
with(this.dropIndicator.style){
position="absolute";
zIndex=999;
if(this.vertical){
borderLeftWidth="1px";
borderLeftColor="black";
borderLeftStyle="solid";
height=dojo.html.getBorderBox(this.domNode).height+"px";
top=dojo.html.getAbsolutePosition(this.domNode,true).y+"px";
}else{
borderTopWidth="1px";
borderTopColor="black";
borderTopStyle="solid";
width=dojo.html.getBorderBox(this.domNode).width+"px";
left=dojo.html.getAbsolutePosition(this.domNode,true).x+"px";
}
}
},onDragMove:function(e,_655){
var i=this._getNodeUnderMouse(e);
if(!this.dropIndicator){
this.createDropIndicator();
}
var _657=this.vertical?dojo.html.gravity.WEST:dojo.html.gravity.NORTH;
var hide=false;
if(i<0){
if(this.childBoxes.length){
var _659=(dojo.html.gravity(this.childBoxes[0].node,e)&_657);
if(_659){
hide=true;
}
}else{
var _659=true;
}
}else{
var _65a=this.childBoxes[i];
var _659=(dojo.html.gravity(_65a.node,e)&_657);
if(_65a.node===_655[0].dragSource.domNode){
hide=true;
}else{
var _65b=_659?(i>0?this.childBoxes[i-1]:_65a):(i<this.childBoxes.length-1?this.childBoxes[i+1]:_65a);
if(_65b.node===_655[0].dragSource.domNode){
hide=true;
}
}
}
if(hide){
this.dropIndicator.style.display="none";
return;
}else{
this.dropIndicator.style.display="";
}
this.placeIndicator(e,_655,i,_659);
if(!dojo.html.hasParent(this.dropIndicator)){
dojo.body().appendChild(this.dropIndicator);
}
},placeIndicator:function(e,_65d,_65e,_65f){
var _660=this.vertical?"left":"top";
var _661;
if(_65e<0){
if(this.childBoxes.length){
_661=_65f?this.childBoxes[0]:this.childBoxes[this.childBoxes.length-1];
}else{
this.dropIndicator.style[_660]=dojo.html.getAbsolutePosition(this.domNode,true)[this.vertical?"x":"y"]+"px";
}
}else{
_661=this.childBoxes[_65e];
}
if(_661){
this.dropIndicator.style[_660]=(_65f?_661[_660]:_661[this.vertical?"right":"bottom"])+"px";
if(this.vertical){
this.dropIndicator.style.height=_661.height+"px";
this.dropIndicator.style.top=_661.top+"px";
}else{
this.dropIndicator.style.width=_661.width+"px";
this.dropIndicator.style.left=_661.left+"px";
}
}
},onDragOut:function(e){
if(this.dropIndicator){
dojo.html.removeNode(this.dropIndicator);
delete this.dropIndicator;
}
},onDrop:function(e){
this.onDragOut(e);
var i=this._getNodeUnderMouse(e);
var _665=this.vertical?dojo.html.gravity.WEST:dojo.html.gravity.NORTH;
if(i<0){
if(this.childBoxes.length){
if(dojo.html.gravity(this.childBoxes[0].node,e)&_665){
return this.insert(e,this.childBoxes[0].node,"before");
}else{
return this.insert(e,this.childBoxes[this.childBoxes.length-1].node,"after");
}
}
return this.insert(e,this.domNode,"append");
}
var _666=this.childBoxes[i];
if(dojo.html.gravity(_666.node,e)&_665){
return this.insert(e,_666.node,"before");
}else{
return this.insert(e,_666.node,"after");
}
},insert:function(e,_668,_669){
var node=e.dragObject.domNode;
if(_669=="before"){
return dojo.html.insertBefore(node,_668);
}else{
if(_669=="after"){
return dojo.html.insertAfter(node,_668);
}else{
if(_669=="append"){
_668.appendChild(node);
return true;
}
}
}
return false;
}},function(node,_66c){
if(arguments.length==0){
return;
}
this.domNode=dojo.byId(node);
dojo.dnd.DropTarget.call(this);
if(_66c&&dojo.lang.isString(_66c)){
_66c=[_66c];
}
this.acceptedTypes=_66c||[];
dojo.dnd.dragManager.registerDropTarget(this);
});
dojo.provide("dojo.dnd.*");
dojo.provide("dojo.string.common");
dojo.string.trim=function(str,wh){
if(!str.replace){
return str;
}
if(!str.length){
return str;
}
var re=(wh>0)?(/^\s+/):(wh<0)?(/\s+$/):(/^\s+|\s+$/g);
return str.replace(re,"");
};
dojo.string.trimStart=function(str){
return dojo.string.trim(str,1);
};
dojo.string.trimEnd=function(str){
return dojo.string.trim(str,-1);
};
dojo.string.repeat=function(str,_673,_674){
var out="";
for(var i=0;i<_673;i++){
out+=str;
if(_674&&i<_673-1){
out+=_674;
}
}
return out;
};
dojo.string.pad=function(str,len,c,dir){
var out=String(str);
if(!c){
c="0";
}
if(!dir){
dir=1;
}
while(out.length<len){
if(dir>0){
out=c+out;
}else{
out+=c;
}
}
return out;
};
dojo.string.padLeft=function(str,len,c){
return dojo.string.pad(str,len,c,1);
};
dojo.string.padRight=function(str,len,c){
return dojo.string.pad(str,len,c,-1);
};
dojo.provide("dojo.string");
dojo.provide("dojo.io.common");
dojo.io.transports=[];
dojo.io.hdlrFuncNames=["load","error","timeout"];
dojo.io.Request=function(url,_683,_684,_685){
if((arguments.length==1)&&(arguments[0].constructor==Object)){
this.fromKwArgs(arguments[0]);
}else{
this.url=url;
if(_683){
this.mimetype=_683;
}
if(_684){
this.transport=_684;
}
if(arguments.length>=4){
this.changeUrl=_685;
}
}
};
dojo.lang.extend(dojo.io.Request,{url:"",mimetype:"text/plain",method:"GET",content:undefined,transport:undefined,changeUrl:undefined,formNode:undefined,sync:false,bindSuccess:false,useCache:false,preventCache:false,load:function(type,data,_688,_689){
},error:function(type,_68b,_68c,_68d){
},timeout:function(type,_68f,_690,_691){
},handle:function(type,data,_694,_695){
},timeoutSeconds:0,abort:function(){
},fromKwArgs:function(_696){
if(_696["url"]){
_696.url=_696.url.toString();
}
if(_696["formNode"]){
_696.formNode=dojo.byId(_696.formNode);
}
if(!_696["method"]&&_696["formNode"]&&_696["formNode"].method){
_696.method=_696["formNode"].method;
}
if(!_696["handle"]&&_696["handler"]){
_696.handle=_696.handler;
}
if(!_696["load"]&&_696["loaded"]){
_696.load=_696.loaded;
}
if(!_696["changeUrl"]&&_696["changeURL"]){
_696.changeUrl=_696.changeURL;
}
_696.encoding=dojo.lang.firstValued(_696["encoding"],djConfig["bindEncoding"],"");
_696.sendTransport=dojo.lang.firstValued(_696["sendTransport"],djConfig["ioSendTransport"],false);
var _697=dojo.lang.isFunction;
for(var x=0;x<dojo.io.hdlrFuncNames.length;x++){
var fn=dojo.io.hdlrFuncNames[x];
if(_696[fn]&&_697(_696[fn])){
continue;
}
if(_696["handle"]&&_697(_696["handle"])){
_696[fn]=_696.handle;
}
}
dojo.lang.mixin(this,_696);
}});
dojo.io.Error=function(msg,type,num){
this.message=msg;
this.type=type||"unknown";
this.number=num||0;
};
dojo.io.transports.addTransport=function(name){
this.push(name);
this[name]=dojo.io[name];
};
dojo.io.bind=function(_69e){
if(!(_69e instanceof dojo.io.Request)){
try{
_69e=new dojo.io.Request(_69e);
}
catch(e){
dojo.debug(e);
}
}
var _69f="";
if(_69e["transport"]){
_69f=_69e["transport"];
if(!this[_69f]){
dojo.io.sendBindError(_69e,"No dojo.io.bind() transport with name '"+_69e["transport"]+"'.");
return _69e;
}
if(!this[_69f].canHandle(_69e)){
dojo.io.sendBindError(_69e,"dojo.io.bind() transport with name '"+_69e["transport"]+"' cannot handle this type of request.");
return _69e;
}
}else{
for(var x=0;x<dojo.io.transports.length;x++){
var tmp=dojo.io.transports[x];
if((this[tmp])&&(this[tmp].canHandle(_69e))){
_69f=tmp;
break;
}
}
if(_69f==""){
dojo.io.sendBindError(_69e,"None of the loaded transports for dojo.io.bind()"+" can handle the request.");
return _69e;
}
}
this[_69f].bind(_69e);
_69e.bindSuccess=true;
return _69e;
};
dojo.io.sendBindError=function(_6a2,_6a3){
if((typeof _6a2.error=="function"||typeof _6a2.handle=="function")&&(typeof setTimeout=="function"||typeof setTimeout=="object")){
var _6a4=new dojo.io.Error(_6a3);
setTimeout(function(){
_6a2[(typeof _6a2.error=="function")?"error":"handle"]("error",_6a4,null,_6a2);
},50);
}else{
dojo.raise(_6a3);
}
};
dojo.io.queueBind=function(_6a5){
if(!(_6a5 instanceof dojo.io.Request)){
try{
_6a5=new dojo.io.Request(_6a5);
}
catch(e){
dojo.debug(e);
}
}
var _6a6=_6a5.load;
_6a5.load=function(){
dojo.io._queueBindInFlight=false;
var ret=_6a6.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
var _6a8=_6a5.error;
_6a5.error=function(){
dojo.io._queueBindInFlight=false;
var ret=_6a8.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
dojo.io._bindQueue.push(_6a5);
dojo.io._dispatchNextQueueBind();
return _6a5;
};
dojo.io._dispatchNextQueueBind=function(){
if(!dojo.io._queueBindInFlight){
dojo.io._queueBindInFlight=true;
if(dojo.io._bindQueue.length>0){
dojo.io.bind(dojo.io._bindQueue.shift());
}else{
dojo.io._queueBindInFlight=false;
}
}
};
dojo.io._bindQueue=[];
dojo.io._queueBindInFlight=false;
dojo.io.argsFromMap=function(map,_6ab,last){
var enc=/utf/i.test(_6ab||"")?encodeURIComponent:dojo.string.encodeAscii;
var _6ae=[];
var _6af=new Object();
for(var name in map){
var _6b1=function(elt){
var val=enc(name)+"="+enc(elt);
_6ae[(last==name)?"push":"unshift"](val);
};
if(!_6af[name]){
var _6b4=map[name];
if(dojo.lang.isArray(_6b4)){
dojo.lang.forEach(_6b4,_6b1);
}else{
_6b1(_6b4);
}
}
}
return _6ae.join("&");
};
dojo.io.setIFrameSrc=function(_6b5,src,_6b7){
try{
var r=dojo.render.html;
if(!_6b7){
if(r.safari){
_6b5.location=src;
}else{
frames[_6b5.name].location=src;
}
}else{
var idoc;
if(r.ie){
idoc=_6b5.contentWindow.document;
}else{
if(r.safari){
idoc=_6b5.document;
}else{
idoc=_6b5.contentWindow;
}
}
if(!idoc){
_6b5.location=src;
return;
}else{
idoc.location.replace(src);
}
}
}
catch(e){
dojo.debug(e);
dojo.debug("setIFrameSrc: "+e);
}
};
dojo.provide("dojo.string.extras");
dojo.string.substituteParams=function(_6ba,hash){
var map=(typeof hash=="object")?hash:dojo.lang.toArray(arguments,1);
return _6ba.replace(/\%\{(\w+)\}/g,function(_6bd,key){
if(typeof (map[key])!="undefined"&&map[key]!=null){
return map[key];
}
dojo.raise("Substitution not found: "+key);
});
};
dojo.string.capitalize=function(str){
if(!dojo.lang.isString(str)){
return "";
}
if(arguments.length==0){
str=this;
}
var _6c0=str.split(" ");
for(var i=0;i<_6c0.length;i++){
_6c0[i]=_6c0[i].charAt(0).toUpperCase()+_6c0[i].substring(1);
}
return _6c0.join(" ");
};
dojo.string.isBlank=function(str){
if(!dojo.lang.isString(str)){
return true;
}
return (dojo.string.trim(str).length==0);
};
dojo.string.encodeAscii=function(str){
if(!dojo.lang.isString(str)){
return str;
}
var ret="";
var _6c5=escape(str);
var _6c6,re=/%u([0-9A-F]{4})/i;
while((_6c6=_6c5.match(re))){
var num=Number("0x"+_6c6[1]);
var _6c9=escape("&#"+num+";");
ret+=_6c5.substring(0,_6c6.index)+_6c9;
_6c5=_6c5.substring(_6c6.index+_6c6[0].length);
}
ret+=_6c5.replace(/\+/g,"%2B");
return ret;
};
dojo.string.escape=function(type,str){
var args=dojo.lang.toArray(arguments,1);
switch(type.toLowerCase()){
case "xml":
case "html":
case "xhtml":
return dojo.string.escapeXml.apply(this,args);
case "sql":
return dojo.string.escapeSql.apply(this,args);
case "regexp":
case "regex":
return dojo.string.escapeRegExp.apply(this,args);
case "javascript":
case "jscript":
case "js":
return dojo.string.escapeJavaScript.apply(this,args);
case "ascii":
return dojo.string.encodeAscii.apply(this,args);
default:
return str;
}
};
dojo.string.escapeXml=function(str,_6ce){
str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
if(!_6ce){
str=str.replace(/'/gm,"&#39;");
}
return str;
};
dojo.string.escapeSql=function(str){
return str.replace(/'/gm,"''");
};
dojo.string.escapeRegExp=function(str){
return str.replace(/\\/gm,"\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm,"\\$1");
};
dojo.string.escapeJavaScript=function(str){
return str.replace(/(["'\f\b\n\t\r])/gm,"\\$1");
};
dojo.string.escapeString=function(str){
return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");
};
dojo.string.summary=function(str,len){
if(!len||str.length<=len){
return str;
}
return str.substring(0,len).replace(/\.+$/,"")+"...";
};
dojo.string.endsWith=function(str,end,_6d7){
if(_6d7){
str=str.toLowerCase();
end=end.toLowerCase();
}
if((str.length-end.length)<0){
return false;
}
return str.lastIndexOf(end)==str.length-end.length;
};
dojo.string.endsWithAny=function(str){
for(var i=1;i<arguments.length;i++){
if(dojo.string.endsWith(str,arguments[i])){
return true;
}
}
return false;
};
dojo.string.startsWith=function(str,_6db,_6dc){
if(_6dc){
str=str.toLowerCase();
_6db=_6db.toLowerCase();
}
return str.indexOf(_6db)==0;
};
dojo.string.startsWithAny=function(str){
for(var i=1;i<arguments.length;i++){
if(dojo.string.startsWith(str,arguments[i])){
return true;
}
}
return false;
};
dojo.string.has=function(str){
for(var i=1;i<arguments.length;i++){
if(str.indexOf(arguments[i])>-1){
return true;
}
}
return false;
};
dojo.string.normalizeNewlines=function(text,_6e2){
if(_6e2=="\n"){
text=text.replace(/\r\n/g,"\n");
text=text.replace(/\r/g,"\n");
}else{
if(_6e2=="\r"){
text=text.replace(/\r\n/g,"\r");
text=text.replace(/\n/g,"\r");
}else{
text=text.replace(/([^\r])\n/g,"$1\r\n").replace(/\r([^\n])/g,"\r\n$1");
}
}
return text;
};
dojo.string.splitEscaped=function(str,_6e4){
var _6e5=[];
for(var i=0,_6e7=0;i<str.length;i++){
if(str.charAt(i)=="\\"){
i++;
continue;
}
if(str.charAt(i)==_6e4){
_6e5.push(str.substring(_6e7,i));
_6e7=i+1;
}
}
_6e5.push(str.substr(_6e7));
return _6e5;
};
dojo.provide("dojo.undo.browser");
try{
if((!djConfig["preventBackButtonFix"])&&(!dojo.hostenv.post_load_)){
document.write("<iframe style='border: 0px; width: 1px; height: 1px; position: absolute; bottom: 0px; right: 0px; visibility: visible;' name='djhistory' id='djhistory' src='"+(dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"'></iframe>");
}
}
catch(e){
}
if(dojo.render.html.opera){
dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work.");
}
dojo.undo.browser={initialHref:(!dj_undef("window"))?window.location.href:"",initialHash:(!dj_undef("window"))?window.location.hash:"",moveForward:false,historyStack:[],forwardStack:[],historyIframe:null,bookmarkAnchor:null,locationTimer:null,setInitialState:function(args){
this.initialState=this._createState(this.initialHref,args,this.initialHash);
},addToHistory:function(args){
this.forwardStack=[];
var hash=null;
var url=null;
if(!this.historyIframe){
this.historyIframe=window.frames["djhistory"];
}
if(!this.bookmarkAnchor){
this.bookmarkAnchor=document.createElement("a");
dojo.body().appendChild(this.bookmarkAnchor);
this.bookmarkAnchor.style.display="none";
}
if(args["changeUrl"]){
hash="#"+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());
if(this.historyStack.length==0&&this.initialState.urlHash==hash){
this.initialState=this._createState(url,args,hash);
return;
}else{
if(this.historyStack.length>0&&this.historyStack[this.historyStack.length-1].urlHash==hash){
this.historyStack[this.historyStack.length-1]=this._createState(url,args,hash);
return;
}
}
this.changingUrl=true;
setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;",1);
this.bookmarkAnchor.href=hash;
if(dojo.render.html.ie){
url=this._loadIframeHistory();
var _6ec=args["back"]||args["backButton"]||args["handle"];
var tcb=function(_6ee){
if(window.location.hash!=""){
setTimeout("window.location.href = '"+hash+"';",1);
}
_6ec.apply(this,[_6ee]);
};
if(args["back"]){
args.back=tcb;
}else{
if(args["backButton"]){
args.backButton=tcb;
}else{
if(args["handle"]){
args.handle=tcb;
}
}
}
var _6ef=args["forward"]||args["forwardButton"]||args["handle"];
var tfw=function(_6f1){
if(window.location.hash!=""){
window.location.href=hash;
}
if(_6ef){
_6ef.apply(this,[_6f1]);
}
};
if(args["forward"]){
args.forward=tfw;
}else{
if(args["forwardButton"]){
args.forwardButton=tfw;
}else{
if(args["handle"]){
args.handle=tfw;
}
}
}
}else{
if(dojo.render.html.moz){
if(!this.locationTimer){
this.locationTimer=setInterval("dojo.undo.browser.checkLocation();",200);
}
}
}
}else{
url=this._loadIframeHistory();
}
this.historyStack.push(this._createState(url,args,hash));
},checkLocation:function(){
if(!this.changingUrl){
var hsl=this.historyStack.length;
if((window.location.hash==this.initialHash||window.location.href==this.initialHref)&&(hsl==1)){
this.handleBackButton();
return;
}
if(this.forwardStack.length>0){
if(this.forwardStack[this.forwardStack.length-1].urlHash==window.location.hash){
this.handleForwardButton();
return;
}
}
if((hsl>=2)&&(this.historyStack[hsl-2])){
if(this.historyStack[hsl-2].urlHash==window.location.hash){
this.handleBackButton();
return;
}
}
}
},iframeLoaded:function(evt,_6f4){
if(!dojo.render.html.opera){
var _6f5=this._getUrlQuery(_6f4.href);
if(_6f5==null){
if(this.historyStack.length==1){
this.handleBackButton();
}
return;
}
if(this.moveForward){
this.moveForward=false;
return;
}
if(this.historyStack.length>=2&&_6f5==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){
this.handleBackButton();
}else{
if(this.forwardStack.length>0&&_6f5==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){
this.handleForwardButton();
}
}
}
},handleBackButton:function(){
var _6f6=this.historyStack.pop();
if(!_6f6){
return;
}
var last=this.historyStack[this.historyStack.length-1];
if(!last&&this.historyStack.length==0){
last=this.initialState;
}
if(last){
if(last.kwArgs["back"]){
last.kwArgs["back"]();
}else{
if(last.kwArgs["backButton"]){
last.kwArgs["backButton"]();
}else{
if(last.kwArgs["handle"]){
last.kwArgs.handle("back");
}
}
}
}
this.forwardStack.push(_6f6);
},handleForwardButton:function(){
var last=this.forwardStack.pop();
if(!last){
return;
}
if(last.kwArgs["forward"]){
last.kwArgs.forward();
}else{
if(last.kwArgs["forwardButton"]){
last.kwArgs.forwardButton();
}else{
if(last.kwArgs["handle"]){
last.kwArgs.handle("forward");
}
}
}
this.historyStack.push(last);
},_createState:function(url,args,hash){
return {"url":url,"kwArgs":args,"urlHash":hash};
},_getUrlQuery:function(url){
var _6fd=url.split("?");
if(_6fd.length<2){
return null;
}else{
return _6fd[1];
}
},_loadIframeHistory:function(){
var url=dojo.hostenv.getBaseScriptUri()+"iframe_history.html?"+(new Date()).getTime();
this.moveForward=true;
dojo.io.setIFrameSrc(this.historyIframe,url,false);
return url;
}};
dojo.provide("dojo.io.BrowserIO");
if(!dj_undef("window")){
dojo.io.checkChildrenForFile=function(node){
var _700=false;
var _701=node.getElementsByTagName("input");
dojo.lang.forEach(_701,function(_702){
if(_700){
return;
}
if(_702.getAttribute("type")=="file"){
_700=true;
}
});
return _700;
};
dojo.io.formHasFile=function(_703){
return dojo.io.checkChildrenForFile(_703);
};
dojo.io.updateNode=function(node,_705){
node=dojo.byId(node);
var args=_705;
if(dojo.lang.isString(_705)){
args={url:_705};
}
args.mimetype="text/html";
args.load=function(t,d,e){
while(node.firstChild){
dojo.dom.destroyNode(node.firstChild);
}
node.innerHTML=d;
};
dojo.io.bind(args);
};
dojo.io.formFilter=function(node){
var type=(node.type||"").toLowerCase();
return !node.disabled&&node.name&&!dojo.lang.inArray(["file","submit","image","reset","button"],type);
};
dojo.io.encodeForm=function(_70c,_70d,_70e){
if((!_70c)||(!_70c.tagName)||(!_70c.tagName.toLowerCase()=="form")){
dojo.raise("Attempted to encode a non-form element.");
}
if(!_70e){
_70e=dojo.io.formFilter;
}
var enc=/utf/i.test(_70d||"")?encodeURIComponent:dojo.string.encodeAscii;
var _710=[];
for(var i=0;i<_70c.elements.length;i++){
var elm=_70c.elements[i];
if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_70e(elm)){
continue;
}
var name=enc(elm.name);
var type=elm.type.toLowerCase();
if(type=="select-multiple"){
for(var j=0;j<elm.options.length;j++){
if(elm.options[j].selected){
_710.push(name+"="+enc(elm.options[j].value));
}
}
}else{
if(dojo.lang.inArray(["radio","checkbox"],type)){
if(elm.checked){
_710.push(name+"="+enc(elm.value));
}
}else{
_710.push(name+"="+enc(elm.value));
}
}
}
var _716=_70c.getElementsByTagName("input");
for(var i=0;i<_716.length;i++){
var _717=_716[i];
if(_717.type.toLowerCase()=="image"&&_717.form==_70c&&_70e(_717)){
var name=enc(_717.name);
_710.push(name+"="+enc(_717.value));
_710.push(name+".x=0");
_710.push(name+".y=0");
}
}
return _710.join("&")+"&";
};
dojo.io.FormBind=function(args){
this.bindArgs={};
if(args&&args.formNode){
this.init(args);
}else{
if(args){
this.init({formNode:args});
}
}
};
dojo.lang.extend(dojo.io.FormBind,{form:null,bindArgs:null,clickedButton:null,init:function(args){
var form=dojo.byId(args.formNode);
if(!form||!form.tagName||form.tagName.toLowerCase()!="form"){
throw new Error("FormBind: Couldn't apply, invalid form");
}else{
if(this.form==form){
return;
}else{
if(this.form){
throw new Error("FormBind: Already applied to a form");
}
}
}
dojo.lang.mixin(this.bindArgs,args);
this.form=form;
this.connect(form,"onsubmit","submit");
for(var i=0;i<form.elements.length;i++){
var node=form.elements[i];
if(node&&node.type&&dojo.lang.inArray(["submit","button"],node.type.toLowerCase())){
this.connect(node,"onclick","click");
}
}
var _71d=form.getElementsByTagName("input");
for(var i=0;i<_71d.length;i++){
var _71e=_71d[i];
if(_71e.type.toLowerCase()=="image"&&_71e.form==form){
this.connect(_71e,"onclick","click");
}
}
},onSubmit:function(form){
return true;
},submit:function(e){
e.preventDefault();
if(this.onSubmit(this.form)){
dojo.io.bind(dojo.lang.mixin(this.bindArgs,{formFilter:dojo.lang.hitch(this,"formFilter")}));
}
},click:function(e){
var node=e.currentTarget;
if(node.disabled){
return;
}
this.clickedButton=node;
},formFilter:function(node){
var type=(node.type||"").toLowerCase();
var _725=false;
if(node.disabled||!node.name){
_725=false;
}else{
if(dojo.lang.inArray(["submit","button","image"],type)){
if(!this.clickedButton){
this.clickedButton=node;
}
_725=node==this.clickedButton;
}else{
_725=!dojo.lang.inArray(["file","submit","reset","button"],type);
}
}
return _725;
},connect:function(_726,_727,_728){
if(dojo.evalObjPath("dojo.event.connect")){
dojo.event.connect(_726,_727,this,_728);
}else{
var fcn=dojo.lang.hitch(this,_728);
_726[_727]=function(e){
if(!e){
e=window.event;
}
if(!e.currentTarget){
e.currentTarget=e.srcElement;
}
if(!e.preventDefault){
e.preventDefault=function(){
window.event.returnValue=false;
};
}
fcn(e);
};
}
}});
dojo.io.XMLHTTPTransport=new function(){
var _72b=this;
var _72c={};
this.useCache=false;
this.preventCache=false;
function getCacheKey(url,_72e,_72f){
return url+"|"+_72e+"|"+_72f.toLowerCase();
}
function addToCache(url,_731,_732,http){
_72c[getCacheKey(url,_731,_732)]=http;
}
function getFromCache(url,_735,_736){
return _72c[getCacheKey(url,_735,_736)];
}
this.clearCache=function(){
_72c={};
};
function doLoad(_737,http,url,_73a,_73b){
if(((http.status>=200)&&(http.status<300))||(http.status==304)||(location.protocol=="file:"&&(http.status==0||http.status==undefined))||(location.protocol=="chrome:"&&(http.status==0||http.status==undefined))){
var ret;
if(_737.method.toLowerCase()=="head"){
var _73d=http.getAllResponseHeaders();
ret={};
ret.toString=function(){
return _73d;
};
var _73e=_73d.split(/[\r\n]+/g);
for(var i=0;i<_73e.length;i++){
var pair=_73e[i].match(/^([^:]+)\s*:\s*(.+)$/i);
if(pair){
ret[pair[1]]=pair[2];
}
}
}else{
if(_737.mimetype=="text/javascript"){
try{
ret=dj_eval(http.responseText);
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=null;
}
}else{
if(_737.mimetype=="text/json"||_737.mimetype=="application/json"){
try{
ret=dj_eval("("+http.responseText+")");
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=false;
}
}else{
if((_737.mimetype=="application/xml")||(_737.mimetype=="text/xml")){
ret=http.responseXML;
if(!ret||typeof ret=="string"||!http.getResponseHeader("Content-Type")){
ret=dojo.dom.createDocumentFromText(http.responseText);
}
}else{
ret=http.responseText;
}
}
}
}
if(_73b){
addToCache(url,_73a,_737.method,http);
}
_737[(typeof _737.load=="function")?"load":"handle"]("load",ret,http,_737);
}else{
var _741=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText);
_737[(typeof _737.error=="function")?"error":"handle"]("error",_741,http,_737);
}
}
function setHeaders(http,_743){
if(_743["headers"]){
for(var _744 in _743["headers"]){
if(_744.toLowerCase()=="content-type"&&!_743["contentType"]){
_743["contentType"]=_743["headers"][_744];
}else{
http.setRequestHeader(_744,_743["headers"][_744]);
}
}
}
}
this.inFlight=[];
this.inFlightTimer=null;
this.startWatchingInFlight=function(){
if(!this.inFlightTimer){
this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10);
}
};
this.watchInFlight=function(){
var now=null;
if(!dojo.hostenv._blockAsync&&!_72b._blockAsync){
for(var x=this.inFlight.length-1;x>=0;x--){
try{
var tif=this.inFlight[x];
if(!tif||tif.http._aborted||!tif.http.readyState){
this.inFlight.splice(x,1);
continue;
}
if(4==tif.http.readyState){
this.inFlight.splice(x,1);
doLoad(tif.req,tif.http,tif.url,tif.query,tif.useCache);
}else{
if(tif.startTime){
if(!now){
now=(new Date()).getTime();
}
if(tif.startTime+(tif.req.timeoutSeconds*1000)<now){
if(typeof tif.http.abort=="function"){
tif.http.abort();
}
this.inFlight.splice(x,1);
tif.req[(typeof tif.req.timeout=="function")?"timeout":"handle"]("timeout",null,tif.http,tif.req);
}
}
}
}
catch(e){
try{
var _748=new dojo.io.Error("XMLHttpTransport.watchInFlight Error: "+e);
tif.req[(typeof tif.req.error=="function")?"error":"handle"]("error",_748,tif.http,tif.req);
}
catch(e2){
dojo.debug("XMLHttpTransport error callback failed: "+e2);
}
}
}
}
clearTimeout(this.inFlightTimer);
if(this.inFlight.length==0){
this.inFlightTimer=null;
return;
}
this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10);
};
var _749=dojo.hostenv.getXmlhttpObject()?true:false;
this.canHandle=function(_74a){
return _749&&dojo.lang.inArray(["text/plain","text/html","application/xml","text/xml","text/javascript","text/json","application/json"],(_74a["mimetype"].toLowerCase()||""))&&!(_74a["formNode"]&&dojo.io.formHasFile(_74a["formNode"]));
};
this.multipartBoundary="45309FFF-BD65-4d50-99C9-36986896A96F";
this.bind=function(_74b){
if(!_74b["url"]){
if(!_74b["formNode"]&&(_74b["backButton"]||_74b["back"]||_74b["changeUrl"]||_74b["watchForURL"])&&(!djConfig.preventBackButtonFix)){
dojo.deprecated("Using dojo.io.XMLHTTPTransport.bind() to add to browser history without doing an IO request","Use dojo.undo.browser.addToHistory() instead.","0.4");
dojo.undo.browser.addToHistory(_74b);
return true;
}
}
var url=_74b.url;
var _74d="";
if(_74b["formNode"]){
var ta=_74b.formNode.getAttribute("action");
if((ta)&&(!_74b["url"])){
url=ta;
}
var tp=_74b.formNode.getAttribute("method");
if((tp)&&(!_74b["method"])){
_74b.method=tp;
}
_74d+=dojo.io.encodeForm(_74b.formNode,_74b.encoding,_74b["formFilter"]);
}
if(url.indexOf("#")>-1){
dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url);
url=url.split("#")[0];
}
if(_74b["file"]){
_74b.method="post";
}
if(!_74b["method"]){
_74b.method="get";
}
if(_74b.method.toLowerCase()=="get"){
_74b.multipart=false;
}else{
if(_74b["file"]){
_74b.multipart=true;
}else{
if(!_74b["multipart"]){
_74b.multipart=false;
}
}
}
if(_74b["backButton"]||_74b["back"]||_74b["changeUrl"]){
dojo.undo.browser.addToHistory(_74b);
}
var _750=_74b["content"]||{};
if(_74b.sendTransport){
_750["dojo.transport"]="xmlhttp";
}
do{
if(_74b.postContent){
_74d=_74b.postContent;
break;
}
if(_750){
_74d+=dojo.io.argsFromMap(_750,_74b.encoding);
}
if(_74b.method.toLowerCase()=="get"||!_74b.multipart){
break;
}
var t=[];
if(_74d.length){
var q=_74d.split("&");
for(var i=0;i<q.length;++i){
if(q[i].length){
var p=q[i].split("=");
t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+p[0]+"\"","",p[1]);
}
}
}
if(_74b.file){
if(dojo.lang.isArray(_74b.file)){
for(var i=0;i<_74b.file.length;++i){
var o=_74b.file[i];
t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+o.name+"\"; filename=\""+("fileName" in o?o.fileName:o.name)+"\"","Content-Type: "+("contentType" in o?o.contentType:"application/octet-stream"),"",o.content);
}
}else{
var o=_74b.file;
t.push("--"+this.multipartBoundary,"Content-Disposition: form-data; name=\""+o.name+"\"; filename=\""+("fileName" in o?o.fileName:o.name)+"\"","Content-Type: "+("contentType" in o?o.contentType:"application/octet-stream"),"",o.content);
}
}
if(t.length){
t.push("--"+this.multipartBoundary+"--","");
_74d=t.join("\r\n");
}
}while(false);
var _756=_74b["sync"]?false:true;
var _757=_74b["preventCache"]||(this.preventCache==true&&_74b["preventCache"]!=false);
var _758=_74b["useCache"]==true||(this.useCache==true&&_74b["useCache"]!=false);
if(!_757&&_758){
var _759=getFromCache(url,_74d,_74b.method);
if(_759){
doLoad(_74b,_759,url,_74d,false);
return;
}
}
var http=dojo.hostenv.getXmlhttpObject(_74b);
var _75b=false;
if(_756){
var _75c=this.inFlight.push({"req":_74b,"http":http,"url":url,"query":_74d,"useCache":_758,"startTime":_74b.timeoutSeconds?(new Date()).getTime():0});
this.startWatchingInFlight();
}else{
_72b._blockAsync=true;
}
if(_74b.method.toLowerCase()=="post"){
if(!_74b.user){
http.open("POST",url,_756);
}else{
http.open("POST",url,_756,_74b.user,_74b.password);
}
setHeaders(http,_74b);
http.setRequestHeader("Content-Type",_74b.multipart?("multipart/form-data; boundary="+this.multipartBoundary):(_74b.contentType||"application/x-www-form-urlencoded"));
try{
http.send(_74d);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_74b,{status:404},url,_74d,_758);
}
}else{
var _75d=url;
if(_74d!=""){
_75d+=(_75d.indexOf("?")>-1?"&":"?")+_74d;
}
if(_757){
_75d+=(dojo.string.endsWithAny(_75d,"?","&")?"":(_75d.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf();
}
if(!_74b.user){
http.open(_74b.method.toUpperCase(),_75d,_756);
}else{
http.open(_74b.method.toUpperCase(),_75d,_756,_74b.user,_74b.password);
}
setHeaders(http,_74b);
try{
http.send(null);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_74b,{status:404},url,_74d,_758);
}
}
if(!_756){
doLoad(_74b,http,url,_74d,_758);
_72b._blockAsync=false;
}
_74b.abort=function(){
try{
http._aborted=true;
}
catch(e){
}
return http.abort();
};
return;
};
dojo.io.transports.addTransport("XMLHTTPTransport");
};
}
dojo.provide("dojo.io.cookie");
dojo.io.cookie.setCookie=function(name,_75f,days,path,_762,_763){
var _764=-1;
if((typeof days=="number")&&(days>=0)){
var d=new Date();
d.setTime(d.getTime()+(days*24*60*60*1000));
_764=d.toGMTString();
}
_75f=escape(_75f);
document.cookie=name+"="+_75f+";"+(_764!=-1?" expires="+_764+";":"")+(path?"path="+path:"")+(_762?"; domain="+_762:"")+(_763?"; secure":"");
};
dojo.io.cookie.set=dojo.io.cookie.setCookie;
dojo.io.cookie.getCookie=function(name){
var idx=document.cookie.lastIndexOf(name+"=");
if(idx==-1){
return null;
}
var _768=document.cookie.substring(idx+name.length+1);
var end=_768.indexOf(";");
if(end==-1){
end=_768.length;
}
_768=_768.substring(0,end);
_768=unescape(_768);
return _768;
};
dojo.io.cookie.get=dojo.io.cookie.getCookie;
dojo.io.cookie.deleteCookie=function(name){
dojo.io.cookie.setCookie(name,"-",0);
};
dojo.io.cookie.setObjectCookie=function(name,obj,days,path,_76f,_770,_771){
if(arguments.length==5){
_771=_76f;
_76f=null;
_770=null;
}
var _772=[],_773,_774="";
if(!_771){
_773=dojo.io.cookie.getObjectCookie(name);
}
if(days>=0){
if(!_773){
_773={};
}
for(var prop in obj){
if(obj[prop]==null){
delete _773[prop];
}else{
if((typeof obj[prop]=="string")||(typeof obj[prop]=="number")){
_773[prop]=obj[prop];
}
}
}
prop=null;
for(var prop in _773){
_772.push(escape(prop)+"="+escape(_773[prop]));
}
_774=_772.join("&");
}
dojo.io.cookie.setCookie(name,_774,days,path,_76f,_770);
};
dojo.io.cookie.getObjectCookie=function(name){
var _777=null,_778=dojo.io.cookie.getCookie(name);
if(_778){
_777={};
var _779=_778.split("&");
for(var i=0;i<_779.length;i++){
var pair=_779[i].split("=");
var _77c=pair[1];
if(isNaN(_77c)){
_77c=unescape(pair[1]);
}
_777[unescape(pair[0])]=_77c;
}
}
return _777;
};
dojo.io.cookie.isSupported=function(){
if(typeof navigator.cookieEnabled!="boolean"){
dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null);
var _77d=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__");
navigator.cookieEnabled=(_77d=="CookiesAllowed");
if(navigator.cookieEnabled){
this.deleteCookie("__TestingYourBrowserForCookieSupport__");
}
}
return navigator.cookieEnabled;
};
if(!dojo.io.cookies){
dojo.io.cookies=dojo.io.cookie;
}
dojo.provide("dojo.io.*");
dojo.provide("dojo.lang.type");
dojo.lang.whatAmI=function(_77e){
dojo.deprecated("dojo.lang.whatAmI","use dojo.lang.getType instead","0.5");
return dojo.lang.getType(_77e);
};
dojo.lang.whatAmI.custom={};
dojo.lang.getType=function(_77f){
try{
if(dojo.lang.isArray(_77f)){
return "array";
}
if(dojo.lang.isFunction(_77f)){
return "function";
}
if(dojo.lang.isString(_77f)){
return "string";
}
if(dojo.lang.isNumber(_77f)){
return "number";
}
if(dojo.lang.isBoolean(_77f)){
return "boolean";
}
if(dojo.lang.isAlien(_77f)){
return "alien";
}
if(dojo.lang.isUndefined(_77f)){
return "undefined";
}
for(var name in dojo.lang.whatAmI.custom){
if(dojo.lang.whatAmI.custom[name](_77f)){
return name;
}
}
if(dojo.lang.isObject(_77f)){
return "object";
}
}
catch(e){
}
return "unknown";
};
dojo.lang.isNumeric=function(_781){
return (!isNaN(_781)&&isFinite(_781)&&(_781!=null)&&!dojo.lang.isBoolean(_781)&&!dojo.lang.isArray(_781)&&!/^\s*$/.test(_781));
};
dojo.lang.isBuiltIn=function(_782){
return (dojo.lang.isArray(_782)||dojo.lang.isFunction(_782)||dojo.lang.isString(_782)||dojo.lang.isNumber(_782)||dojo.lang.isBoolean(_782)||(_782==null)||(_782 instanceof Error)||(typeof _782=="error"));
};
dojo.lang.isPureObject=function(_783){
return ((_783!=null)&&dojo.lang.isObject(_783)&&_783.constructor==Object);
};
dojo.lang.isOfType=function(_784,type,_786){
var _787=false;
if(_786){
_787=_786["optional"];
}
if(_787&&((_784===null)||dojo.lang.isUndefined(_784))){
return true;
}
if(dojo.lang.isArray(type)){
var _788=type;
for(var i in _788){
var _78a=_788[i];
if(dojo.lang.isOfType(_784,_78a)){
return true;
}
}
return false;
}else{
if(dojo.lang.isString(type)){
type=type.toLowerCase();
}
switch(type){
case Array:
case "array":
return dojo.lang.isArray(_784);
case Function:
case "function":
return dojo.lang.isFunction(_784);
case String:
case "string":
return dojo.lang.isString(_784);
case Number:
case "number":
return dojo.lang.isNumber(_784);
case "numeric":
return dojo.lang.isNumeric(_784);
case Boolean:
case "boolean":
return dojo.lang.isBoolean(_784);
case Object:
case "object":
return dojo.lang.isObject(_784);
case "pureobject":
return dojo.lang.isPureObject(_784);
case "builtin":
return dojo.lang.isBuiltIn(_784);
case "alien":
return dojo.lang.isAlien(_784);
case "undefined":
return dojo.lang.isUndefined(_784);
case null:
case "null":
return (_784===null);
case "optional":
dojo.deprecated("dojo.lang.isOfType(value, [type, \"optional\"])","use dojo.lang.isOfType(value, type, {optional: true} ) instead","0.5");
return ((_784===null)||dojo.lang.isUndefined(_784));
default:
if(dojo.lang.isFunction(type)){
return (_784 instanceof type);
}else{
dojo.raise("dojo.lang.isOfType() was passed an invalid type");
}
}
}
dojo.raise("If we get here, it means a bug was introduced above.");
};
dojo.lang.getObject=function(str){
var _78c=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_78c[i++]];
}while(i<_78c.length&&obj);
return (obj!=dj_global)?obj:null;
};
dojo.lang.doesObjectExist=function(str){
var _790=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_790[i++]];
}while(i<_790.length&&obj);
return (obj&&obj!=dj_global);
};
dojo.provide("dojo.lang.assert");
dojo.lang.assert=function(_793,_794){
if(!_793){
var _795="An assert statement failed.\n"+"The method dojo.lang.assert() was called with a 'false' value.\n";
if(_794){
_795+="Here's the assert message:\n"+_794+"\n";
}
throw new Error(_795);
}
};
dojo.lang.assertType=function(_796,type,_798){
if(dojo.lang.isString(_798)){
dojo.deprecated("dojo.lang.assertType(value, type, \"message\")","use dojo.lang.assertType(value, type) instead","0.5");
}
if(!dojo.lang.isOfType(_796,type,_798)){
if(!dojo.lang.assertType._errorMessage){
dojo.lang.assertType._errorMessage="Type mismatch: dojo.lang.assertType() failed.";
}
dojo.lang.assert(false,dojo.lang.assertType._errorMessage);
}
};
dojo.lang.assertValidKeywords=function(_799,_79a,_79b){
var key;
if(!_79b){
if(!dojo.lang.assertValidKeywords._errorMessage){
dojo.lang.assertValidKeywords._errorMessage="In dojo.lang.assertValidKeywords(), found invalid keyword:";
}
_79b=dojo.lang.assertValidKeywords._errorMessage;
}
if(dojo.lang.isArray(_79a)){
for(key in _799){
if(!dojo.lang.inArray(_79a,key)){
dojo.lang.assert(false,_79b+" "+key);
}
}
}else{
for(key in _799){
if(!(key in _79a)){
dojo.lang.assert(false,_79b+" "+key);
}
}
}
};
dojo.provide("dojo.AdapterRegistry");
dojo.AdapterRegistry=function(_79d){
this.pairs=[];
this.returnWrappers=_79d||false;
};
dojo.lang.extend(dojo.AdapterRegistry,{register:function(name,_79f,wrap,_7a1,_7a2){
var type=(_7a2)?"unshift":"push";
this.pairs[type]([name,_79f,wrap,_7a1]);
},match:function(){
for(var i=0;i<this.pairs.length;i++){
var pair=this.pairs[i];
if(pair[1].apply(this,arguments)){
if((pair[3])||(this.returnWrappers)){
return pair[2];
}else{
return pair[2].apply(this,arguments);
}
}
}
throw new Error("No match found");
},unregister:function(name){
for(var i=0;i<this.pairs.length;i++){
var pair=this.pairs[i];
if(pair[0]==name){
this.pairs.splice(i,1);
return true;
}
}
return false;
}});
dojo.provide("dojo.lang.repr");
dojo.lang.reprRegistry=new dojo.AdapterRegistry();
dojo.lang.registerRepr=function(name,_7aa,wrap,_7ac){
dojo.lang.reprRegistry.register(name,_7aa,wrap,_7ac);
};
dojo.lang.repr=function(obj){
if(typeof (obj)=="undefined"){
return "undefined";
}else{
if(obj===null){
return "null";
}
}
try{
if(typeof (obj["__repr__"])=="function"){
return obj["__repr__"]();
}else{
if((typeof (obj["repr"])=="function")&&(obj.repr!=arguments.callee)){
return obj["repr"]();
}
}
return dojo.lang.reprRegistry.match(obj);
}
catch(e){
if(typeof (obj.NAME)=="string"&&(obj.toString==Function.prototype.toString||obj.toString==Object.prototype.toString)){
return obj.NAME;
}
}
if(typeof (obj)=="function"){
obj=(obj+"").replace(/^\s+/,"");
var idx=obj.indexOf("{");
if(idx!=-1){
obj=obj.substr(0,idx)+"{...}";
}
}
return obj+"";
};
dojo.lang.reprArrayLike=function(arr){
try{
var na=dojo.lang.map(arr,dojo.lang.repr);
return "["+na.join(", ")+"]";
}
catch(e){
}
};
(function(){
var m=dojo.lang;
m.registerRepr("arrayLike",m.isArrayLike,m.reprArrayLike);
m.registerRepr("string",m.isString,m.reprString);
m.registerRepr("numbers",m.isNumber,m.reprNumber);
m.registerRepr("boolean",m.isBoolean,m.reprNumber);
})();
dojo.provide("dojo.lang.*");
dojo.provide("dojo.xml.Parse");
dojo.xml.Parse=function(){
var isIE=((dojo.render.html.capable)&&(dojo.render.html.ie));
function getTagName(node){
try{
return node.tagName.toLowerCase();
}
catch(e){
return "";
}
}
function getDojoTagName(node){
var _7b5=getTagName(node);
if(!_7b5){
return "";
}
if((dojo.widget)&&(dojo.widget.tags[_7b5])){
return _7b5;
}
var p=_7b5.indexOf(":");
if(p>=0){
return _7b5;
}
if(_7b5.substr(0,5)=="dojo:"){
return _7b5;
}
if(dojo.render.html.capable&&dojo.render.html.ie&&node.scopeName!="HTML"){
return node.scopeName.toLowerCase()+":"+_7b5;
}
if(_7b5.substr(0,4)=="dojo"){
return "dojo:"+_7b5.substring(4);
}
var djt=node.getAttribute("dojoType")||node.getAttribute("dojotype");
if(djt){
if(djt.indexOf(":")<0){
djt="dojo:"+djt;
}
return djt.toLowerCase();
}
djt=node.getAttributeNS&&node.getAttributeNS(dojo.dom.dojoml,"type");
if(djt){
return "dojo:"+djt.toLowerCase();
}
try{
djt=node.getAttribute("dojo:type");
}
catch(e){
}
if(djt){
return "dojo:"+djt.toLowerCase();
}
if((dj_global["djConfig"])&&(!djConfig["ignoreClassNames"])){
var _7b8=node.className||node.getAttribute("class");
if((_7b8)&&(_7b8.indexOf)&&(_7b8.indexOf("dojo-")!=-1)){
var _7b9=_7b8.split(" ");
for(var x=0,c=_7b9.length;x<c;x++){
if(_7b9[x].slice(0,5)=="dojo-"){
return "dojo:"+_7b9[x].substr(5).toLowerCase();
}
}
}
}
return "";
}
this.parseElement=function(node,_7bd,_7be,_7bf){
var _7c0=getTagName(node);
if(isIE&&_7c0.indexOf("/")==0){
return null;
}
try{
var attr=node.getAttribute("parseWidgets");
if(attr&&attr.toLowerCase()=="false"){
return {};
}
}
catch(e){
}
var _7c2=true;
if(_7be){
var _7c3=getDojoTagName(node);
_7c0=_7c3||_7c0;
_7c2=Boolean(_7c3);
}
var _7c4={};
_7c4[_7c0]=[];
var pos=_7c0.indexOf(":");
if(pos>0){
var ns=_7c0.substring(0,pos);
_7c4["ns"]=ns;
if((dojo.ns)&&(!dojo.ns.allow(ns))){
_7c2=false;
}
}
if(_7c2){
var _7c7=this.parseAttributes(node);
for(var attr in _7c7){
if((!_7c4[_7c0][attr])||(typeof _7c4[_7c0][attr]!="array")){
_7c4[_7c0][attr]=[];
}
_7c4[_7c0][attr].push(_7c7[attr]);
}
_7c4[_7c0].nodeRef=node;
_7c4.tagName=_7c0;
_7c4.index=_7bf||0;
}
var _7c8=0;
for(var i=0;i<node.childNodes.length;i++){
var tcn=node.childNodes.item(i);
switch(tcn.nodeType){
case dojo.dom.ELEMENT_NODE:
var ctn=getDojoTagName(tcn)||getTagName(tcn);
if(!_7c4[ctn]){
_7c4[ctn]=[];
}
_7c4[ctn].push(this.parseElement(tcn,true,_7be,_7c8));
if((tcn.childNodes.length==1)&&(tcn.childNodes.item(0).nodeType==dojo.dom.TEXT_NODE)){
_7c4[ctn][_7c4[ctn].length-1].value=tcn.childNodes.item(0).nodeValue;
}
_7c8++;
break;
case dojo.dom.TEXT_NODE:
if(node.childNodes.length==1){
_7c4[_7c0].push({value:node.childNodes.item(0).nodeValue});
}
break;
default:
break;
}
}
return _7c4;
};
this.parseAttributes=function(node){
var _7cd={};
var atts=node.attributes;
var _7cf,i=0;
while((_7cf=atts[i++])){
if(isIE){
if(!_7cf){
continue;
}
if((typeof _7cf=="object")&&(typeof _7cf.nodeValue=="undefined")||(_7cf.nodeValue==null)||(_7cf.nodeValue=="")){
continue;
}
}
var nn=_7cf.nodeName.split(":");
nn=(nn.length==2)?nn[1]:_7cf.nodeName;
_7cd[nn]={value:_7cf.nodeValue};
}
return _7cd;
};
};
dojo.provide("dojo.ns");
dojo.ns={namespaces:{},failed:{},loading:{},loaded:{},register:function(name,_7d3,_7d4,_7d5){
if(!_7d5||!this.namespaces[name]){
this.namespaces[name]=new dojo.ns.Ns(name,_7d3,_7d4);
}
},allow:function(name){
if(this.failed[name]){
return false;
}
if((djConfig.excludeNamespace)&&(dojo.lang.inArray(djConfig.excludeNamespace,name))){
return false;
}
return ((name==this.dojo)||(!djConfig.includeNamespace)||(dojo.lang.inArray(djConfig.includeNamespace,name)));
},get:function(name){
return this.namespaces[name];
},require:function(name){
var ns=this.namespaces[name];
if((ns)&&(this.loaded[name])){
return ns;
}
if(!this.allow(name)){
return false;
}
if(this.loading[name]){
dojo.debug("dojo.namespace.require: re-entrant request to load namespace \""+name+"\" must fail.");
return false;
}
var req=dojo.require;
this.loading[name]=true;
try{
if(name=="dojo"){
req("dojo.namespaces.dojo");
}else{
if(!dojo.hostenv.moduleHasPrefix(name)){
dojo.registerModulePath(name,"../"+name);
}
req([name,"manifest"].join("."),false,true);
}
if(!this.namespaces[name]){
this.failed[name]=true;
}
}
finally{
this.loading[name]=false;
}
return this.namespaces[name];
}};
dojo.ns.Ns=function(name,_7dc,_7dd){
this.name=name;
this.module=_7dc;
this.resolver=_7dd;
this._loaded=[];
this._failed=[];
};
dojo.ns.Ns.prototype.resolve=function(name,_7df,_7e0){
if(!this.resolver||djConfig["skipAutoRequire"]){
return false;
}
var _7e1=this.resolver(name,_7df);
if((_7e1)&&(!this._loaded[_7e1])&&(!this._failed[_7e1])){
var req=dojo.require;
req(_7e1,false,true);
if(dojo.hostenv.findModule(_7e1,false)){
this._loaded[_7e1]=true;
}else{
if(!_7e0){
dojo.raise("dojo.ns.Ns.resolve: module '"+_7e1+"' not found after loading via namespace '"+this.name+"'");
}
this._failed[_7e1]=true;
}
}
return Boolean(this._loaded[_7e1]);
};
dojo.registerNamespace=function(name,_7e4,_7e5){
dojo.ns.register.apply(dojo.ns,arguments);
};
dojo.registerNamespaceResolver=function(name,_7e7){
var n=dojo.ns.namespaces[name];
if(n){
n.resolver=_7e7;
}
};
dojo.registerNamespaceManifest=function(_7e9,path,name,_7ec,_7ed){
dojo.registerModulePath(name,path);
dojo.registerNamespace(name,_7ec,_7ed);
};
dojo.registerNamespace("dojo","dojo.widget");
dojo.provide("dojo.widget.Manager");
dojo.widget.manager=new function(){
this.widgets=[];
this.widgetIds=[];
this.topWidgets={};
var _7ee={};
var _7ef=[];
this.getUniqueId=function(_7f0){
var _7f1;
do{
_7f1=_7f0+"_"+(_7ee[_7f0]!=undefined?++_7ee[_7f0]:_7ee[_7f0]=0);
}while(this.getWidgetById(_7f1));
return _7f1;
};
this.add=function(_7f2){
this.widgets.push(_7f2);
if(!_7f2.extraArgs["id"]){
_7f2.extraArgs["id"]=_7f2.extraArgs["ID"];
}
if(_7f2.widgetId==""){
if(_7f2["id"]){
_7f2.widgetId=_7f2["id"];
}else{
if(_7f2.extraArgs["id"]){
_7f2.widgetId=_7f2.extraArgs["id"];
}else{
_7f2.widgetId=this.getUniqueId(_7f2.ns+"_"+_7f2.widgetType);
}
}
}
if(this.widgetIds[_7f2.widgetId]){
dojo.debug("widget ID collision on ID: "+_7f2.widgetId);
}
this.widgetIds[_7f2.widgetId]=_7f2;
};
this.destroyAll=function(){
for(var x=this.widgets.length-1;x>=0;x--){
try{
this.widgets[x].destroy(true);
delete this.widgets[x];
}
catch(e){
}
}
};
this.remove=function(_7f4){
if(dojo.lang.isNumber(_7f4)){
var tw=this.widgets[_7f4].widgetId;
delete this.widgetIds[tw];
this.widgets.splice(_7f4,1);
}else{
this.removeById(_7f4);
}
};
this.removeById=function(id){
if(!dojo.lang.isString(id)){
id=id["widgetId"];
if(!id){
dojo.debug("invalid widget or id passed to removeById");
return;
}
}
for(var i=0;i<this.widgets.length;i++){
if(this.widgets[i].widgetId==id){
this.remove(i);
break;
}
}
};
this.getWidgetById=function(id){
if(dojo.lang.isString(id)){
return this.widgetIds[id];
}
return id;
};
this.getWidgetsByType=function(type){
var lt=type.toLowerCase();
var _7fb=(type.indexOf(":")<0?function(x){
return x.widgetType.toLowerCase();
}:function(x){
return x.getNamespacedType();
});
var ret=[];
dojo.lang.forEach(this.widgets,function(x){
if(_7fb(x)==lt){
ret.push(x);
}
});
return ret;
};
this.getWidgetsByFilter=function(_800,_801){
var ret=[];
dojo.lang.every(this.widgets,function(x){
if(_800(x)){
ret.push(x);
if(_801){
return false;
}
}
return true;
});
return (_801?ret[0]:ret);
};
this.getAllWidgets=function(){
return this.widgets.concat();
};
this.getWidgetByNode=function(node){
var w=this.getAllWidgets();
node=dojo.byId(node);
for(var i=0;i<w.length;i++){
if(w[i].domNode==node){
return w[i];
}
}
return null;
};
this.byId=this.getWidgetById;
this.byType=this.getWidgetsByType;
this.byFilter=this.getWidgetsByFilter;
this.byNode=this.getWidgetByNode;
var _807={};
var _808=["dojo.widget"];
for(var i=0;i<_808.length;i++){
_808[_808[i]]=true;
}
this.registerWidgetPackage=function(_80a){
if(!_808[_80a]){
_808[_80a]=true;
_808.push(_80a);
}
};
this.getWidgetPackageList=function(){
return dojo.lang.map(_808,function(elt){
return (elt!==true?elt:undefined);
});
};
this.getImplementation=function(_80c,_80d,_80e,ns){
var impl=this.getImplementationName(_80c,ns);
if(impl){
var ret=_80d?new impl(_80d):new impl();
return ret;
}
};
function buildPrefixCache(){
for(var _812 in dojo.render){
if(dojo.render[_812]["capable"]===true){
var _813=dojo.render[_812].prefixes;
for(var i=0;i<_813.length;i++){
_7ef.push(_813[i].toLowerCase());
}
}
}
}
var _815=function(_816,_817){
if(!_817){
return null;
}
for(var i=0,l=_7ef.length,_81a;i<=l;i++){
_81a=(i<l?_817[_7ef[i]]:_817);
if(!_81a){
continue;
}
for(var name in _81a){
if(name.toLowerCase()==_816){
return _81a[name];
}
}
}
return null;
};
var _81c=function(_81d,_81e){
var _81f=dojo.evalObjPath(_81e,false);
return (_81f?_815(_81d,_81f):null);
};
this.getImplementationName=function(_820,ns){
var _822=_820.toLowerCase();
ns=ns||"dojo";
var imps=_807[ns]||(_807[ns]={});
var impl=imps[_822];
if(impl){
return impl;
}
if(!_7ef.length){
buildPrefixCache();
}
var _825=dojo.ns.get(ns);
if(!_825){
dojo.ns.register(ns,ns+".widget");
_825=dojo.ns.get(ns);
}
if(_825){
_825.resolve(_820);
}
impl=_81c(_822,_825.module);
if(impl){
return (imps[_822]=impl);
}
_825=dojo.ns.require(ns);
if((_825)&&(_825.resolver)){
_825.resolve(_820);
impl=_81c(_822,_825.module);
if(impl){
return (imps[_822]=impl);
}
}
dojo.deprecated("dojo.widget.Manager.getImplementationName","Could not locate widget implementation for \""+_820+"\" in \""+_825.module+"\" registered to namespace \""+_825.name+"\". "+"Developers must specify correct namespaces for all non-Dojo widgets","0.5");
for(var i=0;i<_808.length;i++){
impl=_81c(_822,_808[i]);
if(impl){
return (imps[_822]=impl);
}
}
throw new Error("Could not locate widget implementation for \""+_820+"\" in \""+_825.module+"\" registered to namespace \""+_825.name+"\"");
};
this.resizing=false;
this.onWindowResized=function(){
if(this.resizing){
return;
}
try{
this.resizing=true;
for(var id in this.topWidgets){
var _828=this.topWidgets[id];
if(_828.checkSize){
_828.checkSize();
}
}
}
catch(e){
}
finally{
this.resizing=false;
}
};
if(typeof window!="undefined"){
dojo.addOnLoad(this,"onWindowResized");
dojo.event.connect(window,"onresize",this,"onWindowResized");
}
};
(function(){
var dw=dojo.widget;
var dwm=dw.manager;
var h=dojo.lang.curry(dojo.lang,"hitch",dwm);
var g=function(_82d,_82e){
dw[(_82e||_82d)]=h(_82d);
};
g("add","addWidget");
g("destroyAll","destroyAllWidgets");
g("remove","removeWidget");
g("removeById","removeWidgetById");
g("getWidgetById");
g("getWidgetById","byId");
g("getWidgetsByType");
g("getWidgetsByFilter");
g("getWidgetsByType","byType");
g("getWidgetsByFilter","byFilter");
g("getWidgetByNode","byNode");
dw.all=function(n){
var _830=dwm.getAllWidgets.apply(dwm,arguments);
if(arguments.length>0){
return _830[n];
}
return _830;
};
g("registerWidgetPackage");
g("getImplementation","getWidgetImplementation");
g("getImplementationName","getWidgetImplementationName");
dw.widgets=dwm.widgets;
dw.widgetIds=dwm.widgetIds;
dw.root=dwm.root;
})();
dojo.provide("dojo.uri.*");
dojo.provide("dojo.a11y");
dojo.a11y={imgPath:dojo.uri.dojoUri(dojoImagesUri),doAccessibleCheck:true,accessible:null,checkAccessible:function(){
if(this.accessible===null){
this.accessible=false;
if(this.doAccessibleCheck==true){
this.accessible=this.testAccessible();
}
}
return this.accessible;
},testAccessible:function(){
this.accessible=false;
if(dojo.render.html.ie||dojo.render.html.mozilla){
var div=document.createElement("div");
div.style.backgroundImage="url(\""+this.imgPath+"/tab_close.gif\")";
dojo.body().appendChild(div);
var _832=null;
if(window.getComputedStyle){
var _833=getComputedStyle(div,"");
_832=_833.getPropertyValue("background-image");
}else{
_832=div.currentStyle.backgroundImage;
}
var _834=false;
if(_832!=null&&(_832=="none"||_832=="url(invalid-url:)")){
this.accessible=true;
}
dojo.body().removeChild(div);
}
return this.accessible;
},setCheckAccessible:function(_835){
this.doAccessibleCheck=_835;
},setAccessibleMode:function(){
if(this.accessible===null){
if(this.checkAccessible()){
dojo.render.html.prefixes.unshift("a11y");
}
}
return this.accessible;
}};
dojo.provide("dojo.widget.Widget");
dojo.declare("dojo.widget.Widget",null,function(){
this.children=[];
this.extraArgs={};
},{parent:null,isTopLevel:false,disabled:false,isContainer:false,widgetId:"",widgetType:"Widget",ns:"dojo",getNamespacedType:function(){
return (this.ns?this.ns+":"+this.widgetType:this.widgetType).toLowerCase();
},toString:function(){
return "[Widget "+this.getNamespacedType()+", "+(this.widgetId||"NO ID")+"]";
},repr:function(){
return this.toString();
},enable:function(){
this.disabled=false;
},disable:function(){
this.disabled=true;
},onResized:function(){
this.notifyChildrenOfResize();
},notifyChildrenOfResize:function(){
for(var i=0;i<this.children.length;i++){
var _837=this.children[i];
if(_837.onResized){
_837.onResized();
}
}
},create:function(args,_839,_83a,ns){
if(ns){
this.ns=ns;
}
this.satisfyPropertySets(args,_839,_83a);
this.mixInProperties(args,_839,_83a);
this.postMixInProperties(args,_839,_83a);
dojo.widget.manager.add(this);
this.buildRendering(args,_839,_83a);
this.initialize(args,_839,_83a);
this.postInitialize(args,_839,_83a);
this.postCreate(args,_839,_83a);
return this;
},destroy:function(_83c){
if(this.parent){
this.parent.removeChild(this);
}
this.destroyChildren();
this.uninitialize();
this.destroyRendering(_83c);
dojo.widget.manager.removeById(this.widgetId);
},destroyChildren:function(){
var _83d;
var i=0;
while(this.children.length>i){
_83d=this.children[i];
if(_83d instanceof dojo.widget.Widget){
this.removeChild(_83d);
_83d.destroy();
continue;
}
i++;
}
},getChildrenOfType:function(type,_840){
var ret=[];
var _842=dojo.lang.isFunction(type);
if(!_842){
type=type.toLowerCase();
}
for(var x=0;x<this.children.length;x++){
if(_842){
if(this.children[x] instanceof type){
ret.push(this.children[x]);
}
}else{
if(this.children[x].widgetType.toLowerCase()==type){
ret.push(this.children[x]);
}
}
if(_840){
ret=ret.concat(this.children[x].getChildrenOfType(type,_840));
}
}
return ret;
},getDescendants:function(){
var _844=[];
var _845=[this];
var elem;
while((elem=_845.pop())){
_844.push(elem);
if(elem.children){
dojo.lang.forEach(elem.children,function(elem){
_845.push(elem);
});
}
}
return _844;
},isFirstChild:function(){
return this===this.parent.children[0];
},isLastChild:function(){
return this===this.parent.children[this.parent.children.length-1];
},satisfyPropertySets:function(args){
return args;
},mixInProperties:function(args,frag){
if((args["fastMixIn"])||(frag["fastMixIn"])){
for(var x in args){
this[x]=args[x];
}
return;
}
var _84c;
var _84d=dojo.widget.lcArgsCache[this.widgetType];
if(_84d==null){
_84d={};
for(var y in this){
_84d[((new String(y)).toLowerCase())]=y;
}
dojo.widget.lcArgsCache[this.widgetType]=_84d;
}
var _84f={};
for(var x in args){
if(!this[x]){
var y=_84d[(new String(x)).toLowerCase()];
if(y){
args[y]=args[x];
x=y;
}
}
if(_84f[x]){
continue;
}
_84f[x]=true;
if((typeof this[x])!=(typeof _84c)){
if(typeof args[x]!="string"){
this[x]=args[x];
}else{
if(dojo.lang.isString(this[x])){
this[x]=args[x];
}else{
if(dojo.lang.isNumber(this[x])){
this[x]=new Number(args[x]);
}else{
if(dojo.lang.isBoolean(this[x])){
this[x]=(args[x].toLowerCase()=="false")?false:true;
}else{
if(dojo.lang.isFunction(this[x])){
if(args[x].search(/[^\w\.]+/i)==-1){
this[x]=dojo.evalObjPath(args[x],false);
}else{
var tn=dojo.lang.nameAnonFunc(new Function(args[x]),this);
dojo.event.kwConnect({srcObj:this,srcFunc:x,adviceObj:this,adviceFunc:tn});
}
}else{
if(dojo.lang.isArray(this[x])){
this[x]=args[x].split(";");
}else{
if(this[x] instanceof Date){
this[x]=new Date(Number(args[x]));
}else{
if(typeof this[x]=="object"){
if(this[x] instanceof dojo.uri.Uri){
this[x]=dojo.uri.dojoUri(args[x]);
}else{
var _851=args[x].split(";");
for(var y=0;y<_851.length;y++){
var si=_851[y].indexOf(":");
if((si!=-1)&&(_851[y].length>si)){
this[x][_851[y].substr(0,si).replace(/^\s+|\s+$/g,"")]=_851[y].substr(si+1);
}
}
}
}else{
this[x]=args[x];
}
}
}
}
}
}
}
}
}else{
this.extraArgs[x.toLowerCase()]=args[x];
}
}
},postMixInProperties:function(args,frag,_855){
},initialize:function(args,frag,_858){
return false;
},postInitialize:function(args,frag,_85b){
return false;
},postCreate:function(args,frag,_85e){
return false;
},uninitialize:function(){
return false;
},buildRendering:function(args,frag,_861){
dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", ");
return false;
},destroyRendering:function(){
dojo.unimplemented("dojo.widget.Widget.destroyRendering");
return false;
},addedTo:function(_862){
},addChild:function(_863){
dojo.unimplemented("dojo.widget.Widget.addChild");
return false;
},removeChild:function(_864){
for(var x=0;x<this.children.length;x++){
if(this.children[x]===_864){
this.children.splice(x,1);
_864.parent=null;
break;
}
}
return _864;
},getPreviousSibling:function(){
var idx=this.getParentIndex();
if(idx<=0){
return null;
}
return this.parent.children[idx-1];
},getSiblings:function(){
return this.parent.children;
},getParentIndex:function(){
return dojo.lang.indexOf(this.parent.children,this,true);
},getNextSibling:function(){
var idx=this.getParentIndex();
if(idx==this.parent.children.length-1){
return null;
}
if(idx<0){
return null;
}
return this.parent.children[idx+1];
}});
dojo.widget.lcArgsCache={};
dojo.widget.tags={};
dojo.widget.tags.addParseTreeHandler=function(type){
dojo.deprecated("addParseTreeHandler",". ParseTreeHandlers are now reserved for components. Any unfiltered DojoML tag without a ParseTreeHandler is assumed to be a widget","0.5");
};
dojo.widget.tags["dojo:propertyset"]=function(_869,_86a,_86b){
var _86c=_86a.parseProperties(_869["dojo:propertyset"]);
};
dojo.widget.tags["dojo:connect"]=function(_86d,_86e,_86f){
var _870=_86e.parseProperties(_86d["dojo:connect"]);
};
dojo.widget.buildWidgetFromParseTree=function(type,frag,_873,_874,_875,_876){
dojo.a11y.setAccessibleMode();
var _877=type.split(":");
_877=(_877.length==2)?_877[1]:type;
var _878=_876||_873.parseProperties(frag[frag["ns"]+":"+_877]);
var _879=dojo.widget.manager.getImplementation(_877,null,null,frag["ns"]);
if(!_879){
throw new Error("cannot find \""+type+"\" widget");
}else{
if(!_879.create){
throw new Error("\""+type+"\" widget object has no \"create\" method and does not appear to implement *Widget");
}
}
_878["dojoinsertionindex"]=_875;
var ret=_879.create(_878,frag,_874,frag["ns"]);
return ret;
};
dojo.widget.defineWidget=function(_87b,_87c,_87d,init,_87f){
if(dojo.lang.isString(arguments[3])){
dojo.widget._defineWidget(arguments[0],arguments[3],arguments[1],arguments[4],arguments[2]);
}else{
var args=[arguments[0]],p=3;
if(dojo.lang.isString(arguments[1])){
args.push(arguments[1],arguments[2]);
}else{
args.push("",arguments[1]);
p=2;
}
if(dojo.lang.isFunction(arguments[p])){
args.push(arguments[p],arguments[p+1]);
}else{
args.push(null,arguments[p]);
}
dojo.widget._defineWidget.apply(this,args);
}
};
dojo.widget.defineWidget.renderers="html|svg|vml";
dojo.widget._defineWidget=function(_882,_883,_884,init,_886){
var _887=_882.split(".");
var type=_887.pop();
var regx="\\.("+(_883?_883+"|":"")+dojo.widget.defineWidget.renderers+")\\.";
var r=_882.search(new RegExp(regx));
_887=(r<0?_887.join("."):_882.substr(0,r));
dojo.widget.manager.registerWidgetPackage(_887);
var pos=_887.indexOf(".");
var _88c=(pos>-1)?_887.substring(0,pos):_887;
_886=(_886)||{};
_886.widgetType=type;
if((!init)&&(_886["classConstructor"])){
init=_886.classConstructor;
delete _886.classConstructor;
}
dojo.declare(_882,_884,init,_886);
};
dojo.provide("dojo.widget.Parse");
dojo.widget.Parse=function(_88d){
this.propertySetsList=[];
this.fragment=_88d;
this.createComponents=function(frag,_88f){
var _890=[];
var _891=false;
try{
if(frag&&frag.tagName&&(frag!=frag.nodeRef)){
var _892=dojo.widget.tags;
var tna=String(frag.tagName).split(";");
for(var x=0;x<tna.length;x++){
var ltn=tna[x].replace(/^\s+|\s+$/g,"").toLowerCase();
frag.tagName=ltn;
var ret;
if(_892[ltn]){
_891=true;
ret=_892[ltn](frag,this,_88f,frag.index);
_890.push(ret);
}else{
if(ltn.indexOf(":")==-1){
ltn="dojo:"+ltn;
}
ret=dojo.widget.buildWidgetFromParseTree(ltn,frag,this,_88f,frag.index);
if(ret){
_891=true;
_890.push(ret);
}
}
}
}
}
catch(e){
dojo.debug("dojo.widget.Parse: error:",e);
}
if(!_891){
_890=_890.concat(this.createSubComponents(frag,_88f));
}
return _890;
};
this.createSubComponents=function(_897,_898){
var frag,_89a=[];
for(var item in _897){
frag=_897[item];
if(frag&&typeof frag=="object"&&(frag!=_897.nodeRef)&&(frag!=_897.tagName)&&(!dojo.dom.isNode(frag))){
_89a=_89a.concat(this.createComponents(frag,_898));
}
}
return _89a;
};
this.parsePropertySets=function(_89c){
return [];
};
this.parseProperties=function(_89d){
var _89e={};
for(var item in _89d){
if((_89d[item]==_89d.tagName)||(_89d[item]==_89d.nodeRef)){
}else{
var frag=_89d[item];
if(frag.tagName&&dojo.widget.tags[frag.tagName.toLowerCase()]){
}else{
if(frag[0]&&frag[0].value!=""&&frag[0].value!=null){
try{
if(item.toLowerCase()=="dataprovider"){
var _8a1=this;
this.getDataProvider(_8a1,frag[0].value);
_89e.dataProvider=this.dataProvider;
}
_89e[item]=frag[0].value;
var _8a2=this.parseProperties(frag);
for(var _8a3 in _8a2){
_89e[_8a3]=_8a2[_8a3];
}
}
catch(e){
dojo.debug(e);
}
}
}
switch(item.toLowerCase()){
case "checked":
case "disabled":
if(typeof _89e[item]!="boolean"){
_89e[item]=true;
}
break;
}
}
}
return _89e;
};
this.getDataProvider=function(_8a4,_8a5){
dojo.io.bind({url:_8a5,load:function(type,_8a7){
if(type=="load"){
_8a4.dataProvider=_8a7;
}
},mimetype:"text/javascript",sync:true});
};
this.getPropertySetById=function(_8a8){
for(var x=0;x<this.propertySetsList.length;x++){
if(_8a8==this.propertySetsList[x]["id"][0].value){
return this.propertySetsList[x];
}
}
return "";
};
this.getPropertySetsByType=function(_8aa){
var _8ab=[];
for(var x=0;x<this.propertySetsList.length;x++){
var cpl=this.propertySetsList[x];
var cpcc=cpl.componentClass||cpl.componentType||null;
var _8af=this.propertySetsList[x]["id"][0].value;
if(cpcc&&(_8af==cpcc[0].value)){
_8ab.push(cpl);
}
}
return _8ab;
};
this.getPropertySets=function(_8b0){
var ppl="dojo:propertyproviderlist";
var _8b2=[];
var _8b3=_8b0.tagName;
if(_8b0[ppl]){
var _8b4=_8b0[ppl].value.split(" ");
for(var _8b5 in _8b4){
if((_8b5.indexOf("..")==-1)&&(_8b5.indexOf("://")==-1)){
var _8b6=this.getPropertySetById(_8b5);
if(_8b6!=""){
_8b2.push(_8b6);
}
}else{
}
}
}
return this.getPropertySetsByType(_8b3).concat(_8b2);
};
this.createComponentFromScript=function(_8b7,_8b8,_8b9,ns){
_8b9.fastMixIn=true;
var ltn=(ns||"dojo")+":"+_8b8.toLowerCase();
if(dojo.widget.tags[ltn]){
return [dojo.widget.tags[ltn](_8b9,this,null,null,_8b9)];
}
return [dojo.widget.buildWidgetFromParseTree(ltn,_8b9,this,null,null,_8b9)];
};
};
dojo.widget._parser_collection={"dojo":new dojo.widget.Parse()};
dojo.widget.getParser=function(name){
if(!name){
name="dojo";
}
if(!this._parser_collection[name]){
this._parser_collection[name]=new dojo.widget.Parse();
}
return this._parser_collection[name];
};
dojo.widget.createWidget=function(name,_8be,_8bf,_8c0){
var _8c1=false;
var _8c2=(typeof name=="string");
if(_8c2){
var pos=name.indexOf(":");
var ns=(pos>-1)?name.substring(0,pos):"dojo";
if(pos>-1){
name=name.substring(pos+1);
}
var _8c5=name.toLowerCase();
var _8c6=ns+":"+_8c5;
_8c1=(dojo.byId(name)&&!dojo.widget.tags[_8c6]);
}
if((arguments.length==1)&&(_8c1||!_8c2)){
var xp=new dojo.xml.Parse();
var tn=_8c1?dojo.byId(name):name;
return dojo.widget.getParser().createComponents(xp.parseElement(tn,null,true))[0];
}
function fromScript(_8c9,name,_8cb,ns){
_8cb[_8c6]={dojotype:[{value:_8c5}],nodeRef:_8c9,fastMixIn:true};
_8cb.ns=ns;
return dojo.widget.getParser().createComponentFromScript(_8c9,name,_8cb,ns);
}
_8be=_8be||{};
var _8cd=false;
var tn=null;
var h=dojo.render.html.capable;
if(h){
tn=document.createElement("span");
}
if(!_8bf){
_8cd=true;
_8bf=tn;
if(h){
dojo.body().appendChild(_8bf);
}
}else{
if(_8c0){
dojo.dom.insertAtPosition(tn,_8bf,_8c0);
}else{
tn=_8bf;
}
}
var _8cf=fromScript(tn,name.toLowerCase(),_8be,ns);
if((!_8cf)||(!_8cf[0])||(typeof _8cf[0].widgetType=="undefined")){
throw new Error("createWidget: Creation of \""+name+"\" widget failed.");
}
try{
if(_8cd&&_8cf[0].domNode.parentNode){
_8cf[0].domNode.parentNode.removeChild(_8cf[0].domNode);
}
}
catch(e){
dojo.debug(e);
}
return _8cf[0];
};
dojo.provide("dojo.widget.DomWidget");
dojo.widget._cssFiles={};
dojo.widget._cssStrings={};
dojo.widget._templateCache={};
dojo.widget.defaultStrings={dojoRoot:dojo.hostenv.getBaseScriptUri(),baseScriptUri:dojo.hostenv.getBaseScriptUri()};
dojo.widget.fillFromTemplateCache=function(obj,_8d1,_8d2,_8d3){
var _8d4=_8d1||obj.templatePath;
var _8d5=dojo.widget._templateCache;
if(!_8d4&&!obj["widgetType"]){
do{
var _8d6="__dummyTemplate__"+dojo.widget._templateCache.dummyCount++;
}while(_8d5[_8d6]);
obj.widgetType=_8d6;
}
var wt=_8d4?_8d4.toString():obj.widgetType;
var ts=_8d5[wt];
if(!ts){
_8d5[wt]={"string":null,"node":null};
if(_8d3){
ts={};
}else{
ts=_8d5[wt];
}
}
if((!obj.templateString)&&(!_8d3)){
obj.templateString=_8d2||ts["string"];
}
if((!obj.templateNode)&&(!_8d3)){
obj.templateNode=ts["node"];
}
if((!obj.templateNode)&&(!obj.templateString)&&(_8d4)){
var _8d9=dojo.hostenv.getText(_8d4);
if(_8d9){
_8d9=_8d9.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");
var _8da=_8d9.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_8da){
_8d9=_8da[1];
}
}else{
_8d9="";
}
obj.templateString=_8d9;
if(!_8d3){
_8d5[wt]["string"]=_8d9;
}
}
if((!ts["string"])&&(!_8d3)){
ts.string=obj.templateString;
}
};
dojo.widget._templateCache.dummyCount=0;
dojo.widget.attachProperties=["dojoAttachPoint","id"];
dojo.widget.eventAttachProperty="dojoAttachEvent";
dojo.widget.onBuildProperty="dojoOnBuild";
dojo.widget.waiNames=["waiRole","waiState"];
dojo.widget.wai={waiRole:{name:"waiRole","namespace":"http://www.w3.org/TR/xhtml2",alias:"x2",prefix:"wairole:"},waiState:{name:"waiState","namespace":"http://www.w3.org/2005/07/aaa",alias:"aaa",prefix:""},setAttr:function(node,ns,attr,_8de){
if(dojo.render.html.ie){
node.setAttribute(this[ns].alias+":"+attr,this[ns].prefix+_8de);
}else{
node.setAttributeNS(this[ns]["namespace"],attr,this[ns].prefix+_8de);
}
},getAttr:function(node,ns,attr){
if(dojo.render.html.ie){
return node.getAttribute(this[ns].alias+":"+attr);
}else{
return node.getAttributeNS(this[ns]["namespace"],attr);
}
},removeAttr:function(node,ns,attr){
var _8e5=true;
if(dojo.render.html.ie){
_8e5=node.removeAttribute(this[ns].alias+":"+attr);
}else{
node.removeAttributeNS(this[ns]["namespace"],attr);
}
return _8e5;
}};
dojo.widget.attachTemplateNodes=function(_8e6,_8e7,_8e8){
var _8e9=dojo.dom.ELEMENT_NODE;
function trim(str){
return str.replace(/^\s+|\s+$/g,"");
}
if(!_8e6){
_8e6=_8e7.domNode;
}
if(_8e6.nodeType!=_8e9){
return;
}
var _8eb=_8e6.all||_8e6.getElementsByTagName("*");
var _8ec=_8e7;
for(var x=-1;x<_8eb.length;x++){
var _8ee=(x==-1)?_8e6:_8eb[x];
var _8ef=[];
if(!_8e7.widgetsInTemplate||!_8ee.getAttribute("dojoType")){
for(var y=0;y<this.attachProperties.length;y++){
var _8f1=_8ee.getAttribute(this.attachProperties[y]);
if(_8f1){
_8ef=_8f1.split(";");
for(var z=0;z<_8ef.length;z++){
if(dojo.lang.isArray(_8e7[_8ef[z]])){
_8e7[_8ef[z]].push(_8ee);
}else{
_8e7[_8ef[z]]=_8ee;
}
}
break;
}
}
var _8f3=_8ee.getAttribute(this.eventAttachProperty);
if(_8f3){
var evts=_8f3.split(";");
for(var y=0;y<evts.length;y++){
if((!evts[y])||(!evts[y].length)){
continue;
}
var _8f5=null;
var tevt=trim(evts[y]);
if(evts[y].indexOf(":")>=0){
var _8f7=tevt.split(":");
tevt=trim(_8f7[0]);
_8f5=trim(_8f7[1]);
}
if(!_8f5){
_8f5=tevt;
}
var tf=function(){
var ntf=new String(_8f5);
return function(evt){
if(_8ec[ntf]){
_8ec[ntf](dojo.event.browser.fixEvent(evt,this));
}
};
}();
dojo.event.browser.addListener(_8ee,tevt,tf,false,true);
}
}
for(var y=0;y<_8e8.length;y++){
var _8fb=_8ee.getAttribute(_8e8[y]);
if((_8fb)&&(_8fb.length)){
var _8f5=null;
var _8fc=_8e8[y].substr(4);
_8f5=trim(_8fb);
var _8fd=[_8f5];
if(_8f5.indexOf(";")>=0){
_8fd=dojo.lang.map(_8f5.split(";"),trim);
}
for(var z=0;z<_8fd.length;z++){
if(!_8fd[z].length){
continue;
}
var tf=function(){
var ntf=new String(_8fd[z]);
return function(evt){
if(_8ec[ntf]){
_8ec[ntf](dojo.event.browser.fixEvent(evt,this));
}
};
}();
dojo.event.browser.addListener(_8ee,_8fc,tf,false,true);
}
}
}
}
var _900=_8ee.getAttribute(this.templateProperty);
if(_900){
_8e7[_900]=_8ee;
}
dojo.lang.forEach(dojo.widget.waiNames,function(name){
var wai=dojo.widget.wai[name];
var val=_8ee.getAttribute(wai.name);
if(val){
if(val.indexOf("-")==-1){
dojo.widget.wai.setAttr(_8ee,wai.name,"role",val);
}else{
var _904=val.split("-");
dojo.widget.wai.setAttr(_8ee,wai.name,_904[0],_904[1]);
}
}
},this);
var _905=_8ee.getAttribute(this.onBuildProperty);
if(_905){
eval("var node = baseNode; var widget = targetObj; "+_905);
}
}
};
dojo.widget.getDojoEventsFromStr=function(str){
var re=/(dojoOn([a-z]+)(\s?))=/gi;
var evts=str?str.match(re)||[]:[];
var ret=[];
var lem={};
for(var x=0;x<evts.length;x++){
if(evts[x].length<1){
continue;
}
var cm=evts[x].replace(/\s/,"");
cm=(cm.slice(0,cm.length-1));
if(!lem[cm]){
lem[cm]=true;
ret.push(cm);
}
}
return ret;
};
dojo.declare("dojo.widget.DomWidget",dojo.widget.Widget,function(){
if((arguments.length>0)&&(typeof arguments[0]=="object")){
this.create(arguments[0]);
}
},{templateNode:null,templateString:null,templateCssString:null,preventClobber:false,domNode:null,containerNode:null,widgetsInTemplate:false,addChild:function(_90d,_90e,pos,ref,_911){
if(!this.isContainer){
dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget");
return null;
}else{
if(_911==undefined){
_911=this.children.length;
}
this.addWidgetAsDirectChild(_90d,_90e,pos,ref,_911);
this.registerChild(_90d,_911);
}
return _90d;
},addWidgetAsDirectChild:function(_912,_913,pos,ref,_916){
if((!this.containerNode)&&(!_913)){
this.containerNode=this.domNode;
}
var cn=(_913)?_913:this.containerNode;
if(!pos){
pos="after";
}
if(!ref){
if(!cn){
cn=dojo.body();
}
ref=cn.lastChild;
}
if(!_916){
_916=0;
}
_912.domNode.setAttribute("dojoinsertionindex",_916);
if(!ref){
cn.appendChild(_912.domNode);
}else{
if(pos=="insertAtIndex"){
dojo.dom.insertAtIndex(_912.domNode,ref.parentNode,_916);
}else{
if((pos=="after")&&(ref===cn.lastChild)){
cn.appendChild(_912.domNode);
}else{
dojo.dom.insertAtPosition(_912.domNode,cn,pos);
}
}
}
},registerChild:function(_918,_919){
_918.dojoInsertionIndex=_919;
var idx=-1;
for(var i=0;i<this.children.length;i++){
if(this.children[i].dojoInsertionIndex<=_919){
idx=i;
}
}
this.children.splice(idx+1,0,_918);
_918.parent=this;
_918.addedTo(this,idx+1);
delete dojo.widget.manager.topWidgets[_918.widgetId];
},removeChild:function(_91c){
dojo.dom.removeNode(_91c.domNode);
return dojo.widget.DomWidget.superclass.removeChild.call(this,_91c);
},getFragNodeRef:function(frag){
if(!frag){
return null;
}
if(!frag[this.getNamespacedType()]){
dojo.raise("Error: no frag for widget type "+this.getNamespacedType()+", id "+this.widgetId+" (maybe a widget has set it's type incorrectly)");
}
return frag[this.getNamespacedType()]["nodeRef"];
},postInitialize:function(args,frag,_920){
var _921=this.getFragNodeRef(frag);
if(_920&&(_920.snarfChildDomOutput||!_921)){
_920.addWidgetAsDirectChild(this,"","insertAtIndex","",args["dojoinsertionindex"],_921);
}else{
if(_921){
if(this.domNode&&(this.domNode!==_921)){
this._sourceNodeRef=dojo.dom.replaceNode(_921,this.domNode);
}
}
}
if(_920){
_920.registerChild(this,args.dojoinsertionindex);
}else{
dojo.widget.manager.topWidgets[this.widgetId]=this;
}
if(this.widgetsInTemplate){
var _922=new dojo.xml.Parse();
var _923;
var _924=this.domNode.getElementsByTagName("*");
for(var i=0;i<_924.length;i++){
if(_924[i].getAttribute("dojoAttachPoint")=="subContainerWidget"){
_923=_924[i];
}
if(_924[i].getAttribute("dojoType")){
_924[i].setAttribute("isSubWidget",true);
}
}
if(this.isContainer&&!this.containerNode){
if(_923){
var src=this.getFragNodeRef(frag);
if(src){
dojo.dom.moveChildren(src,_923);
frag["dojoDontFollow"]=true;
}
}else{
dojo.debug("No subContainerWidget node can be found in template file for widget "+this);
}
}
var _927=_922.parseElement(this.domNode,null,true);
dojo.widget.getParser().createSubComponents(_927,this);
var _928=[];
var _929=[this];
var w;
while((w=_929.pop())){
for(var i=0;i<w.children.length;i++){
var _92b=w.children[i];
if(_92b._processedSubWidgets||!_92b.extraArgs["issubwidget"]){
continue;
}
_928.push(_92b);
if(_92b.isContainer){
_929.push(_92b);
}
}
}
for(var i=0;i<_928.length;i++){
var _92c=_928[i];
if(_92c._processedSubWidgets){
dojo.debug("This should not happen: widget._processedSubWidgets is already true!");
return;
}
_92c._processedSubWidgets=true;
if(_92c.extraArgs["dojoattachevent"]){
var evts=_92c.extraArgs["dojoattachevent"].split(";");
for(var j=0;j<evts.length;j++){
var _92f=null;
var tevt=dojo.string.trim(evts[j]);
if(tevt.indexOf(":")>=0){
var _931=tevt.split(":");
tevt=dojo.string.trim(_931[0]);
_92f=dojo.string.trim(_931[1]);
}
if(!_92f){
_92f=tevt;
}
if(dojo.lang.isFunction(_92c[tevt])){
dojo.event.kwConnect({srcObj:_92c,srcFunc:tevt,targetObj:this,targetFunc:_92f});
}else{
alert(tevt+" is not a function in widget "+_92c);//ok
}
}
}
if(_92c.extraArgs["dojoattachpoint"]){
this[_92c.extraArgs["dojoattachpoint"]]=_92c;
}
}
}
if(this.isContainer&&!frag["dojoDontFollow"]){
dojo.widget.getParser().createSubComponents(frag,this);
}
},buildRendering:function(args,frag){
var ts=dojo.widget._templateCache[this.widgetType];
if(args["templatecsspath"]){
args["templateCssPath"]=args["templatecsspath"];
}
var _935=args["templateCssPath"]||this.templateCssPath;
if(_935&&!dojo.widget._cssFiles[_935.toString()]){
if((!this.templateCssString)&&(_935)){
this.templateCssString=dojo.hostenv.getText(_935);
this.templateCssPath=null;
}
dojo.widget._cssFiles[_935.toString()]=true;
}
if((this["templateCssString"])&&(!dojo.widget._cssStrings[this.templateCssString])){
dojo.html.insertCssText(this.templateCssString,null,_935);
dojo.widget._cssStrings[this.templateCssString]=true;
}
if((!this.preventClobber)&&((this.templatePath)||(this.templateNode)||((this["templateString"])&&(this.templateString.length))||((typeof ts!="undefined")&&((ts["string"])||(ts["node"]))))){
this.buildFromTemplate(args,frag);
}else{
this.domNode=this.getFragNodeRef(frag);
}
this.fillInTemplate(args,frag);
},buildFromTemplate:function(args,frag){
var _938=false;
if(args["templatepath"]){
args["templatePath"]=args["templatepath"];
}
dojo.widget.fillFromTemplateCache(this,args["templatePath"],null,_938);
var ts=dojo.widget._templateCache[this.templatePath?this.templatePath.toString():this.widgetType];
if((ts)&&(!_938)){
if(!this.templateString.length){
this.templateString=ts["string"];
}
if(!this.templateNode){
this.templateNode=ts["node"];
}
}
var _93a=false;
var node=null;
var tstr=this.templateString;
if((!this.templateNode)&&(this.templateString)){
_93a=this.templateString.match(/\$\{([^\}]+)\}/g);
if(_93a){
var hash=this.strings||{};
for(var key in dojo.widget.defaultStrings){
if(dojo.lang.isUndefined(hash[key])){
hash[key]=dojo.widget.defaultStrings[key];
}
}
for(var i=0;i<_93a.length;i++){
var key=_93a[i];
key=key.substring(2,key.length-1);
var kval=(key.substring(0,5)=="this.")?dojo.lang.getObjPathValue(key.substring(5),this):hash[key];
var _941;
if((kval)||(dojo.lang.isString(kval))){
_941=new String((dojo.lang.isFunction(kval))?kval.call(this,key,this.templateString):kval);
while(_941.indexOf("\"")>-1){
_941=_941.replace("\"","&quot;");
}
tstr=tstr.replace(_93a[i],_941);
}
}
}else{
this.templateNode=this.createNodesFromText(this.templateString,true)[0];
if(!_938){
ts.node=this.templateNode;
}
}
}
if((!this.templateNode)&&(!_93a)){
dojo.debug("DomWidget.buildFromTemplate: could not create template");
return false;
}else{
if(!_93a){
node=this.templateNode.cloneNode(true);
if(!node){
return false;
}
}else{
node=this.createNodesFromText(tstr,true)[0];
}
}
this.domNode=node;
this.attachTemplateNodes();
if(this.isContainer&&this.containerNode){
var src=this.getFragNodeRef(frag);
if(src){
dojo.dom.moveChildren(src,this.containerNode);
}
}
},attachTemplateNodes:function(_943,_944){
if(!_943){
_943=this.domNode;
}
if(!_944){
_944=this;
}
return dojo.widget.attachTemplateNodes(_943,_944,dojo.widget.getDojoEventsFromStr(this.templateString));
},fillInTemplate:function(){
},destroyRendering:function(){
try{
dojo.dom.destroyNode(this.domNode);
delete this.domNode;
}
catch(e){
}
if(this._sourceNodeRef){
try{
dojo.dom.destroyNode(this._sourceNodeRef);
}
catch(e){
}
}
},createNodesFromText:function(){
dojo.unimplemented("dojo.widget.DomWidget.createNodesFromText");
}});
dojo.provide("dojo.lfx.toggle");
dojo.lfx.toggle.plain={show:function(node,_946,_947,_948){
dojo.html.show(node);
if(dojo.lang.isFunction(_948)){
_948();
}
},hide:function(node,_94a,_94b,_94c){
dojo.html.hide(node);
if(dojo.lang.isFunction(_94c)){
_94c();
}
}};
dojo.lfx.toggle.fade={show:function(node,_94e,_94f,_950){
dojo.lfx.fadeShow(node,_94e,_94f,_950).play();
},hide:function(node,_952,_953,_954){
dojo.lfx.fadeHide(node,_952,_953,_954).play();
}};
dojo.lfx.toggle.wipe={show:function(node,_956,_957,_958){
dojo.lfx.wipeIn(node,_956,_957,_958).play();
},hide:function(node,_95a,_95b,_95c){
dojo.lfx.wipeOut(node,_95a,_95b,_95c).play();
}};
dojo.lfx.toggle.explode={show:function(node,_95e,_95f,_960,_961){
dojo.lfx.explode(_961||{x:0,y:0,width:0,height:0},node,_95e,_95f,_960).play();
},hide:function(node,_963,_964,_965,_966){
dojo.lfx.implode(node,_966||{x:0,y:0,width:0,height:0},_963,_964,_965).play();
}};
dojo.provide("dojo.widget.HtmlWidget");
dojo.declare("dojo.widget.HtmlWidget",dojo.widget.DomWidget,{templateCssPath:null,templatePath:null,lang:"",toggle:"plain",toggleDuration:150,initialize:function(args,frag){
},postMixInProperties:function(args,frag){
if(this.lang===""){
this.lang=null;
}
this.toggleObj=dojo.lfx.toggle[this.toggle.toLowerCase()]||dojo.lfx.toggle.plain;
},createNodesFromText:function(txt,wrap){
return dojo.html.createNodesFromText(txt,wrap);
},destroyRendering:function(_96d){
try{
if(this.bgIframe){
this.bgIframe.remove();
delete this.bgIframe;
}
if(!_96d&&this.domNode){
dojo.event.browser.clean(this.domNode);
}
dojo.widget.HtmlWidget.superclass.destroyRendering.call(this);
}
catch(e){
}
},isShowing:function(){
return dojo.html.isShowing(this.domNode);
},toggleShowing:function(){
if(this.isShowing()){
this.hide();
}else{
this.show();
}
},show:function(){
if(this.isShowing()){
return;
}
this.animationInProgress=true;
this.toggleObj.show(this.domNode,this.toggleDuration,null,dojo.lang.hitch(this,this.onShow),this.explodeSrc);
},onShow:function(){
this.animationInProgress=false;
this.checkSize();
},hide:function(){
if(!this.isShowing()){
return;
}
this.animationInProgress=true;
this.toggleObj.hide(this.domNode,this.toggleDuration,null,dojo.lang.hitch(this,this.onHide),this.explodeSrc);
},onHide:function(){
this.animationInProgress=false;
},_isResized:function(w,h){
if(!this.isShowing()){
return false;
}
var wh=dojo.html.getMarginBox(this.domNode);
var _971=w||wh.width;
var _972=h||wh.height;
if(this.width==_971&&this.height==_972){
return false;
}
this.width=_971;
this.height=_972;
return true;
},checkSize:function(){
if(!this._isResized()){
return;
}
this.onResized();
},resizeTo:function(w,h){
dojo.html.setMarginBox(this.domNode,{width:w,height:h});
if(this.isShowing()){
this.onResized();
}
},resizeSoon:function(){
if(this.isShowing()){
dojo.lang.setTimeout(this,this.onResized,0);
}
},onResized:function(){
dojo.lang.forEach(this.children,function(_975){
if(_975.checkSize){
_975.checkSize();
}
});
}});
dojo.provide("dojo.widget.*");
dojo.provide("dojo.widget.html.layout");
dojo.widget.html.layout=function(_976,_977,_978){
dojo.html.addClass(_976,"dojoLayoutContainer");
_977=dojo.lang.filter(_977,function(_979,idx){
_979.idx=idx;
return dojo.lang.inArray(["top","bottom","left","right","client","flood"],_979.layoutAlign);
});
if(_978&&_978!="none"){
var rank=function(_97c){
switch(_97c.layoutAlign){
case "flood":
return 1;
case "left":
case "right":
return (_978=="left-right")?2:3;
case "top":
case "bottom":
return (_978=="left-right")?3:2;
default:
return 4;
}
};
_977.sort(function(a,b){
return (rank(a)-rank(b))||(a.idx-b.idx);
});
}
var f={top:dojo.html.getPixelValue(_976,"padding-top",true),left:dojo.html.getPixelValue(_976,"padding-left",true)};
dojo.lang.mixin(f,dojo.html.getContentBox(_976));
dojo.lang.forEach(_977,function(_980){
var elm=_980.domNode;
var pos=_980.layoutAlign;
with(elm.style){
left=f.left+"px";
top=f.top+"px";
bottom="auto";
right="auto";
}
dojo.html.addClass(elm,"dojoAlign"+dojo.string.capitalize(pos));
if((pos=="top")||(pos=="bottom")){
dojo.html.setMarginBox(elm,{width:f.width});
var h=dojo.html.getMarginBox(elm).height;
f.height-=h;
if(pos=="top"){
f.top+=h;
}else{
elm.style.top=f.top+f.height+"px";
}
if(_980.onResized){
_980.onResized();
}
}else{
if(pos=="left"||pos=="right"){
var w=dojo.html.getMarginBox(elm).width;
if(_980.resizeTo){
_980.resizeTo(w,f.height);
}else{
dojo.html.setMarginBox(elm,{width:w,height:f.height});
}
f.width-=w;
if(pos=="left"){
f.left+=w;
}else{
elm.style.left=f.left+f.width+"px";
}
}else{
if(pos=="flood"||pos=="client"){
if(_980.resizeTo){
_980.resizeTo(f.width,f.height);
}else{
dojo.html.setMarginBox(elm,{width:f.width,height:f.height});
}
}
}
}
});
};
dojo.html.insertCssText(".dojoLayoutContainer{ position: relative; display: block; overflow: hidden; }\n"+"body .dojoAlignTop, body .dojoAlignBottom, body .dojoAlignLeft, body .dojoAlignRight { position: absolute; overflow: hidden; }\n"+"body .dojoAlignClient { position: absolute }\n"+".dojoAlignClient { overflow: auto; }\n");
dojo.provide("dojo.widget.PageContainer");
dojo.widget.defineWidget("dojo.widget.PageContainer",dojo.widget.HtmlWidget,{isContainer:true,doLayout:true,templateString:"<div dojoAttachPoint='containerNode'></div>",selectedChild:"",fillInTemplate:function(args,frag){
var _987=this.getFragNodeRef(frag);
dojo.html.copyStyle(this.domNode,_987);
dojo.widget.PageContainer.superclass.fillInTemplate.apply(this,arguments);
},postCreate:function(args,frag){
if(this.children.length){
dojo.lang.forEach(this.children,this._setupChild,this);
var _98a;
if(this.selectedChild){
this.selectChild(this.selectedChild);
}else{
for(var i=0;i<this.children.length;i++){
if(this.children[i].selected){
this.selectChild(this.children[i]);
break;
}
}
if(!this.selectedChildWidget){
this.selectChild(this.children[0]);
}
}
}
},addChild:function(_98c){
dojo.widget.PageContainer.superclass.addChild.apply(this,arguments);
this._setupChild(_98c);
this.onResized();
if(!this.selectedChildWidget){
this.selectChild(_98c);
}
},_setupChild:function(page){
page.hide();
page.domNode.style.position="relative";
dojo.event.topic.publish(this.widgetId+"-addChild",page);
},removeChild:function(page){
dojo.widget.PageContainer.superclass.removeChild.apply(this,arguments);
if(this._beingDestroyed){
return;
}
dojo.event.topic.publish(this.widgetId+"-removeChild",page);
this.onResized();
if(this.selectedChildWidget===page){
this.selectedChildWidget=undefined;
if(this.children.length>0){
this.selectChild(this.children[0],true);
}
}
},selectChild:function(page,_990){
page=dojo.widget.byId(page);
this.correspondingPageButton=_990;
if(this.selectedChildWidget){
this._hideChild(this.selectedChildWidget);
}
this.selectedChildWidget=page;
this.selectedChild=page.widgetId;
this._showChild(page);
page.isFirstChild=(page==this.children[0]);
page.isLastChild=(page==this.children[this.children.length-1]);
dojo.event.topic.publish(this.widgetId+"-selectChild",page);
},forward:function(){
var _991=dojo.lang.find(this.children,this.selectedChildWidget);
this.selectChild(this.children[_991+1]);
},back:function(){
var _992=dojo.lang.find(this.children,this.selectedChildWidget);
this.selectChild(this.children[_992-1]);
},onResized:function(){
if(this.doLayout&&this.selectedChildWidget){
with(this.selectedChildWidget.domNode.style){
top=dojo.html.getPixelValue(this.containerNode,"padding-top",true);
left=dojo.html.getPixelValue(this.containerNode,"padding-left",true);
}
var _993=dojo.html.getContentBox(this.containerNode);
this.selectedChildWidget.resizeTo(_993.width,_993.height);
}
},_showChild:function(page){
if(this.doLayout){
var _995=dojo.html.getContentBox(this.containerNode);
page.resizeTo(_995.width,_995.height);
}
page.selected=true;
page.show();
},_hideChild:function(page){
page.selected=false;
page.hide();
},closeChild:function(page){
var _998=page.onClose(this,page);
if(_998){
this.removeChild(page);
page.destroy();
}
},destroy:function(){
this._beingDestroyed=true;
dojo.event.topic.destroy(this.widgetId+"-addChild");
dojo.event.topic.destroy(this.widgetId+"-removeChild");
dojo.event.topic.destroy(this.widgetId+"-selectChild");
dojo.widget.PageContainer.superclass.destroy.apply(this,arguments);
}});
dojo.widget.defineWidget("dojo.widget.PageController",dojo.widget.HtmlWidget,{templateString:"<span wairole='tablist' dojoAttachEvent='onKey'></span>",isContainer:true,containerId:"",buttonWidget:"PageButton","class":"dojoPageController",fillInTemplate:function(){
dojo.html.addClass(this.domNode,this["class"]);
dojo.widget.wai.setAttr(this.domNode,"waiRole","role","tablist");
},postCreate:function(){
this.pane2button={};
var _999=dojo.widget.byId(this.containerId);
if(_999){
dojo.lang.forEach(_999.children,this.onAddChild,this);
}
dojo.event.topic.subscribe(this.containerId+"-addChild",this,"onAddChild");
dojo.event.topic.subscribe(this.containerId+"-removeChild",this,"onRemoveChild");
dojo.event.topic.subscribe(this.containerId+"-selectChild",this,"onSelectChild");
},destroy:function(){
dojo.event.topic.unsubscribe(this.containerId+"-addChild",this,"onAddChild");
dojo.event.topic.unsubscribe(this.containerId+"-removeChild",this,"onRemoveChild");
dojo.event.topic.unsubscribe(this.containerId+"-selectChild",this,"onSelectChild");
dojo.widget.PageController.superclass.destroy.apply(this,arguments);
},onAddChild:function(page){
var _99b=dojo.widget.createWidget(this.buttonWidget,{label:page.label,closeButton:page.closable});
this.addChild(_99b);
this.domNode.appendChild(_99b.domNode);
this.pane2button[page]=_99b;
page.controlButton=_99b;
var _99c=this;
dojo.event.connect(_99b,"onClick",function(){
_99c.onButtonClick(page);
});
dojo.event.connect(_99b,"onCloseButtonClick",function(){
_99c.onCloseButtonClick(page);
});
},onRemoveChild:function(page){
if(this._currentChild==page){
this._currentChild=null;
}
var _99e=this.pane2button[page];
if(_99e){
_99e.destroy();
}
this.pane2button[page]=null;
},onSelectChild:function(page){
if(this._currentChild){
var _9a0=this.pane2button[this._currentChild];
_9a0.clearSelected();
}
var _9a1=this.pane2button[page];
_9a1.setSelected();
this._currentChild=page;
},onButtonClick:function(page){
var _9a3=dojo.widget.byId(this.containerId);
_9a3.selectChild(page,false,this);
},onCloseButtonClick:function(page){
var _9a5=dojo.widget.byId(this.containerId);
_9a5.closeChild(page);
},onKey:function(evt){
if((evt.keyCode==evt.KEY_RIGHT_ARROW)||(evt.keyCode==evt.KEY_LEFT_ARROW)){
var _9a7=0;
var next=null;
var _9a7=dojo.lang.find(this.children,this.pane2button[this._currentChild]);
if(evt.keyCode==evt.KEY_RIGHT_ARROW){
next=this.children[(_9a7+1)%this.children.length];
}else{
next=this.children[(_9a7+(this.children.length-1))%this.children.length];
}
dojo.event.browser.stopEvent(evt);
next.onClick();
}
}});
dojo.widget.defineWidget("dojo.widget.PageButton",dojo.widget.HtmlWidget,{templateString:"<span class='item'>"+"<span dojoAttachEvent='onClick' dojoAttachPoint='titleNode' class='selectButton'>${this.label}</span>"+"<span dojoAttachEvent='onClick:onCloseButtonClick' class='closeButton'>[X]</span>"+"</span>",label:"foo",closeButton:false,onClick:function(){
this.focus();
},onCloseButtonMouseOver:function(){
dojo.html.addClass(this.closeButtonNode,"closeHover");
},onCloseButtonMouseOut:function(){
dojo.html.removeClass(this.closeButtonNode,"closeHover");
},onCloseButtonClick:function(evt){
},setSelected:function(){
dojo.html.addClass(this.domNode,"current");
this.titleNode.setAttribute("tabIndex","0");
},clearSelected:function(){
dojo.html.removeClass(this.domNode,"current");
this.titleNode.setAttribute("tabIndex","-1");
},focus:function(){
if(this.titleNode.focus){
this.titleNode.focus();
}
}});
dojo.lang.extend(dojo.widget.Widget,{label:"",selected:false,closable:false,onClose:function(){
return true;
}});
dojo.provide("dojo.widget.AccordionContainer");
dojo.widget.defineWidget("dojo.widget.AccordionContainer",dojo.widget.HtmlWidget,{isContainer:true,labelNodeClass:"label",containerNodeClass:"accBody",duration:250,fillInTemplate:function(){
with(this.domNode.style){
if(position!="absolute"){
position="relative";
}
overflow="hidden";
}
},addChild:function(_9aa){
var _9ab=this._addChild(_9aa);
this._setSizes();
return _9ab;
},_addChild:function(_9ac){
if(_9ac.open){
dojo.deprecated("open parameter deprecated, use 'selected=true' instead will be removed in ","0.5");
dojo.debug(_9ac.widgetId+": open == "+_9ac.open);
_9ac.selected=true;
}
if(_9ac.widgetType!="AccordionPane"){
var _9ad=dojo.widget.createWidget("AccordionPane",{label:_9ac.label,selected:_9ac.selected,labelNodeClass:this.labelNodeClass,containerNodeClass:this.containerNodeClass,allowCollapse:this.allowCollapse});
_9ad.addChild(_9ac);
this.addWidgetAsDirectChild(_9ad);
this.registerChild(_9ad,this.children.length);
return _9ad;
}else{
dojo.html.addClass(_9ac.containerNode,this.containerNodeClass);
dojo.html.addClass(_9ac.labelNode,this.labelNodeClass);
this.addWidgetAsDirectChild(_9ac);
this.registerChild(_9ac,this.children.length);
return _9ac;
}
},postCreate:function(){
var _9ae=this.children;
this.children=[];
dojo.html.removeChildren(this.domNode);
dojo.lang.forEach(_9ae,dojo.lang.hitch(this,"_addChild"));
this._setSizes();
},removeChild:function(_9af){
dojo.widget.AccordionContainer.superclass.removeChild.call(this,_9af);
this._setSizes();
},onResized:function(){
this._setSizes();
},_setSizes:function(){
var _9b0=0;
var _9b1=0;
dojo.lang.forEach(this.children,function(_9b2,idx){
_9b0+=_9b2.getLabelHeight();
if(_9b2.selected){
_9b1=idx;
}
});
var _9b4=dojo.html.getContentBox(this.domNode);
var y=0;
dojo.lang.forEach(this.children,function(_9b6,idx){
var _9b8=_9b6.getLabelHeight();
_9b6.resizeTo(_9b4.width,_9b4.height-_9b0+_9b8);
_9b6.domNode.style.zIndex=idx+1;
_9b6.domNode.style.position="absolute";
_9b6.domNode.style.top=y+"px";
y+=(idx==_9b1)?dojo.html.getBorderBox(_9b6.domNode).height:_9b8;
});
},selectChild:function(page){
dojo.lang.forEach(this.children,function(_9ba){
_9ba.setSelected(_9ba==page);
});
var y=0;
var _9bc=[];
dojo.lang.forEach(this.children,function(_9bd,idx){
if(_9bd.domNode.style.top!=(y+"px")){
_9bc.push(dojo.lfx.html.slideTo(_9bd.domNode,{top:y,left:0},this.duration));
}
y+=_9bd.selected?dojo.html.getBorderBox(_9bd.domNode).height:_9bd.getLabelHeight();
},this);
dojo.lfx.combine(_9bc).play();
}});
dojo.widget.defineWidget("dojo.widget.AccordionPane",dojo.widget.HtmlWidget,{label:"","class":"dojoAccordionPane",labelNodeClass:"label",containerNodeClass:"accBody",selected:false,templateString:"<div dojoAttachPoint=\"domNode\">\n<div dojoAttachPoint=\"labelNode\" dojoAttachEvent=\"onclick: onLabelClick\" class=\"${this.labelNodeClass}\">${this.label}</div>\n<div dojoAttachPoint=\"containerNode\" style=\"overflow: hidden;\" class=\"${this.containerNodeClass}\"></div>\n</div>\n",isContainer:true,fillInTemplate:function(){
dojo.html.addClass(this.domNode,this["class"]);
dojo.widget.AccordionPane.superclass.fillInTemplate.call(this);
dojo.html.disableSelection(this.labelNode);
this.setSelected(this.selected);
},setLabel:function(_9bf){
this.labelNode.innerHTML=_9bf;
},resizeTo:function(_9c0,_9c1){
dojo.html.setMarginBox(this.domNode,{width:_9c0,height:_9c1});
var _9c2=[{domNode:this.labelNode,layoutAlign:"top"},{domNode:this.containerNode,layoutAlign:"client"}];
dojo.widget.html.layout(this.domNode,_9c2);
var _9c3=dojo.html.getContentBox(this.containerNode);
this.children[0].resizeTo(_9c3.width,_9c3.height);
},getLabelHeight:function(){
return dojo.html.getMarginBox(this.labelNode).height;
},onLabelClick:function(){
this.parent.selectChild(this);
},setSelected:function(_9c4){
this.selected=_9c4;
(_9c4?dojo.html.addClass:dojo.html.removeClass)(this.domNode,this["class"]+"-selected");
var _9c5=this.children[0];
if(_9c5){
if(_9c4){
if(!_9c5.isShowing()){
_9c5.show();
}else{
_9c5.onShow();
}
}else{
_9c5.onHide();
}
}
}});
dojo.lang.extend(dojo.widget.Widget,{open:false});
dojo.provide("dojo.widget.ContentPane");
dojo.widget.defineWidget("dojo.widget.ContentPane",dojo.widget.HtmlWidget,function(){
this._styleNodes=[];
this._onLoadStack=[];
this._onUnloadStack=[];
this._callOnUnload=false;
this._ioBindObj;
this.scriptScope;
this.bindArgs={};
},{isContainer:true,adjustPaths:true,href:"",extractContent:true,parseContent:true,cacheContent:true,preload:false,refreshOnShow:false,handler:"",executeScripts:false,scriptSeparation:true,loadingMessage:"Loading...",isLoaded:false,postCreate:function(args,frag,_9c8){
if(this.handler!==""){
this.setHandler(this.handler);
}
if(this.isShowing()||this.preload){
this.loadContents();
}
},show:function(){
if(this.refreshOnShow){
this.refresh();
}else{
this.loadContents();
}
dojo.widget.ContentPane.superclass.show.call(this);
},refresh:function(){
this.isLoaded=false;
this.loadContents();
},loadContents:function(){
if(this.isLoaded){
return;
}
if(dojo.lang.isFunction(this.handler)){
this._runHandler();
}else{
if(this.href!=""){
this._downloadExternalContent(this.href,this.cacheContent&&!this.refreshOnShow);
}
}
},setUrl:function(url){
this.href=url;
this.isLoaded=false;
if(this.preload||this.isShowing()){
this.loadContents();
}
},abort:function(){
var bind=this._ioBindObj;
if(!bind||!bind.abort){
return;
}
bind.abort();
delete this._ioBindObj;
},_downloadExternalContent:function(url,_9cc){
this.abort();
this._handleDefaults(this.loadingMessage,"onDownloadStart");
var self=this;
this._ioBindObj=dojo.io.bind(this._cacheSetting({url:url,mimetype:"text/html",handler:function(type,data,xhr){
delete self._ioBindObj;
if(type=="load"){
self.onDownloadEnd.call(self,url,data);
}else{
var e={responseText:xhr.responseText,status:xhr.status,statusText:xhr.statusText,responseHeaders:xhr.getAllResponseHeaders(),text:"Error loading '"+url+"' ("+xhr.status+" "+xhr.statusText+")"};
self._handleDefaults.call(self,e,"onDownloadError");
self.onLoad();
}
}},_9cc));
},_cacheSetting:function(_9d2,_9d3){
for(var x in this.bindArgs){
if(dojo.lang.isUndefined(_9d2[x])){
_9d2[x]=this.bindArgs[x];
}
}
if(dojo.lang.isUndefined(_9d2.useCache)){
_9d2.useCache=_9d3;
}
if(dojo.lang.isUndefined(_9d2.preventCache)){
_9d2.preventCache=!_9d3;
}
if(dojo.lang.isUndefined(_9d2.mimetype)){
_9d2.mimetype="text/html";
}
return _9d2;
},onLoad:function(e){
this._runStack("_onLoadStack");
this.isLoaded=true;
},onUnLoad:function(e){
dojo.deprecated(this.widgetType+".onUnLoad, use .onUnload (lowercased load)",0.5);
},onUnload:function(e){
this._runStack("_onUnloadStack");
delete this.scriptScope;
if(this.onUnLoad!==dojo.widget.ContentPane.prototype.onUnLoad){
this.onUnLoad.apply(this,arguments);
}
},_runStack:function(_9d8){
var st=this[_9d8];
var err="";
var _9db=this.scriptScope||window;
for(var i=0;i<st.length;i++){
try{
st[i].call(_9db);
}
catch(e){
err+="\n"+st[i]+" failed: "+e.description;
}
}
this[_9d8]=[];
if(err.length){
var name=(_9d8=="_onLoadStack")?"addOnLoad":"addOnUnLoad";
this._handleDefaults(name+" failure\n "+err,"onExecError","debug");
}
},addOnLoad:function(obj,func){
this._pushOnStack(this._onLoadStack,obj,func);
},addOnUnload:function(obj,func){
this._pushOnStack(this._onUnloadStack,obj,func);
},addOnUnLoad:function(){
dojo.deprecated(this.widgetType+".addOnUnLoad, use addOnUnload instead. (lowercased Load)",0.5);
this.addOnUnload.apply(this,arguments);
},_pushOnStack:function(_9e2,obj,func){
if(typeof func=="undefined"){
_9e2.push(obj);
}else{
_9e2.push(function(){
obj[func]();
});
}
},destroy:function(){
this.onUnload();
dojo.widget.ContentPane.superclass.destroy.call(this);
},onExecError:function(e){
},onContentError:function(e){
},onDownloadError:function(e){
},onDownloadStart:function(e){
},onDownloadEnd:function(url,data){
data=this.splitAndFixPaths(data,url);
this.setContent(data);
},_handleDefaults:function(e,_9ec,_9ed){
if(!_9ec){
_9ec="onContentError";
}
if(dojo.lang.isString(e)){
e={text:e};
}
if(!e.text){
e.text=e.toString();
}
e.toString=function(){
return this.text;
};
if(typeof e.returnValue!="boolean"){
e.returnValue=true;
}
if(typeof e.preventDefault!="function"){
e.preventDefault=function(){
this.returnValue=false;
};
}
this[_9ec](e);
if(e.returnValue){
switch(_9ed){
case true:
case "alert": //ok
alert(e.toString());//ok
break;
case "debug":
dojo.debug(e.toString());
break;
default:
if(this._callOnUnload){
this.onUnload();
}
this._callOnUnload=false;
if(arguments.callee._loopStop){
dojo.debug(e.toString());
}else{
arguments.callee._loopStop=true;
this._setContent(e.toString());
}
}
}
arguments.callee._loopStop=false;
},splitAndFixPaths:function(s,url){
var _9f0=[],_9f1=[],tmp=[];
var _9f3=[],_9f4=[],attr=[],_9f6=[];
var str="",path="",fix="",_9fa="",tag="",_9fc="";
if(!url){
url="./";
}
if(s){
var _9fd=/<title[^>]*>([\s\S]*?)<\/title>/i;
while(_9f3=_9fd.exec(s)){
_9f0.push(_9f3[1]);
s=s.substring(0,_9f3.index)+s.substr(_9f3.index+_9f3[0].length);
}
if(this.adjustPaths){
var _9fe=/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i;
var _9ff=/\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@]+?)\2/i;
var _a00=/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/;
while(tag=_9fe.exec(s)){
str+=s.substring(0,tag.index);
s=s.substring((tag.index+tag[0].length),s.length);
tag=tag[0];
_9fa="";
while(attr=_9ff.exec(tag)){
path="";
_9fc=attr[3];
switch(attr[1].toLowerCase()){
case "src":
case "href":
if(_a00.exec(_9fc)){
path=_9fc;
}else{
path=(new dojo.uri.Uri(url,_9fc).toString());
}
break;
case "style":
path=dojo.html.fixPathsInCssText(_9fc,url);
break;
default:
path=_9fc;
}
fix=" "+attr[1]+"="+attr[2]+path+attr[2];
_9fa+=tag.substring(0,attr.index)+fix;
tag=tag.substring((attr.index+attr[0].length),tag.length);
}
str+=_9fa+tag;
}
s=str+s;
}
_9fd=/(?:<(style)[^>]*>([\s\S]*?)<\/style>|<link ([^>]*rel=['"]?stylesheet['"]?[^>]*)>)/i;
while(_9f3=_9fd.exec(s)){
if(_9f3[1]&&_9f3[1].toLowerCase()=="style"){
_9f6.push(dojo.html.fixPathsInCssText(_9f3[2],url));
}else{
if(attr=_9f3[3].match(/href=(['"]?)([^'">]*)\1/i)){
_9f6.push({path:attr[2]});
}
}
s=s.substring(0,_9f3.index)+s.substr(_9f3.index+_9f3[0].length);
}
var _9fd=/<script([^>]*)>([\s\S]*?)<\/script>/i;
var _a01=/src=(['"]?)([^"']*)\1/i;
var _a02=/.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/;
var _a03=/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g;
var _a04=/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix|registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/;
while(_9f3=_9fd.exec(s)){
if(this.executeScripts&&_9f3[1]){
if(attr=_a01.exec(_9f3[1])){
if(_a02.exec(attr[2])){
dojo.debug("Security note! inhibit:"+attr[2]+" from  being loaded again.");
}else{
_9f1.push({path:attr[2]});
}
}
}
if(_9f3[2]){
var sc=_9f3[2].replace(_a03,"");
if(!sc){
continue;
}
while(tmp=_a04.exec(sc)){
_9f4.push(tmp[0]);
sc=sc.substring(0,tmp.index)+sc.substr(tmp.index+tmp[0].length);
}
if(this.executeScripts){
_9f1.push(sc);
}
}
s=s.substr(0,_9f3.index)+s.substr(_9f3.index+_9f3[0].length);
}
if(this.extractContent){
_9f3=s.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_9f3){
s=_9f3[1];
}
}
if(this.executeScripts&&this.scriptSeparation){
var _9fd=/(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/;
var _a06=/([\s'";:\(])scriptScope(.*)/;
str="";
while(tag=_9fd.exec(s)){
tmp=((tag[3]=="'")?"\"":"'");
fix="";
str+=s.substring(0,tag.index)+tag[1];
while(attr=_a06.exec(tag[2])){
tag[2]=tag[2].substring(0,attr.index)+attr[1]+"dojo.widget.byId("+tmp+this.widgetId+tmp+").scriptScope"+attr[2];
}
str+=tag[2];
s=s.substr(tag.index+tag[0].length);
}
s=str+s;
}
}
return {"xml":s,"styles":_9f6,"titles":_9f0,"requires":_9f4,"scripts":_9f1,"url":url};
},_setContent:function(cont){
this.destroyChildren();
for(var i=0;i<this._styleNodes.length;i++){
if(this._styleNodes[i]&&this._styleNodes[i].parentNode){
this._styleNodes[i].parentNode.removeChild(this._styleNodes[i]);
}
}
this._styleNodes=[];
try{
var node=this.containerNode||this.domNode;
while(node.firstChild){
dojo.html.destroyNode(node.firstChild);
}
if(typeof cont!="string"){
node.appendChild(cont);
}else{
node.innerHTML=cont;
}
}
catch(e){
e.text="Couldn't load content:"+e.description;
this._handleDefaults(e,"onContentError");
}
},setContent:function(data){
this.abort();
if(this._callOnUnload){
this.onUnload();
}
this._callOnUnload=true;
if(!data||dojo.html.isNode(data)){
this._setContent(data);
this.onResized();
this.onLoad();
}else{
if(typeof data.xml!="string"){
this.href="";
data=this.splitAndFixPaths(data);
}
this._setContent(data.xml);
for(var i=0;i<data.styles.length;i++){
if(data.styles[i].path){
this._styleNodes.push(dojo.html.insertCssFile(data.styles[i].path,dojo.doc(),false,true));
}else{
this._styleNodes.push(dojo.html.insertCssText(data.styles[i]));
}
}
if(this.parseContent){
for(var i=0;i<data.requires.length;i++){
try{
eval(data.requires[i]);
}
catch(e){
e.text="ContentPane: error in package loading calls, "+(e.description||e);
this._handleDefaults(e,"onContentError","debug");
}
}
}
var _a0c=this;
function asyncParse(){
if(_a0c.executeScripts){
_a0c._executeScripts(data.scripts);
}
if(_a0c.parseContent){
var node=_a0c.containerNode||_a0c.domNode;
var _a0e=new dojo.xml.Parse();
var frag=_a0e.parseElement(node,null,true);
dojo.widget.getParser().createSubComponents(frag,_a0c);
}
_a0c.onResized();
_a0c.onLoad();
}
if(dojo.hostenv.isXDomain&&data.requires.length){
dojo.addOnLoad(asyncParse);
}else{
asyncParse();
}
}
},setHandler:function(_a10){
var fcn=dojo.lang.isFunction(_a10)?_a10:window[_a10];
if(!dojo.lang.isFunction(fcn)){
this._handleDefaults("Unable to set handler, '"+_a10+"' not a function.","onExecError",true);
return;
}
this.handler=function(){
return fcn.apply(this,arguments);
};
},_runHandler:function(){
var ret=true;
if(dojo.lang.isFunction(this.handler)){
this.handler(this,this.domNode);
ret=false;
}
this.onLoad();
return ret;
},_executeScripts:function(_a13){
var self=this;
var tmp="",code="";
for(var i=0;i<_a13.length;i++){
if(_a13[i].path){
dojo.io.bind(this._cacheSetting({"url":_a13[i].path,"load":function(type,_a19){
dojo.lang.hitch(self,tmp=";"+_a19);
},"error":function(type,_a1b){
_a1b.text=type+" downloading remote script";
self._handleDefaults.call(self,_a1b,"onExecError","debug");
},"mimetype":"text/plain","sync":true},this.cacheContent));
code+=tmp;
}else{
code+=_a13[i];
}
}
try{
if(this.scriptSeparation){
delete this.scriptScope;
this.scriptScope=new (new Function("_container_",code+"; return this;"))(self);
}else{
var djg=dojo.global();
if(djg.execScript){
djg.execScript(code);
}else{
var djd=dojo.doc();
var sc=djd.createElement("script");
sc.appendChild(djd.createTextNode(code));
(this.containerNode||this.domNode).appendChild(sc);
}
}
}
catch(e){
e.text="Error running scripts from content:\n"+e.description;
this._handleDefaults(e,"onExecError","debug");
}
}});
dojo.provide("dojo.date.supplemental");
dojo.date.getFirstDayOfWeek=function(_a1f){
var _a20={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,gb:0,sy:4};
_a1f=dojo.hostenv.normalizeLocale(_a1f);
var _a21=_a1f.split("-")[1];
var dow=_a20[_a21];
return (typeof dow=="undefined")?1:dow;
};
dojo.date.getWeekend=function(_a23){
var _a24={eg:5,il:5,sy:5,"in":0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4};
var _a25={ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6};
_a23=dojo.hostenv.normalizeLocale(_a23);
var _a26=_a23.split("-")[1];
var _a27=_a24[_a26];
var end=_a25[_a26];
if(typeof _a27=="undefined"){
_a27=6;
}
if(typeof end=="undefined"){
end=0;
}
return {start:_a27,end:end};
};
dojo.date.isWeekend=function(_a29,_a2a){
var _a2b=dojo.date.getWeekend(_a2a);
var day=(_a29||new Date()).getDay();
if(_a2b.end<_a2b.start){
_a2b.end+=7;
if(day<_a2b.start){
day+=7;
}
}
return day>=_a2b.start&&day<=_a2b.end;
};
dojo.provide("dojo.i18n.common");
dojo.i18n.getLocalization=function(_a2d,_a2e,_a2f){
dojo.hostenv.preloadLocalizations();
_a2f=dojo.hostenv.normalizeLocale(_a2f);
var _a30=_a2f.split("-");
var _a31=[_a2d,"nls",_a2e].join(".");
var _a32=dojo.hostenv.findModule(_a31,true);
var _a33;
for(var i=_a30.length;i>0;i--){
var loc=_a30.slice(0,i).join("_");
if(_a32[loc]){
_a33=_a32[loc];
break;
}
}
if(!_a33){
_a33=_a32.ROOT;
}
if(_a33){
var _a36=function(){
};
_a36.prototype=_a33;
return new _a36();
}
dojo.raise("Bundle not found: "+_a2e+" in "+_a2d+" , locale="+_a2f);
};
dojo.i18n.isLTR=function(_a37){
var lang=dojo.hostenv.normalizeLocale(_a37).split("-")[0];
var RTL={ar:true,fa:true,he:true,ur:true,yi:true};
return !RTL[lang];
};
dojo.provide("dojo.date.format");
(function(){
dojo.date.format=function(_a3a,_a3b){
if(typeof _a3b=="string"){
dojo.deprecated("dojo.date.format","To format dates with POSIX-style strings, please use dojo.date.strftime instead","0.5");
return dojo.date.strftime(_a3a,_a3b);
}
function formatPattern(_a3c,_a3d){
return _a3d.replace(/([a-z])\1*/ig,function(_a3e){
var s;
var c=_a3e.charAt(0);
var l=_a3e.length;
var pad;
var _a43=["abbr","wide","narrow"];
switch(c){
case "G":
if(l>3){
dojo.unimplemented("Era format not implemented");
}
s=info.eras[_a3c.getFullYear()<0?1:0];
break;
case "y":
s=_a3c.getFullYear();
switch(l){
case 1:
break;
case 2:
s=String(s).substr(-2);
break;
default:
pad=true;
}
break;
case "Q":
case "q":
s=Math.ceil((_a3c.getMonth()+1)/3);
switch(l){
case 1:
case 2:
pad=true;
break;
case 3:
case 4:
dojo.unimplemented("Quarter format not implemented");
}
break;
case "M":
case "L":
var m=_a3c.getMonth();
var _a46;
switch(l){
case 1:
case 2:
s=m+1;
pad=true;
break;
case 3:
case 4:
case 5:
_a46=_a43[l-3];
break;
}
if(_a46){
var type=(c=="L")?"standalone":"format";
var prop=["months",type,_a46].join("-");
s=info[prop][m];
}
break;
case "w":
var _a49=0;
s=dojo.date.getWeekOfYear(_a3c,_a49);
pad=true;
break;
case "d":
s=_a3c.getDate();
pad=true;
break;
case "D":
s=dojo.date.getDayOfYear(_a3c);
pad=true;
break;
case "E":
case "e":
case "c":
var d=_a3c.getDay();
var _a46;
switch(l){
case 1:
case 2:
if(c=="e"){
var _a4b=dojo.date.getFirstDayOfWeek(_a3b.locale);
d=(d-_a4b+7)%7;
}
if(c!="c"){
s=d+1;
pad=true;
break;
}
case 3:
case 4:
case 5:
_a46=_a43[l-3];
break;
}
if(_a46){
var type=(c=="c")?"standalone":"format";
var prop=["days",type,_a46].join("-");
s=info[prop][d];
}
break;
case "a":
var _a4c=(_a3c.getHours()<12)?"am":"pm";
s=info[_a4c];
break;
case "h":
case "H":
case "K":
case "k":
var h=_a3c.getHours();
switch(c){
case "h":
s=(h%12)||12;
break;
case "H":
s=h;
break;
case "K":
s=(h%12);
break;
case "k":
s=h||24;
break;
}
pad=true;
break;
case "m":
s=_a3c.getMinutes();
pad=true;
break;
case "s":
s=_a3c.getSeconds();
pad=true;
break;
case "S":
s=Math.round(_a3c.getMilliseconds()*Math.pow(10,l-3));
break;
case "v":
case "z":
s=dojo.date.getTimezoneName(_a3c);
if(s){
break;
}
l=4;
case "Z":
var _a4e=_a3c.getTimezoneOffset();
var tz=[(_a4e<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_a4e)/60),2),dojo.string.pad(Math.abs(_a4e)%60,2)];
if(l==4){
tz.splice(0,0,"GMT");
tz.splice(3,0,":");
}
s=tz.join("");
break;
case "Y":
case "u":
case "W":
case "F":
case "g":
case "A":
dojo.debug(_a3e+" modifier not yet implemented");
s="?";
break;
default:
dojo.raise("dojo.date.format: invalid pattern char: "+_a3d);
}
if(pad){
s=dojo.string.pad(s,l);
}
return s;
});
}
_a3b=_a3b||{};
var _a50=dojo.hostenv.normalizeLocale(_a3b.locale);
var _a51=_a3b.formatLength||"full";
var info=dojo.date._getGregorianBundle(_a50);
var str=[];
var _a53=dojo.lang.curry(this,formatPattern,_a3a);
if(_a3b.selector!="timeOnly"){
var _a54=_a3b.datePattern||info["dateFormat-"+_a51];
if(_a54){
str.push(_processPattern(_a54,_a53));
}
}
if(_a3b.selector!="dateOnly"){
var _a55=_a3b.timePattern||info["timeFormat-"+_a51];
if(_a55){
str.push(_processPattern(_a55,_a53));
}
}
var _a56=str.join(" ");
return _a56;
};
dojo.date.parse=function(_a57,_a58){
_a58=_a58||{};
var _a59=dojo.hostenv.normalizeLocale(_a58.locale);
var info=dojo.date._getGregorianBundle(_a59);
var _a5b=_a58.formatLength||"full";
if(!_a58.selector){
_a58.selector="dateOnly";
}
var _a5c=_a58.datePattern||info["dateFormat-"+_a5b];
var _a5d=_a58.timePattern||info["timeFormat-"+_a5b];
var _a5e;
if(_a58.selector=="dateOnly"){
_a5e=_a5c;
}else{
if(_a58.selector=="timeOnly"){
_a5e=_a5d;
}else{
if(_a58.selector=="dateTime"){
_a5e=_a5c+" "+_a5d;
}else{
var msg="dojo.date.parse: Unknown selector param passed: '"+_a58.selector+"'.";
msg+=" Defaulting to date pattern.";
dojo.debug(msg);
_a5e=_a5c;
}
}
}
var _a60=[];
var _a61=_processPattern(_a5e,dojo.lang.curry(this,_buildDateTimeRE,_a60,info,_a58));
var _a62=new RegExp("^"+_a61+"$");
var _a63=_a62.exec(_a57);
if(!_a63){
return null;
}
var _a64=["abbr","wide","narrow"];
var _a65=new Date(1972,0);
var _a66={};
for(var i=1;i<_a63.length;i++){
var grp=_a60[i-1];
var l=grp.length;
var v=_a63[i];
switch(grp.charAt(0)){
case "y":
if(l!=2){
_a65.setFullYear(v);
_a66.year=v;
}else{
if(v<100){
v=Number(v);
var year=""+new Date().getFullYear();
var _a6c=year.substring(0,2)*100;
var _a6d=Number(year.substring(2,4));
var _a6e=Math.min(_a6d+20,99);
var num=(v<_a6e)?_a6c+v:_a6c-100+v;
_a65.setFullYear(num);
_a66.year=num;
}else{
if(_a58.strict){
return null;
}
_a65.setFullYear(v);
_a66.year=v;
}
}
break;
case "M":
if(l>2){
if(!_a58.strict){
v=v.replace(/\./g,"");
v=v.toLowerCase();
}
var _a70=info["months-format-"+_a64[l-3]].concat();
for(var j=0;j<_a70.length;j++){
if(!_a58.strict){
_a70[j]=_a70[j].toLowerCase();
}
if(v==_a70[j]){
_a65.setMonth(j);
_a66.month=j;
break;
}
}
if(j==_a70.length){
dojo.debug("dojo.date.parse: Could not parse month name: '"+v+"'.");
return null;
}
}else{
_a65.setMonth(v-1);
_a66.month=v-1;
}
break;
case "E":
case "e":
if(!_a58.strict){
v=v.toLowerCase();
}
var days=info["days-format-"+_a64[l-3]].concat();
for(var j=0;j<days.length;j++){
if(!_a58.strict){
days[j]=days[j].toLowerCase();
}
if(v==days[j]){
break;
}
}
if(j==days.length){
dojo.debug("dojo.date.parse: Could not parse weekday name: '"+v+"'.");
return null;
}
break;
case "d":
_a65.setDate(v);
_a66.date=v;
break;
case "a":
var am=_a58.am||info.am;
var pm=_a58.pm||info.pm;
if(!_a58.strict){
v=v.replace(/\./g,"").toLowerCase();
am=am.replace(/\./g,"").toLowerCase();
pm=pm.replace(/\./g,"").toLowerCase();
}
if(_a58.strict&&v!=am&&v!=pm){
dojo.debug("dojo.date.parse: Could not parse am/pm part.");
return null;
}
var _a75=_a65.getHours();
if(v==pm&&_a75<12){
_a65.setHours(_a75+12);
}else{
if(v==am&&_a75==12){
_a65.setHours(0);
}
}
break;
case "K":
if(v==24){
v=0;
}
case "h":
case "H":
case "k":
if(v>23){
dojo.debug("dojo.date.parse: Illegal hours value");
return null;
}
_a65.setHours(v);
break;
case "m":
_a65.setMinutes(v);
break;
case "s":
_a65.setSeconds(v);
break;
case "S":
_a65.setMilliseconds(v);
break;
default:
dojo.unimplemented("dojo.date.parse: unsupported pattern char="+grp.charAt(0));
}
}
if(_a66.year&&_a65.getFullYear()!=_a66.year){
dojo.debug("Parsed year: '"+_a65.getFullYear()+"' did not match input year: '"+_a66.year+"'.");
return null;
}
if(_a66.month&&_a65.getMonth()!=_a66.month){
dojo.debug("Parsed month: '"+_a65.getMonth()+"' did not match input month: '"+_a66.month+"'.");
return null;
}
if(_a66.date&&_a65.getDate()!=_a66.date){
dojo.debug("Parsed day of month: '"+_a65.getDate()+"' did not match input day of month: '"+_a66.date+"'.");
return null;
}
return _a65;
};
function _processPattern(_a76,_a77,_a78,_a79){
var _a7a=function(x){
return x;
};
_a77=_a77||_a7a;
_a78=_a78||_a7a;
_a79=_a79||_a7a;
var _a7c=_a76.match(/(''|[^'])+/g);
var _a7d=false;
for(var i=0;i<_a7c.length;i++){
if(!_a7c[i]){
_a7c[i]="";
}else{
_a7c[i]=(_a7d?_a78:_a77)(_a7c[i]);
_a7d=!_a7d;
}
}
return _a79(_a7c.join(""));
}
function _buildDateTimeRE(_a7f,info,_a81,_a82){
return _a82.replace(/([a-z])\1*/ig,function(_a83){
var s;
var c=_a83.charAt(0);
var l=_a83.length;
switch(c){
case "y":
s="\\d"+((l==2)?"{2,4}":"+");
break;
case "M":
s=(l>2)?"\\S+":"\\d{1,2}";
break;
case "d":
s="\\d{1,2}";
break;
case "E":
s="\\S+";
break;
case "h":
case "H":
case "K":
case "k":
s="\\d{1,2}";
break;
case "m":
case "s":
s="[0-5]\\d";
break;
case "S":
s="\\d{1,3}";
break;
case "a":
var am=_a81.am||info.am||"AM";
var pm=_a81.pm||info.pm||"PM";
if(_a81.strict){
s=am+"|"+pm;
}else{
s=am;
s+=(am!=am.toLowerCase())?"|"+am.toLowerCase():"";
s+="|";
s+=(pm!=pm.toLowerCase())?pm+"|"+pm.toLowerCase():pm;
}
break;
default:
dojo.unimplemented("parse of date format, pattern="+_a82);
}
if(_a7f){
_a7f.push(_a83);
}
return "\\s*("+s+")\\s*";
});
}
})();
dojo.date.strftime=function(_a89,_a8a,_a8b){
var _a8c=null;
function _(s,n){
return dojo.string.pad(s,n||2,_a8c||"0");
}
var info=dojo.date._getGregorianBundle(_a8b);
function $(_a90){
switch(_a90){
case "a":
return dojo.date.getDayShortName(_a89,_a8b);
case "A":
return dojo.date.getDayName(_a89,_a8b);
case "b":
case "h":
return dojo.date.getMonthShortName(_a89,_a8b);
case "B":
return dojo.date.getMonthName(_a89,_a8b);
case "c":
return dojo.date.format(_a89,{locale:_a8b});
case "C":
return _(Math.floor(_a89.getFullYear()/100));
case "d":
return _(_a89.getDate());
case "D":
return $("m")+"/"+$("d")+"/"+$("y");
case "e":
if(_a8c==null){
_a8c=" ";
}
return _(_a89.getDate());
case "f":
if(_a8c==null){
_a8c=" ";
}
return _(_a89.getMonth()+1);
case "g":
break;
case "G":
dojo.unimplemented("unimplemented modifier 'G'");
break;
case "F":
return $("Y")+"-"+$("m")+"-"+$("d");
case "H":
return _(_a89.getHours());
case "I":
return _(_a89.getHours()%12||12);
case "j":
return _(dojo.date.getDayOfYear(_a89),3);
case "k":
if(_a8c==null){
_a8c=" ";
}
return _(_a89.getHours());
case "l":
if(_a8c==null){
_a8c=" ";
}
return _(_a89.getHours()%12||12);
case "m":
return _(_a89.getMonth()+1);
case "M":
return _(_a89.getMinutes());
case "n":
return "\n";
case "p":
return info[_a89.getHours()<12?"am":"pm"];
case "r":
return $("I")+":"+$("M")+":"+$("S")+" "+$("p");
case "R":
return $("H")+":"+$("M");
case "S":
return _(_a89.getSeconds());
case "t":
return "\t";
case "T":
return $("H")+":"+$("M")+":"+$("S");
case "u":
return String(_a89.getDay()||7);
case "U":
return _(dojo.date.getWeekOfYear(_a89));
case "V":
return _(dojo.date.getIsoWeekOfYear(_a89));
case "W":
return _(dojo.date.getWeekOfYear(_a89,1));
case "w":
return String(_a89.getDay());
case "x":
return dojo.date.format(_a89,{selector:"dateOnly",locale:_a8b});
case "X":
return dojo.date.format(_a89,{selector:"timeOnly",locale:_a8b});
case "y":
return _(_a89.getFullYear()%100);
case "Y":
return String(_a89.getFullYear());
case "z":
var _a91=_a89.getTimezoneOffset();
return (_a91>0?"-":"+")+_(Math.floor(Math.abs(_a91)/60))+":"+_(Math.abs(_a91)%60);
case "Z":
return dojo.date.getTimezoneName(_a89);
case "%":
return "%";
}
}
var _a92="";
var i=0;
var _a94=0;
var _a95=null;
while((_a94=_a8a.indexOf("%",i))!=-1){
_a92+=_a8a.substring(i,_a94++);
switch(_a8a.charAt(_a94++)){
case "_":
_a8c=" ";
break;
case "-":
_a8c="";
break;
case "0":
_a8c="0";
break;
case "^":
_a95="upper";
break;
case "*":
_a95="lower";
break;
case "#":
_a95="swap";
break;
default:
_a8c=null;
_a94--;
break;
}
var _a96=$(_a8a.charAt(_a94++));
switch(_a95){
case "upper":
_a96=_a96.toUpperCase();
break;
case "lower":
_a96=_a96.toLowerCase();
break;
case "swap":
var _a97=_a96.toLowerCase();
var _a98="";
var j=0;
var ch="";
while(j<_a96.length){
ch=_a96.charAt(j);
_a98+=(ch==_a97.charAt(j))?ch.toUpperCase():ch.toLowerCase();
j++;
}
_a96=_a98;
break;
default:
break;
}
_a95=null;
_a92+=_a96;
i=_a94;
}
_a92+=_a8a.substring(i);
return _a92;
};
(function(){
var _a9b=[];
dojo.date.addCustomFormats=function(_a9c,_a9d){
_a9b.push({pkg:_a9c,name:_a9d});
};
dojo.date._getGregorianBundle=function(_a9e){
var _a9f={};
dojo.lang.forEach(_a9b,function(desc){
var _aa1=dojo.i18n.getLocalization(desc.pkg,desc.name,_a9e);
_a9f=dojo.lang.mixin(_a9f,_aa1);
},this);
return _a9f;
};
})();
dojo.date.addCustomFormats("dojo.i18n.calendar","gregorian");
dojo.date.addCustomFormats("dojo.i18n.calendar","gregorianExtras");
dojo.date.getNames=function(item,type,use,_aa5){
var _aa6;
var _aa7=dojo.date._getGregorianBundle(_aa5);
var _aa8=[item,use,type];
if(use=="standAlone"){
_aa6=_aa7[_aa8.join("-")];
}
_aa8[1]="format";
return (_aa6||_aa7[_aa8.join("-")]).concat();
};
dojo.date.getDayName=function(_aa9,_aaa){
return dojo.date.getNames("days","wide","format",_aaa)[_aa9.getDay()];
};
dojo.date.getDayShortName=function(_aab,_aac){
return dojo.date.getNames("days","abbr","format",_aac)[_aab.getDay()];
};
dojo.date.getMonthName=function(_aad,_aae){
return dojo.date.getNames("months","wide","format",_aae)[_aad.getMonth()];
};
dojo.date.getMonthShortName=function(_aaf,_ab0){
return dojo.date.getNames("months","abbr","format",_ab0)[_aaf.getMonth()];
};
dojo.date.toRelativeString=function(_ab1){
var now=new Date();
var diff=(now-_ab1)/1000;
var end=" ago";
var _ab5=false;
if(diff<0){
_ab5=true;
end=" from now";
diff=-diff;
}
if(diff<60){
diff=Math.round(diff);
return diff+" second"+(diff==1?"":"s")+end;
}
if(diff<60*60){
diff=Math.round(diff/60);
return diff+" minute"+(diff==1?"":"s")+end;
}
if(diff<60*60*24){
diff=Math.round(diff/3600);
return diff+" hour"+(diff==1?"":"s")+end;
}
if(diff<60*60*24*7){
diff=Math.round(diff/(3600*24));
if(diff==1){
return _ab5?"Tomorrow":"Yesterday";
}else{
return diff+" days"+end;
}
}
return dojo.date.format(_ab1);
};
dojo.date.toSql=function(_ab6,_ab7){
return dojo.date.strftime(_ab6,"%F"+!_ab7?" %T":"");
};
dojo.date.fromSql=function(_ab8){
var _ab9=_ab8.split(/[\- :]/g);
while(_ab9.length<6){
_ab9.push(0);
}
return new Date(_ab9[0],(parseInt(_ab9[1],10)-1),_ab9[2],_ab9[3],_ab9[4],_ab9[5]);
};
dojo.provide("dojo.date.serialize");
dojo.date.setIso8601=function(_aba,_abb){
var _abc=(_abb.indexOf("T")==-1)?_abb.split(" "):_abb.split("T");
_aba=dojo.date.setIso8601Date(_aba,_abc[0]);
if(_abc.length==2){
_aba=dojo.date.setIso8601Time(_aba,_abc[1]);
}
return _aba;
};
dojo.date.fromIso8601=function(_abd){
return dojo.date.setIso8601(new Date(0,0),_abd);
};
dojo.date.setIso8601Date=function(_abe,_abf){
var _ac0="^([0-9]{4})((-?([0-9]{2})(-?([0-9]{2}))?)|"+"(-?([0-9]{3}))|(-?W([0-9]{2})(-?([1-7]))?))?$";
var d=_abf.match(new RegExp(_ac0));
if(!d){
dojo.debug("invalid date string: "+_abf);
return null;
}
var year=d[1];
var _ac3=d[4];
var date=d[6];
var _ac5=d[8];
var week=d[10];
var _ac7=d[12]?d[12]:1;
_abe.setFullYear(year);
if(_ac5){
_abe.setMonth(0);
_abe.setDate(Number(_ac5));
}else{
if(week){
_abe.setMonth(0);
_abe.setDate(1);
var gd=_abe.getDay();
var day=gd?gd:7;
var _aca=Number(_ac7)+(7*Number(week));
if(day<=4){
_abe.setDate(_aca+1-day);
}else{
_abe.setDate(_aca+8-day);
}
}else{
if(_ac3){
_abe.setDate(1);
_abe.setMonth(_ac3-1);
}
if(date){
_abe.setDate(date);
}
}
}
return _abe;
};
dojo.date.fromIso8601Date=function(_acb){
return dojo.date.setIso8601Date(new Date(0,0),_acb);
};
dojo.date.setIso8601Time=function(_acc,_acd){
var _ace="Z|(([-+])([0-9]{2})(:?([0-9]{2}))?)$";
var d=_acd.match(new RegExp(_ace));
var _ad0=0;
if(d){
if(d[0]!="Z"){
_ad0=(Number(d[3])*60)+Number(d[5]);
_ad0*=((d[2]=="-")?1:-1);
}
_ad0-=_acc.getTimezoneOffset();
_acd=_acd.substr(0,_acd.length-d[0].length);
}
var _ad1="^([0-9]{2})(:?([0-9]{2})(:?([0-9]{2})(.([0-9]+))?)?)?$";
d=_acd.match(new RegExp(_ad1));
if(!d){
dojo.debug("invalid time string: "+_acd);
return null;
}
var _ad2=d[1];
var mins=Number((d[3])?d[3]:0);
var secs=(d[5])?d[5]:0;
var ms=d[7]?(Number("0."+d[7])*1000):0;
_acc.setHours(_ad2);
_acc.setMinutes(mins);
_acc.setSeconds(secs);
_acc.setMilliseconds(ms);
if(_ad0!==0){
_acc.setTime(_acc.getTime()+_ad0*60000);
}
return _acc;
};
dojo.date.fromIso8601Time=function(_ad6){
return dojo.date.setIso8601Time(new Date(0,0),_ad6);
};
dojo.date.toRfc3339=function(_ad7,_ad8){
if(!_ad7){
_ad7=new Date();
}
var _=dojo.string.pad;
var _ada=[];
if(_ad8!="timeOnly"){
var date=[_(_ad7.getFullYear(),4),_(_ad7.getMonth()+1,2),_(_ad7.getDate(),2)].join("-");
_ada.push(date);
}
if(_ad8!="dateOnly"){
var time=[_(_ad7.getHours(),2),_(_ad7.getMinutes(),2),_(_ad7.getSeconds(),2)].join(":");
var _add=_ad7.getTimezoneOffset();
time+=(_add>0?"-":"+")+_(Math.floor(Math.abs(_add)/60),2)+":"+_(Math.abs(_add)%60,2);
_ada.push(time);
}
return _ada.join("T");
};
dojo.date.fromRfc3339=function(_ade){
if(_ade.indexOf("Tany")!=-1){
_ade=_ade.replace("Tany","");
}
var _adf=new Date();
return dojo.date.setIso8601(_adf,_ade);
};
dojo.provide("dojo.widget.DatePicker");
dojo.widget.defineWidget("dojo.widget.DatePicker",dojo.widget.HtmlWidget,{value:"",name:"",displayWeeks:6,adjustWeeks:false,startDate:"1492-10-12",endDate:"2941-10-12",weekStartsOn:"",storedDate:"",staticDisplay:false,dayWidth:"narrow",classNames:{previous:"previousMonth",disabledPrevious:"previousMonthDisabled",current:"currentMonth",disabledCurrent:"currentMonthDisabled",next:"nextMonth",disabledNext:"nextMonthDisabled",currentDate:"currentDate",selectedDate:"selectedItem"},templateString:"<div class=\"datePickerContainer\" dojoAttachPoint=\"datePickerContainerNode\">\n	<table cellspacing=\"0\" cellpadding=\"0\" class=\"calendarContainer\">\n		<thead>\n			<tr>\n				<td class=\"monthWrapper\" valign=\"top\">\n					<table class=\"monthContainer\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n						<tr>\n							<td class=\"monthCurve monthCurveTL\" valign=\"top\"></td>\n							<td class=\"monthLabelContainer\" valign=\"top\">\n								<span dojoAttachPoint=\"increaseWeekNode\" \n									dojoAttachEvent=\"onClick: onIncrementWeek;\" \n									class=\"incrementControl increase\">\n									<img src=\"${dojoRoot}src/widget/templates/images/incrementMonth.png\" \n									alt=\"&darr;\" style=\"width:7px;height:5px;\" />\n								</span>\n								<span \n									dojoAttachPoint=\"increaseMonthNode\" \n									dojoAttachEvent=\"onClick: onIncrementMonth;\" class=\"incrementControl increase\">\n									<img src=\"${dojoRoot}src/widget/templates/images/incrementMonth.png\" \n										alt=\"&darr;\"  dojoAttachPoint=\"incrementMonthImageNode\">\n								</span>\n								<span \n									dojoAttachPoint=\"decreaseWeekNode\" \n									dojoAttachEvent=\"onClick: onIncrementWeek;\" \n									class=\"incrementControl decrease\">\n									<img src=\"${dojoRoot}src/widget/templates/images/decrementMonth.png\" alt=\"&uarr;\" style=\"width:7px;height:5px;\" />\n								</span>\n								<span \n									dojoAttachPoint=\"decreaseMonthNode\" \n									dojoAttachEvent=\"onClick: onIncrementMonth;\" class=\"incrementControl decrease\">\n									<img src=\"${dojoRoot}src/widget/templates/images/decrementMonth.png\" \n										alt=\"&uarr;\" dojoAttachPoint=\"decrementMonthImageNode\">\n								</span>\n								<span dojoAttachPoint=\"monthLabelNode\" class=\"month\"></span>\n							</td>\n							<td class=\"monthCurve monthCurveTR\" valign=\"top\"></td>\n						</tr>\n					</table>\n				</td>\n			</tr>\n		</thead>\n		<tbody>\n			<tr>\n				<td colspan=\"3\">\n					<table class=\"calendarBodyContainer\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n						<thead>\n							<tr dojoAttachPoint=\"dayLabelsRow\">\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n							</tr>\n						</thead>\n						<tbody dojoAttachPoint=\"calendarDatesContainerNode\" \n							dojoAttachEvent=\"onClick: _handleUiClick;\">\n							<tr dojoAttachPoint=\"calendarWeekTemplate\">\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n							</tr>\n						</tbody>\n					</table>\n				</td>\n			</tr>\n		</tbody>\n		<tfoot>\n			<tr>\n				<td colspan=\"3\" class=\"yearWrapper\">\n					<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"yearContainer\">\n						<tr>\n							<td class=\"curveBL\" valign=\"top\"></td>\n							<td valign=\"top\">\n								<h3 class=\"yearLabel\">\n									<span dojoAttachPoint=\"previousYearLabelNode\"\n										dojoAttachEvent=\"onClick: onIncrementYear;\" class=\"previousYear\"></span>\n									<span class=\"selectedYear\" dojoAttachPoint=\"currentYearLabelNode\"></span>\n									<span dojoAttachPoint=\"nextYearLabelNode\" \n										dojoAttachEvent=\"onClick: onIncrementYear;\" class=\"nextYear\"></span>\n								</h3>\n							</td>\n							<td class=\"curveBR\" valign=\"top\"></td>\n						</tr>\n					</table>\n				</td>\n			</tr>\n		</tfoot>\n	</table>\n	\n</div>\n",postMixInProperties:function(){
dojo.widget.DatePicker.superclass.postMixInProperties.apply(this,arguments);
if(this.storedDate){
dojo.deprecated("dojo.widget.DatePicker","use 'value' instead of 'storedDate'","0.5");
this.value=this.storedDate;
}
this.startDate=dojo.date.fromRfc3339(this.startDate);
this.endDate=dojo.date.fromRfc3339(this.endDate);
this.startDate.setHours(0,0,0,0);
this.endDate.setHours(24,0,0,-1);
if(!this.weekStartsOn){
this.weekStartsOn=dojo.date.getFirstDayOfWeek(this.lang);
}
this.today=new Date();
this.today.setHours(0,0,0,0);
if(typeof (this.value)=="string"&&this.value.toLowerCase()=="today"){
this.value=new Date();
}else{
if(this.value&&(typeof this.value=="string")&&(this.value.split("-").length>2)){
this.value=dojo.date.fromRfc3339(this.value);
this.value.setHours(0,0,0,0);
}
}
},fillInTemplate:function(args,frag){
dojo.widget.DatePicker.superclass.fillInTemplate.apply(this,arguments);
var _ae2=this.getFragNodeRef(frag);
dojo.html.copyStyle(this.domNode,_ae2);
this.weekTemplate=dojo.dom.removeNode(this.calendarWeekTemplate);
this._preInitUI(this.value?this.value:this.today,false,true);
var _ae3=dojo.lang.unnest(dojo.date.getNames("days",this.dayWidth,"standAlone",this.lang));
if(this.weekStartsOn>0){
for(var i=0;i<this.weekStartsOn;i++){
_ae3.push(_ae3.shift());
}
}
var _ae5=this.dayLabelsRow.getElementsByTagName("td");
for(i=0;i<7;i++){
_ae5.item(i).innerHTML=_ae3[i];
}
if(this.value){
this.setValue(this.value);
}
},getValue:function(){
return dojo.date.toRfc3339(new Date(this.value),"dateOnly");
},getDate:function(){
return this.value;
},setValue:function(_ae6){
this.setDate(_ae6);
},setDate:function(_ae7){
if(typeof _ae7=="string"){
this.value=dojo.date.fromRfc3339(_ae7);
}else{
this.value=new Date(_ae7);
}
this.value.setHours(0,0,0,0);
if(this.selectedNode!=null){
dojo.html.removeClass(this.selectedNode,this.classNames.selectedDate);
}
if(this.clickedNode!=null){
dojo.html.addClass(this.clickedNode,this.classNames.selectedDate);
this.selectedNode=this.clickedNode;
}else{
this._preInitUI(this.value,false,true);
}
this.clickedNode=null;
this.onValueChanged(this.value);
},_preInitUI:function(_ae8,_ae9,_aea){
if(_ae8<this.startDate||_ae8>this.endDate){
_ae8=new Date((_ae8<this.startDate)?this.startDate:this.endDate);
}
this.firstDay=this._initFirstDay(_ae8,_ae9);
this.selectedIsUsed=false;
this.currentIsUsed=false;
var _aeb=new Date(this.firstDay);
var _aec=_aeb.getMonth();
this.curMonth=new Date(_aeb);
this.curMonth.setDate(_aeb.getDate()+6);
this.curMonth.setDate(1);
if(this.displayWeeks==""||this.adjustWeeks){
this.adjustWeeks=true;
this.displayWeeks=Math.ceil((dojo.date.getDaysInMonth(this.curMonth)+this._getAdjustedDay(this.curMonth))/7);
}
var days=this.displayWeeks*7;
if(dojo.date.diff(this.startDate,this.endDate,dojo.date.dateParts.DAY)<days){
this.staticDisplay=true;
if(dojo.date.diff(_aeb,this.endDate,dojo.date.dateParts.DAY)>days){
this._preInitUI(this.startDate,true,false);
_aeb=new Date(this.firstDay);
}
this.curMonth=new Date(_aeb);
this.curMonth.setDate(_aeb.getDate()+6);
this.curMonth.setDate(1);
var _aee=(_aeb.getMonth()==this.curMonth.getMonth())?"current":"previous";
}
if(_aea){
this._initUI(days);
}
},_initUI:function(days){
dojo.dom.removeChildren(this.calendarDatesContainerNode);
for(var i=0;i<this.displayWeeks;i++){
this.calendarDatesContainerNode.appendChild(this.weekTemplate.cloneNode(true));
}
var _af1=new Date(this.firstDay);
this._setMonthLabel(this.curMonth.getMonth());
this._setYearLabels(this.curMonth.getFullYear());
var _af2=this.calendarDatesContainerNode.getElementsByTagName("td");
var _af3=this.calendarDatesContainerNode.getElementsByTagName("tr");
var _af4;
for(i=0;i<days;i++){
_af4=_af2.item(i);
_af4.innerHTML=_af1.getDate();
var _af5=(_af1.getMonth()<this.curMonth.getMonth())?"previous":(_af1.getMonth()==this.curMonth.getMonth())?"current":"next";
var _af6=_af5;
if(this._isDisabledDate(_af1)){
var _af7={previous:"disabledPrevious",current:"disabledCurrent",next:"disabledNext"};
_af6=_af7[_af5];
}
dojo.html.setClass(_af4,this._getDateClassName(_af1,_af6));
if(dojo.html.hasClass(_af4,this.classNames.selectedDate)){
this.selectedNode=_af4;
}
_af1=dojo.date.add(_af1,dojo.date.dateParts.DAY,1);
}
this.lastDay=dojo.date.add(_af1,dojo.date.dateParts.DAY,-1);
this._initControls();
},_initControls:function(){
var d=this.firstDay;
var d2=this.lastDay;
var _afa,_afb,_afc,_afd,_afe,_aff;
_afa=_afb=_afc=_afd=_afe=_aff=!this.staticDisplay;
with(dojo.date.dateParts){
var add=dojo.date.add;
if(_afa&&add(d,DAY,(-1*(this._getAdjustedDay(d)+1)))<this.startDate){
_afa=_afc=_afe=false;
}
if(_afb&&d2>this.endDate){
_afb=_afd=_aff=false;
}
if(_afc&&add(d,DAY,-1)<this.startDate){
_afc=_afe=false;
}
if(_afd&&add(d2,DAY,1)>this.endDate){
_afd=_aff=false;
}
if(_afe&&add(d2,YEAR,-1)<this.startDate){
_afe=false;
}
if(_aff&&add(d,YEAR,1)>this.endDate){
_aff=false;
}
}
function enableControl(node,_b02){
dojo.html.setVisibility(node,_b02?"":"hidden");
}
enableControl(this.decreaseWeekNode,_afa);
enableControl(this.increaseWeekNode,_afb);
enableControl(this.decreaseMonthNode,_afc);
enableControl(this.increaseMonthNode,_afd);
enableControl(this.previousYearLabelNode,_afe);
enableControl(this.nextYearLabelNode,_aff);
},_incrementWeek:function(evt){
var d=new Date(this.firstDay);
switch(evt.target){
case this.increaseWeekNode.getElementsByTagName("img").item(0):
case this.increaseWeekNode:
var _b05=dojo.date.add(d,dojo.date.dateParts.WEEK,1);
if(_b05<this.endDate){
d=dojo.date.add(d,dojo.date.dateParts.WEEK,1);
}
break;
case this.decreaseWeekNode.getElementsByTagName("img").item(0):
case this.decreaseWeekNode:
if(d>=this.startDate){
d=dojo.date.add(d,dojo.date.dateParts.WEEK,-1);
}
break;
}
this._preInitUI(d,true,true);
},_incrementMonth:function(evt){
var d=new Date(this.curMonth);
var _b08=new Date(this.firstDay);
switch(evt.currentTarget){
case this.increaseMonthNode.getElementsByTagName("img").item(0):
case this.increaseMonthNode:
_b08=dojo.date.add(_b08,dojo.date.dateParts.DAY,this.displayWeeks*7);
if(_b08<this.endDate){
d=dojo.date.add(d,dojo.date.dateParts.MONTH,1);
}else{
var _b09=true;
}
break;
case this.decreaseMonthNode.getElementsByTagName("img").item(0):
case this.decreaseMonthNode:
if(_b08>this.startDate){
d=dojo.date.add(d,dojo.date.dateParts.MONTH,-1);
}else{
var _b0a=true;
}
break;
}
if(_b0a){
d=new Date(this.startDate);
}else{
if(_b09){
d=new Date(this.endDate);
}
}
this._preInitUI(d,false,true);
},_incrementYear:function(evt){
var year=this.curMonth.getFullYear();
var _b0d=new Date(this.firstDay);
switch(evt.target){
case this.nextYearLabelNode:
_b0d=dojo.date.add(_b0d,dojo.date.dateParts.YEAR,1);
if(_b0d<this.endDate){
year++;
}else{
var _b0e=true;
}
break;
case this.previousYearLabelNode:
_b0d=dojo.date.add(_b0d,dojo.date.dateParts.YEAR,-1);
if(_b0d>this.startDate){
year--;
}else{
var _b0f=true;
}
break;
}
var d;
if(_b0f){
d=new Date(this.startDate);
}else{
if(_b0e){
d=new Date(this.endDate);
}else{
d=new Date(year,this.curMonth.getMonth(),1);
}
}
this._preInitUI(d,false,true);
},onIncrementWeek:function(evt){
evt.stopPropagation();
if(!this.staticDisplay){
this._incrementWeek(evt);
}
},onIncrementMonth:function(evt){
evt.stopPropagation();
if(!this.staticDisplay){
this._incrementMonth(evt);
}
},onIncrementYear:function(evt){
evt.stopPropagation();
if(!this.staticDisplay){
this._incrementYear(evt);
}
},_setMonthLabel:function(_b14){
this.monthLabelNode.innerHTML=dojo.date.getNames("months","wide","standAlone",this.lang)[_b14];
},_setYearLabels:function(year){
var y=year-1;
var that=this;
function f(n){
that[n+"YearLabelNode"].innerHTML=dojo.date.format(new Date(y++,0),{formatLength:"yearOnly",locale:that.lang});
}
f("previous");
f("current");
f("next");
},_getDateClassName:function(date,_b1a){
var _b1b=this.classNames[_b1a];
if((!this.selectedIsUsed&&this.value)&&(Number(date)==Number(this.value))){
_b1b=this.classNames.selectedDate+" "+_b1b;
this.selectedIsUsed=true;
}
if((!this.currentIsUsed)&&(Number(date)==Number(this.today))){
_b1b=_b1b+" "+this.classNames.currentDate;
this.currentIsUsed=true;
}
return _b1b;
},onClick:function(evt){
dojo.event.browser.stopEvent(evt);
},_handleUiClick:function(evt){
var _b1e=evt.target;
if(_b1e.nodeType!=dojo.dom.ELEMENT_NODE){
_b1e=_b1e.parentNode;
}
dojo.event.browser.stopEvent(evt);
this.selectedIsUsed=this.todayIsUsed=false;
var _b1f=this.curMonth.getMonth();
var year=this.curMonth.getFullYear();
if(dojo.html.hasClass(_b1e,this.classNames["disabledPrevious"])||dojo.html.hasClass(_b1e,this.classNames["disabledCurrent"])||dojo.html.hasClass(_b1e,this.classNames["disabledNext"])){
return;
}else{
if(dojo.html.hasClass(_b1e,this.classNames["next"])){
_b1f=++_b1f%12;
if(_b1f===0){
++year;
}
}else{
if(dojo.html.hasClass(_b1e,this.classNames["previous"])){
_b1f=--_b1f%12;
if(_b1f==11){
--year;
}
}
}
}
this.clickedNode=_b1e;
this.setDate(new Date(year,_b1f,_b1e.innerHTML));
},onValueChanged:function(date){
},_isDisabledDate:function(_b22){
if(_b22<this.startDate||_b22>this.endDate){
return true;
}
return this.isDisabledDate(_b22,this.lang);
},isDisabledDate:function(_b23,_b24){
return false;
},_initFirstDay:function(_b25,adj){
var d=new Date(_b25);
if(!adj){
d.setDate(1);
}
d.setDate(d.getDate()-this._getAdjustedDay(d,this.weekStartsOn));
d.setHours(0,0,0,0);
return d;
},_getAdjustedDay:function(_b28){
var days=[0,1,2,3,4,5,6];
if(this.weekStartsOn>0){
for(var i=0;i<this.weekStartsOn;i++){
days.unshift(days.pop());
}
}
return days[_b28.getDay()];
},destroy:function(){
dojo.widget.DatePicker.superclass.destroy.apply(this,arguments);
dojo.html.destroyNode(this.weekTemplate);
}});
dojo.provide("dojo.widget.PopupContainer");
dojo.declare("dojo.widget.PopupContainerBase",null,function(){
this.queueOnAnimationFinish=[];
},{isContainer:true,templateString:"<div dojoAttachPoint=\"containerNode\" style=\"display:none;position:absolute;\" class=\"dojoPopupContainer\" ></div>",isShowingNow:false,currentSubpopup:null,beginZIndex:1000,parentPopup:null,parent:null,popupIndex:0,aroundBox:dojo.html.boxSizing.BORDER_BOX,openedForWindow:null,processKey:function(evt){
return false;
},applyPopupBasicStyle:function(){
with(this.domNode.style){
display="none";
position="absolute";
}
},aboutToShow:function(){
},open:function(x,y,_b2e,_b2f,_b30,_b31){
if(this.isShowingNow){
return;
}
if(this.animationInProgress){
this.queueOnAnimationFinish.push(this.open,arguments);
return;
}
this.aboutToShow();
var _b32=false,node,_b34;
if(typeof x=="object"){
node=x;
_b34=_b2f;
_b2f=_b2e;
_b2e=y;
_b32=true;
}
this.parent=_b2e;
dojo.body().appendChild(this.domNode);
_b2f=_b2f||_b2e["domNode"]||[];
var _b35=null;
this.isTopLevel=true;
while(_b2e){
if(_b2e!==this&&(_b2e.setOpenedSubpopup!=undefined&&_b2e.applyPopupBasicStyle!=undefined)){
_b35=_b2e;
this.isTopLevel=false;
_b35.setOpenedSubpopup(this);
break;
}
_b2e=_b2e.parent;
}
this.parentPopup=_b35;
this.popupIndex=_b35?_b35.popupIndex+1:1;
if(this.isTopLevel){
var _b36=dojo.html.isNode(_b2f)?_b2f:null;
dojo.widget.PopupManager.opened(this,_b36);
}
if(this.isTopLevel&&!dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){
this._bookmark=dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.getBookmark);
}else{
this._bookmark=null;
}
if(_b2f instanceof Array){
_b2f={left:_b2f[0],top:_b2f[1],width:0,height:0};
}
with(this.domNode.style){
display="";
zIndex=this.beginZIndex+this.popupIndex;
}
if(_b32){
this.move(node,_b31,_b34);
}else{
this.move(x,y,_b31,_b30);
}
this.domNode.style.display="none";
this.explodeSrc=_b2f;
this.show();
this.isShowingNow=true;
},move:function(x,y,_b39,_b3a){
var _b3b=(typeof x=="object");
if(_b3b){
var _b3c=_b39;
var node=x;
_b39=y;
if(!_b3c){
_b3c={"BL":"TL","TL":"BL"};
}
dojo.html.placeOnScreenAroundElement(this.domNode,node,_b39,this.aroundBox,_b3c);
}else{
if(!_b3a){
_b3a="TL,TR,BL,BR";
}
dojo.html.placeOnScreen(this.domNode,x,y,_b39,true,_b3a);
}
},close:function(_b3e){
if(_b3e){
this.domNode.style.display="none";
}
if(this.animationInProgress){
this.queueOnAnimationFinish.push(this.close,[]);
return;
}
this.closeSubpopup(_b3e);
this.hide();
if(this.bgIframe){
this.bgIframe.hide();
this.bgIframe.size({left:0,top:0,width:0,height:0});
}
if(this.isTopLevel){
dojo.widget.PopupManager.closed(this);
}
this.isShowingNow=false;
if(this.parent){
setTimeout(dojo.lang.hitch(this,function(){
try{
if(this.parent["focus"]){
this.parent.focus();
}else{
this.parent.domNode.focus();
}
}
catch(e){
dojo.debug("No idea how to focus to parent",e);
}
}),10);
}
if(this._bookmark&&dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){
if(this.openedForWindow){
this.openedForWindow.focus();
}
try{
dojo.withGlobal(this.openedForWindow||dojo.global(),"moveToBookmark",dojo.html.selection,[this._bookmark]);
}
catch(e){
}
}
this._bookmark=null;
},closeAll:function(_b3f){
if(this.parentPopup){
this.parentPopup.closeAll(_b3f);
}else{
this.close(_b3f);
}
},setOpenedSubpopup:function(_b40){
this.currentSubpopup=_b40;
},closeSubpopup:function(_b41){
if(this.currentSubpopup==null){
return;
}
this.currentSubpopup.close(_b41);
this.currentSubpopup=null;
},onShow:function(){
dojo.widget.PopupContainer.superclass.onShow.apply(this,arguments);
this.openedSize={w:this.domNode.style.width,h:this.domNode.style.height};
if(dojo.render.html.ie){
if(!this.bgIframe){
this.bgIframe=new dojo.html.BackgroundIframe();
this.bgIframe.setZIndex(this.domNode);
}
this.bgIframe.size(this.domNode);
this.bgIframe.show();
}
this.processQueue();
},processQueue:function(){
if(!this.queueOnAnimationFinish.length){
return;
}
var func=this.queueOnAnimationFinish.shift();
var args=this.queueOnAnimationFinish.shift();
func.apply(this,args);
},onHide:function(){
dojo.widget.HtmlWidget.prototype.onHide.call(this);
if(this.openedSize){
with(this.domNode.style){
width=this.openedSize.w;
height=this.openedSize.h;
}
}
this.processQueue();
}});
dojo.widget.defineWidget("dojo.widget.PopupContainer",[dojo.widget.HtmlWidget,dojo.widget.PopupContainerBase],{});
dojo.widget.PopupManager=new function(){
this.currentMenu=null;
this.currentButton=null;
this.currentFocusMenu=null;
this.focusNode=null;
this.registeredWindows=[];
this.registerWin=function(win){
if(!win.__PopupManagerRegistered){
dojo.event.connect(win.document,"onmousedown",this,"onClick");
dojo.event.connect(win,"onscroll",this,"onClick");
dojo.event.connect(win.document,"onkey",this,"onKey");
win.__PopupManagerRegistered=true;
this.registeredWindows.push(win);
}
};
this.registerAllWindows=function(_b45){
if(!_b45){
_b45=dojo.html.getDocumentWindow(window.top&&window.top.document||window.document);
}
this.registerWin(_b45);
for(var i=0;i<_b45.frames.length;i++){
try{
var win=dojo.html.getDocumentWindow(_b45.frames[i].document);
if(win){
this.registerAllWindows(win);
}
}
catch(e){
}
}
};
this.unRegisterWin=function(win){
if(win.__PopupManagerRegistered){
dojo.event.disconnect(win.document,"onmousedown",this,"onClick");
dojo.event.disconnect(win,"onscroll",this,"onClick");
dojo.event.disconnect(win.document,"onkey",this,"onKey");
win.__PopupManagerRegistered=false;
}
};
this.unRegisterAllWindows=function(){
for(var i=0;i<this.registeredWindows.length;++i){
this.unRegisterWin(this.registeredWindows[i]);
}
this.registeredWindows=[];
};
dojo.addOnLoad(this,"registerAllWindows");
dojo.addOnUnload(this,"unRegisterAllWindows");
this.closed=function(menu){
if(this.currentMenu==menu){
this.currentMenu=null;
this.currentButton=null;
this.currentFocusMenu=null;
}
};
this.opened=function(menu,_b4c){
if(menu==this.currentMenu){
return;
}
if(this.currentMenu){
this.currentMenu.close();
}
this.currentMenu=menu;
this.currentFocusMenu=menu;
this.currentButton=_b4c;
};
this.setFocusedMenu=function(menu){
this.currentFocusMenu=menu;
};
this.onKey=function(e){
if(!e.key){
return;
}
if(!this.currentMenu||!this.currentMenu.isShowingNow){
return;
}
var m=this.currentFocusMenu;
while(m){
if(m.processKey(e)){
e.preventDefault();
e.stopPropagation();
break;
}
m=m.parentPopup;
}
},this.onClick=function(e){
if(!this.currentMenu){
return;
}
var _b51=dojo.html.getScroll().offset;
var m=this.currentMenu;
while(m){
if(dojo.html.overElement(m.domNode,e)||dojo.html.isDescendantOf(e.target,m.domNode)){
return;
}
m=m.currentSubpopup;
}
if(this.currentButton&&dojo.html.overElement(this.currentButton,e)){
return;
}
this.currentMenu.close();
};
};
dojo.provide("dojo.widget.DropdownContainer");
dojo.widget.defineWidget("dojo.widget.DropdownContainer",dojo.widget.HtmlWidget,{inputWidth:"7em",id:"",inputId:"",inputName:"",iconURL:dojo.uri.dojoUri("src/widget/templates/images/combo_box_arrow.png"),copyClasses:false,iconAlt:"",containerToggle:"plain",containerToggleDuration:150,templateString:"<span style=\"white-space:nowrap\"><input type=\"hidden\" name=\"\" value=\"\" dojoAttachPoint=\"valueNode\" /><input name=\"\" type=\"text\" value=\"\" style=\"vertical-align:middle;\" dojoAttachPoint=\"inputNode\" autocomplete=\"off\" /> <img src=\"${this.iconURL}\" alt=\"${this.iconAlt}\" dojoAttachEvent=\"onclick:onIconClick\" dojoAttachPoint=\"buttonNode\" style=\"vertical-align:middle; cursor:pointer; cursor:hand\" /></span>",templateCssPath:"",isContainer:true,attachTemplateNodes:function(){
dojo.widget.DropdownContainer.superclass.attachTemplateNodes.apply(this,arguments);
this.popup=dojo.widget.createWidget("PopupContainer",{toggle:this.containerToggle,toggleDuration:this.containerToggleDuration});
this.containerNode=this.popup.domNode;
},fillInTemplate:function(args,frag){
this.domNode.appendChild(this.popup.domNode);
if(this.id){
this.domNode.id=this.id;
}
if(this.inputId){
this.inputNode.id=this.inputId;
}
if(this.inputName){
this.inputNode.name=this.inputName;
}
this.inputNode.style.width=this.inputWidth;
this.inputNode.disabled=this.disabled;
if(this.copyClasses){
this.inputNode.style="";
this.inputNode.className=this.getFragNodeRef(frag).className;
}
dojo.event.connect(this.inputNode,"onchange",this,"onInputChange");
},onIconClick:function(evt){
if(this.disabled){
return;
}
if(!this.popup.isShowingNow){
this.popup.open(this.inputNode,this,this.buttonNode);
}else{
this.popup.close();
}
},hideContainer:function(){
if(this.popup.isShowingNow){
this.popup.close();
}
},onInputChange:function(){
},enable:function(){
this.inputNode.disabled=false;
dojo.widget.DropdownContainer.superclass.enable.apply(this,arguments);
},disable:function(){
this.inputNode.disabled=true;
dojo.widget.DropdownContainer.superclass.disable.apply(this,arguments);
}});
dojo.provide("dojo.widget.DropdownDatePicker");
dojo.widget.defineWidget("dojo.widget.DropdownDatePicker",dojo.widget.DropdownContainer,{iconURL:dojo.uri.dojoUri("src/widget/templates/images/dateIcon.gif"),formatLength:"short",displayFormat:"",dateFormat:"",saveFormat:"",value:"",name:"",displayWeeks:6,adjustWeeks:false,startDate:"1492-10-12",endDate:"2941-10-12",weekStartsOn:"",staticDisplay:false,postMixInProperties:function(_b56,frag){
dojo.widget.DropdownDatePicker.superclass.postMixInProperties.apply(this,arguments);
var _b58=dojo.i18n.getLocalization("dojo.widget","DropdownDatePicker",this.lang);
this.iconAlt=_b58.selectDate;
if(typeof (this.value)=="string"&&this.value.toLowerCase()=="today"){
this.value=new Date();
}
if(this.value&&isNaN(this.value)){
var orig=this.value;
this.value=dojo.date.fromRfc3339(this.value);
if(!this.value){
this.value=new Date(orig);
dojo.deprecated("dojo.widget.DropdownDatePicker","date attributes must be passed in Rfc3339 format","0.5");
}
}
if(this.value&&!isNaN(this.value)){
this.value=new Date(this.value);
}
},fillInTemplate:function(args,frag){
dojo.widget.DropdownDatePicker.superclass.fillInTemplate.call(this,args,frag);
var _b5c={widgetContainerId:this.widgetId,lang:this.lang,value:this.value,startDate:this.startDate,endDate:this.endDate,displayWeeks:this.displayWeeks,weekStartsOn:this.weekStartsOn,adjustWeeks:this.adjustWeeks,staticDisplay:this.staticDisplay};
this.datePicker=dojo.widget.createWidget("DatePicker",_b5c,this.containerNode,"child");
dojo.event.connect(this.datePicker,"onValueChanged",this,"_updateText");
if(this.value){
this._updateText();
}
this.containerNode.explodeClassName="calendarBodyContainer";
this.valueNode.name=this.name;
},getValue:function(){
return this.valueNode.value;
},getDate:function(){
return this.datePicker.value;
},setValue:function(_b5d){
this.setDate(_b5d);
},setDate:function(_b5e){
this.datePicker.setDate(_b5e);
this._syncValueNode();
},_updateText:function(){
if(this.dateFormat){
dojo.deprecated("dojo.widget.DropdownDatePicker","Must use displayFormat attribute instead of dateFormat.  See dojo.date.format for specification.","0.5");
this.inputNode.value=dojo.date.strftime(this.datePicker.value,this.dateFormat,this.lang);
}else{
if(this.datePicker.value){
this.inputNode.value=dojo.date.format(this.datePicker.value,{formatLength:this.formatLength,datePattern:this.displayFormat,selector:"dateOnly",locale:this.lang});
}else{
this.inputNode.value="";
}
}
if(this.value<this.datePicker.startDate||this.value>this.datePicker.endDate){
this.inputNode.value="";
}
this._syncValueNode();
this.onValueChanged(this.getDate());
this.hideContainer();
},onValueChanged:function(_b5f){
},onInputChange:function(){
if(this.dateFormat){
dojo.deprecated("dojo.widget.DropdownDatePicker","Cannot parse user input.  Must use displayFormat attribute instead of dateFormat.  See dojo.date.format for specification.","0.5");
}else{
var _b60=dojo.string.trim(this.inputNode.value);
if(_b60){
var _b61=dojo.date.parse(_b60,{formatLength:this.formatLength,datePattern:this.displayFormat,selector:"dateOnly",locale:this.lang});
if(_b61){
this.setDate(_b61);
}
}else{
this.valueNode.value=_b60;
}
}
if(_b60){
this._updateText();
}
},_syncValueNode:function(){
var date=this.datePicker.value;
var _b63="";
switch(this.saveFormat.toLowerCase()){
case "rfc":
case "iso":
case "":
_b63=dojo.date.toRfc3339(date,"dateOnly");
break;
case "posix":
case "unix":
_b63=Number(date);
break;
default:
if(date){
_b63=dojo.date.format(date,{datePattern:this.saveFormat,selector:"dateOnly",locale:this.lang});
}
}
this.valueNode.value=_b63;
},destroy:function(_b64){
this.datePicker.destroy(_b64);
dojo.widget.DropdownDatePicker.superclass.destroy.apply(this,arguments);
}});
dojo.provide("dojo.widget.Dialog");
dojo.declare("dojo.widget.ModalDialogBase",null,{isContainer:true,focusElement:"",bgColor:"black",bgOpacity:0.4,followScroll:true,closeOnBackgroundClick:false,trapTabs:function(e){
if(e.target==this.tabStartOuter){
if(this._fromTrap){
this.tabStart.focus();
this._fromTrap=false;
}else{
this._fromTrap=true;
this.tabEnd.focus();
}
}else{
if(e.target==this.tabStart){
if(this._fromTrap){
this._fromTrap=false;
}else{
this._fromTrap=true;
this.tabEnd.focus();
}
}else{
if(e.target==this.tabEndOuter){
if(this._fromTrap){
this.tabEnd.focus();
this._fromTrap=false;
}else{
this._fromTrap=true;
this.tabStart.focus();
}
}else{
if(e.target==this.tabEnd){
if(this._fromTrap){
this._fromTrap=false;
}else{
this._fromTrap=true;
this.tabStart.focus();
}
}
}
}
}
},clearTrap:function(e){
var _b67=this;
setTimeout(function(){
_b67._fromTrap=false;
},100);
},postCreate:function(){
with(this.domNode.style){
position="absolute";
zIndex=999;
display="none";
overflow="visible";
}
var b=dojo.body();
b.appendChild(this.domNode);
this.bg=document.createElement("div");
this.bg.className="dialogUnderlay";
with(this.bg.style){
position="absolute";
left=top="0px";
zIndex=998;
display="none";
}
b.appendChild(this.bg);
this.setBackgroundColor(this.bgColor);
this.bgIframe=new dojo.html.BackgroundIframe();
if(this.bgIframe.iframe){
with(this.bgIframe.iframe.style){
position="absolute";
left=top="0px";
zIndex=90;
display="none";
}
}
if(this.closeOnBackgroundClick){
dojo.event.kwConnect({srcObj:this.bg,srcFunc:"onclick",adviceObj:this,adviceFunc:"onBackgroundClick",once:true});
}
},uninitialize:function(){
this.bgIframe.remove();
dojo.html.removeNode(this.bg,true);
},setBackgroundColor:function(_b69){
if(arguments.length>=3){
_b69=new dojo.gfx.color.Color(arguments[0],arguments[1],arguments[2]);
}else{
_b69=new dojo.gfx.color.Color(_b69);
}
this.bg.style.backgroundColor=_b69.toString();
return this.bgColor=_b69;
},setBackgroundOpacity:function(op){
if(arguments.length==0){
op=this.bgOpacity;
}
dojo.html.setOpacity(this.bg,op);
try{
this.bgOpacity=dojo.html.getOpacity(this.bg);
}
catch(e){
this.bgOpacity=op;
}
return this.bgOpacity;
},_sizeBackground:function(){
if(this.bgOpacity>0){
var _b6b=dojo.html.getViewport();
var h=_b6b.height;
var w=_b6b.width;
with(this.bg.style){
width=w+"px";
height=h+"px";
}
var _b6e=dojo.html.getScroll().offset;
this.bg.style.top=_b6e.y+"px";
this.bg.style.left=_b6e.x+"px";
var _b6b=dojo.html.getViewport();
if(_b6b.width!=w){
this.bg.style.width=_b6b.width+"px";
}
if(_b6b.height!=h){
this.bg.style.height=_b6b.height+"px";
}
}
this.bgIframe.size(this.bg);
},_showBackground:function(){
if(this.bgOpacity>0){
this.bg.style.display="block";
}
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="block";
}
},placeModalDialog:function(){
var _b6f=dojo.html.getScroll().offset;
var _b70=dojo.html.getViewport();
var mb;
if(this.isShowing()){
mb=dojo.html.getMarginBox(this.domNode);
}else{
dojo.html.setVisibility(this.domNode,false);
dojo.html.show(this.domNode);
mb=dojo.html.getMarginBox(this.domNode);
dojo.html.hide(this.domNode);
dojo.html.setVisibility(this.domNode,true);
}
var x=_b6f.x+(_b70.width-mb.width)/2;
var y=_b6f.y+(_b70.height-mb.height)/2;
with(this.domNode.style){
left=x+"px";
top=y+"px";
}
},_onKey:function(evt){
if(evt.key){
var node=evt.target;
while(node!=null){
if(node==this.domNode){
return;
}
node=node.parentNode;
}
if(evt.key!=evt.KEY_TAB){
dojo.event.browser.stopEvent(evt);
}else{
if(!dojo.render.html.opera){
try{
this.tabStart.focus();
}
catch(e){
}
}
}
}
},showModalDialog:function(){
if(this.followScroll&&!this._scrollConnected){
this._scrollConnected=true;
dojo.event.connect(window,"onscroll",this,"_onScroll");
}
dojo.event.connect(document.documentElement,"onkey",this,"_onKey");
this.placeModalDialog();
this.setBackgroundOpacity();
this._sizeBackground();
this._showBackground();
this._fromTrap=true;
setTimeout(dojo.lang.hitch(this,function(){
try{
this.tabStart.focus();
}
catch(e){
}
}),50);
},hideModalDialog:function(){
if(this.focusElement){
dojo.byId(this.focusElement).focus();
dojo.byId(this.focusElement).blur();
}
this.bg.style.display="none";
this.bg.style.width=this.bg.style.height="1px";
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="none";
}
dojo.event.disconnect(document.documentElement,"onkey",this,"_onKey");
if(this._scrollConnected){
this._scrollConnected=false;
dojo.event.disconnect(window,"onscroll",this,"_onScroll");
}
},_onScroll:function(){
var _b76=dojo.html.getScroll().offset;
this.bg.style.top=_b76.y+"px";
this.bg.style.left=_b76.x+"px";
this.placeModalDialog();
},checkSize:function(){
if(this.isShowing()){
this._sizeBackground();
this.placeModalDialog();
this.onResized();
}
},onBackgroundClick:function(){
if(this.lifetime-this.timeRemaining>=this.blockDuration){
return;
}
this.hide();
}});
dojo.widget.defineWidget("dojo.widget.Dialog",[dojo.widget.ContentPane,dojo.widget.ModalDialogBase],{templateString:"<div id=\"${this.widgetId}\" class=\"dojoDialog\" dojoattachpoint=\"wrapper\">\n	<span dojoattachpoint=\"tabStartOuter\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\"	tabindex=\"0\"></span>\n	<span dojoattachpoint=\"tabStart\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n	<div dojoattachpoint=\"containerNode\" style=\"position: relative; z-index: 2;\"></div>\n	<span dojoattachpoint=\"tabEnd\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n	<span dojoattachpoint=\"tabEndOuter\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n</div>\n",blockDuration:0,lifetime:0,closeNode:"",postMixInProperties:function(){
dojo.widget.Dialog.superclass.postMixInProperties.apply(this,arguments);
if(this.closeNode){
this.setCloseControl(this.closeNode);
}
},postCreate:function(){
dojo.widget.Dialog.superclass.postCreate.apply(this,arguments);
dojo.widget.ModalDialogBase.prototype.postCreate.apply(this,arguments);
},show:function(){
if(this.lifetime){
this.timeRemaining=this.lifetime;
if(this.timerNode){
this.timerNode.innerHTML=Math.ceil(this.timeRemaining/1000);
}
if(this.blockDuration&&this.closeNode){
if(this.lifetime>this.blockDuration){
this.closeNode.style.visibility="hidden";
}else{
this.closeNode.style.display="none";
}
}
if(this.timer){
clearInterval(this.timer);
}
this.timer=setInterval(dojo.lang.hitch(this,"_onTick"),100);
}
this.showModalDialog();
dojo.widget.Dialog.superclass.show.call(this);
},onLoad:function(){
this.placeModalDialog();
dojo.widget.Dialog.superclass.onLoad.call(this);
},fillInTemplate:function(){
},hide:function(){
this.hideModalDialog();
dojo.widget.Dialog.superclass.hide.call(this);
if(this.timer){
clearInterval(this.timer);
}
},setTimerNode:function(node){
this.timerNode=node;
},setCloseControl:function(node){
this.closeNode=dojo.byId(node);
dojo.event.connect(this.closeNode,"onclick",this,"hide");
},setShowControl:function(node){
node=dojo.byId(node);
dojo.event.connect(node,"onclick",this,"show");
},_onTick:function(){
if(this.timer){
this.timeRemaining-=100;
if(this.lifetime-this.timeRemaining>=this.blockDuration){
if(this.closeNode){
this.closeNode.style.visibility="visible";
}
}
if(!this.timeRemaining){
clearInterval(this.timer);
this.hide();
}else{
if(this.timerNode){
this.timerNode.innerHTML=Math.ceil(this.timeRemaining/1000);
}
}
}
}});
dojo.provide("dojo.Deferred");
dojo.Deferred=function(_b7a){
this.chain=[];
this.id=this._nextId();
this.fired=-1;
this.paused=0;
this.results=[null,null];
this.canceller=_b7a;
this.silentlyCancelled=false;
};
dojo.lang.extend(dojo.Deferred,{getFunctionFromArgs:function(){
var a=arguments;
if((a[0])&&(!a[1])){
if(dojo.lang.isFunction(a[0])){
return a[0];
}else{
if(dojo.lang.isString(a[0])){
return dj_global[a[0]];
}
}
}else{
if((a[0])&&(a[1])){
return dojo.lang.hitch(a[0],a[1]);
}
}
return null;
},makeCalled:function(){
var _b7c=new dojo.Deferred();
_b7c.callback();
return _b7c;
},repr:function(){
var _b7d;
if(this.fired==-1){
_b7d="unfired";
}else{
if(this.fired==0){
_b7d="success";
}else{
_b7d="error";
}
}
return "Deferred("+this.id+", "+_b7d+")";
},toString:dojo.lang.forward("repr"),_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){
this.errback(new Error(this.repr()));
}
}else{
if((this.fired==0)&&(this.results[0] instanceof dojo.Deferred)){
this.results[0].cancel();
}
}
},_pause:function(){
this.paused++;
},_unpause:function(){
this.paused--;
if((this.paused==0)&&(this.fired>=0)){
this._fire();
}
},_continue:function(res){
this._resback(res);
this._unpause();
},_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){
dojo.raise("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 _b85=this.getFunctionFromArgs(cb,cbfn);
if(arguments.length>2){
_b85=dojo.lang.curryArguments(null,_b85,arguments,2);
}
return this.addCallbacks(_b85,_b85);
},addCallback:function(cb,cbfn){
var _b88=this.getFunctionFromArgs(cb,cbfn);
if(arguments.length>2){
_b88=dojo.lang.curryArguments(null,_b88,arguments,2);
}
return this.addCallbacks(_b88,null);
},addErrback:function(cb,cbfn){
var _b8b=this.getFunctionFromArgs(cb,cbfn);
if(arguments.length>2){
_b8b=dojo.lang.curryArguments(null,_b8b,arguments,2);
}
return this.addCallbacks(null,_b8b);
return this.addCallbacks(null,cbfn);
},addCallbacks:function(cb,eb){
this.chain.push([cb,eb]);
if(this.fired>=0){
this._fire();
}
return this;
},_fire:function(){
var _b8e=this.chain;
var _b8f=this.fired;
var res=this.results[_b8f];
var self=this;
var cb=null;
while(_b8e.length>0&&this.paused==0){
var pair=_b8e.shift();
var f=pair[_b8f];
if(f==null){
continue;
}
try{
res=f(res);
_b8f=((res instanceof Error)?1:0);
if(res instanceof dojo.Deferred){
cb=function(res){
self._continue(res);
};
this._pause();
}
}
catch(err){
_b8f=1;
res=err;
}
}
this.fired=_b8f;
this.results[_b8f]=res;
if((cb)&&(this.paused)){
res.addBoth(cb);
}
}});
dojo.provide("dojo.widget.RichText");
if(dojo.hostenv.post_load_){
(function(){
var _b96=dojo.doc().createElement("textarea");
_b96.id="dojo.widget.RichText.savedContent";
_b96.style="display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;";
dojo.body().appendChild(_b96);
})();
}else{
try{
dojo.doc().write("<textarea id=\"dojo.widget.RichText.savedContent\" "+"style=\"display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;\"></textarea>");
}
catch(e){
}
}
dojo.widget.defineWidget("dojo.widget.RichText",dojo.widget.HtmlWidget,function(){
this.contentPreFilters=[];
this.contentPostFilters=[];
this.contentDomPreFilters=[];
this.contentDomPostFilters=[];
this.editingAreaStyleSheets=[];
if(dojo.render.html.moz){
this.contentPreFilters.push(this._fixContentForMoz);
}
this._keyHandlers={};
if(dojo.Deferred){
this.onLoadDeferred=new dojo.Deferred();
}
},{inheritWidth:false,focusOnLoad:false,saveName:"",styleSheets:"",_content:"",height:"",minHeight:"1em",isClosed:true,isLoaded:false,useActiveX:false,relativeImageUrls:false,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",onLoadDeferred:null,fillInTemplate:function(){
dojo.event.topic.publish("dojo.widget.RichText::init",this);
this.open();
dojo.event.connect(this,"onKeyPressed",this,"afterKeyPress");
dojo.event.connect(this,"onKeyPress",this,"keyPress");
dojo.event.connect(this,"onKeyDown",this,"keyDown");
dojo.event.connect(this,"onKeyUp",this,"keyUp");
this.setupDefaultShortcuts();
},setupDefaultShortcuts:function(){
var ctrl=this.KEY_CTRL;
var exec=function(cmd,arg){
return arguments.length==1?function(){
this.execCommand(cmd);
}:function(){
this.execCommand(cmd,arg);
};
};
this.addKeyHandler("b",ctrl,exec("bold"));
this.addKeyHandler("i",ctrl,exec("italic"));
this.addKeyHandler("u",ctrl,exec("underline"));
this.addKeyHandler("a",ctrl,exec("selectall"));
this.addKeyHandler("s",ctrl,function(){
this.save(true);
});
this.addKeyHandler("1",ctrl,exec("formatblock","h1"));
this.addKeyHandler("2",ctrl,exec("formatblock","h2"));
this.addKeyHandler("3",ctrl,exec("formatblock","h3"));
this.addKeyHandler("4",ctrl,exec("formatblock","h4"));
this.addKeyHandler("\\",ctrl,exec("insertunorderedlist"));
if(!dojo.render.html.ie){
this.addKeyHandler("Z",ctrl,exec("redo"));
}
},events:["onBlur","onFocus","onKeyPress","onKeyDown","onKeyUp","onClick"],open:function(_b9b){
if(this.onLoadDeferred.fired>=0){
this.onLoadDeferred=new dojo.Deferred();
}
var h=dojo.render.html;
if(!this.isClosed){
this.close();
}
dojo.event.topic.publish("dojo.widget.RichText::open",this);
this._content="";
if((arguments.length==1)&&(_b9b["nodeName"])){
this.domNode=_b9b;
}
if((this.domNode["nodeName"])&&(this.domNode.nodeName.toLowerCase()=="textarea")){
this.textarea=this.domNode;
var html=dojo.string.trim(this.textarea.value);
this.domNode=dojo.doc().createElement("div");
dojo.html.copyStyle(this.domNode,this.textarea);
var _b9e=dojo.lang.hitch(this,function(){
with(this.textarea.style){
display="block";
position="absolute";
left=top="-1000px";
if(h.ie){
this.__overflow=overflow;
overflow="hidden";
}
}
});
if(h.ie){
setTimeout(_b9e,10);
}else{
_b9e();
}
if(!h.safari){
dojo.html.insertBefore(this.domNode,this.textarea);
}
if(this.textarea.form){
dojo.event.connect("before",this.textarea.form,"onsubmit",dojo.lang.hitch(this,function(){
this.textarea.value=this.getEditorContent();
}));
}
var _b9f=this;
dojo.event.connect(this,"postCreate",function(){
dojo.html.insertAfter(_b9f.textarea,_b9f.domNode);
});
}else{
var html=this._preFilterContent(dojo.string.trim(this.domNode.innerHTML));
}
if(html==""){
html="&nbsp;";
}
var _ba0=dojo.html.getContentBox(this.domNode);
this._oldHeight=_ba0.height;
this._oldWidth=_ba0.width;
this._firstChildContributingMargin=this._getContributingMargin(this.domNode,"top");
this._lastChildContributingMargin=this._getContributingMargin(this.domNode,"bottom");
this.savedContent=this.domNode.innerHTML;
this.domNode.innerHTML="";
this.editingArea=dojo.doc().createElement("div");
this.domNode.appendChild(this.editingArea);
if((this.domNode["nodeName"])&&(this.domNode.nodeName=="LI")){
this.domNode.innerHTML=" <br>";
}
if(this.saveName!=""){
var _ba1=dojo.doc().getElementById("dojo.widget.RichText.savedContent");
if(_ba1.value!=""){
var _ba2=_ba1.value.split(this._SEPARATOR);
for(var i=0;i<_ba2.length;i++){
var data=_ba2[i].split(":");
if(data[0]==this.saveName){
html=data[1];
_ba2.splice(i,1);
break;
}
}
}
dojo.event.connect("before",window,"onunload",this,"_saveContent");
}
if(h.ie70&&this.useActiveX){
dojo.debug("activeX in ie70 is not currently supported, useActiveX is ignored for now.");
this.useActiveX=false;
}
if(this.useActiveX&&h.ie){
var self=this;
setTimeout(function(){
self._drawObject(html);
},0);
}else{
if(h.ie||this._safariIsLeopard()||h.opera){
this.iframe=dojo.doc().createElement("iframe");
this.iframe.src="javascript:void(0)";
this.editorObject=this.iframe;
with(this.iframe.style){
border="0";
width="100%";
}
this.iframe.frameBorder=0;
this.editingArea.appendChild(this.iframe);
this.window=this.iframe.contentWindow;
this.document=this.window.document;
this.document.open();
this.document.write("<html><head><style>body{margin:0;padding:0;border:0;overflow:hidden;}</style></head><body><div></div></body></html>");
this.document.close();
this.editNode=this.document.body.firstChild;
this.editNode.contentEditable=true;
with(this.iframe.style){
if(h.ie70){
if(this.height){
height=this.height;
}
if(this.minHeight){
minHeight=this.minHeight;
}
}else{
height=this.height?this.height:this.minHeight;
}
}
var _ba6=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","div","ul"];
var _ba7="";
for(var i in _ba6){
if(_ba6[i].charAt(1)!="l"){
_ba7+="<"+_ba6[i]+"><span>content</span></"+_ba6[i]+">";
}else{
_ba7+="<"+_ba6[i]+"><li>content</li></"+_ba6[i]+">";
}
}
with(this.editNode.style){
position="absolute";
left="-2000px";
top="-2000px";
}
this.editNode.innerHTML=_ba7;
var node=this.editNode.firstChild;
while(node){
dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[node.firstChild]);
var _ba9=node.tagName.toLowerCase();
this._local2NativeFormatNames[_ba9]=this.queryCommandValue("formatblock");
this._native2LocalFormatNames[this._local2NativeFormatNames[_ba9]]=_ba9;
node=node.nextSibling;
}
with(this.editNode.style){
position="";
left="";
top="";
}
this.editNode.innerHTML=html;
if(this.height){
this.document.body.style.overflowY="scroll";
}
dojo.lang.forEach(this.events,function(e){
dojo.event.connect(this.editNode,e.toLowerCase(),this,e);
},this);
this.onLoad();
}else{
this._drawIframe(html);
this.editorObject=this.iframe;
}
}
if(this.domNode.nodeName=="LI"){
this.domNode.lastChild.style.marginTop="-1.2em";
}
dojo.html.addClass(this.domNode,"RichTextEditable");
this.isClosed=false;
},_hasCollapseableMargin:function(_bab,side){
if(dojo.html.getPixelValue(_bab,"border-"+side+"-width",false)){
return false;
}else{
if(dojo.html.getPixelValue(_bab,"padding-"+side,false)){
return false;
}else{
return true;
}
}
},_getContributingMargin:function(_bad,_bae){
if(_bae=="top"){
var _baf="previousSibling";
var _bb0="nextSibling";
var _bb1="firstChild";
var _bb2="margin-top";
var _bb3="margin-bottom";
}else{
var _baf="nextSibling";
var _bb0="previousSibling";
var _bb1="lastChild";
var _bb2="margin-bottom";
var _bb3="margin-top";
}
var _bb4=dojo.html.getPixelValue(_bad,_bb2,false);
function isSignificantNode(_bb5){
return !(_bb5.nodeType==3&&dojo.string.isBlank(_bb5.data))&&dojo.html.getStyle(_bb5,"display")!="none"&&!dojo.html.isPositionAbsolute(_bb5);
}
var _bb6=0;
var _bb7=_bad[_bb1];
while(_bb7){
while((!isSignificantNode(_bb7))&&_bb7[_bb0]){
_bb7=_bb7[_bb0];
}
_bb6=Math.max(_bb6,dojo.html.getPixelValue(_bb7,_bb2,false));
if(!this._hasCollapseableMargin(_bb7,_bae)){
break;
}
_bb7=_bb7[_bb1];
}
if(!this._hasCollapseableMargin(_bad,_bae)){
return parseInt(_bb6);
}
var _bb8=0;
var _bb9=_bad[_baf];
while(_bb9){
if(isSignificantNode(_bb9)){
_bb8=dojo.html.getPixelValue(_bb9,_bb3,false);
break;
}
_bb9=_bb9[_baf];
}
if(!_bb9){
_bb8=dojo.html.getPixelValue(_bad.parentNode,_bb2,false);
}
if(_bb6>_bb4){
return parseInt(Math.max((_bb6-_bb4)-_bb8,0));
}else{
return 0;
}
},_drawIframe:function(html){
var _bbb=Boolean(dojo.render.html.moz&&(typeof window.XML=="undefined"));
if(!this.iframe){
var _bbc=(new dojo.uri.Uri(dojo.doc().location)).host;
this.iframe=dojo.doc().createElement("iframe");
with(this.iframe){
style.border="none";
style.lineHeight="0";
style.verticalAlign="bottom";
scrolling=this.height?"auto":"no";
}
}
this.iframe.src=dojo.uri.dojoUri("src/widget/templates/richtextframe.html")+((dojo.doc().domain!=_bbc)?("#"+dojo.doc().domain):"");
this.iframe.width=this.inheritWidth?this._oldWidth:"100%";
if(this.height){
this.iframe.style.height=this.height;
}else{
var _bbd=this._oldHeight;
if(this._hasCollapseableMargin(this.domNode,"top")){
_bbd+=this._firstChildContributingMargin;
}
if(this._hasCollapseableMargin(this.domNode,"bottom")){
_bbd+=this._lastChildContributingMargin;
}
this.iframe.height=_bbd;
}
var _bbe=dojo.doc().createElement("div");
_bbe.innerHTML=html;
this.editingArea.appendChild(_bbe);
if(this.relativeImageUrls){
var imgs=_bbe.getElementsByTagName("img");
for(var i=0;i<imgs.length;i++){
imgs[i].src=(new dojo.uri.Uri(dojo.global().location,imgs[i].src)).toString();
}
html=_bbe.innerHTML;
}
var _bc1=dojo.html.firstElement(_bbe);
var _bc2=dojo.html.lastElement(_bbe);
if(_bc1){
_bc1.style.marginTop=this._firstChildContributingMargin+"px";
}
if(_bc2){
_bc2.style.marginBottom=this._lastChildContributingMargin+"px";
}
this.editingArea.appendChild(this.iframe);
if(dojo.render.html.safari){
this.iframe.src=this.iframe.src;
}
var _bc3=false;
var _bc4=dojo.lang.hitch(this,function(){
if(!_bc3){
_bc3=true;
}else{
return;
}
if(!this.editNode){
if(this.iframe.contentWindow){
this.window=this.iframe.contentWindow;
this.document=this.iframe.contentWindow.document;
}else{
if(this.iframe.contentDocument){
this.window=this.iframe.contentDocument.window;
this.document=this.iframe.contentDocument;
}
}
var _bc5=(function(_bc6){
return function(_bc7){
return dojo.html.getStyle(_bc6,_bc7);
};
})(this.domNode);
var font=_bc5("font-weight")+" "+_bc5("font-size")+" "+_bc5("font-family");
var _bc9="1.0";
var _bca=dojo.html.getUnitValue(this.domNode,"line-height");
if(_bca.value&&_bca.units==""){
_bc9=_bca.value;
}
dojo.html.insertCssText("body,html{background:transparent;padding:0;margin:0;}"+"body{top:0;left:0;right:0;"+(((this.height)||(dojo.render.html.opera))?"":"position:fixed;")+"font:"+font+";"+"min-height:"+this.minHeight+";"+"line-height:"+_bc9+"}"+"p{margin: 1em 0 !important;}"+"body > *:first-child{padding-top:0 !important;margin-top:"+this._firstChildContributingMargin+"px !important;}"+"body > *:last-child{padding-bottom:0 !important;margin-bottom:"+this._lastChildContributingMargin+"px !important;}"+"li > ul:-moz-first-node, li > ol:-moz-first-node{padding-top:1.2em;}\n"+"li{min-height:1.2em;}"+"",this.document);
dojo.html.removeNode(_bbe);
this.document.body.innerHTML=html;
if(_bbb||dojo.render.html.safari){
this.document.designMode="on";
}
this.onLoad();
}else{
dojo.html.removeNode(_bbe);
this.editNode.innerHTML=html;
this.onDisplayChanged();
}
});
if(this.editNode){
_bc4();
}else{
if(dojo.render.html.moz){
this.iframe.onload=function(){
setTimeout(_bc4,250);
};
}else{
this.iframe.onload=_bc4;
}
}
},_applyEditingAreaStyleSheets:function(){
var _bcb=[];
if(this.styleSheets){
_bcb=this.styleSheets.split(";");
this.styleSheets="";
}
_bcb=_bcb.concat(this.editingAreaStyleSheets);
this.editingAreaStyleSheets=[];
if(_bcb.length>0){
for(var i=0;i<_bcb.length;i++){
var url=_bcb[i];
if(url){
this.addStyleSheet(dojo.uri.dojoUri(url));
}
}
}
},addStyleSheet:function(uri){
var url=uri.toString();
if(dojo.lang.find(this.editingAreaStyleSheets,url)>-1){
dojo.debug("dojo.widget.RichText.addStyleSheet: Style sheet "+url+" is already applied to the editing area!");
return;
}
if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){
url=(new dojo.uri.Uri(dojo.global().location,url)).toString();
}
this.editingAreaStyleSheets.push(url);
if(this.document.createStyleSheet){
this.document.createStyleSheet(url);
}else{
var head=this.document.getElementsByTagName("head")[0];
var _bd1=this.document.createElement("link");
with(_bd1){
rel="stylesheet";
type="text/css";
href=url;
}
head.appendChild(_bd1);
}
},removeStyleSheet:function(uri){
var url=uri.toString();
if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){
url=(new dojo.uri.Uri(dojo.global().location,url)).toString();
}
var _bd4=dojo.lang.find(this.editingAreaStyleSheets,url);
if(_bd4==-1){
dojo.debug("dojo.widget.RichText.removeStyleSheet: Style sheet "+url+" is not applied to the editing area so it can not be removed!");
return;
}
delete this.editingAreaStyleSheets[_bd4];
var _bd5=this.document.getElementsByTagName("link");
for(var i=0;i<_bd5.length;i++){
if(_bd5[i].href==url){
if(dojo.render.html.ie){
_bd5[i].href="";
}
dojo.html.removeNode(_bd5[i]);
break;
}
}
},_drawObject:function(html){
this.object=dojo.html.createExternalElement(dojo.doc(),"object");
with(this.object){
classid="clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A";
width=this.inheritWidth?this._oldWidth:"100%";
style.height=this.height?this.height:(this._oldHeight+"px");
Scrollbars=this.height?true:false;
Appearance=this._activeX.appearance.flat;
}
this.editorObject=this.object;
this.editingArea.appendChild(this.object);
this.object.attachEvent("DocumentComplete",dojo.lang.hitch(this,"onLoad"));
dojo.lang.forEach(this.events,function(e){
this.object.attachEvent(e.toLowerCase(),dojo.lang.hitch(this,e));
},this);
this.object.DocumentHTML="<!doctype HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">"+"<html><title></title>"+"<style type=\"text/css\">"+"    body,html { padding: 0; margin: 0; }"+(this.height?"":"    body,  { overflow: hidden; }")+"</style>"+"<body><div>"+html+"<div></body></html>";
this._cacheLocalBlockFormatNames();
},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_cacheLocalBlockFormatNames:function(){
if(!this._native2LocalFormatNames["p"]){
var obj=this.object;
var _bda=false;
if(!obj){
try{
obj=dojo.html.createExternalElement(dojo.doc(),"object");
obj.classid="clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A";
dojo.body().appendChild(obj);
obj.DocumentHTML="<html><head></head><body></body></html>";
}
catch(e){
_bda=true;
}
}
try{
var _bdb=new ActiveXObject("DEGetBlockFmtNamesParam.DEGetBlockFmtNamesParam");
obj.ExecCommand(this._activeX.command["getblockformatnames"],0,_bdb);
var _bdc=new VBArray(_bdb.Names);
var _bdd=_bdc.toArray();
var _bde=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","ul","","","","","div"];
for(var i=0;i<_bde.length;++i){
if(_bde[i].length>0){
this._local2NativeFormatNames[_bdd[i]]=_bde[i];
this._native2LocalFormatNames[_bde[i]]=_bdd[i];
}
}
}
catch(e){
_bda=true;
}
if(obj&&!this.object){
dojo.body().removeChild(obj);
}
}
return !_bda;
},_isResized:function(){
return false;
},onLoad:function(e){
this.isLoaded=true;
if(this.object){
this.document=this.object.DOM;
this.window=this.document.parentWindow;
this.editNode=this.document.body.firstChild;
this.editingArea.style.height=this.height?this.height:this.minHeight;
if(!this.height){
this.connect(this,"onDisplayChanged","_updateHeight");
}
this.window._frameElement=this.object;
}else{
if(this.iframe&&!dojo.render.html.ie){
this.editNode=this.document.body;
if(!this.height){
this.connect(this,"onDisplayChanged","_updateHeight");
}
try{
this.document.execCommand("useCSS",false,true);
this.document.execCommand("styleWithCSS",false,false);
}
catch(e2){
}
if(dojo.render.html.safari){
this.connect(this.editNode,"onblur","onBlur");
this.connect(this.editNode,"onfocus","onFocus");
this.connect(this.editNode,"onclick","onFocus");
this.interval=setInterval(dojo.lang.hitch(this,"onDisplayChanged"),750);
}else{
if(dojo.render.html.mozilla||dojo.render.html.opera){
var doc=this.document;
var _be2=dojo.event.browser.addListener;
var self=this;
dojo.lang.forEach(this.events,function(e){
var l=_be2(self.document,e.substr(2).toLowerCase(),dojo.lang.hitch(self,e));
if(e=="onBlur"){
var _be6={unBlur:function(e){
dojo.event.browser.removeListener(doc,"blur",l);
}};
dojo.event.connect("before",self,"close",_be6,"unBlur");
}
});
}
}
}else{
if(dojo.render.html.ie){
if(!this.height){
this.connect(this,"onDisplayChanged","_updateHeight");
}
this.editNode.style.zoom=1;
}
}
}
this._applyEditingAreaStyleSheets();
if(this.focusOnLoad){
this.focus();
}
this.onDisplayChanged(e);
if(this.onLoadDeferred){
this.onLoadDeferred.callback(true);
}
},onKeyDown:function(e){
if((!e)&&(this.object)){
e=dojo.event.browser.fixEvent(this.window.event);
}
if((dojo.render.html.ie)&&(e.keyCode==e.KEY_TAB)){
e.preventDefault();
e.stopPropagation();
this.execCommand((e.shiftKey?"outdent":"indent"));
}else{
if(dojo.render.html.ie){
if((65<=e.keyCode)&&(e.keyCode<=90)){
e.charCode=e.keyCode;
this.onKeyPress(e);
}
}
}
},onKeyUp:function(e){
return;
},KEY_CTRL:1,onKeyPress:function(e){
if((!e)&&(this.object)){
e=dojo.event.browser.fixEvent(this.window.event);
}
var _beb=e.ctrlKey?this.KEY_CTRL:0;
if(this._keyHandlers[e.key]){
var _bec=this._keyHandlers[e.key],i=0,_bee;
while(_bee=_bec[i++]){
if(_beb==_bee.modifiers){
e.preventDefault();
_bee.handler.call(this);
break;
}
}
}
dojo.lang.setTimeout(this,this.onKeyPressed,1,e);
},addKeyHandler:function(key,_bf0,_bf1){
if(!(this._keyHandlers[key] instanceof Array)){
this._keyHandlers[key]=[];
}
this._keyHandlers[key].push({modifiers:_bf0||0,handler:_bf1});
},onKeyPressed:function(e){
this.onDisplayChanged();
},onClick:function(e){
this.onDisplayChanged(e);
},onBlur:function(e){
},_initialFocus:true,onFocus:function(e){
if((dojo.render.html.mozilla)&&(this._initialFocus)){
this._initialFocus=false;
if(dojo.string.trim(this.editNode.innerHTML)=="&nbsp;"){
this.placeCursorAtStart();
}
}
},blur:function(){
if(this.iframe){
this.window.blur();
}else{
if(this.object){
this.document.body.blur();
}else{
if(this.editNode){
this.editNode.blur();
}
}
}
},focus:function(){
if(this.iframe&&!dojo.render.html.ie){
this.window.focus();
}else{
if(this.object){
this.document.focus();
}else{
if(this.editNode&&this.editNode.focus){
this.editNode.focus();
}else{
dojo.debug("Have no idea how to focus into the editor!");
}
}
}
},onDisplayChanged:function(e){
},_activeX:{command:{bold:5000,italic:5023,underline:5048,justifycenter:5024,justifyleft:5025,justifyright:5026,cut:5003,copy:5002,paste:5032,"delete":5004,undo:5049,redo:5033,removeformat:5034,selectall:5035,unlink:5050,indent:5018,outdent:5031,insertorderedlist:5030,insertunorderedlist:5051,inserttable:5022,insertcell:5019,insertcol:5020,insertrow:5021,deletecells:5005,deletecols:5006,deleterows:5007,mergecells:5029,splitcell:5047,setblockformat:5043,getblockformat:5011,getblockformatnames:5012,setfontname:5044,getfontname:5013,setfontsize:5045,getfontsize:5014,setbackcolor:5042,getbackcolor:5010,setforecolor:5046,getforecolor:5015,findtext:5008,font:5009,hyperlink:5016,image:5017,lockelement:5027,makeabsolute:5028,sendbackward:5036,bringforward:5037,sendbelowtext:5038,bringabovetext:5039,sendtoback:5040,bringtofront:5041,properties:5052},ui:{"default":0,prompt:1,noprompt:2},status:{notsupported:0,disabled:1,enabled:3,latched:7,ninched:11},appearance:{flat:0,inset:1},state:{unchecked:0,checked:1,gray:2}},_normalizeCommand:function(cmd){
var drh=dojo.render.html;
var _bf9=cmd.toLowerCase();
if(_bf9=="formatblock"){
if(drh.safari){
_bf9="heading";
}
}else{
if(this.object){
switch(_bf9){
case "createlink":
_bf9="hyperlink";
break;
case "insertimage":
_bf9="image";
break;
}
}else{
if(_bf9=="hilitecolor"&&!drh.mozilla){
_bf9="backcolor";
}
}
}
return _bf9;
},_safariIsLeopard:function(){
var _bfa=false;
if(dojo.render.html.safari){
var tmp=dojo.render.html.UA.split("AppleWebKit/")[1];
var ver=parseFloat(tmp.split(" ")[0]);
if(ver>=420){
_bfa=true;
}
}
return _bfa;
},queryCommandAvailable:function(_bfd){
var ie=1;
var _bff=1<<1;
var _c00=1<<2;
var _c01=1<<3;
var _c02=1<<4;
var _c03=this._safariIsLeopard();
function isSupportedBy(_c04){
return {ie:Boolean(_c04&ie),mozilla:Boolean(_c04&_bff),safari:Boolean(_c04&_c00),safari420:Boolean(_c04&_c02),opera:Boolean(_c04&_c01)};
}
var _c05=null;
switch(_bfd.toLowerCase()){
case "bold":
case "italic":
case "underline":
case "subscript":
case "superscript":
case "fontname":
case "fontsize":
case "forecolor":
case "hilitecolor":
case "justifycenter":
case "justifyfull":
case "justifyleft":
case "justifyright":
case "delete":
case "selectall":
_c05=isSupportedBy(_bff|ie|_c00|_c01);
break;
case "createlink":
case "unlink":
case "removeformat":
case "inserthorizontalrule":
case "insertimage":
case "insertorderedlist":
case "insertunorderedlist":
case "indent":
case "outdent":
case "formatblock":
case "inserthtml":
case "undo":
case "redo":
case "strikethrough":
_c05=isSupportedBy(_bff|ie|_c01|_c02);
break;
case "blockdirltr":
case "blockdirrtl":
case "dirltr":
case "dirrtl":
case "inlinedirltr":
case "inlinedirrtl":
_c05=isSupportedBy(ie);
break;
case "cut":
case "copy":
case "paste":
_c05=isSupportedBy(ie|_bff|_c02);
break;
case "inserttable":
_c05=isSupportedBy(_bff|(this.object?ie:0));
break;
case "insertcell":
case "insertcol":
case "insertrow":
case "deletecells":
case "deletecols":
case "deleterows":
case "mergecells":
case "splitcell":
_c05=isSupportedBy(this.object?ie:0);
break;
default:
return false;
}
return (dojo.render.html.ie&&_c05.ie)||(dojo.render.html.mozilla&&_c05.mozilla)||(dojo.render.html.safari&&_c05.safari)||(_c03&&_c05.safari420)||(dojo.render.html.opera&&_c05.opera);
},execCommand:function(_c06,_c07){
var _c08;
this.focus();
_c06=this._normalizeCommand(_c06);
if(_c07!=undefined){
if(_c06=="heading"){
throw new Error("unimplemented");
}else{
if(_c06=="formatblock"){
if(this.object){
_c07=this._native2LocalFormatNames[_c07];
}else{
if(dojo.render.html.ie){
_c07="<"+_c07+">";
}
}
}
}
}
if(this.object){
switch(_c06){
case "hilitecolor":
_c06="setbackcolor";
break;
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_c06="set"+_c06;
break;
case "formatblock":
_c06="setblockformat";
}
if(_c06=="strikethrough"){
_c06="inserthtml";
var _c09=this.document.selection.createRange();
if(!_c09.htmlText){
return;
}
_c07=_c09.htmlText.strike();
}else{
if(_c06=="inserthorizontalrule"){
_c06="inserthtml";
_c07="<hr>";
}
}
if(_c06=="inserthtml"){
var _c09=this.document.selection.createRange();
if(this.document.selection.type.toUpperCase()=="CONTROL"){
for(var i=0;i<_c09.length;i++){
_c09.item(i).outerHTML=_c07;
}
}else{
_c09.pasteHTML(_c07);
_c09.select();
}
_c08=true;
}else{
if(arguments.length==1){
_c08=this.object.ExecCommand(this._activeX.command[_c06],this._activeX.ui.noprompt);
}else{
_c08=this.object.ExecCommand(this._activeX.command[_c06],this._activeX.ui.noprompt,_c07);
}
}
}else{
if(_c06=="inserthtml"){
if(dojo.render.html.ie){
var _c0b=this.document.selection.createRange();
_c0b.pasteHTML(_c07);
_c0b.select();
return true;
}else{
return this.document.execCommand(_c06,false,_c07);
}
}else{
if((_c06=="unlink")&&(this.queryCommandEnabled("unlink"))&&(dojo.render.html.mozilla)){
var _c0c=this.window.getSelection();
var _c0d=_c0c.getRangeAt(0);
var _c0e=_c0d.startContainer;
var _c0f=_c0d.startOffset;
var _c10=_c0d.endContainer;
var _c11=_c0d.endOffset;
var a=dojo.withGlobal(this.window,"getAncestorElement",dojo.html.selection,["a"]);
dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[a]);
_c08=this.document.execCommand("unlink",false,null);
var _c0d=this.document.createRange();
_c0d.setStart(_c0e,_c0f);
_c0d.setEnd(_c10,_c11);
_c0c.removeAllRanges();
_c0c.addRange(_c0d);
return _c08;
}else{
if((_c06=="hilitecolor")&&(dojo.render.html.mozilla)){
this.document.execCommand("useCSS",false,false);
_c08=this.document.execCommand(_c06,false,_c07);
this.document.execCommand("useCSS",false,true);
}else{
if((dojo.render.html.ie)&&((_c06=="backcolor")||(_c06=="forecolor"))){
_c07=arguments.length>1?_c07:null;
_c08=this.document.execCommand(_c06,false,_c07);
}else{
_c07=arguments.length>1?_c07:null;
if(_c07||_c06!="createlink"){
_c08=this.document.execCommand(_c06,false,_c07);
}
}
}
}
}
}
this.onDisplayChanged();
return _c08;
},queryCommandEnabled:function(_c13){
_c13=this._normalizeCommand(_c13);
if(this.object){
switch(_c13){
case "hilitecolor":
_c13="setbackcolor";
break;
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_c13="set"+_c13;
break;
case "formatblock":
_c13="setblockformat";
break;
case "strikethrough":
_c13="bold";
break;
case "inserthorizontalrule":
return true;
}
if(typeof this._activeX.command[_c13]=="undefined"){
return false;
}
var _c14=this.object.QueryStatus(this._activeX.command[_c13]);
return ((_c14!=this._activeX.status.notsupported)&&(_c14!=this._activeX.status.disabled));
}else{
if(dojo.render.html.mozilla){
if(_c13=="unlink"){
return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["a"]);
}else{
if(_c13=="inserttable"){
return true;
}
}
}
var elem=(dojo.render.html.ie)?this.document.selection.createRange():this.document;
return elem.queryCommandEnabled(_c13);
}
},queryCommandState:function(_c16){
_c16=this._normalizeCommand(_c16);
if(this.object){
if(_c16=="forecolor"){
_c16="setforecolor";
}else{
if(_c16=="backcolor"){
_c16="setbackcolor";
}else{
if(_c16=="strikethrough"){
return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["strike"]);
}else{
if(_c16=="inserthorizontalrule"){
return false;
}
}
}
}
if(typeof this._activeX.command[_c16]=="undefined"){
return null;
}
var _c17=this.object.QueryStatus(this._activeX.command[_c16]);
return ((_c17==this._activeX.status.latched)||(_c17==this._activeX.status.ninched));
}else{
return this.document.queryCommandState(_c16);
}
},queryCommandValue:function(_c18){
_c18=this._normalizeCommand(_c18);
if(this.object){
switch(_c18){
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_c18="get"+_c18;
return this.object.execCommand(this._activeX.command[_c18],this._activeX.ui.noprompt);
case "formatblock":
var _c19=this.object.execCommand(this._activeX.command["getblockformat"],this._activeX.ui.noprompt);
if(_c19){
return this._local2NativeFormatNames[_c19];
}
}
}else{
if(dojo.render.html.ie&&_c18=="formatblock"){
return this._local2NativeFormatNames[this.document.queryCommandValue(_c18)]||this.document.queryCommandValue(_c18);
}
return this.document.queryCommandValue(_c18);
}
},placeCursorAtStart:function(){
this.focus();
if(dojo.render.html.moz&&this.editNode.firstChild&&this.editNode.firstChild.nodeType!=dojo.dom.TEXT_NODE){
dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode.firstChild]);
}else{
dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode]);
}
dojo.withGlobal(this.window,"collapse",dojo.html.selection,[true]);
},placeCursorAtEnd:function(){
this.focus();
if(dojo.render.html.moz&&this.editNode.lastChild&&this.editNode.lastChild.nodeType!=dojo.dom.TEXT_NODE){
dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode.lastChild]);
}else{
dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode]);
}
dojo.withGlobal(this.window,"collapse",dojo.html.selection,[false]);
},replaceEditorContent:function(html){
html=this._preFilterContent(html);
if(this.isClosed){
this.domNode.innerHTML=html;
}else{
if(this.window&&this.window.getSelection&&!dojo.render.html.moz){
this.editNode.innerHTML=html;
}else{
if((this.window&&this.window.getSelection)||(this.document&&this.document.selection)){
this.execCommand("selectall");
if(dojo.render.html.moz&&!html){
html="&nbsp;";
}
this.execCommand("inserthtml",html);
}
}
}
},_preFilterContent:function(html){
var ec=html;
dojo.lang.forEach(this.contentPreFilters,function(ef){
ec=ef(ec);
});
if(this.contentDomPreFilters.length>0){
var dom=dojo.doc().createElement("div");
dom.style.display="none";
dojo.body().appendChild(dom);
dom.innerHTML=ec;
dojo.lang.forEach(this.contentDomPreFilters,function(ef){
dom=ef(dom);
});
ec=dom.innerHTML;
dojo.body().removeChild(dom);
}
return ec;
},_postFilterContent:function(html){
var ec=html;
if(this.contentDomPostFilters.length>0){
var dom=this.document.createElement("div");
dom.innerHTML=ec;
dojo.lang.forEach(this.contentDomPostFilters,function(ef){
dom=ef(dom);
});
ec=dom.innerHTML;
}
dojo.lang.forEach(this.contentPostFilters,function(ef){
ec=ef(ec);
});
return ec;
},_lastHeight:0,_updateHeight:function(){
if(!this.isLoaded){
return;
}
if(this.height){
return;
}
var _c25=dojo.html.getBorderBox(this.editNode).height;
if(!_c25){
_c25=dojo.html.getBorderBox(this.document.body).height;
}
if(_c25==0){
dojo.debug("Can not figure out the height of the editing area!");
return;
}
this._lastHeight=_c25;
this.editorObject.style.height=this._lastHeight+"px";
this.window.scrollTo(0,0);
},_saveContent:function(e){
var _c27=dojo.doc().getElementById("dojo.widget.RichText.savedContent");
_c27.value+=this._SEPARATOR+this.saveName+":"+this.getEditorContent();
},getEditorContent:function(){
var ec="";
try{
ec=(this._content.length>0)?this._content:this.editNode.innerHTML;
if(dojo.string.trim(ec)=="&nbsp;"){
ec="";
}
}
catch(e){
}
if(dojo.render.html.ie&&!this.object){
var re=new RegExp("(?:<p>&nbsp;</p>[\n\r]*)+$","i");
ec=ec.replace(re,"");
}
ec=this._postFilterContent(ec);
if(this.relativeImageUrls){
var _c2a=dojo.global().location.protocol+"//"+dojo.global().location.host;
var _c2b=dojo.global().location.pathname;
if(_c2b.match(/\/$/)){
}else{
var _c2c=_c2b.split("/");
if(_c2c.length){
_c2c.pop();
}
_c2b=_c2c.join("/")+"/";
}
var _c2d=new RegExp("(<img[^>]* src=[\"'])("+_c2a+"("+_c2b+")?)","ig");
ec=ec.replace(_c2d,"$1");
}
return ec;
},close:function(save,_c2f){
if(this.isClosed){
return false;
}
if(arguments.length==0){
save=true;
}
this._content=this._postFilterContent(this.editNode.innerHTML);
var _c30=(this.savedContent!=this._content);
if(this.interval){
clearInterval(this.interval);
}
if(dojo.render.html.ie&&!this.object){
dojo.event.browser.clean(this.editNode);
}
if(this.iframe){
delete this.iframe;
}
if(this.textarea){
with(this.textarea.style){
position="";
left=top="";
if(dojo.render.html.ie){
overflow=this.__overflow;
this.__overflow=null;
}
}
if(save){
this.textarea.value=this._content;
}else{
this.textarea.value=this.savedContent;
}
dojo.html.removeNode(this.domNode);
this.domNode=this.textarea;
}else{
if(save){
if(dojo.render.html.moz){
var nc=dojo.doc().createElement("span");
this.domNode.appendChild(nc);
nc.innerHTML=this.editNode.innerHTML;
}else{
this.domNode.innerHTML=this._content;
}
}else{
this.domNode.innerHTML=this.savedContent;
}
}
dojo.html.removeClass(this.domNode,"RichTextEditable");
this.isClosed=true;
this.isLoaded=false;
delete this.editNode;
if(this.window._frameElement){
this.window._frameElement=null;
}
this.window=null;
this.document=null;
this.object=null;
this.editingArea=null;
this.editorObject=null;
return _c30;
},destroyRendering:function(){
},destroy:function(){
this.destroyRendering();
if(!this.isClosed){
this.close(false);
}
dojo.widget.RichText.superclass.destroy.call(this);
},connect:function(_c32,_c33,_c34){
dojo.event.connect(_c32,_c33,this,_c34);
},disconnect:function(_c35,_c36,_c37){
dojo.event.disconnect(_c35,_c36,this,_c37);
},disconnectAllWithRoot:function(_c38){
dojo.deprecated("disconnectAllWithRoot","is deprecated. No need to disconnect manually","0.5");
},_fixContentForMoz:function(html){
html=html.replace(/<strong([ \>])/gi,"<b$1");
html=html.replace(/<\/strong>/gi,"</b>");
html=html.replace(/<em([ \>])/gi,"<i$1");
html=html.replace(/<\/em>/gi,"</i>");
return html;
}});
dojo.provide("dojo.widget.ColorPalette");
dojo.widget.defineWidget("dojo.widget.ColorPalette",dojo.widget.HtmlWidget,{palette:"7x10",_palettes:{"7x10":[["fff","fcc","fc9","ff9","ffc","9f9","9ff","cff","ccf","fcf"],["ccc","f66","f96","ff6","ff3","6f9","3ff","6ff","99f","f9f"],["c0c0c0","f00","f90","fc6","ff0","3f3","6cc","3cf","66c","c6c"],["999","c00","f60","fc3","fc0","3c0","0cc","36f","63f","c3c"],["666","900","c60","c93","990","090","399","33f","60c","939"],["333","600","930","963","660","060","366","009","339","636"],["000","300","630","633","330","030","033","006","309","303"]],"3x4":[["ffffff","00ff00","008000","0000ff"],["c0c0c0","ffff00","ff00ff","000080"],["808080","ff0000","800080","000000"]]},buildRendering:function(){
this.domNode=document.createElement("table");
dojo.html.disableSelection(this.domNode);
dojo.event.connect(this.domNode,"onmousedown",function(e){
e.preventDefault();
});
with(this.domNode){
cellPadding="0";
cellSpacing="1";
border="1";
style.backgroundColor="white";
}
var _c3b=this._palettes[this.palette];
for(var i=0;i<_c3b.length;i++){
var tr=this.domNode.insertRow(-1);
for(var j=0;j<_c3b[i].length;j++){
if(_c3b[i][j].length==3){
_c3b[i][j]=_c3b[i][j].replace(/(.)(.)(.)/,"$1$1$2$2$3$3");
}
var td=tr.insertCell(-1);
with(td.style){
backgroundColor="#"+_c3b[i][j];
border="1px solid gray";
width=height="15px";
fontSize="1px";
}
td.color="#"+_c3b[i][j];
td.onmouseover=function(e){
this.style.borderColor="white";
};
td.onmouseout=function(e){
this.style.borderColor="gray";
};
dojo.event.connect(td,"onmousedown",this,"onClick");
td.innerHTML="&nbsp;";
}
}
},onClick:function(e){
this.onColorSelect(e.currentTarget.color);
e.currentTarget.style.borderColor="gray";
},onColorSelect:function(_c43){
}});
dojo.provide("dojo.widget.Editor2Toolbar");
dojo.lang.declare("dojo.widget.HandlerManager",null,function(){
this._registeredHandlers=[];
},{registerHandler:function(obj,func){
if(arguments.length==2){
this._registeredHandlers.push(function(){
return obj[func].apply(obj,arguments);
});
}else{
this._registeredHandlers.push(obj);
}
},removeHandler:function(func){
for(var i=0;i<this._registeredHandlers.length;i++){
if(func===this._registeredHandlers[i]){
delete this._registeredHandlers[i];
return;
}
}
dojo.debug("HandlerManager handler "+func+" is not registered, can not remove.");
},destroy:function(){
for(var i=0;i<this._registeredHandlers.length;i++){
delete this._registeredHandlers[i];
}
}});
dojo.widget.Editor2ToolbarItemManager=new dojo.widget.HandlerManager;
dojo.lang.mixin(dojo.widget.Editor2ToolbarItemManager,{getToolbarItem:function(name){
var item;
name=name.toLowerCase();
for(var i=0;i<this._registeredHandlers.length;i++){
item=this._registeredHandlers[i](name);
if(item){
return item;
}
}
switch(name){
case "bold":
case "copy":
case "cut":
case "delete":
case "indent":
case "inserthorizontalrule":
case "insertorderedlist":
case "insertunorderedlist":
case "italic":
case "justifycenter":
case "justifyfull":
case "justifyleft":
case "justifyright":
case "outdent":
case "paste":
case "redo":
case "removeformat":
case "selectall":
case "strikethrough":
case "subscript":
case "superscript":
case "underline":
case "undo":
case "unlink":
case "createlink":
case "insertimage":
case "htmltoggle":
item=new dojo.widget.Editor2ToolbarButton(name);
break;
case "forecolor":
case "hilitecolor":
item=new dojo.widget.Editor2ToolbarColorPaletteButton(name);
break;
case "plainformatblock":
item=new dojo.widget.Editor2ToolbarFormatBlockPlainSelect("formatblock");
break;
case "formatblock":
item=new dojo.widget.Editor2ToolbarFormatBlockSelect("formatblock");
break;
case "fontsize":
item=new dojo.widget.Editor2ToolbarFontSizeSelect("fontsize");
break;
case "fontname":
item=new dojo.widget.Editor2ToolbarFontNameSelect("fontname");
break;
case "inserttable":
case "insertcell":
case "insertcol":
case "insertrow":
case "deletecells":
case "deletecols":
case "deleterows":
case "mergecells":
case "splitcell":
dojo.debug(name+" is implemented in dojo.widget.Editor2Plugin.TableOperation, please require it first.");
break;
case "inserthtml":
case "blockdirltr":
case "blockdirrtl":
case "dirltr":
case "dirrtl":
case "inlinedirltr":
case "inlinedirrtl":
dojo.debug("Not yet implemented toolbar item: "+name);
break;
default:
dojo.debug("dojo.widget.Editor2ToolbarItemManager.getToolbarItem: Unknown toolbar item: "+name);
}
return item;
}});
dojo.addOnUnload(dojo.widget.Editor2ToolbarItemManager,"destroy");
dojo.declare("dojo.widget.Editor2ToolbarButton",null,function(name){
this._name=name;
},{create:function(node,_c4e,_c4f){
this._domNode=node;
var cmd=_c4e.parent.getCommand(this._name);
if(cmd){
this._domNode.title=cmd.getText();
}
this.disableSelection(this._domNode);
this._parentToolbar=_c4e;
dojo.event.connect(this._domNode,"onclick",this,"onClick");
if(!_c4f){
dojo.event.connect(this._domNode,"onmouseover",this,"onMouseOver");
dojo.event.connect(this._domNode,"onmouseout",this,"onMouseOut");
}
},disableSelection:function(_c51){
dojo.html.disableSelection(_c51);
var _c52=_c51.all||_c51.getElementsByTagName("*");
for(var x=0;x<_c52.length;x++){
dojo.html.disableSelection(_c52[x]);
}
},onMouseOver:function(){
var _c54=dojo.widget.Editor2Manager.getCurrentInstance();
if(_c54){
var _c55=_c54.getCommand(this._name);
if(_c55&&_c55.getState()!=dojo.widget.Editor2Manager.commandState.Disabled){
this.highlightToolbarItem();
}
}
},onMouseOut:function(){
this.unhighlightToolbarItem();
},destroy:function(){
this._domNode=null;
this._parentToolbar=null;
},onClick:function(e){
if(this._domNode&&!this._domNode.disabled&&this._parentToolbar.checkAvailability()){
e.preventDefault();
e.stopPropagation();
var _c57=dojo.widget.Editor2Manager.getCurrentInstance();
if(_c57){
var _c58=_c57.getCommand(this._name);
if(_c58){
_c58.execute();
}
}
}
},refreshState:function(){
var _c59=dojo.widget.Editor2Manager.getCurrentInstance();
var em=dojo.widget.Editor2Manager;
if(_c59){
var _c5b=_c59.getCommand(this._name);
if(_c5b){
var _c5c=_c5b.getState();
if(_c5c!=this._lastState){
switch(_c5c){
case em.commandState.Latched:
this.latchToolbarItem();
break;
case em.commandState.Enabled:
this.enableToolbarItem();
break;
case em.commandState.Disabled:
default:
this.disableToolbarItem();
}
this._lastState=_c5c;
}
}
}
return em.commandState.Enabled;
},latchToolbarItem:function(){
this._domNode.disabled=false;
this.removeToolbarItemStyle(this._domNode);
dojo.html.addClass(this._domNode,this._parentToolbar.ToolbarLatchedItemStyle);
},enableToolbarItem:function(){
this._domNode.disabled=false;
this.removeToolbarItemStyle(this._domNode);
dojo.html.addClass(this._domNode,this._parentToolbar.ToolbarEnabledItemStyle);
},disableToolbarItem:function(){
this._domNode.disabled=true;
this.removeToolbarItemStyle(this._domNode);
dojo.html.addClass(this._domNode,this._parentToolbar.ToolbarDisabledItemStyle);
},highlightToolbarItem:function(){
dojo.html.addClass(this._domNode,this._parentToolbar.ToolbarHighlightedItemStyle);
},unhighlightToolbarItem:function(){
dojo.html.removeClass(this._domNode,this._parentToolbar.ToolbarHighlightedItemStyle);
},removeToolbarItemStyle:function(){
dojo.html.removeClass(this._domNode,this._parentToolbar.ToolbarEnabledItemStyle);
dojo.html.removeClass(this._domNode,this._parentToolbar.ToolbarLatchedItemStyle);
dojo.html.removeClass(this._domNode,this._parentToolbar.ToolbarDisabledItemStyle);
this.unhighlightToolbarItem();
}});
dojo.declare("dojo.widget.Editor2ToolbarDropDownButton",dojo.widget.Editor2ToolbarButton,{onClick:function(){
if(this._domNode&&!this._domNode.disabled&&this._parentToolbar.checkAvailability()){
if(!this._dropdown){
this._dropdown=dojo.widget.createWidget("PopupContainer",{});
this._domNode.appendChild(this._dropdown.domNode);
}
if(this._dropdown.isShowingNow){
this._dropdown.close();
}else{
this.onDropDownShown();
this._dropdown.open(this._domNode,null,this._domNode);
}
}
},destroy:function(){
this.onDropDownDestroy();
if(this._dropdown){
this._dropdown.destroy();
}
dojo.widget.Editor2ToolbarDropDownButton.superclass.destroy.call(this);
},onDropDownShown:function(){
},onDropDownDestroy:function(){
}});
dojo.declare("dojo.widget.Editor2ToolbarColorPaletteButton",dojo.widget.Editor2ToolbarDropDownButton,{onDropDownShown:function(){
if(!this._colorpalette){
this._colorpalette=dojo.widget.createWidget("ColorPalette",{});
this._dropdown.addChild(this._colorpalette);
this.disableSelection(this._dropdown.domNode);
this.disableSelection(this._colorpalette.domNode);
dojo.event.connect(this._colorpalette,"onColorSelect",this,"setColor");
dojo.event.connect(this._dropdown,"open",this,"latchToolbarItem");
dojo.event.connect(this._dropdown,"close",this,"enableToolbarItem");
}
},setColor:function(_c5d){
this._dropdown.close();
var _c5e=dojo.widget.Editor2Manager.getCurrentInstance();
if(_c5e){
var _c5f=_c5e.getCommand(this._name);
if(_c5f){
_c5f.execute(_c5d);
}
}
}});
dojo.declare("dojo.widget.Editor2ToolbarFormatBlockPlainSelect",dojo.widget.Editor2ToolbarButton,{create:function(node,_c61){
this._domNode=node;
this._parentToolbar=_c61;
this._domNode=node;
this.disableSelection(this._domNode);
dojo.event.connect(this._domNode,"onchange",this,"onChange");
},destroy:function(){
this._domNode=null;
},onChange:function(){
if(this._parentToolbar.checkAvailability()){
var sv=this._domNode.value.toLowerCase();
var _c63=dojo.widget.Editor2Manager.getCurrentInstance();
if(_c63){
var _c64=_c63.getCommand(this._name);
if(_c64){
_c64.execute(sv);
}
}
}
},refreshState:function(){
if(this._domNode){
dojo.widget.Editor2ToolbarFormatBlockPlainSelect.superclass.refreshState.call(this);
var _c65=dojo.widget.Editor2Manager.getCurrentInstance();
if(_c65){
var _c66=_c65.getCommand(this._name);
if(_c66){
var _c67=_c66.getValue();
if(!_c67){
_c67="";
}
dojo.lang.forEach(this._domNode.options,function(item){
if(item.value.toLowerCase()==_c67.toLowerCase()){
item.selected=true;
}
});
}
}
}
}});
dojo.declare("dojo.widget.Editor2ToolbarComboItem",dojo.widget.Editor2ToolbarDropDownButton,{href:null,create:function(node,_c6a){
dojo.widget.Editor2ToolbarComboItem.superclass.create.apply(this,arguments);
if(!this._contentPane){
dojo.require("dojo.widget.ContentPane");
this._contentPane=dojo.widget.createWidget("ContentPane",{preload:"true"});
this._contentPane.addOnLoad(this,"setup");
this._contentPane.setUrl(this.href);
}
},onMouseOver:function(e){
if(this._lastState!=dojo.widget.Editor2Manager.commandState.Disabled){
dojo.html.addClass(e.currentTarget,this._parentToolbar.ToolbarHighlightedSelectStyle);
}
},onMouseOut:function(e){
dojo.html.removeClass(e.currentTarget,this._parentToolbar.ToolbarHighlightedSelectStyle);
},onDropDownShown:function(){
if(!this._dropdown.__addedContentPage){
this._dropdown.addChild(this._contentPane);
this._dropdown.__addedContentPage=true;
}
},setup:function(){
},onChange:function(e){
if(this._parentToolbar.checkAvailability()){
var name=e.currentTarget.getAttribute("dropDownItemName");
var _c6f=dojo.widget.Editor2Manager.getCurrentInstance();
if(_c6f){
var _c70=_c6f.getCommand(this._name);
if(_c70){
_c70.execute(name);
}
}
}
this._dropdown.close();
},onMouseOverItem:function(e){
dojo.html.addClass(e.currentTarget,this._parentToolbar.ToolbarHighlightedSelectItemStyle);
},onMouseOutItem:function(e){
dojo.html.removeClass(e.currentTarget,this._parentToolbar.ToolbarHighlightedSelectItemStyle);
}});
dojo.declare("dojo.widget.Editor2ToolbarFormatBlockSelect",dojo.widget.Editor2ToolbarComboItem,{href:dojo.uri.dojoUri("src/widget/templates/Editor2/EditorToolbar_FormatBlock.html"),setup:function(){
dojo.widget.Editor2ToolbarFormatBlockSelect.superclass.setup.call(this);
var _c73=this._contentPane.domNode.all||this._contentPane.domNode.getElementsByTagName("*");
this._blockNames={};
this._blockDisplayNames={};
for(var x=0;x<_c73.length;x++){
var node=_c73[x];
dojo.html.disableSelection(node);
var name=node.getAttribute("dropDownItemName");
if(name){
this._blockNames[name]=node;
var _c77=node.getElementsByTagName(name);
this._blockDisplayNames[name]=_c77[_c77.length-1].innerHTML;
}
}
for(var name in this._blockNames){
dojo.event.connect(this._blockNames[name],"onclick",this,"onChange");
dojo.event.connect(this._blockNames[name],"onmouseover",this,"onMouseOverItem");
dojo.event.connect(this._blockNames[name],"onmouseout",this,"onMouseOutItem");
}
},onDropDownDestroy:function(){
if(this._blockNames){
for(var name in this._blockNames){
delete this._blockNames[name];
delete this._blockDisplayNames[name];
}
}
},refreshState:function(){
dojo.widget.Editor2ToolbarFormatBlockSelect.superclass.refreshState.call(this);
if(this._lastState!=dojo.widget.Editor2Manager.commandState.Disabled){
var _c79=dojo.widget.Editor2Manager.getCurrentInstance();
if(_c79){
var _c7a=_c79.getCommand(this._name);
if(_c7a){
var _c7b=_c7a.getValue();
if(_c7b==this._lastSelectedFormat&&this._blockDisplayNames){
return this._lastState;
}
this._lastSelectedFormat=_c7b;
var _c7c=this._domNode.getElementsByTagName("label")[0];
var _c7d=false;
if(this._blockDisplayNames){
for(var name in this._blockDisplayNames){
if(name==_c7b){
_c7c.innerHTML=this._blockDisplayNames[name];
_c7d=true;
break;
}
}
if(!_c7d){
_c7c.innerHTML="&nbsp;";
}
}
}
}
}
return this._lastState;
}});
dojo.declare("dojo.widget.Editor2ToolbarFontSizeSelect",dojo.widget.Editor2ToolbarComboItem,{href:dojo.uri.dojoUri("src/widget/templates/Editor2/EditorToolbar_FontSize.html"),setup:function(){
dojo.widget.Editor2ToolbarFormatBlockSelect.superclass.setup.call(this);
var _c7f=this._contentPane.domNode.all||this._contentPane.domNode.getElementsByTagName("*");
this._fontsizes={};
this._fontSizeDisplayNames={};
for(var x=0;x<_c7f.length;x++){
var node=_c7f[x];
dojo.html.disableSelection(node);
var name=node.getAttribute("dropDownItemName");
if(name){
this._fontsizes[name]=node;
this._fontSizeDisplayNames[name]=node.getElementsByTagName("font")[0].innerHTML;
}
}
for(var name in this._fontsizes){
dojo.event.connect(this._fontsizes[name],"onclick",this,"onChange");
dojo.event.connect(this._fontsizes[name],"onmouseover",this,"onMouseOverItem");
dojo.event.connect(this._fontsizes[name],"onmouseout",this,"onMouseOutItem");
}
},onDropDownDestroy:function(){
if(this._fontsizes){
for(var name in this._fontsizes){
delete this._fontsizes[name];
delete this._fontSizeDisplayNames[name];
}
}
},refreshState:function(){
dojo.widget.Editor2ToolbarFormatBlockSelect.superclass.refreshState.call(this);
if(this._lastState!=dojo.widget.Editor2Manager.commandState.Disabled){
var _c84=dojo.widget.Editor2Manager.getCurrentInstance();
if(_c84){
var _c85=_c84.getCommand(this._name);
if(_c85){
var size=_c85.getValue();
if(size==this._lastSelectedSize&&this._fontSizeDisplayNames){
return this._lastState;
}
this._lastSelectedSize=size;
var _c87=this._domNode.getElementsByTagName("label")[0];
var _c88=false;
if(this._fontSizeDisplayNames){
for(var name in this._fontSizeDisplayNames){
if(name==size){
_c87.innerHTML=this._fontSizeDisplayNames[name];
_c88=true;
break;
}
}
if(!_c88){
_c87.innerHTML="&nbsp;";
}
}
}
}
}
return this._lastState;
}});
dojo.declare("dojo.widget.Editor2ToolbarFontNameSelect",dojo.widget.Editor2ToolbarFontSizeSelect,{href:dojo.uri.dojoUri("src/widget/templates/Editor2/EditorToolbar_FontName.html")});
dojo.widget.defineWidget("dojo.widget.Editor2Toolbar",dojo.widget.HtmlWidget,function(){
dojo.event.connect(this,"fillInTemplate",dojo.lang.hitch(this,function(){
if(dojo.render.html.ie){
this.domNode.style.zoom=1;
}
}));
},{templateString:"<div dojoAttachPoint=\"domNode\" class=\"EditorToolbarDomNode\" unselectable=\"on\">\n	<table cellpadding=\"3\" cellspacing=\"0\" border=\"0\">\n		<!--\n			our toolbar should look something like:\n\n			+=======+=======+=======+=============================================+\n			| w   w | style | copy  | bo | it | un | le | ce | ri |\n			| w w w | style |=======|==============|==============|\n			|  w w  | style | paste |  undo | redo | change style |\n			+=======+=======+=======+=============================================+\n		-->\n		<tbody>\n			<tr valign=\"top\">\n				<td rowspan=\"2\">\n					<div class=\"bigIcon\" dojoAttachPoint=\"wikiWordButton\"\n						dojoOnClick=\"wikiWordClick; buttonClick;\">\n						<span style=\"font-size: 30px; margin-left: 5px;\">\n							W\n						</span>\n					</div>\n				</td>\n				<td rowspan=\"2\">\n					<div class=\"bigIcon\" dojoAttachPoint=\"styleDropdownButton\"\n						dojoOnClick=\"styleDropdownClick; buttonClick;\">\n						<span unselectable=\"on\"\n							style=\"font-size: 30px; margin-left: 5px;\">\n							S\n						</span>\n					</div>\n					<div class=\"StyleDropdownContainer\" style=\"display: none;\"\n						dojoAttachPoint=\"styleDropdownContainer\">\n						<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"\n							height=\"100%\" width=\"100%\">\n							<tr valign=\"top\">\n								<td rowspan=\"2\">\n									<div style=\"height: 245px; overflow: auto;\">\n										<div class=\"headingContainer\"\n											unselectable=\"on\"\n											dojoOnClick=\"normalTextClick\">normal</div>\n										<h1 class=\"headingContainer\"\n											unselectable=\"on\"\n											dojoOnClick=\"h1TextClick\">Heading 1</h1>\n										<h2 class=\"headingContainer\"\n											unselectable=\"on\"\n											dojoOnClick=\"h2TextClick\">Heading 2</h2>\n										<h3 class=\"headingContainer\"\n											unselectable=\"on\"\n											dojoOnClick=\"h3TextClick\">Heading 3</h3>\n										<h4 class=\"headingContainer\"\n											unselectable=\"on\"\n											dojoOnClick=\"h4TextClick\">Heading 4</h4>\n										<div class=\"headingContainer\"\n											unselectable=\"on\"\n											dojoOnClick=\"blahTextClick\">blah</div>\n										<div class=\"headingContainer\"\n											unselectable=\"on\"\n											dojoOnClick=\"blahTextClick\">blah</div>\n										<div class=\"headingContainer\"\n											unselectable=\"on\"\n											dojoOnClick=\"blahTextClick\">blah</div>\n										<div class=\"headingContainer\">blah</div>\n										<div class=\"headingContainer\">blah</div>\n										<div class=\"headingContainer\">blah</div>\n										<div class=\"headingContainer\">blah</div>\n									</div>\n								</td>\n								<!--\n								<td>\n									<span class=\"iconContainer\" dojoOnClick=\"buttonClick;\">\n										<span class=\"icon justifyleft\" \n											style=\"float: left;\">&nbsp;</span>\n									</span>\n									<span class=\"iconContainer\" dojoOnClick=\"buttonClick;\">\n										<span class=\"icon justifycenter\" \n											style=\"float: left;\">&nbsp;</span>\n									</span>\n									<span class=\"iconContainer\" dojoOnClick=\"buttonClick;\">\n										<span class=\"icon justifyright\" \n											style=\"float: left;\">&nbsp;</span>\n									</span>\n									<span class=\"iconContainer\" dojoOnClick=\"buttonClick;\">\n										<span class=\"icon justifyfull\" \n											style=\"float: left;\">&nbsp;</span>\n									</span>\n								</td>\n								-->\n							</tr>\n							<tr valign=\"top\">\n								<td>\n									thud\n								</td>\n							</tr>\n						</table>\n					</div>\n				</td>\n				<td>\n					<!-- copy -->\n					<span class=\"iconContainer\" dojoAttachPoint=\"copyButton\"\n						unselectable=\"on\"\n						dojoOnClick=\"copyClick; buttonClick;\">\n						<span class=\"icon copy\" \n							unselectable=\"on\"\n							style=\"float: left;\">&nbsp;</span> copy\n					</span>\n					<!-- \"droppable\" options -->\n					<span class=\"iconContainer\" dojoAttachPoint=\"boldButton\"\n						unselectable=\"on\"\n						dojoOnClick=\"boldClick; buttonClick;\">\n						<span class=\"icon bold\" unselectable=\"on\">&nbsp;</span>\n					</span>\n					<span class=\"iconContainer\" dojoAttachPoint=\"italicButton\"\n						dojoOnClick=\"italicClick; buttonClick;\">\n						<span class=\"icon italic\" unselectable=\"on\">&nbsp;</span>\n					</span>\n					<span class=\"iconContainer\" dojoAttachPoint=\"underlineButton\"\n						dojoOnClick=\"underlineClick; buttonClick;\">\n						<span class=\"icon underline\" unselectable=\"on\">&nbsp;</span>\n					</span>\n					<span class=\"iconContainer\" dojoAttachPoint=\"leftButton\"\n						dojoOnClick=\"leftClick; buttonClick;\">\n						<span class=\"icon justifyleft\" unselectable=\"on\">&nbsp;</span>\n					</span>\n					<span class=\"iconContainer\" dojoAttachPoint=\"fullButton\"\n						dojoOnClick=\"fullClick; buttonClick;\">\n						<span class=\"icon justifyfull\" unselectable=\"on\">&nbsp;</span>\n					</span>\n					<span class=\"iconContainer\" dojoAttachPoint=\"rightButton\"\n						dojoOnClick=\"rightClick; buttonClick;\">\n						<span class=\"icon justifyright\" unselectable=\"on\">&nbsp;</span>\n					</span>\n				</td>\n			</tr>\n			<tr>\n				<td>\n					<!-- paste -->\n					<span class=\"iconContainer\" dojoAttachPoint=\"pasteButton\"\n						dojoOnClick=\"pasteClick; buttonClick;\" unselectable=\"on\">\n						<span class=\"icon paste\" style=\"float: left;\" unselectable=\"on\">&nbsp;</span> paste\n					</span>\n					<!-- \"droppable\" options -->\n					<span class=\"iconContainer\" dojoAttachPoint=\"undoButton\"\n						dojoOnClick=\"undoClick; buttonClick;\" unselectable=\"on\">\n						<span class=\"icon undo\" style=\"float: left;\" unselectable=\"on\">&nbsp;</span> undo\n					</span>\n					<span class=\"iconContainer\" dojoAttachPoint=\"redoButton\"\n						dojoOnClick=\"redoClick; buttonClick;\" unselectable=\"on\">\n						<span class=\"icon redo\" style=\"float: left;\" unselectable=\"on\">&nbsp;</span> redo\n					</span>\n				</td>	\n			</tr>\n		</tbody>\n	</table>\n</div>",ToolbarLatchedItemStyle:"ToolbarButtonLatched",ToolbarEnabledItemStyle:"ToolbarButtonEnabled",ToolbarDisabledItemStyle:"ToolbarButtonDisabled",ToolbarHighlightedItemStyle:"ToolbarButtonHighlighted",ToolbarHighlightedSelectStyle:"ToolbarSelectHighlighted",ToolbarHighlightedSelectItemStyle:"ToolbarSelectHighlightedItem",postCreate:function(){
var _c8a=dojo.html.getElementsByClass("dojoEditorToolbarItem",this.domNode);
this.items={};
for(var x=0;x<_c8a.length;x++){
var node=_c8a[x];
var _c8d=node.getAttribute("dojoETItemName");
if(_c8d){
var item=dojo.widget.Editor2ToolbarItemManager.getToolbarItem(_c8d);
if(item){
item.create(node,this);
this.items[_c8d.toLowerCase()]=item;
}else{
node.style.display="none";
}
}
}
},update:function(){
for(var cmd in this.items){
this.items[cmd].refreshState();
}
},shareGroup:"",checkAvailability:function(){
if(!this.shareGroup){
this.parent.focus();
return true;
}
var _c90=dojo.widget.Editor2Manager.getCurrentInstance();
if(this.shareGroup==_c90.toolbarGroup){
return true;
}
return false;
},destroy:function(){
for(var it in this.items){
this.items[it].destroy();
delete this.items[it];
}
dojo.widget.Editor2Toolbar.superclass.destroy.call(this);
}});
dojo.provide("dojo.lfx.shadow");
dojo.lfx.shadow=function(node){
this.shadowPng=dojo.uri.dojoUri("src/html/images/shadow");
this.shadowThickness=8;
this.shadowOffset=15;
this.init(node);
};
dojo.extend(dojo.lfx.shadow,{init:function(node){
this.node=node;
this.pieces={};
var x1=-1*this.shadowThickness;
var y0=this.shadowOffset;
var y1=this.shadowOffset+this.shadowThickness;
this._makePiece("tl","top",y0,"left",x1);
this._makePiece("l","top",y1,"left",x1,"scale");
this._makePiece("tr","top",y0,"left",0);
this._makePiece("r","top",y1,"left",0,"scale");
this._makePiece("bl","top",0,"left",x1);
this._makePiece("b","top",0,"left",0,"crop");
this._makePiece("br","top",0,"left",0);
},_makePiece:function(name,_c98,_c99,_c9a,_c9b,_c9c){
var img;
var url=this.shadowPng+name.toUpperCase()+".png";
if(dojo.render.html.ie55||dojo.render.html.ie60){
img=dojo.doc().createElement("div");
img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"'"+(_c9c?", sizingMethod='"+_c9c+"'":"")+")";
}else{
img=dojo.doc().createElement("img");
img.src=url;
}
img.style.position="absolute";
img.style[_c98]=_c99+"px";
img.style[_c9a]=_c9b+"px";
img.style.width=this.shadowThickness+"px";
img.style.height=this.shadowThickness+"px";
this.pieces[name]=img;
this.node.appendChild(img);
},size:function(_c9f,_ca0){
var _ca1=_ca0-(this.shadowOffset+this.shadowThickness+1);
if(_ca1<0){
_ca1=0;
}
if(_ca0<1){
_ca0=1;
}
if(_c9f<1){
_c9f=1;
}
with(this.pieces){
l.style.height=_ca1+"px";
r.style.height=_ca1+"px";
b.style.width=(_c9f-1)+"px";
bl.style.top=(_ca0-1)+"px";
b.style.top=(_ca0-1)+"px";
br.style.top=(_ca0-1)+"px";
tr.style.left=(_c9f-1)+"px";
r.style.left=(_c9f-1)+"px";
br.style.left=(_c9f-1)+"px";
}
}});
dojo.provide("dojo.dnd.HtmlDragMove");
dojo.declare("dojo.dnd.HtmlDragMoveSource",dojo.dnd.HtmlDragSource,{onDragStart:function(){
var _ca2=new dojo.dnd.HtmlDragMoveObject(this.dragObject,this.type);
if(this.constrainToContainer){
_ca2.constrainTo(this.constrainingContainer);
}
return _ca2;
},onSelected:function(){
for(var i=0;i<this.dragObjects.length;i++){
dojo.dnd.dragManager.selectedSources.push(new dojo.dnd.HtmlDragMoveSource(this.dragObjects[i]));
}
}});
dojo.declare("dojo.dnd.HtmlDragMoveObject",dojo.dnd.HtmlDragObject,{onDragStart:function(e){
dojo.html.clearSelection();
this.dragClone=this.domNode;
if(dojo.html.getComputedStyle(this.domNode,"position")!="absolute"){
this.domNode.style.position="relative";
}
var left=parseInt(dojo.html.getComputedStyle(this.domNode,"left"));
var top=parseInt(dojo.html.getComputedStyle(this.domNode,"top"));
this.dragStartPosition={x:isNaN(left)?0:left,y:isNaN(top)?0:top};
this.scrollOffset=dojo.html.getScroll().offset;
this.dragOffset={y:this.dragStartPosition.y-e.pageY,x:this.dragStartPosition.x-e.pageX};
this.containingBlockPosition={x:0,y:0};
if(this.constrainToContainer){
this.constraints=this.getConstraints();
}
dojo.event.connect(this.domNode,"onclick",this,"_squelchOnClick");
},onDragEnd:function(e){
},setAbsolutePosition:function(x,y){
if(!this.disableY){
this.domNode.style.top=y+"px";
}
if(!this.disableX){
this.domNode.style.left=x+"px";
}
},_squelchOnClick:function(e){
dojo.event.browser.stopEvent(e);
dojo.event.disconnect(this.domNode,"onclick",this,"_squelchOnClick");
}});
dojo.provide("dojo.widget.ResizeHandle");
dojo.widget.defineWidget("dojo.widget.ResizeHandle",dojo.widget.HtmlWidget,{targetElmId:"",templateString:"<div class=\"dojoHtmlResizeHandle\"><div></div></div>",postCreate:function(){
dojo.event.connect(this.domNode,"onmousedown",this,"_beginSizing");
},_beginSizing:function(e){
if(this._isSizing){
return false;
}
this.targetWidget=dojo.widget.byId(this.targetElmId);
this.targetDomNode=this.targetWidget?this.targetWidget.domNode:dojo.byId(this.targetElmId);
if(!this.targetDomNode){
return;
}
this._isSizing=true;
this.startPoint={"x":e.clientX,"y":e.clientY};
var mb=dojo.html.getMarginBox(this.targetDomNode);
this.startSize={"w":mb.width,"h":mb.height};
dojo.event.kwConnect({srcObj:dojo.body(),srcFunc:"onmousemove",targetObj:this,targetFunc:"_changeSizing",rate:25});
dojo.event.connect(dojo.body(),"onmouseup",this,"_endSizing");
e.preventDefault();
},_changeSizing:function(e){
try{
if(!e.clientX||!e.clientY){
return;
}
}
catch(e){
return;
}
var dx=this.startPoint.x-e.clientX;
var dy=this.startPoint.y-e.clientY;
var newW=this.startSize.w-dx;
var newH=this.startSize.h-dy;
if(this.minSize){
var mb=dojo.html.getMarginBox(this.targetDomNode);
if(newW<this.minSize.w){
newW=mb.width;
}
if(newH<this.minSize.h){
newH=mb.height;
}
}
if(this.targetWidget){
this.targetWidget.resizeTo(newW,newH);
}else{
dojo.html.setMarginBox(this.targetDomNode,{width:newW,height:newH});
}
e.preventDefault();
},_endSizing:function(e){
dojo.event.disconnect(dojo.body(),"onmousemove",this,"_changeSizing");
dojo.event.disconnect(dojo.body(),"onmouseup",this,"_endSizing");
this._isSizing=false;
}});
dojo.provide("dojo.widget.FloatingPane");
dojo.declare("dojo.widget.FloatingPaneBase",null,{title:"",iconSrc:"",hasShadow:false,constrainToContainer:false,taskBarId:"",resizable:true,titleBarDisplay:true,windowState:"normal",displayCloseAction:false,displayMinimizeAction:false,displayMaximizeAction:false,_max_taskBarConnectAttempts:5,_taskBarConnectAttempts:0,templateString:"<div id=\"${this.widgetId}\" dojoAttachEvent=\"onMouseDown\" class=\"dojoFloatingPane\">\n	<div dojoAttachPoint=\"titleBar\" class=\"dojoFloatingPaneTitleBar\"  style=\"display:none\">\n	  	<img dojoAttachPoint=\"titleBarIcon\"  class=\"dojoFloatingPaneTitleBarIcon\">\n		<div dojoAttachPoint=\"closeAction\" dojoAttachEvent=\"onClick:closeWindow\"\n   	  		class=\"dojoFloatingPaneCloseIcon\"></div>\n		<div dojoAttachPoint=\"restoreAction\" dojoAttachEvent=\"onClick:restoreWindow\"\n   	  		class=\"dojoFloatingPaneRestoreIcon\"></div>\n		<div dojoAttachPoint=\"maximizeAction\" dojoAttachEvent=\"onClick:maximizeWindow\"\n   	  		class=\"dojoFloatingPaneMaximizeIcon\"></div>\n		<div dojoAttachPoint=\"minimizeAction\" dojoAttachEvent=\"onClick:minimizeWindow\"\n   	  		class=\"dojoFloatingPaneMinimizeIcon\"></div>\n	  	<div dojoAttachPoint=\"titleBarText\" class=\"dojoFloatingPaneTitleText\">${this.title}</div>\n	</div>\n\n	<div id=\"${this.widgetId}_container\" dojoAttachPoint=\"containerNode\" class=\"dojoFloatingPaneClient\"></div>\n\n	<div dojoAttachPoint=\"resizeBar\" class=\"dojoFloatingPaneResizebar\" style=\"display:none\"></div>\n</div>",fillInFloatingPaneTemplate:function(args,frag){
var _cb6=this.getFragNodeRef(frag);
dojo.html.copyStyle(this.domNode,_cb6);
dojo.body().appendChild(this.domNode);
if(!this.isShowing()){
this.windowState="minimized";
}
if(this.iconSrc==""){
dojo.html.removeNode(this.titleBarIcon);
}else{
this.titleBarIcon.src=this.iconSrc.toString();
}
if(this.titleBarDisplay){
this.titleBar.style.display="";
dojo.html.disableSelection(this.titleBar);
this.titleBarIcon.style.display=(this.iconSrc==""?"none":"");
this.minimizeAction.style.display=(this.displayMinimizeAction?"":"none");
this.maximizeAction.style.display=(this.displayMaximizeAction&&this.windowState!="maximized"?"":"none");
this.restoreAction.style.display=(this.displayMaximizeAction&&this.windowState=="maximized"?"":"none");
this.closeAction.style.display=(this.displayCloseAction?"":"none");
this.drag=new dojo.dnd.HtmlDragMoveSource(this.domNode);
if(this.constrainToContainer){
this.drag.constrainTo();
}
this.drag.setDragHandle(this.titleBar);
var self=this;
dojo.event.topic.subscribe("dragMove",function(info){
if(info.source.domNode==self.domNode){
dojo.event.topic.publish("floatingPaneMove",{source:self});
}
});
}
if(this.resizable){
this.resizeBar.style.display="";
this.resizeHandle=dojo.widget.createWidget("ResizeHandle",{targetElmId:this.widgetId,id:this.widgetId+"_resize"});
this.resizeBar.appendChild(this.resizeHandle.domNode);
}
if(this.hasShadow){
this.shadow=new dojo.lfx.shadow(this.domNode);
}
this.bgIframe=new dojo.html.BackgroundIframe(this.domNode);
if(this.taskBarId){
this._taskBarSetup();
}
dojo.body().removeChild(this.domNode);
},postCreate:function(){
if(dojo.hostenv.post_load_){
this._setInitialWindowState();
}else{
dojo.addOnLoad(this,"_setInitialWindowState");
}
},maximizeWindow:function(evt){
var mb=dojo.html.getMarginBox(this.domNode);
this.previous={width:mb.width||this.width,height:mb.height||this.height,left:this.domNode.style.left,top:this.domNode.style.top,bottom:this.domNode.style.bottom,right:this.domNode.style.right};
if(this.domNode.parentNode.style.overflow.toLowerCase()!="hidden"){
this.parentPrevious={overflow:this.domNode.parentNode.style.overflow};
dojo.debug(this.domNode.parentNode.style.overflow);
this.domNode.parentNode.style.overflow="hidden";
}
this.domNode.style.left=dojo.html.getPixelValue(this.domNode.parentNode,"padding-left",true)+"px";
this.domNode.style.top=dojo.html.getPixelValue(this.domNode.parentNode,"padding-top",true)+"px";
if((this.domNode.parentNode.nodeName.toLowerCase()=="body")){
var _cbb=dojo.html.getViewport();
var _cbc=dojo.html.getPadding(dojo.body());
this.resizeTo(_cbb.width-_cbc.width,_cbb.height-_cbc.height);
}else{
var _cbd=dojo.html.getContentBox(this.domNode.parentNode);
this.resizeTo(_cbd.width,_cbd.height);
}
this.maximizeAction.style.display="none";
this.restoreAction.style.display="";
if(this.resizeHandle){
this.resizeHandle.domNode.style.display="none";
}
this.drag.setDragHandle(null);
this.windowState="maximized";
},minimizeWindow:function(evt){
this.hide();
for(var attr in this.parentPrevious){
this.domNode.parentNode.style[attr]=this.parentPrevious[attr];
}
this.lastWindowState=this.windowState;
this.windowState="minimized";
},restoreWindow:function(evt){
if(this.windowState=="minimized"){
this.show();
if(this.lastWindowState=="maximized"){
this.domNode.parentNode.style.overflow="hidden";
this.windowState="maximized";
}else{
this.windowState="normal";
}
}else{
if(this.windowState=="maximized"){
for(var attr in this.previous){
this.domNode.style[attr]=this.previous[attr];
}
for(var attr in this.parentPrevious){
this.domNode.parentNode.style[attr]=this.parentPrevious[attr];
}
this.resizeTo(this.previous.width,this.previous.height);
this.previous=null;
this.parentPrevious=null;
this.restoreAction.style.display="none";
this.maximizeAction.style.display=this.displayMaximizeAction?"":"none";
if(this.resizeHandle){
this.resizeHandle.domNode.style.display="";
}
this.drag.setDragHandle(this.titleBar);
this.windowState="normal";
}else{
}
}
},toggleDisplay:function(){
if(this.windowState=="minimized"){
this.restoreWindow();
}else{
this.minimizeWindow();
}
},closeWindow:function(evt){
dojo.html.removeNode(this.domNode);
this.destroy();
},onMouseDown:function(evt){
this.bringToTop();
},bringToTop:function(){
var _cc4=dojo.widget.manager.getWidgetsByType(this.widgetType);
var _cc5=[];
for(var x=0;x<_cc4.length;x++){
if(this.widgetId!=_cc4[x].widgetId){
_cc5.push(_cc4[x]);
}
}
_cc5.sort(function(a,b){
return a.domNode.style.zIndex-b.domNode.style.zIndex;
});
_cc5.push(this);
var _cc9=100;
for(x=0;x<_cc5.length;x++){
_cc5[x].domNode.style.zIndex=_cc9+x*2;
}
},_setInitialWindowState:function(){
if(this.isShowing()){
this.width=-1;
var mb=dojo.html.getMarginBox(this.domNode);
this.resizeTo(mb.width,mb.height);
}
if(this.windowState=="maximized"){
this.maximizeWindow();
this.show();
return;
}
if(this.windowState=="normal"){
this.show();
return;
}
if(this.windowState=="minimized"){
this.hide();
return;
}
this.windowState="minimized";
},_taskBarSetup:function(){
var _ccb=dojo.widget.getWidgetById(this.taskBarId);
if(!_ccb){
if(this._taskBarConnectAttempts<this._max_taskBarConnectAttempts){
dojo.lang.setTimeout(this,this._taskBarSetup,50);
this._taskBarConnectAttempts++;
}else{
dojo.debug("Unable to connect to the taskBar");
}
return;
}
_ccb.addChild(this);
},showFloatingPane:function(){
this.bringToTop();
},onFloatingPaneShow:function(){
var mb=dojo.html.getMarginBox(this.domNode);
this.resizeTo(mb.width,mb.height);
},resizeTo:function(_ccd,_cce){
dojo.html.setMarginBox(this.domNode,{width:_ccd,height:_cce});
dojo.widget.html.layout(this.domNode,[{domNode:this.titleBar,layoutAlign:"top"},{domNode:this.resizeBar,layoutAlign:"bottom"},{domNode:this.containerNode,layoutAlign:"client"}]);
dojo.widget.html.layout(this.containerNode,this.children,"top-bottom");
this.bgIframe.onResized();
if(this.shadow){
this.shadow.size(_ccd,_cce);
}
this.onResized();
},checkSize:function(){
},destroyFloatingPane:function(){
if(this.resizeHandle){
this.resizeHandle.destroy();
this.resizeHandle=null;
}
}});
dojo.widget.defineWidget("dojo.widget.FloatingPane",[dojo.widget.ContentPane,dojo.widget.FloatingPaneBase],{fillInTemplate:function(args,frag){
this.fillInFloatingPaneTemplate(args,frag);
dojo.widget.FloatingPane.superclass.fillInTemplate.call(this,args,frag);
},postCreate:function(){
dojo.widget.FloatingPaneBase.prototype.postCreate.apply(this,arguments);
dojo.widget.FloatingPane.superclass.postCreate.apply(this,arguments);
},show:function(){
dojo.widget.FloatingPane.superclass.show.apply(this,arguments);
this.showFloatingPane();
},onShow:function(){
dojo.widget.FloatingPane.superclass.onShow.call(this);
this.onFloatingPaneShow();
},destroy:function(){
this.destroyFloatingPane();
dojo.widget.FloatingPane.superclass.destroy.apply(this,arguments);
}});
dojo.widget.defineWidget("dojo.widget.ModalFloatingPane",[dojo.widget.FloatingPane,dojo.widget.ModalDialogBase],{windowState:"minimized",displayCloseAction:true,postCreate:function(){
dojo.widget.ModalDialogBase.prototype.postCreate.call(this);
dojo.widget.ModalFloatingPane.superclass.postCreate.call(this);
},show:function(){
this.showModalDialog();
dojo.widget.ModalFloatingPane.superclass.show.apply(this,arguments);
this.bg.style.zIndex=this.domNode.style.zIndex-1;
},hide:function(){
this.hideModalDialog();
dojo.widget.ModalFloatingPane.superclass.hide.apply(this,arguments);
},closeWindow:function(){
this.hide();
dojo.widget.ModalFloatingPane.superclass.closeWindow.apply(this,arguments);
}});
dojo.provide("dojo.widget.Editor2Plugin.AlwaysShowToolbar");
dojo.event.topic.subscribe("dojo.widget.Editor2::onLoad",function(_cd1){
if(_cd1.toolbarAlwaysVisible){
var p=new dojo.widget.Editor2Plugin.AlwaysShowToolbar(_cd1);
}
});
dojo.declare("dojo.widget.Editor2Plugin.AlwaysShowToolbar",null,function(_cd3){
this.editor=_cd3;
this.editor.registerLoadedPlugin(this);
this.setup();
},{_scrollSetUp:false,_fixEnabled:false,_scrollThreshold:false,_handleScroll:true,setup:function(){
var tdn=this.editor.toolbarWidget;
if(!tdn.tbBgIframe){
tdn.tbBgIframe=new dojo.html.BackgroundIframe(tdn.domNode);
tdn.tbBgIframe.onResized();
}
this.scrollInterval=setInterval(dojo.lang.hitch(this,"globalOnScrollHandler"),100);
dojo.event.connect("before",this.editor.toolbarWidget,"destroy",this,"destroy");
},globalOnScrollHandler:function(){
var isIE=dojo.render.html.ie;
if(!this._handleScroll){
return;
}
var dh=dojo.html;
var tdn=this.editor.toolbarWidget.domNode;
var db=dojo.body();
if(!this._scrollSetUp){
this._scrollSetUp=true;
var _cd9=dh.getMarginBox(this.editor.domNode).width;
this._scrollThreshold=dh.abs(tdn,true).y;
if((isIE)&&(db)&&(dh.getStyle(db,"background-image")=="none")){
with(db.style){
backgroundImage="url("+dojo.uri.dojoUri("src/widget/templates/images/blank.gif")+")";
backgroundAttachment="fixed";
}
}
}
var _cda=(window["pageYOffset"])?window["pageYOffset"]:(document["documentElement"]||document["body"]).scrollTop;
if(_cda>this._scrollThreshold){
if(!this._fixEnabled){
var _cdb=dojo.html.getMarginBox(tdn);
this.editor.editorObject.style.marginTop=_cdb.height+"px";
if(isIE){
tdn.style.left=dojo.html.abs(tdn,dojo.html.boxSizing.MARGIN_BOX).x;
if(tdn.previousSibling){
this._IEOriginalPos=["after",tdn.previousSibling];
}else{
if(tdn.nextSibling){
this._IEOriginalPos=["before",tdn.nextSibling];
}else{
this._IEOriginalPos=["",tdn.parentNode];
}
}
dojo.body().appendChild(tdn);
dojo.html.addClass(tdn,"IEFixedToolbar");
}else{
with(tdn.style){
position="fixed";
top="0px";
}
}
tdn.style.width=_cdb.width+"px";
tdn.style.zIndex=1000;
this._fixEnabled=true;
}
if(!dojo.render.html.safari){
var _cdc=(this.height)?parseInt(this.editor.height):this.editor._lastHeight;
if(_cda>(this._scrollThreshold+_cdc)){
tdn.style.display="none";
}else{
tdn.style.display="";
}
}
}else{
if(this._fixEnabled){
(this.editor.object||this.editor.iframe).style.marginTop=null;
with(tdn.style){
position="";
top="";
zIndex="";
display="";
}
if(isIE){
tdn.style.left="";
dojo.html.removeClass(tdn,"IEFixedToolbar");
if(this._IEOriginalPos){
dojo.html.insertAtPosition(tdn,this._IEOriginalPos[1],this._IEOriginalPos[0]);
this._IEOriginalPos=null;
}else{
dojo.html.insertBefore(tdn,this.editor.object||this.editor.iframe);
}
}
tdn.style.width="";
this._fixEnabled=false;
}
}
},destroy:function(){
this._IEOriginalPos=null;
this._handleScroll=false;
clearInterval(this.scrollInterval);
this.editor.unregisterLoadedPlugin(this);
if(dojo.render.html.ie){
dojo.html.removeClass(this.editor.toolbarWidget.domNode,"IEFixedToolbar");
}
}});
dojo.provide("dojo.widget.Editor2");
dojo.widget.Editor2Manager=new dojo.widget.HandlerManager;
dojo.lang.mixin(dojo.widget.Editor2Manager,{_currentInstance:null,commandState:{Disabled:0,Latched:1,Enabled:2},getCurrentInstance:function(){
return this._currentInstance;
},setCurrentInstance:function(inst){
this._currentInstance=inst;
},getCommand:function(_cde,name){
var _ce0;
name=name.toLowerCase();
for(var i=0;i<this._registeredHandlers.length;i++){
_ce0=this._registeredHandlers[i](_cde,name);
if(_ce0){
return _ce0;
}
}
switch(name){
case "htmltoggle":
_ce0=new dojo.widget.Editor2BrowserCommand(_cde,name);
break;
case "formatblock":
_ce0=new dojo.widget.Editor2FormatBlockCommand(_cde,name);
break;
case "anchor":
_ce0=new dojo.widget.Editor2Command(_cde,name);
break;
case "createlink":
_ce0=new dojo.widget.Editor2DialogCommand(_cde,name,{contentFile:"dojo.widget.Editor2Plugin.CreateLinkDialog",contentClass:"Editor2CreateLinkDialog",title:"Insert/Edit Link",width:"300px",height:"200px"});
break;
case "insertimage":
_ce0=new dojo.widget.Editor2DialogCommand(_cde,name,{contentFile:"dojo.widget.Editor2Plugin.InsertImageDialog",contentClass:"Editor2InsertImageDialog",title:"Insert/Edit Image",width:"400px",height:"270px"});
break;
default:
var _ce2=this.getCurrentInstance();
if((_ce2&&_ce2.queryCommandAvailable(name))||(!_ce2&&dojo.widget.Editor2.prototype.queryCommandAvailable(name))){
_ce0=new dojo.widget.Editor2BrowserCommand(_cde,name);
}else{
dojo.debug("dojo.widget.Editor2Manager.getCommand: Unknown command "+name);
return;
}
}
return _ce0;
},destroy:function(){
this._currentInstance=null;
dojo.widget.HandlerManager.prototype.destroy.call(this);
}});
dojo.addOnUnload(dojo.widget.Editor2Manager,"destroy");
dojo.lang.declare("dojo.widget.Editor2Command",null,function(_ce3,name){
this._editor=_ce3;
this._updateTime=0;
this._name=name;
},{_text:"Unknown",execute:function(para){
dojo.unimplemented("dojo.widget.Editor2Command.execute");
},getText:function(){
return this._text;
},getState:function(){
return dojo.widget.Editor2Manager.commandState.Enabled;
},destroy:function(){
}});
dojo.widget.Editor2BrowserCommandNames={"bold":"Bold","copy":"Copy","cut":"Cut","Delete":"Delete","indent":"Indent","inserthorizontalrule":"Horizental Rule","insertorderedlist":"Numbered List","insertunorderedlist":"Bullet List","italic":"Italic","justifycenter":"Align Center","justifyfull":"Justify","justifyleft":"Align Left","justifyright":"Align Right","outdent":"Outdent","paste":"Paste","redo":"Redo","removeformat":"Remove Format","selectall":"Select All","strikethrough":"Strikethrough","subscript":"Subscript","superscript":"Superscript","underline":"Underline","undo":"Undo","unlink":"Remove Link","createlink":"Create Link","insertimage":"Insert Image","htmltoggle":"HTML Source","forecolor":"Foreground Color","hilitecolor":"Background Color","plainformatblock":"Paragraph Style","formatblock":"Paragraph Style","fontsize":"Font Size","fontname":"Font Name"};
dojo.lang.declare("dojo.widget.Editor2BrowserCommand",dojo.widget.Editor2Command,function(_ce6,name){
var text=dojo.widget.Editor2BrowserCommandNames[name.toLowerCase()];
if(text){
this._text=text;
}
},{execute:function(para){
this._editor.execCommand(this._name,para);
},getState:function(){
if(this._editor._lastStateTimestamp>this._updateTime||this._state==undefined){
this._updateTime=this._editor._lastStateTimestamp;
try{
if(this._editor.queryCommandEnabled(this._name)){
if(this._editor.queryCommandState(this._name)){
this._state=dojo.widget.Editor2Manager.commandState.Latched;
}else{
this._state=dojo.widget.Editor2Manager.commandState.Enabled;
}
}else{
this._state=dojo.widget.Editor2Manager.commandState.Disabled;
}
}
catch(e){
this._state=dojo.widget.Editor2Manager.commandState.Enabled;
}
}
return this._state;
},getValue:function(){
try{
return this._editor.queryCommandValue(this._name);
}
catch(e){
}
}});
dojo.lang.declare("dojo.widget.Editor2FormatBlockCommand",dojo.widget.Editor2BrowserCommand,{});
dojo.widget.defineWidget("dojo.widget.Editor2Dialog",[dojo.widget.HtmlWidget,dojo.widget.FloatingPaneBase,dojo.widget.ModalDialogBase],{templateString:"<div id=\"${this.widgetId}\" class=\"dojoFloatingPane\">\n	<span dojoattachpoint=\"tabStartOuter\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\"	tabindex=\"0\"></span>\n	<span dojoattachpoint=\"tabStart\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n	<div dojoAttachPoint=\"titleBar\" class=\"dojoFloatingPaneTitleBar\"  style=\"display:none\">\n	  	<img dojoAttachPoint=\"titleBarIcon\"  class=\"dojoFloatingPaneTitleBarIcon\">\n		<div dojoAttachPoint=\"closeAction\" dojoAttachEvent=\"onClick:hide\"\n   	  		class=\"dojoFloatingPaneCloseIcon\"></div>\n		<div dojoAttachPoint=\"restoreAction\" dojoAttachEvent=\"onClick:restoreWindow\"\n   	  		class=\"dojoFloatingPaneRestoreIcon\"></div>\n		<div dojoAttachPoint=\"maximizeAction\" dojoAttachEvent=\"onClick:maximizeWindow\"\n   	  		class=\"dojoFloatingPaneMaximizeIcon\"></div>\n		<div dojoAttachPoint=\"minimizeAction\" dojoAttachEvent=\"onClick:minimizeWindow\"\n   	  		class=\"dojoFloatingPaneMinimizeIcon\"></div>\n	  	<div dojoAttachPoint=\"titleBarText\" class=\"dojoFloatingPaneTitleText\">${this.title}</div>\n	</div>\n\n	<div id=\"${this.widgetId}_container\" dojoAttachPoint=\"containerNode\" class=\"dojoFloatingPaneClient\"></div>\n	<span dojoattachpoint=\"tabEnd\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n	<span dojoattachpoint=\"tabEndOuter\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n	<div dojoAttachPoint=\"resizeBar\" class=\"dojoFloatingPaneResizebar\" style=\"display:none\"></div>\n</div>",modal:true,width:"",height:"",windowState:"minimized",displayCloseAction:true,contentFile:"",contentClass:"",fillInTemplate:function(args,frag){
this.fillInFloatingPaneTemplate(args,frag);
dojo.widget.Editor2Dialog.superclass.fillInTemplate.call(this,args,frag);
},postCreate:function(){
if(this.contentFile){
dojo.require(this.contentFile);
}
if(this.modal){
dojo.widget.ModalDialogBase.prototype.postCreate.call(this);
}else{
with(this.domNode.style){
zIndex=999;
display="none";
}
}
dojo.widget.FloatingPaneBase.prototype.postCreate.apply(this,arguments);
dojo.widget.Editor2Dialog.superclass.postCreate.call(this);
if(this.width&&this.height){
with(this.domNode.style){
width=this.width;
height=this.height;
}
}
},createContent:function(){
if(!this.contentWidget&&this.contentClass){
this.contentWidget=dojo.widget.createWidget(this.contentClass);
this.addChild(this.contentWidget);
}
},show:function(){
if(!this.contentWidget){
dojo.widget.Editor2Dialog.superclass.show.apply(this,arguments);
this.createContent();
dojo.widget.Editor2Dialog.superclass.hide.call(this);
}
if(!this.contentWidget||!this.contentWidget.loadContent()){
return;
}
this.showFloatingPane();
dojo.widget.Editor2Dialog.superclass.show.apply(this,arguments);
if(this.modal){
this.showModalDialog();
}
if(this.modal){
this.bg.style.zIndex=this.domNode.style.zIndex-1;
}
},onShow:function(){
dojo.widget.Editor2Dialog.superclass.onShow.call(this);
this.onFloatingPaneShow();
},closeWindow:function(){
this.hide();
dojo.widget.Editor2Dialog.superclass.closeWindow.apply(this,arguments);
},hide:function(){
if(this.modal){
this.hideModalDialog();
}
dojo.widget.Editor2Dialog.superclass.hide.call(this);
},checkSize:function(){
if(this.isShowing()){
if(this.modal){
this._sizeBackground();
}
this.placeModalDialog();
this.onResized();
}
}});
dojo.widget.defineWidget("dojo.widget.Editor2DialogContent",dojo.widget.HtmlWidget,{widgetsInTemplate:true,loadContent:function(){
return true;
},cancel:function(){
this.parent.hide();
}});
dojo.lang.declare("dojo.widget.Editor2DialogCommand",dojo.widget.Editor2BrowserCommand,function(_cec,name,_cee){
this.dialogParas=_cee;
},{execute:function(){
if(!this.dialog){
if(!this.dialogParas.contentFile||!this.dialogParas.contentClass){
alert("contentFile and contentClass should be set for dojo.widget.Editor2DialogCommand.dialogParas!");//ok
return;
}
this.dialog=dojo.widget.createWidget("Editor2Dialog",this.dialogParas);
dojo.body().appendChild(this.dialog.domNode);
dojo.event.connect(this,"destroy",this.dialog,"destroy");
}
this.dialog.show();
},getText:function(){
return this.dialogParas.title||dojo.widget.Editor2DialogCommand.superclass.getText.call(this);
}});
dojo.widget.Editor2ToolbarGroups={};
dojo.widget.defineWidget("dojo.widget.Editor2",dojo.widget.RichText,function(){
this._loadedCommands={};
},{toolbarAlwaysVisible:false,toolbarWidget:null,scrollInterval:null,toolbarTemplatePath:dojo.uri.dojoUri("src/widget/templates/EditorToolbarOneline.html"),toolbarTemplateCssPath:null,toolbarPlaceHolder:"",_inSourceMode:false,_htmlEditNode:null,toolbarGroup:"",shareToolbar:false,contextMenuGroupSet:"",editorOnLoad:function(){
dojo.event.topic.publish("dojo.widget.Editor2::preLoadingToolbar",this);
if(this.toolbarAlwaysVisible){
dojo.require("dojo.widget.Editor2Plugin.AlwaysShowToolbar");
}
if(this.toolbarWidget){
this.toolbarWidget.show();
dojo.html.insertBefore(this.toolbarWidget.domNode,this.domNode.firstChild);
}else{
if(this.shareToolbar){
dojo.deprecated("Editor2:shareToolbar is deprecated in favor of toolbarGroup","0.5");
this.toolbarGroup="defaultDojoToolbarGroup";
}
if(this.toolbarGroup){
if(dojo.widget.Editor2ToolbarGroups[this.toolbarGroup]){
this.toolbarWidget=dojo.widget.Editor2ToolbarGroups[this.toolbarGroup];
}
}
if(!this.toolbarWidget){
var _cef={shareGroup:this.toolbarGroup,parent:this};
_cef.templatePath=this.toolbarTemplatePath;
if(this.toolbarTemplateCssPath){
_cef.templateCssPath=this.toolbarTemplateCssPath;
}
if(this.toolbarPlaceHolder){
this.toolbarWidget=dojo.widget.createWidget("Editor2Toolbar",_cef,dojo.byId(this.toolbarPlaceHolder),"after");
}else{
this.toolbarWidget=dojo.widget.createWidget("Editor2Toolbar",_cef,this.domNode.firstChild,"before");
}
if(this.toolbarGroup){
dojo.widget.Editor2ToolbarGroups[this.toolbarGroup]=this.toolbarWidget;
}
dojo.event.connect(this,"close",this.toolbarWidget,"hide");
this.toolbarLoaded();
}
}
dojo.event.topic.registerPublisher("Editor2.clobberFocus",this,"clobberFocus");
dojo.event.topic.subscribe("Editor2.clobberFocus",this,"setBlur");
dojo.event.topic.publish("dojo.widget.Editor2::onLoad",this);
},toolbarLoaded:function(){
},registerLoadedPlugin:function(obj){
if(!this.loadedPlugins){
this.loadedPlugins=[];
}
this.loadedPlugins.push(obj);
},unregisterLoadedPlugin:function(obj){
for(var i in this.loadedPlugins){
if(this.loadedPlugins[i]===obj){
delete this.loadedPlugins[i];
return;
}
}
dojo.debug("dojo.widget.Editor2.unregisterLoadedPlugin: unknow plugin object: "+obj);
},execCommand:function(_cf3,_cf4){
switch(_cf3.toLowerCase()){
case "htmltoggle":
this.toggleHtmlEditing();
break;
default:
dojo.widget.Editor2.superclass.execCommand.apply(this,arguments);
}
},queryCommandEnabled:function(_cf5,_cf6){
switch(_cf5.toLowerCase()){
case "htmltoggle":
return true;
default:
if(this._inSourceMode){
return false;
}
return dojo.widget.Editor2.superclass.queryCommandEnabled.apply(this,arguments);
}
},queryCommandState:function(_cf7,_cf8){
switch(_cf7.toLowerCase()){
case "htmltoggle":
return this._inSourceMode;
default:
return dojo.widget.Editor2.superclass.queryCommandState.apply(this,arguments);
}
},onClick:function(e){
dojo.widget.Editor2.superclass.onClick.call(this,e);
if(dojo.widget.PopupManager){
if(!e){
e=this.window.event;
}
dojo.widget.PopupManager.onClick(e);
}
},clobberFocus:function(){
},toggleHtmlEditing:function(){
if(this===dojo.widget.Editor2Manager.getCurrentInstance()){
if(!this._inSourceMode){
var html=this.getEditorContent();
this._inSourceMode=true;
if(!this._htmlEditNode){
this._htmlEditNode=dojo.doc().createElement("textarea");
dojo.html.insertAfter(this._htmlEditNode,this.editorObject);
}
this._htmlEditNode.style.display="";
this._htmlEditNode.style.width="100%";
this._htmlEditNode.style.height=dojo.html.getBorderBox(this.editNode).height+"px";
this._htmlEditNode.value=html;
with(this.editorObject.style){
position="absolute";
left="-2000px";
top="-2000px";
}
}else{
this._inSourceMode=false;
this._htmlEditNode.blur();
with(this.editorObject.style){
position="";
left="";
top="";
}
var html=this._htmlEditNode.value;
dojo.lang.setTimeout(this,"replaceEditorContent",1,html);
this._htmlEditNode.style.display="none";
this.focus();
}
this.onDisplayChanged(null,true);
}
},setFocus:function(){
if(dojo.widget.Editor2Manager.getCurrentInstance()===this){
return;
}
this.clobberFocus();
dojo.widget.Editor2Manager.setCurrentInstance(this);
},setBlur:function(){
},saveSelection:function(){
this._bookmark=null;
this._bookmark=dojo.withGlobal(this.window,dojo.html.selection.getBookmark);
},restoreSelection:function(){
if(this._bookmark){
this.focus();
dojo.withGlobal(this.window,"moveToBookmark",dojo.html.selection,[this._bookmark]);
this._bookmark=null;
}else{
dojo.debug("restoreSelection: no saved selection is found!");
}
},_updateToolbarLastRan:null,_updateToolbarTimer:null,_updateToolbarFrequency:500,updateToolbar:function(_cfb){
if((!this.isLoaded)||(!this.toolbarWidget)){
return;
}
var diff=new Date()-this._updateToolbarLastRan;
if((!_cfb)&&(this._updateToolbarLastRan)&&((diff<this._updateToolbarFrequency))){
clearTimeout(this._updateToolbarTimer);
var _cfd=this;
this._updateToolbarTimer=setTimeout(function(){
_cfd.updateToolbar();
},this._updateToolbarFrequency/2);
return;
}else{
this._updateToolbarLastRan=new Date();
}
if(dojo.widget.Editor2Manager.getCurrentInstance()!==this){
return;
}
this.toolbarWidget.update();
},destroy:function(_cfe){
this._htmlEditNode=null;
dojo.event.disconnect(this,"close",this.toolbarWidget,"hide");
if(!_cfe){
this.toolbarWidget.destroy();
}
dojo.widget.Editor2.superclass.destroy.call(this);
},_lastStateTimestamp:0,onDisplayChanged:function(e,_d00){
this._lastStateTimestamp=(new Date()).getTime();
dojo.widget.Editor2.superclass.onDisplayChanged.call(this,e);
this.updateToolbar(_d00);
},onLoad:function(){
try{
dojo.widget.Editor2.superclass.onLoad.call(this);
}
catch(e){
dojo.debug(e);
}
this.editorOnLoad();
},onFocus:function(){
dojo.widget.Editor2.superclass.onFocus.call(this);
this.setFocus();
},getEditorContent:function(){
if(this._inSourceMode){
return this._htmlEditNode.value;
}
return dojo.widget.Editor2.superclass.getEditorContent.call(this);
},replaceEditorContent:function(html){
if(this._inSourceMode){
this._htmlEditNode.value=html;
return;
}
dojo.widget.Editor2.superclass.replaceEditorContent.apply(this,arguments);
},getCommand:function(name){
if(this._loadedCommands[name]){
return this._loadedCommands[name];
}
var cmd=dojo.widget.Editor2Manager.getCommand(this,name);
this._loadedCommands[name]=cmd;
return cmd;
},shortcuts:[["bold"],["italic"],["underline"],["selectall","a"],["insertunorderedlist","\\"]],setupDefaultShortcuts:function(){
var exec=function(cmd){
return function(){
cmd.execute();
};
};
var self=this;
dojo.lang.forEach(this.shortcuts,function(item){
var cmd=self.getCommand(item[0]);
if(cmd){
self.addKeyHandler(item[1]?item[1]:item[0].charAt(0),item[2]==undefined?self.KEY_CTRL:item[2],exec(cmd));
}
});
}});
dojo.provide("dojo.widget.InlineEditBox");
dojo.widget.defineWidget("dojo.widget.InlineEditBox",dojo.widget.HtmlWidget,function(){
this.history=[];
},{templateString:"<form class=\"inlineEditBox\" style=\"display: none\" dojoAttachPoint=\"form\" dojoAttachEvent=\"onSubmit:saveEdit; onReset:cancelEdit; onKeyUp: checkForValueChange;\">\n	<input type=\"text\" dojoAttachPoint=\"text\" style=\"display: none;\" />\n	<textarea dojoAttachPoint=\"textarea\" style=\"display: none;\"></textarea>\n	<input type=\"submit\" value=\"Save\" dojoAttachPoint=\"submitButton\" />\n	<input type=\"reset\" value=\"Cancel\" dojoAttachPoint=\"cancelButton\" />\n</form>\n",mode:"text",name:"",minWidth:100,minHeight:200,editing:false,value:"",textValue:"",defaultText:"",postMixInProperties:function(){
if(this.textValue){
dojo.deprecated("InlineEditBox: Use value parameter instead of textValue; will be removed in 0.5");
this.value=this.textValue;
}
if(this.defaultText){
dojo.deprecated("InlineEditBox: Use value parameter instead of defaultText; will be removed in 0.5");
this.value=this.defaultText;
}
},onSave:function(_d09,_d0a,name){
},onUndo:function(_d0c){
},postCreate:function(args,frag){
this.editable=this.getFragNodeRef(frag);
dojo.html.insertAfter(this.editable,this.form);
dojo.event.connect(this.editable,"onmouseover",this,"onMouseOver");
dojo.event.connect(this.editable,"onmouseout",this,"onMouseOut");
dojo.event.connect(this.editable,"onclick",this,"_beginEdit");
if(this.value){
this.editable.innerHTML=this.value;
return;
}else{
this.value=dojo.string.trim(this.editable.innerHTML);
this.editable.innerHTML=this.value;
}
},onMouseOver:function(){
if(!this.editing){
if(this.disabled){
dojo.html.addClass(this.editable,"editableRegionDisabled");
}else{
dojo.html.addClass(this.editable,"editableRegion");
if(this.mode=="textarea"){
dojo.html.addClass(this.editable,"editableTextareaRegion");
}
}
}
},onMouseOut:function(){
if(!this.editing){
dojo.html.removeClass(this.editable,"editableRegion");
dojo.html.removeClass(this.editable,"editableTextareaRegion");
dojo.html.removeClass(this.editable,"editableRegionDisabled");
}
},_beginEdit:function(e){
if(this.editing||this.disabled){
return;
}
this.onMouseOut();
this.editing=true;
var ee=this[this.mode.toLowerCase()];
ee.value=dojo.string.trim(this.value);
ee.style.fontSize=dojo.html.getStyle(this.editable,"font-size");
ee.style.fontWeight=dojo.html.getStyle(this.editable,"font-weight");
ee.style.fontStyle=dojo.html.getStyle(this.editable,"font-style");
var bb=dojo.html.getBorderBox(this.editable);
ee.style.width=Math.max(bb.width,this.minWidth)+"px";
if(this.mode.toLowerCase()=="textarea"){
ee.style.display="block";
ee.style.height=Math.max(bb.height,this.minHeight)+"px";
}else{
ee.style.display="";
}
this.form.style.display="";
this.editable.style.display="none";
ee.focus();
ee.select();
this.submitButton.disabled=true;
},saveEdit:function(e){
e.preventDefault();
e.stopPropagation();
var ee=this[this.mode.toLowerCase()];
if((this.value!=ee.value)&&(dojo.string.trim(ee.value)!="")){
this.doFade=true;
this.history.push(this.value);
this.onSave(ee.value,this.value,this.name);
this.value=ee.value;
this.editable.innerHTML="";
var _d14=document.createTextNode(this.value);
this.editable.appendChild(_d14);
}else{
this.doFade=false;
}
this._finishEdit(e);
},cancelEdit:function(e){
if(!this.editing){
return false;
}
this.editing=false;
this.form.style.display="none";
this.editable.style.display="";
return true;
},_finishEdit:function(e){
if(!this.cancelEdit(e)){
return;
}
if(this.doFade){
dojo.lfx.highlight(this.editable,dojo.gfx.color.hex2rgb("#ffc"),700).play(300);
}
this.doFade=false;
},setText:function(txt){
dojo.deprecated("setText() is deprecated, call setValue() instead, will be removed in 0.5");
this.setValue(txt);
},setValue:function(txt){
txt=""+txt;
var tt=dojo.string.trim(txt);
this.value=tt;
this.editable.innerHTML=tt;
},undo:function(){
if(this.history.length>0){
var _d1a=this.value;
var _d1b=this.history.pop();
this.editable.innerHTML=_d1b;
this.value=_d1b;
this.onUndo(_d1b);
this.onSave(_d1b,_d1a,this.name);
}
},checkForValueChange:function(){
var ee=this[this.mode.toLowerCase()];
if((this.value!=ee.value)&&(dojo.string.trim(ee.value)!="")){
this.submitButton.disabled=false;
}
},disable:function(){
this.submitButton.disabled=true;
this.cancelButton.disabled=true;
var ee=this[this.mode.toLowerCase()];
ee.disabled=true;
dojo.widget.InlineEditBox.superclass.disable.apply(this,arguments);
},enable:function(){
this.checkForValueChange();
this.cancelButton.disabled=false;
var ee=this[this.mode.toLowerCase()];
ee.disabled=false;
dojo.widget.InlineEditBox.superclass.enable.apply(this,arguments);
}});
dojo.provide("dojo.widget.LayoutContainer");
dojo.widget.defineWidget("dojo.widget.LayoutContainer",dojo.widget.HtmlWidget,{isContainer:true,layoutChildPriority:"top-bottom",postCreate:function(){
dojo.widget.html.layout(this.domNode,this.children,this.layoutChildPriority);
},addChild:function(_d1f,_d20,pos,ref,_d23){
dojo.widget.LayoutContainer.superclass.addChild.call(this,_d1f,_d20,pos,ref,_d23);
dojo.widget.html.layout(this.domNode,this.children,this.layoutChildPriority);
},removeChild:function(pane){
dojo.widget.LayoutContainer.superclass.removeChild.call(this,pane);
dojo.widget.html.layout(this.domNode,this.children,this.layoutChildPriority);
},onResized:function(){
dojo.widget.html.layout(this.domNode,this.children,this.layoutChildPriority);
},show:function(){
this.domNode.style.display="";
this.checkSize();
this.domNode.style.display="none";
this.domNode.style.visibility="";
dojo.widget.LayoutContainer.superclass.show.call(this);
}});
dojo.lang.extend(dojo.widget.Widget,{layoutAlign:"none"});
dojo.provide("dojo.widget.LinkPane");
dojo.widget.defineWidget("dojo.widget.LinkPane",dojo.widget.ContentPane,{templateString:"<div class=\"dojoLinkPane\"></div>",fillInTemplate:function(args,frag){
var _d27=this.getFragNodeRef(frag);
this.label+=_d27.innerHTML;
var _d27=this.getFragNodeRef(frag);
dojo.html.copyStyle(this.domNode,_d27);
}});
dojo.provide("dojo.widget.Menu2");
dojo.widget.defineWidget("dojo.widget.PopupMenu2",dojo.widget.PopupContainer,function(){
this.targetNodeIds=[];
this.eventNames={open:""};
},{snarfChildDomOutput:true,eventNaming:"default",templateString:"<table class=\"dojoPopupMenu2\" border=0 cellspacing=0 cellpadding=0 style=\"display: none;\"><tbody dojoAttachPoint=\"containerNode\"></tbody></table>",templateCssString:"",submenuDelay:200,submenuOverlap:5,contextMenuForWindow:false,initialize:function(args,frag){
if(this.eventNaming=="default"){
for(var _d2a in this.eventNames){
this.eventNames[_d2a]=this.widgetId+"/"+_d2a;
}
}
},postCreate:function(){
if(this.contextMenuForWindow){
var doc=dojo.body();
this.bindDomNode(doc);
}else{
if(this.targetNodeIds.length>0){
dojo.lang.forEach(this.targetNodeIds,this.bindDomNode,this);
}
}
this._subscribeSubitemsOnOpen();
},_subscribeSubitemsOnOpen:function(){
var _d2c=this.getChildrenOfType(dojo.widget.MenuItem2);
for(var i=0;i<_d2c.length;i++){
dojo.event.topic.subscribe(this.eventNames.open,_d2c[i],"menuOpen");
}
},getTopOpenEvent:function(){
var menu=this;
while(menu.parentPopup){
menu=menu.parentPopup;
}
return menu.openEvent;
},bindDomNode:function(node){
node=dojo.byId(node);
var win=dojo.html.getElementWindow(node);
if(dojo.html.isTag(node,"iframe")=="iframe"){
win=dojo.html.iframeContentWindow(node);
node=dojo.withGlobal(win,dojo.body);
}
dojo.widget.Menu2.OperaAndKonqFixer.fixNode(node);
dojo.event.kwConnect({srcObj:node,srcFunc:"oncontextmenu",targetObj:this,targetFunc:"onOpen",once:true});
if(dojo.render.html.moz&&win.document.designMode.toLowerCase()=="on"){
dojo.event.browser.addListener(node,"contextmenu",dojo.lang.hitch(this,"onOpen"));
}
dojo.widget.PopupManager.registerWin(win);
},unBindDomNode:function(_d31){
var node=dojo.byId(_d31);
dojo.event.kwDisconnect({srcObj:node,srcFunc:"oncontextmenu",targetObj:this,targetFunc:"onOpen",once:true});
dojo.widget.Menu2.OperaAndKonqFixer.cleanNode(node);
},_moveToNext:function(evt){
this._highlightOption(1);
return true;
},_moveToPrevious:function(evt){
this._highlightOption(-1);
return true;
},_moveToParentMenu:function(evt){
if(this._highlighted_option&&this.parentPopup){
if(evt._menu2UpKeyProcessed){
return true;
}else{
this._highlighted_option.onUnhover();
this.closeSubpopup();
evt._menu2UpKeyProcessed=true;
}
}
return false;
},_moveToChildMenu:function(evt){
if(this._highlighted_option&&this._highlighted_option.submenuId){
this._highlighted_option._onClick(true);
return true;
}
return false;
},_selectCurrentItem:function(evt){
if(this._highlighted_option){
this._highlighted_option._onClick();
return true;
}
return false;
},processKey:function(evt){
if(evt.ctrlKey||evt.altKey||!evt.key){
return false;
}
var rval=false;
switch(evt.key){
case evt.KEY_DOWN_ARROW:
rval=this._moveToNext(evt);
break;
case evt.KEY_UP_ARROW:
rval=this._moveToPrevious(evt);
break;
case evt.KEY_RIGHT_ARROW:
rval=this._moveToChildMenu(evt);
break;
case evt.KEY_LEFT_ARROW:
rval=this._moveToParentMenu(evt);
break;
case " ":
case evt.KEY_ENTER:
if(rval=this._selectCurrentItem(evt)){
break;
}
case evt.KEY_ESCAPE:
dojo.widget.PopupManager.currentMenu.close();
rval=true;
break;
}
return rval;
},_findValidItem:function(dir,_d3b){
if(_d3b){
_d3b=dir>0?_d3b.getNextSibling():_d3b.getPreviousSibling();
}
for(var i=0;i<this.children.length;++i){
if(!_d3b){
_d3b=dir>0?this.children[0]:this.children[this.children.length-1];
}
if(_d3b.onHover&&_d3b.isShowing()){
return _d3b;
}
_d3b=dir>0?_d3b.getNextSibling():_d3b.getPreviousSibling();
}
},_highlightOption:function(dir){
var item;
if((!this._highlighted_option)){
item=this._findValidItem(dir);
}else{
item=this._findValidItem(dir,this._highlighted_option);
}
if(item){
if(this._highlighted_option){
this._highlighted_option.onUnhover();
}
item.onHover();
dojo.html.scrollIntoView(item.domNode);
try{
var node=dojo.html.getElementsByClass("dojoMenuItem2Label",item.domNode)[0];
node.focus();
}
catch(e){
}
}
},onItemClick:function(item){
},close:function(_d41){
if(this.animationInProgress){
dojo.widget.PopupMenu2.superclass.close.apply(this,arguments);
return;
}
if(this._highlighted_option){
this._highlighted_option.onUnhover();
}
dojo.widget.PopupMenu2.superclass.close.apply(this,arguments);
},closeSubpopup:function(_d42){
if(this.currentSubpopup==null){
return;
}
this.currentSubpopup.close(_d42);
this.currentSubpopup=null;
this.currentSubmenuTrigger.is_open=false;
this.currentSubmenuTrigger._closedSubmenu(_d42);
this.currentSubmenuTrigger=null;
},_openSubmenu:function(_d43,_d44){
var _d45=dojo.html.getAbsolutePosition(_d44.domNode,true);
var _d46=dojo.html.getMarginBox(this.domNode).width;
var x=_d45.x+_d46-this.submenuOverlap;
var y=_d45.y;
_d43.open(x,y,this,_d44.domNode);
this.currentSubmenuTrigger=_d44;
this.currentSubmenuTrigger.is_open=true;
},onOpen:function(e){
this.openEvent=e;
if(e["target"]){
this.openedForWindow=dojo.html.getElementWindow(e.target);
}else{
this.openedForWindow=null;
}
var x=e.pageX,y=e.pageY;
var win=dojo.html.getElementWindow(e.target);
var _d4d=win._frameElement||win.frameElement;
if(_d4d){
var cood=dojo.html.abs(_d4d,true);
x+=cood.x-dojo.withGlobal(win,dojo.html.getScroll).left;
y+=cood.y-dojo.withGlobal(win,dojo.html.getScroll).top;
}
this.open(x,y,null,[x,y]);
e.preventDefault();
e.stopPropagation();
}});
dojo.widget.defineWidget("dojo.widget.MenuItem2",dojo.widget.HtmlWidget,function(){
this.eventNames={engage:""};
},{templateString:"<tr class=\"dojoMenuItem2\" dojoAttachEvent=\"onMouseOver: onHover; onMouseOut: onUnhover; onClick: _onClick; onKey:onKey;\">"+"<td><div class=\"${this.iconClass}\" style=\"${this.iconStyle}\"></div></td>"+"<td tabIndex=\"-1\" class=\"dojoMenuItem2Label\">${this.caption}</td>"+"<td class=\"dojoMenuItem2Accel\">${this.accelKey}</td>"+"<td><div class=\"dojoMenuItem2Submenu\" style=\"display:${this.arrowDisplay};\"></div></td>"+"</tr>",is_hovering:false,hover_timer:null,is_open:false,topPosition:0,caption:"Untitled",accelKey:"",iconSrc:"",disabledClass:"dojoMenuItem2Disabled",iconClass:"dojoMenuItem2Icon",submenuId:"",eventNaming:"default",highlightClass:"dojoMenuItem2Hover",postMixInProperties:function(){
this.iconStyle="";
if(this.iconSrc){
if((this.iconSrc.toLowerCase().substring(this.iconSrc.length-4)==".png")&&(dojo.render.html.ie55||dojo.render.html.ie60)){
this.iconStyle="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.iconSrc+"', sizingMethod='image')";
}else{
this.iconStyle="background-image: url("+this.iconSrc+")";
}
}
this.arrowDisplay=this.submenuId?"block":"none";
dojo.widget.MenuItem2.superclass.postMixInProperties.apply(this,arguments);
},fillInTemplate:function(){
dojo.html.disableSelection(this.domNode);
if(this.disabled){
this.setDisabled(true);
}
if(this.eventNaming=="default"){
for(var _d4f in this.eventNames){
this.eventNames[_d4f]=this.widgetId+"/"+_d4f;
}
}
},onHover:function(){
this.onUnhover();
if(this.is_hovering){
return;
}
if(this.is_open){
return;
}
if(this.parent._highlighted_option){
this.parent._highlighted_option.onUnhover();
}
this.parent.closeSubpopup();
this.parent._highlighted_option=this;
dojo.widget.PopupManager.setFocusedMenu(this.parent);
this._highlightItem();
if(this.is_hovering){
this._stopSubmenuTimer();
}
this.is_hovering=true;
this._startSubmenuTimer();
},onUnhover:function(){
if(!this.is_open){
this._unhighlightItem();
}
this.is_hovering=false;
this.parent._highlighted_option=null;
if(this.parent.parentPopup){
dojo.widget.PopupManager.setFocusedMenu(this.parent.parentPopup);
}
this._stopSubmenuTimer();
},_onClick:function(_d50){
var _d51=false;
if(this.disabled){
return false;
}
if(this.submenuId){
if(!this.is_open){
this._stopSubmenuTimer();
this._openSubmenu();
}
_d51=true;
}else{
this.onUnhover();
this.parent.closeAll(true);
}
this.onClick();
dojo.event.topic.publish(this.eventNames.engage,this);
if(_d51&&_d50){
dojo.widget.getWidgetById(this.submenuId)._highlightOption(1);
}
return;
},onClick:function(){
this.parent.onItemClick(this);
},_highlightItem:function(){
dojo.html.addClass(this.domNode,this.highlightClass);
},_unhighlightItem:function(){
dojo.html.removeClass(this.domNode,this.highlightClass);
},_startSubmenuTimer:function(){
this._stopSubmenuTimer();
if(this.disabled){
return;
}
var self=this;
var _d53=function(){
return function(){
self._openSubmenu();
};
}();
this.hover_timer=dojo.lang.setTimeout(_d53,this.parent.submenuDelay);
},_stopSubmenuTimer:function(){
if(this.hover_timer){
dojo.lang.clearTimeout(this.hover_timer);
this.hover_timer=null;
}
},_openSubmenu:function(){
if(this.disabled){
return;
}
this.parent.closeSubpopup();
var _d54=dojo.widget.getWidgetById(this.submenuId);
if(_d54){
this.parent._openSubmenu(_d54,this);
}
},_closedSubmenu:function(){
this.onUnhover();
},setDisabled:function(_d55){
this.disabled=_d55;
if(this.disabled){
dojo.html.addClass(this.domNode,this.disabledClass);
}else{
dojo.html.removeClass(this.domNode,this.disabledClass);
}
},enable:function(){
this.setDisabled(false);
},disable:function(){
this.setDisabled(true);
},menuOpen:function(_d56){
}});
dojo.widget.defineWidget("dojo.widget.MenuSeparator2",dojo.widget.HtmlWidget,{templateString:"<tr class=\"dojoMenuSeparator2\"><td colspan=4>"+"<div class=\"dojoMenuSeparator2Top\"></div>"+"<div class=\"dojoMenuSeparator2Bottom\"></div>"+"</td></tr>",postCreate:function(){
dojo.html.disableSelection(this.domNode);
}});
dojo.widget.defineWidget("dojo.widget.MenuBar2",dojo.widget.PopupMenu2,{menuOverlap:2,templateString:"<div class=\"dojoMenuBar2\" tabIndex=\"0\"><table class=\"dojoMenuBar2Client\"><tr dojoAttachPoint=\"containerNode\"></tr></table></div>",close:function(_d57){
if(this._highlighted_option){
this._highlighted_option.onUnhover();
}
this.closeSubpopup(_d57);
},processKey:function(evt){
if(evt.ctrlKey||evt.altKey){
return false;
}
if(!dojo.html.hasClass(evt.target,"dojoMenuBar2")){
return false;
}
var rval=false;
switch(evt.key){
case evt.KEY_DOWN_ARROW:
rval=this._moveToChildMenu(evt);
break;
case evt.KEY_UP_ARROW:
rval=this._moveToParentMenu(evt);
break;
case evt.KEY_RIGHT_ARROW:
rval=this._moveToNext(evt);
break;
case evt.KEY_LEFT_ARROW:
rval=this._moveToPrevious(evt);
break;
default:
rval=dojo.widget.MenuBar2.superclass.processKey.apply(this,arguments);
break;
}
return rval;
},postCreate:function(){
dojo.widget.MenuBar2.superclass.postCreate.apply(this,arguments);
dojo.widget.PopupManager.opened(this);
this.isShowingNow=true;
},_openSubmenu:function(_d5a,_d5b){
var _d5c=dojo.html.getAbsolutePosition(_d5b.domNode,true);
var _d5d=dojo.html.getAbsolutePosition(this.domNode,true);
var _d5e=dojo.html.getBorderBox(this.domNode).height;
var x=_d5c.x;
var y=_d5d.y+_d5e-this.menuOverlap;
_d5a.open(x,y,this,_d5b.domNode);
this.currentSubmenuTrigger=_d5b;
this.currentSubmenuTrigger.is_open=true;
}});
dojo.widget.defineWidget("dojo.widget.MenuBarItem2",dojo.widget.MenuItem2,{templateString:"<td class=\"dojoMenuBarItem2\" dojoAttachEvent=\"onMouseOver: onHover; onMouseOut: onUnhover; onClick: _onClick;\">"+"<span>${this.caption}</span>"+"</td>",highlightClass:"dojoMenuBarItem2Hover",setDisabled:function(_d61){
this.disabled=_d61;
if(this.disabled){
dojo.html.addClass(this.domNode,"dojoMenuBarItem2Disabled");
}else{
dojo.html.removeClass(this.domNode,"dojoMenuBarItem2Disabled");
}
}});
dojo.widget.Menu2.OperaAndKonqFixer=new function(){
var _d62=true;
var _d63=false;
if(!dojo.lang.isFunction(dojo.doc().oncontextmenu)){
dojo.doc().oncontextmenu=function(){
_d62=false;
_d63=true;
};
}
if(dojo.doc().createEvent){
try{
var e=dojo.doc().createEvent("MouseEvents");
e.initMouseEvent("contextmenu",1,1,dojo.global(),1,0,0,0,0,0,0,0,0,0,null);
dojo.doc().dispatchEvent(e);
}
catch(e){
}
}else{
_d62=false;
}
if(_d63){
delete dojo.doc().oncontextmenu;
}
this.fixNode=function(node){
if(_d62){
if(!dojo.lang.isFunction(node.oncontextmenu)){
node.oncontextmenu=function(e){
};
}
if(dojo.render.html.opera){
node._menufixer_opera=function(e){
if(e.ctrlKey){
this.oncontextmenu(e);
}
};
dojo.event.connect(node,"onclick",node,"_menufixer_opera");
}else{
node._menufixer_konq=function(e){
if(e.button==2){
e.preventDefault();
this.oncontextmenu(e);
}
};
dojo.event.connect(node,"onmousedown",node,"_menufixer_konq");
}
}
};
this.cleanNode=function(node){
if(_d62){
if(node._menufixer_opera){
dojo.event.disconnect(node,"onclick",node,"_menufixer_opera");
delete node._menufixer_opera;
}else{
if(node._menufixer_konq){
dojo.event.disconnect(node,"onmousedown",node,"_menufixer_konq");
delete node._menufixer_konq;
}
}
if(node.oncontextmenu){
delete node.oncontextmenu;
}
}
};
};
if(!this["dojo"]){
alert("\"dojo/__package__.js\" is now located at \"dojo/dojo.js\". Please update your includes accordingly");//ok
}
dojo.provide("dojo.string.Builder");
dojo.string.Builder=function(str){
this.arrConcat=(dojo.render.html.capable&&dojo.render.html["ie"]);
var a=[];
var b="";
var _d6d=this.length=b.length;
if(this.arrConcat){
if(b.length>0){
a.push(b);
}
b="";
}
this.toString=this.valueOf=function(){
return (this.arrConcat)?a.join(""):b;
};
this.append=function(){
for(var x=0;x<arguments.length;x++){
var s=arguments[x];
if(dojo.lang.isArrayLike(s)){
this.append.apply(this,s);
}else{
if(this.arrConcat){
a.push(s);
}else{
b+=s;
}
_d6d+=s.length;
this.length=_d6d;
}
}
return this;
};
this.clear=function(){
a=[];
b="";
_d6d=this.length=0;
return this;
};
this.remove=function(f,l){
var s="";
if(this.arrConcat){
b=a.join("");
}
a=[];
if(f>0){
s=b.substring(0,(f-1));
}
b=s+b.substring(f+l);
_d6d=this.length=b.length;
if(this.arrConcat){
a.push(b);
b="";
}
return this;
};
this.replace=function(o,n){
if(this.arrConcat){
b=a.join("");
}
a=[];
b=b.replace(o,n);
_d6d=this.length=b.length;
if(this.arrConcat){
a.push(b);
b="";
}
return this;
};
this.insert=function(idx,s){
if(this.arrConcat){
b=a.join("");
}
a=[];
if(idx==0){
b=s+b;
}else{
var t=b.split("");
t.splice(idx,0,s);
b=t.join("");
}
_d6d=this.length=b.length;
if(this.arrConcat){
a.push(b);
b="";
}
return this;
};
this.append.apply(this,arguments);
};
dojo.provide("dojo.string.*");
dojo.provide("dojo.widget.ProgressBar");
dojo.widget.defineWidget("dojo.widget.ProgressBar",dojo.widget.HtmlWidget,{progressValue:0,maxProgressValue:100,width:300,height:30,frontPercentClass:"frontPercent",backPercentClass:"backPercent",frontBarClass:"frontBar",backBarClass:"backBar",hasText:false,isVertical:false,showOnlyIntegers:false,dataSource:"",pollInterval:3000,duration:1000,templateString:"<div dojoAttachPoint=\"containerNode\" style=\"position:relative;overflow:hidden\">\n	<div style=\"position:absolute;display:none;width:100%;text-align:center\" dojoAttachPoint=\"backPercentLabel\" class=\"dojoBackPercentLabel\"></div>\n	<div style=\"position:absolute;overflow:hidden;width:100%;height:100%\" dojoAttachPoint=\"internalProgress\">\n	<div style=\"position:absolute;display:none;width:100%;text-align:center\" dojoAttachPoint=\"frontPercentLabel\" class=\"dojoFrontPercentLabel\"></div></div>\n</div>\n",containerNode:null,internalProgress:null,_pixelUnitRatio:0,_pixelPercentRatio:0,_unitPercentRatio:0,_unitPixelRatio:0,_floatDimension:0,_intDimension:0,_progressPercentValue:"0%",_floatMaxProgressValue:0,_dimension:"width",_pixelValue:0,_oInterval:null,_animation:null,_animationStopped:true,_progressValueBak:false,_hasTextBak:false,fillInTemplate:function(args,frag){
this.internalProgress.className=this.frontBarClass;
this.containerNode.className=this.backBarClass;
if(this.isVertical){
this.internalProgress.style.bottom="0px";
this.internalProgress.style.left="0px";
this._dimension="height";
}else{
this.internalProgress.style.top="0px";
this.internalProgress.style.left="0px";
this._dimension="width";
}
this.frontPercentLabel.className=this.frontPercentClass;
this.backPercentLabel.className=this.backPercentClass;
this.progressValue=""+this.progressValue;
this.domNode.style.height=this.height+"px";
this.domNode.style.width=this.width+"px";
this._intDimension=parseInt("0"+eval("this."+this._dimension));
this._floatDimension=parseFloat("0"+eval("this."+this._dimension));
this._pixelPercentRatio=this._floatDimension/100;
this.setMaxProgressValue(this.maxProgressValue,true);
this.setProgressValue(dojo.string.trim(this.progressValue),true);
dojo.debug("float dimension: "+this._floatDimension);
dojo.debug("this._unitPixelRatio: "+this._unitPixelRatio);
this.showText(this.hasText);
},showText:function(_d7a){
if(_d7a){
this.backPercentLabel.style.display="block";
this.frontPercentLabel.style.display="block";
}else{
this.backPercentLabel.style.display="none";
this.frontPercentLabel.style.display="none";
}
this.hasText=_d7a;
},postCreate:function(args,frag){
this.render();
},_backupValues:function(){
this._progressValueBak=this.progressValue;
this._hasTextBak=this.hasText;
},_restoreValues:function(){
this.setProgressValue(this._progressValueBak);
this.showText(this._hasTextBak);
},_setupAnimation:function(){
var _d7d=this;
dojo.debug("internalProgress width: "+this.internalProgress.style.width);
this._animation=dojo.lfx.html.slideTo(this.internalProgress,{top:0,left:parseInt(this.width)-parseInt(this.internalProgress.style.width)},parseInt(this.duration),null,function(){
var _d7e=dojo.lfx.html.slideTo(_d7d.internalProgress,{top:0,left:0},parseInt(_d7d.duration));
dojo.event.connect(_d7e,"onEnd",function(){
if(!_d7d._animationStopped){
_d7d._animation.play();
}
});
if(!_d7d._animationStopped){
_d7e.play();
}
_d7e=null;
});
},getMaxProgressValue:function(){
return this.maxProgressValue;
},setMaxProgressValue:function(_d7f,_d80){
if(!this._animationStopped){
return;
}
this.maxProgressValue=_d7f;
this._floatMaxProgressValue=parseFloat("0"+this.maxProgressValue);
this._pixelUnitRatio=this._floatDimension/this.maxProgressValue;
this._unitPercentRatio=this._floatMaxProgressValue/100;
this._unitPixelRatio=this._floatMaxProgressValue/this._floatDimension;
this.setProgressValue(this.progressValue,true);
if(!_d80){
this.render();
}
},setProgressValue:function(_d81,_d82){
if(!this._animationStopped){
return;
}
this._progressPercentValue="0%";
var _d83=dojo.string.trim(""+_d81);
var _d84=parseFloat("0"+_d83);
var _d85=parseInt("0"+_d83);
var _d86=0;
if(dojo.string.endsWith(_d83,"%",false)){
this._progressPercentValue=Math.min(_d84.toFixed(1),100)+"%";
_d83=Math.min((_d84)*this._unitPercentRatio,this.maxProgressValue);
_d86=Math.min((_d84)*this._pixelPercentRatio,eval("this."+this._dimension));
}else{
this.progressValue=Math.min(_d84,this.maxProgressValue);
this._progressPercentValue=Math.min((_d84/this._unitPercentRatio).toFixed(1),100)+"%";
_d86=Math.min(_d84/this._unitPixelRatio,eval("this."+this._dimension));
}
this.progressValue=dojo.string.trim(_d83);
this._pixelValue=_d86;
if(!_d82){
this.render();
}
},getProgressValue:function(){
return this.progressValue;
},getProgressPercentValue:function(){
return this._progressPercentValue;
},setDataSource:function(_d87){
this.dataSource=_d87;
},setPollInterval:function(_d88){
this.pollInterval=_d88;
},start:function(){
var _d89=dojo.lang.hitch(this,this._showRemoteProgress);
this._oInterval=setInterval(_d89,this.pollInterval);
},startAnimation:function(){
if(this._animationStopped){
this._backupValues();
this.setProgressValue("10%");
this._animationStopped=false;
this._setupAnimation();
this.showText(false);
this.internalProgress.style.height="105%";
this._animation.play();
}
},stopAnimation:function(){
if(this._animation){
this._animationStopped=true;
this._animation.stop();
this.internalProgress.style.height="100%";
this.internalProgress.style.left="0px";
this._restoreValues();
this._setLabelPosition();
}
},_showRemoteProgress:function(){
var _d8a=this;
if((this.getMaxProgressValue()==this.getProgressValue())&&this._oInterval){
clearInterval(this._oInterval);
this._oInterval=null;
this.setProgressValue("100%");
return;
}
var _d8b={url:_d8a.dataSource,method:"POST",mimetype:"text/json",error:function(type,_d8d){
dojo.debug("[ProgressBar] showRemoteProgress error");
},load:function(type,data,evt){
_d8a.setProgressValue((_d8a._oInterval?data["progress"]:"100%"));
}};
dojo.io.bind(_d8b);
},render:function(){
this._setPercentLabel(dojo.string.trim(this._progressPercentValue));
this._setPixelValue(this._pixelValue);
this._setLabelPosition();
},_setLabelPosition:function(){
var _d91=dojo.html.getContentBox(this.frontPercentLabel).width;
var _d92=dojo.html.getContentBox(this.frontPercentLabel).height;
var _d93=dojo.html.getContentBox(this.backPercentLabel).width;
var _d94=dojo.html.getContentBox(this.backPercentLabel).height;
var _d95=(parseInt(this.width)-_d91)/2+"px";
var _d96=(parseInt(this.height)-parseInt(_d92))/2+"px";
var _d97=(parseInt(this.width)-_d93)/2+"px";
var _d98=(parseInt(this.height)-parseInt(_d94))/2+"px";
this.frontPercentLabel.style.left=_d95;
this.backPercentLabel.style.left=_d97;
this.frontPercentLabel.style.bottom=_d96;
this.backPercentLabel.style.bottom=_d98;
},_setPercentLabel:function(_d99){
dojo.dom.removeChildren(this.frontPercentLabel);
dojo.dom.removeChildren(this.backPercentLabel);
var _d9a=this.showOnlyIntegers==false?_d99:parseInt(_d99)+"%";
this.frontPercentLabel.appendChild(document.createTextNode(_d9a));
this.backPercentLabel.appendChild(document.createTextNode(_d9a));
},_setPixelValue:function(_d9b){
eval("this.internalProgress.style."+this._dimension+" = "+_d9b+" + 'px'");
this.onChange();
},onChange:function(){
}});
dojo.provide("dojo.widget.Slider");
dojo.widget.defineWidget("dojo.widget.Slider",dojo.widget.HtmlWidget,{minimumX:0,minimumY:0,maximumX:10,maximumY:10,snapValuesX:0,snapValuesY:0,_snapToGrid:true,isEnableX:true,isEnableY:true,_valueSizeX:0,_valueSizeY:0,_minX:0,_minY:0,_constraintWidth:0,_constraintHeight:0,_clipLeft:0,_clipRight:0,_clipTop:0,_clipBottom:0,_clipXdelta:0,_clipYdelta:0,initialValueX:0,initialValueY:0,flipX:false,flipY:false,clickSelect:true,activeDrag:false,templateString:"<table _=\"weird end tag formatting is to prevent whitespace from becoming &nbsp;\" \n	class=\"sliderMain\" \n	dojoAttachPoint=\"focusNode\" \n	dojoAttachEvent=\"onmousedown:_setFocus; onkey:_handleKeyEvents; onkeyup:_buttonReleased; onmouseup:_buttonReleased; onmousewheel:_mouseWheeled;\"\n	tabindex=\"0\" cols=3 cellpadding=0 cellspacing=0 style=\"\">\n	<tr valign=middle align=center>\n		<td class=\"sliderComponent\" colspan=3 dojoAttachPoint=topBorderNode style=\"\"\n			><img class=\"sliderOutsetButton sliderButtonY\"\n				dojoAttachPoint=topButtonNode \n				dojoAttachEvent=\"onmousedown:_topButtonPressed; onmousemove:_discardEvent; ondblclick:_topButtonDoubleClicked;\"\n				src=\"${this.topButtonSrc}\" \n				style=\"${this.buttonStyleY}\"\n		></td>\n	</tr>\n	<tr valign=middle align=center>\n		<td class=\"sliderComponent\" dojoAttachPoint=leftBorderNode style=\"\"\n			><img class=\"sliderOutsetButton sliderButtonX\"\n				dojoAttachPoint=leftButtonNode\n				dojoAttachEvent=\"onmousedown:_leftButtonPressed; onmousemove:_discardEvent; ondblclick:_leftButtonDoubleClicked;\"\n				src=\"${this.leftButtonSrc}\" \n				style=\"${this.buttonStyleX}\"\n		></td>\n		<td dojoAttachPoint=constrainingContainerNode \n			class=\"sliderComponent sliderBackground\"\n			style=\"${this.backgroundStyle}\"\n			><img src=\"${this.handleSrc}\" \n				class=sliderHandle\n				dojoAttachPoint=sliderHandleNode\n				style=\"${this.handleStyle}\"\n			><img src=\"${this.progressBackgroundSrc}\"\n				class=\"sliderBackgroundSizeOnly sliderProgressBackground\"\n				dojoAttachPoint=progressBackgroundNode\n				style=\"${this.backgroundSize}\"\n			><img src=\"${this.backgroundSrc}\" \n				class=sliderBackgroundSizeOnly\n				dojoAttachPoint=sliderBackgroundNode\n				style=\"${this.backgroundSize}\"\n		></td>\n		<td class=\"sliderComponent\" dojoAttachPoint=rightBorderNode style=\"\"\n			><img class=\"sliderOutsetButton sliderButtonX\"\n				dojoAttachPoint=rightButtonNode\n				dojoAttachEvent=\"onmousedown:_rightButtonPressed; onmousemove:_discardEvent; ondblclick:_rightButtonDoubleClicked;\"\n				src=\"${this.rightButtonSrc}\" \n				style=\"${this.buttonStyleX}\"\n		></td>\n	</tr>\n	<tr valign=middle align=center>\n		<td class=\"sliderComponent\" colspan=3 dojoAttachPoint=bottomBorderNode style=\"\"\n			><img class=\"sliderOutsetButton sliderButtonY\"\n				dojoAttachPoint=bottomButtonNode \n				dojoAttachEvent=\"onmousedown:_bottomButtonPressed; onmousemove:_discardEvent; ondblclick:_bottomButtonDoubleClicked;\"\n				src=\"${this.bottomButtonSrc}\" \n				style=\"${this.buttonStyleY}\"\n		></td>\n	</tr>\n</table>\n",_isDragInProgress:false,bottomButtonSrc:dojo.uri.dojoUri("src/widget/templates/images/slider_down_arrow.png"),topButtonSrc:dojo.uri.dojoUri("src/widget/templates/images/slider_up_arrow.png"),leftButtonSrc:dojo.uri.dojoUri("src/widget/templates/images/slider_left_arrow.png"),rightButtonSrc:dojo.uri.dojoUri("src/widget/templates/images/slider_right_arrow.png"),backgroundSrc:dojo.uri.dojoUri("src/widget/templates/images/blank.gif"),progressBackgroundSrc:dojo.uri.dojoUri("src/widget/templates/images/blank.gif"),backgroundSize:"width:200px;height:200px;",backgroundStyle:"",buttonStyleX:"",buttonStyleY:"",handleStyle:"",handleSrc:dojo.uri.dojoUri("src/widget/templates/images/slider-button.png"),showButtons:true,_eventCount:0,_typamaticTimer:null,_typamaticFunction:null,defaultTimeout:500,timeoutChangeRate:0.9,_currentTimeout:this.defaultTimeout,_handleKeyEvents:function(evt){
if(!evt.key){
return;
}
if(!evt.ctrlKey&&!evt.altKey){
switch(evt.key){
case evt.KEY_LEFT_ARROW:
dojo.event.browser.stopEvent(evt);
this._leftButtonPressed(evt);
return;
case evt.KEY_RIGHT_ARROW:
dojo.event.browser.stopEvent(evt);
this._rightButtonPressed(evt);
return;
case evt.KEY_DOWN_ARROW:
dojo.event.browser.stopEvent(evt);
this._bottomButtonPressed(evt);
return;
case evt.KEY_UP_ARROW:
dojo.event.browser.stopEvent(evt);
this._topButtonPressed(evt);
return;
}
}
this._eventCount++;
},_pressButton:function(_d9d){
_d9d.className=_d9d.className.replace("Outset","Inset");
},_releaseButton:function(_d9e){
_d9e.className=_d9e.className.replace("Inset","Outset");
},_buttonPressed:function(evt,_da0){
this._setFocus();
if(typeof evt=="object"){
if(this._typamaticTimer!=null){
if(this._typamaticNode==_da0){
return;
}
clearTimeout(this._typamaticTimer);
}
this._buttonReleased(null);
this._eventCount++;
this._typamaticTimer=null;
this._currentTimeout=this.defaultTimeout;
dojo.event.browser.stopEvent(evt);
}else{
if(evt!=this._eventCount){
this._buttonReleased(null);
return false;
}
}
if(_da0==this.leftButtonNode&&this.isEnableX){
this._snapX(dojo.html.getPixelValue(this.sliderHandleNode,"left")-this._valueSizeX);
}else{
if(_da0==this.rightButtonNode&&this.isEnableX){
this._snapX(dojo.html.getPixelValue(this.sliderHandleNode,"left")+this._valueSizeX);
}else{
if(_da0==this.topButtonNode&&this.isEnableY){
this._snapY(dojo.html.getPixelValue(this.sliderHandleNode,"top")-this._valueSizeY);
}else{
if(_da0==this.bottomButtonNode&&this.isEnableY){
this._snapY(dojo.html.getPixelValue(this.sliderHandleNode,"top")+this._valueSizeY);
}else{
return false;
}
}
}
}
this._pressButton(_da0);
this.notifyListeners();
this._typamaticNode=_da0;
this._typamaticTimer=dojo.lang.setTimeout(this,"_buttonPressed",this._currentTimeout,this._eventCount,_da0);
this._currentTimeout=Math.round(this._currentTimeout*this.timeoutChangeRate);
return false;
},_bottomButtonPressed:function(evt){
return this._buttonPressed(evt,this.bottomButtonNode);
},_bottomButtonDoubleClicked:function(evt){
var rc=this._bottomButtonPressed(evt);
dojo.lang.setTimeout(this,"_buttonReleased",50,null);
return rc;
},_topButtonPressed:function(evt){
return this._buttonPressed(evt,this.topButtonNode);
},_topButtonDoubleClicked:function(evt){
var rc=this._topButtonPressed(evt);
dojo.lang.setTimeout(this,"_buttonReleased",50,null);
return rc;
},_leftButtonPressed:function(evt){
return this._buttonPressed(evt,this.leftButtonNode);
},_leftButtonDoubleClicked:function(evt){
var rc=this._leftButtonPressed(evt);
dojo.lang.setTimeout(this,"_buttonReleased",50,null);
return rc;
},_rightButtonPressed:function(evt){
return this._buttonPressed(evt,this.rightButtonNode);
},_rightButtonDoubleClicked:function(evt){
var rc=this._rightButtonPressed(evt);
dojo.lang.setTimeout(this,"_buttonReleased",50,null);
return rc;
},_buttonReleased:function(evt){
if(typeof evt=="object"&&evt!=null&&typeof evt.keyCode!="undefined"&&evt.keyCode!=null){
var _dae=evt.keyCode;
switch(_dae){
case evt.KEY_LEFT_ARROW:
case evt.KEY_RIGHT_ARROW:
case evt.KEY_DOWN_ARROW:
case evt.KEY_UP_ARROW:
dojo.event.browser.stopEvent(evt);
break;
}
}
this._releaseButton(this.topButtonNode);
this._releaseButton(this.bottomButtonNode);
this._releaseButton(this.leftButtonNode);
this._releaseButton(this.rightButtonNode);
this._eventCount++;
if(this._typamaticTimer!=null){
clearTimeout(this._typamaticTimer);
}
this._typamaticTimer=null;
this._currentTimeout=this.defaultTimeout;
},_mouseWheeled:function(evt){
var _db0=0;
if(typeof evt.wheelDelta=="number"){
_db0=evt.wheelDelta;
}else{
if(typeof evt.detail=="number"){
_db0=-evt.detail;
}
}
if(this.isEnableY){
if(_db0>0){
this._topButtonPressed(evt);
this._buttonReleased(evt);
}else{
if(_db0<0){
this._bottomButtonPressed(evt);
this._buttonReleased(evt);
}
}
}else{
if(this.isEnableX){
if(_db0>0){
this._rightButtonPressed(evt);
this._buttonReleased(evt);
}else{
if(_db0<0){
this._leftButtonPressed(evt);
this._buttonReleased(evt);
}
}
}
}
},_discardEvent:function(evt){
dojo.event.browser.stopEvent(evt);
},_setFocus:function(){
if(this.focusNode.focus){
this.focusNode.focus();
}
},fillInTemplate:function(args,frag){
var _db4=this.getFragNodeRef(frag);
dojo.html.copyStyle(this.domNode,_db4);
var _db5=this.domNode.style.padding;
if(dojo.lang.isString(_db5)&&_db5!=""&&_db5!="0px"&&_db5!="0px 0px 0px 0px"){
this.topBorderNode.style.padding=this.bottomBorderNode.style.padding=_db5;
this.topBorderNode.style.paddingBottom="0px";
this.bottomBorderNode.style.paddingTop="0px";
this.rightBorderNode.style.paddingRight=this.domNode.style.paddingRight;
this.leftBorderNode.style.paddingLeft=this.domNode.style.paddingLeft;
this.domNode.style.padding="0px 0px 0px 0px";
}
var _db6=this.domNode.style.borderWidth;
if(dojo.lang.isString(_db6)&&_db6!=""&&_db6!="0px"&&_db6!="0px 0px 0px 0px"){
this.topBorderNode.style.borderStyle=this.rightBorderNode.style.borderStyle=this.bottomBorderNode.style.borderStyle=this.leftBorderNode.style.borderStyle=this.domNode.style.borderStyle;
this.topBorderNode.style.borderColor=this.rightBorderNode.style.borderColor=this.bottomBorderNode.style.borderColor=this.leftBorderNode.style.borderColor=this.domNode.style.borderColor;
this.topBorderNode.style.borderWidth=this.bottomBorderNode.style.borderWidth=_db6;
this.topBorderNode.style.borderBottomWidth="0px";
this.bottomBorderNode.style.borderTopWidth="0px";
this.rightBorderNode.style.borderRightWidth=this.domNode.style.borderRightWidth;
this.leftBorderNode.style.borderLeftWidth=this.domNode.style.borderLeftWidth;
this.domNode.style.borderWidth="0px 0px 0px 0px";
}
this._handleMove=new dojo.widget._SliderDragMoveSource(this.sliderHandleNode);
this._handleMove.setParent(this);
if(this.clickSelect){
dojo.event.connect(this.constrainingContainerNode,"onmousedown",this,"_onClick");
}
if(this.isEnableX){
this.setValueX(!isNaN(this.initialValueX)?this.initialValueX:(!isNaN(this.minimumX)?this.minimumX:0));
}
if(!this.isEnableX||!this.showButtons){
this.rightButtonNode.style.width="1px";
this.rightButtonNode.style.visibility="hidden";
this.leftButtonNode.style.width="1px";
this.leftButtonNode.style.visibility="hidden";
}
if(this.isEnableY){
this.setValueY(!isNaN(this.initialValueY)?this.initialValueY:(!isNaN(this.minimumY)?this.minimumY:0));
}
if(!this.isEnableY||!this.showButtons){
this.bottomButtonNode.style.width="1px";
this.bottomButtonNode.style.visibility="hidden";
this.topButtonNode.style.width="1px";
this.topButtonNode.style.visibility="hidden";
}
if(this.focusNode.addEventListener){
this.focusNode.addEventListener("DOMMouseScroll",dojo.lang.hitch(this,"_mouseWheeled"),false);
}
},_snapX:function(x){
if(x<0){
x=0;
}else{
if(x>this._constraintWidth){
x=this._constraintWidth;
}else{
var _db8=Math.round(x/this._valueSizeX);
x=Math.round(_db8*this._valueSizeX);
}
}
this.sliderHandleNode.style.left=x+"px";
if(this.flipX){
this._clipLeft=x+this._clipXdelta;
}else{
this._clipRight=x+this._clipXdelta;
}
this.progressBackgroundNode.style.clip="rect("+this._clipTop+"px,"+this._clipRight+"px,"+this._clipBottom+"px,"+this._clipLeft+"px)";
},_calc_valueSizeX:function(){
var _db9=dojo.html.getContentBox(this.constrainingContainerNode);
var _dba=dojo.html.getContentBox(this.sliderHandleNode);
if(isNaN(_db9.width)||isNaN(_dba.width)||_db9.width<=0||_dba.width<=0){
return false;
}
this._constraintWidth=_db9.width+dojo.html.getPadding(this.constrainingContainerNode).width-_dba.width;
if(this.flipX){
this._clipLeft=this._clipRight=_db9.width;
}else{
this._clipLeft=this._clipRight=0;
}
this._clipXdelta=_dba.width>>1;
if(!this.isEnableY){
this._clipTop=0;
this._clipBottom=_db9.height;
}
if(this._constraintWidth<=0){
return false;
}
if(this.snapValuesX==0){
this.snapValuesX=this._constraintWidth+1;
}
this._valueSizeX=this._constraintWidth/(this.snapValuesX-1);
return true;
},setValueX:function(_dbb){
if(0==this._valueSizeX){
if(this._calc_valueSizeX()==false){
dojo.lang.setTimeout(this,"setValueX",100,_dbb);
return;
}
}
if(isNaN(_dbb)){
_dbb=0;
}
if(_dbb>this.maximumX){
_dbb=this.maximumX;
}else{
if(_dbb<this.minimumX){
_dbb=this.minimumX;
}
}
var _dbc=(_dbb-this.minimumX)/(this.maximumX-this.minimumX);
if(this.flipX){
_dbc=1-_dbc;
}
this._snapX(_dbc*this._constraintWidth);
this.notifyListeners();
},getValueX:function(){
var _dbd=dojo.html.getPixelValue(this.sliderHandleNode,"left")/this._constraintWidth;
if(this.flipX){
_dbd=1-_dbd;
}
return Math.round(_dbd*(this.snapValuesX-1))*((this.maximumX-this.minimumX)/(this.snapValuesX-1))+this.minimumX;
},_snapY:function(y){
if(y<0){
y=0;
}else{
if(y>this._constraintHeight){
y=this._constraintHeight;
}else{
var _dbf=Math.round(y/this._valueSizeY);
y=Math.round(_dbf*this._valueSizeY);
}
}
this.sliderHandleNode.style.top=y+"px";
if(this.flipY){
this._clipTop=y+this._clipYdelta;
}else{
this._clipBottom=y+this._clipYdelta;
}
this.progressBackgroundNode.style.clip="rect("+this._clipTop+"px,"+this._clipRight+"px,"+this._clipBottom+"px,"+this._clipLeft+"px)";
},_calc_valueSizeY:function(){
var _dc0=dojo.html.getContentBox(this.constrainingContainerNode);
var _dc1=dojo.html.getContentBox(this.sliderHandleNode);
if(isNaN(_dc0.height)||isNaN(_dc1.height)||_dc0.height<=0||_dc1.height<=0){
return false;
}
this._constraintHeight=_dc0.height+dojo.html.getPadding(this.constrainingContainerNode).height-_dc1.height;
if(this.flipY){
this._clipTop=this._clipBottom=_dc0.height;
}else{
this._clipTop=this._clipBottom=0;
}
this._clipYdelta=_dc1.height>>1;
if(!this.isEnableX){
this._clipLeft=0;
this._clipRight=_dc0.width;
}
if(this._constraintHeight<=0){
return false;
}
if(this.snapValuesY==0){
this.snapValuesY=this._constraintHeight+1;
}
this._valueSizeY=this._constraintHeight/(this.snapValuesY-1);
return true;
},setValueY:function(_dc2){
if(0==this._valueSizeY){
if(this._calc_valueSizeY()==false){
dojo.lang.setTimeout(this,"setValueY",100,_dc2);
return;
}
}
if(isNaN(_dc2)){
_dc2=0;
}
if(_dc2>this.maximumY){
_dc2=this.maximumY;
}else{
if(_dc2<this.minimumY){
_dc2=this.minimumY;
}
}
var _dc3=(_dc2-this.minimumY)/(this.maximumY-this.minimumY);
if(this.flipY){
_dc3=1-_dc3;
}
this._snapY(_dc3*this._constraintHeight);
this.notifyListeners();
},getValueY:function(){
var _dc4=dojo.html.getPixelValue(this.sliderHandleNode,"top")/this._constraintHeight;
if(this.flipY){
_dc4=1-_dc4;
}
return Math.round(_dc4*(this.snapValuesY-1))*((this.maximumY-this.minimumY)/(this.snapValuesY-1))+this.minimumY;
},_onClick:function(evt){
if(this._isDragInProgress){
return;
}
var _dc6=dojo.html.getAbsolutePosition(this.constrainingContainerNode,true,dojo.html.boxSizing.MARGIN_BOX);
var _dc7=dojo.html.getContentBox(this._handleMove.domNode);
if(this.isEnableX){
var x=evt.pageX-_dc6.x-(_dc7.width>>1);
this._snapX(x);
}
if(this.isEnableY){
var y=evt.pageY-_dc6.y-(_dc7.height>>1);
this._snapY(y);
}
this.notifyListeners();
},notifyListeners:function(){
this.onValueChanged(this.getValueX(),this.getValueY());
},onValueChanged:function(x,y){
}});
dojo.widget.defineWidget("dojo.widget.SliderHorizontal",dojo.widget.Slider,{isEnableX:true,isEnableY:false,initialValue:"",snapValues:"",minimum:"",maximum:"",buttonStyle:"",backgroundSize:"height:10px;width:200px;",backgroundSrc:dojo.uri.dojoUri("src/widget/templates/images/slider-bg.gif"),flip:false,postMixInProperties:function(){
dojo.widget.SliderHorizontal.superclass.postMixInProperties.apply(this,arguments);
if(!isNaN(parseFloat(this.initialValue))){
this.initialValueX=parseFloat(this.initialValue);
}
if(!isNaN(parseFloat(this.minimum))){
this.minimumX=parseFloat(this.minimum);
}
if(!isNaN(parseFloat(this.maximum))){
this.maximumX=parseFloat(this.maximum);
}
if(!isNaN(parseInt(this.snapValues))){
this.snapValuesX=parseInt(this.snapValues);
}
if(dojo.lang.isString(this.buttonStyle)&&this.buttonStyle!=""){
this.buttonStyleX=this.buttonStyle;
}
if(dojo.lang.isBoolean(this.flip)){
this.flipX=this.flip;
}
},notifyListeners:function(){
this.onValueChanged(this.getValueX());
},getValue:function(){
return this.getValueX();
},setValue:function(_dcc){
this.setValueX(_dcc);
},onValueChanged:function(_dcd){
}});
dojo.widget.defineWidget("dojo.widget.SliderVertical",dojo.widget.Slider,{isEnableX:false,isEnableY:true,initialValue:"",snapValues:"",minimum:"",maximum:"",buttonStyle:"",backgroundSize:"width:10px;height:200px;",backgroundSrc:dojo.uri.dojoUri("src/widget/templates/images/slider-bg-vert.gif"),flip:false,postMixInProperties:function(){
dojo.widget.SliderVertical.superclass.postMixInProperties.apply(this,arguments);
if(!isNaN(parseFloat(this.initialValue))){
this.initialValueY=parseFloat(this.initialValue);
}
if(!isNaN(parseFloat(this.minimum))){
this.minimumY=parseFloat(this.minimum);
}
if(!isNaN(parseFloat(this.maximum))){
this.maximumY=parseFloat(this.maximum);
}
if(!isNaN(parseInt(this.snapValues))){
this.snapValuesY=parseInt(this.snapValues);
}
if(dojo.lang.isString(this.buttonStyle)&&this.buttonStyle!=""){
this.buttonStyleY=this.buttonStyle;
}
if(dojo.lang.isBoolean(this.flip)){
this.flipY=this.flip;
}
},notifyListeners:function(){
this.onValueChanged(this.getValueY());
},getValue:function(){
return this.getValueY();
},setValue:function(_dce){
this.setValueY(_dce);
},onValueChanged:function(_dcf){
}});
dojo.declare("dojo.widget._SliderDragMoveSource",dojo.dnd.HtmlDragMoveSource,{slider:null,onDragStart:function(evt){
this.slider._isDragInProgress=true;
var _dd1=this.createDragMoveObject();
this.slider.notifyListeners();
return _dd1;
},onDragEnd:function(evt){
this.slider._isDragInProgress=false;
this.slider.notifyListeners();
},createDragMoveObject:function(){
var _dd3=new dojo.widget._SliderDragMoveObject(this.dragObject,this.type);
_dd3.slider=this.slider;
if(this.dragClass){
_dd3.dragClass=this.dragClass;
}
return _dd3;
},setParent:function(_dd4){
this.slider=_dd4;
}});
dojo.declare("dojo.widget._SliderDragMoveObject",dojo.dnd.HtmlDragMoveObject,{slider:null,onDragMove:function(evt){
this.updateDragOffset();
if(this.slider.isEnableX){
var x=this.dragOffset.x+evt.pageX;
this.slider._snapX(x);
}
if(this.slider.isEnableY){
var y=this.dragOffset.y+evt.pageY;
this.slider._snapY(y);
}
if(this.slider.activeDrag){
this.slider.notifyListeners();
}
}});
dojo.provide("dojo.widget.SplitContainer");
dojo.widget.defineWidget("dojo.widget.SplitContainer",dojo.widget.HtmlWidget,function(){
this.sizers=[];
},{isContainer:true,activeSizing:false,sizerWidth:15,orientation:"horizontal",persist:true,postMixInProperties:function(){
dojo.widget.SplitContainer.superclass.postMixInProperties.apply(this,arguments);
this.isHorizontal=(this.orientation=="horizontal");
},fillInTemplate:function(){
dojo.widget.SplitContainer.superclass.fillInTemplate.apply(this,arguments);
dojo.html.addClass(this.domNode,"dojoSplitContainer");
if(dojo.render.html.moz){
this.domNode.style.overflow="-moz-scrollbars-none";
}
var _dd8=dojo.html.getContentBox(this.domNode);
this.paneWidth=_dd8.width;
this.paneHeight=_dd8.height;
},onResized:function(e){
var _dda=dojo.html.getContentBox(this.domNode);
this.paneWidth=_dda.width;
this.paneHeight=_dda.height;
this._layoutPanels();
},postCreate:function(args,_ddc,_ddd){
dojo.widget.SplitContainer.superclass.postCreate.apply(this,arguments);
for(var i=0;i<this.children.length;i++){
with(this.children[i].domNode.style){
position="absolute";
}
dojo.html.addClass(this.children[i].domNode,"dojoSplitPane");
if(i==this.children.length-1){
break;
}
this._addSizer();
}
if(typeof this.sizerWidth=="object"){
try{
this.sizerWidth=parseInt(this.sizerWidth.toString());
}
catch(e){
this.sizerWidth=15;
}
}
this.virtualSizer=document.createElement("div");
this.virtualSizer.style.position="absolute";
this.virtualSizer.style.display="none";
this.virtualSizer.style.zIndex=10;
this.virtualSizer.className=this.isHorizontal?"dojoSplitContainerVirtualSizerH":"dojoSplitContainerVirtualSizerV";
this.domNode.appendChild(this.virtualSizer);
dojo.html.disableSelection(this.virtualSizer);
if(this.persist){
this._restoreState();
}
this.resizeSoon();
},_injectChild:function(_ddf){
with(_ddf.domNode.style){
position="absolute";
}
dojo.html.addClass(_ddf.domNode,"dojoSplitPane");
},_addSizer:function(){
var i=this.sizers.length;
this.sizers[i]=document.createElement("div");
this.sizers[i].style.position="absolute";
this.sizers[i].className=this.isHorizontal?"dojoSplitContainerSizerH":"dojoSplitContainerSizerV";
var self=this;
var _de2=(function(){
var _de3=i;
return function(e){
self.beginSizing(e,_de3);
};
})();
dojo.event.connect(this.sizers[i],"onmousedown",_de2);
this.domNode.appendChild(this.sizers[i]);
dojo.html.disableSelection(this.sizers[i]);
},removeChild:function(_de5){
if(this.sizers.length>0){
for(var x=0;x<this.children.length;x++){
if(this.children[x]===_de5){
var i=this.sizers.length-1;
this.domNode.removeChild(this.sizers[i]);
this.sizers.length=i;
break;
}
}
}
dojo.widget.SplitContainer.superclass.removeChild.call(this,_de5,arguments);
this.onResized();
},addChild:function(_de8){
dojo.widget.SplitContainer.superclass.addChild.apply(this,arguments);
this._injectChild(_de8);
if(this.children.length>1){
this._addSizer();
}
this._layoutPanels();
},_layoutPanels:function(){
if(this.children.length==0){
return;
}
var _de9=this.isHorizontal?this.paneWidth:this.paneHeight;
if(this.children.length>1){
_de9-=this.sizerWidth*(this.children.length-1);
}
var _dea=0;
for(var i=0;i<this.children.length;i++){
_dea+=this.children[i].sizeShare;
}
var _dec=_de9/_dea;
var _ded=0;
for(var i=0;i<this.children.length-1;i++){
var size=Math.round(_dec*this.children[i].sizeShare);
this.children[i].sizeActual=size;
_ded+=size;
}
this.children[this.children.length-1].sizeActual=_de9-_ded;
this._checkSizes();
var pos=0;
var size=this.children[0].sizeActual;
this._movePanel(this.children[0],pos,size);
this.children[0].position=pos;
pos+=size;
for(var i=1;i<this.children.length;i++){
this._moveSlider(this.sizers[i-1],pos,this.sizerWidth);
this.sizers[i-1].position=pos;
pos+=this.sizerWidth;
size=this.children[i].sizeActual;
this._movePanel(this.children[i],pos,size);
this.children[i].position=pos;
pos+=size;
}
},_movePanel:function(_df0,pos,size){
if(this.isHorizontal){
_df0.domNode.style.left=pos+"px";
_df0.domNode.style.top=0;
_df0.resizeTo(size,this.paneHeight);
}else{
_df0.domNode.style.left=0;
_df0.domNode.style.top=pos+"px";
_df0.resizeTo(this.paneWidth,size);
}
},_moveSlider:function(_df3,pos,size){
if(this.isHorizontal){
_df3.style.left=pos+"px";
_df3.style.top=0;
dojo.html.setMarginBox(_df3,{width:size,height:this.paneHeight});
}else{
_df3.style.left=0;
_df3.style.top=pos+"px";
dojo.html.setMarginBox(_df3,{width:this.paneWidth,height:size});
}
},_growPane:function(_df6,pane){
if(_df6>0){
if(pane.sizeActual>pane.sizeMin){
if((pane.sizeActual-pane.sizeMin)>_df6){
pane.sizeActual=pane.sizeActual-_df6;
_df6=0;
}else{
_df6-=pane.sizeActual-pane.sizeMin;
pane.sizeActual=pane.sizeMin;
}
}
}
return _df6;
},_checkSizes:function(){
var _df8=0;
var _df9=0;
for(var i=0;i<this.children.length;i++){
_df9+=this.children[i].sizeActual;
_df8+=this.children[i].sizeMin;
}
if(_df8<=_df9){
var _dfb=0;
for(var i=0;i<this.children.length;i++){
if(this.children[i].sizeActual<this.children[i].sizeMin){
_dfb+=this.children[i].sizeMin-this.children[i].sizeActual;
this.children[i].sizeActual=this.children[i].sizeMin;
}
}
if(_dfb>0){
if(this.isDraggingLeft){
for(var i=this.children.length-1;i>=0;i--){
_dfb=this._growPane(_dfb,this.children[i]);
}
}else{
for(var i=0;i<this.children.length;i++){
_dfb=this._growPane(_dfb,this.children[i]);
}
}
}
}else{
for(var i=0;i<this.children.length;i++){
this.children[i].sizeActual=Math.round(_df9*(this.children[i].sizeMin/_df8));
}
}
},beginSizing:function(e,i){
this.paneBefore=this.children[i];
this.paneAfter=this.children[i+1];
this.isSizing=true;
this.sizingSplitter=this.sizers[i];
this.originPos=dojo.html.getAbsolutePosition(this.children[0].domNode,true,dojo.html.boxSizing.MARGIN_BOX);
if(this.isHorizontal){
var _dfe=(e.layerX?e.layerX:e.offsetX);
var _dff=e.pageX;
this.originPos=this.originPos.x;
}else{
var _dfe=(e.layerY?e.layerY:e.offsetY);
var _dff=e.pageY;
this.originPos=this.originPos.y;
}
this.startPoint=this.lastPoint=_dff;
this.screenToClientOffset=_dff-_dfe;
this.dragOffset=this.lastPoint-this.paneBefore.sizeActual-this.originPos-this.paneBefore.position;
if(!this.activeSizing){
this._showSizingLine();
}
dojo.event.connect(document.documentElement,"onmousemove",this,"changeSizing");
dojo.event.connect(document.documentElement,"onmouseup",this,"endSizing");
dojo.event.browser.stopEvent(e);
},changeSizing:function(e){
this.lastPoint=this.isHorizontal?e.pageX:e.pageY;
if(this.activeSizing){
this.movePoint();
this._updateSize();
}else{
this.movePoint();
this._moveSizingLine();
}
dojo.event.browser.stopEvent(e);
},endSizing:function(e){
if(!this.activeSizing){
this._hideSizingLine();
}
this._updateSize();
this.isSizing=false;
dojo.event.disconnect(document.documentElement,"onmousemove",this,"changeSizing");
dojo.event.disconnect(document.documentElement,"onmouseup",this,"endSizing");
if(this.persist){
this._saveState(this);
}
},movePoint:function(){
var p=this.lastPoint-this.screenToClientOffset;
var a=p-this.dragOffset;
a=this.legaliseSplitPoint(a);
p=a+this.dragOffset;
this.lastPoint=p+this.screenToClientOffset;
},legaliseSplitPoint:function(a){
a+=this.sizingSplitter.position;
this.isDraggingLeft=(a>0)?true:false;
if(!this.activeSizing){
if(a<this.paneBefore.position+this.paneBefore.sizeMin){
a=this.paneBefore.position+this.paneBefore.sizeMin;
}
if(a>this.paneAfter.position+(this.paneAfter.sizeActual-(this.sizerWidth+this.paneAfter.sizeMin))){
a=this.paneAfter.position+(this.paneAfter.sizeActual-(this.sizerWidth+this.paneAfter.sizeMin));
}
}
a-=this.sizingSplitter.position;
this._checkSizes();
return a;
},_updateSize:function(){
var pos=this.lastPoint-this.dragOffset-this.originPos;
var _e06=this.paneBefore.position;
var _e07=this.paneAfter.position+this.paneAfter.sizeActual;
this.paneBefore.sizeActual=pos-_e06;
this.paneAfter.position=pos+this.sizerWidth;
this.paneAfter.sizeActual=_e07-this.paneAfter.position;
for(var i=0;i<this.children.length;i++){
this.children[i].sizeShare=this.children[i].sizeActual;
}
this._layoutPanels();
},_showSizingLine:function(){
this._moveSizingLine();
if(this.isHorizontal){
dojo.html.setMarginBox(this.virtualSizer,{width:this.sizerWidth,height:this.paneHeight});
}else{
dojo.html.setMarginBox(this.virtualSizer,{width:this.paneWidth,height:this.sizerWidth});
}
this.virtualSizer.style.display="block";
},_hideSizingLine:function(){
this.virtualSizer.style.display="none";
},_moveSizingLine:function(){
var pos=this.lastPoint-this.startPoint+this.sizingSplitter.position;
if(this.isHorizontal){
this.virtualSizer.style.left=pos+"px";
}else{
var pos=(this.lastPoint-this.startPoint)+this.sizingSplitter.position;
this.virtualSizer.style.top=pos+"px";
}
},_getCookieName:function(i){
return this.widgetId+"_"+i;
},_restoreState:function(){
for(var i=0;i<this.children.length;i++){
var _e0c=this._getCookieName(i);
var _e0d=dojo.io.cookie.getCookie(_e0c);
if(_e0d!=null){
var pos=parseInt(_e0d);
if(typeof pos=="number"){
this.children[i].sizeShare=pos;
}
}
}
},_saveState:function(){
for(var i=0;i<this.children.length;i++){
var _e10=this._getCookieName(i);
dojo.io.cookie.setCookie(_e10,this.children[i].sizeShare,null,null,null,null);
}
}});
dojo.lang.extend(dojo.widget.Widget,{sizeMin:10,sizeShare:10});
dojo.widget.defineWidget("dojo.widget.SplitContainerPanel",dojo.widget.ContentPane,{});
dojo.provide("dojo.widget.SortableTable");
dojo.deprecated("SortableTable will be removed in favor of FilteringTable.","0.5");
dojo.widget.defineWidget("dojo.widget.SortableTable",dojo.widget.HtmlWidget,function(){
this.data=[];
this.selected=[];
this.columns=[];
},{enableMultipleSelect:false,maximumNumberOfSelections:0,enableAlternateRows:false,minRows:0,defaultDateFormat:"%D",sortIndex:0,sortDirection:0,valueField:"Id",headClass:"",tbodyClass:"",headerClass:"",headerSortUpClass:"selected",headerSortDownClass:"selected",rowClass:"",rowAlternateClass:"alt",rowSelectedClass:"selected",columnSelected:"sorted-column",isContainer:false,templatePath:null,templateCssPath:null,getTypeFromString:function(s){
var _e12=s.split("."),i=0,obj=dj_global;
do{
obj=obj[_e12[i++]];
}while(i<_e12.length&&obj);
return (obj!=dj_global)?obj:null;
},compare:function(o1,o2){
for(var p in o1){
if(!(p in o2)){
return false;
}
if(o1[p].valueOf()!=o2[p].valueOf()){
return false;
}
}
return true;
},isSelected:function(o){
for(var i=0;i<this.selected.length;i++){
if(this.compare(this.selected[i],o)){
return true;
}
}
return false;
},removeFromSelected:function(o){
var idx=-1;
for(var i=0;i<this.selected.length;i++){
if(this.compare(this.selected[i],o)){
idx=i;
break;
}
}
if(idx>=0){
this.selected.splice(idx,1);
}
},getSelection:function(){
return this.selected;
},getValue:function(){
var a=[];
for(var i=0;i<this.selected.length;i++){
if(this.selected[i][this.valueField]){
a.push(this.selected[i][this.valueField]);
}
}
return a.join();
},reset:function(){
this.columns=[];
this.data=[];
this.resetSelections(this.domNode.getElementsByTagName("tbody")[0]);
},resetSelections:function(body){
this.selected=[];
var idx=0;
var rows=body.getElementsByTagName("tr");
for(var i=0;i<rows.length;i++){
if(rows[i].parentNode==body){
rows[i].removeAttribute("selected");
if(this.enableAlternateRows&&idx%2==1){
rows[i].className=this.rowAlternateClass;
}else{
rows[i].className="";
}
idx++;
}
}
},getObjectFromRow:function(row){
var _e24=row.getElementsByTagName("td");
var o={};
for(var i=0;i<this.columns.length;i++){
if(this.columns[i].sortType=="__markup__"){
o[this.columns[i].getField()]=_e24[i].innerHTML;
}else{
var text=dojo.html.renderedTextContent(_e24[i]);
var val=text;
if(this.columns[i].getType()!=String){
var val=new (this.columns[i].getType())(text);
}
o[this.columns[i].getField()]=val;
}
}
if(dojo.html.hasAttribute(row,"value")){
o[this.valueField]=dojo.html.getAttribute(row,"value");
}
return o;
},setSelectionByRow:function(row){
var o=this.getObjectFromRow(row);
var b=false;
for(var i=0;i<this.selected.length;i++){
if(this.compare(this.selected[i],o)){
b=true;
break;
}
}
if(!b){
this.selected.push(o);
}
},parseColumns:function(node){
this.reset();
var row=node.getElementsByTagName("tr")[0];
var _e2f=row.getElementsByTagName("td");
if(_e2f.length==0){
_e2f=row.getElementsByTagName("th");
}
for(var i=0;i<_e2f.length;i++){
var o={field:null,format:null,noSort:false,sortType:"String",dataType:String,sortFunction:null,label:null,align:"left",valign:"middle",getField:function(){
return this.field||this.label;
},getType:function(){
return this.dataType;
}};
if(dojo.html.hasAttribute(_e2f[i],"align")){
o.align=dojo.html.getAttribute(_e2f[i],"align");
}
if(dojo.html.hasAttribute(_e2f[i],"valign")){
o.valign=dojo.html.getAttribute(_e2f[i],"valign");
}
if(dojo.html.hasAttribute(_e2f[i],"nosort")){
o.noSort=dojo.html.getAttribute(_e2f[i],"nosort")=="true";
}
if(dojo.html.hasAttribute(_e2f[i],"sortusing")){
var _e32=dojo.html.getAttribute(_e2f[i],"sortusing");
var f=this.getTypeFromString(_e32);
if(f!=null&&f!=window&&typeof (f)=="function"){
o.sortFunction=f;
}
}
if(dojo.html.hasAttribute(_e2f[i],"field")){
o.field=dojo.html.getAttribute(_e2f[i],"field");
}
if(dojo.html.hasAttribute(_e2f[i],"format")){
o.format=dojo.html.getAttribute(_e2f[i],"format");
}
if(dojo.html.hasAttribute(_e2f[i],"dataType")){
var _e34=dojo.html.getAttribute(_e2f[i],"dataType");
if(_e34.toLowerCase()=="html"||_e34.toLowerCase()=="markup"){
o.sortType="__markup__";
o.noSort=true;
}else{
var type=this.getTypeFromString(_e34);
if(type){
o.sortType=_e34;
o.dataType=type;
}
}
}
o.label=dojo.html.renderedTextContent(_e2f[i]);
this.columns.push(o);
if(dojo.html.hasAttribute(_e2f[i],"sort")){
this.sortIndex=i;
var dir=dojo.html.getAttribute(_e2f[i],"sort");
if(!isNaN(parseInt(dir))){
dir=parseInt(dir);
this.sortDirection=(dir!=0)?1:0;
}else{
this.sortDirection=(dir.toLowerCase()=="desc")?1:0;
}
}
}
},parseData:function(data){
this.data=[];
this.selected=[];
for(var i=0;i<data.length;i++){
var o={};
for(var j=0;j<this.columns.length;j++){
var _e3b=this.columns[j].getField();
if(this.columns[j].sortType=="__markup__"){
o[_e3b]=String(data[i][_e3b]);
}else{
var type=this.columns[j].getType();
var val=data[i][_e3b];
var t=this.columns[j].sortType.toLowerCase();
if(type==String){
o[_e3b]=val;
}else{
if(val!=null){
o[_e3b]=new type(val);
}else{
o[_e3b]=new type();
}
}
}
}
if(data[i][this.valueField]&&!o[this.valueField]){
o[this.valueField]=data[i][this.valueField];
}
this.data.push(o);
}
},parseDataFromTable:function(_e3f){
this.data=[];
this.selected=[];
var rows=_e3f.getElementsByTagName("tr");
for(var i=0;i<rows.length;i++){
if(dojo.html.getAttribute(rows[i],"ignoreIfParsed")=="true"){
continue;
}
var o={};
var _e43=rows[i].getElementsByTagName("td");
for(var j=0;j<this.columns.length;j++){
var _e45=this.columns[j].getField();
if(this.columns[j].sortType=="__markup__"){
o[_e45]=_e43[j].innerHTML;
}else{
var type=this.columns[j].getType();
var val=dojo.html.renderedTextContent(_e43[j]);
if(type==String){
o[_e45]=val;
}else{
if(val!=null){
o[_e45]=new type(val);
}else{
o[_e45]=new type();
}
}
}
}
if(dojo.html.hasAttribute(rows[i],"value")&&!o[this.valueField]){
o[this.valueField]=dojo.html.getAttribute(rows[i],"value");
}
this.data.push(o);
if(dojo.html.getAttribute(rows[i],"selected")=="true"){
this.selected.push(o);
}
}
},showSelections:function(){
var body=this.domNode.getElementsByTagName("tbody")[0];
var rows=body.getElementsByTagName("tr");
var idx=0;
for(var i=0;i<rows.length;i++){
if(rows[i].parentNode==body){
if(dojo.html.getAttribute(rows[i],"selected")=="true"){
rows[i].className=this.rowSelectedClass;
}else{
if(this.enableAlternateRows&&idx%2==1){
rows[i].className=this.rowAlternateClass;
}else{
rows[i].className="";
}
}
idx++;
}
}
},render:function(_e4c){
var data=[];
var body=this.domNode.getElementsByTagName("tbody")[0];
if(!_e4c){
this.parseDataFromTable(body);
}
for(var i=0;i<this.data.length;i++){
data.push(this.data[i]);
}
var col=this.columns[this.sortIndex];
if(!col.noSort){
var _e51=col.getField();
if(col.sortFunction){
var sort=col.sortFunction;
}else{
var sort=function(a,b){
if(a[_e51]>b[_e51]){
return 1;
}
if(a[_e51]<b[_e51]){
return -1;
}
return 0;
};
}
data.sort(sort);
if(this.sortDirection!=0){
data.reverse();
}
}
while(body.childNodes.length>0){
body.removeChild(body.childNodes[0]);
}
for(var i=0;i<data.length;i++){
var row=document.createElement("tr");
dojo.html.disableSelection(row);
if(data[i][this.valueField]){
row.setAttribute("value",data[i][this.valueField]);
}
if(this.isSelected(data[i])){
row.className=this.rowSelectedClass;
row.setAttribute("selected","true");
}else{
if(this.enableAlternateRows&&i%2==1){
row.className=this.rowAlternateClass;
}
}
for(var j=0;j<this.columns.length;j++){
var cell=document.createElement("td");
cell.setAttribute("align",this.columns[j].align);
cell.setAttribute("valign",this.columns[j].valign);
dojo.html.disableSelection(cell);
if(this.sortIndex==j){
cell.className=this.columnSelected;
}
if(this.columns[j].sortType=="__markup__"){
cell.innerHTML=data[i][this.columns[j].getField()];
for(var k=0;k<cell.childNodes.length;k++){
var node=cell.childNodes[k];
if(node&&node.nodeType==dojo.html.ELEMENT_NODE){
dojo.html.disableSelection(node);
}
}
}else{
if(this.columns[j].getType()==Date){
var _e5a=this.defaultDateFormat;
if(this.columns[j].format){
_e5a=this.columns[j].format;
}
cell.appendChild(document.createTextNode(dojo.date.strftime(data[i][this.columns[j].getField()],_e5a)));
}else{
cell.appendChild(document.createTextNode(data[i][this.columns[j].getField()]));
}
}
row.appendChild(cell);
}
body.appendChild(row);
dojo.event.connect(row,"onclick",this,"onUISelect");
}
var _e5b=parseInt(this.minRows);
if(!isNaN(_e5b)&&_e5b>0&&data.length<_e5b){
var mod=0;
if(data.length%2==0){
mod=1;
}
var _e5d=_e5b-data.length;
for(var i=0;i<_e5d;i++){
var row=document.createElement("tr");
row.setAttribute("ignoreIfParsed","true");
if(this.enableAlternateRows&&i%2==mod){
row.className=this.rowAlternateClass;
}
for(var j=0;j<this.columns.length;j++){
var cell=document.createElement("td");
cell.appendChild(document.createTextNode("\xa0"));
row.appendChild(cell);
}
body.appendChild(row);
}
}
},onSelect:function(e){
},onUISelect:function(e){
var row=dojo.html.getParentByType(e.target,"tr");
var body=dojo.html.getParentByType(row,"tbody");
if(this.enableMultipleSelect){
if(e.metaKey||e.ctrlKey){
if(this.isSelected(this.getObjectFromRow(row))){
this.removeFromSelected(this.getObjectFromRow(row));
row.removeAttribute("selected");
}else{
this.setSelectionByRow(row);
row.setAttribute("selected","true");
}
}else{
if(e.shiftKey){
var _e62;
var rows=body.getElementsByTagName("tr");
for(var i=0;i<rows.length;i++){
if(rows[i].parentNode==body){
if(rows[i]==row){
break;
}
if(dojo.html.getAttribute(rows[i],"selected")=="true"){
_e62=rows[i];
}
}
}
if(!_e62){
_e62=row;
for(;i<rows.length;i++){
if(dojo.html.getAttribute(rows[i],"selected")=="true"){
row=rows[i];
break;
}
}
}
this.resetSelections(body);
if(_e62==row){
row.setAttribute("selected","true");
this.setSelectionByRow(row);
}else{
var _e65=false;
for(var i=0;i<rows.length;i++){
if(rows[i].parentNode==body){
rows[i].removeAttribute("selected");
if(rows[i]==_e62){
_e65=true;
}
if(_e65){
this.setSelectionByRow(rows[i]);
rows[i].setAttribute("selected","true");
}
if(rows[i]==row){
_e65=false;
}
}
}
}
}else{
this.resetSelections(body);
row.setAttribute("selected","true");
this.setSelectionByRow(row);
}
}
}else{
this.resetSelections(body);
row.setAttribute("selected","true");
this.setSelectionByRow(row);
}
this.showSelections();
this.onSelect(e);
e.stopPropagation();
e.preventDefault();
},onHeaderClick:function(e){
var _e67=this.sortIndex;
var _e68=this.sortDirection;
var _e69=e.target;
var row=dojo.html.getParentByType(_e69,"tr");
var _e6b="td";
if(row.getElementsByTagName(_e6b).length==0){
_e6b="th";
}
var _e6c=row.getElementsByTagName(_e6b);
var _e6d=dojo.html.getParentByType(_e69,_e6b);
for(var i=0;i<_e6c.length;i++){
if(_e6c[i]==_e6d){
if(i!=_e67){
this.sortIndex=i;
this.sortDirection=0;
_e6c[i].className=this.headerSortDownClass;
}else{
this.sortDirection=(_e68==0)?1:0;
if(this.sortDirection==0){
_e6c[i].className=this.headerSortDownClass;
}else{
_e6c[i].className=this.headerSortUpClass;
}
}
}else{
_e6c[i].className=this.headerClass;
}
}
this.render();
},postCreate:function(){
var _e6f=this.domNode.getElementsByTagName("thead")[0];
if(this.headClass.length>0){
_e6f.className=this.headClass;
}
dojo.html.disableSelection(this.domNode);
this.parseColumns(_e6f);
var _e70="td";
if(_e6f.getElementsByTagName(_e70).length==0){
_e70="th";
}
var _e71=_e6f.getElementsByTagName(_e70);
for(var i=0;i<_e71.length;i++){
if(!this.columns[i].noSort){
dojo.event.connect(_e71[i],"onclick",this,"onHeaderClick");
}
if(this.sortIndex==i){
if(this.sortDirection==0){
_e71[i].className=this.headerSortDownClass;
}else{
_e71[i].className=this.headerSortUpClass;
}
}
}
var _e73=this.domNode.getElementsByTagName("tbody")[0];
if(this.tbodyClass.length>0){
_e73.className=this.tbodyClass;
}
this.parseDataFromTable(_e73);
this.render(true);
}});
dojo.provide("dojo.widget.TabContainer");
dojo.widget.defineWidget("dojo.widget.TabContainer",dojo.widget.PageContainer,{labelPosition:"top",closeButton:"none",templateString:null,templateString:"<div id=\"${this.widgetId}\" class=\"dojoTabContainer\">\n	<div dojoAttachPoint=\"tablistNode\"></div>\n	<div class=\"dojoTabPaneWrapper\" dojoAttachPoint=\"containerNode\" dojoAttachEvent=\"onKey\" waiRole=\"tabpanel\"></div>\n</div>\n",selectedTab:"",postMixInProperties:function(){
if(this.selectedTab){
dojo.deprecated("selectedTab deprecated, use selectedChild instead, will be removed in","0.5");
this.selectedChild=this.selectedTab;
}
if(this.closeButton!="none"){
dojo.deprecated("closeButton deprecated, use closable='true' on each child instead, will be removed in","0.5");
}
dojo.widget.TabContainer.superclass.postMixInProperties.apply(this,arguments);
},fillInTemplate:function(){
this.tablist=dojo.widget.createWidget("TabController",{id:this.widgetId+"_tablist",labelPosition:this.labelPosition,doLayout:this.doLayout,containerId:this.widgetId},this.tablistNode);
dojo.widget.TabContainer.superclass.fillInTemplate.apply(this,arguments);
},postCreate:function(args,frag){
dojo.widget.TabContainer.superclass.postCreate.apply(this,arguments);
this.onResized();
},_setupChild:function(tab){
if(this.closeButton=="tab"||this.closeButton=="pane"){
tab.closable=true;
}
dojo.html.addClass(tab.domNode,"dojoTabPane");
dojo.widget.TabContainer.superclass._setupChild.apply(this,arguments);
},onResized:function(){
if(!this.doLayout){
return;
}
var _e77=this.labelPosition.replace(/-h/,"");
var _e78=[{domNode:this.tablist.domNode,layoutAlign:_e77},{domNode:this.containerNode,layoutAlign:"client"}];
dojo.widget.html.layout(this.domNode,_e78);
if(this.selectedChildWidget){
var _e79=dojo.html.getContentBox(this.containerNode);
this.selectedChildWidget.resizeTo(_e79.width,_e79.height);
}
},selectTab:function(tab,_e7b){
dojo.deprecated("use selectChild() rather than selectTab(), selectTab() will be removed in","0.5");
this.selectChild(tab,_e7b);
},onKey:function(e){
if(e.keyCode==e.KEY_UP_ARROW&&e.ctrlKey){
var _e7d=this.correspondingTabButton||this.selectedTabWidget.tabButton;
_e7d.focus();
dojo.event.browser.stopEvent(e);
}else{
if(e.keyCode==e.KEY_DELETE&&e.altKey){
if(this.selectedChildWidget.closable){
this.closeChild(this.selectedChildWidget);
dojo.event.browser.stopEvent(e);
}
}
}
},destroy:function(){
this.tablist.destroy();
dojo.widget.TabContainer.superclass.destroy.apply(this,arguments);
}});
dojo.widget.defineWidget("dojo.widget.TabController",dojo.widget.PageController,{templateString:"<div wairole='tablist' dojoAttachEvent='onKey'></div>",labelPosition:"top",doLayout:true,"class":"",buttonWidget:"TabButton",postMixInProperties:function(){
if(!this["class"]){
this["class"]="dojoTabLabels-"+this.labelPosition+(this.doLayout?"":" dojoTabNoLayout");
}
dojo.widget.TabController.superclass.postMixInProperties.apply(this,arguments);
}});
dojo.widget.defineWidget("dojo.widget.TabButton",dojo.widget.PageButton,{templateString:"<div class='dojoTab' dojoAttachEvent='onClick'>"+"<div dojoAttachPoint='innerDiv'>"+"<span dojoAttachPoint='titleNode' tabIndex='-1' waiRole='tab'>${this.label}</span>"+"<span dojoAttachPoint='closeButtonNode' class='close closeImage' style='${this.closeButtonStyle}'"+"    dojoAttachEvent='onMouseOver:onCloseButtonMouseOver; onMouseOut:onCloseButtonMouseOut; onClick:onCloseButtonClick'></span>"+"</div>"+"</div>",postMixInProperties:function(){
this.closeButtonStyle=this.closeButton?"":"display: none";
dojo.widget.TabButton.superclass.postMixInProperties.apply(this,arguments);
},fillInTemplate:function(){
dojo.html.disableSelection(this.titleNode);
dojo.widget.TabButton.superclass.fillInTemplate.apply(this,arguments);
},onCloseButtonClick:function(evt){
evt.stopPropagation();
dojo.widget.TabButton.superclass.onCloseButtonClick.apply(this,arguments);
}});
dojo.widget.defineWidget("dojo.widget.a11y.TabButton",dojo.widget.TabButton,{imgPath:dojo.uri.dojoUri("src/widget/templates/images/tab_close.gif"),templateString:"<div class='dojoTab' dojoAttachEvent='onClick;onKey'>"+"<div dojoAttachPoint='innerDiv'>"+"<span dojoAttachPoint='titleNode' tabIndex='-1' waiRole='tab'>${this.label}</span>"+"<img class='close' src='${this.imgPath}' alt='[x]' style='${this.closeButtonStyle}'"+"    dojoAttachEvent='onClick:onCloseButtonClick'>"+"</div>"+"</div>"});
dojo.provide("dojo.widget.TaskBar");
dojo.widget.defineWidget("dojo.widget.TaskBarItem",dojo.widget.HtmlWidget,{iconSrc:"",caption:"Untitled",templateString:"<div class=\"dojoTaskBarItem\" dojoAttachEvent=\"onClick\">\n</div>",fillInTemplate:function(){
if(this.iconSrc){
var img=document.createElement("img");
img.src=this.iconSrc;
this.domNode.appendChild(img);
}
this.domNode.appendChild(document.createTextNode(this.caption));
dojo.html.disableSelection(this.domNode);
},postCreate:function(){
this.window=dojo.widget.getWidgetById(this.windowId);
this.window.explodeSrc=this.domNode;
dojo.event.connect(this.window,"destroy",this,"destroy");
},onClick:function(){
this.window.toggleDisplay();
}});
dojo.widget.defineWidget("dojo.widget.TaskBar",dojo.widget.FloatingPane,function(){
this._addChildStack=[];
},{resizable:false,titleBarDisplay:false,addChild:function(_e80){
if(!this.containerNode){
this._addChildStack.push(_e80);
}else{
if(this._addChildStack.length>0){
var oarr=this._addChildStack;
this._addChildStack=[];
dojo.lang.forEach(oarr,this.addChild,this);
}
}
var tbi=dojo.widget.createWidget("TaskBarItem",{windowId:_e80.widgetId,caption:_e80.title,iconSrc:_e80.iconSrc});
dojo.widget.TaskBar.superclass.addChild.call(this,tbi);
}});
dojo.provide("dojo.widget.TitlePane");
dojo.widget.defineWidget("dojo.widget.TitlePane",dojo.widget.ContentPane,{labelNodeClass:"",containerNodeClass:"",label:"",open:true,templateString:"<div dojoAttachPoint=\"domNode\">\n<div dojoAttachPoint=\"labelNode\" dojoAttachEvent=\"onclick: onLabelClick\"></div>\n<div dojoAttachPoint=\"containerNode\"></div>\n</div>\n",postCreate:function(){
if(this.label){
this.labelNode.appendChild(document.createTextNode(this.label));
}
if(this.labelNodeClass){
dojo.html.addClass(this.labelNode,this.labelNodeClass);
}
if(this.containerNodeClass){
dojo.html.addClass(this.containerNode,this.containerNodeClass);
}
if(!this.open){
dojo.html.hide(this.containerNode);
}
dojo.widget.TitlePane.superclass.postCreate.apply(this,arguments);
},onLabelClick:function(){
if(this.open){
dojo.lfx.wipeOut(this.containerNode,250).play();
this.open=false;
}else{
dojo.lfx.wipeIn(this.containerNode,250).play();
this.open=true;
}
},setLabel:function(_e83){
this.labelNode.innerHTML=_e83;
}});
dojo.provide("dojo.widget.Tooltip");
dojo.widget.defineWidget("dojo.widget.Tooltip",[dojo.widget.ContentPane,dojo.widget.PopupContainerBase],{caption:"",showDelay:500,hideDelay:100,connectId:"",fillInTemplate:function(args,frag){
if(this.caption!=""){
this.domNode.appendChild(document.createTextNode(this.caption));
}
this._connectNode=dojo.byId(this.connectId);
dojo.widget.Tooltip.superclass.fillInTemplate.call(this,args,frag);
this.addOnLoad(this,"_loadedContent");
dojo.html.addClass(this.domNode,"dojoTooltip");
var _e86=this.getFragNodeRef(frag);
dojo.html.copyStyle(this.domNode,_e86);
this.applyPopupBasicStyle();
},postCreate:function(args,frag){
dojo.event.connect(this._connectNode,"onmouseover",this,"_onMouseOver");
dojo.widget.Tooltip.superclass.postCreate.call(this,args,frag);
},_onMouseOver:function(e){
this._mouse={x:e.pageX,y:e.pageY};
if(!this._tracking){
dojo.event.connect(document.documentElement,"onmousemove",this,"_onMouseMove");
this._tracking=true;
}
this._onHover(e);
},_onMouseMove:function(e){
this._mouse={x:e.pageX,y:e.pageY};
if(dojo.html.overElement(this._connectNode,e)||dojo.html.overElement(this.domNode,e)){
this._onHover(e);
}else{
this._onUnHover(e);
}
},_onHover:function(e){
if(this._hover){
return;
}
this._hover=true;
if(this._hideTimer){
clearTimeout(this._hideTimer);
delete this._hideTimer;
}
if(!this.isShowingNow&&!this._showTimer){
this._showTimer=setTimeout(dojo.lang.hitch(this,"open"),this.showDelay);
}
},_onUnHover:function(e){
if(!this._hover){
return;
}
this._hover=false;
if(this._showTimer){
clearTimeout(this._showTimer);
delete this._showTimer;
}
if(this.isShowingNow&&!this._hideTimer){
this._hideTimer=setTimeout(dojo.lang.hitch(this,"close"),this.hideDelay);
}
if(!this.isShowingNow){
dojo.event.disconnect(document.documentElement,"onmousemove",this,"_onMouseMove");
this._tracking=false;
}
},open:function(){
if(this.isShowingNow){
return;
}
dojo.widget.PopupContainerBase.prototype.open.call(this,this._mouse.x,this._mouse.y,null,[this._mouse.x,this._mouse.y],"TL,TR,BL,BR",[10,15]);
},close:function(){
if(this.isShowingNow){
if(this._showTimer){
clearTimeout(this._showTimer);
delete this._showTimer;
}
if(this._hideTimer){
clearTimeout(this._hideTimer);
delete this._hideTimer;
}
dojo.event.disconnect(document.documentElement,"onmousemove",this,"_onMouseMove");
this._tracking=false;
dojo.widget.PopupContainerBase.prototype.close.call(this);
}
},_position:function(){
this.move(this._mouse.x,this._mouse.y,[10,15],"TL,TR,BL,BR");
},_loadedContent:function(){
if(this.isShowingNow){
this._position();
}
},checkSize:function(){
},uninitialize:function(){
this.close();
dojo.event.disconnect(this._connectNode,"onmouseover",this,"_onMouseOver");
}});
dojo.provide("dojo.json");
dojo.json={jsonRegistry:new dojo.AdapterRegistry(),register:function(name,_e8e,wrap,_e90){
dojo.json.jsonRegistry.register(name,_e8e,wrap,_e90);
},evalJson:function(json){
try{
return eval("("+json+")");
}
catch(e){
dojo.debug(e);
return json;
}
},serialize:function(o){
var _e93=typeof (o);
if(_e93=="undefined"){
return "undefined";
}else{
if((_e93=="number")||(_e93=="boolean")){
return o+"";
}else{
if(o===null){
return "null";
}
}
}
if(_e93=="string"){
return dojo.string.escapeString(o);
}
var me=arguments.callee;
var _e95;
if(typeof (o.__json__)=="function"){
_e95=o.__json__();
if(o!==_e95){
return me(_e95);
}
}
if(typeof (o.json)=="function"){
_e95=o.json();
if(o!==_e95){
return me(_e95);
}
}
if(_e93!="function"&&typeof (o.length)=="number"){
var res=[];
for(var i=0;i<o.length;i++){
var val=me(o[i]);
if(typeof (val)!="string"){
val="undefined";
}
res.push(val);
}
return "["+res.join(",")+"]";
}
try{
window.o=o;
_e95=dojo.json.jsonRegistry.match(o);
return me(_e95);
}
catch(e){
}
if(_e93=="function"){
return null;
}
res=[];
for(var k in o){
var _e9a;
if(typeof (k)=="number"){
_e9a="\""+k+"\"";
}else{
if(typeof (k)=="string"){
_e9a=dojo.string.escapeString(k);
}else{
continue;
}
}
val=me(o[k]);
if(typeof (val)!="string"){
continue;
}
res.push(_e9a+":"+val);
}
return "{"+res.join(",")+"}";
}};
dojo.provide("dojo.widget.TreeCommon");
dojo.declare("dojo.widget.TreeCommon",null,{listenTreeEvents:[],listenedTrees:{},listenNodeFilter:null,listenTree:function(tree){
var _e9c=this;
if(this.listenedTrees[tree.widgetId]){
return;
}
dojo.lang.forEach(this.listenTreeEvents,function(_e9d){
var _e9e="on"+_e9d.charAt(0).toUpperCase()+_e9d.substr(1);
dojo.event.topic.subscribe(tree.eventNames[_e9d],_e9c,_e9e);
});
var _e9f;
if(this.listenNodeFilter){
this.processDescendants(tree,this.listenNodeFilter,this.listenNode,true);
}
this.listenedTrees[tree.widgetId]=true;
},listenNode:function(){
},unlistenNode:function(){
},unlistenTree:function(tree,_ea1){
var _ea2=this;
if(!this.listenedTrees[tree.widgetId]){
return;
}
dojo.lang.forEach(this.listenTreeEvents,function(_ea3){
var _ea4="on"+_ea3.charAt(0).toUpperCase()+_ea3.substr(1);
dojo.event.topic.unsubscribe(tree.eventNames[_ea3],_ea2,_ea4);
});
if(this.listenNodeFilter){
this.processDescendants(tree,this.listenNodeFilter,this.unlistenNode,true);
}
delete this.listenedTrees[tree.widgetId];
},checkPathCondition:function(_ea5,_ea6){
while(_ea5&&!_ea5.widgetId){
if(_ea6.call(null,_ea5)){
return true;
}
_ea5=_ea5.parentNode;
}
return false;
},domElement2TreeNode:function(_ea7){
while(_ea7&&!_ea7.widgetId){
_ea7=_ea7.parentNode;
}
if(!_ea7){
return null;
}
var _ea8=dojo.widget.byId(_ea7.widgetId);
if(!_ea8.isTreeNode){
return null;
}
return _ea8;
},processDescendants:function(elem,_eaa,func,_eac){
var _ead=this;
if(!_eac){
if(!_eaa.call(_ead,elem)){
return;
}
func.call(_ead,elem);
}
var _eae=[elem];
while(elem=_eae.pop()){
dojo.lang.forEach(elem.children,function(elem){
if(_eaa.call(_ead,elem)){
func.call(_ead,elem);
_eae.push(elem);
}
});
}
}});
dojo.provide("dojo.widget.TreeWithNode");
dojo.declare("dojo.widget.TreeWithNode",null,function(){
},{loadStates:{UNCHECKED:"UNCHECKED",LOADING:"LOADING",LOADED:"LOADED"},state:"UNCHECKED",objectId:"",isContainer:true,lockLevel:0,lock:function(){
this.lockLevel++;
},unlock:function(){
if(!this.lockLevel){
dojo.raise(this.widgetType+" unlock: not locked");
}
this.lockLevel--;
},expandLevel:0,loadLevel:0,hasLock:function(){
return this.lockLevel>0;
},isLocked:function(){
var node=this;
while(true){
if(node.lockLevel){
return true;
}
if(!node.parent||node.isTree){
break;
}
node=node.parent;
}
return false;
},flushLock:function(){
this.lockLevel=0;
},actionIsDisabled:function(_eb1){
var _eb2=false;
if(dojo.lang.inArray(this.actionsDisabled,_eb1)){
_eb2=true;
}
if(this.isTreeNode){
if(!this.tree.allowAddChildToLeaf&&_eb1==this.actions.ADDCHILD&&!this.isFolder){
_eb2=true;
}
}
return _eb2;
},actionIsDisabledNow:function(_eb3){
return this.actionIsDisabled(_eb3)||this.isLocked();
},setChildren:function(_eb4){
if(this.isTreeNode&&!this.isFolder){
this.setFolder();
}else{
if(this.isTreeNode){
this.state=this.loadStates.LOADED;
}
}
var _eb5=this.children.length>0;
if(_eb5&&_eb4){
this.destroyChildren();
}
if(_eb4){
this.children=_eb4;
}
var _eb6=this.children.length>0;
if(this.isTreeNode&&_eb6!=_eb5){
this.viewSetHasChildren();
}
for(var i=0;i<this.children.length;i++){
var _eb8=this.children[i];
if(!(_eb8 instanceof dojo.widget.Widget)){
_eb8=this.children[i]=this.tree.createNode(_eb8);
var _eb9=true;
}else{
var _eb9=false;
}
if(!_eb8.parent){
_eb8.parent=this;
if(this.tree!==_eb8.tree){
_eb8.updateTree(this.tree);
}
_eb8.viewAddLayout();
this.containerNode.appendChild(_eb8.domNode);
var _eba={child:_eb8,index:i,parent:this,childWidgetCreated:_eb9};
delete dojo.widget.manager.topWidgets[_eb8.widgetId];
dojo.event.topic.publish(this.tree.eventNames.afterAddChild,_eba);
}
if(this.tree.eagerWidgetInstantiation){
dojo.lang.forEach(this.children,function(_ebb){
_ebb.setChildren();
});
}
}
},doAddChild:function(_ebc,_ebd){
return this.addChild(_ebc,_ebd,true);
},addChild:function(_ebe,_ebf,_ec0){
if(dojo.lang.isUndefined(_ebf)){
_ebf=this.children.length;
}
if(!_ebe.isTreeNode){
dojo.raise("You can only add TreeNode widgets to a "+this.widgetType+" widget!");
return;
}
this.children.splice(_ebf,0,_ebe);
_ebe.parent=this;
_ebe.addedTo(this,_ebf,_ec0);
delete dojo.widget.manager.topWidgets[_ebe.widgetId];
},onShow:function(){
this.animationInProgress=false;
},onHide:function(){
this.animationInProgress=false;
}});
dojo.provide("dojo.widget.TreeNodeV3");
dojo.widget.defineWidget("dojo.widget.TreeNodeV3",[dojo.widget.HtmlWidget,dojo.widget.TreeWithNode],function(){
this.actionsDisabled=[];
this.object={};
},{tryLazyInit:true,actions:{MOVE:"MOVE",DETACH:"DETACH",EDIT:"EDIT",ADDCHILD:"ADDCHILD",SELECT:"SELECT"},labelClass:"",contentClass:"",expandNode:null,labelNode:null,nodeDocType:"",selected:false,getnodeDocType:function(){
return this.nodeDocType;
},cloneProperties:["actionsDisabled","tryLazyInit","nodeDocType","objectId","object","title","isFolder","isExpanded","state"],clone:function(deep){
var ret=new this.constructor();
for(var i=0;i<this.cloneProperties.length;i++){
var prop=this.cloneProperties[i];
ret[prop]=dojo.lang.shallowCopy(this[prop],true);
}
if(this.tree.unsetFolderOnEmpty&&!deep&&this.isFolder){
ret.isFolder=false;
}
ret.toggleObj=this.toggleObj;
dojo.widget.manager.add(ret);
ret.tree=this.tree;
ret.buildRendering({},{});
ret.initialize({},{});
if(deep&&this.children.length){
for(var i=0;i<this.children.length;i++){
var _ec5=this.children[i];
if(_ec5.clone){
ret.children.push(_ec5.clone(deep));
}else{
ret.children.push(dojo.lang.shallowCopy(_ec5,deep));
}
}
ret.setChildren();
}
return ret;
},markProcessing:function(){
this.markProcessingSavedClass=dojo.html.getClass(this.expandNode);
dojo.html.setClass(this.expandNode,this.tree.classPrefix+"ExpandLoading");
},unmarkProcessing:function(){
dojo.html.setClass(this.expandNode,this.markProcessingSavedClass);
},buildRendering:function(args,_ec7,_ec8){
if(args.tree){
this.tree=dojo.lang.isString(args.tree)?dojo.widget.manager.getWidgetById(args.tree):args.tree;
}else{
if(_ec8&&_ec8.tree){
this.tree=_ec8.tree;
}
}
if(!this.tree){
dojo.raise("Can't evaluate tree from arguments or parent");
}
this.domNode=this.tree.nodeTemplate.cloneNode(true);
this.expandNode=this.domNode.firstChild;
this.contentNode=this.domNode.childNodes[1];
this.labelNode=this.contentNode.firstChild;
if(this.labelClass){
dojo.html.addClass(this.labelNode,this.labelClass);
}
if(this.contentClass){
dojo.html.addClass(this.contentNode,this.contentClass);
}
this.domNode.widgetId=this.widgetId;
this.labelNode.innerHTML=this.title;
},isTreeNode:true,object:{},title:"",isFolder:null,contentNode:null,expandClass:"",isExpanded:false,containerNode:null,getInfo:function(){
var info={widgetId:this.widgetId,objectId:this.objectId,index:this.getParentIndex()};
return info;
},setFolder:function(){
this.isFolder=true;
this.viewSetExpand();
if(!this.containerNode){
this.viewAddContainer();
}
dojo.event.topic.publish(this.tree.eventNames.afterSetFolder,{source:this});
},initialize:function(args,frag,_ecc){
if(args.isFolder){
this.isFolder=true;
}
if(this.children.length||this.isFolder){
this.setFolder();
}else{
this.viewSetExpand();
}
for(var i=0;i<this.actionsDisabled.length;i++){
this.actionsDisabled[i]=this.actionsDisabled[i].toUpperCase();
}
dojo.event.topic.publish(this.tree.eventNames.afterChangeTree,{oldTree:null,newTree:this.tree,node:this});
},unsetFolder:function(){
this.isFolder=false;
this.viewSetExpand();
dojo.event.topic.publish(this.tree.eventNames.afterUnsetFolder,{source:this});
},insertNode:function(_ece,_ecf){
if(!_ecf){
_ecf=0;
}
if(_ecf==0){
dojo.html.prependChild(this.domNode,_ece.containerNode);
}else{
dojo.html.insertAfter(this.domNode,_ece.children[_ecf-1].domNode);
}
},updateTree:function(_ed0){
if(this.tree===_ed0){
return;
}
var _ed1=this.tree;
dojo.lang.forEach(this.getDescendants(),function(elem){
elem.tree=_ed0;
});
if(_ed1.classPrefix!=_ed0.classPrefix){
var _ed3=[this.domNode];
var elem;
var reg=new RegExp("(^|\\s)"+_ed1.classPrefix,"g");
while(elem=_ed3.pop()){
for(var i=0;i<elem.childNodes.length;i++){
var _ed7=elem.childNodes[i];
if(_ed7.nodeDocType!=1){
continue;
}
dojo.html.setClass(_ed7,dojo.html.getClass(_ed7).replace(reg,"$1"+_ed0.classPrefix));
_ed3.push(_ed7);
}
}
}
var _ed8={oldTree:_ed1,newTree:_ed0,node:this};
dojo.event.topic.publish(this.tree.eventNames.afterChangeTree,_ed8);
dojo.event.topic.publish(_ed0.eventNames.afterChangeTree,_ed8);
},addedTo:function(_ed9,_eda,_edb){
if(this.tree!==_ed9.tree){
this.updateTree(_ed9.tree);
}
if(_ed9.isTreeNode){
if(!_ed9.isFolder){
_ed9.setFolder();
_ed9.state=_ed9.loadStates.LOADED;
}
}
var _edc=_ed9.children.length;
this.insertNode(_ed9,_eda);
this.viewAddLayout();
if(_edc>1){
if(_eda==0&&_ed9.children[1] instanceof dojo.widget.Widget){
_ed9.children[1].viewUpdateLayout();
}
if(_eda==_edc-1&&_ed9.children[_edc-2] instanceof dojo.widget.Widget){
_ed9.children[_edc-2].viewUpdateLayout();
}
}else{
if(_ed9.isTreeNode){
_ed9.viewSetHasChildren();
}
}
if(!_edb){
var _edd={child:this,index:_eda,parent:_ed9};
dojo.event.topic.publish(this.tree.eventNames.afterAddChild,_edd);
}
},createSimple:function(args,_edf){
if(args.tree){
var tree=args.tree;
}else{
if(_edf){
var tree=_edf.tree;
}else{
dojo.raise("createSimple: can't evaluate tree");
}
}
tree=dojo.widget.byId(tree);
var _ee1=new tree.defaultChildWidget();
for(var x in args){
_ee1[x]=args[x];
}
_ee1.toggleObj=dojo.lfx.toggle[_ee1.toggle.toLowerCase()]||dojo.lfx.toggle.plain;
dojo.widget.manager.add(_ee1);
_ee1.buildRendering(args,{},_edf);
_ee1.initialize(args,{},_edf);
if(_ee1.parent){
delete dojo.widget.manager.topWidgets[_ee1.widgetId];
}
return _ee1;
},viewUpdateLayout:function(){
this.viewRemoveLayout();
this.viewAddLayout();
},viewAddContainer:function(){
this.containerNode=this.tree.containerNodeTemplate.cloneNode(true);
this.domNode.appendChild(this.containerNode);
},viewAddLayout:function(){
if(this.parent["isTree"]){
dojo.html.setClass(this.domNode,dojo.html.getClass(this.domNode)+" "+this.tree.classPrefix+"IsRoot");
}
if(this.isLastChild()){
dojo.html.setClass(this.domNode,dojo.html.getClass(this.domNode)+" "+this.tree.classPrefix+"IsLast");
}
},viewRemoveLayout:function(){
dojo.html.removeClass(this.domNode,this.tree.classPrefix+"IsRoot");
dojo.html.removeClass(this.domNode,this.tree.classPrefix+"IsLast");
},viewGetExpandClass:function(){
if(this.isFolder){
return this.isExpanded?"ExpandOpen":"ExpandClosed";
}else{
return "ExpandLeaf";
}
},viewSetExpand:function(){
var _ee3=this.tree.classPrefix+this.viewGetExpandClass();
var reg=new RegExp("(^|\\s)"+this.tree.classPrefix+"Expand\\w+","g");
dojo.html.setClass(this.domNode,dojo.html.getClass(this.domNode).replace(reg,"")+" "+_ee3);
this.viewSetHasChildrenAndExpand();
},viewGetChildrenClass:function(){
return "Children"+(this.children.length?"Yes":"No");
},viewSetHasChildren:function(){
var _ee5=this.tree.classPrefix+this.viewGetChildrenClass();
var reg=new RegExp("(^|\\s)"+this.tree.classPrefix+"Children\\w+","g");
dojo.html.setClass(this.domNode,dojo.html.getClass(this.domNode).replace(reg,"")+" "+_ee5);
this.viewSetHasChildrenAndExpand();
},viewSetHasChildrenAndExpand:function(){
var _ee7=this.tree.classPrefix+"State"+this.viewGetChildrenClass()+"-"+this.viewGetExpandClass();
var reg=new RegExp("(^|\\s)"+this.tree.classPrefix+"State[\\w-]+","g");
dojo.html.setClass(this.domNode,dojo.html.getClass(this.domNode).replace(reg,"")+" "+_ee7);
},viewUnfocus:function(){
dojo.html.removeClass(this.labelNode,this.tree.classPrefix+"LabelFocused");
},viewFocus:function(){
dojo.html.addClass(this.labelNode,this.tree.classPrefix+"LabelFocused");
},viewEmphasize:function(){
dojo.html.clearSelection(this.labelNode);
dojo.html.addClass(this.labelNode,this.tree.classPrefix+"NodeEmphasized");
},viewUnemphasize:function(){
dojo.html.removeClass(this.labelNode,this.tree.classPrefix+"NodeEmphasized");
},detach:function(){
if(!this.parent){
return;
}
var _ee9=this.parent;
var _eea=this.getParentIndex();
this.doDetach.apply(this,arguments);
dojo.event.topic.publish(this.tree.eventNames.afterDetach,{child:this,parent:_ee9,index:_eea});
},doDetach:function(){
var _eeb=this.parent;
if(!_eeb){
return;
}
var _eec=this.getParentIndex();
this.viewRemoveLayout();
dojo.widget.DomWidget.prototype.removeChild.call(_eeb,this);
var _eed=_eeb.children.length;
if(_eed>0){
if(_eec==0){
_eeb.children[0].viewUpdateLayout();
}
if(_eec==_eed){
_eeb.children[_eed-1].viewUpdateLayout();
}
}else{
if(_eeb.isTreeNode){
_eeb.viewSetHasChildren();
}
}
if(this.tree.unsetFolderOnEmpty&&!_eeb.children.length&&_eeb.isTreeNode){
_eeb.unsetFolder();
}
this.parent=null;
},destroy:function(){
dojo.event.topic.publish(this.tree.eventNames.beforeNodeDestroy,{source:this});
this.detach();
return dojo.widget.HtmlWidget.prototype.destroy.apply(this,arguments);
},expand:function(){
if(this.isExpanded){
return;
}
if(this.tryLazyInit){
this.setChildren();
this.tryLazyInit=false;
}
this.isExpanded=true;
this.viewSetExpand();
this.showChildren();
},collapse:function(){
if(!this.isExpanded){
return;
}
this.isExpanded=false;
this.hideChildren();
},hideChildren:function(){
this.tree.toggleObj.hide(this.containerNode,this.tree.toggleDuration,this.explodeSrc,dojo.lang.hitch(this,"onHideChildren"));
},showChildren:function(){
this.tree.toggleObj.show(this.containerNode,this.tree.toggleDuration,this.explodeSrc,dojo.lang.hitch(this,"onShowChildren"));
},onShowChildren:function(){
this.onShow();
dojo.event.topic.publish(this.tree.eventNames.afterExpand,{source:this});
},onHideChildren:function(){
this.viewSetExpand();
this.onHide();
dojo.event.topic.publish(this.tree.eventNames.afterCollapse,{source:this});
},setTitle:function(_eee){
var _eef=this.title;
this.labelNode.innerHTML=this.title=_eee;
dojo.event.topic.publish(this.tree.eventNames.afterSetTitle,{source:this,oldTitle:_eef});
},toString:function(){
return "["+this.widgetType+", "+this.title+"]";
}});
dojo.provide("dojo.widget.TreeV3");
dojo.widget.defineWidget("dojo.widget.TreeV3",[dojo.widget.HtmlWidget,dojo.widget.TreeWithNode],function(){
this.eventNames={};
this.DndAcceptTypes=[];
this.actionsDisabled=[];
this.listeners=[];
this.tree=this;
},{DndMode:"",defaultChildWidget:null,defaultChildTitle:"New Node",eagerWidgetInstantiation:false,eventNamesDefault:{afterTreeCreate:"afterTreeCreate",beforeTreeDestroy:"beforeTreeDestroy",beforeNodeDestroy:"beforeNodeDestroy",afterChangeTree:"afterChangeTree",afterSetFolder:"afterSetFolder",afterUnsetFolder:"afterUnsetFolder",beforeMoveFrom:"beforeMoveFrom",beforeMoveTo:"beforeMoveTo",afterMoveFrom:"afterMoveFrom",afterMoveTo:"afterMoveTo",afterAddChild:"afterAddChild",afterDetach:"afterDetach",afterExpand:"afterExpand",beforeExpand:"beforeExpand",afterSetTitle:"afterSetTitle",afterCollapse:"afterCollapse",beforeCollapse:"beforeCollapse"},classPrefix:"Tree",style:"",allowAddChildToLeaf:true,unsetFolderOnEmpty:true,DndModes:{BETWEEN:1,ONTO:2},DndAcceptTypes:"",templateString:"<div style=\"${this.style}\">\n</div>",isExpanded:true,isTree:true,createNode:function(data){
data.tree=this.widgetId;
if(data.widgetName){
return dojo.widget.createWidget(data.widgetName,data);
}else{
if(this.defaultChildWidget.prototype.createSimple){
return this.defaultChildWidget.prototype.createSimple(data);
}else{
var ns=this.defaultChildWidget.prototype.ns;
var wt=this.defaultChildWidget.prototype.widgetType;
return dojo.widget.createWidget(ns+":"+wt,data);
}
}
},makeNodeTemplate:function(){
var _ef3=document.createElement("div");
dojo.html.setClass(_ef3,this.classPrefix+"Node "+this.classPrefix+"ExpandLeaf "+this.classPrefix+"ChildrenNo");
this.nodeTemplate=_ef3;
var _ef4=document.createElement("div");
var _ef5=this.classPrefix+"Expand";
if(dojo.render.html.ie){
_ef5=_ef5+" "+this.classPrefix+"IEExpand";
}
dojo.html.setClass(_ef4,_ef5);
this.expandNodeTemplate=_ef4;
var _ef6=document.createElement("span");
dojo.html.setClass(_ef6,this.classPrefix+"Label");
this.labelNodeTemplate=_ef6;
var _ef7=document.createElement("div");
var _ef5=this.classPrefix+"Content";
if(dojo.render.html.ie&&!dojo.render.html.ie70){
_ef5=_ef5+" "+this.classPrefix+"IEContent";
}
dojo.html.setClass(_ef7,_ef5);
this.contentNodeTemplate=_ef7;
_ef3.appendChild(_ef4);
_ef3.appendChild(_ef7);
_ef7.appendChild(_ef6);
},makeContainerNodeTemplate:function(){
var div=document.createElement("div");
div.style.display="none";
dojo.html.setClass(div,this.classPrefix+"Container");
this.containerNodeTemplate=div;
},actions:{ADDCHILD:"ADDCHILD"},getInfo:function(){
var info={widgetId:this.widgetId,objectId:this.objectId};
return info;
},adjustEventNames:function(){
for(var name in this.eventNamesDefault){
if(dojo.lang.isUndefined(this.eventNames[name])){
this.eventNames[name]=this.widgetId+"/"+this.eventNamesDefault[name];
}
}
},adjustDndMode:function(){
var _efb=this;
var _efc=0;
dojo.lang.forEach(this.DndMode.split(";"),function(elem){
var mode=_efb.DndModes[dojo.string.trim(elem).toUpperCase()];
if(mode){
_efc=_efc|mode;
}
});
this.DndMode=_efc;
},destroy:function(){
dojo.event.topic.publish(this.tree.eventNames.beforeTreeDestroy,{source:this});
return dojo.widget.HtmlWidget.prototype.destroy.apply(this,arguments);
},initialize:function(args){
this.domNode.widgetId=this.widgetId;
for(var i=0;i<this.actionsDisabled.length;i++){
this.actionsDisabled[i]=this.actionsDisabled[i].toUpperCase();
}
if(!args.defaultChildWidget){
this.defaultChildWidget=dojo.widget.TreeNodeV3;
}else{
this.defaultChildWidget=dojo.lang.getObjPathValue(args.defaultChildWidget);
}
this.adjustEventNames();
this.adjustDndMode();
this.makeNodeTemplate();
this.makeContainerNodeTemplate();
this.containerNode=this.domNode;
dojo.html.setClass(this.domNode,this.classPrefix+"Container");
var _f01=this;
dojo.lang.forEach(this.listeners,function(elem){
var t=dojo.lang.isString(elem)?dojo.widget.byId(elem):elem;
t.listenTree(_f01);
});
},postCreate:function(){
dojo.event.topic.publish(this.eventNames.afterTreeCreate,{source:this});
},move:function(_f04,_f05,_f06){
if(!_f04.parent){
dojo.raise(this.widgetType+": child can be moved only while it's attached");
}
var _f07=_f04.parent;
var _f08=_f04.tree;
var _f09=_f04.getParentIndex();
var _f0a=_f05.tree;
var _f05=_f05;
var _f0b=_f06;
var _f0c={oldParent:_f07,oldTree:_f08,oldIndex:_f09,newParent:_f05,newTree:_f0a,newIndex:_f0b,child:_f04};
dojo.event.topic.publish(_f08.eventNames.beforeMoveFrom,_f0c);
dojo.event.topic.publish(_f0a.eventNames.beforeMoveTo,_f0c);
this.doMove.apply(this,arguments);
dojo.event.topic.publish(_f08.eventNames.afterMoveFrom,_f0c);
dojo.event.topic.publish(_f0a.eventNames.afterMoveTo,_f0c);
},doMove:function(_f0d,_f0e,_f0f){
_f0d.doDetach();
_f0e.doAddChild(_f0d,_f0f);
},toString:function(){
return "["+this.widgetType+" ID:"+this.widgetId+"]";
}});
dojo.provide("dojo.widget.TreeTimeoutIterator");
dojo.declare("dojo.widget.TreeTimeoutIterator",null,function(elem,_f11,_f12){
var _f13=this;
this.currentParent=elem;
this.callFunc=_f11;
this.callObj=_f12?_f12:this;
this.stack=[];
},{maxStackDepth:Number.POSITIVE_INFINITY,stack:null,currentParent:null,currentIndex:0,filterFunc:function(){
return true;
},finishFunc:function(){
return true;
},setFilter:function(func,obj){
this.filterFunc=func;
this.filterObj=obj;
},setMaxLevel:function(_f16){
this.maxStackDepth=_f16-2;
},forward:function(_f17){
var _f18=this;
if(this.timeout){
var tid=setTimeout(function(){
_f18.processNext();
clearTimeout(tid);
},_f18.timeout);
}else{
return this.processNext();
}
},start:function(_f1a){
if(_f1a){
return this.callFunc.call(this.callObj,this.currentParent,this);
}
return this.processNext();
},processNext:function(){
var _f1b;
var _f1c=this;
var _f1d;
var next;
if(this.maxStackDepth==-2){
return;
}
while(true){
var _f1f=this.currentParent.children;
if(_f1f&&_f1f.length){
do{
next=_f1f[this.currentIndex];
}while(this.currentIndex++<_f1f.length&&!(_f1d=this.filterFunc.call(this.filterObj,next)));
if(_f1d){
if(next.isFolder&&this.stack.length<=this.maxStackDepth){
this.moveParent(next,0);
}
return this.callFunc.call(this.callObj,next,this);
}
}
if(this.stack.length){
this.popParent();
continue;
}
break;
}
return this.finishFunc.call(this.finishObj);
},setFinish:function(func,obj){
this.finishFunc=func;
this.finishObj=obj;
},popParent:function(){
var p=this.stack.pop();
this.currentParent=p[0];
this.currentIndex=p[1];
},moveParent:function(_f23,_f24){
this.stack.push([this.currentParent,this.currentIndex]);
this.currentParent=_f23;
this.currentIndex=_f24;
}});
dojo.provide("dojo.widget.TreeBasicControllerV3");
dojo.widget.defineWidget("dojo.widget.TreeBasicControllerV3",[dojo.widget.HtmlWidget,dojo.widget.TreeCommon],function(){
this.listenedTrees={};
},{listenTreeEvents:["afterSetFolder","afterTreeCreate","beforeTreeDestroy"],listenNodeFilter:function(elem){
return elem instanceof dojo.widget.Widget;
},editor:null,initialize:function(args){
if(args.editor){
this.editor=dojo.widget.byId(args.editor);
this.editor.controller=this;
}
},getInfo:function(elem){
return elem.getInfo();
},onBeforeTreeDestroy:function(_f28){
this.unlistenTree(_f28.source);
},onAfterSetFolder:function(_f29){
if(_f29.source.expandLevel>0){
this.expandToLevel(_f29.source,_f29.source.expandLevel);
}
if(_f29.source.loadLevel>0){
this.loadToLevel(_f29.source,_f29.source.loadLevel);
}
},_focusNextVisible:function(_f2a){
if(_f2a.isFolder&&_f2a.isExpanded&&_f2a.children.length>0){
_f2b=_f2a.children[0];
}else{
while(_f2a.isTreeNode&&_f2a.isLastChild()){
_f2a=_f2a.parent;
}
if(_f2a.isTreeNode){
var _f2b=_f2a.parent.children[_f2a.getParentIndex()+1];
}
}
if(_f2b&&_f2b.isTreeNode){
this._focusLabel(_f2b);
return _f2b;
}
},_focusPreviousVisible:function(_f2c){
var _f2d=_f2c;
if(!_f2c.isFirstChild()){
var _f2e=_f2c.parent.children[_f2c.getParentIndex()-1];
_f2c=_f2e;
while(_f2c.isFolder&&_f2c.isExpanded&&_f2c.children.length>0){
_f2d=_f2c;
_f2c=_f2c.children[_f2c.children.length-1];
}
}else{
_f2c=_f2c.parent;
}
if(_f2c&&_f2c.isTreeNode){
_f2d=_f2c;
}
if(_f2d&&_f2d.isTreeNode){
this._focusLabel(_f2d);
return _f2d;
}
},_focusZoomIn:function(_f2f){
var _f30=_f2f;
if(_f2f.isFolder&&!_f2f.isExpanded){
this.expand(_f2f);
}else{
if(_f2f.children.length>0){
_f2f=_f2f.children[0];
}
}
if(_f2f&&_f2f.isTreeNode){
_f30=_f2f;
}
if(_f30&&_f30.isTreeNode){
this._focusLabel(_f30);
return _f30;
}
},_focusZoomOut:function(node){
var _f32=node;
if(node.isFolder&&node.isExpanded){
this.collapse(node);
}else{
node=node.parent;
}
if(node&&node.isTreeNode){
_f32=node;
}
if(_f32&&_f32.isTreeNode){
this._focusLabel(_f32);
return _f32;
}
},onFocusNode:function(e){
var node=this.domElement2TreeNode(e.target);
if(node){
node.viewFocus();
dojo.event.browser.stopEvent(e);
}
},onBlurNode:function(e){
var node=this.domElement2TreeNode(e.target);
if(!node){
return;
}
var _f37=node.labelNode;
_f37.setAttribute("tabIndex","-1");
node.viewUnf
