/*
	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:4,patch:1,flag:"",revision:Number("$Rev: 6425 $".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["enableMozDomContentLoaded"]===true))){
document.addEventListener("DOMContentLoaded",dj_load_init,null);
}
window.addEventListener("load",dj_load_init,null);
}
if(dojo.render.html.ie&&dojo.render.os.win){
document.write("<scr"+"ipt defer src=\"//:\" "+"onreadystatechange=\"if(this.readyState=='complete'){dj_load_init();}\">"+"</scr"+"ipt>");
}
if(/(WebKit|khtml)/i.test(navigator.userAgent)){
var _timer=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
dj_load_init();
}
},10);
}
if(dojo.render.html.ie){
dj_addNodeEvtHdlr(window,"beforeunload",function(){
dojo.hostenv._unloading=true;
window.setTimeout(function(){
dojo.hostenv._unloading=false;
},0);
});
}
dj_addNodeEvtHdlr(window,"unload",function(){
dojo.hostenv.unloaded();
if((!dojo.render.html.ie)||(dojo.render.html.ie&&dojo.hostenv._unloading)){
dojo.hostenv.unloaded();
}
});
dojo.hostenv.makeWidgets=function(){
var _d2=[];
if(djConfig.searchIds&&djConfig.searchIds.length>0){
_d2=_d2.concat(djConfig.searchIds);
}
if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){
_d2=_d2.concat(dojo.hostenv.searchIds);
}
if((djConfig.parseWidgets)||(_d2.length>0)){
if(dojo.evalObjPath("dojo.widget.Parse")){
var _d3=new dojo.xml.Parse();
if(_d2.length>0){
for(var x=0;x<_d2.length;x++){
var _d5=document.getElementById(_d2[x]);
if(!_d5){
continue;
}
var _d6=_d3.parseElement(_d5,null,true);
dojo.widget.getParser().createComponents(_d6);
}
}else{
if(djConfig.parseWidgets){
var _d6=_d3.parseElement(dojo.body(),null,true);
dojo.widget.getParser().createComponents(_d6);
}
}
}
}
};
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(_db,_dc){
dj_currentContext=_db;
dj_currentDocument=_dc;
};
dojo._fireCallback=function(_dd,_de,_df){
if((_de)&&((typeof _dd=="string")||(_dd instanceof String))){
_dd=_de[_dd];
}
return (_de?_dd.apply(_de,_df||[]):_dd());
};
dojo.withGlobal=function(_e0,_e1,_e2,_e3){
var _e4;
var _e5=dj_currentContext;
var _e6=dj_currentDocument;
try{
dojo.setContext(_e0,_e0.document);
_e4=dojo._fireCallback(_e1,_e2,_e3);
}
finally{
dojo.setContext(_e5,_e6);
}
return _e4;
};
dojo.withDoc=function(_e7,_e8,_e9,_ea){
var _eb;
var _ec=dj_currentDocument;
try{
dj_currentDocument=_e7;
_eb=dojo._fireCallback(_e8,_e9,_ea);
}
finally{
dj_currentDocument=_ec;
}
return _eb;
};
}
(function(){
if(typeof dj_usingBootstrap!="undefined"){
return;
}
var _ed=false;
var _ee=false;
var _ef=false;
if((typeof this["load"]=="function")&&((typeof this["Packages"]=="function")||(typeof this["Packages"]=="object"))){
_ed=true;
}else{
if(typeof this["load"]=="function"){
_ee=true;
}else{
if(window.widget){
_ef=true;
}
}
}
var _f0=[];
if((this["djConfig"])&&((djConfig["isDebug"])||(djConfig["debugAtAllCosts"]))){
_f0.push("debug.js");
}
if((this["djConfig"])&&(djConfig["debugAtAllCosts"])&&(!_ed)&&(!_ef)){
_f0.push("browser_debug.js");
}
var _f1=djConfig["baseScriptUri"];
if((this["djConfig"])&&(djConfig["baseLoaderUri"])){
_f1=djConfig["baseLoaderUri"];
}
for(var x=0;x<_f0.length;x++){
var _f3=_f1+"src/"+_f0[x];
if(_ed||_ee){
load(_f3);
}else{
try{
document.write("<scr"+"ipt type='text/javascript' src='"+_f3+"'></scr"+"ipt>");
}
catch(e){
var _f4=document.createElement("script");
_f4.src=_f3;
document.getElementsByTagName("head")[0].appendChild(_f4);
}
}
}
})();
dojo.provide("dojo.lang.common");
dojo.lang.inherits=function(_f5,_f6){
if(!dojo.lang.isFunction(_f6)){
dojo.raise("dojo.inherits: superclass argument ["+_f6+"] must be a function (subclass: ["+_f5+"']");
}
_f5.prototype=new _f6();
_f5.prototype.constructor=_f5;
_f5.superclass=_f6.prototype;
_f5["super"]=_f6.prototype;
};
dojo.lang._mixin=function(obj,_f8){
var _f9={};
for(var x in _f8){
if((typeof _f9[x]=="undefined")||(_f9[x]!=_f8[x])){
obj[x]=_f8[x];
}
}
if(dojo.render.html.ie&&(typeof (_f8["toString"])=="function")&&(_f8["toString"]!=obj["toString"])&&(_f8["toString"]!=_f9["toString"])){
obj.toString=_f8.toString;
}
return obj;
};
dojo.lang.mixin=function(obj,_fc){
for(var i=1,l=arguments.length;i<l;i++){
dojo.lang._mixin(obj,arguments[i]);
}
return obj;
};
dojo.lang.extend=function(_ff,_100){
for(var i=1,l=arguments.length;i<l;i++){
dojo.lang._mixin(_ff.prototype,arguments[i]);
}
return _ff;
};
dojo.lang._delegate=function(obj){
function TMP(){
}
TMP.prototype=obj;
return new TMP();
};
dojo.inherits=dojo.lang.inherits;
dojo.mixin=dojo.lang.mixin;
dojo.extend=dojo.lang.extend;
dojo.lang.find=function(_104,_105,_106,_107){
if(!dojo.lang.isArrayLike(_104)&&dojo.lang.isArrayLike(_105)){
dojo.deprecated("dojo.lang.find(value, array)","use dojo.lang.find(array, value) instead","0.5");
var temp=_104;
_104=_105;
_105=temp;
}
var _109=dojo.lang.isString(_104);
if(_109){
_104=_104.split("");
}
if(_107){
var step=-1;
var i=_104.length-1;
var end=-1;
}else{
var step=1;
var i=0;
var end=_104.length;
}
if(_106){
while(i!=end){
if(_104[i]===_105){
return i;
}
i+=step;
}
}else{
while(i!=end){
if(_104[i]==_105){
return i;
}
i+=step;
}
}
return -1;
};
dojo.lang.indexOf=dojo.lang.find;
dojo.lang.findLast=function(_10d,_10e,_10f){
return dojo.lang.find(_10d,_10e,_10f,true);
};
dojo.lang.lastIndexOf=dojo.lang.findLast;
dojo.lang.inArray=function(_110,_111){
return dojo.lang.find(_110,_111)>-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.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 _11d=dojo.doc();
do{
var id="dj_unique_"+(++arguments.callee._idIncrement);
}while(_11d.getElementById(id));
return id;
};
dojo.dom.getUniqueId._idIncrement=0;
dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(_11f,_120){
var node=_11f.firstChild;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.nextSibling;
}
if(_120&&node&&node.tagName&&node.tagName.toLowerCase()!=_120.toLowerCase()){
node=dojo.dom.nextElement(node,_120);
}
return node;
};
dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_122,_123){
var node=_122.lastChild;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.previousSibling;
}
if(_123&&node&&node.tagName&&node.tagName.toLowerCase()!=_123.toLowerCase()){
node=dojo.dom.prevElement(node,_123);
}
return node;
};
dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(node,_126){
if(!node){
return null;
}
do{
node=node.nextSibling;
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
if(node&&_126&&_126.toLowerCase()!=node.tagName.toLowerCase()){
return dojo.dom.nextElement(node,_126);
}
return node;
};
dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(node,_128){
if(!node){
return null;
}
if(_128){
_128=_128.toLowerCase();
}
do{
node=node.previousSibling;
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
if(node&&_128&&_128.toLowerCase()!=node.tagName.toLowerCase()){
return dojo.dom.prevElement(node,_128);
}
return node;
};
dojo.dom.moveChildren=function(_129,_12a,trim){
var _12c=0;
if(trim){
while(_129.hasChildNodes()&&_129.firstChild.nodeType==dojo.dom.TEXT_NODE){
_129.removeChild(_129.firstChild);
}
while(_129.hasChildNodes()&&_129.lastChild.nodeType==dojo.dom.TEXT_NODE){
_129.removeChild(_129.lastChild);
}
}
while(_129.hasChildNodes()){
_12a.appendChild(_129.firstChild);
_12c++;
}
return _12c;
};
dojo.dom.copyChildren=function(_12d,_12e,trim){
var _130=_12d.cloneNode(true);
return this.moveChildren(_130,_12e,trim);
};
dojo.dom.replaceChildren=function(node,_132){
var _133=[];
if(dojo.render.html.ie){
for(var i=0;i<node.childNodes.length;i++){
_133.push(node.childNodes[i]);
}
}
dojo.dom.removeChildren(node);
node.appendChild(_132);
for(var i=0;i<_133.length;i++){
dojo.dom.destroyNode(_133[i]);
}
};
dojo.dom.removeChildren=function(node){
var _136=node.childNodes.length;
while(node.hasChildNodes()){
dojo.dom.removeNode(node.firstChild);
}
return _136;
};
dojo.dom.replaceNode=function(node,_138){
return node.parentNode.replaceChild(_138,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,_13c,_13d){
var _13e=[];
var _13f=(_13c&&(_13c instanceof Function||typeof _13c=="function"));
while(node){
if(!_13f||_13c(node)){
_13e.push(node);
}
if(_13d&&_13e.length>0){
return _13e[0];
}
node=node.parentNode;
}
if(_13d){
return null;
}
return _13e;
};
dojo.dom.getAncestorsByTag=function(node,tag,_142){
tag=tag.toLowerCase();
return dojo.dom.getAncestors(node,function(el){
return ((el.tagName)&&(el.tagName.toLowerCase()==tag));
},_142);
};
dojo.dom.getFirstAncestorByTag=function(node,tag){
return dojo.dom.getAncestorsByTag(node,tag,true);
};
dojo.dom.isDescendantOf=function(node,_147,_148){
if(_148&&node){
node=node.parentNode;
}
while(node){
if(node==_147){
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 _14b=dojo.doc();
if(!dj_undef("ActiveXObject")){
var _14c=["MSXML2","Microsoft","MSXML","MSXML3"];
for(var i=0;i<_14c.length;i++){
try{
doc=new ActiveXObject(_14c[i]+".XMLDOM");
}
catch(e){
}
if(doc){
break;
}
}
}else{
if((_14b.implementation)&&(_14b.implementation.createDocument)){
doc=_14b.implementation.createDocument("","",null);
}
}
return doc;
};
dojo.dom.createDocumentFromText=function(str,_14f){
if(!_14f){
_14f="text/xml";
}
if(!dj_undef("DOMParser")){
var _150=new DOMParser();
return _150.parseFromString(str,_14f);
}else{
if(!dj_undef("ActiveXObject")){
var _151=dojo.dom.createDocument();
if(_151){
_151.async=false;
_151.loadXML(str);
return _151;
}else{
dojo.debug("toXml didn't work?");
}
}else{
var _152=dojo.doc();
if(_152.createElement){
var tmp=_152.createElement("xml");
tmp.innerHTML=str;
if(_152.implementation&&_152.implementation.createDocument){
var _154=_152.implementation.createDocument("foo","",null);
for(var i=0;i<tmp.childNodes.length;i++){
_154.importNode(tmp.childNodes.item(i),true);
}
return _154;
}
return ((tmp.document)&&(tmp.document.firstChild?tmp.document.firstChild:tmp));
}
}
}
return null;
};
dojo.dom.prependChild=function(node,_157){
if(_157.firstChild){
_157.insertBefore(node,_157.firstChild);
}else{
_157.appendChild(node);
}
return true;
};
dojo.dom.insertBefore=function(node,ref,_15a){
if((_15a!=true)&&(node===ref||node.nextSibling===ref)){
return false;
}
var _15b=ref.parentNode;
_15b.insertBefore(node,ref);
return true;
};
dojo.dom.insertAfter=function(node,ref,_15e){
var pn=ref.parentNode;
if(ref==pn.lastChild){
if((_15e!=true)&&(node===ref)){
return false;
}
pn.appendChild(node);
}else{
return this.insertBefore(node,ref.nextSibling,_15e);
}
return true;
};
dojo.dom.insertAtPosition=function(node,ref,_162){
if((!node)||(!ref)||(!_162)){
return false;
}
switch(_162.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,_164,_165){
var _166=_164.childNodes;
if(!_166.length||_166.length==_165){
_164.appendChild(node);
return true;
}
if(_165==0){
return dojo.dom.prependChild(node,_164);
}
return dojo.dom.insertAfter(node,_166[_165-1]);
};
dojo.dom.textContent=function(node,text){
if(arguments.length>1){
var _169=dojo.doc();
dojo.dom.replaceChildren(node,_169.createTextNode(text));
return text;
}else{
if(node.textContent!=undefined){
return node.textContent;
}
var _16a="";
if(node==null){
return _16a;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
_16a+=dojo.dom.textContent(node.childNodes[i]);
break;
case 3:
case 2:
case 4:
_16a+=node.childNodes[i].nodeValue;
break;
default:
break;
}
}
return _16a;
}
};
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,_170,_171,_172){
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(_170,_171,_172);
}else{
var _173=elem.ownerDocument;
var _174=_173.createNode(2,_171,_170);
_174.nodeValue=_172;
elem.setAttributeNode(_174);
}
};
dojo.provide("dojo.html.common");
dojo.lang.mixin(dojo.html,dojo.dom);
dojo.html.getEventTarget=function(evt){
if(!evt){
evt=dojo.global().event||{};
}
var t=(evt.srcElement?evt.srcElement:(evt.target?evt.target:null));
while((t)&&(t.nodeType!=1)){
t=t.parentNode;
}
return t;
};
dojo.html.getViewport=function(){
var _177=dojo.global();
var _178=dojo.doc();
var w=0;
var h=0;
if(dojo.render.html.mozilla){
w=_178.documentElement.clientWidth;
h=_177.innerHeight;
}else{
if(!dojo.render.html.opera&&_177.innerWidth){
w=_177.innerWidth;
h=_177.innerHeight;
}else{
if(!dojo.render.html.opera&&dojo.exists(_178,"documentElement.clientWidth")){
var w2=_178.documentElement.clientWidth;
if(!w||w2&&w2<w){
w=w2;
}
h=_178.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 _17c=dojo.global();
var _17d=dojo.doc();
var top=_17c.pageYOffset||_17d.documentElement.scrollTop||dojo.body().scrollTop||0;
var left=_17c.pageXOffset||_17d.documentElement.scrollLeft||dojo.body().scrollLeft||0;
return {top:top,left:left,offset:{x:left,y:top}};
};
dojo.html.getParentByType=function(node,type){
var _182=dojo.doc();
var _183=dojo.byId(node);
type=type.toLowerCase();
while((_183)&&(_183.nodeName.toLowerCase()!=type)){
if(_183==(_182["body"]||_182["documentElement"])){
return null;
}
_183=_183.parentNode;
}
return _183;
};
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 _18b={x:0,y:0};
if(e.pageX||e.pageY){
_18b.x=e.pageX;
_18b.y=e.pageY;
}else{
var de=dojo.doc().documentElement;
var db=dojo.body();
_18b.x=e.clientX+((de||db)["scrollLeft"])-((de||db)["clientLeft"]);
_18b.y=e.clientY+((de||db)["scrollTop"])-((de||db)["clientTop"]);
}
return _18b;
};
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 _190=dojo.doc().createElement("script");
_190.src="javascript:'dojo.html.createExternalElement=function(doc, tag){ return doc.createElement(tag); }'";
dojo.doc().getElementsByTagName("head")[0].appendChild(_190);
})();
}
}else{
dojo.html.createExternalElement=function(doc,tag){
return doc.createElement(tag);
};
}
dojo.provide("dojo.uri.Uri");
dojo.uri=new function(){
this.dojoUri=function(uri){
return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(),uri);
};
this.moduleUri=function(_194,uri){
var loc=dojo.hostenv.getModuleSymbols(_194).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 _199=new dojo.uri.Uri(arguments[i].toString());
var _19a=new dojo.uri.Uri(uri.toString());
if((_199.path=="")&&(_199.scheme==null)&&(_199.authority==null)&&(_199.query==null)){
if(_199.fragment!=null){
_19a.fragment=_199.fragment;
}
_199=_19a;
}else{
if(_199.scheme==null){
_199.scheme=_19a.scheme;
if(_199.authority==null){
_199.authority=_19a.authority;
if(_199.path.charAt(0)!="/"){
var path=_19a.path.substring(0,_19a.path.lastIndexOf("/")+1)+_199.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;
}
}
}
}
_199.path=segs.join("/");
}
}
}
}
uri="";
if(_199.scheme!=null){
uri+=_199.scheme+":";
}
if(_199.authority!=null){
uri+="//"+_199.authority;
}
uri+=_199.path;
if(_199.query!=null){
uri+="?"+_199.query;
}
if(_199.fragment!=null){
uri+="#"+_199.fragment;
}
}
this.uri=uri.toString();
var _19e="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";
var r=this.uri.match(new RegExp(_19e));
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){
_19e="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$";
r=this.authority.match(new RegExp(_19e));
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,_1a5){
return (new RegExp("(^|\\s+)"+_1a5+"(\\s+|$)")).test(dojo.html.getClass(node));
};
dojo.html.prependClass=function(node,_1a7){
_1a7+=" "+dojo.html.getClass(node);
return dojo.html.setClass(node,_1a7);
};
dojo.html.addClass=function(node,_1a9){
if(dojo.html.hasClass(node,_1a9)){
return false;
}
_1a9=(dojo.html.getClass(node)+" "+_1a9).replace(/^\s+|\s+$/g,"");
return dojo.html.setClass(node,_1a9);
};
dojo.html.setClass=function(node,_1ab){
node=dojo.byId(node);
var cs=new String(_1ab);
try{
if(typeof node.className=="string"){
node.className=cs;
}else{
if(node.setAttribute){
node.setAttribute("class",_1ab);
node.className=cs;
}else{
return false;
}
}
}
catch(e){
dojo.debug("dojo.html.setClass() failed",e);
}
return true;
};
dojo.html.removeClass=function(node,_1ae,_1af){
try{
if(!_1af){
var _1b0=dojo.html.getClass(node).replace(new RegExp("(^|\\s+)"+_1ae+"(\\s+|$)"),"$1$2");
}else{
var _1b0=dojo.html.getClass(node).replace(_1ae,"");
}
dojo.html.setClass(node,_1b0);
}
catch(e){
dojo.debug("dojo.html.removeClass() failed",e);
}
return true;
};
dojo.html.replaceClass=function(node,_1b2,_1b3){
dojo.html.removeClass(node,_1b3);
dojo.html.addClass(node,_1b2);
};
dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2};
dojo.html.getElementsByClass=function(_1b4,_1b5,_1b6,_1b7,_1b8){
_1b8=false;
var _1b9=dojo.doc();
_1b5=dojo.byId(_1b5)||_1b9;
var _1ba=_1b4.split(/\s+/g);
var _1bb=[];
if(_1b7!=1&&_1b7!=2){
_1b7=0;
}
var _1bc=new RegExp("(\\s|^)(("+_1ba.join(")|(")+"))(\\s|$)");
var _1bd=_1ba.join(" ").length;
var _1be=[];
if(!_1b8&&_1b9.evaluate){
var _1bf=".//"+(_1b6||"*")+"[contains(";
if(_1b7!=dojo.html.classMatchType.ContainsAny){
_1bf+="concat(' ',@class,' '), ' "+_1ba.join(" ') and contains(concat(' ',@class,' '), ' ")+" ')";
if(_1b7==2){
_1bf+=" and string-length(@class)="+_1bd+"]";
}else{
_1bf+="]";
}
}else{
_1bf+="concat(' ',@class,' '), ' "+_1ba.join(" ') or contains(concat(' ',@class,' '), ' ")+" ')]";
}
var _1c0=_1b9.evaluate(_1bf,_1b5,null,XPathResult.ANY_TYPE,null);
var _1c1=_1c0.iterateNext();
while(_1c1){
try{
_1be.push(_1c1);
_1c1=_1c0.iterateNext();
}
catch(e){
break;
}
}
return _1be;
}else{
if(!_1b6){
_1b6="*";
}
_1be=_1b5.getElementsByTagName(_1b6);
var node,i=0;
outer:
while(node=_1be[i++]){
var _1c4=dojo.html.getClasses(node);
if(_1c4.length==0){
continue outer;
}
var _1c5=0;
for(var j=0;j<_1c4.length;j++){
if(_1bc.test(_1c4[j])){
if(_1b7==dojo.html.classMatchType.ContainsAny){
_1bb.push(node);
continue outer;
}else{
_1c5++;
}
}else{
if(_1b7==dojo.html.classMatchType.IsOnly){
continue outer;
}
}
}
if(_1c5==_1ba.length){
if((_1b7==dojo.html.classMatchType.IsOnly)&&(_1c5==_1c4.length)){
_1bb.push(node);
}else{
if(_1b7==dojo.html.classMatchType.ContainsAll){
_1bb.push(node);
}
}
}
}
return _1bb;
}
};
dojo.html.getElementsByClassName=dojo.html.getElementsByClass;
dojo.html.toCamelCase=function(_1c7){
var arr=_1c7.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(_1cb){
return _1cb.replace(/([A-Z])/g,"-$1").toLowerCase();
};
dojo.html.getComputedStyle=function(node,_1cd,_1ce){
node=dojo.byId(node);
var _1cd=dojo.html.toSelectorCase(_1cd);
var _1cf=dojo.html.toCamelCase(_1cd);
if(!node||!node.style){
return _1ce;
}else{
if(document.defaultView&&dojo.html.isDescendantOf(node,node.ownerDocument)){
try{
var cs=document.defaultView.getComputedStyle(node,"");
if(cs){
return cs.getPropertyValue(_1cd);
}
}
catch(e){
if(node.style.getPropertyValue){
return node.style.getPropertyValue(_1cd);
}else{
return _1ce;
}
}
}else{
if(node.currentStyle){
return node.currentStyle[_1cf];
}
}
}
if(node.style.getPropertyValue){
return node.style.getPropertyValue(_1cd);
}else{
return _1ce;
}
};
dojo.html.getStyleProperty=function(node,_1d2){
node=dojo.byId(node);
return (node&&node.style?node.style[dojo.html.toCamelCase(_1d2)]:undefined);
};
dojo.html.getStyle=function(node,_1d4){
var _1d5=dojo.html.getStyleProperty(node,_1d4);
return (_1d5?_1d5:dojo.html.getComputedStyle(node,_1d4));
};
dojo.html.setStyle=function(node,_1d7,_1d8){
node=dojo.byId(node);
if(node&&node.style){
var _1d9=dojo.html.toCamelCase(_1d7);
node.style[_1d9]=_1d8;
}
};
dojo.html.setStyleText=function(_1da,text){
try{
_1da.style.cssText=text;
}
catch(e){
_1da.setAttribute("style",text);
}
};
dojo.html.copyStyle=function(_1dc,_1dd){
if(!_1dd.style.cssText){
_1dc.setAttribute("style",_1dd.getAttribute("style"));
}else{
_1dc.style.cssText=_1dd.style.cssText;
}
dojo.html.addClass(_1dc,dojo.html.getClass(_1dd));
};
dojo.html.getUnitValue=function(node,_1df,_1e0){
var s=dojo.html.getComputedStyle(node,_1df);
if((!s)||((s=="auto")&&(_1e0))){
return {value:0,units:"px"};
}
var _1e2=s.match(/(\-?[\d.]+)([a-z%]*)/i);
if(!_1e2){
return dojo.html.getUnitValue.bad;
}
return {value:Number(_1e2[1]),units:_1e2[2].toLowerCase()};
};
dojo.html.getUnitValue.bad={value:NaN,units:""};
dojo.html.getPixelValue=function(node,_1e4,_1e5){
var _1e6=dojo.html.getUnitValue(node,_1e4,_1e5);
if(isNaN(_1e6.value)){
return 0;
}
if((_1e6.value)&&(_1e6.units!="px")){
return NaN;
}
return _1e6.value;
};
dojo.html.setPositivePixelValue=function(node,_1e8,_1e9){
if(isNaN(_1e9)){
return false;
}
node.style[_1e8]=Math.max(0,_1e9)+"px";
return true;
};
dojo.html.styleSheet=null;
dojo.html.insertCssRule=function(_1ea,_1eb,_1ec){
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){
_1ec=dojo.html.styleSheet.cssRules.length;
}else{
if(dojo.html.styleSheet.rules){
_1ec=dojo.html.styleSheet.rules.length;
}else{
return null;
}
}
}
if(dojo.html.styleSheet.insertRule){
var rule=_1ea+" { "+_1eb+" }";
return dojo.html.styleSheet.insertRule(rule,_1ec);
}else{
if(dojo.html.styleSheet.addRule){
return dojo.html.styleSheet.addRule(_1ea,_1eb,_1ec);
}else{
return null;
}
}
};
dojo.html.removeCssRule=function(_1ee){
if(!dojo.html.styleSheet){
dojo.debug("no stylesheet defined for removing rules");
return false;
}
if(dojo.render.html.ie){
if(!_1ee){
_1ee=dojo.html.styleSheet.rules.length;
dojo.html.styleSheet.removeRule(_1ee);
}
}else{
if(document.styleSheets[0]){
if(!_1ee){
_1ee=dojo.html.styleSheet.cssRules.length;
}
dojo.html.styleSheet.deleteRule(_1ee);
}
}
return true;
};
dojo.html._insertedCssFiles=[];
dojo.html.insertCssFile=function(URI,doc,_1f1,_1f2){
if(!URI){
return;
}
if(!doc){
doc=document;
}
var _1f3=dojo.hostenv.getText(URI,false,_1f2);
if(_1f3===null){
return;
}
_1f3=dojo.html.fixPathsInCssText(_1f3,URI);
if(_1f1){
var idx=-1,node,ent=dojo.html._insertedCssFiles;
for(var i=0;i<ent.length;i++){
if((ent[i].doc==doc)&&(ent[i].cssText==_1f3)){
idx=i;
node=ent[i].nodeRef;
break;
}
}
if(node){
var _1f8=doc.getElementsByTagName("style");
for(var i=0;i<_1f8.length;i++){
if(_1f8[i]==node){
return;
}
}
dojo.html._insertedCssFiles.shift(idx,1);
}
}
var _1f9=dojo.html.insertCssText(_1f3,doc);
dojo.html._insertedCssFiles.push({"doc":doc,"cssText":_1f3,"nodeRef":_1f9});
if(_1f9&&djConfig.isDebug){
_1f9.setAttribute("dbgHref",URI);
}
return _1f9;
};
dojo.html.insertCssText=function(_1fa,doc,URI){
if(!_1fa){
return;
}
if(!doc){
doc=document;
}
if(URI){
_1fa=dojo.html.fixPathsInCssText(_1fa,URI);
}
var _1fd=doc.createElement("style");
_1fd.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(_1fd);
}
if(_1fd.styleSheet){
var _1ff=function(){
try{
_1fd.styleSheet.cssText=_1fa;
}
catch(e){
dojo.debug(e);
}
};
if(_1fd.styleSheet.disabled){
setTimeout(_1ff,10);
}else{
_1ff();
}
}else{
var _200=doc.createTextNode(_1fa);
_1fd.appendChild(_200);
}
return _1fd;
};
dojo.html.fixPathsInCssText=function(_201,URI){
if(!_201||!URI){
return;
}
var _203,str="",url="",_206="[\\t\\s\\w\\(\\)\\/\\.\\\\'\"-:#=&?~]+";
var _207=new RegExp("url\\(\\s*("+_206+")\\s*\\)");
var _208=/(file|https?|ftps?):\/\//;
regexTrim=new RegExp("^[\\s]*(['\"]?)("+_206+")\\1[\\s]*?$");
if(dojo.render.html.ie55||dojo.render.html.ie60){
var _209=new RegExp("AlphaImageLoader\\((.*)src=['\"]("+_206+")['\"]");
while(_203=_209.exec(_201)){
url=_203[2].replace(regexTrim,"$2");
if(!_208.exec(url)){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=_201.substring(0,_203.index)+"AlphaImageLoader("+_203[1]+"src='"+url+"'";
_201=_201.substr(_203.index+_203[0].length);
}
_201=str+_201;
str="";
}
while(_203=_207.exec(_201)){
url=_203[1].replace(regexTrim,"$2");
if(!_208.exec(url)){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=_201.substring(0,_203.index)+"url("+url+")";
_201=_201.substr(_203.index+_203[0].length);
}
return str+_201;
};
dojo.html.setActiveStyleSheet=function(_20a){
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")==_20a){
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 _216={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 _216){
if(_216[p]){
dojo.html.addClass(node,p);
}
}
};
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 _21c=0;
for(var x in obj){
if(obj[x]&&(!tmp[x])){
_21c++;
break;
}
}
return _21c==0;
}else{
if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){
return obj.length==0;
}
}
},map:function(arr,obj,_220){
var _221=dojo.lang.isString(arr);
if(_221){
arr=arr.split("");
}
if(dojo.lang.isFunction(obj)&&(!_220)){
_220=obj;
obj=dj_global;
}else{
if(dojo.lang.isFunction(obj)&&_220){
var _222=obj;
obj=_220;
_220=_222;
}
}
if(Array.map){
var _223=Array.map(arr,_220,obj);
}else{
var _223=[];
for(var i=0;i<arr.length;++i){
_223.push(_220.call(obj,arr[i]));
}
}
if(_221){
return _223.join("");
}else{
return _223;
}
},reduce:function(arr,_226,obj,_228){
var _229=_226;
if(arguments.length==1){
dojo.debug("dojo.lang.reduce called with too few arguments!");
return false;
}else{
if(arguments.length==2){
_228=_226;
_229=arr.shift();
}else{
if(arguments.lenght==3){
if(dojo.lang.isFunction(obj)){
_228=obj;
obj=null;
}
}else{
if(dojo.lang.isFunction(obj)){
var tmp=_228;
_228=obj;
obj=tmp;
}
}
}
}
var ob=obj?obj:dj_global;
dojo.lang.map(arr,function(val){
_229=_228.call(ob,_229,val);
});
return _229;
},forEach:function(_22d,_22e,_22f){
if(dojo.lang.isString(_22d)){
_22d=_22d.split("");
}
if(Array.forEach){
Array.forEach(_22d,_22e,_22f);
}else{
if(!_22f){
_22f=dj_global;
}
for(var i=0,l=_22d.length;i<l;i++){
_22e.call(_22f,_22d[i],i,_22d);
}
}
},_everyOrSome:function(_232,arr,_234,_235){
if(dojo.lang.isString(arr)){
arr=arr.split("");
}
if(Array.every){
return Array[_232?"every":"some"](arr,_234,_235);
}else{
if(!_235){
_235=dj_global;
}
for(var i=0,l=arr.length;i<l;i++){
var _238=_234.call(_235,arr[i],i,arr);
if(_232&&!_238){
return false;
}else{
if((!_232)&&(_238)){
return true;
}
}
}
return Boolean(_232);
}
},every:function(arr,_23a,_23b){
return this._everyOrSome(true,arr,_23a,_23b);
},some:function(arr,_23d,_23e){
return this._everyOrSome(false,arr,_23d,_23e);
},filter:function(arr,_240,_241){
var _242=dojo.lang.isString(arr);
if(_242){
arr=arr.split("");
}
var _243;
if(Array.filter){
_243=Array.filter(arr,_240,_241);
}else{
if(!_241){
if(arguments.length>=3){
dojo.raise("thisObject doesn't exist!");
}
_241=dj_global;
}
_243=[];
for(var i=0;i<arr.length;i++){
if(_240.call(_241,arr[i],i,arr)){
_243.push(arr[i]);
}
}
}
if(_242){
return _243.join("");
}else{
return _243;
}
},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(_248,_249){
var _24a=[];
for(var i=_249||0;i<_248.length;i++){
_24a.push(_248[i]);
}
return _24a;
}});
dojo.provide("dojo.lang.extras");
dojo.lang.setTimeout=function(func,_24d){
var _24e=window,_24f=2;
if(!dojo.lang.isFunction(func)){
_24e=func;
func=_24d;
_24d=arguments[2];
_24f++;
}
if(dojo.lang.isString(func)){
func=_24e[func];
}
var args=[];
for(var i=_24f;i<arguments.length;i++){
args.push(arguments[i]);
}
return dojo.global().setTimeout(function(){
func.apply(_24e,args);
},_24d);
};
dojo.lang.clearTimeout=function(_252){
dojo.global().clearTimeout(_252);
};
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(_25b,_25c,_25d){
with(dojo.parseObjPath(_25b,_25c,_25d)){
return dojo.evalProp(prop,obj,_25d);
}
};
dojo.lang.setObjPathValue=function(_25e,_25f,_260,_261){
dojo.deprecated("dojo.lang.setObjPathValue","use dojo.parseObjPath and the '=' operator","0.6");
if(arguments.length<4){
_261=true;
}
with(dojo.parseObjPath(_25e,_260,_261)){
if(obj&&(_261||(prop in obj))){
obj[prop]=_25f;
}
}
};
dojo.provide("dojo.lang.func");
dojo.lang.hitch=function(_262,_263){
var fcn=(dojo.lang.isString(_263)?_262[_263]:_263)||function(){
};
return function(){
return fcn.apply(_262,arguments);
};
};
dojo.lang.anonCtr=0;
dojo.lang.anon={};
dojo.lang.nameAnonFunc=function(_265,_266,_267){
var nso=(_266||dojo.lang.anon);
if((_267)||((dj_global["djConfig"])&&(djConfig["slowAnonFuncLookups"]==true))){
for(var x in nso){
try{
if(nso[x]===_265){
return x;
}
}
catch(e){
}
}
}
var ret="__"+dojo.lang.anonCtr++;
while(typeof nso[ret]!="undefined"){
ret="__"+dojo.lang.anonCtr++;
}
nso[ret]=_265;
return ret;
};
dojo.lang.forward=function(_26b){
return function(){
return this[_26b].apply(this,arguments);
};
};
dojo.lang.curry=function(_26c,func){
var _26e=[];
_26c=_26c||dj_global;
if(dojo.lang.isString(func)){
func=_26c[func];
}
for(var x=2;x<arguments.length;x++){
_26e.push(arguments[x]);
}
var _270=(func["__preJoinArity"]||func.length)-_26e.length;
function gather(_271,_272,_273){
var _274=_273;
var _275=_272.slice(0);
for(var x=0;x<_271.length;x++){
_275.push(_271[x]);
}
_273=_273-_271.length;
if(_273<=0){
var res=func.apply(_26c,_275);
_273=_274;
return res;
}else{
return function(){
return gather(arguments,_275,_273);
};
}
}
return gather([],_26e,_270);
};
dojo.lang.curryArguments=function(_278,func,args,_27b){
var _27c=[];
var x=_27b||0;
for(x=_27b;x<args.length;x++){
_27c.push(args[x]);
}
return dojo.lang.curry.apply(dojo.lang,[_278,func].concat(_27c));
};
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,_282,_283){
if(!farr.length){
if(typeof _283=="function"){
_283();
}
return;
}
if((typeof _282=="undefined")&&(typeof cb=="number")){
_282=cb;
cb=function(){
};
}else{
if(!cb){
cb=function(){
};
if(!_282){
_282=0;
}
}
}
setTimeout(function(){
(farr.shift())();
cb();
dojo.lang.delayThese(farr,cb,_282,_283);
},_282);
};
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,_285){
var dl=dojo.lang;
var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(args.length>2)?args[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false,maxCalls:-1};
switch(args.length){
case 0:
return;
case 1:
return;
case 2:
ao.srcFunc=args[0];
ao.adviceFunc=args[1];
break;
case 3:
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=args[0];
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
}else{
if((dl.isString(args[1]))&&(dl.isString(args[2]))){
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
}else{
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){
ao.adviceType="after";
ao.srcObj=args[0];
ao.srcFunc=args[1];
var _288=dl.nameAnonFunc(args[2],ao.adviceObj,_285);
ao.adviceFunc=_288;
}else{
if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=dj_global;
var _288=dl.nameAnonFunc(args[0],ao.srcObj,_285);
ao.srcFunc=_288;
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 _288=dl.nameAnonFunc(args[1],dj_global,_285);
ao.srcFunc=_288;
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 _288=dl.nameAnonFunc(args[3],dj_global,_285);
ao.adviceObj=dj_global;
ao.adviceFunc=_288;
}else{
if(dl.isObject(args[1])){
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=dj_global;
ao.adviceFunc=args[3];
}else{
if(dl.isObject(args[2])){
ao.srcObj=dj_global;
ao.srcFunc=args[1];
ao.adviceObj=args[2];
ao.adviceFunc=args[3];
}else{
ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global;
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
ao.aroundFunc=args[3];
}
}
}
}
}
}
break;
case 6:
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=args[3];
ao.adviceFunc=args[4];
ao.aroundFunc=args[5];
ao.aroundObj=dj_global;
break;
default:
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=args[3];
ao.adviceFunc=args[4];
ao.aroundObj=args[5];
ao.aroundFunc=args[6];
ao.once=args[7];
ao.delay=args[8];
ao.rate=args[9];
ao.adviceMsg=args[10];
ao.maxCalls=(!isNaN(parseInt(args[11])))?args[11]:-1;
break;
}
if(dl.isFunction(ao.aroundFunc)){
var _288=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,_285);
ao.aroundFunc=_288;
}
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 _28a={};
for(var x in ao){
_28a[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);
}
_28a.srcObj=src;
mjps.push(dojo.event.connect.call(dojo.event,_28a));
});
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 _292;
if((arguments.length==1)&&(typeof a1=="object")){
_292=a1;
}else{
_292={srcObj:a1,srcFunc:a2};
}
_292.adviceFunc=function(){
var _293=[];
for(var x=0;x<arguments.length;x++){
_293.push(arguments[x]);
}
dojo.debug("("+_292.srcObj+")."+_292.srcFunc,":",_293.join(", "));
};
this.kwConnect(_292);
};
this.connectBefore=function(){
var args=["before"];
for(var i=0;i<arguments.length;i++){
args.push(arguments[i]);
}
return this.connect.apply(this,args);
};
this.connectAround=function(){
var args=["around"];
for(var i=0;i<arguments.length;i++){
args.push(arguments[i]);
}
return this.connect.apply(this,args);
};
this.connectOnce=function(){
var ao=interpolateArgs(arguments,true);
ao.once=true;
return this.connect(ao);
};
this.connectRunOnce=function(){
var ao=interpolateArgs(arguments,true);
ao.maxCalls=1;
return this.connect(ao);
};
this._kwConnectImpl=function(_29b,_29c){
var fn=(_29c)?"disconnect":"connect";
if(typeof _29b["srcFunc"]=="function"){
_29b.srcObj=_29b["srcObj"]||dj_global;
var _29e=dojo.lang.nameAnonFunc(_29b.srcFunc,_29b.srcObj,true);
_29b.srcFunc=_29e;
}
if(typeof _29b["adviceFunc"]=="function"){
_29b.adviceObj=_29b["adviceObj"]||dj_global;
var _29e=dojo.lang.nameAnonFunc(_29b.adviceFunc,_29b.adviceObj,true);
_29b.adviceFunc=_29e;
}
_29b.srcObj=_29b["srcObj"]||dj_global;
_29b.adviceObj=_29b["adviceObj"]||_29b["targetObj"]||dj_global;
_29b.adviceFunc=_29b["adviceFunc"]||_29b["targetFunc"];
return dojo.event[fn](_29b);
};
this.kwConnect=function(_29f){
return this._kwConnectImpl(_29f,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(_2a2){
return this._kwConnectImpl(_2a2,true);
};
};
dojo.event.MethodInvocation=function(_2a3,obj,args){
this.jp_=_2a3;
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,_2ab){
this.object=obj||dj_global;
this.methodname=_2ab;
this.methodfunc=this.object[_2ab];
};
dojo.event.MethodJoinPoint.getForMethod=function(obj,_2ad){
if(!obj){
obj=dj_global;
}
var ofn=obj[_2ad];
if(!ofn){
ofn=obj[_2ad]=function(){
};
if(!obj[_2ad]){
dojo.raise("Cannot set do-nothing method on that object "+_2ad);
}
}else{
if((typeof ofn!="function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){
return null;
}
}
var _2af=_2ad+"$joinpoint";
var _2b0=_2ad+"$joinpoint$method";
var _2b1=obj[_2af];
if(!_2b1){
var _2b2=false;
if(dojo.event["browser"]){
if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){
_2b2=true;
dojo.event.browser.addClobberNodeAttrs(obj,[_2af,_2b0,_2ad]);
}
}
var _2b3=ofn.length;
obj[_2b0]=ofn;
_2b1=obj[_2af]=new dojo.event.MethodJoinPoint(obj,_2b0);
if(!_2b2){
obj[_2ad]=function(){
return _2b1.run.apply(_2b1,arguments);
};
}else{
obj[_2ad]=function(){
var args=[];
if(!arguments.length){
var evt=null;
try{
if(obj.ownerDocument){
evt=obj.ownerDocument.parentWindow.event;
}else{
if(obj.documentElement){
evt=obj.documentElement.ownerDocument.parentWindow.event;
}else{
if(obj.event){
evt=obj.event;
}else{
evt=window.event;
}
}
}
}
catch(e){
evt=window.event;
}
if(evt){
args.push(dojo.event.browser.fixEvent(evt,this));
}
}else{
for(var x=0;x<arguments.length;x++){
if((x==0)&&(dojo.event.browser.isEvent(arguments[x]))){
args.push(dojo.event.browser.fixEvent(arguments[x],this));
}else{
args.push(arguments[x]);
}
}
}
return _2b1.run.apply(_2b1,args);
};
}
obj[_2ad].__preJoinArity=_2b3;
}
return _2b1;
};
dojo.lang.extend(dojo.event.MethodJoinPoint,{squelch:false,unintercept:function(){
this.object[this.methodname]=this.methodfunc;
this.before=[];
this.after=[];
this.around=[];
},disconnect:dojo.lang.forward("unintercept"),run:function(){
var obj=this.object||dj_global;
var args=arguments;
var _2b9=[];
for(var x=0;x<args.length;x++){
_2b9[x]=args[x];
}
var _2bb=function(marr){
if(!marr){
dojo.debug("Null argument to unrollAdvice()");
return;
}
var _2bd=marr[0]||dj_global;
var _2be=marr[1];
if(!_2bd[_2be]){
dojo.raise("function \""+_2be+"\" does not exist on \""+_2bd+"\"");
}
var _2bf=marr[2]||dj_global;
var _2c0=marr[3];
var msg=marr[6];
var _2c2=marr[7];
if(_2c2>-1){
if(_2c2==0){
return;
}
marr[7]--;
}
var _2c3;
var to={args:[],jp_:this,object:obj,proceed:function(){
return _2bd[_2be].apply(_2bd,to.args);
}};
to.args=_2b9;
var _2c5=parseInt(marr[4]);
var _2c6=((!isNaN(_2c5))&&(marr[4]!==null)&&(typeof marr[4]!="undefined"));
if(marr[5]){
var rate=parseInt(marr[5]);
var cur=new Date();
var _2c9=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;
_2bb(mcpy);
},tod);
}
return;
}else{
marr.last=cur;
}
}
if(_2c0){
_2bf[_2c0].call(_2bf,to);
}else{
if((_2c6)&&((dojo.render.html)||(dojo.render.svg))){
dj_global["setTimeout"](function(){
if(msg){
_2bd[_2be].call(_2bd,to);
}else{
_2bd[_2be].apply(_2bd,args);
}
},_2c5);
}else{
if(msg){
_2bd[_2be].call(_2bd,to);
}else{
_2bd[_2be].apply(_2bd,args);
}
}
}
};
var _2cc=function(){
if(this.squelch){
try{
return _2bb.apply(this,arguments);
}
catch(e){
dojo.debug(e);
}
}else{
return _2bb.apply(this,arguments);
}
};
if((this["before"])&&(this.before.length>0)){
dojo.lang.forEach(this.before.concat(new Array()),_2cc);
}
var _2cd;
try{
if((this["around"])&&(this.around.length>0)){
var mi=new dojo.event.MethodInvocation(this,obj,args);
_2cd=mi.proceed();
}else{
if(this.methodfunc){
_2cd=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()),_2cc);
}
return (this.methodfunc)?_2cd:null;
},getArr:function(kind){
var type="after";
if((typeof kind=="string")&&(kind.indexOf("before")!=-1)){
type="before";
}else{
if(kind=="around"){
type="around";
}
}
if(!this[type]){
this[type]=[];
}
return this[type];
},kwAddAdvice:function(args){
this.addAdvice(args["adviceObj"],args["adviceFunc"],args["aroundObj"],args["aroundFunc"],args["adviceType"],args["precedence"],args["once"],args["delay"],args["rate"],args["adviceMsg"],args["maxCalls"]);
},addAdvice:function(_2d2,_2d3,_2d4,_2d5,_2d6,_2d7,once,_2d9,rate,_2db,_2dc){
var arr=this.getArr(_2d6);
if(!arr){
dojo.raise("bad this: "+this);
}
var ao=[_2d2,_2d3,_2d4,_2d5,_2d9,rate,_2db,_2dc];
if(once){
if(this.hasAdvice(_2d2,_2d3,_2d6,arr)>=0){
return;
}
}
if(_2d7=="first"){
arr.unshift(ao);
}else{
arr.push(ao);
}
},hasAdvice:function(_2df,_2e0,_2e1,arr){
if(!arr){
arr=this.getArr(_2e1);
}
var ind=-1;
for(var x=0;x<arr.length;x++){
var aao=(typeof _2e0=="object")?(new String(_2e0)).toString():_2e0;
var a1o=(typeof arr[x][1]=="object")?(new String(arr[x][1])).toString():arr[x][1];
if((arr[x][0]==_2df)&&(a1o==aao)){
ind=x;
}
}
return ind;
},removeAdvice:function(_2e7,_2e8,_2e9,once){
var arr=this.getArr(_2e9);
var ind=this.hasAdvice(_2e7,_2e8,_2e9,arr);
if(ind==-1){
return false;
}
while(ind!=-1){
arr.splice(ind,1);
if(once){
break;
}
ind=this.hasAdvice(_2e7,_2e8,_2e9,arr);
}
return true;
}});
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(_2ef){
var na;
var tna;
if(_2ef){
tna=_2ef.all||_2ef.getElementsByTagName("*");
na=[_2ef];
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 _2f3={};
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 _2f8=0;
this.normalizedEventName=function(_2f9){
switch(_2f9){
case "CheckboxStateChange":
case "DOMAttrModified":
case "DOMMenuItemActive":
case "DOMMenuItemInactive":
case "DOMMouseScroll":
case "DOMNodeInserted":
case "DOMNodeRemoved":
case "RadioStateChange":
return _2f9;
break;
default:
return _2f9.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,_2fd){
if(!dojo.render.html.ie){
return;
}
this.addClobberNode(node);
for(var x=0;x<_2fd.length;x++){
node.__clobberAttrs__.push(_2fd[x]);
}
};
this.removeListener=function(node,_300,fp,_302){
if(!_302){
var _302=false;
}
_300=dojo.event.browser.normalizedEventName(_300);
if((_300=="onkey")||(_300=="key")){
if(dojo.render.html.ie){
this.removeListener(node,"onkeydown",fp,_302);
}
_300="onkeypress";
}
if(_300.substr(0,2)=="on"){
_300=_300.substr(2);
}
if(node.removeEventListener){
node.removeEventListener(_300,fp,_302);
}
};
this.addListener=function(node,_304,fp,_306,_307){
if(!node){
return;
}
if(!_306){
var _306=false;
}
_304=dojo.event.browser.normalizedEventName(_304);
if((_304=="onkey")||(_304=="key")){
if(dojo.render.html.ie){
this.addListener(node,"onkeydown",fp,_306,_307);
}
_304="onkeypress";
}
if(_304.substr(0,2)!="on"){
_304="on"+_304;
}
if(!_307){
var _308=function(evt){
if(!evt){
evt=window.event;
}
var ret=fp(dojo.event.browser.fixEvent(evt,this));
if(_306){
dojo.event.browser.stopEvent(evt);
}
return ret;
};
}else{
_308=fp;
}
if(node.addEventListener){
node.addEventListener(_304.substr(2),_308,_306);
return _308;
}else{
if(typeof node[_304]=="function"){
var _30b=node[_304];
node[_304]=function(e){
_30b(e);
return _308(e);
};
}else{
node[_304]=_308;
}
if(dojo.render.html.ie){
this.addClobberNodeAttrs(node,[_304]);
}
return _308;
}
};
this.isEvent=function(obj){
return (typeof obj!="undefined")&&(obj)&&(typeof Event!="undefined")&&(obj.eventPhase);
};
this.currentEvent=null;
this.callListener=function(_30e,_30f){
if(typeof _30e!="function"){
dojo.raise("listener not a function: "+_30e);
}
dojo.event.browser.currentEvent.currentTarget=_30f;
return _30e.call(_30f,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,_312){
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 _314=evt.keyCode;
if(_314>=65&&_314<=90&&evt.shiftKey==false){
_314+=32;
}
if(_314>=1&&_314<=26&&evt.ctrlKey){
_314+=96;
}
evt.key=String.fromCharCode(_314);
}
}
}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 _314=evt.which;
if((evt.ctrlKey||evt.altKey||evt.metaKey)&&(evt.which>=65&&evt.which<=90&&evt.shiftKey==false)){
_314+=32;
}
evt.key=String.fromCharCode(_314);
}
}
}
}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=(_312?_312: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 _316=((dojo.render.html.ie55)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;
if(!evt.pageX){
evt.pageX=evt.clientX+(_316.scrollLeft||0);
}
if(!evt.pageY){
evt.pageY=evt.clientY+(_316.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.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,_31e,_31f){
var out="";
for(var i=0;i<_31e;i++){
out+=str;
if(_31f&&i<_31e-1){
out+=_31f;
}
}
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,_32e,_32f,_330){
if((arguments.length==1)&&(arguments[0].constructor==Object)){
this.fromKwArgs(arguments[0]);
}else{
this.url=url;
if(_32e){
this.mimetype=_32e;
}
if(_32f){
this.transport=_32f;
}
if(arguments.length>=4){
this.changeUrl=_330;
}
}
};
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,_333,_334){
},error:function(type,_336,_337,_338){
},timeout:function(type,_33a,_33b,_33c){
},handle:function(type,data,_33f,_340){
},timeoutSeconds:0,abort:function(){
},fromKwArgs:function(_341){
if(_341["url"]){
_341.url=_341.url.toString();
}
if(_341["formNode"]){
_341.formNode=dojo.byId(_341.formNode);
}
if(!_341["method"]&&_341["formNode"]&&_341["formNode"].method){
_341.method=_341["formNode"].method;
}
if(!_341["handle"]&&_341["handler"]){
_341.handle=_341.handler;
}
if(!_341["load"]&&_341["loaded"]){
_341.load=_341.loaded;
}
if(!_341["changeUrl"]&&_341["changeURL"]){
_341.changeUrl=_341.changeURL;
}
_341.encoding=dojo.lang.firstValued(_341["encoding"],djConfig["bindEncoding"],"");
_341.sendTransport=dojo.lang.firstValued(_341["sendTransport"],djConfig["ioSendTransport"],false);
var _342=dojo.lang.isFunction;
for(var x=0;x<dojo.io.hdlrFuncNames.length;x++){
var fn=dojo.io.hdlrFuncNames[x];
if(_341[fn]&&_342(_341[fn])){
continue;
}
if(_341["handle"]&&_342(_341["handle"])){
_341[fn]=_341.handle;
}
}
dojo.lang.mixin(this,_341);
}});
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(_349){
if(!(_349 instanceof dojo.io.Request)){
try{
_349=new dojo.io.Request(_349);
}
catch(e){
dojo.debug(e);
}
}
var _34a="";
if(_349["transport"]){
_34a=_349["transport"];
if(!this[_34a]){
dojo.io.sendBindError(_349,"No dojo.io.bind() transport with name '"+_349["transport"]+"'.");
return _349;
}
if(!this[_34a].canHandle(_349)){
dojo.io.sendBindError(_349,"dojo.io.bind() transport with name '"+_349["transport"]+"' cannot handle this type of request.");
return _349;
}
}else{
for(var x=0;x<dojo.io.transports.length;x++){
var tmp=dojo.io.transports[x];
if((this[tmp])&&(this[tmp].canHandle(_349))){
_34a=tmp;
break;
}
}
if(_34a==""){
dojo.io.sendBindError(_349,"None of the loaded transports for dojo.io.bind()"+" can handle the request.");
return _349;
}
}
this[_34a].bind(_349);
_349.bindSuccess=true;
return _349;
};
dojo.io.sendBindError=function(_34d,_34e){
if((typeof _34d.error=="function"||typeof _34d.handle=="function")&&(typeof setTimeout=="function"||typeof setTimeout=="object")){
var _34f=new dojo.io.Error(_34e);
setTimeout(function(){
_34d[(typeof _34d.error=="function")?"error":"handle"]("error",_34f,null,_34d);
},50);
}else{
dojo.raise(_34e);
}
};
dojo.io.queueBind=function(_350){
if(!(_350 instanceof dojo.io.Request)){
try{
_350=new dojo.io.Request(_350);
}
catch(e){
dojo.debug(e);
}
}
var _351=_350.load;
_350.load=function(){
dojo.io._queueBindInFlight=false;
var ret=_351.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
var _353=_350.error;
_350.error=function(){
dojo.io._queueBindInFlight=false;
var ret=_353.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
dojo.io._bindQueue.push(_350);
dojo.io._dispatchNextQueueBind();
return _350;
};
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,_356,last){
var enc=/utf/i.test(_356||"")?encodeURIComponent:dojo.string.encodeAscii;
var _359=[];
var _35a=new Object();
for(var name in map){
var _35c=function(elt){
var val=enc(name)+"="+enc(elt);
_359[(last==name)?"push":"unshift"](val);
};
if(!_35a[name]){
var _35f=map[name];
if(dojo.lang.isArray(_35f)){
dojo.lang.forEach(_35f,_35c);
}else{
_35c(_35f);
}
}
}
return _359.join("&");
};
dojo.io.setIFrameSrc=function(_360,src,_362){
try{
var r=dojo.render.html;
if(!_362){
if(r.safari){
_360.location=src;
}else{
frames[_360.name].location=src;
}
}else{
var idoc;
if(r.ie){
idoc=_360.contentWindow.document;
}else{
if(r.safari){
idoc=_360.document;
}else{
idoc=_360.contentWindow;
}
}
if(!idoc){
_360.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(_365,hash){
var map=(typeof hash=="object")?hash:dojo.lang.toArray(arguments,1);
return _365.replace(/\%\{(\w+)\}/g,function(_368,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 _36b=str.split(" ");
for(var i=0;i<_36b.length;i++){
_36b[i]=_36b[i].charAt(0).toUpperCase()+_36b[i].substring(1);
}
return _36b.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 _370=escape(str);
var _371,re=/%u([0-9A-F]{4})/i;
while((_371=_370.match(re))){
var num=Number("0x"+_371[1]);
var _374=escape("&#"+num+";");
ret+=_370.substring(0,_371.index)+_374;
_370=_370.substring(_371.index+_371[0].length);
}
ret+=_370.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,_379){
str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
if(!_379){
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,_382){
if(_382){
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,_386,_387){
if(_387){
str=str.toLowerCase();
_386=_386.toLowerCase();
}
return str.indexOf(_386)==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,_38d){
if(_38d=="\n"){
text=text.replace(/\r\n/g,"\n");
text=text.replace(/\r/g,"\n");
}else{
if(_38d=="\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,_38f){
var _390=[];
for(var i=0,_392=0;i<str.length;i++){
if(str.charAt(i)=="\\"){
i++;
continue;
}
if(str.charAt(i)==_38f){
_390.push(str.substring(_392,i));
_392=i+1;
}
}
_390.push(str.substr(_392));
return _390;
};
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 _397=args["back"]||args["backButton"]||args["handle"];
var tcb=function(_399){
if(window.location.hash!=""){
setTimeout("window.location.href = '"+hash+"';",1);
}
_397.apply(this,[_399]);
};
if(args["back"]){
args.back=tcb;
}else{
if(args["backButton"]){
args.backButton=tcb;
}else{
if(args["handle"]){
args.handle=tcb;
}
}
}
var _39a=args["forward"]||args["forwardButton"]||args["handle"];
var tfw=function(_39c){
if(window.location.hash!=""){
window.location.href=hash;
}
if(_39a){
_39a.apply(this,[_39c]);
}
};
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,_39f){
if(!dojo.render.html.opera){
var _3a0=this._getUrlQuery(_39f.href);
if(_3a0==null){
if(this.historyStack.length==1){
this.handleBackButton();
}
return;
}
if(this.moveForward){
this.moveForward=false;
return;
}
if(this.historyStack.length>=2&&_3a0==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){
this.handleBackButton();
}else{
if(this.forwardStack.length>0&&_3a0==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){
this.handleForwardButton();
}
}
}
},handleBackButton:function(){
var _3a1=this.historyStack.pop();
if(!_3a1){
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(_3a1);
},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 _3a8=url.split("?");
if(_3a8.length<2){
return null;
}else{
return _3a8[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 _3ab=false;
var _3ac=node.getElementsByTagName("input");
dojo.lang.forEach(_3ac,function(_3ad){
if(_3ab){
return;
}
if(_3ad.getAttribute("type")=="file"){
_3ab=true;
}
});
return _3ab;
};
dojo.io.formHasFile=function(_3ae){
return dojo.io.checkChildrenForFile(_3ae);
};
dojo.io.updateNode=function(node,_3b0){
node=dojo.byId(node);
var args=_3b0;
if(dojo.lang.isString(_3b0)){
args={url:_3b0};
}
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(_3b7,_3b8,_3b9){
if((!_3b7)||(!_3b7.tagName)||(!_3b7.tagName.toLowerCase()=="form")){
dojo.raise("Attempted to encode a non-form element.");
}
if(!_3b9){
_3b9=dojo.io.formFilter;
}
var enc=/utf/i.test(_3b8||"")?encodeURIComponent:dojo.string.encodeAscii;
var _3bb=[];
for(var i=0;i<_3b7.elements.length;i++){
var elm=_3b7.elements[i];
if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_3b9(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){
_3bb.push(name+"="+enc(elm.options[j].value));
}
}
}else{
if(dojo.lang.inArray(["radio","checkbox"],type)){
if(elm.checked){
_3bb.push(name+"="+enc(elm.value));
}
}else{
_3bb.push(name+"="+enc(elm.value));
}
}
}
var _3c1=_3b7.getElementsByTagName("input");
for(var i=0;i<_3c1.length;i++){
var _3c2=_3c1[i];
if(_3c2.type.toLowerCase()=="image"&&_3c2.form==_3b7&&_3b9(_3c2)){
var name=enc(_3c2.name);
_3bb.push(name+"="+enc(_3c2.value));
_3bb.push(name+".x=0");
_3bb.push(name+".y=0");
}
}
return _3bb.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 _3c8=form.getElementsByTagName("input");
for(var i=0;i<_3c8.length;i++){
var _3c9=_3c8[i];
if(_3c9.type.toLowerCase()=="image"&&_3c9.form==form){
this.connect(_3c9,"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 _3d0=false;
if(node.disabled||!node.name){
_3d0=false;
}else{
if(dojo.lang.inArray(["submit","button","image"],type)){
if(!this.clickedButton){
this.clickedButton=node;
}
_3d0=node==this.clickedButton;
}else{
_3d0=!dojo.lang.inArray(["file","submit","reset","button"],type);
}
}
return _3d0;
},connect:function(_3d1,_3d2,_3d3){
if(dojo.evalObjPath("dojo.event.connect")){
dojo.event.connect(_3d1,_3d2,this,_3d3);
}else{
var fcn=dojo.lang.hitch(this,_3d3);
_3d1[_3d2]=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 _3d6=this;
var _3d7={};
this.useCache=false;
this.preventCache=false;
function getCacheKey(url,_3d9,_3da){
return url+"|"+_3d9+"|"+_3da.toLowerCase();
}
function addToCache(url,_3dc,_3dd,http){
_3d7[getCacheKey(url,_3dc,_3dd)]=http;
}
function getFromCache(url,_3e0,_3e1){
return _3d7[getCacheKey(url,_3e0,_3e1)];
}
this.clearCache=function(){
_3d7={};
};
function doLoad(_3e2,http,url,_3e5,_3e6){
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(_3e2.method.toLowerCase()=="head"){
var _3e8=http.getAllResponseHeaders();
ret={};
ret.toString=function(){
return _3e8;
};
var _3e9=_3e8.split(/[\r\n]+/g);
for(var i=0;i<_3e9.length;i++){
var pair=_3e9[i].match(/^([^:]+)\s*:\s*(.+)$/i);
if(pair){
ret[pair[1]]=pair[2];
}
}
}else{
if(_3e2.mimetype=="text/javascript"){
try{
ret=dj_eval(http.responseText);
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=null;
}
}else{
if(_3e2.mimetype=="text/json"||_3e2.mimetype=="application/json"){
try{
ret=dj_eval("("+http.responseText+")");
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=false;
}
}else{
if((_3e2.mimetype=="application/xml")||(_3e2.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(_3e6){
addToCache(url,_3e5,_3e2.method,http);
}
_3e2[(typeof _3e2.load=="function")?"load":"handle"]("load",ret,http,_3e2);
}else{
var _3ec=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText);
_3e2[(typeof _3e2.error=="function")?"error":"handle"]("error",_3ec,http,_3e2);
}
}
function setHeaders(http,_3ee){
if(_3ee["headers"]){
for(var _3ef in _3ee["headers"]){
if(_3ef.toLowerCase()=="content-type"&&!_3ee["contentType"]){
_3ee["contentType"]=_3ee["headers"][_3ef];
}else{
http.setRequestHeader(_3ef,_3ee["headers"][_3ef]);
}
}
}
}
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&&!_3d6._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 _3f3=new dojo.io.Error("XMLHttpTransport.watchInFlight Error: "+e);
tif.req[(typeof tif.req.error=="function")?"error":"handle"]("error",_3f3,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 _3f4=dojo.hostenv.getXmlhttpObject()?true:false;
this.canHandle=function(_3f5){
return _3f4&&dojo.lang.inArray(["text/plain","text/html","application/xml","text/xml","text/javascript","text/json","application/json"],(_3f5["mimetype"].toLowerCase()||""))&&!(_3f5["formNode"]&&dojo.io.formHasFile(_3f5["formNode"]));
};
this.multipartBoundary="45309FFF-BD65-4d50-99C9-36986896A96F";
this.bind=function(_3f6){
if(!_3f6["url"]){
if(!_3f6["formNode"]&&(_3f6["backButton"]||_3f6["back"]||_3f6["changeUrl"]||_3f6["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(_3f6);
return true;
}
}
var url=_3f6.url;
var _3f8="";
if(_3f6["formNode"]){
var ta=_3f6.formNode.getAttribute("action");
if((ta)&&(!_3f6["url"])){
url=ta;
}
var tp=_3f6.formNode.getAttribute("method");
if((tp)&&(!_3f6["method"])){
_3f6.method=tp;
}
_3f8+=dojo.io.encodeForm(_3f6.formNode,_3f6.encoding,_3f6["formFilter"]);
}
if(url.indexOf("#")>-1){
dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url);
url=url.split("#")[0];
}
if(_3f6["file"]){
_3f6.method="post";
}
if(!_3f6["method"]){
_3f6.method="get";
}
if(_3f6.method.toLowerCase()=="get"){
_3f6.multipart=false;
}else{
if(_3f6["file"]){
_3f6.multipart=true;
}else{
if(!_3f6["multipart"]){
_3f6.multipart=false;
}
}
}
if(_3f6["backButton"]||_3f6["back"]||_3f6["changeUrl"]){
dojo.undo.browser.addToHistory(_3f6);
}
var _3fb=_3f6["content"]||{};
if(_3f6.sendTransport){
_3fb["dojo.transport"]="xmlhttp";
}
do{
if(_3f6.postContent){
_3f8=_3f6.postContent;
break;
}
if(_3fb){
_3f8+=dojo.io.argsFromMap(_3fb,_3f6.encoding);
}
if(_3f6.method.toLowerCase()=="get"||!_3f6.multipart){
break;
}
var t=[];
if(_3f8.length){
var q=_3f8.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(_3f6.file){
if(dojo.lang.isArray(_3f6.file)){
for(var i=0;i<_3f6.file.length;++i){
var o=_3f6.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=_3f6.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+"--","");
_3f8=t.join("\r\n");
}
}while(false);
var _401=_3f6["sync"]?false:true;
var _402=_3f6["preventCache"]||(this.preventCache==true&&_3f6["preventCache"]!=false);
var _403=_3f6["useCache"]==true||(this.useCache==true&&_3f6["useCache"]!=false);
if(!_402&&_403){
var _404=getFromCache(url,_3f8,_3f6.method);
if(_404){
doLoad(_3f6,_404,url,_3f8,false);
return;
}
}
var http=dojo.hostenv.getXmlhttpObject(_3f6);
var _406=false;
if(_401){
var _407=this.inFlight.push({"req":_3f6,"http":http,"url":url,"query":_3f8,"useCache":_403,"startTime":_3f6.timeoutSeconds?(new Date()).getTime():0});
this.startWatchingInFlight();
}else{
_3d6._blockAsync=true;
}
if(_3f6.method.toLowerCase()=="post"){
if(!_3f6.user){
http.open("POST",url,_401);
}else{
http.open("POST",url,_401,_3f6.user,_3f6.password);
}
setHeaders(http,_3f6);
http.setRequestHeader("Content-Type",_3f6.multipart?("multipart/form-data; boundary="+this.multipartBoundary):(_3f6.contentType||"application/x-www-form-urlencoded"));
try{
http.send(_3f8);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_3f6,{status:404},url,_3f8,_403);
}
}else{
var _408=url;
if(_3f8!=""){
_408+=(_408.indexOf("?")>-1?"&":"?")+_3f8;
}
if(_402){
_408+=(dojo.string.endsWithAny(_408,"?","&")?"":(_408.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf();
}
if(!_3f6.user){
http.open(_3f6.method.toUpperCase(),_408,_401);
}else{
http.open(_3f6.method.toUpperCase(),_408,_401,_3f6.user,_3f6.password);
}
setHeaders(http,_3f6);
try{
http.send(null);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_3f6,{status:404},url,_3f8,_403);
}
}
if(!_401){
doLoad(_3f6,http,url,_3f8,_403);
_3d6._blockAsync=false;
}
_3f6.abort=function(){
try{
http._aborted=true;
}
catch(e){
}
return http.abort();
};
return;
};
dojo.io.transports.addTransport("XMLHTTPTransport");
};
}
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(_40f){
if(_40f){
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(_410,_411){
var rgb=null;
if(dojo.lang.isArray(_410)){
rgb=_410;
}else{
if(_410 instanceof dojo.gfx.color.Color){
rgb=_410.toRgb();
}else{
rgb=new dojo.gfx.color.Color(_410).toRgb();
}
}
return dojo.gfx.color.blend(this.toRgb(),rgb,_411);
}});
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,_415){
if(typeof a=="string"){
return dojo.gfx.color.blendHex(a,b,_415);
}
if(!_415){
_415=0;
}
_415=Math.min(Math.max(-1,_415),1);
_415=((_415+1)/2);
var c=[];
for(var x=0;x<3;x++){
c[x]=parseInt(b[x]+((a[x]-b[x])*_415));
}
return c;
};
dojo.gfx.color.blendHex=function(a,b,_41a){
return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a),dojo.gfx.color.hex2rgb(b),_41a));
};
dojo.gfx.color.extractRGB=function(_41b){
var hex="0123456789abcdef";
_41b=_41b.toLowerCase();
if(_41b.indexOf("rgb")==0){
var _41d=_41b.match(/rgba*\((\d+), *(\d+), *(\d+)/i);
var ret=_41d.splice(1,3);
return ret;
}else{
var _41f=dojo.gfx.color.hex2rgb(_41b);
if(_41f){
return _41f;
}else{
return dojo.gfx.color.named[_41b]||[255,255,255];
}
}
};
dojo.gfx.color.hex2rgb=function(hex){
var _421="0123456789ABCDEF";
var rgb=new Array(3);
if(hex.indexOf("#")==0){
hex=hex.substring(1);
}
hex=hex.toUpperCase();
if(hex.replace(new RegExp("["+_421+"]","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]=_421.indexOf(rgb[i].charAt(0))*16+_421.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(_42a,end){
this.start=_42a;
this.end=end;
if(dojo.lang.isArray(_42a)){
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-_42a;
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,_439,_43a){
if(!_43a){
_43a=_439;
_439=this;
}
_43a=dojo.lang.hitch(_439,_43a);
var _43b=this[evt]||function(){
};
this[evt]=function(){
var ret=_43b.apply(this,arguments);
_43a.apply(this,arguments);
return ret;
};
return this;
},fire:function(evt,args){
if(this[evt]){
this[evt].apply(this,(args||[]));
}
return this;
},repeat:function(_43f){
this.repeatCount=_43f;
return this;
},_active:false,_paused:false});
dojo.lfx.Animation=function(_440,_441,_442,_443,_444,rate){
dojo.lfx.IAnimation.call(this);
if(dojo.lang.isNumber(_440)||(!_440&&_441.getValue)){
rate=_444;
_444=_443;
_443=_442;
_442=_441;
_441=_440;
_440=null;
}else{
if(_440.getValue||dojo.lang.isArray(_440)){
rate=_443;
_444=_442;
_443=_441;
_442=_440;
_441=null;
_440=null;
}
}
if(dojo.lang.isArray(_442)){
this.curve=new dojo.lfx.Line(_442[0],_442[1]);
}else{
this.curve=_442;
}
if(_441!=null&&_441>0){
this.duration=_441;
}
if(_444){
this.repeatCount=_444;
}
if(rate){
this.rate=rate;
}
if(_440){
dojo.lang.forEach(["handler","beforeBegin","onBegin","onEnd","onPlay","onStop","onAnimate"],function(item){
if(_440[item]){
this.connect(item,_440[item]);
}
},this);
}
if(_443&&dojo.lang.isFunction(_443)){
this.easing=_443;
}
};
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(_447,_448){
if(_448){
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(_447>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_448);
}),_447);
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 _44a=this.curve.getValue(step);
if(this._percent==0){
if(!this._startRepeatCount){
this._startRepeatCount=this.repeatCount;
}
this.fire("handler",["begin",_44a]);
this.fire("onBegin",[_44a]);
}
this.fire("handler",["play",_44a]);
this.fire("onPlay",[_44a]);
this._cycle();
return this;
},pause:function(){
clearTimeout(this._timer);
if(!this._active){
return this;
}
this._paused=true;
var _44b=this.curve.getValue(this._percent/100);
this.fire("handler",["pause",_44b]);
this.fire("onPause",[_44b]);
return this;
},gotoPercent:function(pct,_44d){
clearTimeout(this._timer);
this._active=true;
this._paused=true;
this._percent=pct;
if(_44d){
this.play();
}
return this;
},stop:function(_44e){
clearTimeout(this._timer);
var step=this._percent/100;
if(_44e){
step=1;
}
var _450=this.curve.getValue(step);
this.fire("handler",["stop",_450]);
this.fire("onStop",[_450]);
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 _453=this.curve.getValue(step);
this.fire("handler",["animate",_453]);
this.fire("onAnimate",[_453]);
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(_454){
dojo.lfx.IAnimation.call(this);
this._anims=[];
this._animsEnded=0;
var _455=arguments;
if(_455.length==1&&(dojo.lang.isArray(_455[0])||dojo.lang.isArrayLike(_455[0]))){
_455=_455[0];
}
dojo.lang.forEach(_455,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(_457,_458){
if(!this._anims.length){
return this;
}
this.fire("beforeBegin");
if(_457>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_458);
}),_457);
return this;
}
if(_458||this._anims[0].percent==0){
this.fire("onBegin");
}
this.fire("onPlay");
this._animsCall("play",null,_458);
return this;
},pause:function(){
this.fire("onPause");
this._animsCall("pause");
return this;
},stop:function(_459){
this.fire("onStop");
this._animsCall("stop",_459);
return this;
},_onAnimsEnded:function(){
this._animsEnded++;
if(this._animsEnded>=this._anims.length){
this.fire("onEnd");
}
return this;
},_animsCall:function(_45a){
var args=[];
if(arguments.length>1){
for(var i=1;i<arguments.length;i++){
args.push(arguments[i]);
}
}
var _45d=this;
dojo.lang.forEach(this._anims,function(anim){
anim[_45a](args);
},_45d);
return this;
}});
dojo.lfx.Chain=function(_45f){
dojo.lfx.IAnimation.call(this);
this._anims=[];
this._currAnim=-1;
var _460=arguments;
if(_460.length==1&&(dojo.lang.isArray(_460[0])||dojo.lang.isArrayLike(_460[0]))){
_460=_460[0];
}
var _461=this;
dojo.lang.forEach(_460,function(anim,i,_464){
this._anims.push(anim);
if(i<_464.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(_465,_466){
if(!this._anims.length){
return this;
}
if(_466||!this._anims[this._currAnim]){
this._currAnim=0;
}
var _467=this._anims[this._currAnim];
this.fire("beforeBegin");
if(_465>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_466);
}),_465);
return this;
}
if(_467){
if(this._currAnim==0){
this.fire("handler",["begin",this._currAnim]);
this.fire("onBegin",[this._currAnim]);
}
this.fire("onPlay",[this._currAnim]);
_467.play(null,_466);
}
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 _468=this._anims[this._currAnim];
if(_468){
if(!_468._active||_468._paused){
this.play();
}else{
this.pause();
}
}
return this;
},stop:function(){
var _469=this._anims[this._currAnim];
if(_469){
_469.stop();
this.fire("onStop",[this._currAnim]);
}
return _469;
},_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(_46a){
var _46b=arguments;
if(dojo.lang.isArray(arguments[0])){
_46b=arguments[0];
}
if(_46b.length==1){
return _46b[0];
}
return new dojo.lfx.Combine(_46b);
};
dojo.lfx.chain=function(_46c){
var _46d=arguments;
if(dojo.lang.isArray(arguments[0])){
_46d=arguments[0];
}
if(_46d.length==1){
return _46d[0];
}
return new dojo.lfx.Chain(_46d);
};
dojo.provide("dojo.html.display");
dojo.html._toggle=function(node,_46f,_470){
node=dojo.byId(node);
_470(node,!_46f(node));
return _46f(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,_475){
dojo.html[(_475?"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,_47b){
dojo.html.setStyle(node,"display",((_47b instanceof String||typeof _47b=="string")?_47b:(_47b?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,_47f){
dojo.html.setStyle(node,"visibility",((_47f instanceof String||typeof _47f=="string")?_47f:(_47f?"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,_483,_484){
node=dojo.byId(node);
var h=dojo.render.html;
if(!_484){
if(_483>=1){
if(h.ie){
dojo.html.clearOpacity(node);
return;
}else{
_483=0.999999;
}
}else{
if(_483<0){
_483=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="+_483*100+")";
}
}
node.style.filter="Alpha(Opacity="+_483*100+")";
}else{
if(h.moz){
node.style.opacity=_483;
node.style.MozOpacity=_483;
}else{
if(h.safari){
node.style.opacity=_483;
node.style.KhtmlOpacity=_483;
}else{
node.style.opacity=_483;
}
}
}
};
dojo.html.clearOpacity=function(node){
node=dojo.byId(node);
var ns=node.style;
var h=dojo.render.html;
if(h.ie){
try{
if(node.filters&&node.filters.alpha){
ns.filter="";
}
}
catch(e){
}
}else{
if(h.moz){
ns.opacity=1;
ns.MozOpacity=1;
}else{
if(h.safari){
ns.opacity=1;
ns.KhtmlOpacity=1;
}else{
ns.opacity=1;
}
}
}
};
dojo.html.getOpacity=function(node){
node=dojo.byId(node);
var h=dojo.render.html;
if(h.ie){
var opac=(node.filters&&node.filters.alpha&&typeof node.filters.alpha.opacity=="number"?node.filters.alpha.opacity:100)/100;
}else{
var opac=node.style.opacity||node.style.MozOpacity||node.style.KhtmlOpacity||1;
}
return opac>=0.999999?1:Number(opac);
};
dojo.provide("dojo.html.color");
dojo.html.getBackgroundColor=function(node){
node=dojo.byId(node);
var _48f;
do{
_48f=dojo.html.getStyle(node,"background-color");
if(_48f.toLowerCase()=="rgba(0, 0, 0, 0)"){
_48f="transparent";
}
if(node==document.getElementsByTagName("body")[0]){
node=null;
break;
}
node=node.parentNode;
}while(node&&dojo.lang.inArray(["transparent",""],_48f));
if(_48f=="transparent"){
_48f=[255,255,255,0];
}else{
_48f=dojo.gfx.color.extractRGB(_48f);
}
return _48f;
};
dojo.provide("dojo.html.layout");
dojo.html.sumAncestorProperties=function(node,prop){
node=dojo.byId(node);
if(!node){
return 0;
}
var _492=0;
while(node){
if(dojo.html.getComputedStyle(node,"position")=="fixed"){
return 0;
}
var val=node[prop];
if(val){
_492+=val-0;
if(node==dojo.body()){
break;
}
}
node=node.parentNode;
}
return _492;
};
dojo.html.setStyleAttributes=function(node,_495){
node=dojo.byId(node);
var _496=_495.replace(/(;)?\s*$/,"").split(";");
for(var i=0;i<_496.length;i++){
var _498=_496[i].split(":");
var name=_498[0].replace(/\s*$/,"").replace(/^\s*/,"").toLowerCase();
var _49a=_498[1].replace(/\s*$/,"").replace(/^\s*/,"");
switch(name){
case "opacity":
dojo.html.setOpacity(node,_49a);
break;
case "content-height":
dojo.html.setContentBox(node,{height:_49a});
break;
case "content-width":
dojo.html.setContentBox(node,{width:_49a});
break;
case "outer-height":
dojo.html.setMarginBox(node,{height:_49a});
break;
case "outer-width":
dojo.html.setMarginBox(node,{width:_49a});
break;
default:
node.style[dojo.html.toCamelCase(name)]=_49a;
}
}
};
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,_49c,_49d){
node=dojo.byId(node);
var _49e=dojo.doc();
var ret={x:0,y:0};
var bs=dojo.html.boxSizing;
if(!_49d){
_49d=bs.CONTENT_BOX;
}
var _4a1=2;
var _4a2;
switch(_49d){
case bs.MARGIN_BOX:
_4a2=3;
break;
case bs.BORDER_BOX:
_4a2=2;
break;
case bs.PADDING_BOX:
default:
_4a2=1;
break;
case bs.CONTENT_BOX:
_4a2=0;
break;
}
var h=dojo.render.html;
var db=_49e["body"]||_49e["documentElement"];
if(h.ie){
with(node.getBoundingClientRect()){
ret.x=left-2;
ret.y=top-2;
}
}else{
if(_49e["getBoxObjectFor"]){
_4a1=1;
try{
var bo=_49e.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 _4a6;
if((h.safari)&&(node.style.getPropertyValue("position")=="absolute")&&(node.parentNode==db)){
_4a6=db;
}else{
_4a6=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 _4a8=node;
do{
var n=_4a8["offsetLeft"];
if(!h.opera||n>0){
ret.x+=isNaN(n)?0:n;
}
var m=_4a8["offsetTop"];
ret.y+=isNaN(m)?0:m;
_4a8=_4a8.offsetParent;
}while((_4a8!=_4a6)&&(_4a8!=null));
}else{
if(node["x"]&&node["y"]){
ret.x+=isNaN(node.x)?0:node.x;
ret.y+=isNaN(node.y)?0:node.y;
}
}
}
}
if(_49c){
var _4ab=dojo.html.getScroll();
ret.y+=_4ab.top;
ret.x+=_4ab.left;
}
var _4ac=[dojo.html.getPaddingExtent,dojo.html.getBorderExtent,dojo.html.getMarginExtent];
if(_4a1>_4a2){
for(var i=_4a2;i<_4a1;++i){
ret.y+=_4ac[i](node,"top");
ret.x+=_4ac[i](node,"left");
}
}else{
if(_4a1<_4a2){
for(var i=_4a2;i>_4a1;--i){
ret.y-=_4ac[i-1](node,"top");
ret.x-=_4ac[i-1](node,"left");
}
}
}
ret.top=ret.y;
ret.left=ret.x;
return ret;
};
dojo.html.isPositionAbsolute=function(node){
return (dojo.html.getComputedStyle(node,"position")=="absolute");
};
dojo.html._getComponentPixelValues=function(node,_4b0,_4b1,_4b2){
var _4b3=["top","bottom","left","right"];
var obj={};
for(var i in _4b3){
side=_4b3[i];
obj[side]=_4b1(node,_4b0+side,_4b2);
}
obj.width=obj.left+obj.right;
obj.height=obj.top+obj.bottom;
return obj;
};
dojo.html.getMargin=function(node){
return dojo.html._getComponentPixelValues(node,"margin-",dojo.html.getPixelValue,dojo.html.isPositionAbsolute(node));
};
dojo.html.getBorder=function(node){
return dojo.html._getComponentPixelValues(node,"",dojo.html.getBorderExtent);
};
dojo.html.getBorderExtent=function(node,side){
return (dojo.html.getStyle(node,"border-"+side+"-style")=="none"?0:dojo.html.getPixelValue(node,"border-"+side+"-width"));
};
dojo.html.getMarginExtent=function(node,side){
return dojo.html.getPixelValue(node,"margin-"+side,dojo.html.isPositionAbsolute(node));
};
dojo.html.getPaddingExtent=function(node,side){
return dojo.html.getPixelValue(node,"padding-"+side,true);
};
dojo.html.getPadding=function(node){
return dojo.html._getComponentPixelValues(node,"padding-",dojo.html.getPixelValue,true);
};
dojo.html.getPadBorder=function(node){
var pad=dojo.html.getPadding(node);
var _4c1=dojo.html.getBorder(node);
return {width:pad.width+_4c1.width,height:pad.height+_4c1.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 _4c6=dojo.html.getStyle(node,"-moz-box-sizing");
if(!_4c6){
_4c6=dojo.html.getStyle(node,"box-sizing");
}
return (_4c6?_4c6: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 _4cb=dojo.html.getBorder(node);
return {width:box.width-_4cb.width,height:box.height-_4cb.height};
};
dojo.html.getContentBox=function(node){
node=dojo.byId(node);
var _4cd=dojo.html.getPadBorder(node);
return {width:node.offsetWidth-_4cd.width,height:node.offsetHeight-_4cd.height};
};
dojo.html.setContentBox=function(node,args){
node=dojo.byId(node);
var _4d0=0;
var _4d1=0;
var isbb=dojo.html.isBorderBox(node);
var _4d3=(isbb?dojo.html.getPadBorder(node):{width:0,height:0});
var ret={};
if(typeof args.width!="undefined"){
_4d0=args.width+_4d3.width;
ret.width=dojo.html.setPositivePixelValue(node,"width",_4d0);
}
if(typeof args.height!="undefined"){
_4d1=args.height+_4d3.height;
ret.height=dojo.html.setPositivePixelValue(node,"height",_4d1);
}
return ret;
};
dojo.html.getMarginBox=function(node){
var _4d6=dojo.html.getBorderBox(node);
var _4d7=dojo.html.getMargin(node);
return {width:_4d6.width+_4d7.width,height:_4d6.height+_4d7.height};
};
dojo.html.setMarginBox=function(node,args){
node=dojo.byId(node);
var _4da=0;
var _4db=0;
var isbb=dojo.html.isBorderBox(node);
var _4dd=(!isbb?dojo.html.getPadBorder(node):{width:0,height:0});
var _4de=dojo.html.getMargin(node);
var ret={};
if(typeof args.width!="undefined"){
_4da=args.width-_4dd.width;
_4da-=_4de.width;
ret.width=dojo.html.setPositivePixelValue(node,"width",_4da);
}
if(typeof args.height!="undefined"){
_4db=args.height-_4dd.height;
_4db-=_4de.height;
ret.height=dojo.html.setPositivePixelValue(node,"height",_4db);
}
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(_4e3,_4e4,_4e5){
if(!_4e3.nodeType&&!(_4e3 instanceof String||typeof _4e3=="string")&&("width" in _4e3||"height" in _4e3||"left" in _4e3||"x" in _4e3||"top" in _4e3||"y" in _4e3)){
var ret={left:_4e3.left||_4e3.x||0,top:_4e3.top||_4e3.y||0,width:_4e3.width||0,height:_4e3.height||0};
}else{
var node=dojo.byId(_4e3);
var pos=dojo.html.abs(node,_4e4,_4e5);
var _4e9=dojo.html.getMarginBox(node);
var ret={left:pos.left,top:pos.top,width:_4e9.width,height:_4e9.height};
}
ret.x=ret.left;
ret.y=ret.top;
return ret;
};
dojo.html.setMarginBoxWidth=dojo.html.setOuterWidth=function(node,_4eb){
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,_4ee){
return dojo.html._callDeprecated("getTotalOffset","getAbsolutePosition",arguments,null,type);
};
dojo.html.getAbsoluteX=function(node,_4f0){
return dojo.html._callDeprecated("getAbsoluteX","getAbsolutePosition",arguments,null,"x");
};
dojo.html.getAbsoluteY=function(node,_4f2){
return dojo.html._callDeprecated("getAbsoluteY","getAbsolutePosition",arguments,null,"y");
};
dojo.html.totalOffsetLeft=function(node,_4f4){
return dojo.html._callDeprecated("totalOffsetLeft","getAbsolutePosition",arguments,null,"left");
};
dojo.html.totalOffsetTop=function(node,_4f6){
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,_500){
return dojo.html._callDeprecated("setContentBoxWidth","setContentBox",arguments,"width");
};
dojo.html.setContentBoxHeight=dojo.html.setContentHeight=function(node,_502){
return dojo.html._callDeprecated("setContentBoxHeight","setContentBox",arguments,"height");
};
dojo.provide("dojo.lfx.html");
dojo.lfx.html._byId=function(_503){
if(!_503){
return [];
}
if(dojo.lang.isArrayLike(_503)){
if(!_503.alreadyChecked){
var n=[];
dojo.lang.forEach(_503,function(node){
n.push(dojo.byId(node));
});
n.alreadyChecked=true;
return n;
}else{
return _503;
}
}else{
var n=[];
n.push(dojo.byId(_503));
n.alreadyChecked=true;
return n;
}
};
dojo.lfx.html.propertyAnimation=function(_506,_507,_508,_509,_50a){
_506=dojo.lfx.html._byId(_506);
var _50b={"propertyMap":_507,"nodes":_506,"duration":_508,"easing":_509||dojo.lfx.easeDefault};
var _50c=function(args){
if(args.nodes.length==1){
var pm=args.propertyMap;
if(!dojo.lang.isArray(args.propertyMap)){
var parr=[];
for(var _510 in pm){
pm[_510].property=_510;
parr.push(pm[_510]);
}
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 _512=function(_513){
var _514=[];
dojo.lang.forEach(_513,function(c){
_514.push(Math.round(c));
});
return _514;
};
var _516=function(n,_518){
n=dojo.byId(n);
if(!n||!n.style){
return;
}
for(var s in _518){
try{
if(s=="opacity"){
dojo.html.setOpacity(n,_518[s]);
}else{
n.style[s]=_518[s];
}
}
catch(e){
dojo.debug(e);
}
}
};
var _51a=function(_51b){
this._properties=_51b;
this.diffs=new Array(_51b.length);
dojo.lang.forEach(_51b,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 _522=null;
if(dojo.lang.isArray(prop.start)){
}else{
if(prop.start instanceof dojo.gfx.color.Color){
_522=(prop.units||"rgb")+"(";
for(var j=0;j<prop.startRgb.length;j++){
_522+=Math.round(((prop.endRgb[j]-prop.startRgb[j])*n)+prop.startRgb[j])+(j<prop.startRgb.length-1?",":"");
}
_522+=")";
}else{
_522=((this.diffs[i])*n)+prop.start+(prop.property!="opacity"?prop.units||"px":"");
}
}
ret[dojo.html.toCamelCase(prop.property)]=_522;
},this);
return ret;
};
};
var anim=new dojo.lfx.Animation({beforeBegin:function(){
_50c(_50b);
anim.curve=new _51a(_50b.propertyMap);
},onAnimate:function(_525){
dojo.lang.forEach(_50b.nodes,function(node){
_516(node,_525);
});
}},_50b.duration,null,_50b.easing);
if(_50a){
for(var x in _50a){
if(dojo.lang.isFunction(_50a[x])){
anim.connect(x,anim,_50a[x]);
}
}
}
return anim;
};
dojo.lfx.html._makeFadeable=function(_528){
var _529=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(_528)){
dojo.lang.forEach(_528,_529);
}else{
_529(_528);
}
};
dojo.lfx.html.fade=function(_52b,_52c,_52d,_52e,_52f){
_52b=dojo.lfx.html._byId(_52b);
var _530={property:"opacity"};
if(!dj_undef("start",_52c)){
_530.start=_52c.start;
}else{
_530.start=function(){
return dojo.html.getOpacity(_52b[0]);
};
}
if(!dj_undef("end",_52c)){
_530.end=_52c.end;
}else{
dojo.raise("dojo.lfx.html.fade needs an end value");
}
var anim=dojo.lfx.propertyAnimation(_52b,[_530],_52d,_52e);
anim.connect("beforeBegin",function(){
dojo.lfx.html._makeFadeable(_52b);
});
if(_52f){
anim.connect("onEnd",function(){
_52f(_52b,anim);
});
}
return anim;
};
dojo.lfx.html.fadeIn=function(_532,_533,_534,_535){
return dojo.lfx.html.fade(_532,{end:1},_533,_534,_535);
};
dojo.lfx.html.fadeOut=function(_536,_537,_538,_539){
return dojo.lfx.html.fade(_536,{end:0},_537,_538,_539);
};
dojo.lfx.html.fadeShow=function(_53a,_53b,_53c,_53d){
_53a=dojo.lfx.html._byId(_53a);
dojo.lang.forEach(_53a,function(node){
dojo.html.setOpacity(node,0);
});
var anim=dojo.lfx.html.fadeIn(_53a,_53b,_53c,_53d);
anim.connect("beforeBegin",function(){
if(dojo.lang.isArrayLike(_53a)){
dojo.lang.forEach(_53a,dojo.html.show);
}else{
dojo.html.show(_53a);
}
});
return anim;
};
dojo.lfx.html.fadeHide=function(_540,_541,_542,_543){
var anim=dojo.lfx.html.fadeOut(_540,_541,_542,function(){
if(dojo.lang.isArrayLike(_540)){
dojo.lang.forEach(_540,dojo.html.hide);
}else{
dojo.html.hide(_540);
}
if(_543){
_543(_540,anim);
}
});
return anim;
};
dojo.lfx.html.wipeIn=function(_545,_546,_547,_548){
_545=dojo.lfx.html._byId(_545);
var _549=[];
dojo.lang.forEach(_545,function(node){
var _54b={};
var _54c,_54d,_54e;
with(node.style){
_54c=top;
_54d=left;
_54e=position;
top="-9999px";
left="-9999px";
position="absolute";
display="";
}
var _54f=dojo.html.getBorderBox(node).height;
with(node.style){
top=_54c;
left=_54d;
position=_54e;
display="none";
}
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:1,end:function(){
return _54f;
}}},_546,_547);
anim.connect("beforeBegin",function(){
_54b.overflow=node.style.overflow;
_54b.height=node.style.height;
with(node.style){
overflow="hidden";
_54f="1px";
}
dojo.html.show(node);
});
anim.connect("onEnd",function(){
with(node.style){
overflow=_54b.overflow;
_54f=_54b.height;
}
if(_548){
_548(node,anim);
}
});
_549.push(anim);
});
return dojo.lfx.combine(_549);
};
dojo.lfx.html.wipeOut=function(_551,_552,_553,_554){
_551=dojo.lfx.html._byId(_551);
var _555=[];
dojo.lang.forEach(_551,function(node){
var _557={};
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:function(){
return dojo.html.getContentBox(node).height;
},end:1}},_552,_553,{"beforeBegin":function(){
_557.overflow=node.style.overflow;
_557.height=node.style.height;
with(node.style){
overflow="hidden";
}
dojo.html.show(node);
},"onEnd":function(){
dojo.html.hide(node);
with(node.style){
overflow=_557.overflow;
height=_557.height;
}
if(_554){
_554(node,anim);
}
}});
_555.push(anim);
});
return dojo.lfx.combine(_555);
};
dojo.lfx.html.slideTo=function(_559,_55a,_55b,_55c,_55d){
_559=dojo.lfx.html._byId(_559);
var _55e=[];
var _55f=dojo.html.getComputedStyle;
dojo.lang.forEach(_559,function(node){
var top=null;
var left=null;
var init=(function(){
var _564=node;
return function(){
var pos=_55f(_564,"position");
top=(pos=="absolute"?node.offsetTop:parseInt(_55f(node,"top"))||0);
left=(pos=="absolute"?node.offsetLeft:parseInt(_55f(node,"left"))||0);
if(!dojo.lang.inArray(["absolute","relative"],pos)){
var ret=dojo.html.abs(_564,true);
dojo.html.setStyleAttributes(_564,"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:(_55a.top||0)},"left":{start:left,end:(_55a.left||0)}},_55b,_55c,{"beforeBegin":init});
if(_55d){
anim.connect("onEnd",function(){
_55d(_559,anim);
});
}
_55e.push(anim);
});
return dojo.lfx.combine(_55e);
};
dojo.lfx.html.slideBy=function(_568,_569,_56a,_56b,_56c){
_568=dojo.lfx.html._byId(_568);
var _56d=[];
var _56e=dojo.html.getComputedStyle;
dojo.lang.forEach(_568,function(node){
var top=null;
var left=null;
var init=(function(){
var _573=node;
return function(){
var pos=_56e(_573,"position");
top=(pos=="absolute"?node.offsetTop:parseInt(_56e(node,"top"))||0);
left=(pos=="absolute"?node.offsetLeft:parseInt(_56e(node,"left"))||0);
if(!dojo.lang.inArray(["absolute","relative"],pos)){
var ret=dojo.html.abs(_573,true);
dojo.html.setStyleAttributes(_573,"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+(_569.top||0)},"left":{start:left,end:left+(_569.left||0)}},_56a,_56b).connect("beforeBegin",init);
if(_56c){
anim.connect("onEnd",function(){
_56c(_568,anim);
});
}
_56d.push(anim);
});
return dojo.lfx.combine(_56d);
};
dojo.lfx.html.explode=function(_577,_578,_579,_57a,_57b){
var h=dojo.html;
_577=dojo.byId(_577);
_578=dojo.byId(_578);
var _57d=h.toCoordinateObject(_577,true);
var _57e=document.createElement("div");
h.copyStyle(_57e,_578);
if(_578.explodeClassName){
_57e.className=_578.explodeClassName;
}
with(_57e.style){
position="absolute";
display="none";
var _57f=h.getStyle(_577,"background-color");
backgroundColor=_57f?_57f.toLowerCase():"transparent";
backgroundColor=(backgroundColor=="transparent")?"rgb(221, 221, 221)":backgroundColor;
}
dojo.body().appendChild(_57e);
with(_578.style){
visibility="hidden";
display="block";
}
var _580=h.toCoordinateObject(_578,true);
with(_578.style){
display="none";
visibility="visible";
}
var _581={opacity:{start:0.5,end:1}};
dojo.lang.forEach(["height","width","top","left"],function(type){
_581[type]={start:_57d[type],end:_580[type]};
});
var anim=new dojo.lfx.propertyAnimation(_57e,_581,_579,_57a,{"beforeBegin":function(){
h.setDisplay(_57e,"block");
},"onEnd":function(){
h.setDisplay(_578,"block");
_57e.parentNode.removeChild(_57e);
}});
if(_57b){
anim.connect("onEnd",function(){
_57b(_578,anim);
});
}
return anim;
};
dojo.lfx.html.implode=function(_584,end,_586,_587,_588){
var h=dojo.html;
_584=dojo.byId(_584);
end=dojo.byId(end);
var _58a=dojo.html.toCoordinateObject(_584,true);
var _58b=dojo.html.toCoordinateObject(end,true);
var _58c=document.createElement("div");
dojo.html.copyStyle(_58c,_584);
if(_584.explodeClassName){
_58c.className=_584.explodeClassName;
}
dojo.html.setOpacity(_58c,0.3);
with(_58c.style){
position="absolute";
display="none";
backgroundColor=h.getStyle(_584,"background-color").toLowerCase();
}
dojo.body().appendChild(_58c);
var _58d={opacity:{start:1,end:0.5}};
dojo.lang.forEach(["height","width","top","left"],function(type){
_58d[type]={start:_58a[type],end:_58b[type]};
});
var anim=new dojo.lfx.propertyAnimation(_58c,_58d,_586,_587,{"beforeBegin":function(){
dojo.html.hide(_584);
dojo.html.show(_58c);
},"onEnd":function(){
_58c.parentNode.removeChild(_58c);
}});
if(_588){
anim.connect("onEnd",function(){
_588(_584,anim);
});
}
return anim;
};
dojo.lfx.html.highlight=function(_590,_591,_592,_593,_594){
_590=dojo.lfx.html._byId(_590);
var _595=[];
dojo.lang.forEach(_590,function(node){
var _597=dojo.html.getBackgroundColor(node);
var bg=dojo.html.getStyle(node,"background-color").toLowerCase();
var _599=dojo.html.getStyle(node,"background-image");
var _59a=(bg=="transparent"||bg=="rgba(0, 0, 0, 0)");
while(_597.length>3){
_597.pop();
}
var rgb=new dojo.gfx.color.Color(_591);
var _59c=new dojo.gfx.color.Color(_597);
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:rgb,end:_59c}},_592,_593,{"beforeBegin":function(){
if(_599){
node.style.backgroundImage="none";
}
node.style.backgroundColor="rgb("+rgb.toRgb().join(",")+")";
},"onEnd":function(){
if(_599){
node.style.backgroundImage=_599;
}
if(_59a){
node.style.backgroundColor="transparent";
}
if(_594){
_594(node,anim);
}
}});
_595.push(anim);
});
return dojo.lfx.combine(_595);
};
dojo.lfx.html.unhighlight=function(_59e,_59f,_5a0,_5a1,_5a2){
_59e=dojo.lfx.html._byId(_59e);
var _5a3=[];
dojo.lang.forEach(_59e,function(node){
var _5a5=new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node));
var rgb=new dojo.gfx.color.Color(_59f);
var _5a7=dojo.html.getStyle(node,"background-image");
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:_5a5,end:rgb}},_5a0,_5a1,{"beforeBegin":function(){
if(_5a7){
node.style.backgroundImage="none";
}
node.style.backgroundColor="rgb("+_5a5.toRgb().join(",")+")";
},"onEnd":function(){
if(_5a2){
_5a2(node,anim);
}
}});
_5a3.push(anim);
});
return dojo.lfx.combine(_5a3);
};
dojo.lang.mixin(dojo.lfx,dojo.lfx.html);
dojo.provide("dojo.lfx.*");
dojo.provide("dojo.io.cookie");
dojo.io.cookie.setCookie=function(name,_5aa,days,path,_5ad,_5ae){
var _5af=-1;
if((typeof days=="number")&&(days>=0)){
var d=new Date();
d.setTime(d.getTime()+(days*24*60*60*1000));
_5af=d.toGMTString();
}
_5aa=escape(_5aa);
document.cookie=name+"="+_5aa+";"+(_5af!=-1?" expires="+_5af+";":"")+(path?"path="+path:"")+(_5ad?"; domain="+_5ad:"")+(_5ae?"; 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 _5b3=document.cookie.substring(idx+name.length+1);
var end=_5b3.indexOf(";");
if(end==-1){
end=_5b3.length;
}
_5b3=_5b3.substring(0,end);
_5b3=unescape(_5b3);
return _5b3;
};
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,_5ba,_5bb,_5bc){
if(arguments.length==5){
_5bc=_5ba;
_5ba=null;
_5bb=null;
}
var _5bd=[],_5be,_5bf="";
if(!_5bc){
_5be=dojo.io.cookie.getObjectCookie(name);
}
if(days>=0){
if(!_5be){
_5be={};
}
for(var prop in obj){
if(obj[prop]==null){
delete _5be[prop];
}else{
if((typeof obj[prop]=="string")||(typeof obj[prop]=="number")){
_5be[prop]=obj[prop];
}
}
}
prop=null;
for(var prop in _5be){
_5bd.push(escape(prop)+"="+escape(_5be[prop]));
}
_5bf=_5bd.join("&");
}
dojo.io.cookie.setCookie(name,_5bf,days,path,_5ba,_5bb);
};
dojo.io.cookie.getObjectCookie=function(name){
var _5c2=null,_5c3=dojo.io.cookie.getCookie(name);
if(_5c3){
_5c2={};
var _5c4=_5c3.split("&");
for(var i=0;i<_5c4.length;i++){
var pair=_5c4[i].split("=");
var _5c7=pair[1];
if(isNaN(_5c7)){
_5c7=unescape(pair[1]);
}
_5c2[unescape(pair[0])]=_5c7;
}
}
return _5c2;
};
dojo.io.cookie.isSupported=function(){
if(typeof navigator.cookieEnabled!="boolean"){
dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null);
var _5c8=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__");
navigator.cookieEnabled=(_5c8=="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.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 _5cc=getTagName(node);
if(!_5cc){
return "";
}
if((dojo.widget)&&(dojo.widget.tags[_5cc])){
return _5cc;
}
var p=_5cc.indexOf(":");
if(p>=0){
return _5cc;
}
if(_5cc.substr(0,5)=="dojo:"){
return _5cc;
}
if(dojo.render.html.capable&&dojo.render.html.ie&&node.scopeName!="HTML"){
return node.scopeName.toLowerCase()+":"+_5cc;
}
if(_5cc.substr(0,4)=="dojo"){
return "dojo:"+_5cc.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 _5cf=node.className||node.getAttribute("class");
if((_5cf)&&(_5cf.indexOf)&&(_5cf.indexOf("dojo-")!=-1)){
var _5d0=_5cf.split(" ");
for(var x=0,c=_5d0.length;x<c;x++){
if(_5d0[x].slice(0,5)=="dojo-"){
return "dojo:"+_5d0[x].substr(5).toLowerCase();
}
}
}
}
return "";
}
this.parseElement=function(node,_5d4,_5d5,_5d6){
var _5d7=getTagName(node);
if(isIE&&_5d7.indexOf("/")==0){
return null;
}
try{
var attr=node.getAttribute("parseWidgets");
if(attr&&attr.toLowerCase()=="false"){
return {};
}
}
catch(e){
}
var _5d9=true;
if(_5d5){
var _5da=getDojoTagName(node);
_5d7=_5da||_5d7;
_5d9=Boolean(_5da);
}
var _5db={};
_5db[_5d7]=[];
var pos=_5d7.indexOf(":");
if(pos>0){
var ns=_5d7.substring(0,pos);
_5db["ns"]=ns;
if((dojo.ns)&&(!dojo.ns.allow(ns))){
_5d9=false;
}
}
if(_5d9){
var _5de=this.parseAttributes(node);
for(var attr in _5de){
if((!_5db[_5d7][attr])||(typeof _5db[_5d7][attr]!="array")){
_5db[_5d7][attr]=[];
}
_5db[_5d7][attr].push(_5de[attr]);
}
_5db[_5d7].nodeRef=node;
_5db.tagName=_5d7;
_5db.index=_5d6||0;
}
var _5df=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(!_5db[ctn]){
_5db[ctn]=[];
}
_5db[ctn].push(this.parseElement(tcn,true,_5d5,_5df));
if((tcn.childNodes.length==1)&&(tcn.childNodes.item(0).nodeType==dojo.dom.TEXT_NODE)){
_5db[ctn][_5db[ctn].length-1].value=tcn.childNodes.item(0).nodeValue;
}
_5df++;
break;
case dojo.dom.TEXT_NODE:
if(node.childNodes.length==1){
_5db[_5d7].push({value:node.childNodes.item(0).nodeValue});
}
break;
default:
break;
}
}
return _5db;
};
this.parseAttributes=function(node){
var _5e4={};
var atts=node.attributes;
var _5e6,i=0;
while((_5e6=atts[i++])){
if(isIE){
if(!_5e6){
continue;
}
if((typeof _5e6=="object")&&(typeof _5e6.nodeValue=="undefined")||(_5e6.nodeValue==null)||(_5e6.nodeValue=="")){
continue;
}
}
var nn=_5e6.nodeName.split(":");
nn=(nn.length==2)?nn[1]:_5e6.nodeName;
_5e4[nn]={value:_5e6.nodeValue};
}
return _5e4;
};
};
dojo.provide("dojo.lang.declare");
dojo.lang.declare=function(_5e9,_5ea,init,_5ec){
if((dojo.lang.isFunction(_5ec))||((!_5ec)&&(!dojo.lang.isFunction(init)))){
var temp=_5ec;
_5ec=init;
init=temp;
}
var _5ee=[];
if(dojo.lang.isArray(_5ea)){
_5ee=_5ea;
_5ea=_5ee.shift();
}
if(!init){
init=dojo.evalObjPath(_5e9,false);
if((init)&&(!dojo.lang.isFunction(init))){
init=null;
}
}
var ctor=dojo.lang.declare._makeConstructor();
var scp=(_5ea?_5ea.prototype:null);
if(scp){
scp.prototyping=true;
ctor.prototype=new _5ea();
scp.prototyping=false;
}
ctor.superclass=scp;
ctor.mixins=_5ee;
for(var i=0,l=_5ee.length;i<l;i++){
dojo.lang.extend(ctor,_5ee[i].prototype);
}
ctor.prototype.initializer=null;
ctor.prototype.declaredClass=_5e9;
if(dojo.lang.isArray(_5ec)){
dojo.lang.extend.apply(dojo.lang,[ctor].concat(_5ec));
}else{
dojo.lang.extend(ctor,(_5ec)||{});
}
dojo.lang.extend(ctor,dojo.lang.declare._common);
ctor.prototype.constructor=ctor;
ctor.prototype.initializer=(ctor.prototype.initializer)||(init)||(function(){
});
var _5f3=dojo.parseObjPath(_5e9,null,true);
_5f3.obj[_5f3.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(_5f9,_5fa,args){
var _5fc,_5fd=this.___proto;
this.___proto=_5f9;
try{
_5fc=_5f9[_5fa].apply(this,(args||[]));
}
catch(e){
throw e;
}
finally{
this.___proto=_5fd;
}
return _5fc;
},_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.ns");
dojo.ns={namespaces:{},failed:{},loading:{},loaded:{},register:function(name,_604,_605,_606){
if(!_606||!this.namespaces[name]){
this.namespaces[name]=new dojo.ns.Ns(name,_604,_605);
}
},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,_60d,_60e){
this.name=name;
this.module=_60d;
this.resolver=_60e;
this._loaded=[];
this._failed=[];
};
dojo.ns.Ns.prototype.resolve=function(name,_610,_611){
if(!this.resolver||djConfig["skipAutoRequire"]){
return false;
}
var _612=this.resolver(name,_610);
if((_612)&&(!this._loaded[_612])&&(!this._failed[_612])){
var req=dojo.require;
req(_612,false,true);
if(dojo.hostenv.findModule(_612,false)){
this._loaded[_612]=true;
}else{
if(!_611){
dojo.raise("dojo.ns.Ns.resolve: module '"+_612+"' not found after loading via namespace '"+this.name+"'");
}
this._failed[_612]=true;
}
}
return Boolean(this._loaded[_612]);
};
dojo.registerNamespace=function(name,_615,_616){
dojo.ns.register.apply(dojo.ns,arguments);
};
dojo.registerNamespaceResolver=function(name,_618){
var n=dojo.ns.namespaces[name];
if(n){
n.resolver=_618;
}
};
dojo.registerNamespaceManifest=function(_61a,path,name,_61d,_61e){
dojo.registerModulePath(name,path);
dojo.registerNamespace(name,_61d,_61e);
};
dojo.registerNamespace("dojo","dojo.widget");
dojo.provide("dojo.event.topic");
dojo.event.topic=new function(){
this.topics={};
this.getTopic=function(_61f){
if(!this.topics[_61f]){
this.topics[_61f]=new this.TopicImpl(_61f);
}
return this.topics[_61f];
};
this.registerPublisher=function(_620,obj,_622){
var _620=this.getTopic(_620);
_620.registerPublisher(obj,_622);
};
this.subscribe=function(_623,obj,_625){
var _623=this.getTopic(_623);
_623.subscribe(obj,_625);
};
this.unsubscribe=function(_626,obj,_628){
var _626=this.getTopic(_626);
_626.unsubscribe(obj,_628);
};
this.destroy=function(_629){
this.getTopic(_629).destroy();
delete this.topics[_629];
};
this.publishApply=function(_62a,args){
var _62a=this.getTopic(_62a);
_62a.sendMessage.apply(_62a,args);
};
this.publish=function(_62c,_62d){
var _62c=this.getTopic(_62c);
var args=[];
for(var x=1;x<arguments.length;x++){
args.push(arguments[x]);
}
_62c.sendMessage.apply(_62c,args);
};
};
dojo.event.topic.TopicImpl=function(_630){
this.topicName=_630;
this.subscribe=function(_631,_632){
var tf=_632||_631;
var to=(!_632)?dj_global:_631;
return dojo.event.kwConnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
};
this.unsubscribe=function(_635,_636){
var tf=(!_636)?_635:_636;
var to=(!_636)?null:_635;
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(_639){
this._getJoinPoint().squelch=_639;
};
this.destroy=function(){
this._getJoinPoint().disconnect();
};
this.registerPublisher=function(_63a,_63b){
dojo.event.connect(_63a,_63b,this,"sendMessage");
};
this.sendMessage=function(_63c){
};
};
dojo.provide("dojo.event.*");
dojo.provide("dojo.widget.Manager");
dojo.widget.manager=new function(){
this.widgets=[];
this.widgetIds=[];
this.topWidgets={};
var _63d={};
var _63e=[];
this.getUniqueId=function(_63f){
var _640;
do{
_640=_63f+"_"+(_63d[_63f]!=undefined?++_63d[_63f]:_63d[_63f]=0);
}while(this.getWidgetById(_640));
return _640;
};
this.add=function(_641){
this.widgets.push(_641);
if(!_641.extraArgs["id"]){
_641.extraArgs["id"]=_641.extraArgs["ID"];
}
if(_641.widgetId==""){
if(_641["id"]){
_641.widgetId=_641["id"];
}else{
if(_641.extraArgs["id"]){
_641.widgetId=_641.extraArgs["id"];
}else{
_641.widgetId=this.getUniqueId(_641.ns+"_"+_641.widgetType);
}
}
}
if(this.widgetIds[_641.widgetId]){
dojo.debug("widget ID collision on ID: "+_641.widgetId);
}
this.widgetIds[_641.widgetId]=_641;
};
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(_643){
if(dojo.lang.isNumber(_643)){
var tw=this.widgets[_643].widgetId;
delete this.widgetIds[tw];
this.widgets.splice(_643,1);
}else{
this.removeById(_643);
}
};
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 _64a=(type.indexOf(":")<0?function(x){
return x.widgetType.toLowerCase();
}:function(x){
return x.getNamespacedType();
});
var ret=[];
dojo.lang.forEach(this.widgets,function(x){
if(_64a(x)==lt){
ret.push(x);
}
});
return ret;
};
this.getWidgetsByFilter=function(_64f,_650){
var ret=[];
dojo.lang.every(this.widgets,function(x){
if(_64f(x)){
ret.push(x);
if(_650){
return false;
}
}
return true;
});
return (_650?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 _656={};
var _657=["dojo.widget"];
for(var i=0;i<_657.length;i++){
_657[_657[i]]=true;
}
this.registerWidgetPackage=function(_659){
if(!_657[_659]){
_657[_659]=true;
_657.push(_659);
}
};
this.getWidgetPackageList=function(){
return dojo.lang.map(_657,function(elt){
return (elt!==true?elt:undefined);
});
};
this.getImplementation=function(_65b,_65c,_65d,ns){
var impl=this.getImplementationName(_65b,ns);
if(impl){
var ret=_65c?new impl(_65c):new impl();
return ret;
}
};
function buildPrefixCache(){
for(var _661 in dojo.render){
if(dojo.render[_661]["capable"]===true){
var _662=dojo.render[_661].prefixes;
for(var i=0;i<_662.length;i++){
_63e.push(_662[i].toLowerCase());
}
}
}
}
var _664=function(_665,_666){
if(!_666){
return null;
}
for(var i=0,l=_63e.length,_669;i<=l;i++){
_669=(i<l?_666[_63e[i]]:_666);
if(!_669){
continue;
}
for(var name in _669){
if(name.toLowerCase()==_665){
return _669[name];
}
}
}
return null;
};
var _66b=function(_66c,_66d){
var _66e=dojo.evalObjPath(_66d,false);
return (_66e?_664(_66c,_66e):null);
};
this.getImplementationName=function(_66f,ns){
var _671=_66f.toLowerCase();
ns=ns||"dojo";
var imps=_656[ns]||(_656[ns]={});
var impl=imps[_671];
if(impl){
return impl;
}
if(!_63e.length){
buildPrefixCache();
}
var _674=dojo.ns.get(ns);
if(!_674){
dojo.ns.register(ns,ns+".widget");
_674=dojo.ns.get(ns);
}
if(_674){
_674.resolve(_66f);
}
impl=_66b(_671,_674.module);
if(impl){
return (imps[_671]=impl);
}
_674=dojo.ns.require(ns);
if((_674)&&(_674.resolver)){
_674.resolve(_66f);
impl=_66b(_671,_674.module);
if(impl){
return (imps[_671]=impl);
}
}
dojo.deprecated("dojo.widget.Manager.getImplementationName","Could not locate widget implementation for \""+_66f+"\" in \""+_674.module+"\" registered to namespace \""+_674.name+"\". "+"Developers must specify correct namespaces for all non-Dojo widgets","0.5");
for(var i=0;i<_657.length;i++){
impl=_66b(_671,_657[i]);
if(impl){
return (imps[_671]=impl);
}
}
throw new Error("Could not locate widget implementation for \""+_66f+"\" in \""+_674.module+"\" registered to namespace \""+_674.name+"\"");
};
this.resizing=false;
this.onWindowResized=function(){
if(this.resizing){
return;
}
try{
this.resizing=true;
for(var id in this.topWidgets){
var _677=this.topWidgets[id];
if(_677.checkSize){
_677.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(_67c,_67d){
dw[(_67d||_67c)]=h(_67c);
};
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 _67f=dwm.getAllWidgets.apply(dwm,arguments);
if(arguments.length>0){
return _67f[n];
}
return _67f;
};
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("src/widget/templates/images"),doAccessibleCheck:true,accessible:null,checkAccessible:function(){
if(this.accessible===null){
this.accessible=false;
if(this.doAccessibleCheck==true){
this.accessible=this.testAccessible();
}
}
return this.accessible;
},testAccessible:function(){
this.accessible=false;
if(dojo.render.html.ie||dojo.render.html.mozilla){
var div=document.createElement("div");
div.style.backgroundImage="url(\""+this.imgPath+"/tab_close.gif\")";
dojo.body().appendChild(div);
var _681=null;
if(window.getComputedStyle){
var _682=getComputedStyle(div,"");
_681=_682.getPropertyValue("background-image");
}else{
_681=div.currentStyle.backgroundImage;
}
var _683=false;
if(_681!=null&&(_681=="none"||_681=="url(invalid-url:)")){
this.accessible=true;
}
dojo.body().removeChild(div);
}
return this.accessible;
},setAccessible:function(_684){
this.accessible=_684;
},setCheckAccessible:function(_685){
this.doAccessibleCheck=_685;
},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 _687=this.children[i];
if(_687.onResized){
_687.onResized();
}
}
},create:function(args,_689,_68a,ns){
if(ns){
this.ns=ns;
}
this.satisfyPropertySets(args,_689,_68a);
this.mixInProperties(args,_689,_68a);
this.postMixInProperties(args,_689,_68a);
dojo.widget.manager.add(this);
this.buildRendering(args,_689,_68a);
this.initialize(args,_689,_68a);
this.postInitialize(args,_689,_68a);
this.postCreate(args,_689,_68a);
return this;
},destroy:function(_68c){
if(this.parent){
this.parent.removeChild(this);
}
this.destroyChildren();
this.uninitialize();
this.destroyRendering(_68c);
dojo.widget.manager.removeById(this.widgetId);
},destroyChildren:function(){
var _68d;
var i=0;
while(this.children.length>i){
_68d=this.children[i];
if(_68d instanceof dojo.widget.Widget){
this.removeChild(_68d);
_68d.destroy();
continue;
}
i++;
}
},getChildrenOfType:function(type,_690){
var ret=[];
var _692=dojo.lang.isFunction(type);
if(!_692){
type=type.toLowerCase();
}
for(var x=0;x<this.children.length;x++){
if(_692){
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(_690){
ret=ret.concat(this.children[x].getChildrenOfType(type,_690));
}
}
return ret;
},getDescendants:function(){
var _694=[];
var _695=[this];
var elem;
while((elem=_695.pop())){
_694.push(elem);
if(elem.children){
dojo.lang.forEach(elem.children,function(elem){
_695.push(elem);
});
}
}
return _694;
},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 _69c;
var _69d=dojo.widget.lcArgsCache[this.widgetType];
if(_69d==null){
_69d={};
for(var y in this){
_69d[((new String(y)).toLowerCase())]=y;
}
dojo.widget.lcArgsCache[this.widgetType]=_69d;
}
var _69f={};
for(var x in args){
if(!this[x]){
var y=_69d[(new String(x)).toLowerCase()];
if(y){
args[y]=args[x];
x=y;
}
}
if(_69f[x]){
continue;
}
_69f[x]=true;
if((typeof this[x])!=(typeof _69c)){
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 _6a1=args[x].split(";");
for(var y=0;y<_6a1.length;y++){
var si=_6a1[y].indexOf(":");
if((si!=-1)&&(_6a1[y].length>si)){
this[x][_6a1[y].substr(0,si).replace(/^\s+|\s+$/g,"")]=_6a1[y].substr(si+1);
}
}
}
}else{
this[x]=args[x];
}
}
}
}
}
}
}
}
}else{
this.extraArgs[x.toLowerCase()]=args[x];
}
}
},postMixInProperties:function(args,frag,_6a5){
},initialize:function(args,frag,_6a8){
return false;
},postInitialize:function(args,frag,_6ab){
return false;
},postCreate:function(args,frag,_6ae){
return false;
},uninitialize:function(){
return false;
},buildRendering:function(args,frag,_6b1){
dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", ");
return false;
},destroyRendering:function(){
dojo.unimplemented("dojo.widget.Widget.destroyRendering");
return false;
},addedTo:function(_6b2){
},addChild:function(_6b3){
dojo.unimplemented("dojo.widget.Widget.addChild");
return false;
},removeChild:function(_6b4){
for(var x=0;x<this.children.length;x++){
if(this.children[x]===_6b4){
this.children.splice(x,1);
_6b4.parent=null;
break;
}
}
return _6b4;
},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(_6b9,_6ba,_6bb){
var _6bc=_6ba.parseProperties(_6b9["dojo:propertyset"]);
};
dojo.widget.tags["dojo:connect"]=function(_6bd,_6be,_6bf){
var _6c0=_6be.parseProperties(_6bd["dojo:connect"]);
};
dojo.widget.buildWidgetFromParseTree=function(type,frag,_6c3,_6c4,_6c5,_6c6){
dojo.a11y.setAccessibleMode();
var _6c7=type.split(":");
_6c7=(_6c7.length==2)?_6c7[1]:type;
var _6c8=_6c6||_6c3.parseProperties(frag[frag["ns"]+":"+_6c7]);
var _6c9=dojo.widget.manager.getImplementation(_6c7,null,null,frag["ns"]);
if(!_6c9){
throw new Error("cannot find \""+type+"\" widget");
}else{
if(!_6c9.create){
throw new Error("\""+type+"\" widget object has no \"create\" method and does not appear to implement *Widget");
}
}
_6c8["dojoinsertionindex"]=_6c5;
var ret=_6c9.create(_6c8,frag,_6c4,frag["ns"]);
return ret;
};
dojo.widget.defineWidget=function(_6cb,_6cc,_6cd,init,_6cf){
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(_6d2,_6d3,_6d4,init,_6d6){
var _6d7=_6d2.split(".");
var type=_6d7.pop();
var regx="\\.("+(_6d3?_6d3+"|":"")+dojo.widget.defineWidget.renderers+")\\.";
var r=_6d2.search(new RegExp(regx));
_6d7=(r<0?_6d7.join("."):_6d2.substr(0,r));
dojo.widget.manager.registerWidgetPackage(_6d7);
var pos=_6d7.indexOf(".");
var _6dc=(pos>-1)?_6d7.substring(0,pos):_6d7;
_6d6=(_6d6)||{};
_6d6.widgetType=type;
if((!init)&&(_6d6["classConstructor"])){
init=_6d6.classConstructor;
delete _6d6.classConstructor;
}
dojo.declare(_6d2,_6d4,init,_6d6);
};
dojo.provide("dojo.widget.Parse");
dojo.widget.Parse=function(_6dd){
this.propertySetsList=[];
this.fragment=_6dd;
this.createComponents=function(frag,_6df){
var _6e0=[];
var _6e1=false;
try{
if(frag&&frag.tagName&&(frag!=frag.nodeRef)){
var _6e2=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(_6e2[ltn]){
_6e1=true;
ret=_6e2[ltn](frag,this,_6df,frag.index);
_6e0.push(ret);
}else{
if(ltn.indexOf(":")==-1){
ltn="dojo:"+ltn;
}
ret=dojo.widget.buildWidgetFromParseTree(ltn,frag,this,_6df,frag.index);
if(ret){
_6e1=true;
_6e0.push(ret);
}
}
}
}
}
catch(e){
dojo.debug("dojo.widget.Parse: error:",e);
}
if(!_6e1){
_6e0=_6e0.concat(this.createSubComponents(frag,_6df));
}
return _6e0;
};
this.createSubComponents=function(_6e7,_6e8){
var frag,_6ea=[];
for(var item in _6e7){
frag=_6e7[item];
if(frag&&typeof frag=="object"&&(frag!=_6e7.nodeRef)&&(frag!=_6e7.tagName)&&(!dojo.dom.isNode(frag))){
_6ea=_6ea.concat(this.createComponents(frag,_6e8));
}
}
return _6ea;
};
this.parsePropertySets=function(_6ec){
return [];
};
this.parseProperties=function(_6ed){
var _6ee={};
for(var item in _6ed){
if((_6ed[item]==_6ed.tagName)||(_6ed[item]==_6ed.nodeRef)){
}else{
var frag=_6ed[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 _6f1=this;
this.getDataProvider(_6f1,frag[0].value);
_6ee.dataProvider=this.dataProvider;
}
_6ee[item]=frag[0].value;
var _6f2=this.parseProperties(frag);
for(var _6f3 in _6f2){
_6ee[_6f3]=_6f2[_6f3];
}
}
catch(e){
dojo.debug(e);
}
}
}
switch(item.toLowerCase()){
case "checked":
case "disabled":
if(typeof _6ee[item]!="boolean"){
_6ee[item]=true;
}
break;
}
}
}
return _6ee;
};
this.getDataProvider=function(_6f4,_6f5){
dojo.io.bind({url:_6f5,load:function(type,_6f7){
if(type=="load"){
_6f4.dataProvider=_6f7;
}
},mimetype:"text/javascript",sync:true});
};
this.getPropertySetById=function(_6f8){
for(var x=0;x<this.propertySetsList.length;x++){
if(_6f8==this.propertySetsList[x]["id"][0].value){
return this.propertySetsList[x];
}
}
return "";
};
this.getPropertySetsByType=function(_6fa){
var _6fb=[];
for(var x=0;x<this.propertySetsList.length;x++){
var cpl=this.propertySetsList[x];
var cpcc=cpl.componentClass||cpl.componentType||null;
var _6ff=this.propertySetsList[x]["id"][0].value;
if(cpcc&&(_6ff==cpcc[0].value)){
_6fb.push(cpl);
}
}
return _6fb;
};
this.getPropertySets=function(_700){
var ppl="dojo:propertyproviderlist";
var _702=[];
var _703=_700.tagName;
if(_700[ppl]){
var _704=_700[ppl].value.split(" ");
for(var _705 in _704){
if((_705.indexOf("..")==-1)&&(_705.indexOf("://")==-1)){
var _706=this.getPropertySetById(_705);
if(_706!=""){
_702.push(_706);
}
}else{
}
}
}
return this.getPropertySetsByType(_703).concat(_702);
};
this.createComponentFromScript=function(_707,_708,_709,ns){
_709.fastMixIn=true;
var ltn=(ns||"dojo")+":"+_708.toLowerCase();
if(dojo.widget.tags[ltn]){
return [dojo.widget.tags[ltn](_709,this,null,null,_709)];
}
return [dojo.widget.buildWidgetFromParseTree(ltn,_709,this,null,null,_709)];
};
};
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,_70e,_70f,_710){
var _711=false;
var _712=(typeof name=="string");
if(_712){
var pos=name.indexOf(":");
var ns=(pos>-1)?name.substring(0,pos):"dojo";
if(pos>-1){
name=name.substring(pos+1);
}
var _715=name.toLowerCase();
var _716=ns+":"+_715;
_711=(dojo.byId(name)&&!dojo.widget.tags[_716]);
}
if((arguments.length==1)&&(_711||!_712)){
var xp=new dojo.xml.Parse();
var tn=_711?dojo.byId(name):name;
return dojo.widget.getParser().createComponents(xp.parseElement(tn,null,true))[0];
}
function fromScript(_719,name,_71b,ns){
_71b[_716]={dojotype:[{value:_715}],nodeRef:_719,fastMixIn:true};
_71b.ns=ns;
return dojo.widget.getParser().createComponentFromScript(_719,name,_71b,ns);
}
_70e=_70e||{};
var _71d=false;
var tn=null;
var h=dojo.render.html.capable;
if(h){
tn=document.createElement("span");
}
if(!_70f){
_71d=true;
_70f=tn;
if(h){
dojo.body().appendChild(_70f);
}
}else{
if(_710){
dojo.dom.insertAtPosition(tn,_70f,_710);
}else{
tn=_70f;
}
}
var _71f=fromScript(tn,name.toLowerCase(),_70e,ns);
if((!_71f)||(!_71f[0])||(typeof _71f[0].widgetType=="undefined")){
throw new Error("createWidget: Creation of \""+name+"\" widget failed.");
}
try{
if(_71d&&_71f[0].domNode.parentNode){
_71f[0].domNode.parentNode.removeChild(_71f[0].domNode);
}
}
catch(e){
dojo.debug(e);
}
return _71f[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,_721,_722,_723){
var _724=_721||obj.templatePath;
var _725=dojo.widget._templateCache;
if(!_724&&!obj["widgetType"]){
do{
var _726="__dummyTemplate__"+dojo.widget._templateCache.dummyCount++;
}while(_725[_726]);
obj.widgetType=_726;
}
var wt=_724?_724.toString():obj.widgetType;
var ts=_725[wt];
if(!ts){
_725[wt]={"string":null,"node":null};
if(_723){
ts={};
}else{
ts=_725[wt];
}
}
if((!obj.templateString)&&(!_723)){
obj.templateString=_722||ts["string"];
}
if((!obj.templateNode)&&(!_723)){
obj.templateNode=ts["node"];
}
if((!obj.templateNode)&&(!obj.templateString)&&(_724)){
var _729=dojo.hostenv.getText(_724);
if(_729){
_729=_729.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");
var _72a=_729.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_72a){
_729=_72a[1];
}
}else{
_729="";
}
obj.templateString=_729;
if(!_723){
_725[wt]["string"]=_729;
}
}
if((!ts["string"])&&(!_723)){
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,_72e){
if(dojo.render.html.ie){
node.setAttribute(this[ns].alias+":"+attr,this[ns].prefix+_72e);
}else{
node.setAttributeNS(this[ns]["namespace"],attr,this[ns].prefix+_72e);
}
},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 _735=true;
if(dojo.render.html.ie){
_735=node.removeAttribute(this[ns].alias+":"+attr);
}else{
node.removeAttributeNS(this[ns]["namespace"],attr);
}
return _735;
}};
dojo.widget.attachTemplateNodes=function(_736,_737,_738){
var _739=dojo.dom.ELEMENT_NODE;
function trim(str){
return str.replace(/^\s+|\s+$/g,"");
}
if(!_736){
_736=_737.domNode;
}
if(_736.nodeType!=_739){
return;
}
var _73b=_736.all||_736.getElementsByTagName("*");
var _73c=_737;
for(var x=-1;x<_73b.length;x++){
var _73e=(x==-1)?_736:_73b[x];
var _73f=[];
if(!_737.widgetsInTemplate||!_73e.getAttribute("dojoType")){
for(var y=0;y<this.attachProperties.length;y++){
var _741=_73e.getAttribute(this.attachProperties[y]);
if(_741){
_73f=_741.split(";");
for(var z=0;z<_73f.length;z++){
if(dojo.lang.isArray(_737[_73f[z]])){
_737[_73f[z]].push(_73e);
}else{
_737[_73f[z]]=_73e;
}
}
break;
}
}
var _743=_73e.getAttribute(this.eventAttachProperty);
if(_743){
var evts=_743.split(";");
for(var y=0;y<evts.length;y++){
if((!evts[y])||(!evts[y].length)){
continue;
}
var _745=null;
var tevt=trim(evts[y]);
if(evts[y].indexOf(":")>=0){
var _747=tevt.split(":");
tevt=trim(_747[0]);
_745=trim(_747[1]);
}
if(!_745){
_745=tevt;
}
var tf=function(){
var ntf=new String(_745);
return function(evt){
if(_73c[ntf]){
_73c[ntf](dojo.event.browser.fixEvent(evt,this));
}
};
}();
dojo.event.browser.addListener(_73e,tevt,tf,false,true);
}
}
for(var y=0;y<_738.length;y++){
var _74b=_73e.getAttribute(_738[y]);
if((_74b)&&(_74b.length)){
var _745=null;
var _74c=_738[y].substr(4);
_745=trim(_74b);
var _74d=[_745];
if(_745.indexOf(";")>=0){
_74d=dojo.lang.map(_745.split(";"),trim);
}
for(var z=0;z<_74d.length;z++){
if(!_74d[z].length){
continue;
}
var tf=function(){
var ntf=new String(_74d[z]);
return function(evt){
if(_73c[ntf]){
_73c[ntf](dojo.event.browser.fixEvent(evt,this));
}
};
}();
dojo.event.browser.addListener(_73e,_74c,tf,false,true);
}
}
}
}
var _750=_73e.getAttribute(this.templateProperty);
if(_750){
_737[_750]=_73e;
}
dojo.lang.forEach(dojo.widget.waiNames,function(name){
var wai=dojo.widget.wai[name];
var val=_73e.getAttribute(wai.name);
if(val){
if(val.indexOf("-")==-1){
dojo.widget.wai.setAttr(_73e,wai.name,"role",val);
}else{
var _754=val.split("-");
dojo.widget.wai.setAttr(_73e,wai.name,_754[0],_754[1]);
}
}
},this);
var _755=_73e.getAttribute(this.onBuildProperty);
if(_755){
eval("var node = baseNode; var widget = targetObj; "+_755);
}
}
};
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(_75d,_75e,pos,ref,_761){
if(!this.isContainer){
dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget");
return null;
}else{
if(_761==undefined){
_761=this.children.length;
}
this.addWidgetAsDirectChild(_75d,_75e,pos,ref,_761);
this.registerChild(_75d,_761);
}
return _75d;
},addWidgetAsDirectChild:function(_762,_763,pos,ref,_766){
if((!this.containerNode)&&(!_763)){
this.containerNode=this.domNode;
}
var cn=(_763)?_763:this.containerNode;
if(!pos){
pos="after";
}
if(!ref){
if(!cn){
cn=dojo.body();
}
ref=cn.lastChild;
}
if(!_766){
_766=0;
}
_762.domNode.setAttribute("dojoinsertionindex",_766);
if(!ref){
cn.appendChild(_762.domNode);
}else{
if(pos=="insertAtIndex"){
dojo.dom.insertAtIndex(_762.domNode,ref.parentNode,_766);
}else{
if((pos=="after")&&(ref===cn.lastChild)){
cn.appendChild(_762.domNode);
}else{
dojo.dom.insertAtPosition(_762.domNode,cn,pos);
}
}
}
},registerChild:function(_768,_769){
_768.dojoInsertionIndex=_769;
var idx=-1;
for(var i=0;i<this.children.length;i++){
if(this.children[i].dojoInsertionIndex<=_769){
idx=i;
}
}
this.children.splice(idx+1,0,_768);
_768.parent=this;
_768.addedTo(this,idx+1);
delete dojo.widget.manager.topWidgets[_768.widgetId];
},removeChild:function(_76c){
dojo.dom.removeNode(_76c.domNode);
return dojo.widget.DomWidget.superclass.removeChild.call(this,_76c);
},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,_770){
var _771=this.getFragNodeRef(frag);
if(_770&&(_770.snarfChildDomOutput||!_771)){
_770.addWidgetAsDirectChild(this,"","insertAtIndex","",args["dojoinsertionindex"],_771);
}else{
if(_771){
if(this.domNode&&(this.domNode!==_771)){
this._sourceNodeRef=dojo.dom.replaceNode(_771,this.domNode);
}
}
}
if(_770){
_770.registerChild(this,args.dojoinsertionindex);
}else{
dojo.widget.manager.topWidgets[this.widgetId]=this;
}
if(this.widgetsInTemplate){
var _772=new dojo.xml.Parse();
var _773;
var _774=this.domNode.getElementsByTagName("*");
for(var i=0;i<_774.length;i++){
if(_774[i].getAttribute("dojoAttachPoint")=="subContainerWidget"){
_773=_774[i];
}
if(_774[i].getAttribute("dojoType")){
_774[i].setAttribute("isSubWidget",true);
}
}
if(this.isContainer&&!this.containerNode){
if(_773){
var src=this.getFragNodeRef(frag);
if(src){
dojo.dom.moveChildren(src,_773);
frag["dojoDontFollow"]=true;
}
}else{
dojo.debug("No subContainerWidget node can be found in template file for widget "+this);
}
}
var _777=_772.parseElement(this.domNode,null,true);
dojo.widget.getParser().createSubComponents(_777,this);
var _778=[];
var _779=[this];
var w;
while((w=_779.pop())){
for(var i=0;i<w.children.length;i++){
var _77b=w.children[i];
if(_77b._processedSubWidgets||!_77b.extraArgs["issubwidget"]){
continue;
}
_778.push(_77b);
if(_77b.isContainer){
_779.push(_77b);
}
}
}
for(var i=0;i<_778.length;i++){
var _77c=_778[i];
if(_77c._processedSubWidgets){
dojo.debug("This should not happen: widget._processedSubWidgets is already true!");
return;
}
_77c._processedSubWidgets=true;
if(_77c.extraArgs["dojoattachevent"]){
var evts=_77c.extraArgs["dojoattachevent"].split(";");
for(var j=0;j<evts.length;j++){
var _77f=null;
var tevt=dojo.string.trim(evts[j]);
if(tevt.indexOf(":")>=0){
var _781=tevt.split(":");
tevt=dojo.string.trim(_781[0]);
_77f=dojo.string.trim(_781[1]);
}
if(!_77f){
_77f=tevt;
}
if(dojo.lang.isFunction(_77c[tevt])){
dojo.event.kwConnect({srcObj:_77c,srcFunc:tevt,targetObj:this,targetFunc:_77f});
}else{
alert(tevt+" is not a function in widget "+_77c);
}
}
}
if(_77c.extraArgs["dojoattachpoint"]){
this[_77c.extraArgs["dojoattachpoint"]]=_77c;
}
}
}
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 _785=args["templateCssPath"]||this.templateCssPath;
if(_785&&!dojo.widget._cssFiles[_785.toString()]){
if((!this.templateCssString)&&(_785)){
this.templateCssString=dojo.hostenv.getText(_785);
this.templateCssPath=null;
}
dojo.widget._cssFiles[_785.toString()]=true;
}
if((this["templateCssString"])&&(!dojo.widget._cssStrings[this.templateCssString])){
dojo.html.insertCssText(this.templateCssString,null,_785);
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 _788=false;
if(args["templatepath"]){
args["templatePath"]=args["templatepath"];
}
dojo.widget.fillFromTemplateCache(this,args["templatePath"],null,_788);
var ts=dojo.widget._templateCache[this.templatePath?this.templatePath.toString():this.widgetType];
if((ts)&&(!_788)){
if(!this.templateString.length){
this.templateString=ts["string"];
}
if(!this.templateNode){
this.templateNode=ts["node"];
}
}
var _78a=false;
var node=null;
var tstr=this.templateString;
if((!this.templateNode)&&(this.templateString)){
_78a=this.templateString.match(/\$\{([^\}]+)\}/g);
if(_78a){
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<_78a.length;i++){
var key=_78a[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 _791;
if((kval)||(dojo.lang.isString(kval))){
_791=new String((dojo.lang.isFunction(kval))?kval.call(this,key,this.templateString):kval);
while(_791.indexOf("\"")>-1){
_791=_791.replace("\"","&quot;");
}
tstr=tstr.replace(_78a[i],_791);
}
}
}else{
this.templateNode=this.createNodesFromText(this.templateString,true)[0];
if(!_788){
ts.node=this.templateNode;
}
}
}
if((!this.templateNode)&&(!_78a)){
dojo.debug("DomWidget.buildFromTemplate: could not create template");
return false;
}else{
if(!_78a){
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(_793,_794){
if(!_793){
_793=this.domNode;
}
if(!_794){
_794=this;
}
return dojo.widget.attachTemplateNodes(_793,_794,dojo.widget.getDojoEventsFromStr(this.templateString));
},fillInTemplate:function(){
},destroyRendering:function(){
try{
dojo.dom.destroyNode(this.domNode);
delete this.domNode;
}
catch(e){
}
if(this._sourceNodeRef){
try{
dojo.dom.destroyNode(this._sourceNodeRef);
}
catch(e){
}
}
},createNodesFromText:function(){
dojo.unimplemented("dojo.widget.DomWidget.createNodesFromText");
}});
dojo.provide("dojo.html.util");
dojo.html.getElementWindow=function(_795){
return dojo.html.getDocumentWindow(_795.ownerDocument);
};
dojo.html.getDocumentWindow=function(doc){
if(dojo.render.html.safari&&!doc._parentWindow){
var fix=function(win){
win.document._parentWindow=win;
for(var i=0;i<win.frames.length;i++){
fix(win.frames[i]);
}
};
fix(window.top);
}
if(dojo.render.html.ie&&window!==document.parentWindow&&!doc._parentWindow){
doc.parentWindow.execScript("document._parentWindow = window;","Javascript");
var win=doc._parentWindow;
doc._parentWindow=null;
return win;
}
return doc._parentWindow||doc.parentWindow||doc.defaultView;
};
dojo.html.getAbsolutePositionExt=function(node,_79c,_79d,_79e){
var _79f=dojo.html.getElementWindow(node);
var ret=dojo.withGlobal(_79f,"getAbsolutePosition",dojo.html,arguments);
var win=dojo.html.getElementWindow(node);
if(_79e!=win&&win.frameElement){
var ext=dojo.html.getAbsolutePositionExt(win.frameElement,_79c,_79d,_79e);
ret.x+=ext.x;
ret.y+=ext.y;
}
ret.top=ret.y;
ret.left=ret.x;
return ret;
};
dojo.html.gravity=function(node,e){
node=dojo.byId(node);
var _7a5=dojo.html.getCursorPosition(e);
with(dojo.html){
var _7a6=getAbsolutePosition(node,true);
var bb=getBorderBox(node);
var _7a8=_7a6.x+(bb.width/2);
var _7a9=_7a6.y+(bb.height/2);
}
with(dojo.html.gravity){
return ((_7a5.x<_7a8?WEST:EAST)|(_7a5.y<_7a9?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(_7aa,e){
_7aa=dojo.byId(_7aa);
var _7ac=dojo.html.getCursorPosition(e);
var bb=dojo.html.getBorderBox(_7aa);
var _7ae=dojo.html.getAbsolutePosition(_7aa,true,dojo.html.boxSizing.BORDER_BOX);
var top=_7ae.y;
var _7b0=top+bb.height;
var left=_7ae.x;
var _7b2=left+bb.width;
return (_7ac.x>=left&&_7ac.x<=_7b2&&_7ac.y>=top&&_7ac.y<=_7b0);
};
dojo.html.renderedTextContent=function(node){
node=dojo.byId(node);
var _7b4="";
if(node==null){
return _7b4;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
var _7b6="unknown";
try{
_7b6=dojo.html.getStyle(node.childNodes[i],"display");
}
catch(E){
}
switch(_7b6){
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":
_7b4+="\n";
_7b4+=dojo.html.renderedTextContent(node.childNodes[i]);
_7b4+="\n";
break;
case "none":
break;
default:
if(node.childNodes[i].tagName&&node.childNodes[i].tagName.toLowerCase()=="br"){
_7b4+="\n";
}else{
_7b4+=dojo.html.renderedTextContent(node.childNodes[i]);
}
break;
}
break;
case 3:
case 2:
case 4:
var text=node.childNodes[i].nodeValue;
var _7b8="unknown";
try{
_7b8=dojo.html.getStyle(node,"text-transform");
}
catch(E){
}
switch(_7b8){
case "capitalize":
var _7b9=text.split(" ");
for(var i=0;i<_7b9.length;i++){
_7b9[i]=_7b9[i].charAt(0).toUpperCase()+_7b9[i].substring(1);
}
text=_7b9.join(" ");
break;
case "uppercase":
text=text.toUpperCase();
break;
case "lowercase":
text=text.toLowerCase();
break;
default:
break;
}
switch(_7b8){
case "nowrap":
break;
case "pre-wrap":
break;
case "pre-line":
break;
case "pre":
break;
default:
text=text.replace(/\s+/," ");
if(/\s$/.test(_7b4)){
text.replace(/^\s/,"");
}
break;
}
_7b4+=text;
break;
default:
break;
}
}
return _7b4;
};
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 _7bd="none";
if((/^<t[dh][\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table><tbody><tr>"+txt+"</tr></tbody></table>";
_7bd="cell";
}else{
if((/^<tr[\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table><tbody>"+txt+"</tbody></table>";
_7bd="row";
}else{
if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table>"+txt+"</table>";
_7bd="section";
}
}
}
tn.innerHTML=txt;
if(tn["normalize"]){
tn.normalize();
}
var _7be=null;
switch(_7bd){
case "cell":
_7be=tn.getElementsByTagName("tr")[0];
break;
case "row":
_7be=tn.getElementsByTagName("tbody")[0];
break;
case "section":
_7be=tn.getElementsByTagName("table")[0];
break;
default:
_7be=tn;
break;
}
var _7bf=[];
for(var x=0;x<_7be.childNodes.length;x++){
_7bf.push(_7be.childNodes[x].cloneNode(true));
}
tn.style.display="none";
dojo.html.destroyNode(tn);
return _7bf;
};
dojo.html.placeOnScreen=function(node,_7c2,_7c3,_7c4,_7c5,_7c6,_7c7){
if(_7c2 instanceof Array||typeof _7c2=="array"){
_7c7=_7c6;
_7c6=_7c5;
_7c5=_7c4;
_7c4=_7c3;
_7c3=_7c2[1];
_7c2=_7c2[0];
}
if(_7c6 instanceof String||typeof _7c6=="string"){
_7c6=_7c6.split(",");
}
if(!isNaN(_7c4)){
_7c4=[Number(_7c4),Number(_7c4)];
}else{
if(!(_7c4 instanceof Array||typeof _7c4=="array")){
_7c4=[0,0];
}
}
var _7c8=dojo.html.getScroll().offset;
var view=dojo.html.getViewport();
node=dojo.byId(node);
var _7ca=node.style.display;
node.style.display="";
var bb=dojo.html.getBorderBox(node);
var w=bb.width;
var h=bb.height;
node.style.display=_7ca;
if(!(_7c6 instanceof Array||typeof _7c6=="array")){
_7c6=["TL"];
}
var _7ce,_7cf,_7d0=Infinity,_7d1;
for(var _7d2=0;_7d2<_7c6.length;++_7d2){
var _7d3=_7c6[_7d2];
var _7d4=true;
var tryX=_7c2-(_7d3.charAt(1)=="L"?0:w)+_7c4[0]*(_7d3.charAt(1)=="L"?1:-1);
var tryY=_7c3-(_7d3.charAt(0)=="T"?0:h)+_7c4[1]*(_7d3.charAt(0)=="T"?1:-1);
if(_7c5){
tryX-=_7c8.x;
tryY-=_7c8.y;
}
if(tryX<0){
tryX=0;
_7d4=false;
}
if(tryY<0){
tryY=0;
_7d4=false;
}
var x=tryX+w;
if(x>view.width){
x=view.width-w;
_7d4=false;
}else{
x=tryX;
}
x=Math.max(_7c4[0],x)+_7c8.x;
var y=tryY+h;
if(y>view.height){
y=view.height-h;
_7d4=false;
}else{
y=tryY;
}
y=Math.max(_7c4[1],y)+_7c8.y;
if(_7d4){
_7ce=x;
_7cf=y;
_7d0=0;
_7d1=_7d3;
break;
}else{
var dist=Math.pow(x-tryX-_7c8.x,2)+Math.pow(y-tryY-_7c8.y,2);
if(_7d0>dist){
_7d0=dist;
_7ce=x;
_7cf=y;
_7d1=_7d3;
}
}
}
if(!_7c7){
node.style.left=_7ce+"px";
node.style.top=_7cf+"px";
}
return {left:_7ce,top:_7cf,x:_7ce,y:_7cf,dist:_7d0,corner:_7d1};
};
dojo.html.placeOnScreenAroundElement=function(node,_7db,_7dc,_7dd,_7de,_7df){
var best,_7e1=Infinity;
_7db=dojo.byId(_7db);
var _7e2=_7db.style.display;
_7db.style.display="";
var mb=dojo.html.getElementBox(_7db,_7dd);
var _7e4=mb.width;
var _7e5=mb.height;
var _7e6=dojo.html.getAbsolutePosition(_7db,true,_7dd);
_7db.style.display=_7e2;
for(var _7e7 in _7de){
var pos,_7e9,_7ea;
var _7eb=_7de[_7e7];
_7e9=_7e6.x+(_7e7.charAt(1)=="L"?0:_7e4);
_7ea=_7e6.y+(_7e7.charAt(0)=="T"?0:_7e5);
pos=dojo.html.placeOnScreen(node,_7e9,_7ea,_7dc,true,_7eb,true);
if(pos.dist==0){
best=pos;
break;
}else{
if(_7e1>pos.dist){
_7e1=pos.dist;
best=pos;
}
}
}
if(!_7df){
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 _7ed=node.parentNode;
var _7ee=_7ed.scrollTop+dojo.html.getBorderBox(_7ed).height;
var _7ef=node.offsetTop+dojo.html.getMarginBox(node).height;
if(_7ee<_7ef){
_7ed.scrollTop+=(_7ef-_7ee);
}else{
if(_7ed.scrollTop>node.offsetTop){
_7ed.scrollTop-=(_7ed.scrollTop-node.offsetTop);
}
}
}
}
};
dojo.provide("dojo.lfx.toggle");
dojo.lfx.toggle.plain={show:function(node,_7f1,_7f2,_7f3){
dojo.html.show(node);
if(dojo.lang.isFunction(_7f3)){
_7f3();
}
},hide:function(node,_7f5,_7f6,_7f7){
dojo.html.hide(node);
if(dojo.lang.isFunction(_7f7)){
_7f7();
}
}};
dojo.lfx.toggle.fade={show:function(node,_7f9,_7fa,_7fb){
dojo.lfx.fadeShow(node,_7f9,_7fa,_7fb).play();
},hide:function(node,_7fd,_7fe,_7ff){
dojo.lfx.fadeHide(node,_7fd,_7fe,_7ff).play();
}};
dojo.lfx.toggle.wipe={show:function(node,_801,_802,_803){
dojo.lfx.wipeIn(node,_801,_802,_803).play();
},hide:function(node,_805,_806,_807){
dojo.lfx.wipeOut(node,_805,_806,_807).play();
}};
dojo.lfx.toggle.explode={show:function(node,_809,_80a,_80b,_80c){
dojo.lfx.explode(_80c||{x:0,y:0,width:0,height:0},node,_809,_80a,_80b).play();
},hide:function(node,_80e,_80f,_810,_811){
dojo.lfx.implode(node,_811||{x:0,y:0,width:0,height:0},_80e,_80f,_810).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(_818){
try{
if(this.bgIframe){
this.bgIframe.remove();
delete this.bgIframe;
}
if(!_818&&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 _81c=w||wh.width;
var _81d=h||wh.height;
if(this.width==_81c&&this.height==_81d){
return false;
}
this.width=_81c;
this.height=_81d;
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(_820){
if(_820.checkSize){
_820.checkSize();
}
});
}});
dojo.provide("dojo.widget.*");
dojo.provide("dojo.html.*");
dojo.provide("dojo.html.selection");
dojo.html.selectionType={NONE:0,TEXT:1,CONTROL:2};
dojo.html.clearSelection=function(){
var _821=dojo.global();
var _822=dojo.doc();
try{
if(_821["getSelection"]){
if(dojo.render.html.safari){
_821.getSelection().collapse();
}else{
_821.getSelection().removeAllRanges();
}
}else{
if(_822.selection){
if(_822.selection.empty){
_822.selection.empty();
}else{
if(_822.selection.clear){
_822.selection.clear();
}
}
}
}
return true;
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.html.disableSelection=function(_823){
_823=dojo.byId(_823)||dojo.body();
var h=dojo.render.html;
if(h.mozilla){
_823.style.MozUserSelect="none";
}else{
if(h.safari){
_823.style.KhtmlUserSelect="none";
}else{
if(h.ie){
_823.unselectable="on";
}else{
return false;
}
}
}
return true;
};
dojo.html.enableSelection=function(_825){
_825=dojo.byId(_825)||dojo.body();
var h=dojo.render.html;
if(h.mozilla){
_825.style.MozUserSelect="";
}else{
if(h.safari){
_825.style.KhtmlUserSelect="";
}else{
if(h.ie){
_825.unselectable="off";
}else{
return false;
}
}
}
return true;
};
dojo.html.selectInputText=function(_827){
var _828=dojo.global();
var _829=dojo.doc();
_827=dojo.byId(_827);
if(_829["selection"]&&dojo.body()["createTextRange"]){
var _82a=_827.createTextRange();
_82a.moveStart("character",0);
_82a.moveEnd("character",_827.value.length);
_82a.select();
}else{
if(_828["getSelection"]){
var _82b=_828.getSelection();
_827.setSelectionRange(0,_827.value.length);
}
}
_827.focus();
};
dojo.lang.mixin(dojo.html.selection,{getType:function(){
if(dojo.doc()["selection"]){
return dojo.html.selectionType[dojo.doc().selection.type.toUpperCase()];
}else{
var _82c=dojo.html.selectionType.TEXT;
var oSel;
try{
oSel=dojo.global().getSelection();
}
catch(e){
}
if(oSel&&oSel.rangeCount==1){
var _82e=oSel.getRangeAt(0);
if(_82e.startContainer==_82e.endContainer&&(_82e.endOffset-_82e.startOffset)==1&&_82e.startContainer.nodeType!=dojo.dom.TEXT_NODE){
_82c=dojo.html.selectionType.CONTROL;
}
}
return _82c;
}
},isCollapsed:function(){
var _82f=dojo.global();
var _830=dojo.doc();
if(_830["selection"]){
return _830.selection.createRange().text=="";
}else{
if(_82f["getSelection"]){
var _831=_82f.getSelection();
if(dojo.lang.isString(_831)){
return _831=="";
}else{
return _831.isCollapsed||_831.toString()=="";
}
}
}
},getSelectedElement:function(){
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
if(dojo.doc()["selection"]){
var _832=dojo.doc().selection.createRange();
if(_832&&_832.item){
return dojo.doc().selection.createRange().item(0);
}
}else{
var _833=dojo.global().getSelection();
return _833.anchorNode.childNodes[_833.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 _835=dojo.global().getSelection();
if(_835){
var node=_835.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 _837=dojo.global().getSelection();
if(_837){
return _837.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 _838=dojo.global().getSelection();
if(_838&&_838.rangeCount){
var frag=_838.getRangeAt(0).cloneContents();
var div=document.createElement("div");
div.appendChild(frag);
return div.innerHTML;
}
return null;
}
},hasAncestorElement:function(_83b){
return (dojo.html.selection.getAncestorElement.apply(this,arguments)!=null);
},getAncestorElement:function(_83c){
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(_841){
var _842=dojo.global();
var _843=dojo.doc();
_841=dojo.byId(_841);
if(_843.selection&&dojo.body().createTextRange){
try{
var _844=dojo.body().createControlRange();
_844.addElement(_841);
_844.select();
}
catch(e){
dojo.html.selection.selectElementChildren(_841);
}
}else{
if(_842["getSelection"]){
var _845=_842.getSelection();
if(_845["removeAllRanges"]){
var _844=_843.createRange();
_844.selectNode(_841);
_845.removeAllRanges();
_845.addRange(_844);
}
}
}
},selectElementChildren:function(_846){
var _847=dojo.global();
var _848=dojo.doc();
_846=dojo.byId(_846);
if(_848.selection&&dojo.body().createTextRange){
var _849=dojo.body().createTextRange();
_849.moveToElementText(_846);
_849.select();
}else{
if(_847["getSelection"]){
var _84a=_847.getSelection();
if(_84a["setBaseAndExtent"]){
_84a.setBaseAndExtent(_846,0,_846,_846.innerText.length-1);
}else{
if(_84a["selectAllChildren"]){
_84a.selectAllChildren(_846);
}
}
}
}
},getBookmark:function(){
var _84b;
var _84c=dojo.doc();
if(_84c["selection"]){
var _84d=_84c.selection.createRange();
_84b=_84d.getBookmark();
}else{
var _84e;
try{
_84e=dojo.global().getSelection();
}
catch(e){
}
if(_84e){
var _84d=_84e.getRangeAt(0);
_84b=_84d.cloneRange();
}else{
dojo.debug("No idea how to store the current selection for this browser!");
}
}
return _84b;
},moveToBookmark:function(_84f){
var _850=dojo.doc();
if(_850["selection"]){
var _851=_850.selection.createRange();
_851.moveToBookmark(_84f);
_851.select();
}else{
var _852;
try{
_852=dojo.global().getSelection();
}
catch(e){
}
if(_852&&_852["removeAllRanges"]){
_852.removeAllRanges();
_852.addRange(_84f);
}else{
dojo.debug("No idea how to restore selection for this browser!");
}
}
},collapse:function(_853){
if(dojo.global()["getSelection"]){
var _854=dojo.global().getSelection();
if(_854.removeAllRanges){
if(_853){
_854.collapseToStart();
}else{
_854.collapseToEnd();
}
}else{
dojo.global().getSelection().collapse(_853);
}
}else{
if(dojo.doc().selection){
var _855=dojo.doc().selection.createRange();
_855.collapse(_853);
_855.select();
}
}
},remove:function(){
if(dojo.doc().selection){
var _856=dojo.doc().selection;
if(_856.type.toUpperCase()!="NONE"){
_856.clear();
}
return _856;
}else{
var _856=dojo.global().getSelection();
for(var i=0;i<_856.rangeCount;i++){
_856.getRangeAt(i).deleteContents();
}
return _856;
}
}});
dojo.provide("dojo.Deferred");
dojo.Deferred=function(_858){
this.chain=[];
this.id=this._nextId();
this.fired=-1;
this.paused=0;
this.results=[null,null];
this.canceller=_858;
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 _85a=new dojo.Deferred();
_85a.callback();
return _85a;
},repr:function(){
var _85b;
if(this.fired==-1){
_85b="unfired";
}else{
if(this.fired==0){
_85b="success";
}else{
_85b="error";
}
}
return "Deferred("+this.id+", "+_85b+")";
},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 _863=this.getFunctionFromArgs(cb,cbfn);
if(arguments.length>2){
_863=dojo.lang.curryArguments(null,_863,arguments,2);
}
return this.addCallbacks(_863,_863);
},addCallback:function(cb,cbfn){
var _866=this.getFunctionFromArgs(cb,cbfn);
if(arguments.length>2){
_866=dojo.lang.curryArguments(null,_866,arguments,2);
}
return this.addCallbacks(_866,null);
},addErrback:function(cb,cbfn){
var _869=this.getFunctionFromArgs(cb,cbfn);
if(arguments.length>2){
_869=dojo.lang.curryArguments(null,_869,arguments,2);
}
return this.addCallbacks(null,_869);
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 _86c=this.chain;
var _86d=this.fired;
var res=this.results[_86d];
var self=this;
var cb=null;
while(_86c.length>0&&this.paused==0){
var pair=_86c.shift();
var f=pair[_86d];
if(f==null){
continue;
}
try{
res=f(res);
_86d=((res instanceof Error)?1:0);
if(res instanceof dojo.Deferred){
cb=function(res){
self._continue(res);
};
this._pause();
}
}
catch(err){
_86d=1;
res=err;
}
}
this.fired=_86d;
this.results[_86d]=res;
if((cb)&&(this.paused)){
res.addBoth(cb);
}
}});
dojo.provide("dojo.widget.RichText");
if(dojo.hostenv.post_load_){
(function(){
var _874=dojo.doc().createElement("textarea");
_874.id="dojo.widget.RichText.savedContent";
_874.style="display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;";
dojo.body().appendChild(_874);
})();
}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(_879){
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)&&(_879["nodeName"])){
this.domNode=_879;
}
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 _87c=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(_87c,10);
}else{
_87c();
}
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 _87d=this;
dojo.event.connect(this,"postCreate",function(){
dojo.html.insertAfter(_87d.textarea,_87d.domNode);
});
}else{
var html=this._preFilterContent(dojo.string.trim(this.domNode.innerHTML));
}
if(html==""){
html="&nbsp;";
}
var _87e=dojo.html.getContentBox(this.domNode);
this._oldHeight=_87e.height;
this._oldWidth=_87e.width;
this._firstChildContributingMargin=this._getContributingMargin(this.domNode,"top");
this._lastChildContributingMargin=this._getContributingMargin(this.domNode,"bottom");
this.savedContent=this.domNode.innerHTML;
this.domNode.innerHTML="";
if((this.domNode["nodeName"])&&(this.domNode.nodeName=="LI")){
this.domNode.innerHTML=" <br>";
}
this.editingArea=dojo.doc().createElement("div");
this.domNode.appendChild(this.editingArea);
if(this.saveName!=""){
var _87f=dojo.doc().getElementById("dojo.widget.RichText.savedContent");
if(_87f.value!=""){
var _880=_87f.value.split(this._SEPARATOR);
for(var i=0;i<_880.length;i++){
var data=_880[i].split(":");
if(data[0]==this.saveName){
html=data[1];
_880.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 _884=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","div","ul"];
var _885="";
for(var i in _884){
if(_884[i].charAt(1)!="l"){
_885+="<"+_884[i]+"><span>content</span></"+_884[i]+">";
}else{
_885+="<"+_884[i]+"><li>content</li></"+_884[i]+">";
}
}
with(this.editNode.style){
position="absolute";
left="-2000px";
top="-2000px";
}
this.editNode.innerHTML=_885;
var node=this.editNode.firstChild;
while(node){
dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[node.firstChild]);
var _887=node.tagName.toLowerCase();
this._local2NativeFormatNames[_887]=this.queryCommandValue("formatblock");
this._native2LocalFormatNames[this._local2NativeFormatNames[_887]]=_887;
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(_889,side){
if(dojo.html.getPixelValue(_889,"border-"+side+"-width",false)){
return false;
}else{
if(dojo.html.getPixelValue(_889,"padding-"+side,false)){
return false;
}else{
return true;
}
}
},_getContributingMargin:function(_88b,_88c){
if(_88c=="top"){
var _88d="previousSibling";
var _88e="nextSibling";
var _88f="firstChild";
var _890="margin-top";
var _891="margin-bottom";
}else{
var _88d="nextSibling";
var _88e="previousSibling";
var _88f="lastChild";
var _890="margin-bottom";
var _891="margin-top";
}
var _892=dojo.html.getPixelValue(_88b,_890,false);
function isSignificantNode(_893){
return !(_893.nodeType==3&&dojo.string.isBlank(_893.data))&&dojo.html.getStyle(_893,"display")!="none"&&!dojo.html.isPositionAbsolute(_893);
}
var _894=0;
var _895=_88b[_88f];
while(_895){
while((!isSignificantNode(_895))&&_895[_88e]){
_895=_895[_88e];
}
_894=Math.max(_894,dojo.html.getPixelValue(_895,_890,false));
if(!this._hasCollapseableMargin(_895,_88c)){
break;
}
_895=_895[_88f];
}
if(!this._hasCollapseableMargin(_88b,_88c)){
return parseInt(_894);
}
var _896=0;
var _897=_88b[_88d];
while(_897){
if(isSignificantNode(_897)){
_896=dojo.html.getPixelValue(_897,_891,false);
break;
}
_897=_897[_88d];
}
if(!_897){
_896=dojo.html.getPixelValue(_88b.parentNode,_890,false);
}
if(_894>_892){
return parseInt(Math.max((_894-_892)-_896,0));
}else{
return 0;
}
},_drawIframe:function(html){
var _899=Boolean(dojo.render.html.moz&&(typeof window.XML=="undefined"));
if(!this.iframe){
var _89a=(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!=_89a)?("#"+dojo.doc().domain):"");
this.iframe.width=this.inheritWidth?this._oldWidth:"100%";
if(this.height){
this.iframe.style.height=this.height;
}else{
var _89b=this._oldHeight;
if(this._hasCollapseableMargin(this.domNode,"top")){
_89b+=this._firstChildContributingMargin;
}
if(this._hasCollapseableMargin(this.domNode,"bottom")){
_89b+=this._lastChildContributingMargin;
}
this.iframe.height=_89b;
}
var _89c=dojo.doc().createElement("div");
_89c.innerHTML=html;
this.editingArea.appendChild(_89c);
if(this.relativeImageUrls){
var imgs=_89c.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=_89c.innerHTML;
}
var _89f=dojo.html.firstElement(_89c);
var _8a0=dojo.html.lastElement(_89c);
if(_89f){
_89f.style.marginTop=this._firstChildContributingMargin+"px";
}
if(_8a0){
_8a0.style.marginBottom=this._lastChildContributingMargin+"px";
}
this.editingArea.appendChild(this.iframe);
if(dojo.render.html.safari){
this.iframe.src=this.iframe.src;
}
var _8a1=false;
var _8a2=dojo.lang.hitch(this,function(){
if(!_8a1){
_8a1=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 _8a3=(function(_8a4){
return function(_8a5){
return dojo.html.getStyle(_8a4,_8a5);
};
})(this.domNode);
var font=_8a3("font-weight")+" "+_8a3("font-size")+" "+_8a3("font-family");
var _8a7="1.0";
var _8a8=dojo.html.getUnitValue(this.domNode,"line-height");
if(_8a8.value&&_8a8.units==""){
_8a7=_8a8.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:"+_8a7+"}"+"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(_89c);
this.document.body.innerHTML=html;
if(_899||dojo.render.html.safari){
this.document.designMode="on";
}
this.onLoad();
}else{
dojo.html.removeNode(_89c);
this.editNode.innerHTML=html;
this.onDisplayChanged();
}
});
if(this.editNode){
_8a2();
}else{
if(dojo.render.html.moz){
this.iframe.onload=function(){
setTimeout(_8a2,250);
};
}else{
this.iframe.onload=_8a2;
}
}
},_applyEditingAreaStyleSheets:function(){
var _8a9=[];
if(this.styleSheets){
_8a9=this.styleSheets.split(";");
this.styleSheets="";
}
_8a9=_8a9.concat(this.editingAreaStyleSheets);
this.editingAreaStyleSheets=[];
if(_8a9.length>0){
for(var i=0;i<_8a9.length;i++){
var url=_8a9[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 _8af=this.document.createElement("link");
with(_8af){
rel="stylesheet";
type="text/css";
href=url;
}
head.appendChild(_8af);
}
},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 _8b2=dojo.lang.find(this.editingAreaStyleSheets,url);
if(_8b2==-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[_8b2];
var _8b3=this.document.getElementsByTagName("link");
for(var i=0;i<_8b3.length;i++){
if(_8b3[i].href==url){
if(dojo.render.html.ie){
_8b3[i].href="";
}
dojo.html.removeNode(_8b3[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 _8b8=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){
_8b8=true;
}
}
try{
var _8b9=new ActiveXObject("DEGetBlockFmtNamesParam.DEGetBlockFmtNamesParam");
obj.ExecCommand(this._activeX.command["getblockformatnames"],0,_8b9);
var _8ba=new VBArray(_8b9.Names);
var _8bb=_8ba.toArray();
var _8bc=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","ul","","","","","div"];
for(var i=0;i<_8bc.length;++i){
if(_8bc[i].length>0){
this._local2NativeFormatNames[_8bb[i]]=_8bc[i];
this._native2LocalFormatNames[_8bc[i]]=_8bb[i];
}
}
}
catch(e){
_8b8=true;
}
if(obj&&!this.object){
dojo.body().removeChild(obj);
}
}
return !_8b8;
},_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 _8c0=dojo.event.browser.addListener;
var self=this;
dojo.lang.forEach(this.events,function(e){
var l=_8c0(self.document,e.substr(2).toLowerCase(),dojo.lang.hitch(self,e));
if(e=="onBlur"){
var _8c4={unBlur:function(e){
dojo.event.browser.removeListener(doc,"blur",l);
}};
dojo.event.connect("before",self,"close",_8c4,"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 _8c9=e.ctrlKey?this.KEY_CTRL:0;
if(this._keyHandlers[e.key]){
var _8ca=this._keyHandlers[e.key],i=0,_8cc;
while(_8cc=_8ca[i++]){
if(_8c9==_8cc.modifiers){
e.preventDefault();
_8cc.handler.call(this);
break;
}
}
}
dojo.lang.setTimeout(this,this.onKeyPressed,1,e);
},addKeyHandler:function(key,_8ce,_8cf){
if(!(this._keyHandlers[key] instanceof Array)){
this._keyHandlers[key]=[];
}
this._keyHandlers[key].push({modifiers:_8ce||0,handler:_8cf});
},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 _8d7=cmd.toLowerCase();
if(_8d7=="formatblock"){
if(drh.safari){
_8d7="heading";
}
}else{
if(this.object){
switch(_8d7){
case "createlink":
_8d7="hyperlink";
break;
case "insertimage":
_8d7="image";
break;
}
}else{
if(_8d7=="hilitecolor"&&!drh.mozilla){
_8d7="backcolor";
}
}
}
return _8d7;
},_safariIsLeopard:function(){
var _8d8=false;
if(dojo.render.html.safari){
var tmp=dojo.render.html.UA.split("AppleWebKit/")[1];
var ver=parseFloat(tmp.split(" ")[0]);
if(ver>=420){
_8d8=true;
}
}
return _8d8;
},queryCommandAvailable:function(_8db){
var ie=1;
var _8dd=1<<1;
var _8de=1<<2;
var _8df=1<<3;
var _8e0=1<<4;
var _8e1=this._safariIsLeopard();
function isSupportedBy(_8e2){
return {ie:Boolean(_8e2&ie),mozilla:Boolean(_8e2&_8dd),safari:Boolean(_8e2&_8de),safari420:Boolean(_8e2&_8e0),opera:Boolean(_8e2&_8df)};
}
var _8e3=null;
switch(_8db.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":
_8e3=isSupportedBy(_8dd|ie|_8de|_8df);
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":
_8e3=isSupportedBy(_8dd|ie|_8df|_8e0);
break;
case "blockdirltr":
case "blockdirrtl":
case "dirltr":
case "dirrtl":
case "inlinedirltr":
case "inlinedirrtl":
_8e3=isSupportedBy(ie);
break;
case "cut":
case "copy":
case "paste":
_8e3=isSupportedBy(ie|_8dd|_8e0);
break;
case "inserttable":
_8e3=isSupportedBy(_8dd|(this.object?ie:0));
break;
case "insertcell":
case "insertcol":
case "insertrow":
case "deletecells":
case "deletecols":
case "deleterows":
case "mergecells":
case "splitcell":
_8e3=isSupportedBy(this.object?ie:0);
break;
default:
return false;
}
return (dojo.render.html.ie&&_8e3.ie)||(dojo.render.html.mozilla&&_8e3.mozilla)||(dojo.render.html.safari&&_8e3.safari)||(_8e1&&_8e3.safari420)||(dojo.render.html.opera&&_8e3.opera);
},execCommand:function(_8e4,_8e5){
var _8e6;
this.focus();
_8e4=this._normalizeCommand(_8e4);
if(_8e5!=undefined){
if(_8e4=="heading"){
throw new Error("unimplemented");
}else{
if(_8e4=="formatblock"){
if(this.object){
_8e5=this._native2LocalFormatNames[_8e5];
}else{
if(dojo.render.html.ie){
_8e5="<"+_8e5+">";
}
}
}
}
}
if(this.object){
switch(_8e4){
case "hilitecolor":
_8e4="setbackcolor";
break;
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_8e4="set"+_8e4;
break;
case "formatblock":
_8e4="setblockformat";
}
if(_8e4=="strikethrough"){
_8e4="inserthtml";
var _8e7=this.document.selection.createRange();
if(!_8e7.htmlText){
return;
}
_8e5=_8e7.htmlText.strike();
}else{
if(_8e4=="inserthorizontalrule"){
_8e4="inserthtml";
_8e5="<hr>";
}
}
if(_8e4=="inserthtml"){
var _8e7=this.document.selection.createRange();
if(this.document.selection.type.toUpperCase()=="CONTROL"){
for(var i=0;i<_8e7.length;i++){
_8e7.item(i).outerHTML=_8e5;
}
}else{
_8e7.pasteHTML(_8e5);
_8e7.select();
}
_8e6=true;
}else{
if(arguments.length==1){
_8e6=this.object.ExecCommand(this._activeX.command[_8e4],this._activeX.ui.noprompt);
}else{
_8e6=this.object.ExecCommand(this._activeX.command[_8e4],this._activeX.ui.noprompt,_8e5);
}
}
}else{
if(_8e4=="inserthtml"){
if(dojo.render.html.ie){
var _8e9=this.document.selection.createRange();
_8e9.pasteHTML(_8e5);
_8e9.select();
return true;
}else{
return this.document.execCommand(_8e4,false,_8e5);
}
}else{
if((_8e4=="unlink")&&(this.queryCommandEnabled("unlink"))&&(dojo.render.html.mozilla)){
var _8ea=this.window.getSelection();
var _8eb=_8ea.getRangeAt(0);
var _8ec=_8eb.startContainer;
var _8ed=_8eb.startOffset;
var _8ee=_8eb.endContainer;
var _8ef=_8eb.endOffset;
var a=dojo.withGlobal(this.window,"getAncestorElement",dojo.html.selection,["a"]);
dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[a]);
_8e6=this.document.execCommand("unlink",false,null);
var _8eb=this.document.createRange();
_8eb.setStart(_8ec,_8ed);
_8eb.setEnd(_8ee,_8ef);
_8ea.removeAllRanges();
_8ea.addRange(_8eb);
return _8e6;
}else{
if((_8e4=="hilitecolor")&&(dojo.render.html.mozilla)){
this.document.execCommand("useCSS",false,false);
_8e6=this.document.execCommand(_8e4,false,_8e5);
this.document.execCommand("useCSS",false,true);
}else{
if((dojo.render.html.ie)&&((_8e4=="backcolor")||(_8e4=="forecolor"))){
_8e5=arguments.length>1?_8e5:null;
_8e6=this.document.execCommand(_8e4,false,_8e5);
}else{
_8e5=arguments.length>1?_8e5:null;
if(_8e5||_8e4!="createlink"){
_8e6=this.document.execCommand(_8e4,false,_8e5);
}
}
}
}
}
}
this.onDisplayChanged();
return _8e6;
},queryCommandEnabled:function(_8f1){
_8f1=this._normalizeCommand(_8f1);
if(this.object){
switch(_8f1){
case "hilitecolor":
_8f1="setbackcolor";
break;
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_8f1="set"+_8f1;
break;
case "formatblock":
_8f1="setblockformat";
break;
case "strikethrough":
_8f1="bold";
break;
case "inserthorizontalrule":
return true;
}
if(typeof this._activeX.command[_8f1]=="undefined"){
return false;
}
var _8f2=this.object.QueryStatus(this._activeX.command[_8f1]);
return ((_8f2!=this._activeX.status.notsupported)&&(_8f2!=this._activeX.status.disabled));
}else{
if(dojo.render.html.mozilla){
if(_8f1=="unlink"){
return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["a"]);
}else{
if(_8f1=="inserttable"){
return true;
}
}
}
var elem=(dojo.render.html.ie)?this.document.selection.createRange():this.document;
return elem.queryCommandEnabled(_8f1);
}
},queryCommandState:function(_8f4){
_8f4=this._normalizeCommand(_8f4);
if(this.object){
if(_8f4=="forecolor"){
_8f4="setforecolor";
}else{
if(_8f4=="backcolor"){
_8f4="setbackcolor";
}else{
if(_8f4=="strikethrough"){
return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["strike"]);
}else{
if(_8f4=="inserthorizontalrule"){
return false;
}
}
}
}
if(typeof this._activeX.command[_8f4]=="undefined"){
return null;
}
var _8f5=this.object.QueryStatus(this._activeX.command[_8f4]);
return ((_8f5==this._activeX.status.latched)||(_8f5==this._activeX.status.ninched));
}else{
return this.document.queryCommandState(_8f4);
}
},queryCommandValue:function(_8f6){
_8f6=this._normalizeCommand(_8f6);
if(this.object){
switch(_8f6){
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_8f6="get"+_8f6;
return this.object.execCommand(this._activeX.command[_8f6],this._activeX.ui.noprompt);
case "formatblock":
var _8f7=this.object.execCommand(this._activeX.command["getblockformat"],this._activeX.ui.noprompt);
if(_8f7){
return this._local2NativeFormatNames[_8f7];
}
}
}else{
if(dojo.render.html.ie&&_8f6=="formatblock"){
return this._local2NativeFormatNames[this.document.queryCommandValue(_8f6)]||this.document.queryCommandValue(_8f6);
}
return this.document.queryCommandValue(_8f6);
}
},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 _903=dojo.html.getBorderBox(this.editNode).height;
if(!_903){
_903=dojo.html.getBorderBox(this.document.body).height;
}
if(_903==0){
dojo.debug("Can not figure out the height of the editing area!");
return;
}
this._lastHeight=_903;
this.editorObject.style.height=this._lastHeight+"px";
this.window.scrollTo(0,0);
},_saveContent:function(e){
var _905=dojo.doc().getElementById("dojo.widget.RichText.savedContent");
_905.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 _908=dojo.global().location.protocol+"//"+dojo.global().location.host;
var _909=dojo.global().location.pathname;
if(_909.match(/\/$/)){
}else{
var _90a=_909.split("/");
if(_90a.length){
_90a.pop();
}
_909=_90a.join("/")+"/";
}
var _90b=new RegExp("(<img[^>]* src=[\"'])("+_908+"("+_909+")?)","ig");
ec=ec.replace(_90b,"$1");
}
return ec;
},close:function(save,_90d){
if(this.isClosed){
return false;
}
if(arguments.length==0){
save=true;
}
this._content=this._postFilterContent(this.editNode.innerHTML);
var _90e=(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 _90e;
},destroyRendering:function(){
},destroy:function(){
this.destroyRendering();
if(!this.isClosed){
this.close(false);
}
dojo.widget.RichText.superclass.destroy.call(this);
},connect:function(_910,_911,_912){
dojo.event.connect(_910,_911,this,_912);
},disconnect:function(_913,_914,_915){
dojo.event.disconnect(_913,_914,this,_915);
},disconnectAllWithRoot:function(_916){
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.lang.type");
dojo.lang.whatAmI=function(_918){
dojo.deprecated("dojo.lang.whatAmI","use dojo.lang.getType instead","0.5");
return dojo.lang.getType(_918);
};
dojo.lang.whatAmI.custom={};
dojo.lang.getType=function(_919){
try{
if(dojo.lang.isArray(_919)){
return "array";
}
if(dojo.lang.isFunction(_919)){
return "function";
}
if(dojo.lang.isString(_919)){
return "string";
}
if(dojo.lang.isNumber(_919)){
return "number";
}
if(dojo.lang.isBoolean(_919)){
return "boolean";
}
if(dojo.lang.isAlien(_919)){
return "alien";
}
if(dojo.lang.isUndefined(_919)){
return "undefined";
}
for(var name in dojo.lang.whatAmI.custom){
if(dojo.lang.whatAmI.custom[name](_919)){
return name;
}
}
if(dojo.lang.isObject(_919)){
return "object";
}
}
catch(e){
}
return "unknown";
};
dojo.lang.isNumeric=function(_91b){
return (!isNaN(_91b)&&isFinite(_91b)&&(_91b!=null)&&!dojo.lang.isBoolean(_91b)&&!dojo.lang.isArray(_91b)&&!/^\s*$/.test(_91b));
};
dojo.lang.isBuiltIn=function(_91c){
return (dojo.lang.isArray(_91c)||dojo.lang.isFunction(_91c)||dojo.lang.isString(_91c)||dojo.lang.isNumber(_91c)||dojo.lang.isBoolean(_91c)||(_91c==null)||(_91c instanceof Error)||(typeof _91c=="error"));
};
dojo.lang.isPureObject=function(_91d){
return ((_91d!=null)&&dojo.lang.isObject(_91d)&&_91d.constructor==Object);
};
dojo.lang.isOfType=function(_91e,type,_920){
var _921=false;
if(_920){
_921=_920["optional"];
}
if(_921&&((_91e===null)||dojo.lang.isUndefined(_91e))){
return true;
}
if(dojo.lang.isArray(type)){
var _922=type;
for(var i in _922){
var _924=_922[i];
if(dojo.lang.isOfType(_91e,_924)){
return true;
}
}
return false;
}else{
if(dojo.lang.isString(type)){
type=type.toLowerCase();
}
switch(type){
case Array:
case "array":
return dojo.lang.isArray(_91e);
case Function:
case "function":
return dojo.lang.isFunction(_91e);
case String:
case "string":
return dojo.lang.isString(_91e);
case Number:
case "number":
return dojo.lang.isNumber(_91e);
case "numeric":
return dojo.lang.isNumeric(_91e);
case Boolean:
case "boolean":
return dojo.lang.isBoolean(_91e);
case Object:
case "object":
return dojo.lang.isObject(_91e);
case "pureobject":
return dojo.lang.isPureObject(_91e);
case "builtin":
return dojo.lang.isBuiltIn(_91e);
case "alien":
return dojo.lang.isAlien(_91e);
case "undefined":
return dojo.lang.isUndefined(_91e);
case null:
case "null":
return (_91e===null);
case "optional":
dojo.deprecated("dojo.lang.isOfType(value, [type, \"optional\"])","use dojo.lang.isOfType(value, type, {optional: true} ) instead","0.5");
return ((_91e===null)||dojo.lang.isUndefined(_91e));
default:
if(dojo.lang.isFunction(type)){
return (_91e 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 _926=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_926[i++]];
}while(i<_926.length&&obj);
return (obj!=dj_global)?obj:null;
};
dojo.lang.doesObjectExist=function(str){
var _92a=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_92a[i++]];
}while(i<_92a.length&&obj);
return (obj&&obj!=dj_global);
};
dojo.provide("dojo.lang.assert");
dojo.lang.assert=function(_92d,_92e){
if(!_92d){
var _92f="An assert statement failed.\n"+"The method dojo.lang.assert() was called with a 'false' value.\n";
if(_92e){
_92f+="Here's the assert message:\n"+_92e+"\n";
}
throw new Error(_92f);
}
};
dojo.lang.assertType=function(_930,type,_932){
if(dojo.lang.isString(_932)){
dojo.deprecated("dojo.lang.assertType(value, type, \"message\")","use dojo.lang.assertType(value, type) instead","0.5");
}
if(!dojo.lang.isOfType(_930,type,_932)){
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(_933,_934,_935){
var key;
if(!_935){
if(!dojo.lang.assertValidKeywords._errorMessage){
dojo.lang.assertValidKeywords._errorMessage="In dojo.lang.assertValidKeywords(), found invalid keyword:";
}
_935=dojo.lang.assertValidKeywords._errorMessage;
}
if(dojo.lang.isArray(_934)){
for(key in _933){
if(!dojo.lang.inArray(_934,key)){
dojo.lang.assert(false,_935+" "+key);
}
}
}else{
for(key in _933){
if(!(key in _934)){
dojo.lang.assert(false,_935+" "+key);
}
}
}
};
dojo.provide("dojo.AdapterRegistry");
dojo.AdapterRegistry=function(_937){
this.pairs=[];
this.returnWrappers=_937||false;
};
dojo.lang.extend(dojo.AdapterRegistry,{register:function(name,_939,wrap,_93b,_93c){
var type=(_93c)?"unshift":"push";
this.pairs[type]([name,_939,wrap,_93b]);
},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,_944,wrap,_946){
dojo.lang.reprRegistry.register(name,_944,wrap,_946);
};
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.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;
}
}
_deprecated=function(cmd,_955){
if(!dojo.widget["Editor2Plugin"]||!dojo.widget.Editor2Plugin[_955]){
dojo.deprecated("Toolbar item "+name+" is now defined in plugin dojo.widget.Editor2Plugin."+_955+". It shall be required explicitly","0.6");
dojo["require"]("dojo.widget.Editor2Plugin."+_955);
}
};
if(name=="forecolor"||name=="hilitecolor"){
_deprecated(name,"ColorPicker");
}else{
if(name=="formatblock"||name=="fontsize"||name=="fontname"){
_deprecated(name,"DropDownList");
}
}
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 "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,_958,_959){
this._domNode=node;
var cmd=_958.parent.getCommand(this._name);
if(cmd){
this._domNode.title=cmd.getText();
}
this.disableSelection(this._domNode);
this._parentToolbar=_958;
dojo.event.connect(this._domNode,"onclick",this,"onClick");
if(!_959){
dojo.event.connect(this._domNode,"onmouseover",this,"onMouseOver");
dojo.event.connect(this._domNode,"onmouseout",this,"onMouseOut");
}
},disableSelection:function(_95b){
dojo.html.disableSelection(_95b);
var _95c=_95b.all||_95b.getElementsByTagName("*");
for(var x=0;x<_95c.length;x++){
dojo.html.disableSelection(_95c[x]);
}
},onMouseOver:function(){
var _95e=dojo.widget.Editor2Manager.getCurrentInstance();
if(_95e){
var _95f=_95e.getCommand(this._name);
if(_95f&&_95f.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 _961=dojo.widget.Editor2Manager.getCurrentInstance();
if(_961){
var _962=_961.getCommand(this._name);
if(_962){
_962.execute();
}
}
}
},refreshState:function(){
var _963=dojo.widget.Editor2Manager.getCurrentInstance();
var em=dojo.widget.Editor2Manager;
if(_963){
var _965=_963.getCommand(this._name);
if(_965){
var _966=_965.getState();
if(_966!=this._lastState){
switch(_966){
case em.commandState.Latched:
this.latchToolbarItem();
break;
case em.commandState.Enabled:
this.enableToolbarItem();
break;
case em.commandState.Disabled:
default:
this.disableToolbarItem();
}
this._lastState=_966;
}
}
}
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.Editor2ToolbarFormatBlockPlainSelect",dojo.widget.Editor2ToolbarButton,{create:function(node,_968){
this._domNode=node;
this._parentToolbar=_968;
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 _96a=dojo.widget.Editor2Manager.getCurrentInstance();
if(_96a){
var _96b=_96a.getCommand(this._name);
if(_96b){
_96b.execute(sv);
}
}
}
},refreshState:function(){
if(this._domNode){
dojo.widget.Editor2ToolbarFormatBlockPlainSelect.superclass.refreshState.call(this);
var _96c=dojo.widget.Editor2Manager.getCurrentInstance();
if(_96c){
var _96d=_96c.getCommand(this._name);
if(_96d){
var _96e=_96d.getValue();
if(!_96e){
_96e="";
}
dojo.lang.forEach(this._domNode.options,function(item){
if(item.value.toLowerCase()==_96e.toLowerCase()){
item.selected=true;
}
});
}
}
}
}});
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;
}
}));
},{templatePath:dojo.uri.dojoUri("src/widget/templates/EditorToolbar.html"),templateCssPath:dojo.uri.dojoUri("src/widget/templates/EditorToolbar.css"),ToolbarLatchedItemStyle:"ToolbarButtonLatched",ToolbarEnabledItemStyle:"ToolbarButtonEnabled",ToolbarDisabledItemStyle:"ToolbarButtonDisabled",ToolbarHighlightedItemStyle:"ToolbarButtonHighlighted",ToolbarHighlightedSelectStyle:"ToolbarSelectHighlighted",ToolbarHighlightedSelectItemStyle:"ToolbarSelectHighlightedItem",postCreate:function(){
var _970=dojo.html.getElementsByClass("dojoEditorToolbarItem",this.domNode);
this.items={};
for(var x=0;x<_970.length;x++){
var node=_970[x];
var _973=node.getAttribute("dojoETItemName");
if(_973){
var item=dojo.widget.Editor2ToolbarItemManager.getToolbarItem(_973);
if(item){
item.create(node,this);
this.items[_973.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 _976=dojo.widget.Editor2Manager.getCurrentInstance();
if(this.shareGroup==_976.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.i18n.common");
dojo.i18n.getLocalization=function(_978,_979,_97a){
dojo.hostenv.preloadLocalizations();
_97a=dojo.hostenv.normalizeLocale(_97a);
var _97b=_97a.split("-");
var _97c=[_978,"nls",_979].join(".");
var _97d=dojo.hostenv.findModule(_97c,true);
var _97e;
for(var i=_97b.length;i>0;i--){
var loc=_97b.slice(0,i).join("_");
if(_97d[loc]){
_97e=_97d[loc];
break;
}
}
if(!_97e){
_97e=_97d.ROOT;
}
if(_97e){
var _981=function(){
};
_981.prototype=_97e;
return new _981();
}
dojo.raise("Bundle not found: "+_979+" in "+_978+" , locale="+_97a);
};
dojo.i18n.isLTR=function(_982){
var lang=dojo.hostenv.normalizeLocale(_982).split("-")[0];
var RTL={ar:true,fa:true,he:true,ur:true,yi:true};
return !RTL[lang];
};
dojo.provide("dojo.widget.Editor2Plugin.AlwaysShowToolbar");
dojo.event.topic.subscribe("dojo.widget.Editor2::onLoad",function(_985){
if(_985.toolbarAlwaysVisible){
var p=new dojo.widget.Editor2Plugin.AlwaysShowToolbar(_985);
}
});
dojo.declare("dojo.widget.Editor2Plugin.AlwaysShowToolbar",null,function(_987){
this.editor=_987;
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 _98d=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 _98e=(window["pageYOffset"])?window["pageYOffset"]:(document["documentElement"]||document["body"]).scrollTop;
if(_98e>this._scrollThreshold){
if(!this._fixEnabled){
var _98f=dojo.html.getMarginBox(tdn);
this.editor.editorObject.style.marginTop=_98f.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=_98f.width+"px";
tdn.style.zIndex=1000;
this._fixEnabled=true;
}
if(!dojo.render.html.safari){
var _990=(this.height)?parseInt(this.editor.height):this.editor._lastHeight;
if(_98e>(this._scrollThreshold+_990)){
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(_992,name){
var _994;
name=name.toLowerCase();
for(var i=0;i<this._registeredHandlers.length;i++){
_994=this._registeredHandlers[i](_992,name);
if(_994){
return _994;
}
}
if(name=="createlink"||name=="insertimage"){
if(!dojo.widget["Editor2Plugin"]||!dojo.widget.Editor2Plugin["DialogCommands"]){
dojo.deprecated("Command "+name+" is now defined in plugin dojo.widget.Editor2Plugin.DialogCommands. It shall be required explicitly","0.6");
dojo["require"]("dojo.widget.Editor2Plugin.DialogCommands");
}
}
var _996=dojo.i18n.getLocalization("dojo.widget","Editor2",this.lang);
switch(name){
case "htmltoggle":
_994=new dojo.widget.Editor2BrowserCommand(_992,name);
break;
case "anchor":
_994=new dojo.widget.Editor2Command(_992,name);
break;
case "createlink":
_994=new dojo.widget.Editor2DialogCommand(_992,name,{contentFile:"dojo.widget.Editor2Plugin.CreateLinkDialog",contentClass:"Editor2CreateLinkDialog",title:_996.createLinkDialogTitle,width:"300px",height:"200px",lang:this.lang});
break;
case "insertimage":
_994=new dojo.widget.Editor2DialogCommand(_992,name,{contentFile:"dojo.widget.Editor2Plugin.InsertImageDialog",contentClass:"Editor2InsertImageDialog",title:_996.insertImageDialogTitle,width:"400px",height:"270px",lang:this.lang});
break;
default:
var _997=this.getCurrentInstance();
if((_997&&_997.queryCommandAvailable(name))||(!_997&&dojo.widget.Editor2.prototype.queryCommandAvailable(name))){
_994=new dojo.widget.Editor2BrowserCommand(_992,name);
}else{
dojo.debug("dojo.widget.Editor2Manager.getCommand: Unknown command "+name);
return;
}
}
return _994;
},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(_998,name){
this._editor=_998;
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.lang.declare("dojo.widget.Editor2BrowserCommand",dojo.widget.Editor2Command,function(_99b,name){
var _99d=dojo.i18n.getLocalization("dojo.widget","Editor2BrowserCommand",_99b.lang);
var text=_99d[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.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:dojo.uri.dojoUri("src/widget/templates/EditorToolbar.css"),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 _9a0={shareGroup:this.toolbarGroup,parent:this,lang:this.lang};
_9a0.templatePath=this.toolbarTemplatePath;
if(this.toolbarTemplateCssPath){
_9a0.templateCssPath=this.toolbarTemplateCssPath;
}
if(this.toolbarPlaceHolder){
this.toolbarWidget=dojo.widget.createWidget("Editor2Toolbar",_9a0,dojo.byId(this.toolbarPlaceHolder),"after");
}else{
this.toolbarWidget=dojo.widget.createWidget("Editor2Toolbar",_9a0,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: unknown plugin object: "+obj);
},execCommand:function(_9a4,_9a5){
switch(_9a4.toLowerCase()){
case "htmltoggle":
this.toggleHtmlEditing();
break;
default:
dojo.widget.Editor2.superclass.execCommand.apply(this,arguments);
}
},queryCommandEnabled:function(_9a6,_9a7){
switch(_9a6.toLowerCase()){
case "htmltoggle":
return true;
default:
if(this._inSourceMode){
return false;
}
return dojo.widget.Editor2.superclass.queryCommandEnabled.apply(this,arguments);
}
},queryCommandState:function(_9a8,_9a9){
switch(_9a8.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(_9ac){
if((!this.isLoaded)||(!this.toolbarWidget)){
return;
}
var diff=new Date()-this._updateToolbarLastRan;
if((!_9ac)&&(this._updateToolbarLastRan)&&((diff<this._updateToolbarFrequency))){
clearTimeout(this._updateToolbarTimer);
var _9ae=this;
this._updateToolbarTimer=setTimeout(function(){
_9ae.updateToolbar();
},this._updateToolbarFrequency/2);
return;
}else{
this._updateToolbarLastRan=new Date();
}
if(dojo.widget.Editor2Manager.getCurrentInstance()!==this){
return;
}
this.toolbarWidget.update();
},destroy:function(_9af){
this._htmlEditNode=null;
dojo.event.disconnect(this,"close",this.toolbarWidget,"hide");
if(!_9af){
this.toolbarWidget.destroy();
}
dojo.widget.Editor2.superclass.destroy.call(this);
},_lastStateTimestamp:0,onDisplayChanged:function(e,_9b1){
this._lastStateTimestamp=(new Date()).getTime();
dojo.widget.Editor2.superclass.onDisplayChanged.call(this,e);
this.updateToolbar(_9b1);
},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.string.Builder");
dojo.string.Builder=function(str){
this.arrConcat=(dojo.render.html.capable&&dojo.render.html["ie"]);
var a=[];
var b="";
var _9bd=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;
}
_9bd+=s.length;
this.length=_9bd;
}
}
return this;
};
this.concat=function(){
return this.append.apply(this,arguments);
};
this.clear=function(){
a=[];
b="";
_9bd=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);
_9bd=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);
_9bd=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("");
}
_9bd=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.flash");
dojo.flash=function(){
};
dojo.flash={flash6_version:null,flash8_version:null,ready:false,_visible:true,_loadedListeners:new Array(),_installingListeners:new Array(),setSwf:function(_9c8){
if(_9c8==null||dojo.lang.isUndefined(_9c8)){
return;
}
if(_9c8.flash6!=null&&!dojo.lang.isUndefined(_9c8.flash6)){
this.flash6_version=_9c8.flash6;
}
if(_9c8.flash8!=null&&!dojo.lang.isUndefined(_9c8.flash8)){
this.flash8_version=_9c8.flash8;
}
if(!dojo.lang.isUndefined(_9c8.visible)){
this._visible=_9c8.visible;
}
this._initialize();
},useFlash6:function(){
if(this.flash6_version==null){
return false;
}else{
if(this.flash6_version!=null&&dojo.flash.info.commVersion==6){
return true;
}else{
return false;
}
}
},useFlash8:function(){
if(this.flash8_version==null){
return false;
}else{
if(this.flash8_version!=null&&dojo.flash.info.commVersion==8){
return true;
}else{
return false;
}
}
},addLoadedListener:function(_9c9){
this._loadedListeners.push(_9c9);
},addInstallingListener:function(_9ca){
this._installingListeners.push(_9ca);
},loaded:function(){
dojo.flash.ready=true;
if(dojo.flash._loadedListeners.length>0){
for(var i=0;i<dojo.flash._loadedListeners.length;i++){
dojo.flash._loadedListeners[i].call(null);
}
}
},installing:function(){
if(dojo.flash._installingListeners.length>0){
for(var i=0;i<dojo.flash._installingListeners.length;i++){
dojo.flash._installingListeners[i].call(null);
}
}
},_initialize:function(){
var _9cd=new dojo.flash.Install();
dojo.flash.installer=_9cd;
if(_9cd.needed()==true){
_9cd.install();
}else{
dojo.flash.obj=new dojo.flash.Embed(this._visible);
dojo.flash.obj.write(dojo.flash.info.commVersion);
dojo.flash.comm=new dojo.flash.Communicator();
}
}};
dojo.flash.Info=function(){
if(dojo.render.html.ie){
document.writeln("<script language=\"VBScript\" type=\"text/vbscript\">");
document.writeln("Function VBGetSwfVer(i)");
document.writeln("  on error resume next");
document.writeln("  Dim swControl, swVersion");
document.writeln("  swVersion = 0");
document.writeln("  set swControl = CreateObject(\"ShockwaveFlash.ShockwaveFlash.\" + CStr(i))");
document.writeln("  if (IsObject(swControl)) then");
document.writeln("    swVersion = swControl.GetVariable(\"$version\")");
document.writeln("  end if");
document.writeln("  VBGetSwfVer = swVersion");
document.writeln("End Function");
document.writeln("</script>");
}
this._detectVersion();
this._detectCommunicationVersion();
};
dojo.flash.Info.prototype={version:-1,versionMajor:-1,versionMinor:-1,versionRevision:-1,capable:false,commVersion:6,installing:false,isVersionOrAbove:function(_9ce,_9cf,_9d0){
_9d0=parseFloat("."+_9d0);
if(this.versionMajor>=_9ce&&this.versionMinor>=_9cf&&this.versionRevision>=_9d0){
return true;
}else{
return false;
}
},_detectVersion:function(){
var _9d1;
for(var _9d2=25;_9d2>0;_9d2--){
if(dojo.render.html.ie){
_9d1=VBGetSwfVer(_9d2);
}else{
_9d1=this._JSFlashInfo(_9d2);
}
if(_9d1==-1){
this.capable=false;
return;
}else{
if(_9d1!=0){
var _9d3;
if(dojo.render.html.ie){
var _9d4=_9d1.split(" ");
var _9d5=_9d4[1];
_9d3=_9d5.split(",");
}else{
_9d3=_9d1.split(".");
}
this.versionMajor=_9d3[0];
this.versionMinor=_9d3[1];
this.versionRevision=_9d3[2];
var _9d6=this.versionMajor+"."+this.versionRevision;
this.version=parseFloat(_9d6);
this.capable=true;
break;
}
}
}
},_JSFlashInfo:function(_9d7){
if(navigator.plugins!=null&&navigator.plugins.length>0){
if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){
var _9d8=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";
var _9d9=navigator.plugins["Shockwave Flash"+_9d8].description;
var _9da=_9d9.split(" ");
var _9db=_9da[2].split(".");
var _9dc=_9db[0];
var _9dd=_9db[1];
if(_9da[3]!=""){
var _9de=_9da[3].split("r");
}else{
var _9de=_9da[4].split("r");
}
var _9df=_9de[1]>0?_9de[1]:0;
var _9e0=_9dc+"."+_9dd+"."+_9df;
return _9e0;
}
}
return -1;
},_detectCommunicationVersion:function(){
if(this.capable==false){
this.commVersion=null;
return;
}
if(typeof djConfig["forceFlashComm"]!="undefined"&&typeof djConfig["forceFlashComm"]!=null){
this.commVersion=djConfig["forceFlashComm"];
return;
}
if(dojo.render.html.safari==true||dojo.render.html.opera==true){
this.commVersion=8;
}else{
this.commVersion=6;
}
}};
dojo.flash.Embed=function(_9e1){
this._visible=_9e1;
};
dojo.flash.Embed.prototype={width:215,height:138,id:"flashObject",_visible:true,protocol:function(){
switch(window.location.protocol){
case "https:":
return "https";
break;
default:
return "http";
break;
}
},write:function(_9e2,_9e3){
if(dojo.lang.isUndefined(_9e3)){
_9e3=false;
}
var _9e4=new dojo.string.Builder();
_9e4.append("width: "+this.width+"px; ");
_9e4.append("height: "+this.height+"px; ");
if(this._visible==false){
_9e4.append("position: absolute; ");
_9e4.append("z-index: 10000; ");
_9e4.append("top: -1000px; ");
_9e4.append("left: -1000px; ");
}
_9e4=_9e4.toString();
var _9e5;
var _9e6;
if(_9e2==6){
_9e6=dojo.flash.flash6_version;
var _9e7=djConfig.baseRelativePath;
_9e6=_9e6+"?baseRelativePath="+escape(_9e7);
_9e5="<embed id=\""+this.id+"\" src=\""+_9e6+"\" "+"    quality=\"high\" bgcolor=\"#ffffff\" "+"    width=\""+this.width+"\" height=\""+this.height+"\" "+"    name=\""+this.id+"\" "+"    align=\"middle\" allowScriptAccess=\"sameDomain\" "+"    type=\"application/x-shockwave-flash\" swLiveConnect=\"true\" "+"    pluginspage=\""+this.protocol()+"://www.macromedia.com/go/getflashplayer\">";
}else{
_9e6=dojo.flash.flash8_version;
var _9e8=_9e6;
var _9e9=_9e6;
var _9e7=djConfig.baseRelativePath;
if(_9e3){
var _9ea=escape(window.location);
document.title=document.title.slice(0,47)+" - Flash Player Installation";
var _9eb=escape(document.title);
_9e8+="?MMredirectURL="+_9ea+"&MMplayerType=ActiveX"+"&MMdoctitle="+_9eb+"&baseRelativePath="+escape(_9e7);
_9e9+="?MMredirectURL="+_9ea+"&MMplayerType=PlugIn"+"&baseRelativePath="+escape(_9e7);
}
if(_9e9.indexOf("?")==-1){
_9e9+="?baseRelativePath="+escape(_9e7)+"' ";
}
_9e5="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" "+"codebase=\""+this.protocol()+"://fpdownload.macromedia.com/pub/shockwave/cabs/flash/"+"swflash.cab#version=8,0,0,0\" "+"width=\""+this.width+"\" "+"height=\""+this.height+"\" "+"id=\""+this.id+"\" "+"align=\"middle\"> "+"<param name=\"allowScriptAccess\" value=\"sameDomain\" /> "+"<param name=\"movie\" value=\""+_9e8+"\" /> "+"<param name=\"quality\" value=\"high\" /> "+"<param name=\"bgcolor\" value=\"#ffffff\" /> "+"<embed src=\""+_9e9+"' "+"quality=\"high\" "+"bgcolor=\"#ffffff\" "+"width=\""+this.width+"\" "+"height=\""+this.height+"\" "+"id=\""+this.id+"\" "+"name=\""+this.id+"\" "+"swLiveConnect=\"true\" "+"align=\"middle\" "+"allowScriptAccess=\"sameDomain\" "+"type=\"application/x-shockwave-flash\" "+"pluginspage=\""+this.protocol()+"://www.macromedia.com/go/getflashplayer\" />"+"</object>";
}
_9e5="<div id=\""+this.id+"Container\" style=\""+_9e4+"\"> "+_9e5+"</div>";
document.writeln(_9e5);
},get:function(){
return document.getElementById(this.id);
},setVisible:function(_9ec){
var _9ed=dojo.byId(this.id+"Container");
if(_9ec==true){
_9ed.style.visibility="visible";
}else{
_9ed.style.position="absolute";
_9ed.style.x="-1000px";
_9ed.style.y="-1000px";
_9ed.style.visibility="hidden";
}
},center:function(){
var _9ee=this.width;
var _9ef=this.height;
var _9f0=dojo.html.getScroll().offset;
var _9f1=dojo.html.getViewport();
var x=_9f0.x+(_9f1.width-_9ee)/2;
var y=_9f0.y+(_9f1.height-_9ef)/2;
var _9f4=dojo.byId(this.id+"Container");
_9f4.style.top=y+"px";
_9f4.style.left=x+"px";
}};
dojo.flash.Communicator=function(){
if(dojo.flash.useFlash6()){
this._writeFlash6();
}else{
if(dojo.flash.useFlash8()){
this._writeFlash8();
}
}
};
dojo.flash.Communicator.prototype={_writeFlash6:function(){
var id=dojo.flash.obj.id;
document.writeln("<script language=\"JavaScript\">");
document.writeln("  function "+id+"_DoFSCommand(command, args){ ");
document.writeln("    dojo.flash.comm._handleFSCommand(command, args); ");
document.writeln("}");
document.writeln("</script>");
if(dojo.render.html.ie){
document.writeln("<SCRIPT LANGUAGE=VBScript> ");
document.writeln("on error resume next ");
document.writeln("Sub "+id+"_FSCommand(ByVal command, ByVal args)");
document.writeln(" call "+id+"_DoFSCommand(command, args)");
document.writeln("end sub");
document.writeln("</SCRIPT> ");
}
},_writeFlash8:function(){
},_handleFSCommand:function(_9f6,args){
if(_9f6!=null&&!dojo.lang.isUndefined(_9f6)&&/^FSCommand:(.*)/.test(_9f6)==true){
_9f6=_9f6.match(/^FSCommand:(.*)/)[1];
}
if(_9f6=="addCallback"){
this._fscommandAddCallback(_9f6,args);
}else{
if(_9f6=="call"){
this._fscommandCall(_9f6,args);
}else{
if(_9f6=="fscommandReady"){
this._fscommandReady();
}
}
}
},_fscommandAddCallback:function(_9f8,args){
var _9fa=args;
var _9fb=function(){
return dojo.flash.comm._call(_9fa,arguments);
};
dojo.flash.comm[_9fa]=_9fb;
dojo.flash.obj.get().SetVariable("_succeeded",true);
},_fscommandCall:function(_9fc,args){
var _9fe=dojo.flash.obj.get();
var _9ff=args;
var _a00=parseInt(_9fe.GetVariable("_numArgs"));
var _a01=new Array();
for(var i=0;i<_a00;i++){
var _a03=_9fe.GetVariable("_"+i);
_a01.push(_a03);
}
var _a04;
if(_9ff.indexOf(".")==-1){
_a04=window[_9ff];
}else{
_a04=eval(_9ff);
}
var _a05=null;
if(!dojo.lang.isUndefined(_a04)&&_a04!=null){
_a05=_a04.apply(null,_a01);
}
_9fe.SetVariable("_returnResult",_a05);
},_fscommandReady:function(){
var _a06=dojo.flash.obj.get();
_a06.SetVariable("fscommandReady","true");
},_call:function(_a07,args){
var _a09=dojo.flash.obj.get();
_a09.SetVariable("_functionName",_a07);
_a09.SetVariable("_numArgs",args.length);
for(var i=0;i<args.length;i++){
var _a0b=args[i];
_a0b=_a0b.replace(/\0/g,"\\0");
_a09.SetVariable("_"+i,_a0b);
}
_a09.TCallLabel("/_flashRunner","execute");
var _a0c=_a09.GetVariable("_returnResult");
_a0c=_a0c.replace(/\\0/g,"\x00");
return _a0c;
},_addExternalInterfaceCallback:function(_a0d){
var _a0e=function(){
var _a0f=new Array(arguments.length);
for(var i=0;i<arguments.length;i++){
_a0f[i]=arguments[i];
}
return dojo.flash.comm._execFlash(_a0d,_a0f);
};
dojo.flash.comm[_a0d]=_a0e;
},_encodeData:function(data){
var _a12=/\&([^;]*)\;/g;
data=data.replace(_a12,"&amp;$1;");
data=data.replace(/</g,"&lt;");
data=data.replace(/>/g,"&gt;");
data=data.replace("\\","&custom_backslash;&custom_backslash;");
data=data.replace(/\n/g,"\\n");
data=data.replace(/\r/g,"\\r");
data=data.replace(/\f/g,"\\f");
data=data.replace(/\0/g,"\\0");
data=data.replace(/\'/g,"\\'");
data=data.replace(/\"/g,"\\\"");
return data;
},_decodeData:function(data){
if(data==null||typeof data=="undefined"){
return data;
}
data=data.replace(/\&custom_lt\;/g,"<");
data=data.replace(/\&custom_gt\;/g,">");
data=eval("\""+data+"\"");
return data;
},_chunkArgumentData:function(_a14,_a15){
var _a16=dojo.flash.obj.get();
var _a17=Math.ceil(_a14.length/1024);
for(var i=0;i<_a17;i++){
var _a19=i*1024;
var _a1a=i*1024+1024;
if(i==(_a17-1)){
_a1a=i*1024+_a14.length;
}
var _a1b=_a14.substring(_a19,_a1a);
_a1b=this._encodeData(_a1b);
_a16.CallFunction("<invoke name=\"chunkArgumentData\" "+"returntype=\"javascript\">"+"<arguments>"+"<string>"+_a1b+"</string>"+"<number>"+_a15+"</number>"+"</arguments>"+"</invoke>");
}
},_chunkReturnData:function(){
var _a1c=dojo.flash.obj.get();
var _a1d=_a1c.getReturnLength();
var _a1e=new Array();
for(var i=0;i<_a1d;i++){
var _a20=_a1c.CallFunction("<invoke name=\"chunkReturnData\" "+"returntype=\"javascript\">"+"<arguments>"+"<number>"+i+"</number>"+"</arguments>"+"</invoke>");
if(_a20=="\"\""||_a20=="''"){
_a20="";
}else{
_a20=_a20.substring(1,_a20.length-1);
}
_a1e.push(_a20);
}
var _a21=_a1e.join("");
return _a21;
},_execFlash:function(_a22,_a23){
var _a24=dojo.flash.obj.get();
_a24.startExec();
_a24.setNumberArguments(_a23.length);
for(var i=0;i<_a23.length;i++){
this._chunkArgumentData(_a23[i],i);
}
_a24.exec(_a22);
var _a26=this._chunkReturnData();
_a26=this._decodeData(_a26);
_a24.endExec();
return _a26;
}};
dojo.flash.Install=function(){
};
dojo.flash.Install.prototype={needed:function(){
if(dojo.flash.info.capable==false){
return true;
}
if(dojo.render.os.mac==true&&!dojo.flash.info.isVersionOrAbove(8,0,0)){
return true;
}
if(!dojo.flash.info.isVersionOrAbove(6,0,0)){
return true;
}
return false;
},install:function(){
dojo.flash.info.installing=true;
dojo.flash.installing();
if(dojo.flash.info.capable==false){
var _a27=new dojo.flash.Embed(false);
_a27.write(8);
}else{
if(dojo.flash.info.isVersionOrAbove(6,0,65)){
var _a27=new dojo.flash.Embed(false);
_a27.write(8,true);
_a27.setVisible(true);
_a27.center();
}else{
alert("This content requires a more recent version of the Macromedia "+" Flash Player.");
window.location.href=+dojo.flash.Embed.protocol()+"://www.macromedia.com/go/getflashplayer";
}
}
},_onInstallStatus:function(msg){
if(msg=="Download.Complete"){
dojo.flash._initialize();
}else{
if(msg=="Download.Cancelled"){
alert("This content requires a more recent version of the Macromedia "+" Flash Player.");
window.location.href=dojo.flash.Embed.protocol()+"://www.macromedia.com/go/getflashplayer";
}else{
if(msg=="Download.Failed"){
alert("There was an error downloading the Flash Player update. "+"Please try again later, or visit macromedia.com to download "+"the latest version of the Flash plugin.");
}
}
}
}};
dojo.flash.info=new dojo.flash.Info();
dojo.provide("dojo.storage");
dojo.storage=new function(){
};
dojo.declare("dojo.storage",null,{SUCCESS:"success",FAILED:"failed",PENDING:"pending",SIZE_NOT_AVAILABLE:"Size not available",SIZE_NO_LIMIT:"No size limit",DEFAULT_NAMESPACE:"default",onHideSettingsUI:null,initialize:function(){
dojo.unimplemented("dojo.storage.initialize");
},isAvailable:function(){
dojo.unimplemented("dojo.storage.isAvailable");
},put:function(key,_a2a,_a2b,_a2c){
dojo.unimplemented("dojo.storage.put");
},get:function(key,_a2e){
dojo.unimplemented("dojo.storage.get");
},hasKey:function(key,_a30){
return (this.get(key)!=null);
},getKeys:function(_a31){
dojo.unimplemented("dojo.storage.getKeys");
},clear:function(_a32){
dojo.unimplemented("dojo.storage.clear");
},remove:function(key,_a34){
dojo.unimplemented("dojo.storage.remove");
},getNamespaces:function(){
dojo.unimplemented("dojo.storage.getNamespaces");
},isPermanent:function(){
dojo.unimplemented("dojo.storage.isPermanent");
},getMaximumSize:function(){
dojo.unimplemented("dojo.storage.getMaximumSize");
},hasSettingsUI:function(){
return false;
},showSettingsUI:function(){
dojo.unimplemented("dojo.storage.showSettingsUI");
},hideSettingsUI:function(){
dojo.unimplemented("dojo.storage.hideSettingsUI");
},getType:function(){
dojo.unimplemented("dojo.storage.getType");
},isValidKey:function(_a35){
if((_a35==null)||(typeof _a35=="undefined")){
return false;
}
return /^[0-9A-Za-z_]*$/.test(_a35);
},getResourceList:function(){
return new Array();
}});
dojo.storage.manager=new function(){
this.currentProvider=null;
this.available=false;
this._initialized=false;
this._providers=[];
this._onLoadListeners=new Array();
this.initialize=function(){
this.autodetect();
};
this.register=function(name,_a37){
this._providers[this._providers.length]=_a37;
this._providers[name]=_a37;
};
this.setProvider=function(_a38){
};
this.autodetect=function(){
if(this._initialized==true){
return;
}
var _a39=null;
for(var i=0;i<this._providers.length;i++){
_a39=this._providers[i];
if(dojo.lang.isUndefined(djConfig["forceStorageProvider"])==false&&_a39.getType()==djConfig["forceStorageProvider"]){
_a39.isAvailable();
break;
}else{
if(dojo.lang.isUndefined(djConfig["forceStorageProvider"])==true&&_a39.isAvailable()){
break;
}
}
}
if(_a39==null){
this._initialized=true;
this.available=false;
this.currentProvider=null;
dojo.raise("No storage provider found for this platform");
}
this.currentProvider=_a39;
for(var i in _a39){
dojo.storage[i]=_a39[i];
}
dojo.storage.manager=this;
dojo.storage.initialize();
this._initialized=true;
this.available=true;
};
this.isAvailable=function(){
return this.available;
};
this.addOnLoad=function(func){
this._onLoadListeners.push(func);
if(this.isInitialized()==true){
this.fireLoaded();
}
};
this.removeOnLoad=function(func){
for(var i=0;i<this._onLoadListeners.length;i++){
if(func==this._onLoadListeners[i]){
this._onLoadListeners=this._onLoadListeners.splice(i,1);
break;
}
}
};
this.isInitialized=function(){
if(this.currentProvider.getType()=="dojo.storage.browser.FlashStorageProvider"&&dojo.flash.ready==false){
return false;
}else{
return this._initialized;
}
};
this.supportsProvider=function(_a3e){
try{
var _a3f=eval("new "+_a3e+"()");
var _a40=_a3f.isAvailable();
if(_a40==null||typeof _a40=="undefined"){
return false;
}
return _a40;
}
catch(exception){
return false;
}
};
this.getProvider=function(){
return this.currentProvider;
};
this.loaded=function(){
this.fireLoaded();
};
this.fireLoaded=function(){
for(var i=0;i<this._onLoadListeners.length;i++){
this._onLoadListeners[i]();
}
};
};
dojo.provide("dojo.json");
dojo.json={jsonRegistry:new dojo.AdapterRegistry(),register:function(name,_a43,wrap,_a45){
dojo.json.jsonRegistry.register(name,_a43,wrap,_a45);
},evalJson:function(json){
try{
return eval("("+json+")");
}
catch(e){
dojo.debug(e);
return json;
}
},serialize:function(o){
var _a48=typeof (o);
if(_a48=="undefined"){
return "undefined";
}else{
if((_a48=="number")||(_a48=="boolean")){
return o+"";
}else{
if(o===null){
return "null";
}
}
}
if(_a48=="string"){
return dojo.string.escapeString(o);
}
var me=arguments.callee;
var _a4a;
if(typeof (o.__json__)=="function"){
_a4a=o.__json__();
if(o!==_a4a){
return me(_a4a);
}
}
if(typeof (o.json)=="function"){
_a4a=o.json();
if(o!==_a4a){
return me(_a4a);
}
}
if(_a48!="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;
_a4a=dojo.json.jsonRegistry.match(o);
return me(_a4a);
}
catch(e){
}
if(_a48=="function"){
return null;
}
res=[];
for(var k in o){
var _a4f;
if(typeof (k)=="number"){
_a4f="\""+k+"\"";
}else{
if(typeof (k)=="string"){
_a4f=dojo.string.escapeString(k);
}else{
continue;
}
}
val=me(o[k]);
if(typeof (val)!="string"){
continue;
}
res.push(_a4f+":"+val);
}
return "{"+res.join(",")+"}";
}};
dojo.provide("dojo.storage.browser");
dojo.storage.browser.WhatWGStorageProvider=function(){
};
dojo.inherits(dojo.storage.browser.WhatWGStorageProvider,dojo.storage);
dojo.lang.extend(dojo.storage.browser.WhatWGStorageProvider,{initialized:false,_domain:null,_available:null,_statusHandler:null,_allNamespaces:null,_storageEventListener:null,initialize:function(){
if(djConfig["disableWhatWGStorage"]==true){
return;
}
this._domain=location.hostname;
this.initialized=true;
dojo.storage.manager.loaded();
},isAvailable:function(){
try{
var _a50=globalStorage[location.hostname];
}
catch(e){
this._available=false;
return this._available;
}
this._available=true;
return this._available;
},put:function(key,_a52,_a53,_a54){
if(this.isValidKey(key)==false){
dojo.raise("Invalid key given: "+key);
}
key=this.getFullKey(key,_a54);
this._statusHandler=_a53;
if(dojo.lang.isString(_a52)){
_a52="string:"+_a52;
}else{
_a52=dojo.json.serialize(_a52);
}
var self=this;
var _a56=function(evt){
dojo.debug("storage event, evt="+evt);
window.removeEventListener("storage",_a56,false);
_a53.call(null,dojo.storage.SUCCESS,key);
};
window.addEventListener("storage",_a56,false);
try{
var _a58=globalStorage[this._domain];
_a58.setItem(key,_a52);
}
catch(e){
this._statusHandler.call(null,dojo.storage.FAILED,key,e.toString());
}
},get:function(key,_a5a){
if(this.isValidKey(key)==false){
dojo.raise("Invalid key given: "+key);
}
key=this.getFullKey(key,_a5a);
var _a5b=globalStorage[this._domain];
var _a5c=_a5b.getItem(key);
if(_a5c==null||_a5c==""){
return null;
}
_a5c=_a5c.value;
if(!dojo.lang.isUndefined(_a5c)&&_a5c!=null&&/^string:/.test(_a5c)){
_a5c=_a5c.substring("string:".length);
}else{
_a5c=dojo.json.evalJson(_a5c);
}
return _a5c;
},getNamespaces:function(){
var _a5d=new Array();
_a5d.push(dojo.storage.DEFAULT_NAMESPACE);
var _a5e=new Object();
var _a5f=globalStorage[this._domain];
var _a60=/^__([^_]*)_/;
for(var i=0;i<_a5f.length;i++){
var _a62=_a5f.key(i);
if(_a60.test(_a62)==true){
var _a63=_a62.match(_a60)[1];
if(typeof _a5e[_a63]=="undefined"){
_a5e[_a63]=true;
_a5d.push(_a63);
}
}
}
return _a5d;
},getKeys:function(_a64){
if(_a64==null||typeof _a64=="undefined"){
_a64=dojo.storage.DEFAULT_NAMESPACE;
}
if(this.isValidKey(_a64)==false){
dojo.raise("Invalid namespace given: "+_a64);
}
var _a65;
if(_a64==dojo.storage.DEFAULT_NAMESPACE){
_a65=new RegExp("^([^_]{2}.*)$");
}else{
_a65=new RegExp("^__"+_a64+"_(.*)$");
}
var _a66=globalStorage[this._domain];
var _a67=new Array();
for(var i=0;i<_a66.length;i++){
var _a69=_a66.key(i);
if(_a65.test(_a69)==true){
_a69=_a69.match(_a65)[1];
_a67.push(_a69);
}
}
return _a67;
},clear:function(_a6a){
if(_a6a==null||typeof _a6a=="undefined"){
_a6a=dojo.storage.DEFAULT_NAMESPACE;
}
if(this.isValidKey(_a6a)==false){
dojo.raise("Invalid namespace given: "+_a6a);
}
var _a6b;
if(_a6a==dojo.storage.DEFAULT_NAMESPACE){
_a6b=new RegExp("^[^_]{2}");
}else{
_a6b=new RegExp("^__"+_a6a+"_");
}
var _a6c=globalStorage[this._domain];
var keys=new Array();
for(var i=0;i<_a6c.length;i++){
if(_a6b.test(_a6c.key(i))==true){
keys[keys.length]=_a6c.key(i);
}
}
for(var i=0;i<keys.length;i++){
_a6c.removeItem(keys[i]);
}
},remove:function(key,_a70){
key=this.getFullKey(key,_a70);
var _a71=globalStorage[this._domain];
_a71.removeItem(key);
},isPermanent:function(){
return true;
},getMaximumSize:function(){
return dojo.storage.SIZE_NO_LIMIT;
},hasSettingsUI:function(){
return false;
},showSettingsUI:function(){
dojo.raise(this.getType()+" does not support a storage settings user-interface");
},hideSettingsUI:function(){
dojo.raise(this.getType()+" does not support a storage settings user-interface");
},getType:function(){
return "dojo.storage.browser.WhatWGProvider";
},getFullKey:function(key,_a73){
if(_a73==null||typeof _a73=="undefined"){
_a73=dojo.storage.DEFAULT_NAMESPACE;
}
if(this.isValidKey(_a73)==false){
dojo.raise("Invalid namespace given: "+_a73);
}
if(_a73==dojo.storage.DEFAULT_NAMESPACE){
return key;
}else{
return "__"+_a73+"_"+key;
}
}});
dojo.storage.browser.FlashStorageProvider=function(){
};
dojo.inherits(dojo.storage.browser.FlashStorageProvider,dojo.storage);
dojo.lang.extend(dojo.storage.browser.FlashStorageProvider,{initialized:false,_available:null,_statusHandler:null,initialize:function(){
if(djConfig["disableFlashStorage"]==true){
return;
}
var _a74=function(){
dojo.storage._flashLoaded();
};
dojo.flash.addLoadedListener(_a74);
var _a75=dojo.uri.moduleUri("dojo","../Storage_version6.swf").toString();
var _a76=dojo.uri.moduleUri("dojo","../Storage_version8.swf").toString();
dojo.flash.setSwf({flash6:_a75,flash8:_a76,visible:false});
},isAvailable:function(){
if(djConfig["disableFlashStorage"]==true){
this._available=false;
}else{
this._available=true;
}
return this._available;
},put:function(key,_a78,_a79,_a7a){
if(this.isValidKey(key)==false){
dojo.raise("Invalid key given: "+key);
}
if(_a7a==null||typeof _a7a=="undefined"){
_a7a=dojo.storage.DEFAULT_NAMESPACE;
}
if(this.isValidKey(_a7a)==false){
dojo.raise("Invalid namespace given: "+_a7a);
}
this._statusHandler=_a79;
if(dojo.lang.isString(_a78)){
_a78="string:"+_a78;
}else{
_a78=dojo.json.serialize(_a78);
}
dojo.flash.comm.put(key,_a78,_a7a);
},get:function(key,_a7c){
if(this.isValidKey(key)==false){
dojo.raise("Invalid key given: "+key);
}
if(_a7c==null||typeof _a7c=="undefined"){
_a7c=dojo.storage.DEFAULT_NAMESPACE;
}
if(this.isValidKey(_a7c)==false){
dojo.raise("Invalid namespace given: "+_a7c);
}
var _a7d=dojo.flash.comm.get(key,_a7c);
if(_a7d==""){
return null;
}
if(!dojo.lang.isUndefined(_a7d)&&_a7d!=null&&/^string:/.test(_a7d)){
_a7d=_a7d.substring("string:".length);
}else{
_a7d=dojo.json.evalJson(_a7d);
}
return _a7d;
},getKeys:function(_a7e){
if(_a7e==null||typeof _a7e=="undefined"){
_a7e=dojo.storage.DEFAULT_NAMESPACE;
}
if(this.isValidKey(_a7e)==false){
dojo.raise("Invalid namespace given: "+_a7e);
}
var _a7f=dojo.flash.comm.getKeys(_a7e);
if(_a7f==""){
return [];
}
_a7f=_a7f.split(",");
return _a7f;
},getNamespaces:function(){
var _a80=dojo.flash.comm.getNamespaces();
if(_a80==""){
return [dojo.storage.DEFAULT_NAMESPACE];
}
_a80=_a80.split(",");
return _a80;
},clear:function(_a81){
if(_a81==null||typeof _a81=="undefined"){
_a81=dojo.storage.DEFAULT_NAMESPACE;
}
if(this.isValidKey(_a81)==false){
dojo.raise("Invalid namespace given: "+_a81);
}
dojo.flash.comm.clear(_a81);
},remove:function(key,_a83){
if(_a83==null||typeof _a83=="undefined"){
_a83=dojo.storage.DEFAULT_NAMESPACE;
}
if(this.isValidKey(_a83)==false){
dojo.raise("Invalid namespace given: "+_a83);
}
dojo.flash.comm.remove(key,_a83);
},isPermanent:function(){
return true;
},getMaximumSize:function(){
return dojo.storage.SIZE_NO_LIMIT;
},hasSettingsUI:function(){
return true;
},showSettingsUI:function(){
dojo.flash.comm.showSettings();
dojo.flash.obj.setVisible(true);
dojo.flash.obj.center();
},hideSettingsUI:function(){
dojo.flash.obj.setVisible(false);
if(dojo.storage.onHideSettingsUI!=null&&!dojo.lang.isUndefined(dojo.storage.onHideSettingsUI)){
dojo.storage.onHideSettingsUI.call(null);
}
},getType:function(){
return "dojo.storage.browser.FlashStorageProvider";
},getResourceList:function(){
var _a84=[djConfig.baseRelativePath+"storage_dialog.swf",djConfig.baseRelativePath+"Storage_version6.swf",djConfig.baseRelativePath+"Storage_version8.swf",djConfig.baseRelativePath+"flash6_gateway.swf"];
return _a84;
},_flashLoaded:function(){
this._allNamespaces=this.getNamespaces();
this._initialized=true;
dojo.storage.manager.loaded();
},_onStatus:function(_a85,key){
var ds=dojo.storage;
var dfo=dojo.flash.obj;
if(_a85==ds.PENDING){
dfo.center();
dfo.setVisible(true);
}else{
dfo.setVisible(false);
}
if((!dj_undef("_statusHandler",ds))&&(ds._statusHandler!=null)){
ds._statusHandler.call(null,_a85,key);
}
}});
dojo.storage.manager.register("dojo.storage.browser.WhatWGStorageProvider",new dojo.storage.browser.WhatWGStorageProvider());
dojo.storage.manager.register("dojo.storage.browser.FlashStorageProvider",new dojo.storage.browser.FlashStorageProvider());
dojo.storage.manager.initialize();
dojo.provide("dojo.storage.*");
dojo.provide("dojo.off");
dojo.lang.mixin(dojo.off,{NETWORK_CHECK:20,STORAGE_NAMESPACE:"dojo_offline",enabled:true,isOnline:false,requireOfflineCache:true,availabilityURL:djConfig.baseRelativePath+"src/off/network_check.txt",goingOnline:false,coreSaveFailed:false,doNetworkChecking:true,_onLoadListeners:new Array(),_storageLoaded:false,_pageLoaded:false,hasOfflineCache:function(){
return false;
},onOnline:function(){
},onOffline:function(){
},goOffline:function(){
if(dojo.sync.isSyncing==true||this.goingOnline==true){
return;
}
this.goingOnline=false;
this.isOnline=false;
if(this.onOffline){
this.onOffline();
}
},goOnline:function(_a89){
if(dojo.sync.isSyncing==true||dojo.off.goingOnline==true){
return;
}
this.goingOnline=true;
this.isOnline=false;
this._isSiteAvailable(_a89);
},clear:function(){
},addOnLoad:function(func){
this._onLoadListeners.push(func);
},removeOnLoad:function(func){
for(var i=0;i<this._onLoadListeners.length;i++){
if(func==this._onLoadListeners[i]){
this._onLoadListeners=this._onLoadListeners.splice(i,1);
break;
}
}
},save:function(){
},load:function(_a8d){
dojo.sync.load(_a8d);
},onSave:function(_a8e,_a8f,key,_a91,_a92){
if(_a8e==true&&_a8f==dojo.storage.FAILED){
dojo.off.coreSaveFailed=true;
dojo.off.enabled=false;
}
},_onLoad:function(){
dojo.off.files.cache(dojo.storage.getResourceList());
var self=this;
this.load(function(){
self._startNetworkThread();
self.goOnline(function(){
for(var i=0;i<self._onLoadListeners.length;i++){
self._onLoadListeners[i]();
}
});
});
},_onPageLoad:function(){
this._pageLoaded=true;
if(this._pageLoaded==true&&this._storageLoaded==true){
this._onLoad();
}
},_onStorageLoad:function(){
this._storageLoaded=true;
if(this._pageLoaded==true&&this._storageLoaded==true){
this._onLoad();
}
},_isSiteAvailable:function(_a95){
var _a96={url:dojo.off._getAvailabilityURL(),sync:false,mimetype:"text/plain",error:function(type,_a98){
dojo.off.goingOnline=false;
dojo.off.isOnline=false;
if(_a95){
_a95(false);
}
},load:function(type,data,evt){
dojo.off.goingOnline=false;
dojo.off.isOnline=true;
if(_a95){
_a95(true);
}else{
if(dojo.off.onOnline){
dojo.off.onOnline();
}
}
}};
dojo.io.bind(_a96);
},standardSaveHandler:function(_a9c,_a9d,_a9e,item){
if(_a9c==dojo.storage.FAILED&&_a9d==true){
this.coreSaveFailed=true;
this.enabled=false;
}
if(this.onSave){
onSave(_a9c,_a9d,_a9e,item);
}
},_startNetworkThread:function(){
if(this.doNetworkChecking==false){
return;
}
window.setInterval(function(){
var _aa0={url:dojo.off._getAvailabilityURL(),sync:false,mimetype:"text/plain",error:function(type,_aa2){
if(dojo.off.isOnline==true){
dojo.off.isOnline=false;
dojo.off.onOffline();
}
},load:function(type,data,evt){
if(dojo.off.isOnline==false){
dojo.off.isOnline=true;
dojo.off.onOnline();
}
}};
dojo.io.bind(_aa0);
},this.NETWORK_CHECK*1000);
},_getAvailabilityURL:function(){
var url=this.availabilityURL;
if(url.indexOf("?")==-1){
url+="?";
}else{
url+="&";
}
url+=new Date().getTime();
return url;
}});
dojo.storage.manager.addOnLoad(dojo.lang.hitch(dojo.off,dojo.off._onStorageLoad));
dojo.event.connect(window,"onload",dojo.off,dojo.off._onPageLoad);
dojo.provide("dojo.off.files");
dojo.off.files={listOfURLs:new Array(),_refreshCounter:0,_error:false,_errorMessage:null,_finishedCallback:null,cache:function(_aa7){
if(dojo.lang.isString(_aa7)){
var url=_aa7;
this.listOfURLs.push(url);
}else{
var _aa9=_aa7;
for(var i=0;i<_aa9.length;i++){
this.listOfURLs.push(_aa9[i]);
}
}
},remove:function(url){
for(var i=0;i<this.listOfURLs.length;i++){
if(this.listOfURLs[i]==url){
this.listOfURLs=this.listOfURLs.splice(i,1);
break;
}
}
},isAvailable:function(url){
for(var i=0;i<this.listOfURLs.length;i++){
if(this.listOfURLs[i]==url){
return true;
}
}
return false;
},refresh:function(_aaf){
dojo.off.files._refreshCounter=0;
dojo.off.files._error=false;
dojo.off.files._errorMessage=null;
dojo.off.files._finishedCallback=_aaf;
for(var i=0;i<this.listOfURLs.length;i++){
var url=this.listOfURLs[i];
window.setTimeout("dojo.off.files._loadFile('"+url+"')",10);
}
},_loadFile:function(url){
var xhr=dojo.hostenv.getXmlhttpObject();
xhr.url=url;
xhr.onreadystatechange=function(){
if(xhr.readyState==4&&dojo.off.files._error!=true){
if(xhr.status==200){
}else{
dojo.off.files._error=true;
dojo.off.files._errorMessage="Error loading offline resource "+xhr.url+": "+xhr.statusText;
}
dojo.off.files._refreshCounter++;
if(dojo.off.files._refreshCounter==dojo.off.files.listOfURLs.length||dojo.off.files._error==true){
dojo.off.files._finishedCallback(dojo.off.files._error,dojo.off.files._errorMessage);
}
}
};
xhr.open("GET",url,true);
xhr.send(null);
}};
dojo.provide("dojo.off.ui");
dojo.lang.mixin(dojo.off.ui,{appName:"Define dojo.off.ui.appName",autoEmbed:true,autoEmbedID:"dot-widget",runLink:window.location.href,runLinkTitle:"Run Application",learnHowPath:djConfig.baseRelativePath+"src/off/ui-template/learnhow.html",customLearnHowPath:false,htmlTemplatePath:djConfig.baseRelativePath+"src/off/ui-template/widget.html",cssTemplatePath:djConfig.baseRelativePath+"src/off/ui-template/widget.css",onlineImagePath:djConfig.baseRelativePath+"src/off/ui-template/greenball.png",offlineImagePath:djConfig.baseRelativePath+"src/off/ui-template/redball.png",rollerImagePath:djConfig.baseRelativePath+"src/off/ui-template/roller.gif",checkmarkImagePath:djConfig.baseRelativePath+"src/off/ui-template/checkmark.png",learnHowJSPath:djConfig.baseRelativePath+"src/off/ui-template/learnhow.js",onStart:function(){
this._updateSyncUI();
},onRefreshUI:function(){
this._setSyncMessage("Downloading UI...");
},onUpload:function(){
this._setSyncMessage("Uploading new data...");
},onDownload:function(){
this._setSyncMessage("Downloading new data...");
},onFinished:function(){
this._updateSyncUI();
var _ab4=dojo.byId("dot-success-checkmark");
var _ab5=dojo.byId("dot-sync-details");
if(dojo.sync.successful==true){
this._setSyncMessage("Sync Successful");
if(_ab4){
_ab4.style.display="inline";
}
}else{
if(dojo.sync.cancelled==true){
this._setSyncMessage("Cancelled");
if(_ab4){
_ab4.style.display="none";
}
}else{
this._setSyncMessage("Error");
var _ab6=dojo.byId("dot-sync-messages");
if(_ab6){
dojo.html.addClass(_ab6,"dot-sync-error");
}
if(_ab4){
_ab4.style.display="none";
}
}
}
if(dojo.sync.details!=null&&_ab5){
_ab5.style.display="inline";
}
this._updateSyncMetadata();
},onCancel:function(){
this._setSyncMessage("Canceling...");
},onOnline:function(){
this._updateNetworkIndicator();
this._updateMoreCommands();
var _ab7=new Array();
_ab7.push(dojo.byId("dot-work-offline-button"));
_ab7.push(dojo.byId("dot-work-online-button"));
_ab7.push(dojo.byId("dot-configure-button"));
_ab7.push(dojo.byId("dot-sync-button"));
for(var i=0;i<_ab7.length;i++){
if(_ab7[i]){
dojo.html.removeClass(_ab7[i],"dot-disabled");
}
}
if(dojo.sync.autoSync==true){
window.setTimeout(dojo.lang.hitch(this,this._synchronize),1000);
}
},onOffline:function(){
this._updateNetworkIndicator();
this._updateMoreCommands();
this._setSyncMessage("You are working offline");
var _ab9=dojo.byId("dot-sync-button");
if(_ab9){
dojo.html.addClass(_ab9,"dot-disabled");
}
var _aba=dojo.byId("dot-sync-details");
if(_aba){
_aba.style.display="none";
}
},onSave:function(_abb,_abc,_abd,item){
if(_abb==dojo.storage.FAILED&&_abc==true){
alert("Please increase the amount of local storage available "+"to this application");
this._showConfiguration();
if(dojo.storage.hasSettingsUI()){
dojo.storage.showSettingsUI();
}
}
},onLoad:function(){
},_initialize:function(){
if(this._validateAppName(this.appName)==false){
alert("You must set dojo.off.ui.appName; it can only contain "+"letters, numbers, and spaces; right now it "+"is set to "+dojo.off.ui.appName);
dojo.off.enabled=false;
return;
}
this.runLinkText="Run "+this.appName;
dojo.sync.onStart=dojo.lang.hitch(this,this.onStart);
dojo.sync.onRefreshUI=dojo.lang.hitch(this,this.onRefreshUI);
dojo.sync.onUpload=dojo.lang.hitch(this,this.onUpload);
dojo.sync.onDownload=dojo.lang.hitch(this,this.onDownload);
dojo.sync.onFinished=dojo.lang.hitch(this,this.onFinished);
dojo.sync.onCancel=dojo.lang.hitch(this,this.onCancel);
dojo.off.onOnline=dojo.lang.hitch(this,this.onOnline);
dojo.off.onOffline=dojo.lang.hitch(this,this.onOffline);
dojo.off.files.cache([this.htmlTemplatePath,this.cssTemplatePath,this.onlineImagePath,this.offlineImagePath,this.rollerImagePath,this.checkmarkImagePath]);
if(this.autoEmbed==true){
this._doAutoEmbed();
}
},_doAutoEmbed:function(){
var _abf=this.htmlTemplatePath;
var _ac0={url:_abf,sync:false,mimetype:"text/html",error:function(type,_ac2){
dojo.off.enabled=false;
alert("Error loading the Dojo Offline Widget from "+_abf+": "+_ac2.message);
},load:dojo.lang.hitch(this,this._templateLoaded)};
dojo.io.bind(_ac0);
},_templateLoaded:function(type,data,evt){
var _ac6=dojo.byId(this.autoEmbedID);
if(_ac6){
_ac6.innerHTML=data;
}
this._initImages();
this._updateNetworkIndicator();
this._initLearnHow();
if(dojo.off.requireOfflineCache==true&&dojo.off.hasOfflineCache()==false){
this._needsOfflineCache();
return;
}
this._updateSyncUI();
this._updateSyncMetadata();
this._initMainEvtHandlers();
this._initConfigEvtHandlers();
this._setOfflineEnabled(dojo.off.enabled);
this._testNetwork();
},_testNetwork:function(){
var _ac7=dojo.lang.hitch(this,function(_ac8){
this._goOnlineFinished(_ac8);
if(this.onLoad){
this.onLoad();
}
});
dojo.off.goOnline(_ac7);
},_updateNetworkIndicator:function(){
var _ac9=dojo.byId("dot-widget-network-indicator-online");
var _aca=dojo.byId("dot-widget-network-indicator-offline");
var _acb=dojo.byId("dot-widget-title-text");
if(_ac9&&_aca){
if(dojo.off.isOnline==true){
_ac9.style.display="inline";
_aca.style.display="none";
}else{
_ac9.style.display="none";
_aca.style.display="inline";
}
}
if(_acb){
if(dojo.off.isOnline==true){
_acb.innerHTML="Online";
}else{
_acb.innerHTML="Offline";
}
}
},_initLearnHow:function(){
var _acc=dojo.byId("dot-widget-learn-how-link");
if(_acc==null||typeof _acc=="undefined"){
return;
}
if(this.customLearnHowPath==false){
this.learnHowPath+="?appName="+encodeURIComponent(this.appName)+"&requireOfflineCache="+dojo.off.requireOfflineCache+"&hasOfflineCache="+dojo.off.hasOfflineCache()+"&runLink="+encodeURIComponent(this.runLink)+"&runLinkText="+encodeURIComponent(this.runLinkText);
dojo.off.files.cache(this.learnHowJSPath);
}
_acc.setAttribute("href",this.learnHowPath);
dojo.off.files.cache(this.learnHowPath);
var _acd=dojo.byId("dot-widget-learn-how-app-name");
if(_acd==null||typeof _acd=="undefined"){
return;
}
_acd.innerHTML="";
_acd.appendChild(document.createTextNode(this.appName));
},_validateAppName:function(_ace){
if(_ace==null||typeof _ace=="undefined"){
return false;
}
return (/^[a-z0-9 ]*$/i.test(_ace));
},_updateSyncUI:function(){
var _acf=dojo.byId("dot-sync-buttons");
var _ad0=dojo.byId("dot-syncing-buttons");
var _ad1=dojo.byId("dot-roller");
var _ad2=dojo.byId("dot-success-checkmark");
var _ad3=dojo.byId("dot-sync-messages");
var _ad4=dojo.byId("dot-sync-details");
var _ad5=dojo.byId("dot-recommended");
var _ad6=dojo.byId("dot-last-sync");
var _ad7=dojo.byId("dot-num-modified-items");
if(dojo.sync.isSyncing==true){
this._clearSyncMessage();
if(_acf){
_acf.style.display="none";
}
if(_ad0){
_ad0.style.display="block";
}
if(_ad1){
_ad1.style.display="inline";
}
if(_ad2){
_ad2.style.display="none";
}
if(_ad3){
dojo.html.removeClass(_ad3,"dot-sync-error");
}
if(_ad4){
_ad4.style.display="none";
}
if(_ad6){
_ad6.innerHTML="";
}
if(_ad7){
_ad7.innerHTML="";
}
}else{
if(_acf){
_acf.style.display="block";
}
if(_ad0){
_ad0.style.display="none";
}
if(_ad1){
_ad1.style.display="none";
}
if(_ad5){
if(dojo.sync.isRecommended()){
_ad5.style.display="inline";
}else{
_ad5.style.display="none";
}
}
}
this._updateMoreCommands();
},_synchronize:function(evt){
if(evt&&evt.preventDefault){
evt.preventDefault();
evt.stopPropagation();
}
if(evt){
var _ad9=dojo.byId("dot-sync-button");
if(_ad9&&_ad9.blur){
_ad9.blur();
}
}
dojo.sync.synchronize();
},_setSyncMessage:function(_ada){
var _adb=dojo.byId("dot-sync-messages");
if(_adb){
_adb.innerHTML=_ada;
}
},_clearSyncMessage:function(){
this._setSyncMessage("");
},_initImages:function(){
var _adc=dojo.byId("dot-widget-network-indicator-online");
if(_adc){
_adc.setAttribute("src",this.onlineImagePath);
}
var _add=dojo.byId("dot-widget-network-indicator-offline");
if(_add){
_add.setAttribute("src",this.offlineImagePath);
}
var _ade=dojo.byId("dot-roller");
if(_ade){
_ade.setAttribute("src",this.rollerImagePath);
}
var _adf=dojo.byId("dot-success-checkmark");
if(_adf){
_adf.setAttribute("src",this.checkmarkImagePath);
}
},_showDetails:function(evt){
evt.preventDefault();
evt.stopPropagation();
if(dojo.sync.details==null){
return;
}
var html="";
html+="<html><head><title>Sync Details</title><head><body>";
html+="<h1>Sync Details</h1>\n";
html+="<ul>\n";
for(var i=0;i<dojo.sync.details.length;i++){
html+="<li>";
html+=dojo.sync.details[i];
html+="</li>";
}
html+="</ul>\n";
html+="<a href='javascript:window.close()' "+"style='text-align: right; padding-right: 2em;'>"+"Close Window"+"</a>\n";
html+="</body></html>";
var _ae3="height=400,width=600,resizable=true,"+"scrollbars=true,toolbar=no,menubar=no,"+"location=no,directories=no,dependent=yes";
var _ae4=window.open("","SyncDetails",_ae3);
if(_ae4==null||typeof _ae4=="undefined"){
alert("Please allow popup windows for this domain; can't display sync details window");
return;
}
_ae4.document.open();
_ae4.document.write(html);
_ae4.document.close();
if(_ae4.focus){
_ae4.focus();
}
},_cancel:function(evt){
evt.preventDefault();
evt.stopPropagation();
dojo.sync.cancel();
},_updateSyncMetadata:function(){
var _ae6=dojo.byId("dot-last-sync");
var _ae7=dojo.byId("dot-num-modified-items");
if(_ae6){
if(dojo.sync.lastSync!=null){
_ae6.style.display="block";
var _ae8=this._getDateString(dojo.sync.lastSync);
_ae6.innerHTML="Updated "+_ae8;
}else{
_ae6.style.display="none";
}
}
if(_ae7){
var _ae9=dojo.sync.getNumModifiedItems();
if(_ae9>0){
_ae7.style.display="block";
_ae7.innerHTML=_ae9+" modified offline items";
}else{
_ae7.style.display="none";
}
}
},_getDateString:function(date){
var now=new Date();
var str;
if(now.getFullYear()==date.getFullYear()&&now.getMonth()==date.getMonth()&&now.getDay()==date.getDay()){
str="Today at "+this._getTimeString(date);
}else{
str=date.toLocaleString();
}
return str;
},_getTimeString:function(date){
var hour=date.getHours();
var amPM;
if(hour<12){
amPM="AM";
}else{
if(hour>=12&&hour<24){
amPM="PM";
hour=hour-12;
}else{
if(hour==24){
amPM="AM";
hour=hour-12;
}
}
}
var _af0=date.getMinutes();
if(_af0<10){
_af0="0"+_af0;
}
return hour+":"+_af0+" "+amPM;
},_updateMoreCommands:function(){
var _af1=dojo.byId("dot-work-offline-button");
var _af2=dojo.byId("dot-work-online-button");
var _af3=dojo.byId("dot-configure-button");
if(dojo.off.isOnline==true){
if(_af1){
_af1.style.display="inline";
}
if(_af2){
_af2.style.display="none";
}
}else{
if(_af1){
_af1.style.display="none";
}
if(_af2){
_af2.style.display="inline";
}
}
if(dojo.sync.isSyncing==true){
if(_af1){
dojo.html.addClass(_af1,"dot-disabled");
}
if(_af2){
dojo.html.addClass(_af2,"dot-disabled");
}
if(_af3){
dojo.html.addClass(_af3,"dot-disabled");
}
}else{
if(_af1){
dojo.html.removeClass(_af1,"dot-disabled");
}
if(_af2){
dojo.html.removeClass(_af2,"dot-disabled");
}
if(_af3){
dojo.html.removeClass(_af3,"dot-disabled");
}
}
},_workOnline:function(evt){
evt.preventDefault();
evt.stopPropagation();
if(dojo.sync.isSyncing==true){
return;
}
var _af5=dojo.byId("dot-success-checkmark");
var _af6=dojo.byId("dot-roller");
var _af7=dojo.byId("dot-sync-details");
this._setSyncMessage("Checking network... ");
if(_af5){
_af5.style.display="none";
}
if(_af6){
_af6.style.display="inline";
}
if(_af7){
_af7.style.display="none";
}
var _af8=new Array();
_af8.push(dojo.byId("dot-work-offline-button"));
_af8.push(dojo.byId("dot-work-online-button"));
_af8.push(dojo.byId("dot-configure-button"));
_af8.push(dojo.byId("dot-sync-button"));
for(var i=0;i<_af8.length;i++){
if(_af8[i]){
dojo.html.addClass(_af8[i],"dot-disabled");
}
}
dojo.off.goOnline(dojo.lang.hitch(this,this._goOnlineFinished));
},_goOnlineFinished:function(_afa){
var _afb=dojo.byId("dot-roller");
if(_afb){
_afb.style.display="none";
}
if(_afa){
this._clearSyncMessage();
this.onOnline();
}else{
this._setSyncMessage("Network not available");
this.onOffline();
}
},_workOffline:function(evt){
evt.preventDefault();
evt.stopPropagation();
if(dojo.sync.isSyncing==true||dojo.off.goingOnline==true){
return;
}
dojo.off.goOffline();
},_needsOfflineCache:function(){
var _afd=dojo.byId("dot-widget-learn-how");
if(_afd){
dojo.html.addClass(_afd,"dot-needs-offline-cache");
}
var _afe=new Array();
_afe.push(dojo.byId("dot-sync-controls"));
_afe.push(dojo.byId("dot-sync-status"));
_afe.push(dojo.byId("dot-more-commands"));
for(var i=0;i<_afe.length;i++){
_afe[i].style.display="none";
}
},_initMainEvtHandlers:function(){
var _b00=dojo.byId("dot-sync-button");
if(_b00){
dojo.event.connect(_b00,"onclick",this,this._synchronize);
}
var _b01=dojo.byId("dot-sync-details-button");
if(_b01){
dojo.event.connect(_b01,"onclick",this,this._showDetails);
}
var _b02=dojo.byId("dot-sync-cancel-button");
if(_b02){
dojo.event.connect(_b02,"onclick",this,this._cancel);
}
var _b03=dojo.byId("dot-work-online-button");
if(_b03){
dojo.event.connect(_b03,"onclick",this,this._workOnline);
}
var _b04=dojo.byId("dot-work-offline-button");
if(_b04){
dojo.event.connect(_b04,"onclick",this,this._workOffline);
}
var _b05=dojo.byId("dot-configure-button");
if(_b05){
dojo.event.connect(_b05,"onclick",this,this._showConfiguration);
}
},_initConfigEvtHandlers:function(){
var _b06=dojo.byId("dot-enableOffline");
var _b07=dojo.byId("dot-autoSync");
var _b08=dojo.byId("dot-clear-button");
var _b09=dojo.byId("dot-storage-settings-button");
var _b0a=dojo.byId("dot-configure-ok-button");
if(_b06){
dojo.event.connect(_b06,"onchange",function(evt){
evt.preventDefault();
evt.stopPropagation();
dojo.off.enabled=!dojo.off.enabled;
dojo.off.save();
});
}
if(_b07){
dojo.event.connect(_b07,"onchange",function(evt){
evt.preventDefault();
evt.stopPropagation();
dojo.sync.autoSync=!dojo.sync.autoSync;
dojo.sync.save();
});
}
if(_b08){
dojo.event.connect(_b08,"onclick",function(evt){
evt.preventDefault();
evt.stopPropagation();
if(confirm("Are you sure?")){
dojo.off.clear();
}
});
}
if(_b09){
dojo.event.connect(_b09,"onclick",function(evt){
evt.preventDefault();
evt.stopPropagation();
dojo.storage.showSettingsUI();
});
}
if(_b0a){
dojo.event.connect(_b0a,"onclick",this,this._hideConfiguration);
}
},_showConfiguration:function(evt){
if(evt){
evt.preventDefault();
evt.stopPropagation();
}
if(dojo.sync.isSyncing==true||dojo.off.goingOnline==true){
return;
}
var _b10=new Array();
_b10.push(dojo.byId("dot-widget-learn-how"));
_b10.push(dojo.byId("dot-sync-controls"));
_b10.push(dojo.byId("dot-sync-status"));
_b10.push(dojo.byId("dot-more-commands"));
_b10.push(dojo.byId("dot-last-sync"));
_b10.push(dojo.byId("dot-num-modified-items"));
for(var i=0;i<_b10.length;i++){
if(_b10[i]){
_b10[i].style.display="none";
}
}
var _b12=dojo.byId("dot-configure");
if(_b12){
_b12.style.display="block";
}
var _b13=dojo.byId("dot-enableOffline");
var _b14=dojo.byId("dot-autoSync");
if(_b13){
_b13.checked=dojo.off.enabled;
}
if(_b14){
_b14.checked=dojo.sync.autoSync;
}
var _b15=dojo.byId("dot-storage-settings-button");
if(_b15&&dojo.storage.hasSettingsUI()==false){
dojo.html.addClass(_b15,"dot-disabled");
_b15.enabled=false;
}
},_hideConfiguration:function(){
var _b16=new Array();
_b16.push(dojo.byId("dot-widget-learn-how"));
_b16.push(dojo.byId("dot-sync-controls"));
_b16.push(dojo.byId("dot-sync-status"));
_b16.push(dojo.byId("dot-more-commands"));
_b16.push(dojo.byId("dot-last-sync"));
_b16.push(dojo.byId("dot-num-modified-items"));
for(var i=0;i<_b16.length;i++){
if(_b16[i]){
_b16[i].style.display="block";
}
}
var _b18=dojo.byId("dot-configure");
if(_b18){
_b18.style.display="none";
}
this._setOfflineEnabled(dojo.off.enabled);
},_setOfflineEnabled:function(_b19){
var _b1a=new Array();
_b1a.push(dojo.byId("dot-sync-controls"));
_b1a.push(dojo.byId("dot-sync-status"));
_b1a.push(dojo.byId("dot-last-sync"));
_b1a.push(dojo.byId("dot-num-modified-items"));
_b1a.push(dojo.byId("dot-work-online-button"));
_b1a.push(dojo.byId("dot-work-offline-button"));
for(var i=0;i<_b1a.length;i++){
if(_b1a[i]){
if(_b19){
_b1a[i].style.visibility="visible";
}else{
_b1a[i].style.visibility="hidden";
}
}
}
}});
dojo.off.onSave=dojo.lang.hitch(dojo.off.ui,dojo.off.ui.onSave);
dojo.off.addOnLoad(dojo.lang.hitch(dojo.off.ui,dojo.off.ui._initialize));
dojo.provide("dojo.sync");
dojo.sync.CommandLog=function(){
};
dojo.sync.CommandLog.prototype={commands:new Array(),autoSave:true,reasonHalted:null,isReplaying:false,onReplayFinished:null,replay:function(){
if(this.isReplaying==true){
return;
}
this.reasonHalted=null;
if(this.commands.length==0){
this.onReplayFinished();
return;
}
this.isReplaying=true;
var _b1c=this.commands[0];
this.onCommand(_b1c);
},onCommand:function(_b1d){
},add:function(_b1e){
if(this.isReplaying==true){
throw new String("Programming error: you can not call log.add() while "+"we are replaying a command log");
}
this.commands.push(_b1e);
if(this.autoSave==true){
this.save();
}
},length:function(){
return this.commands.length;
},haltReplay:function(_b1f){
if(this.isReplaying==false){
return;
}
if(_b1f!=null&&typeof _b1f!="undefined"){
this.reasonHalted=_b1f.toString();
}
if(this.autoSave==true){
var self=this;
this.save(function(){
self.isReplaying=false;
self.onReplayFinished();
});
}else{
this.isReplaying=false;
this.onReplayFinished();
}
},continueReplay:function(){
if(this.isReplaying==false){
return;
}
this.commands.shift();
if(this.commands.length==0){
if(this.autoSave==true){
var self=this;
this.save(function(){
self.isReplaying=false;
self.onReplayFinished();
});
return;
}else{
this.isReplaying=false;
this.onReplayFinished();
return;
}
}
var _b22=this.commands[0];
this.onCommand(_b22);
},clear:function(){
if(this.isReplaying==true){
return;
}
this.commands=new Array();
if(this.autoSave==true){
this.save();
}
},save:function(_b23){
try{
var self=this;
var _b25=function(_b26,key,_b28){
if(_b26==dojo.storage.FAILED){
dojo.off.onSave(true,_b28,key,self.commands,dojo.off.STORAGE_NAMESPACE);
if(_b23){
_b23();
}
}else{
if(_b26==dojo.storage.SUCCESS){
if(_b23){
_b23();
}
}
}
};
dojo.storage.put("commandlog",this.commands,_b23,dojo.off.STORAGE_NAMESPACE);
}
catch(exp){
dojo.off.onSave(true,exp.toString(),"commandlog",this.commands,dojo.off.STORAGE_NAMESPACE);
}
},load:function(_b29){
var _b2a=dojo.storage.get("commandlog",dojo.off.STORAGE_NAMESPACE);
if(_b2a==null||typeof _b2a=="undefined"){
_b2a=new Array();
}
this.commands=_b2a;
_b29();
},toString:function(){
var _b2b=new String();
_b2b+="[";
for(var i=0;i<this.commands.length;i++){
_b2b+="{";
for(var j in this.commands[i]){
_b2b+=j+": \""+this.commands[i][j]+"\"";
_b2b+=", ";
}
_b2b+="}, ";
}
_b2b+="]";
return _b2b;
}};
dojo.lang.mixin(dojo.sync,{onStart:null,onRefreshFiles:null,onUpload:null,onDownload:null,onFinished:null,onCancel:null,isSyncing:false,cancelled:false,successful:true,details:null,lastSync:null,autoSync:true,error:false,log:new dojo.sync.CommandLog(),synchronize:function(){
if(this.isSyncing==true||dojo.off.goingOnline==true||dojo.off.isOnline==false){
return;
}
this.isSyncing=true;
this.successful=false;
this.details=null;
this.cancelled=false;
this.start();
},cancel:function(){
if(this.isSyncing==false){
return;
}
this.cancelled=true;
if(this.onCancel){
this.onCancel();
}
},start:function(){
if(this.cancelled==true){
this.finished();
return;
}
if(this.onStart){
this.onStart();
}
this.refreshUI();
},refreshUI:function(){
if(this.cancelled==true){
this.finished();
return;
}
if(this.onRefreshUI){
this.onRefreshUI();
}
dojo.off.files.refresh(dojo.lang.hitch(this,function(_b2e,_b2f){
if(_b2e==true){
this.error=true;
this.successful=false;
this.details=new Array();
this.details.push(_b2f);
this.finished();
}else{
this.upload();
}
}));
},upload:function(){
if(this.cancelled==true){
this.finished();
return;
}
if(this.onUpload){
this.onUpload();
}
var self=this;
if(this.log.onReplayFinished==null){
this.log.onReplayFinished=function(){
self.download();
};
}
this.log.replay();
},download:function(){
if(this.cancelled==true){
this.finished();
return;
}
if(this.onDownload){
this.onDownload();
}
this.doDownload();
},doDownload:function(){
},finishedDownloading:function(_b31,_b32){
if(_b31==false){
this.successful=false;
this.details.push(_b32);
this.error=true;
}
this.finished();
},finished:function(){
this.isSyncing=false;
if(this.cancelled==false&&this.error==false){
this.successful=true;
this.lastSync=new Date();
}else{
this.successful=false;
}
if(this.onFinished){
this.onFinished();
}
},isRecommended:function(){
var _b33=this.getNumModifiedItems();
if(_b33>0){
return true;
}else{
return false;
}
},getNumModifiedItems:function(){
return 5;
},save:function(_b34){
this.log.save(function(){
_b34();
});
},load:function(_b35){
this.log.load(function(){
_b35();
});
}});

