/*
	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:"connections",revision:Number("$Rev: 6824 $".match(/[0-9]+/)[0]),toString:function(){
with(dojo.version){
return major+"."+minor+"."+patch+flag+" ("+revision+")";
}
}};
dojo.evalProp=function(_3,_4,_5){
if((!_4)||(!_3)){
return undefined;
}
if(!dj_undef(_3,_4)){
return _4[_3];
}
return (_5?(_4[_3]={}):undefined);
};
dojo.parseObjPath=function(_6,_7,_8){
var _9=(_7||dojo.global());
var _a=_6.split(".");
var _b=_a.pop();
for(var i=0,l=_a.length;i<l&&_9;i++){
_9=dojo.evalProp(_a[i],_9,_8);
}
return {obj:_9,prop:_b};
};
dojo.evalObjPath=function(_e,_f){
if(typeof _e!="string"){
return dojo.global();
}
if(_e.indexOf(".")==-1){
return dojo.evalProp(_e,dojo.global(),_f);
}
var ref=dojo.parseObjPath(_e,dojo.global(),_f);
if(ref){
return dojo.evalProp(ref.prop,ref.obj,_f);
}
return null;
};
dojo.errorToString=function(_11){
if(!dj_undef("message",_11)){
return _11.message;
}else{
if(!dj_undef("description",_11)){
return _11.description;
}else{
return _11;
}
}
};
dojo.raise=function(_12,_13){
if(_13){
_12=_12+": "+dojo.errorToString(_13);
}else{
_12=dojo.errorToString(_12);
}
try{
if(djConfig.isDebug){
dojo.hostenv.println("FATAL exception raised: "+_12);
}
}
catch(e){
}
throw _13||Error(_12);
};
dojo.debug=function(){
};
dojo.debugShallow=function(obj){
};
dojo.profile={start:function(){
},end:function(){
},stop:function(){
},dump:function(){
}};
function dj_eval(_15){
return dj_global.eval?dj_global.eval(_15):eval(_15);
}
dojo.unimplemented=function(_16,_17){
var _18="'"+_16+"' not implemented";
if(_17!=null){
_18+=" "+_17;
}
dojo.raise(_18);
};
dojo.deprecated=function(_19,_1a,_1b){
var _1c="DEPRECATED: "+_19;
if(_1a){
_1c+=" "+_1a;
}
if(_1b){
_1c+=" -- will be removed in version: "+_1b;
}
dojo.debug(_1c);
};
dojo.render=(function(){
function vscaffold(_1d,_1e){
var tmp={capable:false,support:{builtin:false,plugin:false},prefixes:_1d};
for(var i=0;i<_1e.length;i++){
tmp[_1e[i]]=false;
}
return tmp;
}
return {name:"",ver:dojo.version,os:{win:false,linux:false,osx:false},html:vscaffold(["html"],["ie","opera","khtml","safari","moz"]),svg:vscaffold(["svg"],["corel","adobe","batik"]),vml:vscaffold(["vml"],["ie"]),swf:vscaffold(["Swf","Flash","Mm"],["mm"]),swt:vscaffold(["Swt"],["ibm"])};
})();
dojo.hostenv=(function(){
var _21={isDebug:false,allowQueryConfig:false,baseScriptUri:"",baseRelativePath:"",libraryScriptUri:"",iePreventClobber:false,ieClobberMinimal:true,preventBackButtonFix:true,delayMozLoadingFix:false,searchIds:[],parseWidgets:true};
if(typeof djConfig=="undefined"){
djConfig=_21;
}else{
for(var _22 in _21){
if(typeof djConfig[_22]=="undefined"){
djConfig[_22]=_21[_22];
}
}
}
return {name_:"(unset)",version_:"(unset)",getName:function(){
return this.name_;
},getVersion:function(){
return this.version_;
},getText:function(uri){
dojo.unimplemented("getText","uri="+uri);
}};
})();
dojo.hostenv.getBaseScriptUri=function(){
if(djConfig.baseScriptUri.length){
return djConfig.baseScriptUri;
}
var uri=new String(djConfig.libraryScriptUri||djConfig.baseRelativePath);
if(!uri){
dojo.raise("Nothing returned by getLibraryScriptUri(): "+uri);
}
var _25=uri.lastIndexOf("/");
djConfig.baseScriptUri=djConfig.baseRelativePath;
return djConfig.baseScriptUri;
};
(function(){
var _26={pkgFileName:"__package__",loading_modules_:{},loaded_modules_:{},addedToLoadingCount:[],removedFromLoadingCount:[],inFlightCount:0,modulePrefixes_:{dojo:{name:"dojo",value:"src"}},setModulePrefix:function(_27,_28){
this.modulePrefixes_[_27]={name:_27,value:_28};
},moduleHasPrefix:function(_29){
var mp=this.modulePrefixes_;
return Boolean(mp[_29]&&mp[_29].value);
},getModulePrefix:function(_2b){
if(this.moduleHasPrefix(_2b)){
return this.modulePrefixes_[_2b].value;
}
return _2b;
},getTextStack:[],loadUriStack:[],loadedUris:[],post_load_:false,modulesLoadedListeners:[],unloadListeners:[],loadNotifying:false};
for(var _2c in _26){
dojo.hostenv[_2c]=_26[_2c];
}
})();
dojo.hostenv.loadPath=function(_2d,_2e,cb){
var uri;
if(_2d.charAt(0)=="/"||_2d.match(/^\w+:/)){
uri=_2d;
}else{
uri=this.getBaseScriptUri()+_2d;
}
if(djConfig.cacheBust&&dojo.render.html.capable){
uri+="?"+String(djConfig.cacheBust).replace(/\W+/g,"");
}
try{
return !_2e?this.loadUri(uri,cb):this.loadUriAndCheck(uri,_2e,cb);
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.hostenv.loadUri=function(uri,cb){
if(this.loadedUris[uri]){
return true;
}
var _33=this.getText(uri,null,true);
if(!_33){
return false;
}
this.loadedUris[uri]=true;
if(cb){
_33="("+_33+")";
}
var _34=dj_eval(_33);
if(cb){
cb(_34);
}
return true;
};
dojo.hostenv.loadUriAndCheck=function(uri,_36,cb){
var ok=true;
try{
ok=this.loadUri(uri,cb);
}
catch(e){
dojo.debug("failed loading ",uri," with error: ",e);
}
return Boolean(ok&&this.findModule(_36,false));
};
dojo.loaded=function(){
};
dojo.unloaded=function(){
};
dojo.hostenv.loaded=function(){
this.loadNotifying=true;
this.post_load_=true;
var mll=this.modulesLoadedListeners;
for(var x=0;x<mll.length;x++){
mll[x]();
}
this.modulesLoadedListeners=[];
this.loadNotifying=false;
dojo.loaded();
};
dojo.hostenv.unloaded=function(){
var mll=this.unloadListeners;
while(mll.length){
(mll.pop())();
}
dojo.unloaded();
};
dojo.addOnLoad=function(obj,_3d){
var dh=dojo.hostenv;
if(arguments.length==1){
dh.modulesLoadedListeners.push(obj);
}else{
if(arguments.length>1){
dh.modulesLoadedListeners.push(function(){
obj[_3d]();
});
}
}
if(dh.post_load_&&dh.inFlightCount==0&&!dh.loadNotifying){
dh.callLoaded();
}
};
dojo.addOnUnload=function(obj,_40){
var dh=dojo.hostenv;
if(arguments.length==1){
dh.unloadListeners.push(obj);
}else{
if(arguments.length>1){
dh.unloadListeners.push(function(){
obj[_40]();
});
}
}
};
dojo.hostenv.modulesLoaded=function(){
if(this.post_load_){
return;
}
if(this.loadUriStack.length==0&&this.getTextStack.length==0){
if(this.inFlightCount>0){
dojo.debug("files still in flight!");
return;
}
dojo.hostenv.callLoaded();
}
};
dojo.hostenv.callLoaded=function(){
if(typeof setTimeout=="object"){
setTimeout("dojo.hostenv.loaded();",0);
}else{
dojo.hostenv.loaded();
}
};
dojo.hostenv.getModuleSymbols=function(_42){
var _43=_42.split(".");
for(var i=_43.length;i>0;i--){
var _45=_43.slice(0,i).join(".");
if((i==1)&&!this.moduleHasPrefix(_45)){
_43[0]="../"+_43[0];
}else{
var _46=this.getModulePrefix(_45);
if(_46!=_45){
_43.splice(0,i,_46);
break;
}
}
}
return _43;
};
dojo.hostenv._global_omit_module_check=false;
dojo.hostenv.loadModule=function(_47,_48,_49){
if(!_47){
return;
}
_49=this._global_omit_module_check||_49;
var _4a=this.findModule(_47,false);
if(_4a){
return _4a;
}
if(dj_undef(_47,this.loading_modules_)){
this.addedToLoadingCount.push(_47);
}
this.loading_modules_[_47]=1;
var _4b=_47.replace(/\./g,"/")+".js";
var _4c=_47.split(".");
var _4d=this.getModuleSymbols(_47);
var _4e=((_4d[0].charAt(0)!="/")&&!_4d[0].match(/^\w+:/));
var _4f=_4d[_4d.length-1];
var ok;
if(_4f=="*"){
_47=_4c.slice(0,-1).join(".");
while(_4d.length){
_4d.pop();
_4d.push(this.pkgFileName);
_4b=_4d.join("/")+".js";
if(_4e&&_4b.charAt(0)=="/"){
_4b=_4b.slice(1);
}
ok=this.loadPath(_4b,!_49?_47:null);
if(ok){
break;
}
_4d.pop();
}
}else{
_4b=_4d.join("/")+".js";
_47=_4c.join(".");
var _51=!_49?_47:null;
ok=this.loadPath(_4b,_51);
if(!ok&&!_48){
_4d.pop();
while(_4d.length){
_4b=_4d.join("/")+".js";
ok=this.loadPath(_4b,_51);
if(ok){
break;
}
_4d.pop();
_4b=_4d.join("/")+"/"+this.pkgFileName+".js";
if(_4e&&_4b.charAt(0)=="/"){
_4b=_4b.slice(1);
}
ok=this.loadPath(_4b,_51);
if(ok){
break;
}
}
}
if(!ok&&!_49){
dojo.raise("Could not load '"+_47+"'; last tried '"+_4b+"'");
}
}
if(!_49&&!this["isXDomain"]){
_4a=this.findModule(_47,false);
if(!_4a){
dojo.raise("symbol '"+_47+"' is not defined after loading '"+_4b+"'");
}
}
return _4a;
};
dojo.hostenv.startPackage=function(_52){
var _53=String(_52);
var _54=_53;
var _55=_52.split(/\./);
if(_55[_55.length-1]=="*"){
_55.pop();
_54=_55.join(".");
}
var _56=dojo.evalObjPath(_54,true);
this.loaded_modules_[_53]=_56;
this.loaded_modules_[_54]=_56;
return _56;
};
dojo.hostenv.findModule=function(_57,_58){
var lmn=String(_57);
if(this.loaded_modules_[lmn]){
return this.loaded_modules_[lmn];
}
if(_58){
dojo.raise("no loaded module named '"+_57+"'");
}
return null;
};
dojo.kwCompoundRequire=function(_5a){
var _5b=_5a["common"]||[];
var _5c=_5a[dojo.hostenv.name_]?_5b.concat(_5a[dojo.hostenv.name_]||[]):_5b.concat(_5a["default"]||[]);
for(var x=0;x<_5c.length;x++){
var _5e=_5c[x];
if(_5e.constructor==Array){
dojo.hostenv.loadModule.apply(dojo.hostenv,_5e);
}else{
dojo.hostenv.loadModule(_5e);
}
}
};
dojo.require=function(_5f){
dojo.hostenv.loadModule.apply(dojo.hostenv,arguments);
};
dojo.requireIf=function(_60,_61){
var _62=arguments[0];
if((_62===true)||(_62=="common")||(_62&&dojo.render[_62].capable)){
var _63=[];
for(var i=1;i<arguments.length;i++){
_63.push(arguments[i]);
}
dojo.require.apply(dojo,_63);
}
};
dojo.requireAfterIf=dojo.requireIf;
dojo.provide=function(_65){
return dojo.hostenv.startPackage.apply(dojo.hostenv,arguments);
};
dojo.registerModulePath=function(_66,_67){
return dojo.hostenv.setModulePrefix(_66,_67);
};
dojo.setModulePrefix=function(_68,_69){
dojo.deprecated("dojo.setModulePrefix(\""+_68+"\", \""+_69+"\")","replaced by dojo.registerModulePath","0.5");
return dojo.registerModulePath(_68,_69);
};
dojo.exists=function(obj,_6b){
var p=_6b.split(".");
for(var i=0;i<p.length;i++){
if(!obj[p[i]]){
return false;
}
obj=obj[p[i]];
}
return true;
};
dojo.hostenv.normalizeLocale=function(_6e){
var _6f=_6e?_6e.toLowerCase():dojo.locale;
if(_6f=="root"){
_6f="ROOT";
}
return _6f;
};
dojo.hostenv.searchLocalePath=function(_70,_71,_72){
_70=dojo.hostenv.normalizeLocale(_70);
var _73=_70.split("-");
var _74=[];
for(var i=_73.length;i>0;i--){
_74.push(_73.slice(0,i).join("-"));
}
_74.push(false);
if(_71){
_74.reverse();
}
for(var j=_74.length-1;j>=0;j--){
var loc=_74[j]||"ROOT";
var _78=_72(loc);
if(_78){
break;
}
}
};
dojo.hostenv.localesGenerated=["ROOT","es-es","es","it-it","pt-br","de","fr-fr","zh-cn","pt","en-us","ar","zh","fr","it","he","en-gb","xx","de-de","zh-tw","ko-kr","ja-jp","ko","en","ja"];
dojo.hostenv.registerNlsPrefix=function(){
dojo.registerModulePath("nls","nls");
};
dojo.hostenv.preloadLocalizations=function(){
if(dojo.hostenv.localesGenerated){
dojo.hostenv.registerNlsPrefix();
function preload(_79){
_79=dojo.hostenv.normalizeLocale(_79);
dojo.hostenv.searchLocalePath(_79,true,function(loc){
for(var i=0;i<dojo.hostenv.localesGenerated.length;i++){
if(dojo.hostenv.localesGenerated[i]==loc){
dojo["require"]("nls.dojo_"+loc);
return true;
}
}
return false;
});
}
preload();
var _7c=djConfig.extraLocale||[];
for(var i=0;i<_7c.length;i++){
preload(_7c[i]);
}
}
dojo.hostenv.preloadLocalizations=function(){
};
};
dojo.requireLocalization=function(_7e,_7f,_80,_81){
dojo.hostenv.preloadLocalizations();
var _82=dojo.hostenv.normalizeLocale(_80);
var _83=[_7e,"nls",_7f].join(".");
var _84="";
if(_81){
var _85=_81.split(",");
for(var i=0;i<_85.length;i++){
if(_82.indexOf(_85[i])==0){
if(_85[i].length>_84.length){
_84=_85[i];
}
}
}
if(!_84){
_84="ROOT";
}
}
var _87=_81?_84:_82;
var _88=dojo.hostenv.findModule(_83);
var _89=null;
if(_88){
if(djConfig.localizationComplete&&_88._built){
return;
}
var _8a=_87.replace("-","_");
var _8b=_83+"."+_8a;
_89=dojo.hostenv.findModule(_8b);
}
if(!_89){
_88=dojo.hostenv.startPackage(_83);
var _8c=dojo.hostenv.getModuleSymbols(_7e);
var _8d=_8c.concat("nls").join("/");
var _8e;
dojo.hostenv.searchLocalePath(_87,_81,function(loc){
var _90=loc.replace("-","_");
var _91=_83+"."+_90;
var _92=false;
if(!dojo.hostenv.findModule(_91)){
dojo.hostenv.startPackage(_91);
var _93=[_8d];
if(loc!="ROOT"){
_93.push(loc);
}
_93.push(_7f);
var _94=_93.join("/")+".js";
_92=dojo.hostenv.loadPath(_94,null,function(_95){
var _96=function(){
};
_96.prototype=_8e;
_88[_90]=new _96();
for(var j in _95){
_88[_90][j]=_95[j];
}
});
}else{
_92=true;
}
if(_92&&_88[_90]){
_8e=_88[_90];
}else{
_88[_90]=_8e;
}
if(_81){
return true;
}
});
}
if(_81&&_82!=_84){
_88[_82.replace("-","_")]=_88[_84.replace("-","_")];
}
};
(function(){
var _98=djConfig.extraLocale;
if(_98){
if(!_98 instanceof Array){
_98=[_98];
}
var req=dojo.requireLocalization;
dojo.requireLocalization=function(m,b,_9c,_9d){
req(m,b,_9c,_9d);
if(_9c){
return;
}
for(var i=0;i<_98.length;i++){
req(m,b,_98[i],_9d);
}
};
}
})();
}
if(typeof window!="undefined"){
(function(){
if(djConfig.allowQueryConfig){
var _9f=document.location.toString();
var _a0=_9f.split("?",2);
if(_a0.length>1){
var _a1=_a0[1];
var _a2=_a1.split("&");
for(var x in _a2){
var sp=_a2[x].split("=");
if((sp[0].length>9)&&(sp[0].substr(0,9)=="djConfig.")){
var opt=sp[0].substr(9);
try{
djConfig[opt]=eval(sp[1]);
}
catch(e){
djConfig[opt]=sp[1];
}
}
}
}
}
if(((djConfig["baseScriptUri"]=="")||(djConfig["baseRelativePath"]==""))&&(document&&document.getElementsByTagName)){
var _a6=document.getElementsByTagName("script");
var _a7=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i;
for(var i=0;i<_a6.length;i++){
var src=_a6[i].getAttribute("src");
if(!src){
continue;
}
var m=src.match(_a7);
if(m){
var _ab=src.substring(0,m.index);
if(src.indexOf("bootstrap1")>-1){
_ab+="../";
}
if(!this["djConfig"]){
djConfig={};
}
if(djConfig["baseScriptUri"]==""){
djConfig["baseScriptUri"]=_ab;
}
if(djConfig["baseRelativePath"]==""){
djConfig["baseRelativePath"]=_ab;
}
break;
}
}
}
var dr=dojo.render;
var drh=dojo.render.html;
var drs=dojo.render.svg;
var dua=(drh.UA=navigator.userAgent);
var dav=(drh.AV=navigator.appVersion);
var t=true;
var f=false;
drh.capable=t;
drh.support.builtin=t;
dr.ver=parseFloat(drh.AV);
dr.os.mac=dav.indexOf("Macintosh")>=0;
dr.os.win=dav.indexOf("Windows")>=0;
dr.os.linux=dav.indexOf("X11")>=0;
drh.opera=dua.indexOf("Opera")>=0;
drh.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0);
drh.safari=dav.indexOf("Safari")>=0;
var _b3=dua.indexOf("Gecko");
drh.mozilla=drh.moz=(_b3>=0)&&(!drh.khtml);
if(drh.mozilla){
drh.geckoVersion=dua.substring(_b3+6,_b3+14);
}
drh.ie=(document.all)&&(!drh.opera);
drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0;
drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0;
drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0;
drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0;
var cm=document["compatMode"];
drh.quirks=(cm=="BackCompat")||(cm=="QuirksMode")||drh.ie55||drh.ie50;
dojo.locale=dojo.locale||(drh.ie?navigator.userLanguage:navigator.language).toLowerCase();
dr.vml.capable=drh.ie;
drs.capable=f;
drs.support.plugin=f;
drs.support.builtin=f;
var _b5=window["document"];
var tdi=_b5["implementation"];
if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0"))){
drs.capable=t;
drs.support.builtin=t;
drs.support.plugin=f;
}
if(drh.safari){
var tmp=dua.split("AppleWebKit/")[1];
var ver=parseFloat(tmp.split(" ")[0]);
if(ver>=420){
drs.capable=t;
drs.support.builtin=t;
drs.support.plugin=f;
}
}else{
}
})();
dojo.hostenv.startPackage("dojo.hostenv");
dojo.render.name=dojo.hostenv.name_="browser";
dojo.hostenv.searchIds=[];
dojo.hostenv._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
dojo.hostenv.getXmlhttpObject=function(){
var _b9=null;
var _ba=null;
try{
_b9=new XMLHttpRequest();
}
catch(e){
}
if(!_b9){
for(var i=0;i<3;++i){
var _bc=dojo.hostenv._XMLHTTP_PROGIDS[i];
try{
_b9=new ActiveXObject(_bc);
}
catch(e){
_ba=e;
}
if(_b9){
dojo.hostenv._XMLHTTP_PROGIDS=[_bc];
break;
}
}
}
if(!_b9){
return dojo.raise("XMLHTTP not available",_ba);
}
return _b9;
};
dojo.hostenv._blockAsync=false;
dojo.hostenv.getText=function(uri,_be,_bf){
if(!_be){
this._blockAsync=true;
}
var _c0=this.getXmlhttpObject();
function isDocumentOk(_c1){
var _c2=_c1["status"];
return Boolean((!_c2)||((200<=_c2)&&(300>_c2))||(_c2==304));
}
if(_be){
var _c3=this,_c4=null,gbl=dojo.global();
var xhr=dojo.evalObjPath("dojo.io.XMLHTTPTransport");
_c0.onreadystatechange=function(){
if(_c4){
gbl.clearTimeout(_c4);
_c4=null;
}
if(_c3._blockAsync||(xhr&&xhr._blockAsync)){
_c4=gbl.setTimeout(function(){
_c0.onreadystatechange.apply(this);
},10);
}else{
if(4==_c0.readyState){
if(isDocumentOk(_c0)){
_be(_c0.responseText);
}
}
}
};
}
_c0.open("GET",uri,_be?true:false);
try{
_c0.send(null);
if(_be){
return null;
}
if(!isDocumentOk(_c0)){
var err=Error("Unable to load "+uri+" status:"+_c0.status);
err.status=_c0.status;
err.responseText=_c0.responseText;
throw err;
}
}
catch(e){
this._blockAsync=false;
if((_bf)&&(!_be)){
return null;
}else{
throw e;
}
}
this._blockAsync=false;
return _c0.responseText;
};
dojo.hostenv.defaultDebugContainerId="dojoDebug";
dojo.hostenv._println_buffer=[];
dojo.hostenv._println_safe=false;
dojo.hostenv.println=function(_c8){
if(!dojo.hostenv._println_safe){
dojo.hostenv._println_buffer.push(_c8);
}else{
try{
var _c9=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId);
if(!_c9){
_c9=dojo.body();
}
var div=document.createElement("div");
div.appendChild(document.createTextNode(_c8));
_c9.appendChild(div);
}
catch(e){
try{
document.write("<div>"+_c8+"</div>");
}
catch(e2){
window.status=_c8;
}
}
}
};
dojo.addOnLoad(function(){
dojo.hostenv._println_safe=true;
while(dojo.hostenv._println_buffer.length>0){
dojo.hostenv.println(dojo.hostenv._println_buffer.shift());
}
});
function dj_addNodeEvtHdlr(_cb,_cc,fp){
var _ce=_cb["on"+_cc]||function(){
};
_cb["on"+_cc]=function(){
fp.apply(_cb,arguments);
_ce.apply(_cb,arguments);
};
return true;
}
function dj_load_init(e){
var _d0=(e&&e.type)?e.type.toLowerCase():"load";
if(arguments.callee.initialized||(_d0!="domcontentloaded"&&_d0!="load")){
return;
}
arguments.callee.initialized=true;
if(typeof (_timer)!="undefined"){
clearInterval(_timer);
delete _timer;
}
var _d1=function(){
if(dojo.render.html.ie){
dojo.hostenv.makeWidgets();
}
};
if(dojo.hostenv.inFlightCount==0){
_d1();
dojo.hostenv.modulesLoaded();
}else{
dojo.hostenv.modulesLoadedListeners.unshift(_d1);
}
}
if(document.addEventListener){
if(dojo.render.html.opera||(dojo.render.html.moz&&!djConfig.delayMozLoadingFix)){
document.addEventListener("DOMContentLoaded",dj_load_init,null);
}
window.addEventListener("load",dj_load_init,null);
}
if(dojo.render.html.ie&&dojo.render.os.win){
document.attachEvent("onreadystatechange",function(e){
if(document.readyState=="complete"){
dj_load_init();
}
});
}
if(/(WebKit|khtml)/i.test(navigator.userAgent)){
var _timer=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
dj_load_init();
}
},10);
}
if(dojo.render.html.ie){
dj_addNodeEvtHdlr(window,"beforeunload",function(){
dojo.hostenv._unloading=true;
window.setTimeout(function(){
dojo.hostenv._unloading=false;
},0);
});
}
dj_addNodeEvtHdlr(window,"unload",function(){
dojo.hostenv.unloaded();
if((!dojo.render.html.ie)||(dojo.render.html.ie&&dojo.hostenv._unloading)){
dojo.hostenv.unloaded();
}
});
dojo.hostenv.makeWidgets=function(){
var _d3=[];
if(djConfig.searchIds&&djConfig.searchIds.length>0){
_d3=_d3.concat(djConfig.searchIds);
}
if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){
_d3=_d3.concat(dojo.hostenv.searchIds);
}
if((djConfig.parseWidgets)||(_d3.length>0)){
if(dojo.evalObjPath("dojo.widget.Parse")){
var _d4=new dojo.xml.Parse();
if(_d3.length>0){
for(var x=0;x<_d3.length;x++){
var _d6=document.getElementById(_d3[x]);
if(!_d6){
continue;
}
var _d7=_d4.parseElement(_d6,null,true);
dojo.widget.getParser().createComponents(_d7);
}
}else{
if(djConfig.parseWidgets){
var _d7=_d4.parseElement(dojo.body(),null,true);
dojo.widget.getParser().createComponents(_d7);
}
}
}
}
};
dojo.addOnLoad(function(){
if(!dojo.render.html.ie){
dojo.hostenv.makeWidgets();
}
});
try{
if(dojo.render.html.ie){
document.namespaces.add("v","urn:schemas-microsoft-com:vml");
document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)");
}
}
catch(e){
}
dojo.hostenv.writeIncludes=function(){
};
if(!dj_undef("document",this)){
dj_currentDocument=this.document;
}
dojo.doc=function(){
return dj_currentDocument;
};
dojo.body=function(){
return dojo.doc().body||dojo.doc().getElementsByTagName("body")[0];
};
dojo.byId=function(id,doc){
if((id)&&((typeof id=="string")||(id instanceof String))){
if(!doc){
doc=dj_currentDocument;
}
var ele=doc.getElementById(id);
if(ele&&(ele.id!=id)&&doc.all){
ele=null;
eles=doc.all[id];
if(eles){
if(eles.length){
for(var i=0;i<eles.length;i++){
if(eles[i].id==id){
ele=eles[i];
break;
}
}
}else{
ele=eles;
}
}
}
return ele;
}
return id;
};
dojo.setContext=function(_dc,_dd){
dj_currentContext=_dc;
dj_currentDocument=_dd;
};
dojo._fireCallback=function(_de,_df,_e0){
if((_df)&&((typeof _de=="string")||(_de instanceof String))){
_de=_df[_de];
}
return (_df?_de.apply(_df,_e0||[]):_de());
};
dojo.withGlobal=function(_e1,_e2,_e3,_e4){
var _e5;
var _e6=dj_currentContext;
var _e7=dj_currentDocument;
try{
dojo.setContext(_e1,_e1.document);
_e5=dojo._fireCallback(_e2,_e3,_e4);
}
finally{
dojo.setContext(_e6,_e7);
}
return _e5;
};
dojo.withDoc=function(_e8,_e9,_ea,_eb){
var _ec;
var _ed=dj_currentDocument;
try{
dj_currentDocument=_e8;
_ec=dojo._fireCallback(_e9,_ea,_eb);
}
finally{
dj_currentDocument=_ed;
}
return _ec;
};
}
(function(){
if(typeof dj_usingBootstrap!="undefined"){
return;
}
var _ee=false;
var _ef=false;
var _f0=false;
if((typeof this["load"]=="function")&&((typeof this["Packages"]=="function")||(typeof this["Packages"]=="object"))){
_ee=true;
}else{
if(typeof this["load"]=="function"){
_ef=true;
}else{
if(window.widget){
_f0=true;
}
}
}
var _f1=[];
if((this["djConfig"])&&((djConfig["isDebug"])||(djConfig["debugAtAllCosts"]))){
_f1.push("debug.js");
}
if((this["djConfig"])&&(djConfig["debugAtAllCosts"])&&(!_ee)&&(!_f0)){
_f1.push("browser_debug.js");
}
var _f2=djConfig["baseScriptUri"];
if((this["djConfig"])&&(djConfig["baseLoaderUri"])){
_f2=djConfig["baseLoaderUri"];
}
for(var x=0;x<_f1.length;x++){
var _f4=_f2+"src/"+_f1[x];
if(_ee||_ef){
load(_f4);
}else{
try{
document.write("<scr"+"ipt type='text/javascript' src='"+_f4+"'></scr"+"ipt>");
}
catch(e){
var _f5=document.createElement("script");
_f5.src=_f4;
document.getElementsByTagName("head")[0].appendChild(_f5);
}
}
}
})();
if(!this["dojo"]){
alert("\"dojo/__package__.js\" is now located at \"dojo/dojo.js\". Please update your includes accordingly");
}
dojo.provide("dojo.string.common");
dojo.string.trim=function(str,wh){
if(!str.replace){
return str;
}
if(!str.length){
return str;
}
var re=(wh>0)?(/^\s+/):(wh<0)?(/\s+$/):(/^\s+|\s+$/g);
return str.replace(re,"");
};
dojo.string.trimStart=function(str){
return dojo.string.trim(str,1);
};
dojo.string.trimEnd=function(str){
return dojo.string.trim(str,-1);
};
dojo.string.repeat=function(str,_fc,_fd){
var out="";
for(var i=0;i<_fc;i++){
out+=str;
if(_fd&&i<_fc-1){
out+=_fd;
}
}
return out;
};
dojo.string.pad=function(str,len,c,dir){
var out=String(str);
if(!c){
c="0";
}
if(!dir){
dir=1;
}
while(out.length<len){
if(dir>0){
out=c+out;
}else{
out+=c;
}
}
return out;
};
dojo.string.padLeft=function(str,len,c){
return dojo.string.pad(str,len,c,1);
};
dojo.string.padRight=function(str,len,c){
return dojo.string.pad(str,len,c,-1);
};
dojo.provide("dojo.string");
dojo.provide("dojo.lang.common");
dojo.lang.inherits=function(_10b,_10c){
if(!dojo.lang.isFunction(_10c)){
dojo.raise("dojo.inherits: superclass argument ["+_10c+"] must be a function (subclass: ["+_10b+"']");
}
_10b.prototype=new _10c();
_10b.prototype.constructor=_10b;
_10b.superclass=_10c.prototype;
_10b["super"]=_10c.prototype;
};
dojo.lang._mixin=function(obj,_10e){
var tobj={};
for(var x in _10e){
if((typeof tobj[x]=="undefined")||(tobj[x]!=_10e[x])){
obj[x]=_10e[x];
}
}
if(dojo.render.html.ie&&(typeof (_10e["toString"])=="function")&&(_10e["toString"]!=obj["toString"])&&(_10e["toString"]!=tobj["toString"])){
obj.toString=_10e.toString;
}
return obj;
};
dojo.lang.mixin=function(obj,_112){
for(var i=1,l=arguments.length;i<l;i++){
dojo.lang._mixin(obj,arguments[i]);
}
return obj;
};
dojo.lang.extend=function(_115,_116){
for(var i=1,l=arguments.length;i<l;i++){
dojo.lang._mixin(_115.prototype,arguments[i]);
}
return _115;
};
dojo.inherits=dojo.lang.inherits;
dojo.mixin=dojo.lang.mixin;
dojo.extend=dojo.lang.extend;
dojo.lang.find=function(_119,_11a,_11b,_11c){
if(!dojo.lang.isArrayLike(_119)&&dojo.lang.isArrayLike(_11a)){
dojo.deprecated("dojo.lang.find(value, array)","use dojo.lang.find(array, value) instead","0.5");
var temp=_119;
_119=_11a;
_11a=temp;
}
var _11e=dojo.lang.isString(_119);
if(_11e){
_119=_119.split("");
}
if(_11c){
var step=-1;
var i=_119.length-1;
var end=-1;
}else{
var step=1;
var i=0;
var end=_119.length;
}
if(_11b){
while(i!=end){
if(_119[i]===_11a){
return i;
}
i+=step;
}
}else{
while(i!=end){
if(_119[i]==_11a){
return i;
}
i+=step;
}
}
return -1;
};
dojo.lang.indexOf=dojo.lang.find;
dojo.lang.findLast=function(_122,_123,_124){
return dojo.lang.find(_122,_123,_124,true);
};
dojo.lang.lastIndexOf=dojo.lang.findLast;
dojo.lang.inArray=function(_125,_126){
return dojo.lang.find(_125,_126)>-1;
};
dojo.lang.isObject=function(it){
if(typeof it=="undefined"){
return false;
}
return (typeof it=="object"||it===null||dojo.lang.isArray(it)||dojo.lang.isFunction(it));
};
dojo.lang.isArray=function(it){
return (it&&it instanceof Array||typeof it=="array");
};
dojo.lang.isArrayLike=function(it){
if((!it)||(dojo.lang.isUndefined(it))){
return false;
}
if(dojo.lang.isString(it)){
return false;
}
if(dojo.lang.isFunction(it)){
return false;
}
if(dojo.lang.isArray(it)){
return true;
}
if((it.tagName)&&(it.tagName.toLowerCase()=="form")){
return false;
}
if(dojo.lang.isNumber(it.length)&&isFinite(it.length)){
return true;
}
return false;
};
dojo.lang.isFunction=function(it){
return (it instanceof Function||typeof it=="function");
};
(function(){
if((dojo.render.html.capable)&&(dojo.render.html["safari"])){
dojo.lang.isFunction=function(it){
if((typeof (it)=="function")&&(it=="[object NodeList]")){
return false;
}
return (it instanceof Function||typeof it=="function");
};
}
})();
dojo.lang.isString=function(it){
return (typeof it=="string"||it instanceof String);
};
dojo.lang.isAlien=function(it){
if(!it){
return false;
}
return !dojo.lang.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));
};
dojo.lang.isBoolean=function(it){
return (it instanceof Boolean||typeof it=="boolean");
};
dojo.lang.isNumber=function(it){
return (it instanceof Number||typeof it=="number");
};
dojo.lang.isUndefined=function(it){
return ((typeof (it)=="undefined")&&(it==undefined));
};
dojo.provide("dojo.lang.extras");
dojo.lang.setTimeout=function(func,_132){
var _133=window,_134=2;
if(!dojo.lang.isFunction(func)){
_133=func;
func=_132;
_132=arguments[2];
_134++;
}
if(dojo.lang.isString(func)){
func=_133[func];
}
var args=[];
for(var i=_134;i<arguments.length;i++){
args.push(arguments[i]);
}
return dojo.global().setTimeout(function(){
func.apply(_133,args);
},_132);
};
dojo.lang.clearTimeout=function(_137){
dojo.global().clearTimeout(_137);
};
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(_140,_141,_142){
with(dojo.parseObjPath(_140,_141,_142)){
return dojo.evalProp(prop,obj,_142);
}
};
dojo.lang.setObjPathValue=function(_143,_144,_145,_146){
dojo.deprecated("dojo.lang.setObjPathValue","use dojo.parseObjPath and the '=' operator","0.6");
if(arguments.length<4){
_146=true;
}
with(dojo.parseObjPath(_143,_145,_146)){
if(obj&&(_146||(prop in obj))){
obj[prop]=_144;
}
}
};
dojo.provide("dojo.io.common");
dojo.io.transports=[];
dojo.io.hdlrFuncNames=["load","error","timeout"];
dojo.io.Request=function(url,_148,_149,_14a){
if((arguments.length==1)&&(arguments[0].constructor==Object)){
this.fromKwArgs(arguments[0]);
}else{
this.url=url;
if(_148){
this.mimetype=_148;
}
if(_149){
this.transport=_149;
}
if(arguments.length>=4){
this.changeUrl=_14a;
}
}
};
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,_14d,_14e){
},error:function(type,_150,_151,_152){
},timeout:function(type,_154,_155,_156){
},handle:function(type,data,_159,_15a){
},timeoutSeconds:0,abort:function(){
},fromKwArgs:function(_15b){
if(_15b["url"]){
_15b.url=_15b.url.toString();
}
if(_15b["formNode"]){
_15b.formNode=dojo.byId(_15b.formNode);
}
if(!_15b["method"]&&_15b["formNode"]&&_15b["formNode"].method){
_15b.method=_15b["formNode"].method;
}
if(!_15b["handle"]&&_15b["handler"]){
_15b.handle=_15b.handler;
}
if(!_15b["load"]&&_15b["loaded"]){
_15b.load=_15b.loaded;
}
if(!_15b["changeUrl"]&&_15b["changeURL"]){
_15b.changeUrl=_15b.changeURL;
}
_15b.encoding=dojo.lang.firstValued(_15b["encoding"],djConfig["bindEncoding"],"");
_15b.sendTransport=dojo.lang.firstValued(_15b["sendTransport"],djConfig["ioSendTransport"],false);
var _15c=dojo.lang.isFunction;
for(var x=0;x<dojo.io.hdlrFuncNames.length;x++){
var fn=dojo.io.hdlrFuncNames[x];
if(_15b[fn]&&_15c(_15b[fn])){
continue;
}
if(_15b["handle"]&&_15c(_15b["handle"])){
_15b[fn]=_15b.handle;
}
}
dojo.lang.mixin(this,_15b);
}});
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(_163){
if(!(_163 instanceof dojo.io.Request)){
try{
_163=new dojo.io.Request(_163);
}
catch(e){
dojo.debug(e);
}
}
var _164="";
if(_163["transport"]){
_164=_163["transport"];
if(!this[_164]){
dojo.io.sendBindError(_163,"No dojo.io.bind() transport with name '"+_163["transport"]+"'.");
return _163;
}
if(!this[_164].canHandle(_163)){
dojo.io.sendBindError(_163,"dojo.io.bind() transport with name '"+_163["transport"]+"' cannot handle this type of request.");
return _163;
}
}else{
for(var x=0;x<dojo.io.transports.length;x++){
var tmp=dojo.io.transports[x];
if((this[tmp])&&(this[tmp].canHandle(_163))){
_164=tmp;
break;
}
}
if(_164==""){
dojo.io.sendBindError(_163,"None of the loaded transports for dojo.io.bind()"+" can handle the request.");
return _163;
}
}
this[_164].bind(_163);
_163.bindSuccess=true;
return _163;
};
dojo.io.sendBindError=function(_167,_168){
if((typeof _167.error=="function"||typeof _167.handle=="function")&&(typeof setTimeout=="function"||typeof setTimeout=="object")){
var _169=new dojo.io.Error(_168);
setTimeout(function(){
_167[(typeof _167.error=="function")?"error":"handle"]("error",_169,null,_167);
},50);
}else{
dojo.raise(_168);
}
};
dojo.io.queueBind=function(_16a){
if(!(_16a instanceof dojo.io.Request)){
try{
_16a=new dojo.io.Request(_16a);
}
catch(e){
dojo.debug(e);
}
}
var _16b=_16a.load;
_16a.load=function(){
dojo.io._queueBindInFlight=false;
var ret=_16b.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
var _16d=_16a.error;
_16a.error=function(){
dojo.io._queueBindInFlight=false;
var ret=_16d.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
dojo.io._bindQueue.push(_16a);
dojo.io._dispatchNextQueueBind();
return _16a;
};
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,_170,last){
var enc=/utf/i.test(_170||"")?encodeURIComponent:dojo.string.encodeAscii;
var _173=[];
var _174=new Object();
for(var name in map){
var _176=function(elt){
var val=enc(name)+"="+enc(elt);
_173[(last==name)?"push":"unshift"](val);
};
if(!_174[name]){
var _179=map[name];
if(dojo.lang.isArray(_179)){
dojo.lang.forEach(_179,_176);
}else{
_176(_179);
}
}
}
return _173.join("&");
};
dojo.io.setIFrameSrc=function(_17a,src,_17c){
try{
var r=dojo.render.html;
if(!_17c){
if(r.safari){
_17a.location=src;
}else{
frames[_17a.name].location=src;
}
}else{
var idoc;
if(r.ie){
idoc=_17a.contentWindow.document;
}else{
if(r.safari){
idoc=_17a.document;
}else{
idoc=_17a.contentWindow;
}
}
if(!idoc){
_17a.location=src;
return;
}else{
idoc.location.replace(src);
}
}
}
catch(e){
dojo.debug(e);
dojo.debug("setIFrameSrc: "+e);
}
};
dojo.provide("dojo.lang.array");
dojo.lang.mixin(dojo.lang,{has:function(obj,name){
try{
return typeof obj[name]!="undefined";
}
catch(e){
return false;
}
},isEmpty:function(obj){
if(dojo.lang.isObject(obj)){
var tmp={};
var _183=0;
for(var x in obj){
if(obj[x]&&(!tmp[x])){
_183++;
break;
}
}
return _183==0;
}else{
if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){
return obj.length==0;
}
}
},map:function(arr,obj,_187){
var _188=dojo.lang.isString(arr);
if(_188){
arr=arr.split("");
}
if(dojo.lang.isFunction(obj)&&(!_187)){
_187=obj;
obj=dj_global;
}else{
if(dojo.lang.isFunction(obj)&&_187){
var _189=obj;
obj=_187;
_187=_189;
}
}
if(Array.map){
var _18a=Array.map(arr,_187,obj);
}else{
var _18a=[];
for(var i=0;i<arr.length;++i){
_18a.push(_187.call(obj,arr[i]));
}
}
if(_188){
return _18a.join("");
}else{
return _18a;
}
},reduce:function(arr,_18d,obj,_18f){
var _190=_18d;
if(arguments.length==1){
dojo.debug("dojo.lang.reduce called with too few arguments!");
return false;
}else{
if(arguments.length==2){
_18f=_18d;
_190=arr.shift();
}else{
if(arguments.lenght==3){
if(dojo.lang.isFunction(obj)){
_18f=obj;
obj=null;
}
}else{
if(dojo.lang.isFunction(obj)){
var tmp=_18f;
_18f=obj;
obj=tmp;
}
}
}
}
var ob=obj?obj:dj_global;
dojo.lang.map(arr,function(val){
_190=_18f.call(ob,_190,val);
});
return _190;
},forEach:function(_194,_195,_196){
if(dojo.lang.isString(_194)){
_194=_194.split("");
}
if(Array.forEach){
Array.forEach(_194,_195,_196);
}else{
if(!_196){
_196=dj_global;
}
for(var i=0,l=_194.length;i<l;i++){
_195.call(_196,_194[i],i,_194);
}
}
},_everyOrSome:function(_199,arr,_19b,_19c){
if(dojo.lang.isString(arr)){
arr=arr.split("");
}
if(Array.every){
return Array[_199?"every":"some"](arr,_19b,_19c);
}else{
if(!_19c){
_19c=dj_global;
}
for(var i=0,l=arr.length;i<l;i++){
var _19f=_19b.call(_19c,arr[i],i,arr);
if(_199&&!_19f){
return false;
}else{
if((!_199)&&(_19f)){
return true;
}
}
}
return Boolean(_199);
}
},every:function(arr,_1a1,_1a2){
return this._everyOrSome(true,arr,_1a1,_1a2);
},some:function(arr,_1a4,_1a5){
return this._everyOrSome(false,arr,_1a4,_1a5);
},filter:function(arr,_1a7,_1a8){
var _1a9=dojo.lang.isString(arr);
if(_1a9){
arr=arr.split("");
}
var _1aa;
if(Array.filter){
_1aa=Array.filter(arr,_1a7,_1a8);
}else{
if(!_1a8){
if(arguments.length>=3){
dojo.raise("thisObject doesn't exist!");
}
_1a8=dj_global;
}
_1aa=[];
for(var i=0;i<arr.length;i++){
if(_1a7.call(_1a8,arr[i],i,arr)){
_1aa.push(arr[i]);
}
}
}
if(_1a9){
return _1aa.join("");
}else{
return _1aa;
}
},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(_1af,_1b0){
var _1b1=[];
for(var i=_1b0||0;i<_1af.length;i++){
_1b1.push(_1af[i]);
}
return _1b1;
}});
dojo.provide("dojo.lang.func");
dojo.lang.hitch=function(_1b3,_1b4){
var fcn=(dojo.lang.isString(_1b4)?_1b3[_1b4]:_1b4)||function(){
};
return function(){
return fcn.apply(_1b3,arguments);
};
};
dojo.lang.anonCtr=0;
dojo.lang.anon={};
dojo.lang.nameAnonFunc=function(_1b6,_1b7,_1b8){
var nso=(_1b7||dojo.lang.anon);
if((_1b8)||((dj_global["djConfig"])&&(djConfig["slowAnonFuncLookups"]==true))){
for(var x in nso){
try{
if(nso[x]===_1b6){
return x;
}
}
catch(e){
}
}
}
var ret="__"+dojo.lang.anonCtr++;
while(typeof nso[ret]!="undefined"){
ret="__"+dojo.lang.anonCtr++;
}
nso[ret]=_1b6;
return ret;
};
dojo.lang.forward=function(_1bc){
return function(){
return this[_1bc].apply(this,arguments);
};
};
dojo.lang.curry=function(_1bd,func){
var _1bf=[];
_1bd=_1bd||dj_global;
if(dojo.lang.isString(func)){
func=_1bd[func];
}
for(var x=2;x<arguments.length;x++){
_1bf.push(arguments[x]);
}
var _1c1=(func["__preJoinArity"]||func.length)-_1bf.length;
function gather(_1c2,_1c3,_1c4){
var _1c5=_1c4;
var _1c6=_1c3.slice(0);
for(var x=0;x<_1c2.length;x++){
_1c6.push(_1c2[x]);
}
_1c4=_1c4-_1c2.length;
if(_1c4<=0){
var res=func.apply(_1bd,_1c6);
_1c4=_1c5;
return res;
}else{
return function(){
return gather(arguments,_1c6,_1c4);
};
}
}
return gather([],_1bf,_1c1);
};
dojo.lang.curryArguments=function(_1c9,func,args,_1cc){
var _1cd=[];
var x=_1cc||0;
for(x=_1cc;x<args.length;x++){
_1cd.push(args[x]);
}
return dojo.lang.curry.apply(dojo.lang,[_1c9,func].concat(_1cd));
};
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,_1d3,_1d4){
if(!farr.length){
if(typeof _1d4=="function"){
_1d4();
}
return;
}
if((typeof _1d3=="undefined")&&(typeof cb=="number")){
_1d3=cb;
cb=function(){
};
}else{
if(!cb){
cb=function(){
};
if(!_1d3){
_1d3=0;
}
}
}
setTimeout(function(){
(farr.shift())();
cb();
dojo.lang.delayThese(farr,cb,_1d3,_1d4);
},_1d3);
};
dojo.provide("dojo.string.extras");
dojo.string.substituteParams=function(_1d5,hash){
var map=(typeof hash=="object")?hash:dojo.lang.toArray(arguments,1);
return _1d5.replace(/\%\{(\w+)\}/g,function(_1d8,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 _1db=str.split(" ");
for(var i=0;i<_1db.length;i++){
_1db[i]=_1db[i].charAt(0).toUpperCase()+_1db[i].substring(1);
}
return _1db.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 _1e0=escape(str);
var _1e1,re=/%u([0-9A-F]{4})/i;
while((_1e1=_1e0.match(re))){
var num=Number("0x"+_1e1[1]);
var _1e4=escape("&#"+num+";");
ret+=_1e0.substring(0,_1e1.index)+_1e4;
_1e0=_1e0.substring(_1e1.index+_1e1[0].length);
}
ret+=_1e0.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,_1e9){
str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
if(!_1e9){
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,_1f2){
if(_1f2){
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,_1f6,_1f7){
if(_1f7){
str=str.toLowerCase();
_1f6=_1f6.toLowerCase();
}
return str.indexOf(_1f6)==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,_1fd){
if(_1fd=="\n"){
text=text.replace(/\r\n/g,"\n");
text=text.replace(/\r/g,"\n");
}else{
if(_1fd=="\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,_1ff){
var _200=[];
for(var i=0,_202=0;i<str.length;i++){
if(str.charAt(i)=="\\"){
i++;
continue;
}
if(str.charAt(i)==_1ff){
_200.push(str.substring(_202,i));
_202=i+1;
}
}
_200.push(str.substr(_202));
return _200;
};
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 _204=dojo.doc();
do{
var id="dj_unique_"+(++arguments.callee._idIncrement);
}while(_204.getElementById(id));
return id;
};
dojo.dom.getUniqueId._idIncrement=0;
dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(_206,_207){
var node=_206.firstChild;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.nextSibling;
}
if(_207&&node&&node.tagName&&node.tagName.toLowerCase()!=_207.toLowerCase()){
node=dojo.dom.nextElement(node,_207);
}
return node;
};
dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_209,_20a){
var node=_209.lastChild;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.previousSibling;
}
if(_20a&&node&&node.tagName&&node.tagName.toLowerCase()!=_20a.toLowerCase()){
node=dojo.dom.prevElement(node,_20a);
}
return node;
};
dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(node,_20d){
if(!node){
return null;
}
do{
node=node.nextSibling;
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
if(node&&_20d&&_20d.toLowerCase()!=node.tagName.toLowerCase()){
return dojo.dom.nextElement(node,_20d);
}
return node;
};
dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(node,_20f){
if(!node){
return null;
}
if(_20f){
_20f=_20f.toLowerCase();
}
do{
node=node.previousSibling;
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
if(node&&_20f&&_20f.toLowerCase()!=node.tagName.toLowerCase()){
return dojo.dom.prevElement(node,_20f);
}
return node;
};
dojo.dom.moveChildren=function(_210,_211,trim){
var _213=0;
if(trim){
while(_210.hasChildNodes()&&_210.firstChild.nodeType==dojo.dom.TEXT_NODE){
_210.removeChild(_210.firstChild);
}
while(_210.hasChildNodes()&&_210.lastChild.nodeType==dojo.dom.TEXT_NODE){
_210.removeChild(_210.lastChild);
}
}
while(_210.hasChildNodes()){
_211.appendChild(_210.firstChild);
_213++;
}
return _213;
};
dojo.dom.copyChildren=function(_214,_215,trim){
var _217=_214.cloneNode(true);
return this.moveChildren(_217,_215,trim);
};
dojo.dom.replaceChildren=function(node,_219){
var _21a=[];
if(dojo.render.html.ie){
for(var i=0;i<node.childNodes.length;i++){
_21a.push(node.childNodes[i]);
}
}
dojo.dom.removeChildren(node);
node.appendChild(_219);
for(var i=0;i<_21a.length;i++){
dojo.dom.destroyNode(_21a[i]);
}
};
dojo.dom.removeChildren=function(node){
var _21d=node.childNodes.length;
while(node.hasChildNodes()){
dojo.dom.removeNode(node.firstChild);
}
return _21d;
};
dojo.dom.replaceNode=function(node,_21f){
return node.parentNode.replaceChild(_21f,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,_223,_224){
var _225=[];
var _226=(_223&&(_223 instanceof Function||typeof _223=="function"));
while(node){
if(!_226||_223(node)){
_225.push(node);
}
if(_224&&_225.length>0){
return _225[0];
}
node=node.parentNode;
}
if(_224){
return null;
}
return _225;
};
dojo.dom.getAncestorsByTag=function(node,tag,_229){
tag=tag.toLowerCase();
return dojo.dom.getAncestors(node,function(el){
return ((el.tagName)&&(el.tagName.toLowerCase()==tag));
},_229);
};
dojo.dom.getFirstAncestorByTag=function(node,tag){
return dojo.dom.getAncestorsByTag(node,tag,true);
};
dojo.dom.isDescendantOf=function(node,_22e,_22f){
if(_22f&&node){
node=node.parentNode;
}
while(node){
if(node==_22e){
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 _232=dojo.doc();
if(!dj_undef("ActiveXObject")){
var _233=["MSXML2","Microsoft","MSXML","MSXML3"];
for(var i=0;i<_233.length;i++){
try{
doc=new ActiveXObject(_233[i]+".XMLDOM");
}
catch(e){
}
if(doc){
break;
}
}
}else{
if((_232.implementation)&&(_232.implementation.createDocument)){
doc=_232.implementation.createDocument("","",null);
}
}
return doc;
};
dojo.dom.createDocumentFromText=function(str,_236){
if(!_236){
_236="text/xml";
}
if(!dj_undef("DOMParser")){
var _237=new DOMParser();
return _237.parseFromString(str,_236);
}else{
if(!dj_undef("ActiveXObject")){
var _238=dojo.dom.createDocument();
if(_238){
_238.async=false;
_238.loadXML(str);
return _238;
}else{
dojo.debug("toXml didn't work?");
}
}else{
var _239=dojo.doc();
if(_239.createElement){
var tmp=_239.createElement("xml");
tmp.innerHTML=str;
if(_239.implementation&&_239.implementation.createDocument){
var _23b=_239.implementation.createDocument("foo","",null);
for(var i=0;i<tmp.childNodes.length;i++){
_23b.importNode(tmp.childNodes.item(i),true);
}
return _23b;
}
return ((tmp.document)&&(tmp.document.firstChild?tmp.document.firstChild:tmp));
}
}
}
return null;
};
dojo.dom.prependChild=function(node,_23e){
if(_23e.firstChild){
_23e.insertBefore(node,_23e.firstChild);
}else{
_23e.appendChild(node);
}
return true;
};
dojo.dom.insertBefore=function(node,ref,_241){
if((_241!=true)&&(node===ref||node.nextSibling===ref)){
return false;
}
var _242=ref.parentNode;
_242.insertBefore(node,ref);
return true;
};
dojo.dom.insertAfter=function(node,ref,_245){
var pn=ref.parentNode;
if(ref==pn.lastChild){
if((_245!=true)&&(node===ref)){
return false;
}
pn.appendChild(node);
}else{
return this.insertBefore(node,ref.nextSibling,_245);
}
return true;
};
dojo.dom.insertAtPosition=function(node,ref,_249){
if((!node)||(!ref)||(!_249)){
return false;
}
switch(_249.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,_24b,_24c){
var _24d=_24b.childNodes;
if(!_24d.length||_24d.length==_24c){
_24b.appendChild(node);
return true;
}
if(_24c==0){
return dojo.dom.prependChild(node,_24b);
}
return dojo.dom.insertAfter(node,_24d[_24c-1]);
};
dojo.dom.textContent=function(node,text){
if(arguments.length>1){
var _250=dojo.doc();
dojo.dom.replaceChildren(node,_250.createTextNode(text));
return text;
}else{
if(node.textContent!=undefined){
return node.textContent;
}
var _251="";
if(node==null){
return _251;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
_251+=dojo.dom.textContent(node.childNodes[i]);
break;
case 3:
case 2:
case 4:
_251+=node.childNodes[i].nodeValue;
break;
default:
break;
}
}
return _251;
}
};
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,_257,_258,_259){
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(_257,_258,_259);
}else{
var _25a=elem.ownerDocument;
var _25b=_25a.createNode(2,_258,_257);
_25b.nodeValue=_259;
elem.setAttributeNode(_25b);
}
};
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 _260=args["back"]||args["backButton"]||args["handle"];
var tcb=function(_262){
if(window.location.hash!=""){
setTimeout("window.location.href = '"+hash+"';",1);
}
_260.apply(this,[_262]);
};
if(args["back"]){
args.back=tcb;
}else{
if(args["backButton"]){
args.backButton=tcb;
}else{
if(args["handle"]){
args.handle=tcb;
}
}
}
var _263=args["forward"]||args["forwardButton"]||args["handle"];
var tfw=function(_265){
if(window.location.hash!=""){
window.location.href=hash;
}
if(_263){
_263.apply(this,[_265]);
}
};
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,_268){
if(!dojo.render.html.opera){
var _269=this._getUrlQuery(_268.href);
if(_269==null){
if(this.historyStack.length==1){
this.handleBackButton();
}
return;
}
if(this.moveForward){
this.moveForward=false;
return;
}
if(this.historyStack.length>=2&&_269==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){
this.handleBackButton();
}else{
if(this.forwardStack.length>0&&_269==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){
this.handleForwardButton();
}
}
}
},handleBackButton:function(){
var _26a=this.historyStack.pop();
if(!_26a){
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(_26a);
},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 _271=url.split("?");
if(_271.length<2){
return null;
}else{
return _271[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 _274=false;
var _275=node.getElementsByTagName("input");
dojo.lang.forEach(_275,function(_276){
if(_274){
return;
}
if(_276.getAttribute("type")=="file"){
_274=true;
}
});
return _274;
};
dojo.io.formHasFile=function(_277){
return dojo.io.checkChildrenForFile(_277);
};
dojo.io.updateNode=function(node,_279){
node=dojo.byId(node);
var args=_279;
if(dojo.lang.isString(_279)){
args={url:_279};
}
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(_280,_281,_282){
if((!_280)||(!_280.tagName)||(!_280.tagName.toLowerCase()=="form")){
dojo.raise("Attempted to encode a non-form element.");
}
if(!_282){
_282=dojo.io.formFilter;
}
var enc=/utf/i.test(_281||"")?encodeURIComponent:dojo.string.encodeAscii;
var _284=[];
for(var i=0;i<_280.elements.length;i++){
var elm=_280.elements[i];
if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_282(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){
_284.push(name+"="+enc(elm.options[j].value));
}
}
}else{
if(dojo.lang.inArray(["radio","checkbox"],type)){
if(elm.checked){
_284.push(name+"="+enc(elm.value));
}
}else{
_284.push(name+"="+enc(elm.value));
}
}
}
var _28a=_280.getElementsByTagName("input");
for(var i=0;i<_28a.length;i++){
var _28b=_28a[i];
if(_28b.type.toLowerCase()=="image"&&_28b.form==_280&&_282(_28b)){
var name=enc(_28b.name);
_284.push(name+"="+enc(_28b.value));
_284.push(name+".x=0");
_284.push(name+".y=0");
}
}
return _284.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 _291=form.getElementsByTagName("input");
for(var i=0;i<_291.length;i++){
var _292=_291[i];
if(_292.type.toLowerCase()=="image"&&_292.form==form){
this.connect(_292,"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 _299=false;
if(node.disabled||!node.name){
_299=false;
}else{
if(dojo.lang.inArray(["submit","button","image"],type)){
if(!this.clickedButton){
this.clickedButton=node;
}
_299=node==this.clickedButton;
}else{
_299=!dojo.lang.inArray(["file","submit","reset","button"],type);
}
}
return _299;
},connect:function(_29a,_29b,_29c){
if(dojo.evalObjPath("dojo.event.connect")){
dojo.event.connect(_29a,_29b,this,_29c);
}else{
var fcn=dojo.lang.hitch(this,_29c);
_29a[_29b]=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 _29f=this;
var _2a0={};
this.useCache=false;
this.preventCache=false;
function getCacheKey(url,_2a2,_2a3){
return url+"|"+_2a2+"|"+_2a3.toLowerCase();
}
function addToCache(url,_2a5,_2a6,http){
_2a0[getCacheKey(url,_2a5,_2a6)]=http;
}
function getFromCache(url,_2a9,_2aa){
return _2a0[getCacheKey(url,_2a9,_2aa)];
}
this.clearCache=function(){
_2a0={};
};
function doLoad(_2ab,http,url,_2ae,_2af){
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(_2ab.method.toLowerCase()=="head"){
var _2b1=http.getAllResponseHeaders();
ret={};
ret.toString=function(){
return _2b1;
};
var _2b2=_2b1.split(/[\r\n]+/g);
for(var i=0;i<_2b2.length;i++){
var pair=_2b2[i].match(/^([^:]+)\s*:\s*(.+)$/i);
if(pair){
ret[pair[1]]=pair[2];
}
}
}else{
if(_2ab.mimetype=="text/javascript"){
try{
ret=dj_eval(http.responseText);
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=null;
}
}else{
if(_2ab.mimetype=="text/json"||_2ab.mimetype=="application/json"){
try{
ret=dj_eval("("+http.responseText+")");
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=false;
}
}else{
if((_2ab.mimetype=="application/xml")||(_2ab.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(_2af){
addToCache(url,_2ae,_2ab.method,http);
}
_2ab[(typeof _2ab.load=="function")?"load":"handle"]("load",ret,http,_2ab);
}else{
var _2b5=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText);
_2ab[(typeof _2ab.error=="function")?"error":"handle"]("error",_2b5,http,_2ab);
}
}
function setHeaders(http,_2b7){
if(_2b7["headers"]){
for(var _2b8 in _2b7["headers"]){
if(_2b8.toLowerCase()=="content-type"&&!_2b7["contentType"]){
_2b7["contentType"]=_2b7["headers"][_2b8];
}else{
http.setRequestHeader(_2b8,_2b7["headers"][_2b8]);
}
}
}
}
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&&!_29f._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 _2bc=new dojo.io.Error("XMLHttpTransport.watchInFlight Error: "+e);
tif.req[(typeof tif.req.error=="function")?"error":"handle"]("error",_2bc,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 _2bd=dojo.hostenv.getXmlhttpObject()?true:false;
this.canHandle=function(_2be){
return _2bd&&dojo.lang.inArray(["text/plain","text/html","application/xml","text/xml","text/javascript","text/json","application/json"],(_2be["mimetype"].toLowerCase()||""))&&!(_2be["formNode"]&&dojo.io.formHasFile(_2be["formNode"]));
};
this.multipartBoundary="45309FFF-BD65-4d50-99C9-36986896A96F";
this.bind=function(_2bf){
if(!_2bf["url"]){
if(!_2bf["formNode"]&&(_2bf["backButton"]||_2bf["back"]||_2bf["changeUrl"]||_2bf["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(_2bf);
return true;
}
}
var url=_2bf.url;
var _2c1="";
if(_2bf["formNode"]){
var ta=_2bf.formNode.getAttribute("action");
if((ta)&&(!_2bf["url"])){
url=ta;
}
var tp=_2bf.formNode.getAttribute("method");
if((tp)&&(!_2bf["method"])){
_2bf.method=tp;
}
_2c1+=dojo.io.encodeForm(_2bf.formNode,_2bf.encoding,_2bf["formFilter"]);
}
if(url.indexOf("#")>-1){
dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url);
url=url.split("#")[0];
}
if(_2bf["file"]){
_2bf.method="post";
}
if(!_2bf["method"]){
_2bf.method="get";
}
if(_2bf.method.toLowerCase()=="get"){
_2bf.multipart=false;
}else{
if(_2bf["file"]){
_2bf.multipart=true;
}else{
if(!_2bf["multipart"]){
_2bf.multipart=false;
}
}
}
if(_2bf["backButton"]||_2bf["back"]||_2bf["changeUrl"]){
dojo.undo.browser.addToHistory(_2bf);
}
var _2c4=_2bf["content"]||{};
if(_2bf.sendTransport){
_2c4["dojo.transport"]="xmlhttp";
}
do{
if(_2bf.postContent){
_2c1=_2bf.postContent;
break;
}
if(_2c4){
_2c1+=dojo.io.argsFromMap(_2c4,_2bf.encoding);
}
if(_2bf.method.toLowerCase()=="get"||!_2bf.multipart){
break;
}
var t=[];
if(_2c1.length){
var q=_2c1.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(_2bf.file){
if(dojo.lang.isArray(_2bf.file)){
for(var i=0;i<_2bf.file.length;++i){
var o=_2bf.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=_2bf.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+"--","");
_2c1=t.join("\r\n");
}
}while(false);
var _2ca=_2bf["sync"]?false:true;
var _2cb=_2bf["preventCache"]||(this.preventCache==true&&_2bf["preventCache"]!=false);
var _2cc=_2bf["useCache"]==true||(this.useCache==true&&_2bf["useCache"]!=false);
if(!_2cb&&_2cc){
var _2cd=getFromCache(url,_2c1,_2bf.method);
if(_2cd){
doLoad(_2bf,_2cd,url,_2c1,false);
return;
}
}
var http=dojo.hostenv.getXmlhttpObject(_2bf);
var _2cf=false;
if(_2ca){
var _2d0=this.inFlight.push({"req":_2bf,"http":http,"url":url,"query":_2c1,"useCache":_2cc,"startTime":_2bf.timeoutSeconds?(new Date()).getTime():0});
this.startWatchingInFlight();
}else{
_29f._blockAsync=true;
}
if(_2bf.method.toLowerCase()=="post"){
if(!_2bf.user){
http.open("POST",url,_2ca);
}else{
http.open("POST",url,_2ca,_2bf.user,_2bf.password);
}
setHeaders(http,_2bf);
http.setRequestHeader("Content-Type",_2bf.multipart?("multipart/form-data; boundary="+this.multipartBoundary):(_2bf.contentType||"application/x-www-form-urlencoded"));
try{
http.send(_2c1);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_2bf,{status:404},url,_2c1,_2cc);
}
}else{
var _2d1=url;
if(_2c1!=""){
_2d1+=(_2d1.indexOf("?")>-1?"&":"?")+_2c1;
}
if(_2cb){
_2d1+=(dojo.string.endsWithAny(_2d1,"?","&")?"":(_2d1.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf();
}
if(!_2bf.user){
http.open(_2bf.method.toUpperCase(),_2d1,_2ca);
}else{
http.open(_2bf.method.toUpperCase(),_2d1,_2ca,_2bf.user,_2bf.password);
}
setHeaders(http,_2bf);
try{
http.send(null);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_2bf,{status:404},url,_2c1,_2cc);
}
}
if(!_2ca){
doLoad(_2bf,http,url,_2c1,_2cc);
_29f._blockAsync=false;
}
_2bf.abort=function(){
try{
http._aborted=true;
}
catch(e){
}
return http.abort();
};
return;
};
dojo.io.transports.addTransport("XMLHTTPTransport");
};
}
dojo.provide("dojo.io.cookie");
dojo.io.cookie.setCookie=function(name,_2d3,days,path,_2d6,_2d7){
var _2d8=-1;
if((typeof days=="number")&&(days>=0)){
var d=new Date();
d.setTime(d.getTime()+(days*24*60*60*1000));
_2d8=d.toGMTString();
}
_2d3=escape(_2d3);
document.cookie=name+"="+_2d3+";"+(_2d8!=-1?" expires="+_2d8+";":"")+(path?"path="+path:"")+(_2d6?"; domain="+_2d6:"")+(_2d7?"; 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 _2dc=document.cookie.substring(idx+name.length+1);
var end=_2dc.indexOf(";");
if(end==-1){
end=_2dc.length;
}
_2dc=_2dc.substring(0,end);
_2dc=unescape(_2dc);
return _2dc;
};
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,_2e3,_2e4,_2e5){
if(arguments.length==5){
_2e5=_2e3;
_2e3=null;
_2e4=null;
}
var _2e6=[],_2e7,_2e8="";
if(!_2e5){
_2e7=dojo.io.cookie.getObjectCookie(name);
}
if(days>=0){
if(!_2e7){
_2e7={};
}
for(var prop in obj){
if(obj[prop]==null){
delete _2e7[prop];
}else{
if((typeof obj[prop]=="string")||(typeof obj[prop]=="number")){
_2e7[prop]=obj[prop];
}
}
}
prop=null;
for(var prop in _2e7){
_2e6.push(escape(prop)+"="+escape(_2e7[prop]));
}
_2e8=_2e6.join("&");
}
dojo.io.cookie.setCookie(name,_2e8,days,path,_2e3,_2e4);
};
dojo.io.cookie.getObjectCookie=function(name){
var _2eb=null,_2ec=dojo.io.cookie.getCookie(name);
if(_2ec){
_2eb={};
var _2ed=_2ec.split("&");
for(var i=0;i<_2ed.length;i++){
var pair=_2ed[i].split("=");
var _2f0=pair[1];
if(isNaN(_2f0)){
_2f0=unescape(pair[1]);
}
_2eb[unescape(pair[0])]=_2f0;
}
}
return _2eb;
};
dojo.io.cookie.isSupported=function(){
if(typeof navigator.cookieEnabled!="boolean"){
dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null);
var _2f1=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__");
navigator.cookieEnabled=(_2f1=="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 _2f5=getTagName(node);
if(!_2f5){
return "";
}
if((dojo.widget)&&(dojo.widget.tags[_2f5])){
return _2f5;
}
var p=_2f5.indexOf(":");
if(p>=0){
return _2f5;
}
if(_2f5.substr(0,5)=="dojo:"){
return _2f5;
}
if(dojo.render.html.capable&&dojo.render.html.ie&&node.scopeName!="HTML"){
return node.scopeName.toLowerCase()+":"+_2f5;
}
if(_2f5.substr(0,4)=="dojo"){
return "dojo:"+_2f5.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 _2f8=node.className||node.getAttribute("class");
if((_2f8)&&(_2f8.indexOf)&&(_2f8.indexOf("dojo-")!=-1)){
var _2f9=_2f8.split(" ");
for(var x=0,c=_2f9.length;x<c;x++){
if(_2f9[x].slice(0,5)=="dojo-"){
return "dojo:"+_2f9[x].substr(5).toLowerCase();
}
}
}
}
return "";
}
this.parseElement=function(node,_2fd,_2fe,_2ff){
var _300=getTagName(node);
if(isIE&&_300.indexOf("/")==0){
return null;
}
try{
var attr=node.getAttribute("parseWidgets");
if(attr&&attr.toLowerCase()=="false"){
return {};
}
}
catch(e){
}
var _302=true;
if(_2fe){
var _303=getDojoTagName(node);
_300=_303||_300;
_302=Boolean(_303);
}
var _304={};
_304[_300]=[];
var pos=_300.indexOf(":");
if(pos>0){
var ns=_300.substring(0,pos);
_304["ns"]=ns;
if((dojo.ns)&&(!dojo.ns.allow(ns))){
_302=false;
}
}
if(_302){
var _307=this.parseAttributes(node);
for(var attr in _307){
if((!_304[_300][attr])||(typeof _304[_300][attr]!="array")){
_304[_300][attr]=[];
}
_304[_300][attr].push(_307[attr]);
}
_304[_300].nodeRef=node;
_304.tagName=_300;
_304.index=_2ff||0;
}
var _308=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(!_304[ctn]){
_304[ctn]=[];
}
_304[ctn].push(this.parseElement(tcn,true,_2fe,_308));
if((tcn.childNodes.length==1)&&(tcn.childNodes.item(0).nodeType==dojo.dom.TEXT_NODE)){
_304[ctn][_304[ctn].length-1].value=tcn.childNodes.item(0).nodeValue;
}
_308++;
break;
case dojo.dom.TEXT_NODE:
if(node.childNodes.length==1){
_304[_300].push({value:node.childNodes.item(0).nodeValue});
}
break;
default:
break;
}
}
return _304;
};
this.parseAttributes=function(node){
var _30d={};
var atts=node.attributes;
var _30f,i=0;
while((_30f=atts[i++])){
if(isIE){
if(!_30f){
continue;
}
if((typeof _30f=="object")&&(typeof _30f.nodeValue=="undefined")||(_30f.nodeValue==null)||(_30f.nodeValue=="")){
continue;
}
}
var nn=_30f.nodeName.split(":");
nn=(nn.length==2)?nn[1]:_30f.nodeName;
_30d[nn]={value:_30f.nodeValue};
}
return _30d;
};
};
dojo.provide("dojo.lang.declare");
dojo.lang.declare=function(_312,_313,init,_315){
if((dojo.lang.isFunction(_315))||((!_315)&&(!dojo.lang.isFunction(init)))){
var temp=_315;
_315=init;
init=temp;
}
var _317=[];
if(dojo.lang.isArray(_313)){
_317=_313;
_313=_317.shift();
}
if(!init){
init=dojo.evalObjPath(_312,false);
if((init)&&(!dojo.lang.isFunction(init))){
init=null;
}
}
var ctor=dojo.lang.declare._makeConstructor();
var scp=(_313?_313.prototype:null);
if(scp){
scp.prototyping=true;
ctor.prototype=new _313();
scp.prototyping=false;
}
ctor.superclass=scp;
ctor.mixins=_317;
for(var i=0,l=_317.length;i<l;i++){
dojo.lang.extend(ctor,_317[i].prototype);
}
ctor.prototype.initializer=null;
ctor.prototype.declaredClass=_312;
if(dojo.lang.isArray(_315)){
dojo.lang.extend.apply(dojo.lang,[ctor].concat(_315));
}else{
dojo.lang.extend(ctor,(_315)||{});
}
dojo.lang.extend(ctor,dojo.lang.declare._common);
ctor.prototype.constructor=ctor;
ctor.prototype.initializer=(ctor.prototype.initializer)||(init)||(function(){
});
var _31c=dojo.parseObjPath(_312,null,true);
_31c.obj[_31c.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(_322,_323,args){
var _325,_326=this.___proto;
this.___proto=_322;
try{
_325=_322[_323].apply(this,(args||[]));
}
catch(e){
throw e;
}
finally{
this.___proto=_326;
}
return _325;
},_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,_32d,_32e,_32f){
if(!_32f||!this.namespaces[name]){
this.namespaces[name]=new dojo.ns.Ns(name,_32d,_32e);
}
},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,_336,_337){
this.name=name;
this.module=_336;
this.resolver=_337;
this._loaded=[];
this._failed=[];
};
dojo.ns.Ns.prototype.resolve=function(name,_339,_33a){
if(!this.resolver||djConfig["skipAutoRequire"]){
return false;
}
var _33b=this.resolver(name,_339);
if((_33b)&&(!this._loaded[_33b])&&(!this._failed[_33b])){
var req=dojo.require;
req(_33b,false,true);
if(dojo.hostenv.findModule(_33b,false)){
this._loaded[_33b]=true;
}else{
if(!_33a){
dojo.raise("dojo.ns.Ns.resolve: module '"+_33b+"' not found after loading via namespace '"+this.name+"'");
}
this._failed[_33b]=true;
}
}
return Boolean(this._loaded[_33b]);
};
dojo.registerNamespace=function(name,_33e,_33f){
dojo.ns.register.apply(dojo.ns,arguments);
};
dojo.registerNamespaceResolver=function(name,_341){
var n=dojo.ns.namespaces[name];
if(n){
n.resolver=_341;
}
};
dojo.registerNamespaceManifest=function(_343,path,name,_346,_347){
dojo.registerModulePath(name,path);
dojo.registerNamespace(name,_346,_347);
};
dojo.registerNamespace("dojo","dojo.widget");
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,_349){
var dl=dojo.lang;
var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(args.length>2)?args[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false};
switch(args.length){
case 0:
return;
case 1:
return;
case 2:
ao.srcFunc=args[0];
ao.adviceFunc=args[1];
break;
case 3:
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=args[0];
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
}else{
if((dl.isString(args[1]))&&(dl.isString(args[2]))){
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
}else{
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){
ao.adviceType="after";
ao.srcObj=args[0];
ao.srcFunc=args[1];
var _34c=dl.nameAnonFunc(args[2],ao.adviceObj,_349);
ao.adviceFunc=_34c;
}else{
if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=dj_global;
var _34c=dl.nameAnonFunc(args[0],ao.srcObj,_349);
ao.srcFunc=_34c;
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 _34c=dl.nameAnonFunc(args[1],dj_global,_349);
ao.srcFunc=_34c;
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 _34c=dl.nameAnonFunc(args[3],dj_global,_349);
ao.adviceObj=dj_global;
ao.adviceFunc=_34c;
}else{
if(dl.isObject(args[1])){
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=dj_global;
ao.adviceFunc=args[3];
}else{
if(dl.isObject(args[2])){
ao.srcObj=dj_global;
ao.srcFunc=args[1];
ao.adviceObj=args[2];
ao.adviceFunc=args[3];
}else{
ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global;
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
ao.aroundFunc=args[3];
}
}
}
}
}
}
break;
case 6:
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=args[3];
ao.adviceFunc=args[4];
ao.aroundFunc=args[5];
ao.aroundObj=dj_global;
break;
default:
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=args[3];
ao.adviceFunc=args[4];
ao.aroundObj=args[5];
ao.aroundFunc=args[6];
ao.once=args[7];
ao.delay=args[8];
ao.rate=args[9];
ao.adviceMsg=args[10];
break;
}
if(dl.isFunction(ao.aroundFunc)){
var _34c=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,_349);
ao.aroundFunc=_34c;
}
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 _34e={};
for(var x in ao){
_34e[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);
}
_34e.srcObj=src;
mjps.push(dojo.event.connect.call(dojo.event,_34e));
});
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 _356;
if((arguments.length==1)&&(typeof a1=="object")){
_356=a1;
}else{
_356={srcObj:a1,srcFunc:a2};
}
_356.adviceFunc=function(){
var _357=[];
for(var x=0;x<arguments.length;x++){
_357.push(arguments[x]);
}
dojo.debug("("+_356.srcObj+")."+_356.srcFunc,":",_357.join(", "));
};
this.kwConnect(_356);
};
this.connectBefore=function(){
var args=["before"];
for(var i=0;i<arguments.length;i++){
args.push(arguments[i]);
}
return this.connect.apply(this,args);
};
this.connectAround=function(){
var args=["around"];
for(var i=0;i<arguments.length;i++){
args.push(arguments[i]);
}
return this.connect.apply(this,args);
};
this.connectOnce=function(){
var ao=interpolateArgs(arguments,true);
ao.once=true;
return this.connect(ao);
};
this._kwConnectImpl=function(_35e,_35f){
var fn=(_35f)?"disconnect":"connect";
if(typeof _35e["srcFunc"]=="function"){
_35e.srcObj=_35e["srcObj"]||dj_global;
var _361=dojo.lang.nameAnonFunc(_35e.srcFunc,_35e.srcObj,true);
_35e.srcFunc=_361;
}
if(typeof _35e["adviceFunc"]=="function"){
_35e.adviceObj=_35e["adviceObj"]||dj_global;
var _361=dojo.lang.nameAnonFunc(_35e.adviceFunc,_35e.adviceObj,true);
_35e.adviceFunc=_361;
}
_35e.srcObj=_35e["srcObj"]||dj_global;
_35e.adviceObj=_35e["adviceObj"]||_35e["targetObj"]||dj_global;
_35e.adviceFunc=_35e["adviceFunc"]||_35e["targetFunc"];
return dojo.event[fn](_35e);
};
this.kwConnect=function(_362){
return this._kwConnectImpl(_362,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(_365){
return this._kwConnectImpl(_365,true);
};
};
dojo.event.MethodInvocation=function(_366,obj,args){
this.jp_=_366;
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,_36e){
this.object=obj||dj_global;
this.methodname=_36e;
this.methodfunc=this.object[_36e];
this.squelch=false;
};
dojo.event.MethodJoinPoint.getForMethod=function(obj,_370){
if(!obj){
obj=dj_global;
}
if(!obj[_370]){
obj[_370]=function(){
};
if(!obj[_370]){
dojo.raise("Cannot set do-nothing method on that object "+_370);
}
}else{
if((!dojo.lang.isFunction(obj[_370]))&&(!dojo.lang.isAlien(obj[_370]))){
return null;
}
}
var _371=_370+"$joinpoint";
var _372=_370+"$joinpoint$method";
var _373=obj[_371];
if(!_373){
var _374=false;
if(dojo.event["browser"]){
if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){
_374=true;
dojo.event.browser.addClobberNodeAttrs(obj,[_371,_372,_370]);
}
}
var _375=obj[_370].length;
obj[_372]=obj[_370];
_373=obj[_371]=new dojo.event.MethodJoinPoint(obj,_372);
obj[_370]=function(){
var args=[];
if((_374)&&(!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)&&(_374)&&(dojo.event.browser.isEvent(arguments[x]))){
args.push(dojo.event.browser.fixEvent(arguments[x],this));
}else{
args.push(arguments[x]);
}
}
}
return _373.run.apply(_373,args);
};
obj[_370].__preJoinArity=_375;
}
return _373;
};
dojo.lang.extend(dojo.event.MethodJoinPoint,{unintercept:function(){
this.object[this.methodname]=this.methodfunc;
this.before=[];
this.after=[];
this.around=[];
},disconnect:dojo.lang.forward("unintercept"),run:function(){
var obj=this.object||dj_global;
var args=arguments;
var _37b=[];
for(var x=0;x<args.length;x++){
_37b[x]=args[x];
}
var _37d=function(marr){
if(!marr){
dojo.debug("Null argument to unrollAdvice()");
return;
}
var _37f=marr[0]||dj_global;
var _380=marr[1];
if(!_37f[_380]){
dojo.raise("function \""+_380+"\" does not exist on \""+_37f+"\"");
}
var _381=marr[2]||dj_global;
var _382=marr[3];
var msg=marr[6];
var _384;
var to={args:[],jp_:this,object:obj,proceed:function(){
return _37f[_380].apply(_37f,to.args);
}};
to.args=_37b;
var _386=parseInt(marr[4]);
var _387=((!isNaN(_386))&&(marr[4]!==null)&&(typeof marr[4]!="undefined"));
if(marr[5]){
var rate=parseInt(marr[5]);
var cur=new Date();
var _38a=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;
_37d(mcpy);
},tod);
}
return;
}else{
marr.last=cur;
}
}
if(_382){
_381[_382].call(_381,to);
}else{
if((_387)&&((dojo.render.html)||(dojo.render.svg))){
dj_global["setTimeout"](function(){
if(msg){
_37f[_380].call(_37f,to);
}else{
_37f[_380].apply(_37f,args);
}
},_386);
}else{
if(msg){
_37f[_380].call(_37f,to);
}else{
_37f[_380].apply(_37f,args);
}
}
}
};
var _38d=function(){
if(this.squelch){
try{
return _37d.apply(this,arguments);
}
catch(e){
dojo.debug(e);
}
}else{
return _37d.apply(this,arguments);
}
};
if((this["before"])&&(this.before.length>0)){
dojo.lang.forEach(this.before.concat(new Array()),_38d);
}
var _38e;
try{
if((this["around"])&&(this.around.length>0)){
var mi=new dojo.event.MethodInvocation(this,obj,args);
_38e=mi.proceed();
}else{
if(this.methodfunc){
_38e=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()),_38d);
}
return (this.methodfunc)?_38e:null;
},getArr:function(kind){
var type="after";
if((typeof kind=="string")&&(kind.indexOf("before")!=-1)){
type="before";
}else{
if(kind=="around"){
type="around";
}
}
if(!this[type]){
this[type]=[];
}
return this[type];
},kwAddAdvice:function(args){
this.addAdvice(args["adviceObj"],args["adviceFunc"],args["aroundObj"],args["aroundFunc"],args["adviceType"],args["precedence"],args["once"],args["delay"],args["rate"],args["adviceMsg"]);
},addAdvice:function(_393,_394,_395,_396,_397,_398,once,_39a,rate,_39c){
var arr=this.getArr(_397);
if(!arr){
dojo.raise("bad this: "+this);
}
var ao=[_393,_394,_395,_396,_39a,rate,_39c];
if(once){
if(this.hasAdvice(_393,_394,_397,arr)>=0){
return;
}
}
if(_398=="first"){
arr.unshift(ao);
}else{
arr.push(ao);
}
},hasAdvice:function(_39f,_3a0,_3a1,arr){
if(!arr){
arr=this.getArr(_3a1);
}
var ind=-1;
for(var x=0;x<arr.length;x++){
var aao=(typeof _3a0=="object")?(new String(_3a0)).toString():_3a0;
var a1o=(typeof arr[x][1]=="object")?(new String(arr[x][1])).toString():arr[x][1];
if((arr[x][0]==_39f)&&(a1o==aao)){
ind=x;
}
}
return ind;
},removeAdvice:function(_3a7,_3a8,_3a9,once){
var arr=this.getArr(_3a9);
var ind=this.hasAdvice(_3a7,_3a8,_3a9,arr);
if(ind==-1){
return false;
}
while(ind!=-1){
arr.splice(ind,1);
if(once){
break;
}
ind=this.hasAdvice(_3a7,_3a8,_3a9,arr);
}
return true;
}});
dojo.provide("dojo.event.topic");
dojo.event.topic=new function(){
this.topics={};
this.getTopic=function(_3ad){
if(!this.topics[_3ad]){
this.topics[_3ad]=new this.TopicImpl(_3ad);
}
return this.topics[_3ad];
};
this.registerPublisher=function(_3ae,obj,_3b0){
var _3ae=this.getTopic(_3ae);
_3ae.registerPublisher(obj,_3b0);
};
this.subscribe=function(_3b1,obj,_3b3){
var _3b1=this.getTopic(_3b1);
_3b1.subscribe(obj,_3b3);
};
this.unsubscribe=function(_3b4,obj,_3b6){
var _3b4=this.getTopic(_3b4);
_3b4.unsubscribe(obj,_3b6);
};
this.destroy=function(_3b7){
this.getTopic(_3b7).destroy();
delete this.topics[_3b7];
};
this.publishApply=function(_3b8,args){
var _3b8=this.getTopic(_3b8);
_3b8.sendMessage.apply(_3b8,args);
};
this.publish=function(_3ba,_3bb){
var _3ba=this.getTopic(_3ba);
var args=[];
for(var x=1;x<arguments.length;x++){
args.push(arguments[x]);
}
_3ba.sendMessage.apply(_3ba,args);
};
};
dojo.event.topic.TopicImpl=function(_3be){
this.topicName=_3be;
this.subscribe=function(_3bf,_3c0){
var tf=_3c0||_3bf;
var to=(!_3c0)?dj_global:_3bf;
return dojo.event.kwConnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
};
this.unsubscribe=function(_3c3,_3c4){
var tf=(!_3c4)?_3c3:_3c4;
var to=(!_3c4)?null:_3c3;
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(_3c7){
this._getJoinPoint().squelch=_3c7;
};
this.destroy=function(){
this._getJoinPoint().disconnect();
};
this.registerPublisher=function(_3c8,_3c9){
dojo.event.connect(_3c8,_3c9,this,"sendMessage");
};
this.sendMessage=function(_3ca){
};
};
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(_3cd){
var na;
var tna;
if(_3cd){
tna=_3cd.all||_3cd.getElementsByTagName("*");
na=[_3cd];
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 _3d1={};
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 _3d6=0;
this.normalizedEventName=function(_3d7){
switch(_3d7){
case "CheckboxStateChange":
case "DOMAttrModified":
case "DOMMenuItemActive":
case "DOMMenuItemInactive":
case "DOMMouseScroll":
case "DOMNodeInserted":
case "DOMNodeRemoved":
case "RadioStateChange":
return _3d7;
break;
default:
return _3d7.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,_3db){
if(!dojo.render.html.ie){
return;
}
this.addClobberNode(node);
for(var x=0;x<_3db.length;x++){
node.__clobberAttrs__.push(_3db[x]);
}
};
this.removeListener=function(node,_3de,fp,_3e0){
if(!_3e0){
var _3e0=false;
}
_3de=dojo.event.browser.normalizedEventName(_3de);
if((_3de=="onkey")||(_3de=="key")){
if(dojo.render.html.ie){
this.removeListener(node,"onkeydown",fp,_3e0);
}
_3de="onkeypress";
}
if(_3de.substr(0,2)=="on"){
_3de=_3de.substr(2);
}
if(node.removeEventListener){
node.removeEventListener(_3de,fp,_3e0);
}
};
this.addListener=function(node,_3e2,fp,_3e4,_3e5){
if(!node){
return;
}
if(!_3e4){
var _3e4=false;
}
_3e2=dojo.event.browser.normalizedEventName(_3e2);
if((_3e2=="onkey")||(_3e2=="key")){
if(dojo.render.html.ie){
this.addListener(node,"onkeydown",fp,_3e4,_3e5);
}
_3e2="onkeypress";
}
if(_3e2.substr(0,2)!="on"){
_3e2="on"+_3e2;
}
if(!_3e5){
var _3e6=function(evt){
if(!evt){
evt=window.event;
}
var ret=fp(dojo.event.browser.fixEvent(evt,this));
if(_3e4){
dojo.event.browser.stopEvent(evt);
}
return ret;
};
}else{
_3e6=fp;
}
if(node.addEventListener){
node.addEventListener(_3e2.substr(2),_3e6,_3e4);
return _3e6;
}else{
if(typeof node[_3e2]=="function"){
var _3e9=node[_3e2];
node[_3e2]=function(e){
_3e9(e);
return _3e6(e);
};
}else{
node[_3e2]=_3e6;
}
if(dojo.render.html.ie){
this.addClobberNodeAttrs(node,[_3e2]);
}
return _3e6;
}
};
this.isEvent=function(obj){
return (typeof obj!="undefined")&&(obj)&&(typeof Event!="undefined")&&(obj.eventPhase);
};
this.currentEvent=null;
this.callListener=function(_3ec,_3ed){
if(typeof _3ec!="function"){
dojo.raise("listener not a function: "+_3ec);
}
dojo.event.browser.currentEvent.currentTarget=_3ed;
return _3ec.call(_3ed,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,_3f0){
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 _3f2=evt.keyCode;
if(_3f2>=65&&_3f2<=90&&evt.shiftKey==false){
_3f2+=32;
}
if(_3f2>=1&&_3f2<=26&&evt.ctrlKey){
_3f2+=96;
}
evt.key=String.fromCharCode(_3f2);
}
}
}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 _3f2=evt.which;
if((evt.ctrlKey||evt.altKey||evt.metaKey)&&(evt.which>=65&&evt.which<=90&&evt.shiftKey==false)){
_3f2+=32;
}
evt.key=String.fromCharCode(_3f2);
}
}
}
}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=(_3f0?_3f0: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 _3f4=((dojo.render.html.ie55)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;
if(!evt.pageX){
evt.pageX=evt.clientX+(_3f4.scrollLeft||0);
}
if(!evt.pageY){
evt.pageY=evt.clientY+(_3f4.scrollTop||0);
}
if(evt.type=="mouseover"){
evt.relatedTarget=evt.fromElement;
}
if(evt.type=="mouseout"){
evt.relatedTarget=evt.toElement;
}
this.currentEvent=evt;
evt.callListener=this.callListener;
evt.stopPropagation=this._stopPropagation;
evt.preventDefault=this._preventDefault;
}
return evt;
};
this.stopEvent=function(evt){
if(window.event){
evt.cancelBubble=true;
evt.returnValue=false;
}else{
evt.preventDefault();
evt.stopPropagation();
}
};
};
dojo.provide("dojo.event.*");
dojo.provide("dojo.widget.Manager");
dojo.widget.manager=new function(){
this.widgets=[];
this.widgetIds=[];
this.topWidgets={};
var _3f6={};
var _3f7=[];
this.getUniqueId=function(_3f8){
var _3f9;
do{
_3f9=_3f8+"_"+(_3f6[_3f8]!=undefined?++_3f6[_3f8]:_3f6[_3f8]=0);
}while(this.getWidgetById(_3f9));
return _3f9;
};
this.add=function(_3fa){
this.widgets.push(_3fa);
if(!_3fa.extraArgs["id"]){
_3fa.extraArgs["id"]=_3fa.extraArgs["ID"];
}
if(_3fa.widgetId==""){
if(_3fa["id"]){
_3fa.widgetId=_3fa["id"];
}else{
if(_3fa.extraArgs["id"]){
_3fa.widgetId=_3fa.extraArgs["id"];
}else{
_3fa.widgetId=this.getUniqueId(_3fa.ns+"_"+_3fa.widgetType);
}
}
}
if(this.widgetIds[_3fa.widgetId]){
dojo.debug("widget ID collision on ID: "+_3fa.widgetId);
}
this.widgetIds[_3fa.widgetId]=_3fa;
};
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(_3fc){
if(dojo.lang.isNumber(_3fc)){
var tw=this.widgets[_3fc].widgetId;
delete this.widgetIds[tw];
this.widgets.splice(_3fc,1);
}else{
this.removeById(_3fc);
}
};
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 _403=(type.indexOf(":")<0?function(x){
return x.widgetType.toLowerCase();
}:function(x){
return x.getNamespacedType();
});
var ret=[];
dojo.lang.forEach(this.widgets,function(x){
if(_403(x)==lt){
ret.push(x);
}
});
return ret;
};
this.getWidgetsByFilter=function(_408,_409){
var ret=[];
dojo.lang.every(this.widgets,function(x){
if(_408(x)){
ret.push(x);
if(_409){
return false;
}
}
return true;
});
return (_409?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 _40f={};
var _410=["dojo.widget"];
for(var i=0;i<_410.length;i++){
_410[_410[i]]=true;
}
this.registerWidgetPackage=function(_412){
if(!_410[_412]){
_410[_412]=true;
_410.push(_412);
}
};
this.getWidgetPackageList=function(){
return dojo.lang.map(_410,function(elt){
return (elt!==true?elt:undefined);
});
};
this.getImplementation=function(_414,_415,_416,ns){
var impl=this.getImplementationName(_414,ns);
if(impl){
var ret=_415?new impl(_415):new impl();
return ret;
}
};
function buildPrefixCache(){
for(var _41a in dojo.render){
if(dojo.render[_41a]["capable"]===true){
var _41b=dojo.render[_41a].prefixes;
for(var i=0;i<_41b.length;i++){
_3f7.push(_41b[i].toLowerCase());
}
}
}
}
var _41d=function(_41e,_41f){
if(!_41f){
return null;
}
for(var i=0,l=_3f7.length,_422;i<=l;i++){
_422=(i<l?_41f[_3f7[i]]:_41f);
if(!_422){
continue;
}
for(var name in _422){
if(name.toLowerCase()==_41e){
return _422[name];
}
}
}
return null;
};
var _424=function(_425,_426){
var _427=dojo.evalObjPath(_426,false);
return (_427?_41d(_425,_427):null);
};
this.getImplementationName=function(_428,ns){
var _42a=_428.toLowerCase();
ns=ns||"dojo";
var imps=_40f[ns]||(_40f[ns]={});
var impl=imps[_42a];
if(impl){
return impl;
}
if(!_3f7.length){
buildPrefixCache();
}
var _42d=dojo.ns.get(ns);
if(!_42d){
dojo.ns.register(ns,ns+".widget");
_42d=dojo.ns.get(ns);
}
if(_42d){
_42d.resolve(_428);
}
impl=_424(_42a,_42d.module);
if(impl){
return (imps[_42a]=impl);
}
_42d=dojo.ns.require(ns);
if((_42d)&&(_42d.resolver)){
_42d.resolve(_428);
impl=_424(_42a,_42d.module);
if(impl){
return (imps[_42a]=impl);
}
}
dojo.deprecated("dojo.widget.Manager.getImplementationName","Could not locate widget implementation for \""+_428+"\" in \""+_42d.module+"\" registered to namespace \""+_42d.name+"\". "+"Developers must specify correct namespaces for all non-Dojo widgets","0.5");
for(var i=0;i<_410.length;i++){
impl=_424(_42a,_410[i]);
if(impl){
return (imps[_42a]=impl);
}
}
throw new Error("Could not locate widget implementation for \""+_428+"\" in \""+_42d.module+"\" registered to namespace \""+_42d.name+"\"");
};
this.resizing=false;
this.onWindowResized=function(){
if(this.resizing){
return;
}
try{
this.resizing=true;
for(var id in this.topWidgets){
var _430=this.topWidgets[id];
if(_430.checkSize){
_430.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(_435,_436){
dw[(_436||_435)]=h(_435);
};
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 _438=dwm.getAllWidgets.apply(dwm,arguments);
if(arguments.length>0){
return _438[n];
}
return _438;
};
g("registerWidgetPackage");
g("getImplementation","getWidgetImplementation");
g("getImplementationName","getWidgetImplementationName");
dw.widgets=dwm.widgets;
dw.widgetIds=dwm.widgetIds;
dw.root=dwm.root;
})();
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(_43a,uri){
var loc=dojo.hostenv.getModuleSymbols(_43a).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 _43f=new dojo.uri.Uri(arguments[i].toString());
var _440=new dojo.uri.Uri(uri.toString());
if((_43f.path=="")&&(_43f.scheme==null)&&(_43f.authority==null)&&(_43f.query==null)){
if(_43f.fragment!=null){
_440.fragment=_43f.fragment;
}
_43f=_440;
}else{
if(_43f.scheme==null){
_43f.scheme=_440.scheme;
if(_43f.authority==null){
_43f.authority=_440.authority;
if(_43f.path.charAt(0)!="/"){
var path=_440.path.substring(0,_440.path.lastIndexOf("/")+1)+_43f.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;
}
}
}
}
_43f.path=segs.join("/");
}
}
}
}
uri="";
if(_43f.scheme!=null){
uri+=_43f.scheme+":";
}
if(_43f.authority!=null){
uri+="//"+_43f.authority;
}
uri+=_43f.path;
if(_43f.query!=null){
uri+="?"+_43f.query;
}
if(_43f.fragment!=null){
uri+="#"+_43f.fragment;
}
}
this.uri=uri.toString();
var _444="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";
var r=this.uri.match(new RegExp(_444));
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){
_444="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$";
r=this.authority.match(new RegExp(_444));
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.uri.*");
dojo.provide("dojo.html.common");
dojo.lang.mixin(dojo.html,dojo.dom);
dojo.html.body=function(){
dojo.deprecated("dojo.html.body() moved to dojo.body()","0.5");
return dojo.body();
};
dojo.html.getEventTarget=function(evt){
if(!evt){
evt=dojo.global().event||{};
}
var t=(evt.srcElement?evt.srcElement:(evt.target?evt.target:null));
while((t)&&(t.nodeType!=1)){
t=t.parentNode;
}
return t;
};
dojo.html.getViewport=function(){
var _448=dojo.global();
var _449=dojo.doc();
var w=0;
var h=0;
if(dojo.render.html.mozilla){
w=_449.documentElement.clientWidth;
h=_448.innerHeight;
}else{
if(!dojo.render.html.opera&&_448.innerWidth){
w=_448.innerWidth;
h=_448.innerHeight;
}else{
if(!dojo.render.html.opera&&dojo.exists(_449,"documentElement.clientWidth")){
var w2=_449.documentElement.clientWidth;
if(!w||w2&&w2<w){
w=w2;
}
h=_449.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 _44d=dojo.global();
var _44e=dojo.doc();
var top=_44d.pageYOffset||_44e.documentElement.scrollTop||dojo.body().scrollTop||0;
var left=_44d.pageXOffset||_44e.documentElement.scrollLeft||dojo.body().scrollLeft||0;
return {top:top,left:left,offset:{x:left,y:top}};
};
dojo.html.getParentByType=function(node,type){
var _453=dojo.doc();
var _454=dojo.byId(node);
type=type.toLowerCase();
while((_454)&&(_454.nodeName.toLowerCase()!=type)){
if(_454==(_453["body"]||_453["documentElement"])){
return null;
}
_454=_454.parentNode;
}
return _454;
};
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 _45c={x:0,y:0};
if(e.pageX||e.pageY){
_45c.x=e.pageX;
_45c.y=e.pageY;
}else{
var de=dojo.doc().documentElement;
var db=dojo.body();
_45c.x=e.clientX+((de||db)["scrollLeft"])-((de||db)["clientLeft"]);
_45c.y=e.clientY+((de||db)["scrollTop"])-((de||db)["clientTop"]);
}
return _45c;
};
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 _461=dojo.doc().createElement("script");
_461.src="javascript:'dojo.html.createExternalElement=function(doc, tag){ return doc.createElement(tag); }'";
dojo.doc().getElementsByTagName("head")[0].appendChild(_461);
})();
}
}else{
dojo.html.createExternalElement=function(doc,tag){
return doc.createElement(tag);
};
}
dojo.html._callDeprecated=function(_464,_465,args,_467,_468){
dojo.deprecated("dojo.html."+_464,"replaced by dojo.html."+_465+"("+(_467?"node, {"+_467+": "+_467+"}":"")+")"+(_468?"."+_468:""),"0.5");
var _469=[];
if(_467){
var _46a={};
_46a[_467]=args[1];
_469.push(args[0]);
_469.push(_46a);
}else{
_469=args;
}
var ret=dojo.html[_465].apply(dojo.html,args);
if(_468){
return ret[_468];
}else{
return ret;
}
};
dojo.html.getViewportWidth=function(){
return dojo.html._callDeprecated("getViewportWidth","getViewport",arguments,null,"width");
};
dojo.html.getViewportHeight=function(){
return dojo.html._callDeprecated("getViewportHeight","getViewport",arguments,null,"height");
};
dojo.html.getViewportSize=function(){
return dojo.html._callDeprecated("getViewportSize","getViewport",arguments);
};
dojo.html.getScrollTop=function(){
return dojo.html._callDeprecated("getScrollTop","getScroll",arguments,null,"top");
};
dojo.html.getScrollLeft=function(){
return dojo.html._callDeprecated("getScrollLeft","getScroll",arguments,null,"left");
};
dojo.html.getScrollOffset=function(){
return dojo.html._callDeprecated("getScrollOffset","getScroll",arguments,null,"offset");
};
dojo.provide("dojo.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 _46d=null;
if(window.getComputedStyle){
var _46e=getComputedStyle(div,"");
_46d=_46e.getPropertyValue("background-image");
}else{
_46d=div.currentStyle.backgroundImage;
}
var _46f=false;
if(_46d!=null&&(_46d=="none"||_46d=="url(invalid-url:)")){
this.accessible=true;
}
dojo.body().removeChild(div);
}
return this.accessible;
},setCheckAccessible:function(_470){
this.doAccessibleCheck=_470;
},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 _472=this.children[i];
if(_472.onResized){
_472.onResized();
}
}
},create:function(args,_474,_475,ns){
if(ns){
this.ns=ns;
}
this.satisfyPropertySets(args,_474,_475);
this.mixInProperties(args,_474,_475);
this.postMixInProperties(args,_474,_475);
dojo.widget.manager.add(this);
this.buildRendering(args,_474,_475);
this.initialize(args,_474,_475);
this.postInitialize(args,_474,_475);
this.postCreate(args,_474,_475);
return this;
},destroy:function(_477){
if(this.parent){
this.parent.removeChild(this);
}
this.destroyChildren();
this.uninitialize();
this.destroyRendering(_477);
dojo.widget.manager.removeById(this.widgetId);
},destroyChildren:function(){
var _478;
var i=0;
while(this.children.length>i){
_478=this.children[i];
if(_478 instanceof dojo.widget.Widget){
this.removeChild(_478);
_478.destroy();
continue;
}
i++;
}
},getChildrenOfType:function(type,_47b){
var ret=[];
var _47d=dojo.lang.isFunction(type);
if(!_47d){
type=type.toLowerCase();
}
for(var x=0;x<this.children.length;x++){
if(_47d){
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(_47b){
ret=ret.concat(this.children[x].getChildrenOfType(type,_47b));
}
}
return ret;
},getDescendants:function(){
var _47f=[];
var _480=[this];
var elem;
while((elem=_480.pop())){
_47f.push(elem);
if(elem.children){
dojo.lang.forEach(elem.children,function(elem){
_480.push(elem);
});
}
}
return _47f;
},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 _487;
var _488=dojo.widget.lcArgsCache[this.widgetType];
if(_488==null){
_488={};
for(var y in this){
_488[((new String(y)).toLowerCase())]=y;
}
dojo.widget.lcArgsCache[this.widgetType]=_488;
}
var _48a={};
for(var x in args){
if(!this[x]){
var y=_488[(new String(x)).toLowerCase()];
if(y){
args[y]=args[x];
x=y;
}
}
if(_48a[x]){
continue;
}
_48a[x]=true;
if((typeof this[x])!=(typeof _487)){
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 _48c=args[x].split(";");
for(var y=0;y<_48c.length;y++){
var si=_48c[y].indexOf(":");
if((si!=-1)&&(_48c[y].length>si)){
this[x][_48c[y].substr(0,si).replace(/^\s+|\s+$/g,"")]=_48c[y].substr(si+1);
}
}
}
}else{
this[x]=args[x];
}
}
}
}
}
}
}
}
}else{
this.extraArgs[x.toLowerCase()]=args[x];
}
}
},postMixInProperties:function(args,frag,_490){
},initialize:function(args,frag,_493){
return false;
},postInitialize:function(args,frag,_496){
return false;
},postCreate:function(args,frag,_499){
return false;
},uninitialize:function(){
return false;
},buildRendering:function(args,frag,_49c){
dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", ");
return false;
},destroyRendering:function(){
dojo.unimplemented("dojo.widget.Widget.destroyRendering");
return false;
},addedTo:function(_49d){
},addChild:function(_49e){
dojo.unimplemented("dojo.widget.Widget.addChild");
return false;
},removeChild:function(_49f){
for(var x=0;x<this.children.length;x++){
if(this.children[x]===_49f){
this.children.splice(x,1);
_49f.parent=null;
break;
}
}
return _49f;
},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(_4a4,_4a5,_4a6){
var _4a7=_4a5.parseProperties(_4a4["dojo:propertyset"]);
};
dojo.widget.tags["dojo:connect"]=function(_4a8,_4a9,_4aa){
var _4ab=_4a9.parseProperties(_4a8["dojo:connect"]);
};
dojo.widget.buildWidgetFromParseTree=function(type,frag,_4ae,_4af,_4b0,_4b1){
dojo.a11y.setAccessibleMode();
var _4b2=type.split(":");
_4b2=(_4b2.length==2)?_4b2[1]:type;
var _4b3=_4b1||_4ae.parseProperties(frag[frag["ns"]+":"+_4b2]);
var _4b4=dojo.widget.manager.getImplementation(_4b2,null,null,frag["ns"]);
if(!_4b4){
throw new Error("cannot find \""+type+"\" widget");
}else{
if(!_4b4.create){
throw new Error("\""+type+"\" widget object has no \"create\" method and does not appear to implement *Widget");
}
}
_4b3["dojoinsertionindex"]=_4b0;
var ret=_4b4.create(_4b3,frag,_4af,frag["ns"]);
return ret;
};
dojo.widget.defineWidget=function(_4b6,_4b7,_4b8,init,_4ba){
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(_4bd,_4be,_4bf,init,_4c1){
var _4c2=_4bd.split(".");
var type=_4c2.pop();
var regx="\\.("+(_4be?_4be+"|":"")+dojo.widget.defineWidget.renderers+")\\.";
var r=_4bd.search(new RegExp(regx));
_4c2=(r<0?_4c2.join("."):_4bd.substr(0,r));
dojo.widget.manager.registerWidgetPackage(_4c2);
var pos=_4c2.indexOf(".");
var _4c7=(pos>-1)?_4c2.substring(0,pos):_4c2;
_4c1=(_4c1)||{};
_4c1.widgetType=type;
if((!init)&&(_4c1["classConstructor"])){
init=_4c1.classConstructor;
delete _4c1.classConstructor;
}
dojo.declare(_4bd,_4bf,init,_4c1);
};
dojo.provide("dojo.widget.Parse");
dojo.widget.Parse=function(_4c8){
this.propertySetsList=[];
this.fragment=_4c8;
this.createComponents=function(frag,_4ca){
var _4cb=[];
var _4cc=false;
try{
if(frag&&frag.tagName&&(frag!=frag.nodeRef)){
var _4cd=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(_4cd[ltn]){
_4cc=true;
ret=_4cd[ltn](frag,this,_4ca,frag.index);
_4cb.push(ret);
}else{
if(ltn.indexOf(":")==-1){
ltn="dojo:"+ltn;
}
ret=dojo.widget.buildWidgetFromParseTree(ltn,frag,this,_4ca,frag.index);
if(ret){
_4cc=true;
_4cb.push(ret);
}
}
}
}
}
catch(e){
dojo.debug("dojo.widget.Parse: error:",e);
}
if(!_4cc){
_4cb=_4cb.concat(this.createSubComponents(frag,_4ca));
}
return _4cb;
};
this.createSubComponents=function(_4d2,_4d3){
var frag,_4d5=[];
for(var item in _4d2){
frag=_4d2[item];
if(frag&&typeof frag=="object"&&(frag!=_4d2.nodeRef)&&(frag!=_4d2.tagName)&&(!dojo.dom.isNode(frag))){
_4d5=_4d5.concat(this.createComponents(frag,_4d3));
}
}
return _4d5;
};
this.parsePropertySets=function(_4d7){
return [];
};
this.parseProperties=function(_4d8){
var _4d9={};
for(var item in _4d8){
if((_4d8[item]==_4d8.tagName)||(_4d8[item]==_4d8.nodeRef)){
}else{
var frag=_4d8[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 _4dc=this;
this.getDataProvider(_4dc,frag[0].value);
_4d9.dataProvider=this.dataProvider;
}
_4d9[item]=frag[0].value;
var _4dd=this.parseProperties(frag);
for(var _4de in _4dd){
_4d9[_4de]=_4dd[_4de];
}
}
catch(e){
dojo.debug(e);
}
}
}
switch(item.toLowerCase()){
case "checked":
case "disabled":
if(typeof _4d9[item]!="boolean"){
_4d9[item]=true;
}
break;
}
}
}
return _4d9;
};
this.getDataProvider=function(_4df,_4e0){
dojo.io.bind({url:_4e0,load:function(type,_4e2){
if(type=="load"){
_4df.dataProvider=_4e2;
}
},mimetype:"text/javascript",sync:true});
};
this.getPropertySetById=function(_4e3){
for(var x=0;x<this.propertySetsList.length;x++){
if(_4e3==this.propertySetsList[x]["id"][0].value){
return this.propertySetsList[x];
}
}
return "";
};
this.getPropertySetsByType=function(_4e5){
var _4e6=[];
for(var x=0;x<this.propertySetsList.length;x++){
var cpl=this.propertySetsList[x];
var cpcc=cpl.componentClass||cpl.componentType||null;
var _4ea=this.propertySetsList[x]["id"][0].value;
if(cpcc&&(_4ea==cpcc[0].value)){
_4e6.push(cpl);
}
}
return _4e6;
};
this.getPropertySets=function(_4eb){
var ppl="dojo:propertyproviderlist";
var _4ed=[];
var _4ee=_4eb.tagName;
if(_4eb[ppl]){
var _4ef=_4eb[ppl].value.split(" ");
for(var _4f0 in _4ef){
if((_4f0.indexOf("..")==-1)&&(_4f0.indexOf("://")==-1)){
var _4f1=this.getPropertySetById(_4f0);
if(_4f1!=""){
_4ed.push(_4f1);
}
}else{
}
}
}
return this.getPropertySetsByType(_4ee).concat(_4ed);
};
this.createComponentFromScript=function(_4f2,_4f3,_4f4,ns){
_4f4.fastMixIn=true;
var ltn=(ns||"dojo")+":"+_4f3.toLowerCase();
if(dojo.widget.tags[ltn]){
return [dojo.widget.tags[ltn](_4f4,this,null,null,_4f4)];
}
return [dojo.widget.buildWidgetFromParseTree(ltn,_4f4,this,null,null,_4f4)];
};
};
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,_4f9,_4fa,_4fb){
var _4fc=false;
var _4fd=(typeof name=="string");
if(_4fd){
var pos=name.indexOf(":");
var ns=(pos>-1)?name.substring(0,pos):"dojo";
if(pos>-1){
name=name.substring(pos+1);
}
var _500=name.toLowerCase();
var _501=ns+":"+_500;
_4fc=(dojo.byId(name)&&!dojo.widget.tags[_501]);
}
if((arguments.length==1)&&(_4fc||!_4fd)){
var xp=new dojo.xml.Parse();
var tn=_4fc?dojo.byId(name):name;
return dojo.widget.getParser().createComponents(xp.parseElement(tn,null,true))[0];
}
function fromScript(_504,name,_506,ns){
_506[_501]={dojotype:[{value:_500}],nodeRef:_504,fastMixIn:true};
_506.ns=ns;
return dojo.widget.getParser().createComponentFromScript(_504,name,_506,ns);
}
_4f9=_4f9||{};
var _508=false;
var tn=null;
var h=dojo.render.html.capable;
if(h){
tn=document.createElement("span");
}
if(!_4fa){
_508=true;
_4fa=tn;
if(h){
dojo.body().appendChild(_4fa);
}
}else{
if(_4fb){
dojo.dom.insertAtPosition(tn,_4fa,_4fb);
}else{
tn=_4fa;
}
}
var _50a=fromScript(tn,name.toLowerCase(),_4f9,ns);
if((!_50a)||(!_50a[0])||(typeof _50a[0].widgetType=="undefined")){
throw new Error("createWidget: Creation of \""+name+"\" widget failed.");
}
try{
if(_508&&_50a[0].domNode.parentNode){
_50a[0].domNode.parentNode.removeChild(_50a[0].domNode);
}
}
catch(e){
dojo.debug(e);
}
return _50a[0];
};
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,_510){
return (new RegExp("(^|\\s+)"+_510+"(\\s+|$)")).test(dojo.html.getClass(node));
};
dojo.html.prependClass=function(node,_512){
_512+=" "+dojo.html.getClass(node);
return dojo.html.setClass(node,_512);
};
dojo.html.addClass=function(node,_514){
if(dojo.html.hasClass(node,_514)){
return false;
}
_514=(dojo.html.getClass(node)+" "+_514).replace(/^\s+|\s+$/g,"");
return dojo.html.setClass(node,_514);
};
dojo.html.setClass=function(node,_516){
node=dojo.byId(node);
var cs=new String(_516);
try{
if(typeof node.className=="string"){
node.className=cs;
}else{
if(node.setAttribute){
node.setAttribute("class",_516);
node.className=cs;
}else{
return false;
}
}
}
catch(e){
dojo.debug("dojo.html.setClass() failed",e);
}
return true;
};
dojo.html.removeClass=function(node,_519,_51a){
try{
if(!_51a){
var _51b=dojo.html.getClass(node).replace(new RegExp("(^|\\s+)"+_519+"(\\s+|$)"),"$1$2");
}else{
var _51b=dojo.html.getClass(node).replace(_519,"");
}
dojo.html.setClass(node,_51b);
}
catch(e){
dojo.debug("dojo.html.removeClass() failed",e);
}
return true;
};
dojo.html.replaceClass=function(node,_51d,_51e){
dojo.html.removeClass(node,_51e);
dojo.html.addClass(node,_51d);
};
dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2};
dojo.html.getElementsByClass=function(_51f,_520,_521,_522,_523){
_523=false;
var _524=dojo.doc();
_520=dojo.byId(_520)||_524;
var _525=_51f.split(/\s+/g);
var _526=[];
if(_522!=1&&_522!=2){
_522=0;
}
var _527=new RegExp("(\\s|^)(("+_525.join(")|(")+"))(\\s|$)");
var _528=_525.join(" ").length;
var _529=[];
if(!_523&&_524.evaluate){
var _52a=".//"+(_521||"*")+"[contains(";
if(_522!=dojo.html.classMatchType.ContainsAny){
_52a+="concat(' ',@class,' '), ' "+_525.join(" ') and contains(concat(' ',@class,' '), ' ")+" ')";
if(_522==2){
_52a+=" and string-length(@class)="+_528+"]";
}else{
_52a+="]";
}
}else{
_52a+="concat(' ',@class,' '), ' "+_525.join(" ') or contains(concat(' ',@class,' '), ' ")+" ')]";
}
var _52b=_524.evaluate(_52a,_520,null,XPathResult.ANY_TYPE,null);
var _52c=_52b.iterateNext();
while(_52c){
try{
_529.push(_52c);
_52c=_52b.iterateNext();
}
catch(e){
break;
}
}
return _529;
}else{
if(!_521){
_521="*";
}
_529=_520.getElementsByTagName(_521);
var node,i=0;
outer:
while(node=_529[i++]){
var _52f=dojo.html.getClasses(node);
if(_52f.length==0){
continue outer;
}
var _530=0;
for(var j=0;j<_52f.length;j++){
if(_527.test(_52f[j])){
if(_522==dojo.html.classMatchType.ContainsAny){
_526.push(node);
continue outer;
}else{
_530++;
}
}else{
if(_522==dojo.html.classMatchType.IsOnly){
continue outer;
}
}
}
if(_530==_525.length){
if((_522==dojo.html.classMatchType.IsOnly)&&(_530==_52f.length)){
_526.push(node);
}else{
if(_522==dojo.html.classMatchType.ContainsAll){
_526.push(node);
}
}
}
}
return _526;
}
};
dojo.html.getElementsByClassName=dojo.html.getElementsByClass;
dojo.html.toCamelCase=function(_532){
var arr=_532.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(_536){
return _536.replace(/([A-Z])/g,"-$1").toLowerCase();
};
dojo.html.getComputedStyle=function(node,_538,_539){
node=dojo.byId(node);
var _538=dojo.html.toSelectorCase(_538);
var _53a=dojo.html.toCamelCase(_538);
if(!node||!node.style){
return _539;
}else{
if(document.defaultView&&dojo.html.isDescendantOf(node,node.ownerDocument)){
try{
var cs=document.defaultView.getComputedStyle(node,"");
if(cs){
return cs.getPropertyValue(_538);
}
}
catch(e){
if(node.style.getPropertyValue){
return node.style.getPropertyValue(_538);
}else{
return _539;
}
}
}else{
if(node.currentStyle){
return node.currentStyle[_53a];
}
}
}
if(node.style.getPropertyValue){
return node.style.getPropertyValue(_538);
}else{
return _539;
}
};
dojo.html.getStyleProperty=function(node,_53d){
node=dojo.byId(node);
return (node&&node.style?node.style[dojo.html.toCamelCase(_53d)]:undefined);
};
dojo.html.getStyle=function(node,_53f){
var _540=dojo.html.getStyleProperty(node,_53f);
return (_540?_540:dojo.html.getComputedStyle(node,_53f));
};
dojo.html.setStyle=function(node,_542,_543){
node=dojo.byId(node);
if(node&&node.style){
var _544=dojo.html.toCamelCase(_542);
node.style[_544]=_543;
}
};
dojo.html.setStyleText=function(_545,text){
try{
_545.style.cssText=text;
}
catch(e){
_545.setAttribute("style",text);
}
};
dojo.html.copyStyle=function(_547,_548){
if(!_548.style.cssText){
_547.setAttribute("style",_548.getAttribute("style"));
}else{
_547.style.cssText=_548.style.cssText;
}
dojo.html.addClass(_547,dojo.html.getClass(_548));
};
dojo.html.getUnitValue=function(node,_54a,_54b){
var s=dojo.html.getComputedStyle(node,_54a);
if((!s)||((s=="auto")&&(_54b))){
return {value:0,units:"px"};
}
var _54d=s.match(/(\-?[\d.]+)([a-z%]*)/i);
if(!_54d){
return dojo.html.getUnitValue.bad;
}
return {value:Number(_54d[1]),units:_54d[2].toLowerCase()};
};
dojo.html.getUnitValue.bad={value:NaN,units:""};
dojo.html.getPixelValue=function(node,_54f,_550){
var _551=dojo.html.getUnitValue(node,_54f,_550);
if(isNaN(_551.value)){
return 0;
}
if((_551.value)&&(_551.units!="px")){
return NaN;
}
return _551.value;
};
dojo.html.setPositivePixelValue=function(node,_553,_554){
if(isNaN(_554)){
return false;
}
node.style[_553]=Math.max(0,_554)+"px";
return true;
};
dojo.html.styleSheet=null;
dojo.html.insertCssRule=function(_555,_556,_557){
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){
_557=dojo.html.styleSheet.cssRules.length;
}else{
if(dojo.html.styleSheet.rules){
_557=dojo.html.styleSheet.rules.length;
}else{
return null;
}
}
}
if(dojo.html.styleSheet.insertRule){
var rule=_555+" { "+_556+" }";
return dojo.html.styleSheet.insertRule(rule,_557);
}else{
if(dojo.html.styleSheet.addRule){
return dojo.html.styleSheet.addRule(_555,_556,_557);
}else{
return null;
}
}
};
dojo.html.removeCssRule=function(_559){
if(!dojo.html.styleSheet){
dojo.debug("no stylesheet defined for removing rules");
return false;
}
if(dojo.render.html.ie){
if(!_559){
_559=dojo.html.styleSheet.rules.length;
dojo.html.styleSheet.removeRule(_559);
}
}else{
if(document.styleSheets[0]){
if(!_559){
_559=dojo.html.styleSheet.cssRules.length;
}
dojo.html.styleSheet.deleteRule(_559);
}
}
return true;
};
dojo.html._insertedCssFiles=[];
dojo.html.insertCssFile=function(URI,doc,_55c,_55d){
if(!URI){
return;
}
if(!doc){
doc=document;
}
var _55e=dojo.hostenv.getText(URI,false,_55d);
if(_55e===null){
return;
}
_55e=dojo.html.fixPathsInCssText(_55e,URI);
if(_55c){
var idx=-1,node,ent=dojo.html._insertedCssFiles;
for(var i=0;i<ent.length;i++){
if((ent[i].doc==doc)&&(ent[i].cssText==_55e)){
idx=i;
node=ent[i].nodeRef;
break;
}
}
if(node){
var _563=doc.getElementsByTagName("style");
for(var i=0;i<_563.length;i++){
if(_563[i]==node){
return;
}
}
dojo.html._insertedCssFiles.shift(idx,1);
}
}
var _564=dojo.html.insertCssText(_55e,doc);
dojo.html._insertedCssFiles.push({"doc":doc,"cssText":_55e,"nodeRef":_564});
if(_564&&djConfig.isDebug){
_564.setAttribute("dbgHref",URI);
}
return _564;
};
dojo.html.insertCssText=function(_565,doc,URI){
if(!_565){
return;
}
if(!doc){
doc=document;
}
if(URI){
_565=dojo.html.fixPathsInCssText(_565,URI);
}
var _568=doc.createElement("style");
_568.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(_568);
}
if(_568.styleSheet){
var _56a=function(){
try{
_568.styleSheet.cssText=_565;
}
catch(e){
dojo.debug(e);
}
};
if(_568.styleSheet.disabled){
setTimeout(_56a,10);
}else{
_56a();
}
}else{
var _56b=doc.createTextNode(_565);
_568.appendChild(_56b);
}
return _568;
};
dojo.html.fixPathsInCssText=function(_56c,URI){
if(!_56c||!URI){
return;
}
var _56e,str="",url="",_571="[\\t\\s\\w\\(\\)\\/\\.\\\\'\"-:#=&?~]+";
var _572=new RegExp("url\\(\\s*("+_571+")\\s*\\)");
var _573=/(file|https?|ftps?):\/\//;
regexTrim=new RegExp("^[\\s]*(['\"]?)("+_571+")\\1[\\s]*?$");
if(dojo.render.html.ie55||dojo.render.html.ie60){
var _574=new RegExp("AlphaImageLoader\\((.*)src=['\"]("+_571+")['\"]");
while(_56e=_574.exec(_56c)){
url=_56e[2].replace(regexTrim,"$2");
if(!_573.exec(url)){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=_56c.substring(0,_56e.index)+"AlphaImageLoader("+_56e[1]+"src='"+url+"'";
_56c=_56c.substr(_56e.index+_56e[0].length);
}
_56c=str+_56c;
str="";
}
while(_56e=_572.exec(_56c)){
url=_56e[1].replace(regexTrim,"$2");
if(!_573.exec(url)){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=_56c.substring(0,_56e.index)+"url("+url+")";
_56c=_56c.substr(_56e.index+_56e[0].length);
}
return str+_56c;
};
dojo.html.setActiveStyleSheet=function(_575){
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")==_575){
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 _581={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 _581){
if(_581[p]){
dojo.html.addClass(node,p);
}
}
};
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,_584,_585,_586){
var _587=_584||obj.templatePath;
var _588=dojo.widget._templateCache;
if(!_587&&!obj["widgetType"]){
do{
var _589="__dummyTemplate__"+dojo.widget._templateCache.dummyCount++;
}while(_588[_589]);
obj.widgetType=_589;
}
var wt=_587?_587.toString():obj.widgetType;
var ts=_588[wt];
if(!ts){
_588[wt]={"string":null,"node":null};
if(_586){
ts={};
}else{
ts=_588[wt];
}
}
if((!obj.templateString)&&(!_586)){
obj.templateString=_585||ts["string"];
}
if((!obj.templateNode)&&(!_586)){
obj.templateNode=ts["node"];
}
if((!obj.templateNode)&&(!obj.templateString)&&(_587)){
var _58c=dojo.hostenv.getText(_587);
if(_58c){
_58c=_58c.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");
var _58d=_58c.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_58d){
_58c=_58d[1];
}
}else{
_58c="";
}
obj.templateString=_58c;
if(!_586){
_588[wt]["string"]=_58c;
}
}
if((!ts["string"])&&(!_586)){
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,_591){
if(dojo.render.html.ie){
node.setAttribute(this[ns].alias+":"+attr,this[ns].prefix+_591);
}else{
node.setAttributeNS(this[ns]["namespace"],attr,this[ns].prefix+_591);
}
},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 _598=true;
if(dojo.render.html.ie){
_598=node.removeAttribute(this[ns].alias+":"+attr);
}else{
node.removeAttributeNS(this[ns]["namespace"],attr);
}
return _598;
}};
dojo.widget.attachTemplateNodes=function(_599,_59a,_59b){
var _59c=dojo.dom.ELEMENT_NODE;
function trim(str){
return str.replace(/^\s+|\s+$/g,"");
}
if(!_599){
_599=_59a.domNode;
}
if(_599.nodeType!=_59c){
return;
}
var _59e=_599.all||_599.getElementsByTagName("*");
var _59f=_59a;
for(var x=-1;x<_59e.length;x++){
var _5a1=(x==-1)?_599:_59e[x];
var _5a2=[];
if(!_59a.widgetsInTemplate||!_5a1.getAttribute("dojoType")){
for(var y=0;y<this.attachProperties.length;y++){
var _5a4=_5a1.getAttribute(this.attachProperties[y]);
if(_5a4){
_5a2=_5a4.split(";");
for(var z=0;z<_5a2.length;z++){
if(dojo.lang.isArray(_59a[_5a2[z]])){
_59a[_5a2[z]].push(_5a1);
}else{
_59a[_5a2[z]]=_5a1;
}
}
break;
}
}
var _5a6=_5a1.getAttribute(this.eventAttachProperty);
if(_5a6){
var evts=_5a6.split(";");
for(var y=0;y<evts.length;y++){
if((!evts[y])||(!evts[y].length)){
continue;
}
var _5a8=null;
var tevt=trim(evts[y]);
if(evts[y].indexOf(":")>=0){
var _5aa=tevt.split(":");
tevt=trim(_5aa[0]);
_5a8=trim(_5aa[1]);
}
if(!_5a8){
_5a8=tevt;
}
var tf=function(){
var ntf=new String(_5a8);
return function(evt){
if(_59f[ntf]){
_59f[ntf](dojo.event.browser.fixEvent(evt,this));
}
};
}();
dojo.event.browser.addListener(_5a1,tevt,tf,false,true);
}
}
for(var y=0;y<_59b.length;y++){
var _5ae=_5a1.getAttribute(_59b[y]);
if((_5ae)&&(_5ae.length)){
var _5a8=null;
var _5af=_59b[y].substr(4);
_5a8=trim(_5ae);
var _5b0=[_5a8];
if(_5a8.indexOf(";")>=0){
_5b0=dojo.lang.map(_5a8.split(";"),trim);
}
for(var z=0;z<_5b0.length;z++){
if(!_5b0[z].length){
continue;
}
var tf=function(){
var ntf=new String(_5b0[z]);
return function(evt){
if(_59f[ntf]){
_59f[ntf](dojo.event.browser.fixEvent(evt,this));
}
};
}();
dojo.event.browser.addListener(_5a1,_5af,tf,false,true);
}
}
}
}
var _5b3=_5a1.getAttribute(this.templateProperty);
if(_5b3){
_59a[_5b3]=_5a1;
}
dojo.lang.forEach(dojo.widget.waiNames,function(name){
var wai=dojo.widget.wai[name];
var val=_5a1.getAttribute(wai.name);
if(val){
if(val.indexOf("-")==-1){
dojo.widget.wai.setAttr(_5a1,wai.name,"role",val);
}else{
var _5b7=val.split("-");
dojo.widget.wai.setAttr(_5a1,wai.name,_5b7[0],_5b7[1]);
}
}
},this);
var _5b8=_5a1.getAttribute(this.onBuildProperty);
if(_5b8){
eval("var node = baseNode; var widget = targetObj; "+_5b8);
}
}
};
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(_5c0,_5c1,pos,ref,_5c4){
if(!this.isContainer){
dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget");
return null;
}else{
if(_5c4==undefined){
_5c4=this.children.length;
}
this.addWidgetAsDirectChild(_5c0,_5c1,pos,ref,_5c4);
this.registerChild(_5c0,_5c4);
}
return _5c0;
},addWidgetAsDirectChild:function(_5c5,_5c6,pos,ref,_5c9){
if((!this.containerNode)&&(!_5c6)){
this.containerNode=this.domNode;
}
var cn=(_5c6)?_5c6:this.containerNode;
if(!pos){
pos="after";
}
if(!ref){
if(!cn){
cn=dojo.body();
}
ref=cn.lastChild;
}
if(!_5c9){
_5c9=0;
}
_5c5.domNode.setAttribute("dojoinsertionindex",_5c9);
if(!ref){
cn.appendChild(_5c5.domNode);
}else{
if(pos=="insertAtIndex"){
dojo.dom.insertAtIndex(_5c5.domNode,ref.parentNode,_5c9);
}else{
if((pos=="after")&&(ref===cn.lastChild)){
cn.appendChild(_5c5.domNode);
}else{
dojo.dom.insertAtPosition(_5c5.domNode,cn,pos);
}
}
}
},registerChild:function(_5cb,_5cc){
_5cb.dojoInsertionIndex=_5cc;
var idx=-1;
for(var i=0;i<this.children.length;i++){
if(this.children[i].dojoInsertionIndex<=_5cc){
idx=i;
}
}
this.children.splice(idx+1,0,_5cb);
_5cb.parent=this;
_5cb.addedTo(this,idx+1);
delete dojo.widget.manager.topWidgets[_5cb.widgetId];
},removeChild:function(_5cf){
dojo.dom.removeNode(_5cf.domNode);
return dojo.widget.DomWidget.superclass.removeChild.call(this,_5cf);
},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,_5d3){
var _5d4=this.getFragNodeRef(frag);
if(_5d3&&(_5d3.snarfChildDomOutput||!_5d4)){
_5d3.addWidgetAsDirectChild(this,"","insertAtIndex","",args["dojoinsertionindex"],_5d4);
}else{
if(_5d4){
if(this.domNode&&(this.domNode!==_5d4)){
this._sourceNodeRef=dojo.dom.replaceNode(_5d4,this.domNode);
}
}
}
if(_5d3){
_5d3.registerChild(this,args.dojoinsertionindex);
}else{
dojo.widget.manager.topWidgets[this.widgetId]=this;
}
if(this.widgetsInTemplate){
var _5d5=new dojo.xml.Parse();
var _5d6;
var _5d7=this.domNode.getElementsByTagName("*");
for(var i=0;i<_5d7.length;i++){
if(_5d7[i].getAttribute("dojoAttachPoint")=="subContainerWidget"){
_5d6=_5d7[i];
}
if(_5d7[i].getAttribute("dojoType")){
_5d7[i].setAttribute("isSubWidget",true);
}
}
if(this.isContainer&&!this.containerNode){
if(_5d6){
var src=this.getFragNodeRef(frag);
if(src){
dojo.dom.moveChildren(src,_5d6);
frag["dojoDontFollow"]=true;
}
}else{
dojo.debug("No subContainerWidget node can be found in template file for widget "+this);
}
}
var _5da=_5d5.parseElement(this.domNode,null,true);
dojo.widget.getParser().createSubComponents(_5da,this);
var _5db=[];
var _5dc=[this];
var w;
while((w=_5dc.pop())){
for(var i=0;i<w.children.length;i++){
var _5de=w.children[i];
if(_5de._processedSubWidgets||!_5de.extraArgs["issubwidget"]){
continue;
}
_5db.push(_5de);
if(_5de.isContainer){
_5dc.push(_5de);
}
}
}
for(var i=0;i<_5db.length;i++){
var _5df=_5db[i];
if(_5df._processedSubWidgets){
dojo.debug("This should not happen: widget._processedSubWidgets is already true!");
return;
}
_5df._processedSubWidgets=true;
if(_5df.extraArgs["dojoattachevent"]){
var evts=_5df.extraArgs["dojoattachevent"].split(";");
for(var j=0;j<evts.length;j++){
var _5e2=null;
var tevt=dojo.string.trim(evts[j]);
if(tevt.indexOf(":")>=0){
var _5e4=tevt.split(":");
tevt=dojo.string.trim(_5e4[0]);
_5e2=dojo.string.trim(_5e4[1]);
}
if(!_5e2){
_5e2=tevt;
}
if(dojo.lang.isFunction(_5df[tevt])){
dojo.event.kwConnect({srcObj:_5df,srcFunc:tevt,targetObj:this,targetFunc:_5e2});
}else{
alert(tevt+" is not a function in widget "+_5df);
}
}
}
if(_5df.extraArgs["dojoattachpoint"]){
this[_5df.extraArgs["dojoattachpoint"]]=_5df;
}
}
}
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 _5e8=args["templateCssPath"]||this.templateCssPath;
if(_5e8&&!dojo.widget._cssFiles[_5e8.toString()]){
if((!this.templateCssString)&&(_5e8)){
this.templateCssString=dojo.hostenv.getText(_5e8);
this.templateCssPath=null;
}
dojo.widget._cssFiles[_5e8.toString()]=true;
}
if((this["templateCssString"])&&(!dojo.widget._cssStrings[this.templateCssString])){
dojo.html.insertCssText(this.templateCssString,null,_5e8);
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 _5eb=false;
if(args["templatepath"]){
args["templatePath"]=args["templatepath"];
}
dojo.widget.fillFromTemplateCache(this,args["templatePath"],null,_5eb);
var ts=dojo.widget._templateCache[this.templatePath?this.templatePath.toString():this.widgetType];
if((ts)&&(!_5eb)){
if(!this.templateString.length){
this.templateString=ts["string"];
}
if(!this.templateNode){
this.templateNode=ts["node"];
}
}
var _5ed=false;
var node=null;
var tstr=this.templateString;
if((!this.templateNode)&&(this.templateString)){
_5ed=this.templateString.match(/\$\{([^\}]+)\}/g);
if(_5ed){
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<_5ed.length;i++){
var key=_5ed[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 _5f4;
if((kval)||(dojo.lang.isString(kval))){
_5f4=new String((dojo.lang.isFunction(kval))?kval.call(this,key,this.templateString):kval);
while(_5f4.indexOf("\"")>-1){
_5f4=_5f4.replace("\"","&quot;");
}
tstr=tstr.replace(_5ed[i],_5f4);
}
}
}else{
this.templateNode=this.createNodesFromText(this.templateString,true)[0];
if(!_5eb){
ts.node=this.templateNode;
}
}
}
if((!this.templateNode)&&(!_5ed)){
dojo.debug("DomWidget.buildFromTemplate: could not create template");
return false;
}else{
if(!_5ed){
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(_5f6,_5f7){
if(!_5f6){
_5f6=this.domNode;
}
if(!_5f7){
_5f7=this;
}
return dojo.widget.attachTemplateNodes(_5f6,_5f7,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.display");
dojo.html._toggle=function(node,_5f9,_5fa){
node=dojo.byId(node);
_5fa(node,!_5f9(node));
return _5f9(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,_5ff){
dojo.html[(_5ff?"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,_605){
dojo.html.setStyle(node,"display",((_605 instanceof String||typeof _605=="string")?_605:(_605?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,_609){
dojo.html.setStyle(node,"visibility",((_609 instanceof String||typeof _609=="string")?_609:(_609?"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,_60d,_60e){
node=dojo.byId(node);
var h=dojo.render.html;
if(!_60e){
if(_60d>=1){
if(h.ie){
dojo.html.clearOpacity(node);
return;
}else{
_60d=0.999999;
}
}else{
if(_60d<0){
_60d=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="+_60d*100+")";
}
}
node.style.filter="Alpha(Opacity="+_60d*100+")";
}else{
if(h.moz){
node.style.opacity=_60d;
node.style.MozOpacity=_60d;
}else{
if(h.safari){
node.style.opacity=_60d;
node.style.KhtmlOpacity=_60d;
}else{
node.style.opacity=_60d;
}
}
}
};
dojo.html.clearOpacity=function(node){
node=dojo.byId(node);
var ns=node.style;
var h=dojo.render.html;
if(h.ie){
try{
if(node.filters&&node.filters.alpha){
ns.filter="";
}
}
catch(e){
}
}else{
if(h.moz){
ns.opacity=1;
ns.MozOpacity=1;
}else{
if(h.safari){
ns.opacity=1;
ns.KhtmlOpacity=1;
}else{
ns.opacity=1;
}
}
}
};
dojo.html.getOpacity=function(node){
node=dojo.byId(node);
var h=dojo.render.html;
if(h.ie){
var opac=(node.filters&&node.filters.alpha&&typeof node.filters.alpha.opacity=="number"?node.filters.alpha.opacity:100)/100;
}else{
var opac=node.style.opacity||node.style.MozOpacity||node.style.KhtmlOpacity||1;
}
return opac>=0.999999?1:Number(opac);
};
dojo.provide("dojo.html.layout");
dojo.html.sumAncestorProperties=function(node,prop){
node=dojo.byId(node);
if(!node){
return 0;
}
var _61a=0;
while(node){
if(dojo.html.getComputedStyle(node,"position")=="fixed"){
return 0;
}
var val=node[prop];
if(val){
_61a+=val-0;
if(node==dojo.body()){
break;
}
}
node=node.parentNode;
}
return _61a;
};
dojo.html.setStyleAttributes=function(node,_61d){
node=dojo.byId(node);
var _61e=_61d.replace(/(;)?\s*$/,"").split(";");
for(var i=0;i<_61e.length;i++){
var _620=_61e[i].split(":");
var name=_620[0].replace(/\s*$/,"").replace(/^\s*/,"").toLowerCase();
var _622=_620[1].replace(/\s*$/,"").replace(/^\s*/,"");
switch(name){
case "opacity":
dojo.html.setOpacity(node,_622);
break;
case "content-height":
dojo.html.setContentBox(node,{height:_622});
break;
case "content-width":
dojo.html.setContentBox(node,{width:_622});
break;
case "outer-height":
dojo.html.setMarginBox(node,{height:_622});
break;
case "outer-width":
dojo.html.setMarginBox(node,{width:_622});
break;
default:
node.style[dojo.html.toCamelCase(name)]=_622;
}
}
};
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,_624,_625){
node=dojo.byId(node,node.ownerDocument);
var ret={x:0,y:0};
var bs=dojo.html.boxSizing;
if(!_625){
_625=bs.CONTENT_BOX;
}
var _628=2;
var _629;
switch(_625){
case bs.MARGIN_BOX:
_629=3;
break;
case bs.BORDER_BOX:
_629=2;
break;
case bs.PADDING_BOX:
default:
_629=1;
break;
case bs.CONTENT_BOX:
_629=0;
break;
}
var h=dojo.render.html;
var db=document["body"]||document["documentElement"];
if(h.ie){
with(node.getBoundingClientRect()){
ret.x=left-2;
ret.y=top-2;
}
}else{
if(document.getBoxObjectFor){
_628=1;
try{
var bo=document.getBoxObjectFor(node);
ret.x=bo.x-dojo.html.sumAncestorProperties(node,"scrollLeft");
ret.y=bo.y-dojo.html.sumAncestorProperties(node,"scrollTop");
}
catch(e){
}
}else{
if(node["offsetParent"]){
var _62d;
if((h.safari)&&(node.style.getPropertyValue("position")=="absolute")&&(node.parentNode==db)){
_62d=db;
}else{
_62d=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 _62f=node;
do{
var n=_62f["offsetLeft"];
if(!h.opera||n>0){
ret.x+=isNaN(n)?0:n;
}
var m=_62f["offsetTop"];
ret.y+=isNaN(m)?0:m;
_62f=_62f.offsetParent;
}while((_62f!=_62d)&&(_62f!=null));
}else{
if(node["x"]&&node["y"]){
ret.x+=isNaN(node.x)?0:node.x;
ret.y+=isNaN(node.y)?0:node.y;
}
}
}
}
if(_624){
var _632=dojo.html.getScroll();
ret.y+=_632.top;
ret.x+=_632.left;
}
var _633=[dojo.html.getPaddingExtent,dojo.html.getBorderExtent,dojo.html.getMarginExtent];
if(_628>_629){
for(var i=_629;i<_628;++i){
ret.y+=_633[i](node,"top");
ret.x+=_633[i](node,"left");
}
}else{
if(_628<_629){
for(var i=_629;i>_628;--i){
ret.y-=_633[i-1](node,"top");
ret.x-=_633[i-1](node,"left");
}
}
}
ret.top=ret.y;
ret.left=ret.x;
return ret;
};
dojo.html.isPositionAbsolute=function(node){
return (dojo.html.getComputedStyle(node,"position")=="absolute");
};
dojo.html._sumPixelValues=function(node,_637,_638){
var _639=0;
for(var x=0;x<_637.length;x++){
_639+=dojo.html.getPixelValue(node,_637[x],_638);
}
return _639;
};
dojo.html.getMargin=function(node){
return {width:dojo.html._sumPixelValues(node,["margin-left","margin-right"],(dojo.html.getComputedStyle(node,"position")=="absolute")),height:dojo.html._sumPixelValues(node,["margin-top","margin-bottom"],(dojo.html.getComputedStyle(node,"position")=="absolute"))};
};
dojo.html.getBorder=function(node){
return {width:dojo.html.getBorderExtent(node,"left")+dojo.html.getBorderExtent(node,"right"),height:dojo.html.getBorderExtent(node,"top")+dojo.html.getBorderExtent(node,"bottom")};
};
dojo.html.getBorderExtent=function(node,side){
return (dojo.html.getStyle(node,"border-"+side+"-style")=="none"?0:dojo.html.getPixelValue(node,"border-"+side+"-width"));
};
dojo.html.getMarginExtent=function(node,side){
return dojo.html._sumPixelValues(node,["margin-"+side],dojo.html.isPositionAbsolute(node));
};
dojo.html.getPaddingExtent=function(node,side){
return dojo.html._sumPixelValues(node,["padding-"+side],true);
};
dojo.html.getPadding=function(node){
return {width:dojo.html._sumPixelValues(node,["padding-left","padding-right"],true),height:dojo.html._sumPixelValues(node,["padding-top","padding-bottom"],true)};
};
dojo.html.getPadBorder=function(node){
var pad=dojo.html.getPadding(node);
var _646=dojo.html.getBorder(node);
return {width:pad.width+_646.width,height:pad.height+_646.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 _64b=dojo.html.getStyle(node,"-moz-box-sizing");
if(!_64b){
_64b=dojo.html.getStyle(node,"box-sizing");
}
return (_64b?_64b: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 _650=dojo.html.getBorder(node);
return {width:box.width-_650.width,height:box.height-_650.height};
};
dojo.html.getContentBox=function(node){
node=dojo.byId(node);
var _652=dojo.html.getPadBorder(node);
return {width:node.offsetWidth-_652.width,height:node.offsetHeight-_652.height};
};
dojo.html.setContentBox=function(node,args){
node=dojo.byId(node);
var _655=0;
var _656=0;
var isbb=dojo.html.isBorderBox(node);
var _658=(isbb?dojo.html.getPadBorder(node):{width:0,height:0});
var ret={};
if(typeof args.width!="undefined"){
_655=args.width+_658.width;
ret.width=dojo.html.setPositivePixelValue(node,"width",_655);
}
if(typeof args.height!="undefined"){
_656=args.height+_658.height;
ret.height=dojo.html.setPositivePixelValue(node,"height",_656);
}
return ret;
};
dojo.html.getMarginBox=function(node){
var _65b=dojo.html.getBorderBox(node);
var _65c=dojo.html.getMargin(node);
return {width:_65b.width+_65c.width,height:_65b.height+_65c.height};
};
dojo.html.setMarginBox=function(node,args){
node=dojo.byId(node);
var _65f=0;
var _660=0;
var isbb=dojo.html.isBorderBox(node);
var _662=(!isbb?dojo.html.getPadBorder(node):{width:0,height:0});
var _663=dojo.html.getMargin(node);
var ret={};
if(typeof args.width!="undefined"){
_65f=args.width-_662.width;
_65f-=_663.width;
ret.width=dojo.html.setPositivePixelValue(node,"width",_65f);
}
if(typeof args.height!="undefined"){
_660=args.height-_662.height;
_660-=_663.height;
ret.height=dojo.html.setPositivePixelValue(node,"height",_660);
}
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(_668,_669,_66a){
if(_668 instanceof Array||typeof _668=="array"){
dojo.deprecated("dojo.html.toCoordinateArray","use dojo.html.toCoordinateObject({left: , top: , width: , height: }) instead","0.5");
while(_668.length<4){
_668.push(0);
}
while(_668.length>4){
_668.pop();
}
var ret={left:_668[0],top:_668[1],width:_668[2],height:_668[3]};
}else{
if(!_668.nodeType&&!(_668 instanceof String||typeof _668=="string")&&("width" in _668||"height" in _668||"left" in _668||"x" in _668||"top" in _668||"y" in _668)){
var ret={left:_668.left||_668.x||0,top:_668.top||_668.y||0,width:_668.width||0,height:_668.height||0};
}else{
var node=dojo.byId(_668);
var pos=dojo.html.abs(node,_669,_66a);
var _66e=dojo.html.getMarginBox(node);
var ret={left:pos.left,top:pos.top,width:_66e.width,height:_66e.height};
}
}
ret.x=ret.left;
ret.y=ret.top;
return ret;
};
dojo.html.setMarginBoxWidth=dojo.html.setOuterWidth=function(node,_670){
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,_673){
return dojo.html._callDeprecated("getTotalOffset","getAbsolutePosition",arguments,null,type);
};
dojo.html.getAbsoluteX=function(node,_675){
return dojo.html._callDeprecated("getAbsoluteX","getAbsolutePosition",arguments,null,"x");
};
dojo.html.getAbsoluteY=function(node,_677){
return dojo.html._callDeprecated("getAbsoluteY","getAbsolutePosition",arguments,null,"y");
};
dojo.html.totalOffsetLeft=function(node,_679){
return dojo.html._callDeprecated("totalOffsetLeft","getAbsolutePosition",arguments,null,"left");
};
dojo.html.totalOffsetTop=function(node,_67b){
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,_685){
return dojo.html._callDeprecated("setContentBoxWidth","setContentBox",arguments,"width");
};
dojo.html.setContentBoxHeight=dojo.html.setContentHeight=function(node,_687){
return dojo.html._callDeprecated("setContentBoxHeight","setContentBox",arguments,"height");
};
dojo.provide("dojo.html.util");
dojo.html.getElementWindow=function(_688){
return dojo.html.getDocumentWindow(_688.ownerDocument);
};
dojo.html.getDocumentWindow=function(doc){
if(dojo.render.html.safari&&!doc._parentWindow){
var fix=function(win){
win.document._parentWindow=win;
for(var i=0;i<win.frames.length;i++){
fix(win.frames[i]);
}
};
fix(window.top);
}
if(dojo.render.html.ie&&window!==document.parentWindow&&!doc._parentWindow){
doc.parentWindow.execScript("document._parentWindow = window;","Javascript");
var win=doc._parentWindow;
doc._parentWindow=null;
return win;
}
return doc._parentWindow||doc.parentWindow||doc.defaultView;
};
dojo.html.gravity=function(node,e){
node=dojo.byId(node);
var _690=dojo.html.getCursorPosition(e);
with(dojo.html){
var _691=getAbsolutePosition(node,true);
var bb=getBorderBox(node);
var _693=_691.x+(bb.width/2);
var _694=_691.y+(bb.height/2);
}
with(dojo.html.gravity){
return ((_690.x<_693?WEST:EAST)|(_690.y<_694?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(_695,e){
_695=dojo.byId(_695);
var _697=dojo.html.getCursorPosition(e);
var bb=dojo.html.getBorderBox(_695);
var _699=dojo.html.getAbsolutePosition(_695,true,dojo.html.boxSizing.BORDER_BOX);
var top=_699.y;
var _69b=top+bb.height;
var left=_699.x;
var _69d=left+bb.width;
return (_697.x>=left&&_697.x<=_69d&&_697.y>=top&&_697.y<=_69b);
};
dojo.html.renderedTextContent=function(node){
node=dojo.byId(node);
var _69f="";
if(node==null){
return _69f;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
var _6a1="unknown";
try{
_6a1=dojo.html.getStyle(node.childNodes[i],"display");
}
catch(E){
}
switch(_6a1){
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":
_69f+="\n";
_69f+=dojo.html.renderedTextContent(node.childNodes[i]);
_69f+="\n";
break;
case "none":
break;
default:
if(node.childNodes[i].tagName&&node.childNodes[i].tagName.toLowerCase()=="br"){
_69f+="\n";
}else{
_69f+=dojo.html.renderedTextContent(node.childNodes[i]);
}
break;
}
break;
case 3:
case 2:
case 4:
var text=node.childNodes[i].nodeValue;
var _6a3="unknown";
try{
_6a3=dojo.html.getStyle(node,"text-transform");
}
catch(E){
}
switch(_6a3){
case "capitalize":
var _6a4=text.split(" ");
for(var i=0;i<_6a4.length;i++){
_6a4[i]=_6a4[i].charAt(0).toUpperCase()+_6a4[i].substring(1);
}
text=_6a4.join(" ");
break;
case "uppercase":
text=text.toUpperCase();
break;
case "lowercase":
text=text.toLowerCase();
break;
default:
break;
}
switch(_6a3){
case "nowrap":
break;
case "pre-wrap":
break;
case "pre-line":
break;
case "pre":
break;
default:
text=text.replace(/\s+/," ");
if(/\s$/.test(_69f)){
text.replace(/^\s/,"");
}
break;
}
_69f+=text;
break;
default:
break;
}
}
return _69f;
};
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 _6a8="none";
if((/^<t[dh][\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table><tbody><tr>"+txt+"</tr></tbody></table>";
_6a8="cell";
}else{
if((/^<tr[\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table><tbody>"+txt+"</tbody></table>";
_6a8="row";
}else{
if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table>"+txt+"</table>";
_6a8="section";
}
}
}
tn.innerHTML=txt;
if(tn["normalize"]){
tn.normalize();
}
var _6a9=null;
switch(_6a8){
case "cell":
_6a9=tn.getElementsByTagName("tr")[0];
break;
case "row":
_6a9=tn.getElementsByTagName("tbody")[0];
break;
case "section":
_6a9=tn.getElementsByTagName("table")[0];
break;
default:
_6a9=tn;
break;
}
var _6aa=[];
for(var x=0;x<_6a9.childNodes.length;x++){
_6aa.push(_6a9.childNodes[x].cloneNode(true));
}
tn.style.display="none";
dojo.html.destroyNode(tn);
return _6aa;
};
dojo.html.placeOnScreen=function(node,_6ad,_6ae,_6af,_6b0,_6b1,_6b2){
if(_6ad instanceof Array||typeof _6ad=="array"){
_6b2=_6b1;
_6b1=_6b0;
_6b0=_6af;
_6af=_6ae;
_6ae=_6ad[1];
_6ad=_6ad[0];
}
if(_6b1 instanceof String||typeof _6b1=="string"){
_6b1=_6b1.split(",");
}
if(!isNaN(_6af)){
_6af=[Number(_6af),Number(_6af)];
}else{
if(!(_6af instanceof Array||typeof _6af=="array")){
_6af=[0,0];
}
}
var _6b3=dojo.html.getScroll().offset;
var view=dojo.html.getViewport();
node=dojo.byId(node);
var _6b5=node.style.display;
node.style.display="";
var bb=dojo.html.getBorderBox(node);
var w=bb.width;
var h=bb.height;
node.style.display=_6b5;
if(!(_6b1 instanceof Array||typeof _6b1=="array")){
_6b1=["TL"];
}
var _6b9,_6ba,_6bb=Infinity,_6bc;
for(var _6bd=0;_6bd<_6b1.length;++_6bd){
var _6be=_6b1[_6bd];
var _6bf=true;
var tryX=_6ad-(_6be.charAt(1)=="L"?0:w)+_6af[0]*(_6be.charAt(1)=="L"?1:-1);
var tryY=_6ae-(_6be.charAt(0)=="T"?0:h)+_6af[1]*(_6be.charAt(0)=="T"?1:-1);
if(_6b0){
tryX-=_6b3.x;
tryY-=_6b3.y;
}
if(tryX<0){
tryX=0;
_6bf=false;
}
if(tryY<0){
tryY=0;
_6bf=false;
}
var x=tryX+w;
if(x>view.width){
x=view.width-w;
_6bf=false;
}else{
x=tryX;
}
x=Math.max(_6af[0],x)+_6b3.x;
var y=tryY+h;
if(y>view.height){
y=view.height-h;
_6bf=false;
}else{
y=tryY;
}
y=Math.max(_6af[1],y)+_6b3.y;
if(_6bf){
_6b9=x;
_6ba=y;
_6bb=0;
_6bc=_6be;
break;
}else{
var dist=Math.pow(x-tryX-_6b3.x,2)+Math.pow(y-tryY-_6b3.y,2);
if(_6bb>dist){
_6bb=dist;
_6b9=x;
_6ba=y;
_6bc=_6be;
}
}
}
if(!_6b2){
node.style.left=_6b9+"px";
node.style.top=_6ba+"px";
}
return {left:_6b9,top:_6ba,x:_6b9,y:_6ba,dist:_6bb,corner:_6bc};
};
dojo.html.placeOnScreenPoint=function(node,_6c6,_6c7,_6c8,_6c9){
dojo.deprecated("dojo.html.placeOnScreenPoint","use dojo.html.placeOnScreen() instead","0.5");
return dojo.html.placeOnScreen(node,_6c6,_6c7,_6c8,_6c9,["TL","TR","BL","BR"]);
};
dojo.html.placeOnScreenAroundElement=function(node,_6cb,_6cc,_6cd,_6ce,_6cf){
var best,_6d1=Infinity;
_6cb=dojo.byId(_6cb);
var _6d2=_6cb.style.display;
_6cb.style.display="";
var mb=dojo.html.getElementBox(_6cb,_6cd);
var _6d4=mb.width;
var _6d5=mb.height;
var _6d6=dojo.html.getAbsolutePosition(_6cb,true,_6cd);
_6cb.style.display=_6d2;
for(var _6d7 in _6ce){
var pos,_6d9,_6da;
var _6db=_6ce[_6d7];
_6d9=_6d6.x+(_6d7.charAt(1)=="L"?0:_6d4);
_6da=_6d6.y+(_6d7.charAt(0)=="T"?0:_6d5);
pos=dojo.html.placeOnScreen(node,_6d9,_6da,_6cc,true,_6db,true);
if(pos.dist==0){
best=pos;
break;
}else{
if(_6d1>pos.dist){
_6d1=pos.dist;
best=pos;
}
}
}
if(!_6cf){
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 _6dd=node.parentNode;
var _6de=_6dd.scrollTop+dojo.html.getBorderBox(_6dd).height;
var _6df=node.offsetTop+dojo.html.getMarginBox(node).height;
if(_6de<_6df){
_6dd.scrollTop+=(_6df-_6de);
}else{
if(_6dd.scrollTop>node.offsetTop){
_6dd.scrollTop-=(_6dd.scrollTop-node.offsetTop);
}
}
}
}
};
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(_6e6){
if(_6e6){
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(_6e7,_6e8){
var rgb=null;
if(dojo.lang.isArray(_6e7)){
rgb=_6e7;
}else{
if(_6e7 instanceof dojo.gfx.color.Color){
rgb=_6e7.toRgb();
}else{
rgb=new dojo.gfx.color.Color(_6e7).toRgb();
}
}
return dojo.gfx.color.blend(this.toRgb(),rgb,_6e8);
}});
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,_6ec){
if(typeof a=="string"){
return dojo.gfx.color.blendHex(a,b,_6ec);
}
if(!_6ec){
_6ec=0;
}
_6ec=Math.min(Math.max(-1,_6ec),1);
_6ec=((_6ec+1)/2);
var c=[];
for(var x=0;x<3;x++){
c[x]=parseInt(b[x]+((a[x]-b[x])*_6ec));
}
return c;
};
dojo.gfx.color.blendHex=function(a,b,_6f1){
return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a),dojo.gfx.color.hex2rgb(b),_6f1));
};
dojo.gfx.color.extractRGB=function(_6f2){
var hex="0123456789abcdef";
_6f2=_6f2.toLowerCase();
if(_6f2.indexOf("rgb")==0){
var _6f4=_6f2.match(/rgba*\((\d+), *(\d+), *(\d+)/i);
var ret=_6f4.splice(1,3);
return ret;
}else{
var _6f6=dojo.gfx.color.hex2rgb(_6f2);
if(_6f6){
return _6f6;
}else{
return dojo.gfx.color.named[_6f2]||[255,255,255];
}
}
};
dojo.gfx.color.hex2rgb=function(hex){
var _6f8="0123456789ABCDEF";
var rgb=new Array(3);
if(hex.indexOf("#")==0){
hex=hex.substring(1);
}
hex=hex.toUpperCase();
if(hex.replace(new RegExp("["+_6f8+"]","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]=_6f8.indexOf(rgb[i].charAt(0))*16+_6f8.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(_701,end){
this.start=_701;
this.end=end;
if(dojo.lang.isArray(_701)){
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-_701;
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,_710,_711){
if(!_711){
_711=_710;
_710=this;
}
_711=dojo.lang.hitch(_710,_711);
var _712=this[evt]||function(){
};
this[evt]=function(){
var ret=_712.apply(this,arguments);
_711.apply(this,arguments);
return ret;
};
return this;
},fire:function(evt,args){
if(this[evt]){
this[evt].apply(this,(args||[]));
}
return this;
},repeat:function(_716){
this.repeatCount=_716;
return this;
},_active:false,_paused:false});
dojo.lfx.Animation=function(_717,_718,_719,_71a,_71b,rate){
dojo.lfx.IAnimation.call(this);
if(dojo.lang.isNumber(_717)||(!_717&&_718.getValue)){
rate=_71b;
_71b=_71a;
_71a=_719;
_719=_718;
_718=_717;
_717=null;
}else{
if(_717.getValue||dojo.lang.isArray(_717)){
rate=_71a;
_71b=_719;
_71a=_718;
_719=_717;
_718=null;
_717=null;
}
}
if(dojo.lang.isArray(_719)){
this.curve=new dojo.lfx.Line(_719[0],_719[1]);
}else{
this.curve=_719;
}
if(_718!=null&&_718>0){
this.duration=_718;
}
if(_71b){
this.repeatCount=_71b;
}
if(rate){
this.rate=rate;
}
if(_717){
dojo.lang.forEach(["handler","beforeBegin","onBegin","onEnd","onPlay","onStop","onAnimate"],function(item){
if(_717[item]){
this.connect(item,_717[item]);
}
},this);
}
if(_71a&&dojo.lang.isFunction(_71a)){
this.easing=_71a;
}
};
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(_71e,_71f){
if(_71f){
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(_71e>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_71f);
}),_71e);
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 _721=this.curve.getValue(step);
if(this._percent==0){
if(!this._startRepeatCount){
this._startRepeatCount=this.repeatCount;
}
this.fire("handler",["begin",_721]);
this.fire("onBegin",[_721]);
}
this.fire("handler",["play",_721]);
this.fire("onPlay",[_721]);
this._cycle();
return this;
},pause:function(){
clearTimeout(this._timer);
if(!this._active){
return this;
}
this._paused=true;
var _722=this.curve.getValue(this._percent/100);
this.fire("handler",["pause",_722]);
this.fire("onPause",[_722]);
return this;
},gotoPercent:function(pct,_724){
clearTimeout(this._timer);
this._active=true;
this._paused=true;
this._percent=pct;
if(_724){
this.play();
}
return this;
},stop:function(_725){
clearTimeout(this._timer);
var step=this._percent/100;
if(_725){
step=1;
}
var _727=this.curve.getValue(step);
this.fire("handler",["stop",_727]);
this.fire("onStop",[_727]);
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 _72a=this.curve.getValue(step);
this.fire("handler",["animate",_72a]);
this.fire("onAnimate",[_72a]);
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(_72b){
dojo.lfx.IAnimation.call(this);
this._anims=[];
this._animsEnded=0;
var _72c=arguments;
if(_72c.length==1&&(dojo.lang.isArray(_72c[0])||dojo.lang.isArrayLike(_72c[0]))){
_72c=_72c[0];
}
dojo.lang.forEach(_72c,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(_72e,_72f){
if(!this._anims.length){
return this;
}
this.fire("beforeBegin");
if(_72e>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_72f);
}),_72e);
return this;
}
if(_72f||this._anims[0].percent==0){
this.fire("onBegin");
}
this.fire("onPlay");
this._animsCall("play",null,_72f);
return this;
},pause:function(){
this.fire("onPause");
this._animsCall("pause");
return this;
},stop:function(_730){
this.fire("onStop");
this._animsCall("stop",_730);
return this;
},_onAnimsEnded:function(){
this._animsEnded++;
if(this._animsEnded>=this._anims.length){
this.fire("onEnd");
}
return this;
},_animsCall:function(_731){
var args=[];
if(arguments.length>1){
for(var i=1;i<arguments.length;i++){
args.push(arguments[i]);
}
}
var _734=this;
dojo.lang.forEach(this._anims,function(anim){
anim[_731](args);
},_734);
return this;
}});
dojo.lfx.Chain=function(_736){
dojo.lfx.IAnimation.call(this);
this._anims=[];
this._currAnim=-1;
var _737=arguments;
if(_737.length==1&&(dojo.lang.isArray(_737[0])||dojo.lang.isArrayLike(_737[0]))){
_737=_737[0];
}
var _738=this;
dojo.lang.forEach(_737,function(anim,i,_73b){
this._anims.push(anim);
if(i<_73b.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(_73c,_73d){
if(!this._anims.length){
return this;
}
if(_73d||!this._anims[this._currAnim]){
this._currAnim=0;
}
var _73e=this._anims[this._currAnim];
this.fire("beforeBegin");
if(_73c>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_73d);
}),_73c);
return this;
}
if(_73e){
if(this._currAnim==0){
this.fire("handler",["begin",this._currAnim]);
this.fire("onBegin",[this._currAnim]);
}
this.fire("onPlay",[this._currAnim]);
_73e.play(null,_73d);
}
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 _73f=this._anims[this._currAnim];
if(_73f){
if(!_73f._active||_73f._paused){
this.play();
}else{
this.pause();
}
}
return this;
},stop:function(){
var _740=this._anims[this._currAnim];
if(_740){
_740.stop();
this.fire("onStop",[this._currAnim]);
}
return _740;
},_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(_741){
var _742=arguments;
if(dojo.lang.isArray(arguments[0])){
_742=arguments[0];
}
if(_742.length==1){
return _742[0];
}
return new dojo.lfx.Combine(_742);
};
dojo.lfx.chain=function(_743){
var _744=arguments;
if(dojo.lang.isArray(arguments[0])){
_744=arguments[0];
}
if(_744.length==1){
return _744[0];
}
return new dojo.lfx.Chain(_744);
};
dojo.provide("dojo.html.color");
dojo.html.getBackgroundColor=function(node){
node=dojo.byId(node);
var _746;
do{
_746=dojo.html.getStyle(node,"background-color");
if(_746.toLowerCase()=="rgba(0, 0, 0, 0)"){
_746="transparent";
}
if(node==document.getElementsByTagName("body")[0]){
node=null;
break;
}
node=node.parentNode;
}while(node&&dojo.lang.inArray(["transparent",""],_746));
if(_746=="transparent"){
_746=[255,255,255,0];
}else{
_746=dojo.gfx.color.extractRGB(_746);
}
return _746;
};
dojo.provide("dojo.lfx.html");
dojo.lfx.html._byId=function(_747){
if(!_747){
return [];
}
if(dojo.lang.isArrayLike(_747)){
if(!_747.alreadyChecked){
var n=[];
dojo.lang.forEach(_747,function(node){
n.push(dojo.byId(node));
});
n.alreadyChecked=true;
return n;
}else{
return _747;
}
}else{
var n=[];
n.push(dojo.byId(_747));
n.alreadyChecked=true;
return n;
}
};
dojo.lfx.html.propertyAnimation=function(_74a,_74b,_74c,_74d,_74e){
_74a=dojo.lfx.html._byId(_74a);
var _74f={"propertyMap":_74b,"nodes":_74a,"duration":_74c,"easing":_74d||dojo.lfx.easeDefault};
var _750=function(args){
if(args.nodes.length==1){
var pm=args.propertyMap;
if(!dojo.lang.isArray(args.propertyMap)){
var parr=[];
for(var _754 in pm){
pm[_754].property=_754;
parr.push(pm[_754]);
}
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 _756=function(_757){
var _758=[];
dojo.lang.forEach(_757,function(c){
_758.push(Math.round(c));
});
return _758;
};
var _75a=function(n,_75c){
n=dojo.byId(n);
if(!n||!n.style){
return;
}
for(var s in _75c){
try{
if(s=="opacity"){
dojo.html.setOpacity(n,_75c[s]);
}else{
n.style[s]=_75c[s];
}
}
catch(e){
dojo.debug(e);
}
}
};
var _75e=function(_75f){
this._properties=_75f;
this.diffs=new Array(_75f.length);
dojo.lang.forEach(_75f,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 _766=null;
if(dojo.lang.isArray(prop.start)){
}else{
if(prop.start instanceof dojo.gfx.color.Color){
_766=(prop.units||"rgb")+"(";
for(var j=0;j<prop.startRgb.length;j++){
_766+=Math.round(((prop.endRgb[j]-prop.startRgb[j])*n)+prop.startRgb[j])+(j<prop.startRgb.length-1?",":"");
}
_766+=")";
}else{
_766=((this.diffs[i])*n)+prop.start+(prop.property!="opacity"?prop.units||"px":"");
}
}
ret[dojo.html.toCamelCase(prop.property)]=_766;
},this);
return ret;
};
};
var anim=new dojo.lfx.Animation({beforeBegin:function(){
_750(_74f);
anim.curve=new _75e(_74f.propertyMap);
},onAnimate:function(_769){
dojo.lang.forEach(_74f.nodes,function(node){
_75a(node,_769);
});
}},_74f.duration,null,_74f.easing);
if(_74e){
for(var x in _74e){
if(dojo.lang.isFunction(_74e[x])){
anim.connect(x,anim,_74e[x]);
}
}
}
return anim;
};
dojo.lfx.html._makeFadeable=function(_76c){
var _76d=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(_76c)){
dojo.lang.forEach(_76c,_76d);
}else{
_76d(_76c);
}
};
dojo.lfx.html.fade=function(_76f,_770,_771,_772,_773){
_76f=dojo.lfx.html._byId(_76f);
var _774={property:"opacity"};
if(!dj_undef("start",_770)){
_774.start=_770.start;
}else{
_774.start=function(){
return dojo.html.getOpacity(_76f[0]);
};
}
if(!dj_undef("end",_770)){
_774.end=_770.end;
}else{
dojo.raise("dojo.lfx.html.fade needs an end value");
}
var anim=dojo.lfx.propertyAnimation(_76f,[_774],_771,_772);
anim.connect("beforeBegin",function(){
dojo.lfx.html._makeFadeable(_76f);
});
if(_773){
anim.connect("onEnd",function(){
_773(_76f,anim);
});
}
return anim;
};
dojo.lfx.html.fadeIn=function(_776,_777,_778,_779){
return dojo.lfx.html.fade(_776,{end:1},_777,_778,_779);
};
dojo.lfx.html.fadeOut=function(_77a,_77b,_77c,_77d){
return dojo.lfx.html.fade(_77a,{end:0},_77b,_77c,_77d);
};
dojo.lfx.html.fadeShow=function(_77e,_77f,_780,_781){
_77e=dojo.lfx.html._byId(_77e);
dojo.lang.forEach(_77e,function(node){
dojo.html.setOpacity(node,0);
});
var anim=dojo.lfx.html.fadeIn(_77e,_77f,_780,_781);
anim.connect("beforeBegin",function(){
if(dojo.lang.isArrayLike(_77e)){
dojo.lang.forEach(_77e,dojo.html.show);
}else{
dojo.html.show(_77e);
}
});
return anim;
};
dojo.lfx.html.fadeHide=function(_784,_785,_786,_787){
var anim=dojo.lfx.html.fadeOut(_784,_785,_786,function(){
if(dojo.lang.isArrayLike(_784)){
dojo.lang.forEach(_784,dojo.html.hide);
}else{
dojo.html.hide(_784);
}
if(_787){
_787(_784,anim);
}
});
return anim;
};
dojo.lfx.html.wipeIn=function(_789,_78a,_78b,_78c){
_789=dojo.lfx.html._byId(_789);
var _78d=[];
dojo.lang.forEach(_789,function(node){
var _78f={};
var _790,_791,_792;
with(node.style){
_790=top;
_791=left;
_792=position;
top="-9999px";
left="-9999px";
position="absolute";
display="";
}
var _793=dojo.html.getBorderBox(node).height;
with(node.style){
top=_790;
left=_791;
position=_792;
display="none";
}
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:1,end:function(){
return _793;
}}},_78a,_78b);
anim.connect("beforeBegin",function(){
_78f.overflow=node.style.overflow;
_78f.height=node.style.height;
with(node.style){
overflow="hidden";
_793="1px";
}
dojo.html.show(node);
});
anim.connect("onEnd",function(){
with(node.style){
overflow=_78f.overflow;
_793=_78f.height;
}
if(_78c){
_78c(node,anim);
}
});
_78d.push(anim);
});
return dojo.lfx.combine(_78d);
};
dojo.lfx.html.wipeOut=function(_795,_796,_797,_798){
_795=dojo.lfx.html._byId(_795);
var _799=[];
dojo.lang.forEach(_795,function(node){
var _79b={};
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:function(){
return dojo.html.getContentBox(node).height;
},end:1}},_796,_797,{"beforeBegin":function(){
_79b.overflow=node.style.overflow;
_79b.height=node.style.height;
with(node.style){
overflow="hidden";
}
dojo.html.show(node);
},"onEnd":function(){
dojo.html.hide(node);
with(node.style){
overflow=_79b.overflow;
height=_79b.height;
}
if(_798){
_798(node,anim);
}
}});
_799.push(anim);
});
return dojo.lfx.combine(_799);
};
dojo.lfx.html.slideTo=function(_79d,_79e,_79f,_7a0,_7a1){
_79d=dojo.lfx.html._byId(_79d);
var _7a2=[];
var _7a3=dojo.html.getComputedStyle;
if(dojo.lang.isArray(_79e)){
dojo.deprecated("dojo.lfx.html.slideTo(node, array)","use dojo.lfx.html.slideTo(node, {top: value, left: value});","0.5");
_79e={top:_79e[0],left:_79e[1]};
}
dojo.lang.forEach(_79d,function(node){
var top=null;
var left=null;
var init=(function(){
var _7a8=node;
return function(){
var pos=_7a3(_7a8,"position");
top=(pos=="absolute"?node.offsetTop:parseInt(_7a3(node,"top"))||0);
left=(pos=="absolute"?node.offsetLeft:parseInt(_7a3(node,"left"))||0);
if(!dojo.lang.inArray(["absolute","relative"],pos)){
var ret=dojo.html.abs(_7a8,true);
dojo.html.setStyleAttributes(_7a8,"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:(_79e.top||0)},"left":{start:left,end:(_79e.left||0)}},_79f,_7a0,{"beforeBegin":init});
if(_7a1){
anim.connect("onEnd",function(){
_7a1(_79d,anim);
});
}
_7a2.push(anim);
});
return dojo.lfx.combine(_7a2);
};
dojo.lfx.html.slideBy=function(_7ac,_7ad,_7ae,_7af,_7b0){
_7ac=dojo.lfx.html._byId(_7ac);
var _7b1=[];
var _7b2=dojo.html.getComputedStyle;
if(dojo.lang.isArray(_7ad)){
dojo.deprecated("dojo.lfx.html.slideBy(node, array)","use dojo.lfx.html.slideBy(node, {top: value, left: value});","0.5");
_7ad={top:_7ad[0],left:_7ad[1]};
}
dojo.lang.forEach(_7ac,function(node){
var top=null;
var left=null;
var init=(function(){
var _7b7=node;
return function(){
var pos=_7b2(_7b7,"position");
top=(pos=="absolute"?node.offsetTop:parseInt(_7b2(node,"top"))||0);
left=(pos=="absolute"?node.offsetLeft:parseInt(_7b2(node,"left"))||0);
if(!dojo.lang.inArray(["absolute","relative"],pos)){
var ret=dojo.html.abs(_7b7,true);
dojo.html.setStyleAttributes(_7b7,"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+(_7ad.top||0)},"left":{start:left,end:left+(_7ad.left||0)}},_7ae,_7af).connect("beforeBegin",init);
if(_7b0){
anim.connect("onEnd",function(){
_7b0(_7ac,anim);
});
}
_7b1.push(anim);
});
return dojo.lfx.combine(_7b1);
};
dojo.lfx.html.explode=function(_7bb,_7bc,_7bd,_7be,_7bf){
var h=dojo.html;
_7bb=dojo.byId(_7bb);
_7bc=dojo.byId(_7bc);
var _7c1=h.toCoordinateObject(_7bb,true);
var _7c2=document.createElement("div");
h.copyStyle(_7c2,_7bc);
if(_7bc.explodeClassName){
_7c2.className=_7bc.explodeClassName;
}
with(_7c2.style){
position="absolute";
display="none";
var _7c3=h.getStyle(_7bb,"background-color");
backgroundColor=_7c3?_7c3.toLowerCase():"transparent";
backgroundColor=(backgroundColor=="transparent")?"rgb(221, 221, 221)":backgroundColor;
}
dojo.body().appendChild(_7c2);
with(_7bc.style){
visibility="hidden";
display="block";
}
var _7c4=h.toCoordinateObject(_7bc,true);
with(_7bc.style){
display="none";
visibility="visible";
}
var _7c5={opacity:{start:0.5,end:1}};
dojo.lang.forEach(["height","width","top","left"],function(type){
_7c5[type]={start:_7c1[type],end:_7c4[type]};
});
var anim=new dojo.lfx.propertyAnimation(_7c2,_7c5,_7bd,_7be,{"beforeBegin":function(){
h.setDisplay(_7c2,"block");
},"onEnd":function(){
h.setDisplay(_7bc,"block");
_7c2.parentNode.removeChild(_7c2);
}});
if(_7bf){
anim.connect("onEnd",function(){
_7bf(_7bc,anim);
});
}
return anim;
};
dojo.lfx.html.implode=function(_7c8,end,_7ca,_7cb,_7cc){
var h=dojo.html;
_7c8=dojo.byId(_7c8);
end=dojo.byId(end);
var _7ce=dojo.html.toCoordinateObject(_7c8,true);
var _7cf=dojo.html.toCoordinateObject(end,true);
var _7d0=document.createElement("div");
dojo.html.copyStyle(_7d0,_7c8);
if(_7c8.explodeClassName){
_7d0.className=_7c8.explodeClassName;
}
dojo.html.setOpacity(_7d0,0.3);
with(_7d0.style){
position="absolute";
display="none";
backgroundColor=h.getStyle(_7c8,"background-color").toLowerCase();
}
dojo.body().appendChild(_7d0);
var _7d1={opacity:{start:1,end:0.5}};
dojo.lang.forEach(["height","width","top","left"],function(type){
_7d1[type]={start:_7ce[type],end:_7cf[type]};
});
var anim=new dojo.lfx.propertyAnimation(_7d0,_7d1,_7ca,_7cb,{"beforeBegin":function(){
dojo.html.hide(_7c8);
dojo.html.show(_7d0);
},"onEnd":function(){
_7d0.parentNode.removeChild(_7d0);
}});
if(_7cc){
anim.connect("onEnd",function(){
_7cc(_7c8,anim);
});
}
return anim;
};
dojo.lfx.html.highlight=function(_7d4,_7d5,_7d6,_7d7,_7d8){
_7d4=dojo.lfx.html._byId(_7d4);
var _7d9=[];
dojo.lang.forEach(_7d4,function(node){
var _7db=dojo.html.getBackgroundColor(node);
var bg=dojo.html.getStyle(node,"background-color").toLowerCase();
var _7dd=dojo.html.getStyle(node,"background-image");
var _7de=(bg=="transparent"||bg=="rgba(0, 0, 0, 0)");
while(_7db.length>3){
_7db.pop();
}
var rgb=new dojo.gfx.color.Color(_7d5);
var _7e0=new dojo.gfx.color.Color(_7db);
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:rgb,end:_7e0}},_7d6,_7d7,{"beforeBegin":function(){
if(_7dd){
node.style.backgroundImage="none";
}
node.style.backgroundColor="rgb("+rgb.toRgb().join(",")+")";
},"onEnd":function(){
if(_7dd){
node.style.backgroundImage=_7dd;
}
if(_7de){
node.style.backgroundColor="transparent";
}
if(_7d8){
_7d8(node,anim);
}
}});
_7d9.push(anim);
});
return dojo.lfx.combine(_7d9);
};
dojo.lfx.html.unhighlight=function(_7e2,_7e3,_7e4,_7e5,_7e6){
_7e2=dojo.lfx.html._byId(_7e2);
var _7e7=[];
dojo.lang.forEach(_7e2,function(node){
var _7e9=new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node));
var rgb=new dojo.gfx.color.Color(_7e3);
var _7eb=dojo.html.getStyle(node,"background-image");
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:_7e9,end:rgb}},_7e4,_7e5,{"beforeBegin":function(){
if(_7eb){
node.style.backgroundImage="none";
}
node.style.backgroundColor="rgb("+_7e9.toRgb().join(",")+")";
},"onEnd":function(){
if(_7e6){
_7e6(node,anim);
}
}});
_7e7.push(anim);
});
return dojo.lfx.combine(_7e7);
};
dojo.lang.mixin(dojo.lfx,dojo.lfx.html);
dojo.provide("dojo.lfx.*");
dojo.provide("dojo.lfx.toggle");
dojo.lfx.toggle.plain={show:function(node,_7ee,_7ef,_7f0){
dojo.html.show(node);
if(dojo.lang.isFunction(_7f0)){
_7f0();
}
},hide:function(node,_7f2,_7f3,_7f4){
dojo.html.hide(node);
if(dojo.lang.isFunction(_7f4)){
_7f4();
}
}};
dojo.lfx.toggle.fade={show:function(node,_7f6,_7f7,_7f8){
dojo.lfx.fadeShow(node,_7f6,_7f7,_7f8).play();
},hide:function(node,_7fa,_7fb,_7fc){
dojo.lfx.fadeHide(node,_7fa,_7fb,_7fc).play();
}};
dojo.lfx.toggle.wipe={show:function(node,_7fe,_7ff,_800){
dojo.lfx.wipeIn(node,_7fe,_7ff,_800).play();
},hide:function(node,_802,_803,_804){
dojo.lfx.wipeOut(node,_802,_803,_804).play();
}};
dojo.lfx.toggle.explode={show:function(node,_806,_807,_808,_809){
dojo.lfx.explode(_809||{x:0,y:0,width:0,height:0},node,_806,_807,_808).play();
},hide:function(node,_80b,_80c,_80d,_80e){
dojo.lfx.implode(node,_80e||{x:0,y:0,width:0,height:0},_80b,_80c,_80d).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(_815){
try{
if(this.bgIframe){
this.bgIframe.remove();
delete this.bgIframe;
}
if(!_815&&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 _819=w||wh.width;
var _81a=h||wh.height;
if(this.width==_819&&this.height==_81a){
return false;
}
this.width=_819;
this.height=_81a;
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(_81d){
if(_81d.checkSize){
_81d.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 _81e=dojo.global();
var _81f=dojo.doc();
try{
if(_81e["getSelection"]){
if(dojo.render.html.safari){
_81e.getSelection().collapse();
}else{
_81e.getSelection().removeAllRanges();
}
}else{
if(_81f.selection){
if(_81f.selection.empty){
_81f.selection.empty();
}else{
if(_81f.selection.clear){
_81f.selection.clear();
}
}
}
}
return true;
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.html.disableSelection=function(_820){
_820=dojo.byId(_820)||dojo.body();
var h=dojo.render.html;
if(h.mozilla){
_820.style.MozUserSelect="none";
}else{
if(h.safari){
_820.style.KhtmlUserSelect="none";
}else{
if(h.ie){
_820.unselectable="on";
}else{
return false;
}
}
}
return true;
};
dojo.html.enableSelection=function(_822){
_822=dojo.byId(_822)||dojo.body();
var h=dojo.render.html;
if(h.mozilla){
_822.style.MozUserSelect="";
}else{
if(h.safari){
_822.style.KhtmlUserSelect="";
}else{
if(h.ie){
_822.unselectable="off";
}else{
return false;
}
}
}
return true;
};
dojo.html.selectElement=function(_824){
dojo.deprecated("dojo.html.selectElement","replaced by dojo.html.selection.selectElementChildren",0.5);
};
dojo.html.selectInputText=function(_825){
var _826=dojo.global();
var _827=dojo.doc();
_825=dojo.byId(_825);
if(_827["selection"]&&dojo.body()["createTextRange"]){
var _828=_825.createTextRange();
_828.moveStart("character",0);
_828.moveEnd("character",_825.value.length);
_828.select();
}else{
if(_826["getSelection"]){
var _829=_826.getSelection();
_825.setSelectionRange(0,_825.value.length);
}
}
_825.focus();
};
dojo.html.isSelectionCollapsed=function(){
dojo.deprecated("dojo.html.isSelectionCollapsed","replaced by dojo.html.selection.isCollapsed",0.5);
return dojo.html.selection.isCollapsed();
};
dojo.lang.mixin(dojo.html.selection,{getType:function(){
if(dojo.doc()["selection"]){
return dojo.html.selectionType[dojo.doc().selection.type.toUpperCase()];
}else{
var _82a=dojo.html.selectionType.TEXT;
var oSel;
try{
oSel=dojo.global().getSelection();
}
catch(e){
}
if(oSel&&oSel.rangeCount==1){
var _82c=oSel.getRangeAt(0);
if(_82c.startContainer==_82c.endContainer&&(_82c.endOffset-_82c.startOffset)==1&&_82c.startContainer.nodeType!=dojo.dom.TEXT_NODE){
_82a=dojo.html.selectionType.CONTROL;
}
}
return _82a;
}
},isCollapsed:function(){
var _82d=dojo.global();
var _82e=dojo.doc();
if(_82e["selection"]){
return _82e.selection.createRange().text=="";
}else{
if(_82d["getSelection"]){
var _82f=_82d.getSelection();
if(dojo.lang.isString(_82f)){
return _82f=="";
}else{
return _82f.isCollapsed||_82f.toString()=="";
}
}
}
},getSelectedElement:function(){
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
if(dojo.doc()["selection"]){
var _830=dojo.doc().selection.createRange();
if(_830&&_830.item){
return dojo.doc().selection.createRange().item(0);
}
}else{
var _831=dojo.global().getSelection();
return _831.anchorNode.childNodes[_831.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 _833=dojo.global().getSelection();
if(_833){
var node=_833.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 _835=dojo.global().getSelection();
if(_835){
return _835.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 _836=dojo.global().getSelection();
if(_836&&_836.rangeCount){
var frag=_836.getRangeAt(0).cloneContents();
var div=document.createElement("div");
div.appendChild(frag);
return div.innerHTML;
}
return null;
}
},hasAncestorElement:function(_839){
return (dojo.html.selection.getAncestorElement.apply(this,arguments)!=null);
},getAncestorElement:function(_83a){
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(_83f){
var _840=dojo.global();
var _841=dojo.doc();
_83f=dojo.byId(_83f);
if(_841.selection&&dojo.body().createTextRange){
try{
var _842=dojo.body().createControlRange();
_842.addElement(_83f);
_842.select();
}
catch(e){
dojo.html.selection.selectElementChildren(_83f);
}
}else{
if(_840["getSelection"]){
var _843=_840.getSelection();
if(_843["removeAllRanges"]){
var _842=_841.createRange();
_842.selectNode(_83f);
_843.removeAllRanges();
_843.addRange(_842);
}
}
}
},selectElementChildren:function(_844){
var _845=dojo.global();
var _846=dojo.doc();
_844=dojo.byId(_844);
if(_846.selection&&dojo.body().createTextRange){
var _847=dojo.body().createTextRange();
_847.moveToElementText(_844);
_847.select();
}else{
if(_845["getSelection"]){
var _848=_845.getSelection();
if(_848["setBaseAndExtent"]){
_848.setBaseAndExtent(_844,0,_844,_844.innerText.length-1);
}else{
if(_848["selectAllChildren"]){
_848.selectAllChildren(_844);
}
}
}
}
},getBookmark:function(){
var _849;
var _84a=dojo.doc();
if(_84a["selection"]){
var _84b=_84a.selection.createRange();
_849=_84b.getBookmark();
}else{
var _84c;
try{
_84c=dojo.global().getSelection();
}
catch(e){
}
if(_84c){
var _84b=_84c.getRangeAt(0);
_849=_84b.cloneRange();
}else{
dojo.debug("No idea how to store the current selection for this browser!");
}
}
return _849;
},moveToBookmark:function(_84d){
var _84e=dojo.doc();
if(_84e["selection"]){
var _84f=_84e.selection.createRange();
_84f.moveToBookmark(_84d);
_84f.select();
}else{
var _850;
try{
_850=dojo.global().getSelection();
}
catch(e){
}
if(_850&&_850["removeAllRanges"]){
_850.removeAllRanges();
_850.addRange(_84d);
}else{
dojo.debug("No idea how to restore selection for this browser!");
}
}
},collapse:function(_851){
if(dojo.global()["getSelection"]){
var _852=dojo.global().getSelection();
if(_852.removeAllRanges){
if(_851){
_852.collapseToStart();
}else{
_852.collapseToEnd();
}
}else{
dojo.global().getSelection().collapse(_851);
}
}else{
if(dojo.doc().selection){
var _853=dojo.doc().selection.createRange();
_853.collapse(_851);
_853.select();
}
}
},remove:function(){
if(dojo.doc().selection){
var _854=dojo.doc().selection;
if(_854.type.toUpperCase()!="NONE"){
_854.clear();
}
return _854;
}else{
var _854=dojo.global().getSelection();
for(var i=0;i<_854.rangeCount;i++){
_854.getRangeAt(i).deleteContents();
}
return _854;
}
}});
dojo.provide("dojo.Deferred");
dojo.Deferred=function(_856){
this.chain=[];
this.id=this._nextId();
this.fired=-1;
this.paused=0;
this.results=[null,null];
this.canceller=_856;
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 _858=new dojo.Deferred();
_858.callback();
return _858;
},repr:function(){
var _859;
if(this.fired==-1){
_859="unfired";
}else{
if(this.fired==0){
_859="success";
}else{
_859="error";
}
}
return "Deferred("+this.id+", "+_859+")";
},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 _861=this.getFunctionFromArgs(cb,cbfn);
if(arguments.length>2){
_861=dojo.lang.curryArguments(null,_861,arguments,2);
}
return this.addCallbacks(_861,_861);
},addCallback:function(cb,cbfn){
var _864=this.getFunctionFromArgs(cb,cbfn);
if(arguments.length>2){
_864=dojo.lang.curryArguments(null,_864,arguments,2);
}
return this.addCallbacks(_864,null);
},addErrback:function(cb,cbfn){
var _867=this.getFunctionFromArgs(cb,cbfn);
if(arguments.length>2){
_867=dojo.lang.curryArguments(null,_867,arguments,2);
}
return this.addCallbacks(null,_867);
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 _86a=this.chain;
var _86b=this.fired;
var res=this.results[_86b];
var self=this;
var cb=null;
while(_86a.length>0&&this.paused==0){
var pair=_86a.shift();
var f=pair[_86b];
if(f==null){
continue;
}
try{
res=f(res);
_86b=((res instanceof Error)?1:0);
if(res instanceof dojo.Deferred){
cb=function(res){
self._continue(res);
};
this._pause();
}
}
catch(err){
_86b=1;
res=err;
}
}
this.fired=_86b;
this.results[_86b]=res;
if((cb)&&(this.paused)){
res.addBoth(cb);
}
}});
dojo.provide("dojo.widget.RichText");
if(dojo.hostenv.post_load_){
(function(){
var _872=dojo.doc().createElement("textarea");
_872.id="dojo.widget.RichText.savedContent";
_872.style="display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;";
dojo.body().appendChild(_872);
})();
}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(_877){
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)&&(_877["nodeName"])){
this.domNode=_877;
}
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);
this.domNode.setAttribute("tabIndex","-1");
var _87a=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(_87a,10);
}else{
_87a();
}
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 _87b=this;
dojo.event.connect(this,"postCreate",function(){
dojo.html.insertAfter(_87b.textarea,_87b.domNode);
});
}else{
var html=this._preFilterContent(dojo.string.trim(this.domNode.innerHTML));
}
if(html==""){
html="&nbsp;";
}
var _87c=dojo.html.getContentBox(this.domNode);
this._oldHeight=_87c.height;
this._oldWidth=_87c.width;
this._firstChildContributingMargin=this._getContributingMargin(this.domNode,"top");
this._lastChildContributingMargin=this._getContributingMargin(this.domNode,"bottom");
this.savedContent=this.domNode.innerHTML;
this.domNode.innerHTML="";
this.editingArea=dojo.doc().createElement("div");
this.domNode.appendChild(this.editingArea);
if((this.domNode["nodeName"])&&(this.domNode.nodeName=="LI")){
this.domNode.innerHTML=" <br>";
}
if(this.saveName!=""){
var _87d=dojo.doc().getElementById("dojo.widget.RichText.savedContent");
if(_87d.value!=""){
var _87e=_87d.value.split(this._SEPARATOR);
for(var i=0;i<_87e.length;i++){
var data=_87e[i].split(":");
if(data[0]==this.saveName){
html=data[1];
_87e.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.setAttribute("title","Rich text editor");
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,html { margin:0;padding:0; } body{font-family: Helvetica,Arial,Verdana,sans-serif; font-size: 12px; border:0;overflow:hidden;} p { margin: 0 !important; } </style></head><body tabindex=\"-1\"><div></div></body></html>");
this.document.close();
this.document.documentElement.dir=document.documentElement.dir;
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 _882=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","div","ul"];
var _883="";
for(var i=0;i<_882.length;i++){
if(_882[i].charAt(1)!="l"){
_883+="<"+_882[i]+"><span>content</span></"+_882[i]+">";
}else{
_883+="<"+_882[i]+"><li>content</li></"+_882[i]+">";
}
}
with(this.editNode.style){
position="absolute";
left="-2000px";
top="-2000px";
}
this.editNode.innerHTML=_883;
var node=this.editNode.firstChild;
while(node){
dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[node.firstChild]);
var _885=node.tagName.toLowerCase();
this._local2NativeFormatNames[_885]=this.queryCommandValue("formatblock");
this._native2LocalFormatNames[this._local2NativeFormatNames[_885]]=_885;
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(_887,side){
if(dojo.html.getPixelValue(_887,"border-"+side+"-width",false)){
return false;
}else{
if(dojo.html.getPixelValue(_887,"padding-"+side,false)){
return false;
}else{
return true;
}
}
},_getContributingMargin:function(_889,_88a){
if(_88a=="top"){
var _88b="previousSibling";
var _88c="nextSibling";
var _88d="firstChild";
var _88e="margin-top";
var _88f="margin-bottom";
}else{
var _88b="nextSibling";
var _88c="previousSibling";
var _88d="lastChild";
var _88e="margin-bottom";
var _88f="margin-top";
}
var _890=dojo.html.getPixelValue(_889,_88e,false);
function isSignificantNode(_891){
return !(_891.nodeType==3&&dojo.string.isBlank(_891.data))&&dojo.html.getStyle(_891,"display")!="none"&&!dojo.html.isPositionAbsolute(_891);
}
var _892=0;
var _893=_889[_88d];
while(_893){
while((!isSignificantNode(_893))&&_893[_88c]){
_893=_893[_88c];
}
_892=Math.max(_892,dojo.html.getPixelValue(_893,_88e,false));
if(!this._hasCollapseableMargin(_893,_88a)){
break;
}
_893=_893[_88d];
}
if(!this._hasCollapseableMargin(_889,_88a)){
return parseInt(_892);
}
var _894=0;
var _895=_889[_88b];
while(_895){
if(isSignificantNode(_895)){
_894=dojo.html.getPixelValue(_895,_88f,false);
break;
}
_895=_895[_88b];
}
if(!_895){
_894=dojo.html.getPixelValue(_889.parentNode,_88e,false);
}
if(_892>_890){
return parseInt(Math.max((_892-_890)-_894,0));
}else{
return 0;
}
},_drawIframe:function(html){
var _897=Boolean(dojo.render.html.moz&&(typeof window.XML=="undefined"));
if(!this.iframe){
var _898=(new dojo.uri.Uri(dojo.doc().location)).host;
this.iframe=dojo.doc().createElement("iframe");
this.iframe.setAttribute("title","Rich text editor");
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!=_898)?("#"+dojo.doc().domain):"");
this.iframe.width=this.inheritWidth?this._oldWidth:"100%";
if(this.height){
this.iframe.style.height=this.height;
}else{
var _899=this._oldHeight;
if(this._hasCollapseableMargin(this.domNode,"top")){
_899+=this._firstChildContributingMargin;
}
if(this._hasCollapseableMargin(this.domNode,"bottom")){
_899+=this._lastChildContributingMargin;
}
this.iframe.height=_899;
}
var _89a=dojo.doc().createElement("div");
_89a.innerHTML=html;
this.editingArea.appendChild(_89a);
if(this.relativeImageUrls){
var imgs=_89a.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=_89a.innerHTML;
}
var _89d=dojo.html.firstElement(_89a);
var _89e=dojo.html.lastElement(_89a);
if(_89d){
_89d.style.marginTop=this._firstChildContributingMargin+"px";
}
if(_89e){
_89e.style.marginBottom=this._lastChildContributingMargin+"px";
}
this.editingArea.appendChild(this.iframe);
if(dojo.render.html.safari){
this.iframe.src=this.iframe.src;
}
var _89f=false;
var _8a0=dojo.lang.hitch(this,function(){
if(!_89f){
_89f=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;
}
}
this.document.dir=document.documentElement.dir;
var _8a1=(function(_8a2){
return function(_8a3){
return dojo.html.getStyle(_8a2,_8a3);
};
})(this.domNode);
var font=_8a1("font-weight")+" "+_8a1("font-size")+" "+_8a1("font-family");
var _8a5="1.0";
var _8a6=dojo.html.getUnitValue(this.domNode,"line-height");
if(_8a6.value&&_8a6.units==""){
_8a5=_8a6.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:"+_8a5+"}"+"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(_89a);
this.document.body.innerHTML=html;
if(_897||dojo.render.html.safari){
this.document.designMode="on";
}
this.onLoad();
}else{
dojo.html.removeNode(_89a);
this.editNode.innerHTML=html;
this.onDisplayChanged();
}
});
if(this.editNode){
_8a0();
}else{
if(dojo.render.html.moz){
this.iframe.onload=function(){
setTimeout(_8a0,250);
};
}else{
this.iframe.onload=_8a0;
}
}
},_applyEditingAreaStyleSheets:function(){
var _8a7=[];
if(this.styleSheets){
_8a7=this.styleSheets.split(";");
this.styleSheets="";
}
_8a7=_8a7.concat(this.editingAreaStyleSheets);
this.editingAreaStyleSheets=[];
if(_8a7.length>0){
for(var i=0;i<_8a7.length;i++){
var url=_8a7[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 _8ad=this.document.createElement("link");
with(_8ad){
rel="stylesheet";
type="text/css";
href=url;
}
head.appendChild(_8ad);
}
},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 _8b0=dojo.lang.find(this.editingAreaStyleSheets,url);
if(_8b0==-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[_8b0];
var _8b1=this.document.getElementsByTagName("link");
for(var i=0;i<_8b1.length;i++){
if(_8b1[i].href==url){
if(dojo.render.html.ie){
_8b1[i].href="";
}
dojo.html.removeNode(_8b1[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 _8b6=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){
_8b6=true;
}
}
try{
var _8b7=new ActiveXObject("DEGetBlockFmtNamesParam.DEGetBlockFmtNamesParam");
obj.ExecCommand(this._activeX.command["getblockformatnames"],0,_8b7);
var _8b8=new VBArray(_8b7.Names);
var _8b9=_8b8.toArray();
var _8ba=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","ul","","","","","div"];
for(var i=0;i<_8ba.length;++i){
if(_8ba[i].length>0){
this._local2NativeFormatNames[_8b9[i]]=_8ba[i];
this._native2LocalFormatNames[_8ba[i]]=_8b9[i];
}
}
}
catch(e){
_8b6=true;
}
if(obj&&!this.object){
dojo.body().removeChild(obj);
}
}
return !_8b6;
},_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 _8be=dojo.event.browser.addListener;
var self=this;
dojo.lang.forEach(this.events,function(e){
var l=_8be(self.document,e.substr(2).toLowerCase(),dojo.lang.hitch(self,e));
if(e=="onBlur"){
var _8c2={unBlur:function(e){
dojo.event.browser.removeListener(doc,"blur",l);
}};
dojo.event.connect("before",self,"close",_8c2,"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)){
}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);
}
if(this.postRteFocus&&dojo.render.html.mozilla&&!e.shiftKey&&e.keyCode==e.KEY_TAB){
var _8c7=dojo.byId(this.postRteFocus);
setTimeout(function(){
_8c7.focus();
},0);
dojo.event.browser.stopEvent(e);
}
var _8c8=e.ctrlKey?this.KEY_CTRL:0;
if(this._keyHandlers[e.key]){
var _8c9=this._keyHandlers[e.key],i=0,_8cb;
while(_8cb=_8c9[i++]){
if(_8c8==_8cb.modifiers){
e.preventDefault();
_8cb.handler.call(this);
break;
}
}
}
dojo.lang.setTimeout(this,this.onKeyPressed,1,e);
},addKeyHandler:function(key,_8cd,_8ce){
if(!(this._keyHandlers[key] instanceof Array)){
this._keyHandlers[key]=[];
}
this._keyHandlers[key].push({modifiers:_8cd||0,handler:_8ce});
},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 _8d6=cmd.toLowerCase();
if(_8d6=="formatblock"){
if(drh.safari){
_8d6="heading";
}
}else{
if(this.object){
switch(_8d6){
case "createlink":
_8d6="hyperlink";
break;
case "insertimage":
_8d6="image";
break;
}
}else{
if(_8d6=="hilitecolor"&&!drh.mozilla){
_8d6="backcolor";
}
}
}
return _8d6;
},_safariIsLeopard:function(){
var _8d7=false;
if(dojo.render.html.safari){
var tmp=dojo.render.html.UA.split("AppleWebKit/")[1];
var ver=parseFloat(tmp.split(" ")[0]);
if(ver>=420){
_8d7=true;
}
}
return _8d7;
},queryCommandAvailable:function(_8da){
var ie=1;
var _8dc=1<<1;
var _8dd=1<<2;
var _8de=1<<3;
var _8df=1<<4;
var _8e0=this._safariIsLeopard();
function isSupportedBy(_8e1){
return {ie:Boolean(_8e1&ie),mozilla:Boolean(_8e1&_8dc),safari:Boolean(_8e1&_8dd),safari420:Boolean(_8e1&_8df),opera:Boolean(_8e1&_8de)};
}
var _8e2=null;
switch(_8da.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":
_8e2=isSupportedBy(_8dc|ie|_8dd|_8de);
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":
_8e2=isSupportedBy(_8dc|ie|_8de|_8df);
break;
case "blockdirltr":
case "blockdirrtl":
case "dirltr":
case "dirrtl":
case "inlinedirltr":
case "inlinedirrtl":
_8e2=isSupportedBy(ie);
break;
case "cut":
case "copy":
case "paste":
_8e2=isSupportedBy(ie|_8dc|_8df);
break;
case "inserttable":
_8e2=isSupportedBy(_8dc|(this.object?ie:0));
break;
case "insertcell":
case "insertcol":
case "insertrow":
case "deletecells":
case "deletecols":
case "deleterows":
case "mergecells":
case "splitcell":
_8e2=isSupportedBy(this.object?ie:0);
break;
default:
return false;
}
return (dojo.render.html.ie&&_8e2.ie)||(dojo.render.html.mozilla&&_8e2.mozilla)||(dojo.render.html.safari&&_8e2.safari)||(_8e0&&_8e2.safari420)||(dojo.render.html.opera&&_8e2.opera);
},execCommand:function(_8e3,_8e4){
var _8e5;
this.focus();
_8e3=this._normalizeCommand(_8e3);
if(_8e4!=undefined){
if(_8e3=="heading"){
throw new Error("unimplemented");
}else{
if(_8e3=="formatblock"){
if(this.object){
_8e4=this._native2LocalFormatNames[_8e4];
}else{
if(dojo.render.html.ie){
_8e4="<"+_8e4+">";
}
}
}
}
}
if(this.object){
switch(_8e3){
case "hilitecolor":
_8e3="setbackcolor";
break;
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_8e3="set"+_8e3;
break;
case "formatblock":
_8e3="setblockformat";
}
if(_8e3=="strikethrough"){
_8e3="inserthtml";
var _8e6=this.document.selection.createRange();
if(!_8e6.htmlText){
return;
}
_8e4=_8e6.htmlText.strike();
}else{
if(_8e3=="inserthorizontalrule"){
_8e3="inserthtml";
_8e4="<hr>";
}
}
if(_8e3=="inserthtml"){
var _8e6=this.document.selection.createRange();
if(this.document.selection.type.toUpperCase()=="CONTROL"){
for(var i=0;i<_8e6.length;i++){
_8e6.item(i).outerHTML=_8e4;
}
}else{
_8e6.pasteHTML(_8e4);
_8e6.select();
}
_8e5=true;
}else{
if(arguments.length==1){
_8e5=this.object.ExecCommand(this._activeX.command[_8e3],this._activeX.ui.noprompt);
}else{
_8e5=this.object.ExecCommand(this._activeX.command[_8e3],this._activeX.ui.noprompt,_8e4);
}
}
}else{
if(_8e3=="inserthtml"){
if(dojo.render.html.ie){
var _8e8=this.document.selection.createRange();
_8e8.pasteHTML(_8e4);
_8e8.select();
return true;
}else{
return this.document.execCommand(_8e3,false,_8e4);
}
}else{
if((_8e3=="unlink")&&(this.queryCommandEnabled("unlink"))&&(dojo.render.html.mozilla)){
var _8e9=this.window.getSelection();
var _8ea=_8e9.getRangeAt(0);
var _8eb=_8ea.startContainer;
var _8ec=_8ea.startOffset;
var _8ed=_8ea.endContainer;
var _8ee=_8ea.endOffset;
var a=dojo.withGlobal(this.window,"getAncestorElement",dojo.html.selection,["a"]);
dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[a]);
_8e5=this.document.execCommand("unlink",false,null);
var _8ea=this.document.createRange();
_8ea.setStart(_8eb,_8ec);
_8ea.setEnd(_8ed,_8ee);
_8e9.removeAllRanges();
_8e9.addRange(_8ea);
return _8e5;
}else{
if((_8e3=="hilitecolor")&&(dojo.render.html.mozilla)){
this.document.execCommand("useCSS",false,false);
_8e5=this.document.execCommand(_8e3,false,_8e4);
this.document.execCommand("useCSS",false,true);
}else{
if((dojo.render.html.ie)&&((_8e3=="backcolor")||(_8e3=="forecolor"))){
_8e4=arguments.length>1?_8e4:null;
_8e5=this.document.execCommand(_8e3,false,_8e4);
}else{
_8e4=arguments.length>1?_8e4:null;
if(_8e4||_8e3!="createlink"){
_8e5=this.document.execCommand(_8e3,false,_8e4);
}
}
}
}
}
}
this.onDisplayChanged();
return _8e5;
},queryCommandEnabled:function(_8f0){
_8f0=this._normalizeCommand(_8f0);
if(this.object){
switch(_8f0){
case "hilitecolor":
_8f0="setbackcolor";
break;
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_8f0="set"+_8f0;
break;
case "formatblock":
_8f0="setblockformat";
break;
case "strikethrough":
_8f0="bold";
break;
case "inserthorizontalrule":
return true;
}
if(typeof this._activeX.command[_8f0]=="undefined"){
return false;
}
var _8f1=this.object.QueryStatus(this._activeX.command[_8f0]);
return ((_8f1!=this._activeX.status.notsupported)&&(_8f1!=this._activeX.status.disabled));
}else{
if(dojo.render.html.mozilla){
if(_8f0=="unlink"){
return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["a"]);
}else{
if(_8f0=="inserttable"){
return true;
}
}
}
var elem=(dojo.render.html.ie)?this.document.selection.createRange():this.document;
return elem.queryCommandEnabled(_8f0);
}
},queryCommandState:function(_8f3){
_8f3=this._normalizeCommand(_8f3);
if(this.object){
if(_8f3=="forecolor"){
_8f3="setforecolor";
}else{
if(_8f3=="backcolor"){
_8f3="setbackcolor";
}else{
if(_8f3=="strikethrough"){
return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["strike"]);
}else{
if(_8f3=="inserthorizontalrule"){
return false;
}
}
}
}
if(typeof this._activeX.command[_8f3]=="undefined"){
return null;
}
var _8f4=this.object.QueryStatus(this._activeX.command[_8f3]);
return ((_8f4==this._activeX.status.latched)||(_8f4==this._activeX.status.ninched));
}else{
return this.document.queryCommandState(_8f3);
}
},queryCommandValue:function(_8f5){
_8f5=this._normalizeCommand(_8f5);
if(this.object){
switch(_8f5){
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_8f5="get"+_8f5;
return this.object.execCommand(this._activeX.command[_8f5],this._activeX.ui.noprompt);
case "formatblock":
var _8f6=this.object.execCommand(this._activeX.command["getblockformat"],this._activeX.ui.noprompt);
if(_8f6){
return this._local2NativeFormatNames[_8f6];
}
}
}else{
if(dojo.render.html.ie&&_8f5=="formatblock"){
return this._local2NativeFormatNames[this.document.queryCommandValue(_8f5)]||this.document.queryCommandValue(_8f5);
}
return this.document.queryCommandValue(_8f5);
}
},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 _902=dojo.html.getBorderBox(this.editNode).height;
if(!_902){
_902=dojo.html.getBorderBox(this.document.body).height;
}
if(_902==0){
dojo.debug("Can not figure out the height of the editing area!");
return;
}
this._lastHeight=_902;
this.editorObject.style.height=this._lastHeight+"px";
if(dojo.render.html.ie60){
var _903=function(_904,_905){
if(/px$/.test(_905)){
return parseInt(_905);
}
var _906=_904.style.left;
var _907=_904.runtimeStyle.left;
_904.runtimeStyle.left=_904.currentStyle.left;
_904.style.left=_905||0;
_905=_904.style.pixelLeft;
_904.style.left=_906;
_904.runtimeStyle.left=_907;
return _905;
};
var _908=_903(this.domNode,this.minHeight);
var _909=(this._lastHeight>_908)?this._lastHeight+"px":this.minHeight;
this.editorObject.style.height=_909;
var _90a=this.document.body.getElementsByTagName("div")[0];
_90a.style.height=_909;
}
this.window.scrollTo(0,0);
},_saveContent:function(e){
var _90c=dojo.doc().getElementById("dojo.widget.RichText.savedContent");
_90c.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 _90f=dojo.global().location.protocol+"//"+dojo.global().location.host;
var _910=dojo.global().location.pathname;
if(_910.match(/\/$/)){
}else{
var _911=_910.split("/");
if(_911.length){
_911.pop();
}
_910=_911.join("/")+"/";
}
var _912=new RegExp("(<img[^>]* src=[\"'])("+_90f+"("+_910+")?)","ig");
ec=ec.replace(_912,"$1");
}
return ec;
},close:function(save,_914){
if(this.isClosed){
return false;
}
if(arguments.length==0){
save=true;
}
this._content=this._postFilterContent(this.editNode.innerHTML);
var _915=(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 _915;
},destroyRendering:function(){
},destroy:function(){
this.destroyRendering();
if(!this.isClosed){
this.close(false);
}
dojo.widget.RichText.superclass.destroy.call(this);
},connect:function(_917,_918,_919){
dojo.event.connect(_917,_918,this,_919);
},disconnect:function(_91a,_91b,_91c){
dojo.event.disconnect(_91a,_91b,this,_91c);
},disconnectAllWithRoot:function(_91d){
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(_91f){
dojo.deprecated("dojo.lang.whatAmI","use dojo.lang.getType instead","0.5");
return dojo.lang.getType(_91f);
};
dojo.lang.whatAmI.custom={};
dojo.lang.getType=function(_920){
try{
if(dojo.lang.isArray(_920)){
return "array";
}
if(dojo.lang.isFunction(_920)){
return "function";
}
if(dojo.lang.isString(_920)){
return "string";
}
if(dojo.lang.isNumber(_920)){
return "number";
}
if(dojo.lang.isBoolean(_920)){
return "boolean";
}
if(dojo.lang.isAlien(_920)){
return "alien";
}
if(dojo.lang.isUndefined(_920)){
return "undefined";
}
for(var name in dojo.lang.whatAmI.custom){
if(dojo.lang.whatAmI.custom[name](_920)){
return name;
}
}
if(dojo.lang.isObject(_920)){
return "object";
}
}
catch(e){
}
return "unknown";
};
dojo.lang.isNumeric=function(_922){
return (!isNaN(_922)&&isFinite(_922)&&(_922!=null)&&!dojo.lang.isBoolean(_922)&&!dojo.lang.isArray(_922)&&!/^\s*$/.test(_922));
};
dojo.lang.isBuiltIn=function(_923){
return (dojo.lang.isArray(_923)||dojo.lang.isFunction(_923)||dojo.lang.isString(_923)||dojo.lang.isNumber(_923)||dojo.lang.isBoolean(_923)||(_923==null)||(_923 instanceof Error)||(typeof _923=="error"));
};
dojo.lang.isPureObject=function(_924){
return ((_924!=null)&&dojo.lang.isObject(_924)&&_924.constructor==Object);
};
dojo.lang.isOfType=function(_925,type,_927){
var _928=false;
if(_927){
_928=_927["optional"];
}
if(_928&&((_925===null)||dojo.lang.isUndefined(_925))){
return true;
}
if(dojo.lang.isArray(type)){
var _929=type;
for(var i in _929){
var _92b=_929[i];
if(dojo.lang.isOfType(_925,_92b)){
return true;
}
}
return false;
}else{
if(dojo.lang.isString(type)){
type=type.toLowerCase();
}
switch(type){
case Array:
case "array":
return dojo.lang.isArray(_925);
case Function:
case "function":
return dojo.lang.isFunction(_925);
case String:
case "string":
return dojo.lang.isString(_925);
case Number:
case "number":
return dojo.lang.isNumber(_925);
case "numeric":
return dojo.lang.isNumeric(_925);
case Boolean:
case "boolean":
return dojo.lang.isBoolean(_925);
case Object:
case "object":
return dojo.lang.isObject(_925);
case "pureobject":
return dojo.lang.isPureObject(_925);
case "builtin":
return dojo.lang.isBuiltIn(_925);
case "alien":
return dojo.lang.isAlien(_925);
case "undefined":
return dojo.lang.isUndefined(_925);
case null:
case "null":
return (_925===null);
case "optional":
dojo.deprecated("dojo.lang.isOfType(value, [type, \"optional\"])","use dojo.lang.isOfType(value, type, {optional: true} ) instead","0.5");
return ((_925===null)||dojo.lang.isUndefined(_925));
default:
if(dojo.lang.isFunction(type)){
return (_925 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 _92d=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_92d[i++]];
}while(i<_92d.length&&obj);
return (obj!=dj_global)?obj:null;
};
dojo.lang.doesObjectExist=function(str){
var _931=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_931[i++]];
}while(i<_931.length&&obj);
return (obj&&obj!=dj_global);
};
dojo.provide("dojo.lang.assert");
dojo.lang.assert=function(_934,_935){
if(!_934){
var _936="An assert statement failed.\n"+"The method dojo.lang.assert() was called with a 'false' value.\n";
if(_935){
_936+="Here's the assert message:\n"+_935+"\n";
}
throw new Error(_936);
}
};
dojo.lang.assertType=function(_937,type,_939){
if(dojo.lang.isString(_939)){
dojo.deprecated("dojo.lang.assertType(value, type, \"message\")","use dojo.lang.assertType(value, type) instead","0.5");
}
if(!dojo.lang.isOfType(_937,type,_939)){
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(_93a,_93b,_93c){
var key;
if(!_93c){
if(!dojo.lang.assertValidKeywords._errorMessage){
dojo.lang.assertValidKeywords._errorMessage="In dojo.lang.assertValidKeywords(), found invalid keyword:";
}
_93c=dojo.lang.assertValidKeywords._errorMessage;
}
if(dojo.lang.isArray(_93b)){
for(key in _93a){
if(!dojo.lang.inArray(_93b,key)){
dojo.lang.assert(false,_93c+" "+key);
}
}
}else{
for(key in _93a){
if(!(key in _93b)){
dojo.lang.assert(false,_93c+" "+key);
}
}
}
};
dojo.provide("dojo.AdapterRegistry");
dojo.AdapterRegistry=function(_93e){
this.pairs=[];
this.returnWrappers=_93e||false;
};
dojo.lang.extend(dojo.AdapterRegistry,{register:function(name,_940,wrap,_942,_943){
var type=(_943)?"unshift":"push";
this.pairs[type]([name,_940,wrap,_942]);
},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,_94b,wrap,_94d){
dojo.lang.reprRegistry.register(name,_94b,wrap,_94d);
};
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.html.iframe");
dojo.html.iframeContentWindow=function(_953){
var win=dojo.html.getDocumentWindow(dojo.html.iframeContentDocument(_953))||dojo.html.iframeContentDocument(_953).__parent__||(_953.name&&document.frames[_953.name])||null;
return win;
};
dojo.html.iframeContentDocument=function(_955){
var doc=_955.contentDocument||((_955.contentWindow)&&(_955.contentWindow.document))||((_955.name)&&(document.frames[_955.name])&&(document.frames[_955.name].document))||null;
return doc;
};
dojo.html.BackgroundIframe=function(node){
if(dojo.render.html.ie55||dojo.render.html.ie60){
var html="<iframe src='javascript:false'"+" style='position: absolute; left: 0px; top: 0px; width: 100%; height: 100%;"+"z-index: -1; filter:Alpha(Opacity=\"0\");' "+">";
this.iframe=dojo.doc().createElement(html);
this.iframe.tabIndex=-1;
if(node){
node.appendChild(this.iframe);
this.domNode=node;
}else{
dojo.body().appendChild(this.iframe);
this.iframe.style.display="none";
}
}
};
dojo.lang.extend(dojo.html.BackgroundIframe,{iframe:null,onResized:function(){
if(this.iframe&&this.domNode&&this.domNode.parentNode){
var _959=dojo.html.getMarginBox(this.domNode);
if(_959.width==0||_959.height==0){
dojo.lang.setTimeout(this,this.onResized,100);
return;
}
this.iframe.style.width=_959.width+"px";
this.iframe.style.height=_959.height+"px";
}
},size:function(node){
if(!this.iframe){
return;
}
var _95b=dojo.html.toCoordinateObject(node,true,dojo.html.boxSizing.BORDER_BOX);
with(this.iframe.style){
width=_95b.width+"px";
height=_95b.height+"px";
left=_95b.left+"px";
top=_95b.top+"px";
}
},setZIndex:function(node){
if(!this.iframe){
return;
}
if(dojo.dom.isNode(node)){
this.iframe.style.zIndex=dojo.html.getStyle(node,"z-index")-1;
}else{
if(!isNaN(node)){
this.iframe.style.zIndex=node;
}
}
},show:function(){
if(this.iframe){
this.iframe.style.display="block";
}
},hide:function(){
if(this.iframe){
this.iframe.style.display="none";
}
},remove:function(){
if(this.iframe){
dojo.html.removeNode(this.iframe,true);
delete this.iframe;
this.iframe=null;
}
}});
dojo.provide("dojo.widget.PopupContainer");
dojo.declare("dojo.widget.PopupContainerBase",null,function(){
this.queueOnAnimationFinish=[];
},{isContainer:true,templateString:"<div dojoAttachPoint=\"containerNode\" style=\"display:none;position:absolute;\" class=\"dojoPopupContainer\" ></div>",isShowingNow:false,currentSubpopup:null,beginZIndex:1000,parentPopup:null,parent:null,popupIndex:0,aroundBox:dojo.html.boxSizing.BORDER_BOX,openedForWindow:null,processKey:function(evt){
return false;
},applyPopupBasicStyle:function(){
with(this.domNode.style){
display="none";
position="absolute";
}
},aboutToShow:function(){
},open:function(x,y,_960,_961,_962,_963){
if(this.isShowingNow){
return;
}
if(this.animationInProgress){
this.queueOnAnimationFinish.push(this.open,arguments);
return;
}
this.aboutToShow();
var _964=false,node,_966;
if(typeof x=="object"){
node=x;
_966=_961;
_961=_960;
_960=y;
_964=true;
}
this.parent=_960;
dojo.body().appendChild(this.domNode);
_961=_961||_960["domNode"]||[];
var _967=null;
this.isTopLevel=true;
while(_960){
if(_960!==this&&(_960.setOpenedSubpopup!=undefined&&_960.applyPopupBasicStyle!=undefined)){
_967=_960;
this.isTopLevel=false;
_967.setOpenedSubpopup(this);
break;
}
_960=_960.parent;
}
this.parentPopup=_967;
this.popupIndex=_967?_967.popupIndex+1:1;
if(this.isTopLevel){
var _968=dojo.html.isNode(_961)?_961:null;
dojo.widget.PopupManager.opened(this,_968);
}
if(this.isTopLevel&&!dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){
this._bookmark=dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.getBookmark);
}else{
this._bookmark=null;
}
if(_961 instanceof Array){
_961={left:_961[0],top:_961[1],width:0,height:0};
}
with(this.domNode.style){
display="";
zIndex=this.beginZIndex+this.popupIndex;
}
if(_964){
this.move(node,_963,_966);
}else{
this.move(x,y,_963,_962);
}
this.domNode.style.display="none";
this.explodeSrc=_961;
this.show();
this.isShowingNow=true;
},move:function(x,y,_96b,_96c){
var _96d=(typeof x=="object");
if(_96d){
var _96e=_96b;
var node=x;
_96b=y;
if(!_96e){
_96e={"BL":"TL","TL":"BL"};
}
dojo.html.placeOnScreenAroundElement(this.domNode,node,_96b,this.aroundBox,_96e);
}else{
if(!_96c){
_96c="TL,TR,BL,BR";
}
dojo.html.placeOnScreen(this.domNode,x,y,_96b,true,_96c);
}
},close:function(_970){
if(_970){
this.domNode.style.display="none";
}
if(this.animationInProgress){
this.queueOnAnimationFinish.push(this.close,[]);
return;
}
this.closeSubpopup(_970);
this.hide();
if(this.bgIframe){
this.bgIframe.hide();
this.bgIframe.size({left:0,top:0,width:0,height:0});
}
if(this.isTopLevel){
dojo.widget.PopupManager.closed(this);
}
this.isShowingNow=false;
if(this.parent){
setTimeout(dojo.lang.hitch(this,function(){
try{
if(this.parent["focus"]){
this.parent.focus();
}else{
this.parent.domNode.focus();
}
}
catch(e){
dojo.debug("No idea how to focus to parent",e);
}
}),10);
}
if(this._bookmark&&dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){
if(this.openedForWindow){
this.openedForWindow.focus();
}
try{
dojo.withGlobal(this.openedForWindow||dojo.global(),"moveToBookmark",dojo.html.selection,[this._bookmark]);
}
catch(e){
}
}
this._bookmark=null;
},closeAll:function(_971){
if(this.parentPopup){
this.parentPopup.closeAll(_971);
}else{
this.close(_971);
}
},setOpenedSubpopup:function(_972){
this.currentSubpopup=_972;
},closeSubpopup:function(_973){
if(this.currentSubpopup==null){
return;
}
this.currentSubpopup.close(_973);
this.currentSubpopup=null;
},onShow:function(){
dojo.widget.PopupContainer.superclass.onShow.apply(this,arguments);
this.openedSize={w:this.domNode.style.width,h:this.domNode.style.height};
if(dojo.render.html.ie){
if(!this.bgIframe){
this.bgIframe=new dojo.html.BackgroundIframe();
this.bgIframe.setZIndex(this.domNode);
}
this.bgIframe.size(this.domNode);
this.bgIframe.show();
}
this.processQueue();
},processQueue:function(){
if(!this.queueOnAnimationFinish.length){
return;
}
var func=this.queueOnAnimationFinish.shift();
var args=this.queueOnAnimationFinish.shift();
func.apply(this,args);
},onHide:function(){
dojo.widget.HtmlWidget.prototype.onHide.call(this);
if(this.openedSize){
with(this.domNode.style){
width=this.openedSize.w;
height=this.openedSize.h;
}
}
this.processQueue();
}});
dojo.widget.defineWidget("dojo.widget.PopupContainer",[dojo.widget.HtmlWidget,dojo.widget.PopupContainerBase],{});
dojo.widget.PopupManager=new function(){
this.currentMenu=null;
this.currentButton=null;
this.currentFocusMenu=null;
this.focusNode=null;
this.registeredWindows=[];
this.registerWin=function(win){
if(!win.__PopupManagerRegistered){
dojo.event.connect(win.document,"onmousedown",this,"onClick");
dojo.event.connect(win,"onscroll",this,"onClick");
dojo.event.connect(win.document,"onkey",this,"onKey");
win.__PopupManagerRegistered=true;
this.registeredWindows.push(win);
}
};
this.registerAllWindows=function(_977){
if(!_977){
_977=dojo.html.getDocumentWindow(window.top&&window.top.document||window.document);
}
this.registerWin(_977);
for(var i=0;i<_977.frames.length;i++){
try{
var win=dojo.html.getDocumentWindow(_977.frames[i].document);
if(win){
this.registerAllWindows(win);
}
}
catch(e){
}
}
};
this.unRegisterWin=function(win){
if(win.__PopupManagerRegistered){
dojo.event.disconnect(win.document,"onmousedown",this,"onClick");
dojo.event.disconnect(win,"onscroll",this,"onClick");
dojo.event.disconnect(win.document,"onkey",this,"onKey");
win.__PopupManagerRegistered=false;
}
};
this.unRegisterAllWindows=function(){
for(var i=0;i<this.registeredWindows.length;++i){
this.unRegisterWin(this.registeredWindows[i]);
}
this.registeredWindows=[];
};
dojo.addOnLoad(this,"registerAllWindows");
dojo.addOnUnload(this,"unRegisterAllWindows");
this.closed=function(menu){
if(this.currentMenu==menu){
this.currentMenu=null;
this.currentButton=null;
this.currentFocusMenu=null;
}
};
this.opened=function(menu,_97e){
if(menu==this.currentMenu){
return;
}
if(this.currentMenu){
this.currentMenu.close();
}
this.currentMenu=menu;
this.currentFocusMenu=menu;
this.currentButton=_97e;
};
this.setFocusedMenu=function(menu){
this.currentFocusMenu=menu;
};
this.onKey=function(e){
if(!e.key){
return;
}
if(!this.currentMenu||!this.currentMenu.isShowingNow){
return;
}
var m=this.currentFocusMenu;
while(m){
if(m.processKey(e)){
e.preventDefault();
e.stopPropagation();
break;
}
m=m.parentPopup;
}
},this.onClick=function(e){
if(!this.currentMenu){
return;
}
var _983=dojo.html.getScroll().offset;
var m=this.currentMenu;
while(m){
if(dojo.html.overElement(m.domNode,e)||dojo.html.isDescendantOf(e.target,m.domNode)){
return;
}
m=m.currentSubpopup;
}
if(this.currentButton&&dojo.html.overElement(this.currentButton,e)){
return;
}
this.currentMenu.close();
};
};
dojo.provide("dojo.widget.ColorPalette");
dojo.widget.defineWidget("dojo.widget.ColorPalette",dojo.widget.HtmlWidget,{palette:"7x10",_palettes:{"7x10":[["fff","fcc","fc9","ff9","ffc","9f9","9ff","cff","ccf","fcf"],["ccc","f66","f96","ff6","ff3","6f9","3ff","6ff","99f","f9f"],["c0c0c0","f00","f90","fc6","ff0","3f3","6cc","3cf","66c","c6c"],["999","c00","f60","fc3","fc0","3c0","0cc","36f","63f","c3c"],["666","900","c60","c93","990","090","399","33f","60c","939"],["333","600","930","963","660","060","366","009","339","636"],["000","300","630","633","330","030","033","006","309","303"]],"3x4":[["ffffff","00ff00","008000","0000ff"],["c0c0c0","ffff00","ff00ff","000080"],["808080","ff0000","800080","000000"]]},currentFocus:{"row":0,"column":0},buildRendering:function(){
this.domNode=document.createElement("table");
dojo.widget.wai.setAttr(this.domNode,"waiRole","role","menu");
dojo.html.disableSelection(this.domNode);
dojo.event.connect(this.domNode,"onmousedown",function(e){
e.preventDefault();
});
with(this.domNode){
cellPadding="0";
cellSpacing="1";
border="1";
style.backgroundColor="white";
}
var _986=this._palettes[this.palette];
for(var i=0;i<_986.length;i++){
var tr=this.domNode.insertRow(-1);
for(var j=0;j<_986[i].length;j++){
if(_986[i][j].length==3){
_986[i][j]=_986[i][j].replace(/(.)(.)(.)/,"$1$1$2$2$3$3");
}
var td=tr.insertCell(-1);
with(td.style){
backgroundColor="#"+_986[i][j];
border="1px solid gray";
width=height="15px";
fontSize="1px";
}
dojo.widget.wai.setAttr(td,"waiRole","role","menuitem");
td.color="#"+_986[i][j];
var _98b=this.highlightCell;
var _98c=this.clearCellHighlight;
td.onmouseover=function(e){
_98b(this);
};
td.onmouseout=function(e){
_98c(this);
};
dojo.event.connect(td,"onmousedown",this,"onClick");
td.innerHTML="&nbsp;";
td.setAttribute("tabIndex","-1");
}
}
dojo.event.connect(this.domNode,"onkeydown",this,"onKeyDown");
dojo.event.connect(this,"onShow",this,"focus");
dojo.event.connect(this,"onColorSelect",this,"cleanUp");
},postCreate:function(){
this.focus();
},focus:function(_98f){
if(_98f&&(_98f.row!=this.currentFocus.row||_98f.column!=this.currentFocus.column)){
this.clearCellHighlight(_98f.row,_98f.column);
}
var _990=this.getColorCell(this.currentFocus.row,this.currentFocus.column);
this.highlightCell(_990);
setTimeout(function(){
_990.focus();
},0);
},cleanUp:function(){
var cell=this.getColorCell(this.currentFocus.row,this.currentFocus.column);
if(cell.style){
cell.style.borderColor="gray";
}
},highlightCell:function(cell){
if(arguments.length==2){
cell=this.getColorCell(arguments[0],arguments[1]);
}
if(cell&&cell.style){
cell.style.borderColor="white";
}
},clearCellHighlight:function(cell){
if(arguments.length==2){
cell=this.getColorCell(arguments[0],arguments[1]);
}
if(cell&&cell.style){
cell.style.borderColor="gray";
}
},getColorCell:function(row,_995){
var rows=this.domNode.getElementsByTagName("tr");
if(row<rows.length){
var _997=rows[row].getElementsByTagName("td");
if(_995<_997.length){
return _997[_995];
}
}
return false;
},bidiLeftArrow:function(){
return document.documentElement.dir=="rtl"?dojo.event.browser.keys.KEY_RIGHT_ARROW:dojo.event.browser.keys.KEY_LEFT_ARROW;
},bidiRightArrow:function(){
return document.documentElement.dir=="rtl"?dojo.event.browser.keys.KEY_LEFT_ARROW:dojo.event.browser.keys.KEY_RIGHT_ARROW;
},onKeyDown:function(_998){
var _999=this._palettes[this.palette];
var c=this.currentFocus;
var _99b={};
_99b.row=c.row;
_99b.column=c.column;
if(_998.keyCode==this.bidiRightArrow()&&c.column<_999[c.row].length-1){
c.column++;
this.focus(_99b);
dojo.event.browser.stopEvent(_998);
}else{
if(_998.keyCode==this.bidiLeftArrow()&&c.column>0){
c.column--;
this.focus(_99b);
dojo.event.browser.stopEvent(_998);
}else{
if(_998.keyCode==dojo.event.browser.keys.KEY_UP_ARROW&&c.row>0){
c.row--;
this.focus(_99b);
dojo.event.browser.stopEvent(_998);
}else{
if(_998.keyCode==dojo.event.browser.keys.KEY_DOWN_ARROW&&c.row<_999.length-1){
c.row++;
this.focus(_99b);
dojo.event.browser.stopEvent(_998);
}else{
if(_998.keyCode==dojo.event.browser.keys.KEY_TAB||_998.keyCode==dojo.event.browser.keys.KEY_SPACE||_998.keyCode==dojo.event.browser.keys.KEY_ENTER){
this.onColorSelect(this.getColorCell(c.row,c.column).color);
dojo.event.browser.stopEvent(_998);
}else{
if(_998.keyCode==dojo.event.browser.keys.KEY_ESCAPE){
this.cancel();
dojo.event.browser.stopEvent(_998);
}
}
}
}
}
}
},onClick:function(e){
this.onColorSelect(e.currentTarget.color);
e.currentTarget.style.borderColor="gray";
},onColorSelect:function(_99d){
},cancel:function(){
}});
dojo.provide("dojo.widget.ContentPane");
dojo.widget.defineWidget("dojo.widget.ContentPane",dojo.widget.HtmlWidget,function(){
this._styleNodes=[];
this._onLoadStack=[];
this._onUnloadStack=[];
this._callOnUnload=false;
this._ioBindObj;
this.scriptScope;
this.bindArgs={};
},{isContainer:true,adjustPaths:true,href:"",extractContent:true,parseContent:true,cacheContent:true,preload:false,refreshOnShow:false,handler:"",executeScripts:false,scriptSeparation:true,loadingMessage:"Loading...",isLoaded:false,postCreate:function(args,frag,_9a0){
if(this.handler!==""){
this.setHandler(this.handler);
}
if(this.isShowing()||this.preload){
this.loadContents();
}
},show:function(){
if(this.refreshOnShow){
this.refresh();
}else{
this.loadContents();
}
dojo.widget.ContentPane.superclass.show.call(this);
},refresh:function(){
this.isLoaded=false;
this.loadContents();
},loadContents:function(){
if(this.isLoaded){
return;
}
if(dojo.lang.isFunction(this.handler)){
this._runHandler();
}else{
if(this.href!=""){
this._downloadExternalContent(this.href,this.cacheContent&&!this.refreshOnShow);
}
}
},setUrl:function(url){
this.href=url;
this.isLoaded=false;
if(this.preload||this.isShowing()){
this.loadContents();
}
},abort:function(){
var bind=this._ioBindObj;
if(!bind||!bind.abort){
return;
}
bind.abort();
delete this._ioBindObj;
},_downloadExternalContent:function(url,_9a4){
this.abort();
this._handleDefaults(this.loadingMessage,"onDownloadStart");
var self=this;
this._ioBindObj=dojo.io.bind(this._cacheSetting({url:url,mimetype:"text/html",handler:function(type,data,xhr){
delete self._ioBindObj;
if(type=="load"){
self.onDownloadEnd.call(self,url,data);
}else{
var e={responseText:xhr.responseText,status:xhr.status,statusText:xhr.statusText,responseHeaders:xhr.getAllResponseHeaders(),text:"Error loading '"+url+"' ("+xhr.status+" "+xhr.statusText+")"};
self._handleDefaults.call(self,e,"onDownloadError");
self.onLoad();
}
}},_9a4));
},_cacheSetting:function(_9aa,_9ab){
for(var x in this.bindArgs){
if(dojo.lang.isUndefined(_9aa[x])){
_9aa[x]=this.bindArgs[x];
}
}
if(dojo.lang.isUndefined(_9aa.useCache)){
_9aa.useCache=_9ab;
}
if(dojo.lang.isUndefined(_9aa.preventCache)){
_9aa.preventCache=!_9ab;
}
if(dojo.lang.isUndefined(_9aa.mimetype)){
_9aa.mimetype="text/html";
}
return _9aa;
},onLoad:function(e){
this._runStack("_onLoadStack");
this.isLoaded=true;
},onUnLoad:function(e){
dojo.deprecated(this.widgetType+".onUnLoad, use .onUnload (lowercased load)",0.5);
},onUnload:function(e){
this._runStack("_onUnloadStack");
delete this.scriptScope;
if(this.onUnLoad!==dojo.widget.ContentPane.prototype.onUnLoad){
this.onUnLoad.apply(this,arguments);
}
},_runStack:function(_9b0){
var st=this[_9b0];
var err="";
var _9b3=this.scriptScope||window;
for(var i=0;i<st.length;i++){
try{
st[i].call(_9b3);
}
catch(e){
err+="\n"+st[i]+" failed: "+e.description;
}
}
this[_9b0]=[];
if(err.length){
var name=(_9b0=="_onLoadStack")?"addOnLoad":"addOnUnLoad";
this._handleDefaults(name+" failure\n "+err,"onExecError","debug");
}
},addOnLoad:function(obj,func){
this._pushOnStack(this._onLoadStack,obj,func);
},addOnUnload:function(obj,func){
this._pushOnStack(this._onUnloadStack,obj,func);
},addOnUnLoad:function(){
dojo.deprecated(this.widgetType+".addOnUnLoad, use addOnUnload instead. (lowercased Load)",0.5);
this.addOnUnload.apply(this,arguments);
},_pushOnStack:function(_9ba,obj,func){
if(typeof func=="undefined"){
_9ba.push(obj);
}else{
_9ba.push(function(){
obj[func]();
});
}
},destroy:function(){
this.onUnload();
dojo.widget.ContentPane.superclass.destroy.call(this);
},onExecError:function(e){
},onContentError:function(e){
},onDownloadError:function(e){
},onDownloadStart:function(e){
},onDownloadEnd:function(url,data){
data=this.splitAndFixPaths(data,url);
this.setContent(data);
},_handleDefaults:function(e,_9c4,_9c5){
if(!_9c4){
_9c4="onContentError";
}
if(dojo.lang.isString(e)){
e={text:e};
}
if(!e.text){
e.text=e.toString();
}
e.toString=function(){
return this.text;
};
if(typeof e.returnValue!="boolean"){
e.returnValue=true;
}
if(typeof e.preventDefault!="function"){
e.preventDefault=function(){
this.returnValue=false;
};
}
this[_9c4](e);
if(e.returnValue){
switch(_9c5){
case true:
case "alert":
alert(e.toString());
break;
case "debug":
dojo.debug(e.toString());
break;
default:
if(this._callOnUnload){
this.onUnload();
}
this._callOnUnload=false;
if(arguments.callee._loopStop){
dojo.debug(e.toString());
}else{
arguments.callee._loopStop=true;
this._setContent(e.toString());
}
}
}
arguments.callee._loopStop=false;
},splitAndFixPaths:function(s,url){
var _9c8=[],_9c9=[],tmp=[];
var _9cb=[],_9cc=[],attr=[],_9ce=[];
var str="",path="",fix="",_9d2="",tag="",_9d4="";
if(!url){
url="./";
}
if(s){
var _9d5=/<title[^>]*>([\s\S]*?)<\/title>/i;
while(_9cb=_9d5.exec(s)){
_9c8.push(_9cb[1]);
s=s.substring(0,_9cb.index)+s.substr(_9cb.index+_9cb[0].length);
}
if(this.adjustPaths){
var _9d6=/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i;
var _9d7=/\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@]+?)\2/i;
var _9d8=/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/;
while(tag=_9d6.exec(s)){
str+=s.substring(0,tag.index);
s=s.substring((tag.index+tag[0].length),s.length);
tag=tag[0];
_9d2="";
while(attr=_9d7.exec(tag)){
path="";
_9d4=attr[3];
switch(attr[1].toLowerCase()){
case "src":
case "href":
if(_9d8.exec(_9d4)){
path=_9d4;
}else{
path=(new dojo.uri.Uri(url,_9d4).toString());
}
break;
case "style":
path=dojo.html.fixPathsInCssText(_9d4,url);
break;
default:
path=_9d4;
}
fix=" "+attr[1]+"="+attr[2]+path+attr[2];
_9d2+=tag.substring(0,attr.index)+fix;
tag=tag.substring((attr.index+attr[0].length),tag.length);
}
str+=_9d2+tag;
}
s=str+s;
}
_9d5=/(?:<(style)[^>]*>([\s\S]*?)<\/style>|<link ([^>]*rel=['"]?stylesheet['"]?[^>]*)>)/i;
while(_9cb=_9d5.exec(s)){
if(_9cb[1]&&_9cb[1].toLowerCase()=="style"){
_9ce.push(dojo.html.fixPathsInCssText(_9cb[2],url));
}else{
if(attr=_9cb[3].match(/href=(['"]?)([^'">]*)\1/i)){
_9ce.push({path:attr[2]});
}
}
s=s.substring(0,_9cb.index)+s.substr(_9cb.index+_9cb[0].length);
}
var _9d5=/<script([^>]*)>([\s\S]*?)<\/script>/i;
var _9d9=/src=(['"]?)([^"']*)\1/i;
var _9da=/.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/;
var _9db=/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g;
var _9dc=/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix|registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/;
while(_9cb=_9d5.exec(s)){
if(this.executeScripts&&_9cb[1]){
if(attr=_9d9.exec(_9cb[1])){
if(_9da.exec(attr[2])){
dojo.debug("Security note! inhibit:"+attr[2]+" from  being loaded again.");
}else{
_9c9.push({path:attr[2]});
}
}
}
if(_9cb[2]){
var sc=_9cb[2].replace(_9db,"");
if(!sc){
continue;
}
while(tmp=_9dc.exec(sc)){
_9cc.push(tmp[0]);
sc=sc.substring(0,tmp.index)+sc.substr(tmp.index+tmp[0].length);
}
if(this.executeScripts){
_9c9.push(sc);
}
}
s=s.substr(0,_9cb.index)+s.substr(_9cb.index+_9cb[0].length);
}
if(this.extractContent){
_9cb=s.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_9cb){
s=_9cb[1];
}
}
if(this.executeScripts&&this.scriptSeparation){
var _9d5=/(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/;
var _9de=/([\s'";:\(])scriptScope(.*)/;
str="";
while(tag=_9d5.exec(s)){
tmp=((tag[3]=="'")?"\"":"'");
fix="";
str+=s.substring(0,tag.index)+tag[1];
while(attr=_9de.exec(tag[2])){
tag[2]=tag[2].substring(0,attr.index)+attr[1]+"dojo.widget.byId("+tmp+this.widgetId+tmp+").scriptScope"+attr[2];
}
str+=tag[2];
s=s.substr(tag.index+tag[0].length);
}
s=str+s;
}
}
return {"xml":s,"styles":_9ce,"titles":_9c8,"requires":_9cc,"scripts":_9c9,"url":url};
},_setContent:function(cont){
this.destroyChildren();
for(var i=0;i<this._styleNodes.length;i++){
if(this._styleNodes[i]&&this._styleNodes[i].parentNode){
this._styleNodes[i].parentNode.removeChild(this._styleNodes[i]);
}
}
this._styleNodes=[];
try{
var node=this.containerNode||this.domNode;
while(node.firstChild){
dojo.html.destroyNode(node.firstChild);
}
if(typeof cont!="string"){
node.appendChild(cont);
}else{
node.innerHTML=cont;
}
}
catch(e){
e.text="Couldn't load content:"+e.description;
this._handleDefaults(e,"onContentError");
}
},setContent:function(data){
this.abort();
if(this._callOnUnload){
this.onUnload();
}
this._callOnUnload=true;
if(!data||dojo.html.isNode(data)){
this._setContent(data);
this.onResized();
this.onLoad();
}else{
if(typeof data.xml!="string"){
this.href="";
data=this.splitAndFixPaths(data);
}
this._setContent(data.xml);
for(var i=0;i<data.styles.length;i++){
if(data.styles[i].path){
this._styleNodes.push(dojo.html.insertCssFile(data.styles[i].path,dojo.doc(),false,true));
}else{
this._styleNodes.push(dojo.html.insertCssText(data.styles[i]));
}
}
if(this.parseContent){
for(var i=0;i<data.requires.length;i++){
try{
eval(data.requires[i]);
}
catch(e){
e.text="ContentPane: error in package loading calls, "+(e.description||e);
this._handleDefaults(e,"onContentError","debug");
}
}
}
var _9e4=this;
function asyncParse(){
if(_9e4.executeScripts){
_9e4._executeScripts(data.scripts);
}
if(_9e4.parseContent){
var node=_9e4.containerNode||_9e4.domNode;
var _9e6=new dojo.xml.Parse();
var frag=_9e6.parseElement(node,null,true);
dojo.widget.getParser().createSubComponents(frag,_9e4);
}
_9e4.onResized();
_9e4.onLoad();
}
if(dojo.hostenv.isXDomain&&data.requires.length){
dojo.addOnLoad(asyncParse);
}else{
asyncParse();
}
}
},setHandler:function(_9e8){
var fcn=dojo.lang.isFunction(_9e8)?_9e8:window[_9e8];
if(!dojo.lang.isFunction(fcn)){
this._handleDefaults("Unable to set handler, '"+_9e8+"' not a function.","onExecError",true);
return;
}
this.handler=function(){
return fcn.apply(this,arguments);
};
},_runHandler:function(){
var ret=true;
if(dojo.lang.isFunction(this.handler)){
this.handler(this,this.domNode);
ret=false;
}
this.onLoad();
return ret;
},_executeScripts:function(_9eb){
var self=this;
var tmp="",code="";
for(var i=0;i<_9eb.length;i++){
if(_9eb[i].path){
dojo.io.bind(this._cacheSetting({"url":_9eb[i].path,"load":function(type,_9f1){
dojo.lang.hitch(self,tmp=";"+_9f1);
},"error":function(type,_9f3){
_9f3.text=type+" downloading remote script";
self._handleDefaults.call(self,_9f3,"onExecError","debug");
},"mimetype":"text/plain","sync":true},this.cacheContent));
code+=tmp;
}else{
code+=_9eb[i];
}
}
try{
if(this.scriptSeparation){
delete this.scriptScope;
this.scriptScope=new (new Function("_container_",code+"; return this;"))(self);
}else{
var djg=dojo.global();
if(djg.execScript){
djg.execScript(code);
}else{
var djd=dojo.doc();
var sc=djd.createElement("script");
sc.appendChild(djd.createTextNode(code));
(this.containerNode||this.domNode).appendChild(sc);
}
}
}
catch(e){
e.text="Error running scripts from content:\n"+e.description;
this._handleDefaults(e,"onExecError","debug");
}
}});
dojo.provide("dojo.widget.Editor2Toolbar");
dojo.lang.declare("dojo.widget.HandlerManager",null,function(){
this._registeredHandlers=[];
},{registerHandler:function(obj,func){
if(arguments.length==2){
this._registeredHandlers.push(function(){
return obj[func].apply(obj,arguments);
});
}else{
this._registeredHandlers.push(obj);
}
},removeHandler:function(func){
for(var i=0;i<this._registeredHandlers.length;i++){
if(func===this._registeredHandlers[i]){
delete this._registeredHandlers[i];
return;
}
}
dojo.debug("HandlerManager handler "+func+" is not registered, can not remove.");
},destroy:function(){
for(var i=0;i<this._registeredHandlers.length;i++){
delete this._registeredHandlers[i];
}
}});
dojo.widget.Editor2ToolbarItemManager=new dojo.widget.HandlerManager;
dojo.lang.mixin(dojo.widget.Editor2ToolbarItemManager,{getToolbarItem:function(name){
var item;
name=name.toLowerCase();
for(var i=0;i<this._registeredHandlers.length;i++){
item=this._registeredHandlers[i](name);
if(item){
return item;
}
}
switch(name){
case "bold":
case "copy":
case "cut":
case "delete":
case "indent":
case "inserthorizontalrule":
case "insertorderedlist":
case "insertunorderedlist":
case "italic":
case "justifycenter":
case "justifyfull":
case "justifyleft":
case "justifyright":
case "outdent":
case "paste":
case "redo":
case "removeformat":
case "selectall":
case "strikethrough":
case "subscript":
case "superscript":
case "underline":
case "undo":
case "unlink":
case "createlink":
case "insertimage":
case "htmltoggle":
item=new dojo.widget.Editor2ToolbarButton(name);
break;
case "forecolor":
case "hilitecolor":
item=new dojo.widget.Editor2ToolbarColorPaletteButton(name);
break;
case "plainformatblock":
item=new dojo.widget.Editor2ToolbarFormatBlockPlainSelect("formatblock");
break;
case "formatblock":
item=new dojo.widget.Editor2ToolbarFormatBlockSelect("formatblock");
break;
case "fontsize":
item=new dojo.widget.Editor2ToolbarFontSizeSelect("fontsize");
break;
case "fontname":
item=new dojo.widget.Editor2ToolbarFontNameSelect("fontname");
break;
case "inserttable":
case "insertcell":
case "insertcol":
case "insertrow":
case "deletecells":
case "deletecols":
case "deleterows":
case "mergecells":
case "splitcell":
dojo.debug(name+" is implemented in dojo.widget.Editor2Plugin.TableOperation, please require it first.");
break;
case "inserthtml":
case "blockdirltr":
case "blockdirrtl":
case "dirltr":
case "dirrtl":
case "inlinedirltr":
case "inlinedirrtl":
dojo.debug("Not yet implemented toolbar item: "+name);
break;
default:
dojo.debug("dojo.widget.Editor2ToolbarItemManager.getToolbarItem: Unknown toolbar item: "+name);
}
return item;
}});
dojo.addOnUnload(dojo.widget.Editor2ToolbarItemManager,"destroy");
dojo.declare("dojo.widget.Editor2ToolbarButton",null,function(name){
this._name=name;
},{create:function(node,_a01,_a02){
this._domNode=node;
var cmd=_a01.parent.getCommand(this._name);
if(cmd){
this._domNode.title=cmd.getText();
}
this.disableSelection(this._domNode);
this._parentToolbar=_a01;
dojo.event.connect(this._domNode,"onclick",this,"doAction");
if(!_a02){
dojo.event.connect(this._domNode,"onmouseover",this,"onMouseOver");
dojo.event.connect(this._domNode,"onmouseout",this,"onMouseOut");
}
},disableSelection:function(_a04){
dojo.html.disableSelection(_a04);
var _a05=_a04.all||_a04.getElementsByTagName("*");
for(var x=0;x<_a05.length;x++){
dojo.html.disableSelection(_a05[x]);
}
},onMouseOver:function(){
var _a07=dojo.widget.Editor2Manager.getCurrentInstance();
if(_a07){
var _a08=_a07.getCommand(this._name);
if(_a08&&_a08.getState()!=dojo.widget.Editor2Manager.commandState.Disabled){
this.highlightToolbarItem();
}
}
},onMouseOut:function(){
this.unhighlightToolbarItem();
},destroy:function(){
this._domNode=null;
this._parentToolbar=null;
},doAction:function(e){
if(this._domNode&&!this._domNode.disabled&&this._parentToolbar.checkAvailability()){
e.preventDefault();
e.stopPropagation();
var _a0a=dojo.widget.Editor2Manager.getCurrentInstance();
if(_a0a){
var _a0b=_a0a.getCommand(this._name);
if(_a0b){
_a0b.execute();
}
}
}
},refreshState:function(){
var _a0c=dojo.widget.Editor2Manager.getCurrentInstance();
var em=dojo.widget.Editor2Manager;
if(_a0c){
var _a0e=_a0c.getCommand(this._name);
if(_a0e){
var _a0f=_a0e.getState();
if(_a0f!=this._lastState){
switch(_a0f){
case em.commandState.Latched:
this.latchToolbarItem();
break;
case em.commandState.Enabled:
this.enableToolbarItem();
break;
case em.commandState.Disabled:
default:
this.disableToolbarItem();
}
this._lastState=_a0f;
}
}
}
return em.commandState.Enabled;
},latchToolbarItem:function(){
this._domNode.disabled=false;
this.removeToolbarItemStyle(this._domNode);
dojo.html.addClass(this._domNode,this._parentToolbar.ToolbarLatchedItemStyle);
},enableToolbarItem:function(){
this._domNode.disabled=false;
this.removeToolbarItemStyle(this._domNode);
dojo.html.addClass(this._domNode,this._parentToolbar.ToolbarEnabledItemStyle);
},disableToolbarItem:function(){
this._domNode.disabled=true;
this.removeToolbarItemStyle(this._domNode);
dojo.html.addClass(this._domNode,this._parentToolbar.ToolbarDisabledItemStyle);
},highlightToolbarItem:function(){
dojo.html.addClass(this._domNode,this._parentToolbar.ToolbarHighlightedItemStyle);
},unhighlightToolbarItem:function(){
dojo.html.removeClass(this._domNode,this._parentToolbar.ToolbarHighlightedItemStyle);
},removeToolbarItemStyle:function(){
dojo.html.removeClass(this._domNode,this._parentToolbar.ToolbarEnabledItemStyle);
dojo.html.removeClass(this._domNode,this._parentToolbar.ToolbarLatchedItemStyle);
dojo.html.removeClass(this._domNode,this._parentToolbar.ToolbarDisabledItemStyle);
this.unhighlightToolbarItem();
}});
dojo.declare("dojo.widget.Editor2ToolbarDropDownButton",dojo.widget.Editor2ToolbarButton,{doAction:function(){
if(this._domNode&&!this._domNode.disabled&&this._parentToolbar.checkAvailability()){
if(!this._dropdown){
this._dropdown=dojo.widget.createWidget("PopupContainer",{});
this._domNode.appendChild(this._dropdown.domNode);
}
if(this._dropdown.isShowingNow){
this._dropdown.close();
}else{
this.onDropDownShown();
this._dropdown.open(this._domNode,null,this._domNode);
}
}
},destroy:function(){
this.onDropDownDestroy();
if(this._dropdown){
this._dropdown.destroy();
}
dojo.widget.Editor2ToolbarDropDownButton.superclass.destroy.call(this);
},onDropDownShown:function(){
},onDropDownDestroy:function(){
}});
dojo.declare("dojo.widget.Editor2ToolbarColorPaletteButton",dojo.widget.Editor2ToolbarDropDownButton,{onDropDownShown:function(){
if(!this._colorpalette){
this._colorpalette=dojo.widget.createWidget("ColorPalette",{});
this._dropdown.addChild(this._colorpalette);
this.disableSelection(this._dropdown.domNode);
this.disableSelection(this._colorpalette.domNode);
dojo.event.connect(this._colorpalette,"onColorSelect",this,"setColor");
dojo.event.connect(this._dropdown,"open",this,"latchToolbarItem");
dojo.event.connect(this._dropdown,"close",this,"enableToolbarItem");
dojo.event.connect("after",this._dropdown,"open",this._colorpalette,"focus");
dojo.event.connect(this._dropdown,"close",this._colorpalette,"cleanUp");
dojo.event.connect(this._colorpalette,"cancel",this,"cancel");
}
},setColor:function(_a10){
this._dropdown.close();
var _a11=dojo.widget.Editor2Manager.getCurrentInstance();
if(_a11){
var _a12=_a11.getCommand(this._name);
if(_a12){
_a12.execute(_a10);
}
}
},cancel:function(){
this._dropdown.close();
var _a13=this._domNode;
setTimeout(function(){
_a13.focus();
},0);
}});
dojo.declare("dojo.widget.Editor2ToolbarFormatBlockPlainSelect",dojo.widget.Editor2ToolbarButton,{create:function(node,_a15){
this._domNode=node;
this._parentToolbar=_a15;
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 _a17=dojo.widget.Editor2Manager.getCurrentInstance();
if(_a17){
var _a18=_a17.getCommand(this._name);
if(_a18){
_a18.execute(sv);
}
}
}
},refreshState:function(){
if(this._domNode){
dojo.widget.Editor2ToolbarFormatBlockPlainSelect.superclass.refreshState.call(this);
var _a19=dojo.widget.Editor2Manager.getCurrentInstance();
if(_a19){
var _a1a=_a19.getCommand(this._name);
if(_a1a){
var _a1b=_a1a.getValue();
if(!_a1b){
_a1b="";
}
dojo.lang.forEach(this._domNode.options,function(item){
if(item.value.toLowerCase()==_a1b.toLowerCase()){
item.selected=true;
}
});
}
}
}
}});
dojo.declare("dojo.widget.Editor2ToolbarComboItem",dojo.widget.Editor2ToolbarDropDownButton,{href:null,create:function(node,_a1e){
dojo.widget.Editor2ToolbarComboItem.superclass.create.apply(this,arguments);
if(!this._contentPane){
dojo.require("dojo.widget.ContentPane");
this._contentPane=dojo.widget.createWidget("ContentPane",{preload:"true"});
this._contentPane.addOnLoad(this,"setup");
this._contentPane.setUrl(this.href);
}
},onMouseOver:function(e){
if(this._lastState!=dojo.widget.Editor2Manager.commandState.Disabled){
dojo.html.addClass(e.currentTarget,this._parentToolbar.ToolbarHighlightedSelectStyle);
}
},onMouseOut:function(e){
dojo.html.removeClass(e.currentTarget,this._parentToolbar.ToolbarHighlightedSelectStyle);
},onDropDownShown:function(){
if(!this._dropdown.__addedContentPage){
this._dropdown.addChild(this._contentPane);
this._dropdown.__addedContentPage=true;
}
},setup:function(){
},onChange:function(e){
if(this._parentToolbar.checkAvailability()){
var name=e.currentTarget.getAttribute("dropDownItemName");
var _a23=dojo.widget.Editor2Manager.getCurrentInstance();
if(_a23){
var _a24=_a23.getCommand(this._name);
if(_a24){
_a24.execute(name);
}
}
}
this._dropdown.close();
},onMouseOverItem:function(e){
dojo.html.addClass(e.currentTarget,this._parentToolbar.ToolbarHighlightedSelectItemStyle);
},onMouseOutItem:function(e){
dojo.html.removeClass(e.currentTarget,this._parentToolbar.ToolbarHighlightedSelectItemStyle);
}});
dojo.declare("dojo.widget.Editor2ToolbarFormatBlockSelect",dojo.widget.Editor2ToolbarComboItem,{href:dojo.uri.dojoUri("src/widget/templates/Editor2/EditorToolbar_FormatBlock.html"),setup:function(){
dojo.widget.Editor2ToolbarFormatBlockSelect.superclass.setup.call(this);
var _a27=this._contentPane.domNode.all||this._contentPane.domNode.getElementsByTagName("*");
this._blockNames={};
this._blockDisplayNames={};
for(var x=0;x<_a27.length;x++){
var node=_a27[x];
dojo.html.disableSelection(node);
var name=node.getAttribute("dropDownItemName");
if(name){
this._blockNames[name]=node;
var _a2b=node.getElementsByTagName(name);
this._blockDisplayNames[name]=_a2b[_a2b.length-1].innerHTML;
}
}
for(var name in this._blockNames){
dojo.event.connect(this._blockNames[name],"onclick",this,"onChange");
dojo.event.connect(this._blockNames[name],"onmouseover",this,"onMouseOverItem");
dojo.event.connect(this._blockNames[name],"onmouseout",this,"onMouseOutItem");
}
},onDropDownDestroy:function(){
if(this._blockNames){
for(var name in this._blockNames){
delete this._blockNames[name];
delete this._blockDisplayNames[name];
}
}
},refreshState:function(){
dojo.widget.Editor2ToolbarFormatBlockSelect.superclass.refreshState.call(this);
if(this._lastState!=dojo.widget.Editor2Manager.commandState.Disabled){
var _a2d=dojo.widget.Editor2Manager.getCurrentInstance();
if(_a2d){
var _a2e=_a2d.getCommand(this._name);
if(_a2e){
var _a2f=_a2e.getValue();
if(_a2f==this._lastSelectedFormat&&this._blockDisplayNames){
return this._lastState;
}
this._lastSelectedFormat=_a2f;
var _a30=this._domNode.getElementsByTagName("label")[0];
var _a31=false;
if(this._blockDisplayNames){
for(var name in this._blockDisplayNames){
if(name==_a2f){
_a30.innerHTML=this._blockDisplayNames[name];
_a31=true;
break;
}
}
if(!_a31){
_a30.innerHTML="&nbsp;";
}
}
}
}
}
return this._lastState;
}});
dojo.declare("dojo.widget.Editor2ToolbarFontSizeSelect",dojo.widget.Editor2ToolbarComboItem,{href:dojo.uri.dojoUri("src/widget/templates/Editor2/EditorToolbar_FontSize.html"),setup:function(){
dojo.widget.Editor2ToolbarFormatBlockSelect.superclass.setup.call(this);
var _a33=this._contentPane.domNode.all||this._contentPane.domNode.getElementsByTagName("*");
this._fontsizes={};
this._fontSizeDisplayNames={};
for(var x=0;x<_a33.length;x++){
var node=_a33[x];
dojo.html.disableSelection(node);
var name=node.getAttribute("dropDownItemName");
if(name){
this._fontsizes[name]=node;
this._fontSizeDisplayNames[name]=node.getElementsByTagName("font")[0].innerHTML;
}
}
for(var name in this._fontsizes){
dojo.event.connect(this._fontsizes[name],"onclick",this,"onChange");
dojo.event.connect(this._fontsizes[name],"onmouseover",this,"onMouseOverItem");
dojo.event.connect(this._fontsizes[name],"onmouseout",this,"onMouseOutItem");
}
},onDropDownDestroy:function(){
if(this._fontsizes){
for(var name in this._fontsizes){
delete this._fontsizes[name];
delete this._fontSizeDisplayNames[name];
}
}
},refreshState:function(){
dojo.widget.Editor2ToolbarFormatBlockSelect.superclass.refreshState.call(this);
if(this._lastState!=dojo.widget.Editor2Manager.commandState.Disabled){
var _a38=dojo.widget.Editor2Manager.getCurrentInstance();
if(_a38){
var _a39=_a38.getCommand(this._name);
if(_a39){
var size=_a39.getValue();
if(size==this._lastSelectedSize&&this._fontSizeDisplayNames){
return this._lastState;
}
this._lastSelectedSize=size;
var _a3b=this._domNode.getElementsByTagName("label")[0];
var _a3c=false;
if(this._fontSizeDisplayNames){
for(var name in this._fontSizeDisplayNames){
if(name==size){
_a3b.innerHTML=this._fontSizeDisplayNames[name];
_a3c=true;
break;
}
}
if(!_a3c){
_a3b.innerHTML="&nbsp;";
}
}
}
}
}
return this._lastState;
}});
dojo.declare("dojo.widget.Editor2ToolbarFontNameSelect",dojo.widget.Editor2ToolbarFontSizeSelect,{href:dojo.uri.dojoUri("src/widget/templates/Editor2/EditorToolbar_FontName.html")});
dojo.widget.defineWidget("dojo.widget.Editor2Toolbar",dojo.widget.HtmlWidget,function(){
dojo.event.connect(this,"fillInTemplate",dojo.lang.hitch(this,function(){
if(dojo.render.html.ie){
this.domNode.style.zoom=1;
}
}));
},{templateString:"<div class=\"EditorToolbarDomNode EditorToolbarSmallBg\">\n	<table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" id=\"EditorToolbarTable\">\n		<tbody>\n			<tr valign=\"top\" align=\"left\" waiRole=\"toolbar\" >\n				<!--  The first td loaded will get a tabindex of 0 -->\n				<!--\n				<td>\n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"copy\" tabindex=\"-1\" waiRole=\"button\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_Copy\">&nbsp;</span>\n					</span>\n				</td>\n				<td>\n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"paste\" tabindex=\"-1\" waiRole=\"button\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_Paste\">&nbsp;</span>\n					</span>\n				</td>\n				<td>\n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"undo\" tabindex=\"-1\" waiRole=\"button\">\n						--><!-- FIXME: should we have the text \"undo\" here? --><!--\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_Undo\">&nbsp;</span>\n					</span>\n				</td>\n				<td>\n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"redo\" tabindex=\"-1\" waiRole=\"button\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_Redo\">&nbsp;</span>\n					</span>\n				</td>\n				<td isSpacer=\"false\">\n					<span class=\"iconContainer\" waiRole=\"separator\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\"	style=\"width: 5px; min-width: 5px;\"></span>\n					</span>\n				</td>\n				  -->\n				<td>\n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"bold\" tabindex=\"-1\" waiRole=\"button\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_Bold\">&nbsp;</span>\n					</span>\n				</td>\n				<td>\n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"italic\" tabindex=\"-1\" waiRole=\"button\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_Italic\">&nbsp;</span>\n					</span>\n				</td>\n				<td>\n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"underline\" tabindex=\"-1\" waiRole=\"button\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_Underline\">&nbsp;</span>\n					</span>\n				</td>\n				<t"+
"d>\n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"strikethrough\" tabindex=\"-1\" waiRole=\"button\">\n						<span \n							class=\"dojoE2TBIcon dojoE2TBIcon_StrikeThrough\">&nbsp;</span>\n					</span>\n				</td>\n				\n				<td isSpacer=\"true\">\n					<span class=\"iconContainer\" waiRole=\"separator\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\" \n							style=\"width: 5px; min-width: 5px;\"></span>\n					</span>\n				</td>\n				\n				<td> \n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"forecolor\" tabindex=\"-1\" waiRole=\"button\" waiState=\"haspopup\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_TextColor\" \n							unselectable=\"on\">&nbsp;</span>\n					</span>\n				</td>\n				<td> \n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"hilitecolor\" tabindex=\"-1\" waiRole=\"button\" waiState=\"haspopup\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_BackgroundColor\" \n							unselectable=\"on\">&nbsp;</span>\n					</span>\n				</td>\n				\n				<td isSpacer=\"true\">\n					<span class=\"iconContainer\" waiRole=\"separator\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\" style=\"width: 5px; min-width: 5px;\"></span>\n					</span>\n				</td>\n				<td>\n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"insertunorderedlist\" tabindex=\"-1\" waiRole=\"button\">\n						<span \n							class=\"dojoE2TBIcon dojoE2TBIcon_BulletedList\">&nbsp;</span>\n					</span>\n				</td>\n				<td>\n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"insertorderedlist\" tabindex=\"-1\" waiRole=\"button\">\n						<span \n							class=\"dojoE2TBIcon dojoE2TBIcon_NumberedList\">&nbsp;</span>\n					</span>\n				</td>\n				\n				<td isSpacer=\"true\">\n					<span class=\"iconContainer\" waiRole=\"separator\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\" style=\"width: 5px; min-width: 5px;\"></span>\n					</span>\n				</td>\n				<td>\n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"indent\" tabindex=\"-1\" waiRole=\"button\">\n						<span class=\"dojoE2TBIcon "+
"dojoE2TBIcon_Indent\" \n							unselectable=\"on\">&nbsp;</span>\n					</span>\n				</td>\n				<td>\n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"outdent\" tabindex=\"-1\" waiRole=\"button\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_Outdent\" \n							unselectable=\"on\">&nbsp;</span>\n					</span>\n				</td>\n				\n				<td isSpacer=\"true\">\n					<span class=\"iconContainer\" waiRole=\"separator\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\" style=\"width: 5px; min-width: 5px;\"></span>\n					</span>\n				</td>\n				\n				<td>\n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"createlink\" tabindex=\"-1\" waiRole=\"button\" waiState=\"haspopup\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_Link\">&nbsp;</span>\n					</span>\n				</td>\n				<td>\n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"insertimage\" tabindex=\"-1\" waiRole=\"button\" waiState=\"haspopup\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_Image\">&nbsp;</span>\n					</span>\n				</td>\n				<td>\n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"inserthorizontalrule\" tabindex=\"-1\" waiRole=\"button\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_HorizontalLine \">&nbsp;</span>\n					</span>\n				</td>\n				<!-- \n				<td isSpacer=\"true\">\n					<span class=\"iconContainer\" waiRole=\"separator\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\" style=\"width: 5px; min-width: 5px;\"></span>\n					</span>\n				</td>\n				<td> \n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"justifyleft\" tabindex=\"-1\" waiRole=\"button\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_LeftJustify\">&nbsp;</span>\n					</span>\n				</td>\n				<td> \n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"justifycenter\" tabindex=\"-1\" waiRole=\"button\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_CenterJustify\">&nbsp;</span>\n					</span>\n				</td> \n				<td>\n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"justifyright\" tabindex=\"-1\" waiRole=\"but"+
"ton\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_RightJustify\">&nbsp;</span>\n					</span>\n				</td>\n				<td> \n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"justifyfull\" tabindex=\"-1\" waiRole=\"button\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_BlockJustify\">&nbsp;</span>\n					</span>\n				</td>	-->\n				<!--\n				<td> \n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"fontsize\" tabindex=\"-1\" >\n						<span class=\"\">font</span>\n					</span>\n				</td>\n				<td> \n					<select class=\"dojoEditorToolbarItem\" dojoETItemName=\"plainformatblock\" tabindex=\"-1\" >\n						--><!-- FIXME: using \"p\" here inserts a paragraph in most cases! --><!--\n						<option value=\"\">-- format --</option>\n						<option value=\"p\">Normal</option>\n						<option value=\"pre\">Fixed Font</option>\n						<option value=\"h1\">Main Heading</option>\n						<option value=\"h2\">Section Heading</option>\n						<option value=\"h3\">Sub-Heading</option>\n						--><!-- <option value=\"blockquote\">Block Quote</option> --><!--\n					</select>\n				</td>\n				--> \n				<td><!-- uncomment to enable save button -->\n					<!-- save -->\n					<!--span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"save\" tabindex=\"-1\" waiRole=\"button\">\n						<span class=\"dojoE2TBIcon dojoE2TBIcon_Save\">&nbsp;</span>\n					</span-->\n				</td>\n				<!--\n				<td>\n					<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"htmltoggle\" tabindex=\"-1\" waiRole=\"button\">\n						<span class=\"dojoE2TBIcon\" \n						style=\"background-image: none; width: 30px;\" >&lt;h&gt;</span>\n					</span>\n				</td>\n				-->\n				<td width=\"*\">&nbsp;</td>\n			</tr>\n		</tbody>\n	</table>\n</div>\n",templateCssString:".StyleDropdownContainer {\n	position: absolute;\n	z-index: 1000;\n	overflow: auto;\n	cursor: default;\n	width: 250px;\n	height: 250px;\n	background-color: white;\n	border: 1px solid black;\n}\n\n.ColorDropdownContainer {\n	position: absolute;\n	z-index: 1000;\n	overflow: auto;\n	cursor: default;\n	width: 250px;\n	height: 150px;\n	background-color: white;\n	border: 1px solid black;\n}\n\n.EditorToolbarDomNode {\n	background-image: url(buttons/bg-fade.png);\n	background-repeat: repeat-x;\n	background-position: 0px -50px;\n}\n\n.EditorToolbarSmallBg {\n	background-image: url(images/toolbar-bg.gif);\n	background-repeat: repeat-x;\n	background-position: 0px 0px;\n}\n\n/*\nbody {\n	background:url(images/blank.gif) fixed;\n}*/\n\n.IEFixedToolbar {\n	position:absolute;\n	/* top:0; */\n	top: expression(eval((document.documentElement||document.body).scrollTop));\n}\n\ndiv.bigIcon {\n	width: 40px;\n	height: 40px; \n	/* background-color: white; */\n	/* border: 1px solid #a6a7a3; */\n	font-family: Verdana, Trebuchet, Tahoma, Arial;\n}\n\n.iconContainer {\n	font-family: Verdana, Trebuchet, Tahoma, Arial;\n	font-size: 13px;\n	float: left;\n	height: 18px;\n	display: block;\n	/* background-color: white; */\n	cursor: pointer;\n	padding: 1px 4px 1px 1px; /* almost the same as a transparent border */\n	border: 0px;\n}\n\n/* * html .EditorToolbarDomNode .focused { border: 1px solid blue; } */\n\n.dojoE2TBIcon {\n	display: block;\n	text-align: center;\n	min-width: 18px;\n	width: 18px;\n	height: 18px;\n	/* background-color: #a6a7a3; */\n	background-repeat: no-repeat;\n	background-image: url(buttons/connections-rteToolbarIcons_v2.gif);\n}\n\n\n.dojoE2TBIcon[class~=dojoE2TBIcon] {\n}\n\n.ToolbarButtonLatched {\n    border: #316ac5 1px solid; !important;\n    padding: 0px 3px 0px 0px; !important; /* make room for border */\n    background-color: #c1d2ee;\n}\n\n.ToolbarButtonHighlighted {\n    border: #316ac5 1px solid; !important;\n    padding: 0px 3px 0px 0px; !important; /* make room for border */\n    background-color: #dff1ff;\n}\n\n.ToolbarButtonDisabled{\n    filter: gray() alph"+
"a(opacity=30); /* IE */\n    opacity: 0.30; /* Safari, Opera and Mozilla */\n}\n\n.headingContainer {\n	width: 150px;\n	height: 30px;\n	margin: 0px;\n	/* padding-left: 5px; */\n	overflow: hidden;\n	line-height: 25px;\n	border-bottom: 1px solid black;\n	border-top: 1px solid white;\n}\n\n.EditorToolbarDomNode select {\n	font-size: 14px;\n}\n \n.dojoE2TBIcon_Sep { width: 5px; min-width: 5px; max-width: 5px; background-position: 0px 0px}\n.dojoE2TBIcon_Backcolor { background-position: -18px 0px}\n.dojoE2TBIcon_Bold { background-position: -36px 0px}\n.dojoE2TBIcon_Cancel { background-position: -54px 0px}\n.dojoE2TBIcon_Copy { background-position: -72px 0px}\n.dojoE2TBIcon_Link { background-position: -90px 0px}\n.dojoE2TBIcon_Cut { background-position: -108px 0px}\n.dojoE2TBIcon_Delete { background-position: -126px 0px}\n.dojoE2TBIcon_TextColor { background-position: -144px 0px}\n.dojoE2TBIcon_BackgroundColor { background-position: -162px 0px}\n.dojoE2TBIcon_Indent { background-position: -180px 0px}\n.dojoE2TBIcon_HorizontalLine { background-position: -198px 0px}\n.dojoE2TBIcon_Image { background-position: -216px 0px}\n.dojoE2TBIcon_NumberedList { background-position: -234px 0px}\n.dojoE2TBIcon_Table { background-position: -252px 0px}\n.dojoE2TBIcon_BulletedList { background-position: -270px 0px}\n.dojoE2TBIcon_Italic { background-position: -288px 0px}\n.dojoE2TBIcon_CenterJustify { background-position: -306px 0px}\n.dojoE2TBIcon_BlockJustify { background-position: -324px 0px}\n.dojoE2TBIcon_LeftJustify { background-position: -342px 0px}\n.dojoE2TBIcon_RightJustify { background-position: -360px 0px}\n.dojoE2TBIcon_left_to_right { background-position: -378px 0px}\n.dojoE2TBIcon_list_bullet_indent { background-position: -396px 0px}\n.dojoE2TBIcon_list_bullet_outdent { background-position: -414px 0px}\n.dojoE2TBIcon_list_num_indent { background-position: -432px 0px}\n.dojoE2TBIcon_list_num_outdent { background-position: -450px 0px}\n.dojoE2TBIcon_Outdent { background-position: -468px 0px}\n.dojoE2TBIcon_Paste { backgro"+
"und-position: -486px 0px}\n.dojoE2TBIcon_Redo { background-position: -504px 0px}\ndojoE2TBIcon_RemoveFormat { background-position: -522px 0px}\n.dojoE2TBIcon_right_to_left { background-position: -540px 0px}\n.dojoE2TBIcon_Save { background-position: -558px 0px}\n.dojoE2TBIcon_Space { background-position: -576px 0px}\n.dojoE2TBIcon_StrikeThrough { background-position: -594px 0px}\n.dojoE2TBIcon_Subscript { background-position: -612px 0px}\n.dojoE2TBIcon_Superscript { background-position: -630px 0px}\n.dojoE2TBIcon_Underline { background-position: -648px 0px}\n.dojoE2TBIcon_Undo { background-position: -666px 0px}\n.dojoE2TBIcon_WikiWord { background-position: -684px 0px}\n\n.SC_Panel { border: 1px solid black; }\n",templateCssPath:dojo.uri.dojoUri("src/widget/templates/EditorToolbar.css"),ToolbarLatchedItemStyle:"ToolbarButtonLatched",ToolbarEnabledItemStyle:"ToolbarButtonEnabled",ToolbarDisabledItemStyle:"ToolbarButtonDisabled",ToolbarHighlightedItemStyle:"ToolbarButtonHighlighted",ToolbarHighlightedSelectStyle:"ToolbarSelectHighlighted",ToolbarHighlightedSelectItemStyle:"ToolbarSelectHighlightedItem",postCreate:function(){
var _a3e=dojo.html.getElementsByClass("dojoEditorToolbarItem",this.domNode);
this.items={};
this.itemOrder=[];
var _a3f=true;
var _a40=0;
for(var x=0;x<_a3e.length;x++){
var node=_a3e[x];
var _a43=node.getAttribute("dojoETItemName");
if(_a43){
var item=dojo.widget.Editor2ToolbarItemManager.getToolbarItem(_a43);
if(item){
item.create(node,this);
this.items[_a43.toLowerCase()]=item;
item._position=_a40++;
this.itemOrder.push(_a43.toLowerCase());
if(_a3f){
item._domNode.setAttribute("tabIndex","0");
_a3f=false;
}
dojo.event.connect(item._domNode,"onfocus",this,"onButtonFocus");
dojo.event.connect(item._domNode,"onblur",this,"onButtonBlur");
}else{
node.style.display="none";
}
}
}
this.currentPosition=0;
dojo.event.connect(this.domNode,"onkeydown",this,"onKeyDown");
},getButtonAtPosition:function(_a45){
return this.items[this.itemOrder[_a45]];
},bidiLeftArrow:function(){
return document.documentElement.dir=="rtl"?dojo.event.browser.keys.KEY_RIGHT_ARROW:dojo.event.browser.keys.KEY_LEFT_ARROW;
},bidiRightArrow:function(){
return document.documentElement.dir=="rtl"?dojo.event.browser.keys.KEY_LEFT_ARROW:dojo.event.browser.keys.KEY_RIGHT_ARROW;
},onKeyDown:function(_a46){
if(_a46.keyCode==this.bidiRightArrow()){
if(this.currentPosition<this.itemOrder.length-1){
var _a47=this.getButtonAtPosition(this.currentPosition+1)._domNode;
this.changeToolbarButton(_a47);
}
dojo.event.browser.stopEvent(_a46);
}else{
if(_a46.keyCode==this.bidiLeftArrow()){
if(this.currentPosition>0){
var _a47=this.getButtonAtPosition(this.currentPosition-1)._domNode;
this.changeToolbarButton(_a47);
}
dojo.event.browser.stopEvent(_a46);
}else{
if(_a46.keyCode==dojo.event.browser.keys.KEY_SPACE||_a46.keyCode==dojo.event.browser.keys.KEY_ENTER){
var _a47=this.getButtonAtPosition(this.currentPosition);
var _a48=_a46.target.getAttribute("dojoETItemName");
if(_a48&&this.items[_a48]){
this.items[_a48].doAction(_a46);
dojo.event.browser.stopEvent(_a46);
}
}
}
}
},onButtonFocus:function(_a49){
_a49.target.setAttribute("tabIndex","0");
dojo.html.addClass(_a49.target,"focused");
var _a4a=_a49.target.getAttribute("dojoETItemName");
var _a4b=this.items[_a4a]._position;
if(this.currentPosition!=_a4b){
var _a4c=this.getButtonAtPosition(this.currentPosition)._domNode;
_a4c.setAttribute("tabIndex","-1");
this.currentPosition=_a4b;
}
},onButtonBlur:function(_a4d){
dojo.html.removeClass(_a4d.target,"focused");
},changeToolbarButton:function(_a4e){
setTimeout(function(){
_a4e.focus();
},0);
},update:function(){
for(var cmd in this.items){
this.items[cmd].refreshState();
}
},shareGroup:"",checkAvailability:function(){
if(!this.shareGroup){
this.parent.focus();
return true;
}
var _a50=dojo.widget.Editor2Manager.getCurrentInstance();
if(this.shareGroup==_a50.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(_a52,_a53,_a54){
dojo.hostenv.preloadLocalizations();
_a54=dojo.hostenv.normalizeLocale(_a54);
var _a55=_a54.split("-");
var _a56=[_a52,"nls",_a53].join(".");
var _a57=dojo.hostenv.findModule(_a56,true);
var _a58;
for(var i=_a55.length;i>0;i--){
var loc=_a55.slice(0,i).join("_");
if(_a57[loc]){
_a58=_a57[loc];
break;
}
}
if(!_a58){
_a58=_a57.ROOT;
}
if(_a58){
var _a5b=function(){
};
_a5b.prototype=_a58;
return new _a5b();
}
dojo.raise("Bundle not found: "+_a53+" in "+_a52+" , locale="+_a54);
};
dojo.i18n.isLTR=function(_a5c){
var lang=dojo.hostenv.normalizeLocale(_a5c).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(_a5f){
if(_a5f.toolbarAlwaysVisible){
var p=new dojo.widget.Editor2Plugin.AlwaysShowToolbar(_a5f);
}
});
dojo.declare("dojo.widget.Editor2Plugin.AlwaysShowToolbar",null,function(_a61){
this.editor=_a61;
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 _a67=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 _a68=(window["pageYOffset"])?window["pageYOffset"]:(document["documentElement"]||document["body"]).scrollTop;
if(_a68>this._scrollThreshold){
if(!this._fixEnabled){
var _a69=dojo.html.getMarginBox(tdn);
this.editor.editorObject.style.marginTop=_a69.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=_a69.width+"px";
tdn.style.zIndex=1000;
this._fixEnabled=true;
}
if(!dojo.render.html.safari){
var _a6a=(this.height)?parseInt(this.editor.height):this.editor._lastHeight;
if(_a68>(this._scrollThreshold+_a6a)){
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(_a6c,name){
var _a6e;
name=name.toLowerCase();
for(var i=0;i<this._registeredHandlers.length;i++){
_a6e=this._registeredHandlers[i](_a6c,name);
if(_a6e){
return _a6e;
}
}
switch(name){
case "htmltoggle":
_a6e=new dojo.widget.Editor2BrowserCommand(_a6c,name);
break;
case "formatblock":
_a6e=new dojo.widget.Editor2FormatBlockCommand(_a6c,name);
break;
case "anchor":
_a6e=new dojo.widget.Editor2Command(_a6c,name);
break;
case "createlink":
_a6e=new dojo.widget.Editor2InsertLinkCommand(_a6c,name);
break;
case "insertimage":
_a6e=new dojo.widget.Editor2InsertImageCommand(_a6c,name);
break;
default:
var _a70=this.getCurrentInstance();
if((_a70&&_a70.queryCommandAvailable(name))||(!_a70&&dojo.widget.Editor2.prototype.queryCommandAvailable(name))){
_a6e=new dojo.widget.Editor2BrowserCommand(_a6c,name);
}else{
dojo.debug("dojo.widget.Editor2Manager.getCommand: Unknown command "+name);
return;
}
}
return _a6e;
},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(_a71,name){
this._editor=_a71;
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(_a74,name){
var text=_a74.strings[name.toLowerCase()];
if(text){
this._text=text;
}
},{execute:function(para){
this._editor.execCommand(this._name,para);
},getState:function(){
if(this._editor._lastStateTimestamp>this._updateTime||this._state==undefined){
this._updateTime=this._editor._lastStateTimestamp;
try{
if(this._editor.queryCommandEnabled(this._name)){
if(this._editor.queryCommandState(this._name)){
this._state=dojo.widget.Editor2Manager.commandState.Latched;
}else{
this._state=dojo.widget.Editor2Manager.commandState.Enabled;
}
}else{
this._state=dojo.widget.Editor2Manager.commandState.Disabled;
}
}
catch(e){
this._state=dojo.widget.Editor2Manager.commandState.Enabled;
}
}
return this._state;
},getValue:function(){
try{
return this._editor.queryCommandValue(this._name);
}
catch(e){
}
}});
dojo.lang.declare("dojo.widget.Editor2PromptCommand",dojo.widget.Editor2BrowserCommand,{Default_Value:"",execute:function(para){
if(this.load()){
var _a79=this._promptText||this._editor.strings["prompt."+this._name];
var _a7a=this._promptValue||this.Default_Value;
this._promptResult=prompt(_a79,_a7a);
if(this._promptResult&&this._promptResult!=this.Default_Value){
this.ok(this._promptResult);
}else{
this.cancel();
}
}
},ok:function(_a7b){
},cancel:function(){
},getText:function(){
return this._text;
}});
dojo.lang.declare("dojo.widget.Editor2InsertImageCommand",dojo.widget.Editor2PromptCommand,{Default_Value:"http://",editableAttributes:["src","alt","width","height","hspace","vspace","border","align"],load:function(){
var _a7c=dojo.widget.Editor2Manager.getCurrentInstance();
this.imageNode=dojo.withGlobal(_a7c.window,"getSelectedElement",dojo.html.selection);
if(!this.imageNode){
this.imageNode=dojo.withGlobal(_a7c.window,"getAncestorElement",dojo.html.selection,["img"]);
}
var _a7d={};
this.extraAttribText="";
if(this.imageNode){
var _a7e=this.imageNode.attributes;
for(var i=0;i<_a7e.length;i++){
if(dojo.lang.find(this.editableAttributes,_a7e[i].name.toLowerCase())>-1){
_a7d[_a7e[i].name]=_a7e[i].value;
}else{
this.extraAttribText+=_a7e[i].name+"=\""+_a7e[i].value+"\" ";
}
}
}
for(var i=0;i<this.editableAttributes.length;++i){
name=this.editableAttributes[i];
this["image_"+name]=(_a7d[name]==undefined)?"":_a7d[name];
}
this._promptValue=this["image_src"];
return true;
},ok:function(_a80){
var _a81=dojo.widget.Editor2Manager.getCurrentInstance();
var _a82=_a81.getCommand("inserthtml");
var _a83=0;
if(dojo.render.html.moz){
_a81.execCommand("insertimage",_a80);
return;
}
this["image_src"]=_a80;
var _a84="";
for(var i=0;i<this.editableAttributes.length;++i){
name=this.editableAttributes[i];
var _a86=this["image_"+name];
if(_a86.length>0){
_a84+=name+"=\""+_a86+"\" ";
}
}
if(this.imageNode){
dojo.withGlobal(_a81.window,"selectElement",dojo.html.selection,[this.imageNode]);
}
_a82.execute("<img "+_a84+this.extraAttribText+"/>");
},cancel:function(){
}});
dojo.lang.declare("dojo.widget.Editor2InsertLinkCommand",dojo.widget.Editor2PromptCommand,{Default_Value:"http://",editableAttributes:["href","target","class"],load:function(){
var _a87=dojo.widget.Editor2Manager.getCurrentInstance();
_a87.saveSelection();
this.linkNode=dojo.withGlobal(_a87.window,"getAncestorElement",dojo.html.selection,["a"]);
var _a88={};
this.extraAttribText="";
if(this.linkNode){
var _a89=this.linkNode.attributes;
for(var i=0;i<_a89.length;i++){
if(dojo.lang.find(this.editableAttributes,_a89[i].name.toLowerCase())>-1){
_a88[_a89[i].name]=_a89[i].value;
}else{
if(_a89[i].specified==undefined||_a89[i].specified){
this.extraAttribText+=_a89[i].name+"=\""+_a89[i].value+"\" ";
}
}
}
}else{
var html=dojo.withGlobal(_a87.window,"getSelectedText",dojo.html.selection);
if(html==null||html.length==0){
//NEEDSWORK: alert(this._editor.strings["prompt.select.text.createlink"]);
alert("Please select some text to create a link.");
return false;
}
}
for(var i=0;i<this.editableAttributes.length;++i){
name=this.editableAttributes[i];
this["link_"+name]=(_a88[name]==undefined)?"":_a88[name];
}
this._promptValue=this["link_href"];
return true;
},ok:function(_a8c){
var _a8d=dojo.widget.Editor2Manager.getCurrentInstance();
_a8d.restoreSelection();
if(!this.linkNode){
var html=dojo.withGlobal(_a8d.window,"getSelectedHtml",dojo.html.selection);
}else{
var html=this.linkNode.innerHTML;
dojo.withGlobal(_a8d.window,"selectElement",dojo.html.selection,[this.linkNode]);
}
if(dojo.render.html.moz){
_a8d.execCommand("createlink",_a8c);
return;
}
this["link_href"]=_a8c;
var _a8f="";
for(var i=0;i<this.editableAttributes.length;++i){
name=this.editableAttributes[i];
var _a91=this["link_"+name];
if(_a91.length>0){
_a8f+=name+"=\""+_a91+"\" ";
}
}
_a8d.execCommand("inserthtml","<a "+_a8f+this.extraAttribText+">"+html+"</a>");
},cancel:function(){
}});
dojo.lang.declare("dojo.widget.Editor2FormatBlockCommand",dojo.widget.Editor2BrowserCommand,{});
dojo.widget.Editor2ToolbarGroups={};
dojo.widget.defineWidget("dojo.widget.Editor2",dojo.widget.RichText,function(){
this._loadedCommands={};
},{toolbarAlwaysVisible:false,toolbarWidget:null,scrollInterval:null,toolbarTemplatePath:dojo.uri.dojoUri("src/widget/templates/EditorToolbarOneline.html"),toolbarTemplateCssPath:null,toolbarPlaceHolder:"",_inSourceMode:false,_htmlEditNode:null,toolbarGroup:"",shareToolbar:false,contextMenuGroupSet:"",editorOnLoad:function(){
dojo.event.topic.publish("dojo.widget.Editor2::preLoadingToolbar",this);
if(this.toolbarAlwaysVisible){
dojo.require("dojo.widget.Editor2Plugin.AlwaysShowToolbar");
}
if(this.noToolbar===undefined||this.noToolbar!=true){
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 _a92={shareGroup:this.toolbarGroup,parent:this};
_a92.templatePath=this.toolbarTemplatePath;
if(this.toolbarTemplateCssPath){
_a92.templateCssPath=this.toolbarTemplateCssPath;
}
if(this.toolbarPlaceHolder){
this.toolbarWidget=dojo.widget.createWidget("Editor2Toolbar",_a92,dojo.byId(this.toolbarPlaceHolder),"after");
}else{
this.toolbarWidget=dojo.widget.createWidget("Editor2Toolbar",_a92,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);
},postMixInProperties:function(_a93,frag){
dojo.widget.Editor2.superclass.postMixInProperties.apply(this,arguments);
this.strings=dojo.i18n.getLocalization("dojo.widget","editor2",this.lang);
},toolbarLoaded:function(){
},registerLoadedPlugin:function(obj){
if(!this.loadedPlugins){
this.loadedPlugins=[];
}
this.loadedPlugins.push(obj);
},unregisterLoadedPlugin:function(obj){
for(var i in this.loadedPlugins){
if(this.loadedPlugins[i]===obj){
delete this.loadedPlugins[i];
return;
}
}
dojo.debug("dojo.widget.Editor2.unregisterLoadedPlugin: unknow plugin object: "+obj);
},execCommand:function(_a98,_a99){
switch(_a98.toLowerCase()){
case "htmltoggle":
this.toggleHtmlEditing();
break;
default:
dojo.widget.Editor2.superclass.execCommand.apply(this,arguments);
}
},queryCommandEnabled:function(_a9a,_a9b){
switch(_a9a.toLowerCase()){
case "htmltoggle":
return true;
default:
if(this._inSourceMode){
return false;
}
return dojo.widget.Editor2.superclass.queryCommandEnabled.apply(this,arguments);
}
},queryCommandState:function(_a9c,_a9d){
switch(_a9c.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(_aa0){
if((!this.isLoaded)||(!this.toolbarWidget)){
return;
}
var diff=new Date()-this._updateToolbarLastRan;
if((!_aa0)&&(this._updateToolbarLastRan)&&((diff<this._updateToolbarFrequency))){
clearTimeout(this._updateToolbarTimer);
var _aa2=this;
this._updateToolbarTimer=setTimeout(function(){
_aa2.updateToolbar();
},this._updateToolbarFrequency/2);
return;
}else{
this._updateToolbarLastRan=new Date();
}
if(dojo.widget.Editor2Manager.getCurrentInstance()!==this){
return;
}
this.toolbarWidget.update();
},destroy:function(_aa3){
this._htmlEditNode=null;
dojo.event.disconnect(this,"close",this.toolbarWidget,"hide");
if(!_aa3){
this.toolbarWidget.destroy();
}
dojo.widget.Editor2.superclass.destroy.call(this);
},_lastStateTimestamp:0,onDisplayChanged:function(e,_aa5){
this._lastStateTimestamp=(new Date()).getTime();
dojo.widget.Editor2.superclass.onDisplayChanged.call(this,e);
this.updateToolbar(_aa5);
},onLoad:function(){
try{
dojo.widget.Editor2.superclass.onLoad.call(this);
}
catch(e){
dojo.debug(e);
}
this.editorOnLoad();
},onFocus:function(){
dojo.widget.Editor2.superclass.onFocus.call(this);
this.setFocus();
},getEditorContent:function(){
if(this._inSourceMode){
return this._htmlEditNode.value;
}
return dojo.widget.Editor2.superclass.getEditorContent.call(this);
},replaceEditorContent:function(html){
if(this._inSourceMode){
this._htmlEditNode.value=html;
return;
}
dojo.widget.Editor2.superclass.replaceEditorContent.apply(this,arguments);
},getCommand:function(name){
if(this._loadedCommands[name]){
return this._loadedCommands[name];
}
var cmd=dojo.widget.Editor2Manager.getCommand(this,name);
this._loadedCommands[name]=cmd;
return cmd;
},shortcuts:[["bold"],["italic"],["underline"],["selectall","a"],["insertunorderedlist","\\"]],setupDefaultShortcuts:function(){
var exec=function(cmd){
return function(){
cmd.execute();
};
};
var self=this;
dojo.lang.forEach(this.shortcuts,function(item){
var cmd=self.getCommand(item[0]);
if(cmd){
self.addKeyHandler(item[1]?item[1]:item[0].charAt(0),item[2]==undefined?self.KEY_CTRL:item[2],exec(cmd));
}
});
}});
dojo.provide("dojo.widget.DropdownContainer");
dojo.widget.defineWidget("dojo.widget.DropdownContainer",dojo.widget.HtmlWidget,{inputWidth:"7em",id:"",inputId:"",inputName:"",inputId:"",inputName:"",iconURL:dojo.uri.dojoUri("src/widget/templates/images/combo_box_arrow.png"),copyClasses:false,iconAlt:"",containerToggle:"plain",containerToggleDuration:150,templateString:"<span style=\"white-space:nowrap\"><input type=\"hidden\" name=\"\" value=\"\" dojoAttachPoint=\"valueNode\" /><input name=\"\" type=\"text\" value=\"\" style=\"vertical-align:middle;\" dojoAttachPoint=\"inputNode\" autocomplete=\"off\" /> <img src=\"${this.iconURL}\" alt=\"${this.iconAlt}\" dojoAttachEvent=\"onclick: togglePopup; onkey:  iconKeyHandler\" dojoAttachPoint=\"buttonNode\" style=\"vertical-align:middle; cursor:pointer; cursor:hand\" tabindex=\"0\" waiRole=\"button\" waiState=\"hasPopup-true\" /></span>",templateCssPath:"",isContainer:true,attachTemplateNodes:function(){
dojo.widget.DropdownContainer.superclass.attachTemplateNodes.apply(this,arguments);
this.popup=dojo.widget.createWidget("PopupContainer",{toggle:this.containerToggle,toggleDuration:this.containerToggleDuration});
this.containerNode=this.popup.domNode;
},fillInTemplate:function(args,frag){
this.domNode.appendChild(this.popup.domNode);
if(this.id){
this.domNode.id=this.id;
}
if(this.inputId){
this.inputNode.id=this.inputId;
}
if(this.inputName){
this.inputNode.name=this.inputName;
}
this.inputNode.style.width=this.inputWidth;
this.inputNode.disabled=this.disabled;
if(this.copyClasses){
this.inputNode.style="";
this.inputNode.className=this.getFragNodeRef(frag).className;
}
dojo.event.connect(this.inputNode,"onchange",this,"onInputChange");
},iconKeyHandler:function(evt){
if(evt.keyCode==dojo.event.browser.keys.KEY_SPACE||evt.keyCode==dojo.event.browser.keys.KEY_ENTER){
this.togglePopup(evt);
dojo.event.browser.stopEvent(evt);
}
},togglePopup:function(evt){
if(this.disabled){
return;
}
if(!this.popup.isShowingNow){
this.popup.open(this.inputNode,this,this.buttonNode);
}else{
this.popup.close();
}
},hideContainer:function(){
if(this.popup.isShowingNow){
this.popup.close();
}
},onInputChange:function(){
},enable:function(){
this.inputNode.disabled=false;
dojo.widget.DropdownContainer.superclass.enable.apply(this,arguments);
},disable:function(){
this.inputNode.disabled=true;
dojo.widget.DropdownContainer.superclass.disable.apply(this,arguments);
}});
dojo.provide("dojo.date.common");
dojo.date.setDayOfYear=function(_ab2,_ab3){
_ab2.setMonth(0);
_ab2.setDate(_ab3);
return _ab2;
};
dojo.date.getDayOfYear=function(_ab4){
var _ab5=_ab4.getFullYear();
var _ab6=new Date(_ab5-1,11,31);
return Math.floor((_ab4.getTime()-_ab6.getTime())/86400000);
};
dojo.date.setWeekOfYear=function(_ab7,week,_ab9){
if(arguments.length==1){
_ab9=0;
}
dojo.unimplemented("dojo.date.setWeekOfYear");
};
dojo.date.getWeekOfYear=function(_aba,_abb){
if(arguments.length==1){
_abb=0;
}
var _abc=new Date(_aba.getFullYear(),0,1);
var day=_abc.getDay();
_abc.setDate(_abc.getDate()-day+_abb-(day>_abb?7:0));
return Math.floor((_aba.getTime()-_abc.getTime())/604800000);
};
dojo.date.setIsoWeekOfYear=function(_abe,week,_ac0){
if(arguments.length==1){
_ac0=1;
}
dojo.unimplemented("dojo.date.setIsoWeekOfYear");
};
dojo.date.getIsoWeekOfYear=function(_ac1,_ac2){
if(arguments.length==1){
_ac2=1;
}
dojo.unimplemented("dojo.date.getIsoWeekOfYear");
};
dojo.date.shortTimezones=["IDLW","BET","HST","MART","AKST","PST","MST","CST","EST","AST","NFT","BST","FST","AT","GMT","CET","EET","MSK","IRT","GST","AFT","AGTT","IST","NPT","ALMT","MMT","JT","AWST","JST","ACST","AEST","LHST","VUT","NFT","NZT","CHAST","PHOT","LINT"];
dojo.date.timezoneOffsets=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,540,570,600,630,660,690,720,765,780,840];
dojo.date.getDaysInMonth=function(_ac3){
var _ac4=_ac3.getMonth();
var days=[31,28,31,30,31,30,31,31,30,31,30,31];
if(_ac4==1&&dojo.date.isLeapYear(_ac3)){
return 29;
}else{
return days[_ac4];
}
};
dojo.date.isLeapYear=function(_ac6){
var year=_ac6.getFullYear();
return (year%400==0)?true:(year%100==0)?false:(year%4==0)?true:false;
};
dojo.date.getTimezoneName=function(_ac8){
var str=_ac8.toString();
var tz="";
var _acb;
var pos=str.indexOf("(");
if(pos>-1){
pos++;
tz=str.substring(pos,str.indexOf(")"));
}else{
var pat=/([A-Z\/]+) \d{4}$/;
if((_acb=str.match(pat))){
tz=_acb[1];
}else{
str=_ac8.toLocaleString();
pat=/ ([A-Z\/]+)$/;
if((_acb=str.match(pat))){
tz=_acb[1];
}
}
}
return tz=="AM"||tz=="PM"?"":tz;
};
dojo.date.getOrdinal=function(_ace){
var date=_ace.getDate();
if(date%100!=11&&date%10==1){
return "st";
}else{
if(date%100!=12&&date%10==2){
return "nd";
}else{
if(date%100!=13&&date%10==3){
return "rd";
}else{
return "th";
}
}
}
};
dojo.date.compareTypes={DATE:1,TIME:2};
dojo.date.compare=function(_ad0,_ad1,_ad2){
var dA=_ad0;
var dB=_ad1||new Date();
var now=new Date();
with(dojo.date.compareTypes){
var opt=_ad2||(DATE|TIME);
var d1=new Date((opt&DATE)?dA.getFullYear():now.getFullYear(),(opt&DATE)?dA.getMonth():now.getMonth(),(opt&DATE)?dA.getDate():now.getDate(),(opt&TIME)?dA.getHours():0,(opt&TIME)?dA.getMinutes():0,(opt&TIME)?dA.getSeconds():0);
var d2=new Date((opt&DATE)?dB.getFullYear():now.getFullYear(),(opt&DATE)?dB.getMonth():now.getMonth(),(opt&DATE)?dB.getDate():now.getDate(),(opt&TIME)?dB.getHours():0,(opt&TIME)?dB.getMinutes():0,(opt&TIME)?dB.getSeconds():0);
}
if(d1.valueOf()>d2.valueOf()){
return 1;
}
if(d1.valueOf()<d2.valueOf()){
return -1;
}
return 0;
};
dojo.date.dateParts={YEAR:0,MONTH:1,DAY:2,HOUR:3,MINUTE:4,SECOND:5,MILLISECOND:6,QUARTER:7,WEEK:8,WEEKDAY:9};
dojo.date.add=function(dt,_ada,incr){
if(typeof dt=="number"){
dt=new Date(dt);
}
function fixOvershoot(){
if(sum.getDate()<dt.getDate()){
sum.setDate(0);
}
}
var sum=new Date(dt);
with(dojo.date.dateParts){
switch(_ada){
case YEAR:
sum.setFullYear(dt.getFullYear()+incr);
fixOvershoot();
break;
case QUARTER:
incr*=3;
case MONTH:
sum.setMonth(dt.getMonth()+incr);
fixOvershoot();
break;
case WEEK:
incr*=7;
case DAY:
sum.setDate(dt.getDate()+incr);
break;
case WEEKDAY:
var dat=dt.getDate();
var _ade=0;
var days=0;
var strt=0;
var trgt=0;
var adj=0;
var mod=incr%5;
if(mod==0){
days=(incr>0)?5:-5;
_ade=(incr>0)?((incr-5)/5):((incr+5)/5);
}else{
days=mod;
_ade=parseInt(incr/5);
}
strt=dt.getDay();
if(strt==6&&incr>0){
adj=1;
}else{
if(strt==0&&incr<0){
adj=-1;
}
}
trgt=(strt+days);
if(trgt==0||trgt==6){
adj=(incr>0)?2:-2;
}
sum.setDate(dat+(7*_ade)+days+adj);
break;
case HOUR:
sum.setHours(sum.getHours()+incr);
break;
case MINUTE:
sum.setMinutes(sum.getMinutes()+incr);
break;
case SECOND:
sum.setSeconds(sum.getSeconds()+incr);
break;
case MILLISECOND:
sum.setMilliseconds(sum.getMilliseconds()+incr);
break;
default:
break;
}
}
return sum;
};
dojo.date.diff=function(dtA,dtB,_ae6){
if(typeof dtA=="number"){
dtA=new Date(dtA);
}
if(typeof dtB=="number"){
dtB=new Date(dtB);
}
var _ae7=dtB.getFullYear()-dtA.getFullYear();
var _ae8=(dtB.getMonth()-dtA.getMonth())+(_ae7*12);
var _ae9=dtB.getTime()-dtA.getTime();
var _aea=_ae9/1000;
var _aeb=_aea/60;
var _aec=_aeb/60;
var _aed=_aec/24;
var _aee=_aed/7;
var _aef=0;
with(dojo.date.dateParts){
switch(_ae6){
case YEAR:
_aef=_ae7;
break;
case QUARTER:
var mA=dtA.getMonth();
var mB=dtB.getMonth();
var qA=Math.floor(mA/3)+1;
var qB=Math.floor(mB/3)+1;
qB+=(_ae7*4);
_aef=qB-qA;
break;
case MONTH:
_aef=_ae8;
break;
case WEEK:
_aef=parseInt(_aee);
break;
case DAY:
_aef=_aed;
break;
case WEEKDAY:
var days=Math.round(_aed);
var _af5=parseInt(days/7);
var mod=days%7;
if(mod==0){
days=_af5*5;
}else{
var adj=0;
var aDay=dtA.getDay();
var bDay=dtB.getDay();
_af5=parseInt(days/7);
mod=days%7;
var _afa=new Date(dtA);
_afa.setDate(_afa.getDate()+(_af5*7));
var _afb=_afa.getDay();
if(_aed>0){
switch(true){
case aDay==6:
adj=-1;
break;
case aDay==0:
adj=0;
break;
case bDay==6:
adj=-1;
break;
case bDay==0:
adj=-2;
break;
case (_afb+mod)>5:
adj=-2;
break;
default:
break;
}
}else{
if(_aed<0){
switch(true){
case aDay==6:
adj=0;
break;
case aDay==0:
adj=1;
break;
case bDay==6:
adj=2;
break;
case bDay==0:
adj=1;
break;
case (_afb+mod)<0:
adj=2;
break;
default:
break;
}
}
}
days+=adj;
days-=(_af5*2);
}
_aef=days;
break;
case HOUR:
_aef=_aec;
break;
case MINUTE:
_aef=_aeb;
break;
case SECOND:
_aef=_aea;
break;
case MILLISECOND:
_aef=_ae9;
break;
default:
break;
}
}
return Math.round(_aef);
};
dojo.provide("dojo.date.supplemental");
dojo.date.getFirstDayOfWeek=function(_afc){
var _afd={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,gb:0,sy:4};
_afc=dojo.hostenv.normalizeLocale(_afc);
var _afe=_afc.split("-")[1];
var dow=_afd[_afe];
return (typeof dow=="undefined")?1:dow;
};
dojo.date.getWeekend=function(_b00){
var _b01={eg:5,il:5,sy:5,"in":0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4};
var _b02={ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6};
_b00=dojo.hostenv.normalizeLocale(_b00);
var _b03=_b00.split("-")[1];
var _b04=_b01[_b03];
var end=_b02[_b03];
if(typeof _b04=="undefined"){
_b04=6;
}
if(typeof end=="undefined"){
end=0;
}
return {start:_b04,end:end};
};
dojo.date.isWeekend=function(_b06,_b07){
var _b08=dojo.date.getWeekend(_b07);
var day=(_b06||new Date()).getDay();
if(_b08.end<_b08.start){
_b08.end+=7;
if(day<_b08.start){
day+=7;
}
}
return day>=_b08.start&&day<=_b08.end;
};
dojo.provide("dojo.date.format");
(function(){
dojo.date.format=function(_b0a,_b0b){
if(typeof _b0b=="string"){
dojo.deprecated("dojo.date.format","To format dates with POSIX-style strings, please use dojo.date.strftime instead","0.5");
return dojo.date.strftime(_b0a,_b0b);
}
function formatPattern(_b0c,_b0d){
return _b0d.replace(/([a-z])\1*/ig,function(_b0e){
var s;
var c=_b0e.charAt(0);
var l=_b0e.length;
var pad;
var _b13=["abbr","wide","narrow"];
switch(c){
case "G":
if(l>3){
dojo.unimplemented("Era format not implemented");
}
s=info.eras[_b0c.getFullYear()<0?1:0];
break;
case "y":
s=_b0c.getFullYear();
switch(l){
case 1:
break;
case 2:
s=String(s).substr(-2);
break;
default:
pad=true;
}
break;
case "Q":
case "q":
s=Math.ceil((_b0c.getMonth()+1)/3);
switch(l){
case 1:
case 2:
pad=true;
break;
case 3:
case 4:
dojo.unimplemented("Quarter format not implemented");
}
break;
case "M":
case "L":
var m=_b0c.getMonth();
var _b16;
switch(l){
case 1:
case 2:
s=m+1;
pad=true;
break;
case 3:
case 4:
case 5:
_b16=_b13[l-3];
break;
}
if(_b16){
var type=(c=="L")?"standalone":"format";
var prop=["months",type,_b16].join("-");
s=info[prop][m];
}
break;
case "w":
var _b19=0;
s=dojo.date.getWeekOfYear(_b0c,_b19);
pad=true;
break;
case "d":
s=_b0c.getDate();
pad=true;
break;
case "D":
s=dojo.date.getDayOfYear(_b0c);
pad=true;
break;
case "E":
case "e":
case "c":
var d=_b0c.getDay();
var _b16;
switch(l){
case 1:
case 2:
if(c=="e"){
var _b1b=dojo.date.getFirstDayOfWeek(_b0b.locale);
d=(d-_b1b+7)%7;
}
if(c!="c"){
s=d+1;
pad=true;
break;
}
case 3:
case 4:
case 5:
_b16=_b13[l-3];
break;
}
if(_b16){
var type=(c=="c")?"standalone":"format";
var prop=["days",type,_b16].join("-");
s=info[prop][d];
}
break;
case "a":
var _b1c=(_b0c.getHours()<12)?"am":"pm";
s=info[_b1c];
break;
case "h":
case "H":
case "K":
case "k":
var h=_b0c.getHours();
switch(c){
case "h":
s=(h%12)||12;
break;
case "H":
s=h;
break;
case "K":
s=(h%12);
break;
case "k":
s=h||24;
break;
}
pad=true;
break;
case "m":
s=_b0c.getMinutes();
pad=true;
break;
case "s":
s=_b0c.getSeconds();
pad=true;
break;
case "S":
s=Math.round(_b0c.getMilliseconds()*Math.pow(10,l-3));
break;
case "v":
case "z":
s=dojo.date.getTimezoneName(_b0c);
if(s){
break;
}
l=4;
case "Z":
var _b1e=_b0c.getTimezoneOffset();
var tz=[(_b1e<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_b1e)/60),2),dojo.string.pad(Math.abs(_b1e)%60,2)];
if(l==4){
tz.splice(0,0,"GMT");
tz.splice(3,0,":");
}
s=tz.join("");
break;
case "Y":
case "u":
case "W":
case "F":
case "g":
case "A":
dojo.debug(_b0e+" modifier not yet implemented");
s="?";
break;
default:
dojo.raise("dojo.date.format: invalid pattern char: "+_b0d);
}
if(pad){
s=dojo.string.pad(s,l);
}
return s;
});
}
_b0b=_b0b||{};
var _b20=dojo.hostenv.normalizeLocale(_b0b.locale);
var _b21=_b0b.formatLength||"full";
var info=dojo.date._getGregorianBundle(_b20);
var str=[];
var _b23=dojo.lang.curry(this,formatPattern,_b0a);
if(_b0b.selector!="timeOnly"){
var _b24=_b0b.datePattern||info["dateFormat-"+_b21];
if(_b24){
str.push(_processPattern(_b24,_b23));
}
}
if(_b0b.selector!="dateOnly"){
var _b25=_b0b.timePattern||info["timeFormat-"+_b21];
if(_b25){
str.push(_processPattern(_b25,_b23));
}
}
var _b26=str.join(" ");
return _b26;
};
dojo.date.parse=function(_b27,_b28){
_b28=_b28||{};
var _b29=dojo.hostenv.normalizeLocale(_b28.locale);
var info=dojo.date._getGregorianBundle(_b29);
var _b2b=_b28.formatLength||"full";
if(!_b28.selector){
_b28.selector="dateOnly";
}
var _b2c=_b28.datePattern||info["dateFormat-"+_b2b];
var _b2d=_b28.timePattern||info["timeFormat-"+_b2b];
var _b2e;
if(_b28.selector=="dateOnly"){
_b2e=_b2c;
}else{
if(_b28.selector=="timeOnly"){
_b2e=_b2d;
}else{
if(_b28.selector=="dateTime"){
_b2e=_b2c+" "+_b2d;
}else{
var msg="dojo.date.parse: Unknown selector param passed: '"+_b28.selector+"'.";
msg+=" Defaulting to date pattern.";
dojo.debug(msg);
_b2e=_b2c;
}
}
}
var _b30=[];
var _b31=_processPattern(_b2e,dojo.lang.curry(this,_buildDateTimeRE,_b30,info,_b28));
var _b32=new RegExp("^"+_b31+"$");
var _b33=_b32.exec(_b27);
if(!_b33){
return null;
}
var _b34=["abbr","wide","narrow"];
var _b35=new Date(1972,0);
var _b36={};
for(var i=1;i<_b33.length;i++){
var grp=_b30[i-1];
var l=grp.length;
var v=_b33[i];
switch(grp.charAt(0)){
case "y":
if(l!=2){
_b35.setFullYear(v);
_b36.year=v;
}else{
if(v<100){
v=Number(v);
var year=""+new Date().getFullYear();
var _b3c=year.substring(0,2)*100;
var _b3d=Number(year.substring(2,4));
var _b3e=Math.min(_b3d+20,99);
var num=(v<_b3e)?_b3c+v:_b3c-100+v;
_b35.setFullYear(num);
_b36.year=num;
}else{
if(_b28.strict){
return null;
}
_b35.setFullYear(v);
_b36.year=v;
}
}
break;
case "M":
if(l>2){
if(!_b28.strict){
v=v.replace(/\./g,"");
v=v.toLowerCase();
}
var _b40=info["months-format-"+_b34[l-3]].concat();
for(var j=0;j<_b40.length;j++){
if(!_b28.strict){
_b40[j]=_b40[j].toLowerCase();
}
if(v==_b40[j]){
_b35.setMonth(j);
_b36.month=j;
break;
}
}
if(j==_b40.length){
dojo.debug("dojo.date.parse: Could not parse month name: '"+v+"'.");
return null;
}
}else{
_b35.setMonth(v-1);
_b36.month=v-1;
}
break;
case "E":
case "e":
if(!_b28.strict){
v=v.toLowerCase();
}
var days=info["days-format-"+_b34[l-3]].concat();
for(var j=0;j<days.length;j++){
if(!_b28.strict){
days[j]=days[j].toLowerCase();
}
if(v==days[j]){
break;
}
}
if(j==days.length){
dojo.debug("dojo.date.parse: Could not parse weekday name: '"+v+"'.");
return null;
}
break;
case "d":
_b35.setDate(v);
_b36.date=v;
break;
case "a":
var am=_b28.am||info.am;
var pm=_b28.pm||info.pm;
if(!_b28.strict){
v=v.replace(/\./g,"").toLowerCase();
am=am.replace(/\./g,"").toLowerCase();
pm=pm.replace(/\./g,"").toLowerCase();
}
if(_b28.strict&&v!=am&&v!=pm){
dojo.debug("dojo.date.parse: Could not parse am/pm part.");
return null;
}
var _b45=_b35.getHours();
if(v==pm&&_b45<12){
_b35.setHours(_b45+12);
}else{
if(v==am&&_b45==12){
_b35.setHours(0);
}
}
break;
case "K":
if(v==24){
v=0;
}
case "h":
case "H":
case "k":
if(v>23){
dojo.debug("dojo.date.parse: Illegal hours value");
return null;
}
_b35.setHours(v);
break;
case "m":
_b35.setMinutes(v);
break;
case "s":
_b35.setSeconds(v);
break;
case "S":
_b35.setMilliseconds(v);
break;
default:
dojo.unimplemented("dojo.date.parse: unsupported pattern char="+grp.charAt(0));
}
}
if(_b36.year&&_b35.getFullYear()!=_b36.year){
dojo.debug("Parsed year: '"+_b35.getFullYear()+"' did not match input year: '"+_b36.year+"'.");
return null;
}
if(_b36.month&&_b35.getMonth()!=_b36.month){
dojo.debug("Parsed month: '"+_b35.getMonth()+"' did not match input month: '"+_b36.month+"'.");
return null;
}
if(_b36.date&&_b35.getDate()!=_b36.date){
dojo.debug("Parsed day of month: '"+_b35.getDate()+"' did not match input day of month: '"+_b36.date+"'.");
return null;
}
return _b35;
};
function _processPattern(_b46,_b47,_b48,_b49){
var _b4a=function(x){
return x;
};
_b47=_b47||_b4a;
_b48=_b48||_b4a;
_b49=_b49||_b4a;
var _b4c=_b46.match(/(''|[^'])+/g);
var _b4d=false;
for(var i=0;i<_b4c.length;i++){
if(!_b4c[i]){
_b4c[i]="";
}else{
_b4c[i]=(_b4d?_b48:_b47)(_b4c[i]);
_b4d=!_b4d;
}
}
return _b49(_b4c.join(""));
}
function _buildDateTimeRE(_b4f,info,_b51,_b52){
return _b52.replace(/([a-z])\1*/ig,function(_b53){
var s;
var c=_b53.charAt(0);
var l=_b53.length;
switch(c){
case "y":
s="\\d"+((l==2)?"{2,4}":"+");
break;
case "M":
s=(l>2)?"\\S+":"\\d{1,2}";
break;
case "d":
s="\\d{1,2}";
break;
case "E":
s="\\S+";
break;
case "h":
case "H":
case "K":
case "k":
s="\\d{1,2}";
break;
case "m":
case "s":
s="[0-5]\\d";
break;
case "S":
s="\\d{1,3}";
break;
case "a":
var am=_b51.am||info.am||"AM";
var pm=_b51.pm||info.pm||"PM";
if(_b51.strict){
s=am+"|"+pm;
}else{
s=am;
s+=(am!=am.toLowerCase())?"|"+am.toLowerCase():"";
s+="|";
s+=(pm!=pm.toLowerCase())?pm+"|"+pm.toLowerCase():pm;
}
break;
default:
dojo.unimplemented("parse of date format, pattern="+_b52);
}
if(_b4f){
_b4f.push(_b53);
}
return "\\s*("+s+")\\s*";
});
}
})();
dojo.date.strftime=function(_b59,_b5a,_b5b){
var _b5c=null;
function _(s,n){
return dojo.string.pad(s,n||2,_b5c||"0");
}
var info=dojo.date._getGregorianBundle(_b5b);
function $(_b60){
switch(_b60){
case "a":
return dojo.date.getDayShortName(_b59,_b5b);
case "A":
return dojo.date.getDayName(_b59,_b5b);
case "b":
case "h":
return dojo.date.getMonthShortName(_b59,_b5b);
case "B":
return dojo.date.getMonthName(_b59,_b5b);
case "c":
return dojo.date.format(_b59,{locale:_b5b});
case "C":
return _(Math.floor(_b59.getFullYear()/100));
case "d":
return _(_b59.getDate());
case "D":
return $("m")+"/"+$("d")+"/"+$("y");
case "e":
if(_b5c==null){
_b5c=" ";
}
return _(_b59.getDate());
case "f":
if(_b5c==null){
_b5c=" ";
}
return _(_b59.getMonth()+1);
case "g":
break;
case "G":
dojo.unimplemented("unimplemented modifier 'G'");
break;
case "F":
return $("Y")+"-"+$("m")+"-"+$("d");
case "H":
return _(_b59.getHours());
case "I":
return _(_b59.getHours()%12||12);
case "j":
return _(dojo.date.getDayOfYear(_b59),3);
case "k":
if(_b5c==null){
_b5c=" ";
}
return _(_b59.getHours());
case "l":
if(_b5c==null){
_b5c=" ";
}
return _(_b59.getHours()%12||12);
case "m":
return _(_b59.getMonth()+1);
case "M":
return _(_b59.getMinutes());
case "n":
return "\n";
case "p":
return info[_b59.getHours()<12?"am":"pm"];
case "r":
return $("I")+":"+$("M")+":"+$("S")+" "+$("p");
case "R":
return $("H")+":"+$("M");
case "S":
return _(_b59.getSeconds());
case "t":
return "\t";
case "T":
return $("H")+":"+$("M")+":"+$("S");
case "u":
return String(_b59.getDay()||7);
case "U":
return _(dojo.date.getWeekOfYear(_b59));
case "V":
return _(dojo.date.getIsoWeekOfYear(_b59));
case "W":
return _(dojo.date.getWeekOfYear(_b59,1));
case "w":
return String(_b59.getDay());
case "x":
return dojo.date.format(_b59,{selector:"dateOnly",locale:_b5b});
case "X":
return dojo.date.format(_b59,{selector:"timeOnly",locale:_b5b});
case "y":
return _(_b59.getFullYear()%100);
case "Y":
return String(_b59.getFullYear());
case "z":
var _b61=_b59.getTimezoneOffset();
return (_b61>0?"-":"+")+_(Math.floor(Math.abs(_b61)/60))+":"+_(Math.abs(_b61)%60);
case "Z":
return dojo.date.getTimezoneName(_b59);
case "%":
return "%";
}
}
var _b62="";
var i=0;
var _b64=0;
var _b65=null;
while((_b64=_b5a.indexOf("%",i))!=-1){
_b62+=_b5a.substring(i,_b64++);
switch(_b5a.charAt(_b64++)){
case "_":
_b5c=" ";
break;
case "-":
_b5c="";
break;
case "0":
_b5c="0";
break;
case "^":
_b65="upper";
break;
case "*":
_b65="lower";
break;
case "#":
_b65="swap";
break;
default:
_b5c=null;
_b64--;
break;
}
var _b66=$(_b5a.charAt(_b64++));
switch(_b65){
case "upper":
_b66=_b66.toUpperCase();
break;
case "lower":
_b66=_b66.toLowerCase();
break;
case "swap":
var _b67=_b66.toLowerCase();
var _b68="";
var j=0;
var ch="";
while(j<_b66.length){
ch=_b66.charAt(j);
_b68+=(ch==_b67.charAt(j))?ch.toUpperCase():ch.toLowerCase();
j++;
}
_b66=_b68;
break;
default:
break;
}
_b65=null;
_b62+=_b66;
i=_b64;
}
_b62+=_b5a.substring(i);
return _b62;
};
(function(){
var _b6b=[];
dojo.date.addCustomFormats=function(_b6c,_b6d){
_b6b.push({pkg:_b6c,name:_b6d});
};
dojo.date._getGregorianBundle=function(_b6e){
var _b6f={};
dojo.lang.forEach(_b6b,function(desc){
var _b71=dojo.i18n.getLocalization(desc.pkg,desc.name,_b6e);
_b6f=dojo.lang.mixin(_b6f,_b71);
},this);
return _b6f;
};
})();
dojo.date.addCustomFormats("dojo.i18n.calendar","gregorian");
dojo.date.addCustomFormats("dojo.i18n.calendar","gregorianExtras");
dojo.date.getNames=function(item,type,use,_b75){
var _b76;
var _b77=dojo.date._getGregorianBundle(_b75);
var _b78=[item,use,type];
if(use=="standAlone"){
_b76=_b77[_b78.join("-")];
}
_b78[1]="format";
return (_b76||_b77[_b78.join("-")]).concat();
};
dojo.date.getDayName=function(_b79,_b7a){
return dojo.date.getNames("days","wide","format",_b7a)[_b79.getDay()];
};
dojo.date.getDayShortName=function(_b7b,_b7c){
return dojo.date.getNames("days","abbr","format",_b7c)[_b7b.getDay()];
};
dojo.date.getMonthName=function(_b7d,_b7e){
return dojo.date.getNames("months","wide","format",_b7e)[_b7d.getMonth()];
};
dojo.date.getMonthShortName=function(_b7f,_b80){
return dojo.date.getNames("months","abbr","format",_b80)[_b7f.getMonth()];
};
dojo.date.toRelativeString=function(_b81){
var now=new Date();
var diff=(now-_b81)/1000;
var end=" ago";
var _b85=false;
if(diff<0){
_b85=true;
end=" from now";
diff=-diff;
}
if(diff<60){
diff=Math.round(diff);
return diff+" second"+(diff==1?"":"s")+end;
}
if(diff<60*60){
diff=Math.round(diff/60);
return diff+" minute"+(diff==1?"":"s")+end;
}
if(diff<60*60*24){
diff=Math.round(diff/3600);
return diff+" hour"+(diff==1?"":"s")+end;
}
if(diff<60*60*24*7){
diff=Math.round(diff/(3600*24));
if(diff==1){
return _b85?"Tomorrow":"Yesterday";
}else{
return diff+" days"+end;
}
}
return dojo.date.format(_b81);
};
dojo.date.toSql=function(_b86,_b87){
return dojo.date.strftime(_b86,"%F"+!_b87?" %T":"");
};
dojo.date.fromSql=function(_b88){
var _b89=_b88.split(/[\- :]/g);
while(_b89.length<6){
_b89.push(0);
}
return new Date(_b89[0],(parseInt(_b89[1],10)-1),_b89[2],_b89[3],_b89[4],_b89[5]);
};
dojo.provide("dojo.date.serialize");
dojo.date.setIso8601=function(_b8a,_b8b){
var _b8c=(_b8b.indexOf("T")==-1)?_b8b.split(" "):_b8b.split("T");
_b8a=dojo.date.setIso8601Date(_b8a,_b8c[0]);
if(_b8c.length==2){
_b8a=dojo.date.setIso8601Time(_b8a,_b8c[1]);
}
return _b8a;
};
dojo.date.fromIso8601=function(_b8d){
return dojo.date.setIso8601(new Date(0,0),_b8d);
};
dojo.date.setIso8601Date=function(_b8e,_b8f){
var _b90="^([0-9]{4})((-?([0-9]{2})(-?([0-9]{2}))?)|"+"(-?([0-9]{3}))|(-?W([0-9]{2})(-?([1-7]))?))?$";
var d=_b8f.match(new RegExp(_b90));
if(!d){
dojo.debug("invalid date string: "+_b8f);
return null;
}
var year=d[1];
var _b93=d[4];
var date=d[6];
var _b95=d[8];
var week=d[10];
var _b97=d[12]?d[12]:1;
_b8e.setFullYear(year);
if(_b95){
_b8e.setMonth(0);
_b8e.setDate(Number(_b95));
}else{
if(week){
_b8e.setMonth(0);
_b8e.setDate(1);
var gd=_b8e.getDay();
var day=gd?gd:7;
var _b9a=Number(_b97)+(7*Number(week));
if(day<=4){
_b8e.setDate(_b9a+1-day);
}else{
_b8e.setDate(_b9a+8-day);
}
}else{
if(_b93){
_b8e.setDate(1);
_b8e.setMonth(_b93-1);
}
if(date){
_b8e.setDate(date);
}
}
}
return _b8e;
};
dojo.date.fromIso8601Date=function(_b9b){
return dojo.date.setIso8601Date(new Date(0,0),_b9b);
};
dojo.date.setIso8601Time=function(_b9c,_b9d){
var _b9e="Z|(([-+])([0-9]{2})(:?([0-9]{2}))?)$";
var d=_b9d.match(new RegExp(_b9e));
var _ba0=0;
if(d){
if(d[0]!="Z"){
_ba0=(Number(d[3])*60)+Number(d[5]);
_ba0*=((d[2]=="-")?1:-1);
}
_ba0-=_b9c.getTimezoneOffset();
_b9d=_b9d.substr(0,_b9d.length-d[0].length);
}
var _ba1="^([0-9]{2})(:?([0-9]{2})(:?([0-9]{2})(.([0-9]+))?)?)?$";
d=_b9d.match(new RegExp(_ba1));
if(!d){
dojo.debug("invalid time string: "+_b9d);
return null;
}
var _ba2=d[1];
var mins=Number((d[3])?d[3]:0);
var secs=(d[5])?d[5]:0;
var ms=d[7]?(Number("0."+d[7])*1000):0;
_b9c.setHours(_ba2);
_b9c.setMinutes(mins);
_b9c.setSeconds(secs);
_b9c.setMilliseconds(ms);
if(_ba0!==0){
_b9c.setTime(_b9c.getTime()+_ba0*60000);
}
return _b9c;
};
dojo.date.fromIso8601Time=function(_ba6){
return dojo.date.setIso8601Time(new Date(0,0),_ba6);
};
dojo.date.toRfc3339=function(_ba7,_ba8){
if(!_ba7){
_ba7=new Date();
}
var _=dojo.string.pad;
var _baa=[];
if(_ba8!="timeOnly"){
var date=[_(_ba7.getFullYear(),4),_(_ba7.getMonth()+1,2),_(_ba7.getDate(),2)].join("-");
_baa.push(date);
}
if(_ba8!="dateOnly"){
var time=[_(_ba7.getHours(),2),_(_ba7.getMinutes(),2),_(_ba7.getSeconds(),2)].join(":");
var _bad=_ba7.getTimezoneOffset();
time+=(_bad>0?"-":"+")+_(Math.floor(Math.abs(_bad)/60),2)+":"+_(Math.abs(_bad)%60,2);
_baa.push(time);
}
return _baa.join("T");
};
dojo.date.fromRfc3339=function(_bae){
if(_bae.indexOf("Tany")!=-1){
_bae=_bae.replace("Tany","");
}
var _baf=new Date();
return dojo.date.setIso8601(_baf,_bae);
};
dojo.provide("dojo.widget.DatePicker");
dojo.widget.defineWidget("dojo.widget.DatePicker",dojo.widget.HtmlWidget,{value:"",name:"",displayWeeks:6,displayDays:7,calendarFocus:{row:0,column:0},monthButtons:{position:0,length:4},yearButtons:{position:0,length:2},adjustWeeks:false,startDate:"1492-10-12",endDate:"2941-10-12",weekStartsOn:"",storedDate:"",staticDisplay:false,dayWidth:"narrow",classNames:{previous:"previousMonth",disabledPrevious:"previousMonthDisabled",current:"currentMonth",disabledCurrent:"currentMonthDisabled",next:"nextMonth",disabledNext:"nextMonthDisabled",currentDate:"currentDate",selectedDate:"selectedItem"},templateString:"<div class=\"datePickerContainer\" dojoAttachPoint=\"datePickerContainerNode\">\n	<table cellspacing=\"0\" cellpadding=\"0\" class=\"calendarContainer\">\n		<thead>\n			<tr>\n				<td class=\"monthWrapper\" valign=\"top\">\n					<table class=\"monthContainer\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" dojoAttachPoint=\"monthContainer\" >\n						<tr>\n							<td class=\"monthCurve monthCurveTL\" valign=\"top\"></td>\n							<td class=\"monthLabelContainer\" valign=\"top\" dojoAttachEvent=\"onKey: onMonthKey\">\n								<span tabindex=\"-1\" position=\"3\"\n									dojoAttachPoint=\"increaseWeekNode\" \n									dojoAttachEvent=\"onClick: onIncrementWeek; onFocus: onMonthButtonFocus; onBlur: onMonthButtonBlur\" \n									class=\"incrementControl increase\">\n									<img src=\"${dojoRoot}src/widget/templates/images/incrementMonth.png\" \n									alt=\"&darr;\" style=\"width:7px;height:5px;\" />\n								</span>\n								<span tabindex=\"-1\" position=\"2\"\n									dojoAttachPoint=\"increaseMonthNode\" \n									dojoAttachEvent=\"onClick: onIncrementMonth; onFocus: onMonthButtonFocus; onBlur: onMonthButtonBlur\" class=\"incrementControl increase\">\n									<img src=\"${dojoRoot}src/widget/templates/images/incrementMonth.png\" \n										alt=\"&darr;\"  dojoAttachPoint=\"incrementMonthImageNode\">\n								</span>\n								<span tabindex=\"0\" position=\"0\"\n									dojoAttachPoint=\"decreaseWeekNode\" \n									dojoAttachEvent=\"onClick: onIncrementWeek; onFocus: onMonthButtonFocus; onBlur: onMonthButtonBlur\" \n									class=\"incrementControl decrease\">\n									<img src=\"${dojoRoot}src/widget/templates/images/decrementMonth.png\" alt=\"&uarr;\" style=\"width:7px;height:5px;\" />\n								</span>\n								<span tabindex=\"-1\" position=\"1\"\n									dojoAttachPoint=\"decreaseMonthNode\" \n									dojoAttachEvent=\"onClick: onIncrementMonth; onFocus: onMonthButtonFocus; onBlur: onMonthButtonBlur\" class=\"incrementControl decrease\">\n									<img src=\"${dojoRoot}src/widget/templates/images/decrementMonth.png\" \n										alt=\"&uarr;\" dojoAttachPoint=\"decrementMo"+
"nthImageNode\">\n								</span>\n								<span dojoAttachPoint=\"monthLabelNode\" class=\"month\"></span>\n							</td>\n							<td class=\"monthCurve monthCurveTR\" valign=\"top\"></td>\n						</tr>\n					</table>\n				</td>\n			</tr>\n		</thead>\n		<tbody>\n			<tr>\n				<td colspan=\"3\">\n					<table class=\"calendarBodyContainer\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" dojoAttachPoint=\"calendarBodyContainer\" >\n						<thead>\n							<tr dojoAttachPoint=\"dayLabelsRow\">\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n							</tr>\n						</thead>\n						<tbody dojoAttachPoint=\"calendarDatesContainerNode\" \n							dojoAttachEvent=\"onClick: _handleUiAction; onKey: onCalendarKey\">\n							<tr dojoAttachPoint=\"calendarWeekTemplate\">\n								<td tabindex=\"-1\" ></td>\n								<td tabindex=\"-1\" ></td>\n								<td tabindex=\"-1\" ></td>\n								<td tabindex=\"-1\" ></td>\n								<td tabindex=\"-1\" ></td>\n								<td tabindex=\"-1\" ></td>\n								<td tabindex=\"-1\" ></td>\n							</tr>\n						</tbody>\n					</table>\n				</td>\n			</tr>\n		</tbody>\n		<tfoot>\n			<tr>\n				<td colspan=\"3\" class=\"yearWrapper\">\n					<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"yearContainer\" dojoAttachPoint=\"yearContainer\">\n						<tr>\n							<td class=\"curveBL\" valign=\"top\"></td>\n							<td valign=\"top\">\n								<h3 class=\"yearLabel\" dojoAttachEvent=\"onKey: onYearKey\">\n									<span dojoAttachPoint=\"previousYearLabelNode\" tabindex=\"0\" position=\"0\"\n										dojoAttachEvent=\"onClick: onIncrementYear; onFocus: onYearButtonFocus; onBlur: onYearButtonBlur\" class=\"previousYear\"></span>\n									<span class=\"selectedYear\" dojoAttachPoint=\"currentYearLabelNode\"></span>\n									<span dojoAttachPoint=\"nextYearLabelNode\"  tabindex=\"-1\" position=\"1\"\n										dojoAttachEvent=\"onClick: onIncrementYear; onFocus: onYearButtonFocus; onBlur: onYearButtonBlur\" class=\"nextYear\"></span>\n								</h3>\n							</td>\n							<td class=\"curveBR\" valign=\"top\"></td>\n					"+
"	</tr>\n					</table>\n				</td>\n			</tr>\n		</tfoot>\n	</table>\n	\n</div>\n",templateCssString:".datePickerContainer {\n	/*width:164px;*/ /* needed for proper user styling */\n	background-color: #FFF;\n}\n\n.calendarContainer {\n/*	border:1px solid #566f8f;*/\n}\n\n.calendarBodyContainer {\n	width:100%; /* needed for the explode effect (explain?) */\n	/*background: #7591bc url(\"images/dpBg.gif\") top left repeat-x;*/\n}\n\n.calendarBodyContainer thead tr td {\n	/*color:#293a4b;\n	font:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\n	background: url(\"images/dpHorizLine.gif\") bottom left repeat-x;*/\n	text-align:center;\n	padding:0.25em;\n	\n}\n\n.calendarBodyContainer tbody tr td {\n	/* color:#fff;\n	font:bold 0.7em Helvetica, Arial, Verdana, sans-serif;\n	background: url(\"images/dpVertLine.gif\") top right repeat-y; */\n	text-align:center;\n	padding:0.4em;\n	cursor:pointer;\n	cursor:hand;\n}\n\n\n.monthWrapper {\n	padding-bottom:2px;\n	/* background: url(\"images/dpHorizLine.gif\") bottom left repeat-x; */\n}\n\n.monthContainer {\n	width:100%;\n}\n\n.monthLabelContainer {\n	font:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\n	/* background: url(\"images/dpMonthBg.png\") repeat-x top left !important; */\n	color:#293a4b;\n	padding:0.25em;\n	text-align:center;\n}\n\n.monthCurve {\n	width:12px;\n}\n/*\n.monthCurveTL {\n	background: url(\"images/dpCurveTL.png\") no-repeat top left !important;\n}\n\n.monthCurveTR {\n		background: url(\"images/dpCurveTR.png\") no-repeat top right !important;\n}\n*/\n\n.yearWrapper {\n	/* background: url(\"images/dpHorizLineFoot.gif\") top left repeat-x; */\n	padding-top:2px;\n}\n\n.yearContainer {\n	width:100%;\n}\n/*\n.yearContainer td {\n	background:url(\"images/dpYearBg.png\") top left repeat-x;\n}\n*/\n.yearContainer .yearLabel {\n	margin:0;\n	padding:0.45em 0 0.45em 0;\n	color:#fff;\n	/*font:bold 0.75em Helvetica, Arial, Verdana, sans-serif;*/\n	text-align:center;\n}\n\n.curveBL {\n	/*background: url(\"images/dpCurveBL.png\") bottom left no-repeat !important;*/\n	width:9px !important;\n	padding:0;\n	margin:0;\n}\n\n.curveBR {\n	/*background: url(\"images/dpCurveBR.png\") bottom right no-repeat !important;*/\n	width:9px !important"+
";\n	padding:0;\n	margin:0;\n}\n\n\n.previousMonth {\n	/* background-color:#6782a8 !important; */\n}\n\n.previousMonthDisabled {\n	/* background-color:#a4a5a6 !important; */\n	cursor:default !important\n}\n.currentMonth {\n}\n\n.currentMonthDisabled {\n	/* background-color:#bbbbbc !important; */\n	cursor:default !important\n}\n.nextMonth {\n	/* background-color:#6782a8 !important; */\n}\n.nextMonthDisabled {\n	/* background-color:#a4a5a6 !important; */\n	cursor:default !important;\n}\n\n.currentDate {\n	text-decoration:underline;\n	font-style:italic;\n}\n\n.selectedItem {\n	background-color:#fff !important;\n	color:#6782a8 !important;\n}\n\n.yearLabel .selectedYear {\n	padding:0.2em;\n	/* background-color:#9ec3fb !important; */\n}\n\n.nextYear, .previousYear {\n	cursor:pointer;cursor:hand;\n	padding:0;\n}\n\n.nextYear {\n	margin:0 0 0 0.55em;\n}\n\n.previousYear {\n	margin:0 0.55em 0 0;\n}\n\n.incrementControl {\n	cursor:pointer;cursor:hand;\n	width:1em;\n}\n\n.increase {\n	float:right;\n}\n\n.decrease {\n	float:left;\n}\n\n.lastColumn {\n	background-image:none !important;\n}\n\n\n",templateCssPath:dojo.uri.dojoUri("src/widget/templates/DatePicker.css"),postMixInProperties:function(){
dojo.widget.DatePicker.superclass.postMixInProperties.apply(this,arguments);
if(this.storedDate){
dojo.deprecated("dojo.widget.DatePicker","use 'value' instead of 'storedDate'","0.5");
this.value=this.storedDate;
}
this.startDate=dojo.date.fromRfc3339(this.startDate);
this.endDate=dojo.date.fromRfc3339(this.endDate);
this.startDate.setHours(0,0,0,0);
this.endDate.setHours(24,0,0,-1);
if(!this.weekStartsOn){
this.weekStartsOn=dojo.date.getFirstDayOfWeek(this.lang);
}
this.today=new Date();
this.today.setHours(0,0,0,0);
if(typeof (this.value)=="string"&&this.value.toLowerCase()=="today"){
this.value=new Date();
}else{
if(this.value&&(typeof this.value=="string")&&(this.value.split("-").length>2)){
this.value=dojo.date.fromRfc3339(this.value);
this.value.setHours(0,0,0,0);
}
}
},fillInTemplate:function(args,frag){
dojo.widget.DatePicker.superclass.fillInTemplate.apply(this,arguments);
var _bb2=this.getFragNodeRef(frag);
dojo.html.copyStyle(this.domNode,_bb2);
this.weekTemplate=dojo.dom.removeNode(this.calendarWeekTemplate);
this._preInitUI(this.value?this.value:this.today,false,true);
var _bb3=dojo.lang.unnest(dojo.date.getNames("days",this.dayWidth,"standAlone",this.lang));
if(this.weekStartsOn>0){
for(var i=0;i<this.weekStartsOn;i++){
_bb3.push(_bb3.shift());
}
}
var _bb5=this.dayLabelsRow.getElementsByTagName("td");
for(i=0;i<7;i++){
_bb5.item(i).innerHTML=_bb3[i];
}
if(this.value){
this.setValue(this.value);
}
},initialize:function(args,_bb7,_bb8){
},bidiLeftArrow:function(){
return document.documentElement.dir=="rtl"?dojo.event.browser.keys.KEY_RIGHT_ARROW:dojo.event.browser.keys.KEY_LEFT_ARROW;
},bidiRightArrow:function(){
return document.documentElement.dir=="rtl"?dojo.event.browser.keys.KEY_LEFT_ARROW:dojo.event.browser.keys.KEY_RIGHT_ARROW;
},onMonthKey:function(_bb9){
var pos=this.monthButtons.position;
var _bbb=this.monthButtons.length;
if(_bb9.keyCode==dojo.event.browser.keys.KEY_LEFT_ARROW||_bb9.keyCode==dojo.event.browser.keys.KEY_RIGHT_ARROW||_bb9.keyCode==dojo.event.browser.keys.KEY_UP_ARROW||_bb9.keyCode==dojo.event.browser.keys.KEY_DOWN_ARROW){
dojo.event.browser.stopEvent(_bb9);
}
if(_bb9.keyCode==this.bidiRightArrow()&&pos<_bbb-1){
this.focusMonthButton(pos+1);
}else{
if(_bb9.keyCode==this.bidiLeftArrow()&&pos>0){
this.focusMonthButton(pos-1);
}else{
if(_bb9.keyCode==dojo.event.browser.keys.KEY_SPACE||_bb9.keyCode==dojo.event.browser.keys.KEY_ENTER){
if(_bb9.target==this.increaseWeekNode||_bb9.target==this.decreaseWeekNode){
this.onIncrementWeek(_bb9);
dojo.event.browser.stopEvent(_bb9);
}else{
if(_bb9.target==this.increaseMonthNode||_bb9.target==this.decreaseMonthNode){
this.onIncrementMonth(_bb9);
dojo.event.browser.stopEvent(_bb9);
}
}
}else{
if(_bb9.keyCode==dojo.event.browser.keys.KEY_ESCAPE){
this.cancel();
dojo.event.browser.stopEvent(_bb9);
}
}
}
}
},focusMonthButton:function(pos){
var _bbd=this.getMonthButton(pos);
if(_bbd){
setTimeout(function(){
_bbd.focus();
},0);
}
},onYearKey:function(_bbe){
var pos=this.yearButtons.position;
var _bc0=this.yearButtons.length;
if(_bbe.keyCode==dojo.event.browser.keys.KEY_LEFT_ARROW||_bbe.keyCode==dojo.event.browser.keys.KEY_RIGHT_ARROW||_bbe.keyCode==dojo.event.browser.keys.KEY_UP_ARROW||_bbe.keyCode==dojo.event.browser.keys.KEY_DOWN_ARROW){
dojo.event.browser.stopEvent(_bbe);
}
if(_bbe.keyCode==this.bidiRightArrow()&&pos<_bc0-1){
this.focusYearButton(pos+1);
}else{
if(_bbe.keyCode==this.bidiLeftArrow()&&pos>0){
this.focusYearButton(pos-1);
}else{
if(_bbe.keyCode==dojo.event.browser.keys.KEY_SPACE||_bbe.keyCode==dojo.event.browser.keys.KEY_ENTER){
if(_bbe.target==this.previousYearLabelNode||_bbe.target==this.nextYearLabelNode){
this.onIncrementYear(_bbe);
dojo.event.browser.stopEvent(_bbe);
}
}else{
if(_bbe.keyCode==dojo.event.browser.keys.KEY_ESCAPE){
this.cancel();
dojo.event.browser.stopEvent(_bbe);
}
}
}
}
},focusYearButton:function(pos){
var _bc2=this.getYearButton(pos);
if(_bc2){
setTimeout(function(){
_bc2.focus();
},0);
}
},focusMonthButton:function(pos){
var _bc4=this.getMonthButton(pos);
if(_bc4){
setTimeout(function(){
_bc4.focus();
},0);
}
},onCalendarKey:function(_bc5){
var c=this.calendarFocus;
if(_bc5.keyCode==dojo.event.browser.keys.KEY_LEFT_ARROW||_bc5.keyCode==dojo.event.browser.keys.KEY_RIGHT_ARROW||_bc5.keyCode==dojo.event.browser.keys.KEY_UP_ARROW||_bc5.keyCode==dojo.event.browser.keys.KEY_DOWN_ARROW){
dojo.event.browser.stopEvent(_bc5);
}
if(_bc5.keyCode==this.bidiRightArrow()&&c.column<this.displayDays-1){
this.focusCalendar(c.row,c.column+1);
}else{
if(_bc5.keyCode==this.bidiLeftArrow()&&c.column>0){
this.focusCalendar(c.row,c.column-1);
}else{
if(_bc5.keyCode==dojo.event.browser.keys.KEY_UP_ARROW&&c.row>0){
this.focusCalendar(c.row-1,c.column);
}else{
if(_bc5.keyCode==dojo.event.browser.keys.KEY_DOWN_ARROW&&c.row<this.displayWeeks-1){
this.focusCalendar(c.row+1,c.column);
}else{
if(_bc5.keyCode==dojo.event.browser.keys.KEY_SPACE||_bc5.keyCode==dojo.event.browser.keys.KEY_ENTER){
this._handleUiAction(_bc5);
dojo.event.browser.stopEvent(_bc5);
}else{
if(_bc5.keyCode==dojo.event.browser.keys.KEY_ESCAPE){
this.cancel();
dojo.event.browser.stopEvent(_bc5);
}
}
}
}
}
}
},cancel:function(){
},focusCalendar:function(row,_bc8){
if(row===undefined||_bc8===undefined){
row=this.calendarFocus.row;
_bc8=this.calendarFocus.column;
}
var _bc9=this.getDayAt(row,_bc8);
setTimeout(function(){
_bc9.focus();
},0);
},getValue:function(){
return dojo.date.toRfc3339(new Date(this.value),"dateOnly");
},getDate:function(){
return this.value;
},setValue:function(_bca){
this.setDate(_bca);
},setDate:function(_bcb){
if(typeof _bcb=="string"){
this.value=dojo.date.fromRfc3339(_bcb);
}else{
this.value=new Date(_bcb);
}
this.value.setHours(0,0,0,0);
if(this.selectedNode!=null){
dojo.html.removeClass(this.selectedNode,this.classNames.selectedDate);
}
if(this.clickedNode!=null){
dojo.html.addClass(this.clickedNode,this.classNames.selectedDate);
this.selectedNode=this.clickedNode;
}else{
this._preInitUI(this.value,false,true);
}
this.clickedNode=null;
this.onValueChanged(this.value);
},_preInitUI:function(_bcc,_bcd,_bce){
if(_bcc<this.startDate||_bcc>this.endDate){
_bcc=new Date((_bcc<this.startDate)?this.startDate:this.endDate);
}
this.firstDay=this._initFirstDay(_bcc,_bcd);
this.selectedIsUsed=false;
this.currentIsUsed=false;
var _bcf=new Date(this.firstDay);
var _bd0=_bcf.getMonth();
this.curMonth=new Date(_bcf);
this.curMonth.setDate(_bcf.getDate()+6);
this.curMonth.setDate(1);
if(this.displayWeeks==""||this.adjustWeeks){
this.adjustWeeks=true;
this.displayWeeks=Math.ceil((dojo.date.getDaysInMonth(this.curMonth)+this._getAdjustedDay(this.curMonth))/7);
}
var days=this.displayWeeks*7;
if(dojo.date.diff(this.startDate,this.endDate,dojo.date.dateParts.DAY)<days){
this.staticDisplay=true;
if(dojo.date.diff(_bcf,this.endDate,dojo.date.dateParts.DAY)>days){
this._preInitUI(this.startDate,true,false);
_bcf=new Date(this.firstDay);
}
this.curMonth=new Date(_bcf);
this.curMonth.setDate(_bcf.getDate()+6);
this.curMonth.setDate(1);
var _bd2=(_bcf.getMonth()==this.curMonth.getMonth())?"current":"previous";
}
if(_bce){
this._initUI(days);
}
},_initUI:function(days){
dojo.dom.removeChildren(this.calendarDatesContainerNode);
for(var i=0;i<this.displayWeeks;i++){
this.calendarDatesContainerNode.appendChild(this.weekTemplate.cloneNode(true));
}
var _bd5=new Date(this.firstDay);
this._setMonthLabel(this.curMonth.getMonth());
this._setYearLabels(this.curMonth.getFullYear());
var _bd6=this.calendarDatesContainerNode.getElementsByTagName("td");
var _bd7=this.calendarDatesContainerNode.getElementsByTagName("tr");
var _bd8;
var row=0;
for(i=0;i<days;i++){
var _bda=i%this.displayDays;
if(i>0&&i%this.displayDays==0){
row++;
}
_bd8=_bd6.item(i);
_bd8.innerHTML=_bd5.getDate();
var _bdb=(_bd5.getMonth()<this.curMonth.getMonth())?"previous":(_bd5.getMonth()==this.curMonth.getMonth())?"current":"next";
var _bdc=_bdb;
if(this._isDisabledDate(_bd5)){
var _bdd={previous:"disabledPrevious",current:"disabledCurrent",next:"disabledNext"};
_bdc=_bdd[_bdb];
}
dojo.html.setClass(_bd8,this._getDateClassName(_bd5,_bdc));
_bd8.setAttribute("row",row);
_bd8.setAttribute("column",_bda);
dojo.event.connect(_bd8,"onfocus",this,"onDayFocus");
dojo.event.connect(_bd8,"onblur",this,"onDayBlur");
if(dojo.html.hasClass(_bd8,this.classNames.selectedDate)){
this.selectedNode=_bd8;
}
if(dojo.html.hasClass(_bd8,this.classNames.currentDate)){
this.todaysNode=_bd8;
}
_bd5=dojo.date.add(_bd5,dojo.date.dateParts.DAY,1);
}
var _bde=this.getCurrentDay();
if(_bde){
_bde.setAttribute("tabIndex","-1");
}
if(this.selectedNode){
this.calendarFocus.row=parseInt(this.selectedNode.getAttribute("row"));
this.calendarFocus.column=parseInt(this.selectedNode.getAttribute("column"));
}else{
if(this.todaysNode){
this.calendarFocus.row=parseInt(this.todaysNode.getAttribute("row"));
this.calendarFocus.column=parseInt(this.todaysNode.getAttribute("column"));
}else{
this.calendarFocus.row=0;
this.calendarFocus.column=0;
}
}
this.getCurrentDay().setAttribute("tabIndex","0");
this.lastDay=dojo.date.add(_bd5,dojo.date.dateParts.DAY,-1);
this._initControls();
},_initControls:function(){
var d=this.firstDay;
var d2=this.lastDay;
var _be1,_be2,_be3,_be4,_be5,_be6;
_be1=_be2=_be3=_be4=_be5=_be6=!this.staticDisplay;
with(dojo.date.dateParts){
var add=dojo.date.add;
if(_be1&&add(d,DAY,(-1*(this._getAdjustedDay(d)+1)))<this.startDate){
_be1=_be3=_be5=false;
}
if(_be2&&d2>this.endDate){
_be2=_be4=_be6=false;
}
if(_be3&&add(d,DAY,-1)<this.startDate){
_be3=_be5=false;
}
if(_be4&&add(d2,DAY,1)>this.endDate){
_be4=_be6=false;
}
if(_be5&&add(d2,YEAR,-1)<this.startDate){
_be5=false;
}
if(_be6&&add(d,YEAR,1)>this.endDate){
_be6=false;
}
}
function enableControl(node,_be9){
dojo.html.setVisibility(node,_be9?"":"hidden");
}
enableControl(this.decreaseWeekNode,_be1);
enableControl(this.increaseWeekNode,_be2);
enableControl(this.decreaseMonthNode,_be3);
enableControl(this.increaseMonthNode,_be4);
enableControl(this.previousYearLabelNode,_be5);
enableControl(this.nextYearLabelNode,_be6);
},changeCalendarFocus:function(row,_beb){
var _bec=this.getDayAt(row,_beb);
setTimeout(function(){
_bec.focus();
},0);
},getCurrentDay:function(){
return this.getDayAt(this.calendarFocus.row,this.calendarFocus.column);
},getDayAt:function(row,_bee){
var _bef=null;
var _bf0=this.calendarDatesContainerNode.getElementsByTagName("tr");
if(row<_bf0.length&&row>=0){
var _bf1=_bf0.item(row).getElementsByTagName("td");
if(_bee<_bf1.length&&_bee>=0){
_bef=_bf1.item(_bee);
}
}
return _bef;
},getMonthButton:function(pos){
var _bf3=[this.decreaseWeekNode,this.decreaseMonthNode,this.increaseMonthNode,this.increaseWeekNode];
if(pos>=0&&pos<_bf3.length){
return _bf3[pos];
}else{
return null;
}
},getYearButton:function(pos){
var _bf5=[this.previousYearLabelNode,this.nextYearLabelNode];
if(pos>=0&&pos<_bf5.length){
return _bf5[pos];
}else{
return null;
}
},onYearButtonFocus:function(_bf6){
var _bf7=_bf6.target;
dojo.html.addClass(_bf6.target,"focused");
newFocusPosition=parseInt(_bf7.getAttribute("position"));
if(newFocusPosition!=this.yearButtons.position){
var _bf8=this.yearButtons.position;
var _bf9=this.getYearButton(_bf8);
_bf9.setAttribute("tabIndex","-1");
var _bfa=this.getYearButton(newFocusPosition);
_bfa.setAttribute("tabIndex","0");
this.yearButtons.position=newFocusPosition;
}else{
var _bfa=this.getYearButton(this.yearButtons.position);
_bfa.setAttribute("tabIndex","0");
}
},onYearButtonBlur:function(_bfb){
dojo.html.removeClass(_bfb.target,"focused");
},onMonthButtonFocus:function(_bfc){
var _bfd=_bfc.target;
dojo.html.addClass(_bfc.target,"focused");
newFocusPosition=parseInt(_bfd.getAttribute("position"));
if(newFocusPosition!=this.monthButtons.position){
var _bfe=this.monthButtons.position;
var _bff=this.getMonthButton(_bfe);
_bff.setAttribute("tabIndex","-1");
var _c00=this.getMonthButton(newFocusPosition);
_c00.setAttribute("tabIndex","0");
this.monthButtons.position=newFocusPosition;
}else{
var _c00=this.getMonthButton(this.monthButtons.position);
_c00.setAttribute("tabIndex","0");
}
},onMonthButtonBlur:function(_c01){
dojo.html.removeClass(_c01.target,"focused");
},onDayFocus:function(_c02){
var _c03=_c02.target;
var _c04={};
_c04.row=parseInt(_c02.target.getAttribute("row"));
_c04.column=parseInt(_c02.target.getAttribute("column"));
dojo.html.addClass(_c02.target,"focused");
if(!(_c04.row==this.calendarFocus.row&&_c04.column==this.calendarFocus.column)){
var _c05=this.calendarFocus;
var _c06=this.getDayAt(_c05.row,_c05.column);
_c06.setAttribute("tabIndex","-1");
var _c07=this.getDayAt(_c04.row,_c04.column);
_c07.setAttribute("tabIndex","0");
this.calendarFocus.row=_c04.row;
this.calendarFocus.column=_c04.column;
}else{
var _c07=this.getDayAt(this.calendarFocus.row,this.calendarFocus.column);
_c07.setAttribute("tabIndex","0");
}
},onDayBlur:function(_c08){
dojo.html.removeClass(_c08.target,"focused");
},_incrementWeek:function(evt){
var d=new Date(this.firstDay);
switch(evt.target){
case this.increaseWeekNode.getElementsByTagName("img").item(0):
case this.increaseWeekNode:
var _c0b=dojo.date.add(d,dojo.date.dateParts.WEEK,1);
if(_c0b<this.endDate){
d=dojo.date.add(d,dojo.date.dateParts.WEEK,1);
}
break;
case this.decreaseWeekNode.getElementsByTagName("img").item(0):
case this.decreaseWeekNode:
if(d>=this.startDate){
d=dojo.date.add(d,dojo.date.dateParts.WEEK,-1);
}
break;
}
this._preInitUI(d,true,true);
},_incrementMonth:function(evt){
var d=new Date(this.curMonth);
var _c0e=new Date(this.firstDay);
switch(evt.target){
case this.increaseMonthNode.getElementsByTagName("img").item(0):
case this.increaseMonthNode:
_c0e=dojo.date.add(_c0e,dojo.date.dateParts.DAY,this.displayWeeks*7);
if(_c0e<this.endDate){
d=dojo.date.add(d,dojo.date.dateParts.MONTH,1);
}else{
var _c0f=true;
}
break;
case this.decreaseMonthNode.getElementsByTagName("img").item(0):
case this.decreaseMonthNode:
if(_c0e>this.startDate){
d=dojo.date.add(d,dojo.date.dateParts.MONTH,-1);
}else{
var _c10=true;
}
break;
}
if(_c10){
d=new Date(this.startDate);
}else{
if(_c0f){
d=new Date(this.endDate);
}
}
this._preInitUI(d,false,true);
},_incrementYear:function(evt){
var year=this.curMonth.getFullYear();
var _c13=new Date(this.firstDay);
switch(evt.target){
case this.nextYearLabelNode:
_c13=dojo.date.add(_c13,dojo.date.dateParts.YEAR,1);
if(_c13<this.endDate){
year++;
}else{
var _c14=true;
}
break;
case this.previousYearLabelNode:
_c13=dojo.date.add(_c13,dojo.date.dateParts.YEAR,-1);
if(_c13>this.startDate){
year--;
}else{
var _c15=true;
}
break;
}
var d;
if(_c15){
d=new Date(this.startDate);
}else{
if(_c14){
d=new Date(this.endDate);
}else{
d=new Date(year,this.curMonth.getMonth(),1);
}
}
this._preInitUI(d,false,true);
},onIncrementWeek:function(evt){
evt.stopPropagation();
if(!this.staticDisplay){
this._incrementWeek(evt);
}
},onIncrementMonth:function(evt){
evt.stopPropagation();
if(!this.staticDisplay){
this._incrementMonth(evt);
}
},onIncrementYear:function(evt){
evt.stopPropagation();
if(!this.staticDisplay){
this._incrementYear(evt);
}
},_setMonthLabel:function(_c1a){
this.monthLabelNode.innerHTML=dojo.date.getNames("months","wide","standAlone",this.lang)[_c1a];
},_setYearLabels:function(year){
var y=year-1;
var that=this;
function f(n){
that[n+"YearLabelNode"].innerHTML=dojo.date.format(new Date(y++,0),{formatLength:"yearOnly",locale:that.lang});
}
f("previous");
f("current");
f("next");
},_getDateClassName:function(date,_c20){
var _c21=this.classNames[_c20];
if((!this.selectedIsUsed&&this.value)&&(Number(date)==Number(this.value))){
_c21=this.classNames.selectedDate+" "+_c21;
this.selectedIsUsed=true;
}
if((!this.currentIsUsed)&&(Number(date)==Number(this.today))){
_c21=_c21+" "+this.classNames.currentDate;
this.currentIsUsed=true;
}
return _c21;
},onClick:function(evt){
dojo.event.browser.stopEvent(evt);
},_handleUiAction:function(evt){
var _c24=evt.target;
if(_c24.nodeType!=dojo.dom.ELEMENT_NODE){
_c24=_c24.parentNode;
}
dojo.event.browser.stopEvent(evt);
this.selectedIsUsed=this.todayIsUsed=false;
var _c25=this.curMonth.getMonth();
var year=this.curMonth.getFullYear();
if(dojo.html.hasClass(_c24,this.classNames["disabledPrevious"])||dojo.html.hasClass(_c24,this.classNames["disabledCurrent"])||dojo.html.hasClass(_c24,this.classNames["disabledNext"])){
return;
}else{
if(dojo.html.hasClass(_c24,this.classNames["next"])){
_c25=++_c25%12;
if(_c25===0){
++year;
}
}else{
if(dojo.html.hasClass(_c24,this.classNames["previous"])){
_c25=--_c25%12;
if(_c25==11){
--year;
}
}
}
}
this.clickedNode=_c24;
this.setDate(new Date(year,_c25,_c24.innerHTML));
},onValueChanged:function(date){
},_isDisabledDate:function(_c28){
if(_c28<this.startDate||_c28>this.endDate){
return true;
}
return this.isDisabledDate(_c28,this.lang);
},isDisabledDate:function(_c29,_c2a){
return false;
},_initFirstDay:function(_c2b,adj){
var d=new Date(_c2b);
if(!adj){
d.setDate(1);
}
d.setDate(d.getDate()-this._getAdjustedDay(d,this.weekStartsOn));
d.setHours(0,0,0,0);
return d;
},_getAdjustedDay:function(_c2e){
var days=[0,1,2,3,4,5,6];
if(this.weekStartsOn>0){
for(var i=0;i<this.weekStartsOn;i++){
days.unshift(days.pop());
}
}
return days[_c2e.getDay()];
},destroy:function(){
dojo.widget.DatePicker.superclass.destroy.apply(this,arguments);
dojo.html.destroyNode(this.weekTemplate);
}});
dojo.provide("dojo.widget.DropdownDatePicker");
dojo.widget.defineWidget("dojo.widget.DropdownDatePicker",dojo.widget.DropdownContainer,{iconURL:dojo.uri.dojoUri("src/widget/templates/images/dateIcon.gif"),formatLength:"short",displayFormat:"",dateFormat:"",saveFormat:"",value:"",name:"",displayWeeks:6,adjustWeeks:false,startDate:"1492-10-12",endDate:"2941-10-12",weekStartsOn:"",staticDisplay:false,postMixInProperties:function(_c31,frag){
dojo.widget.DropdownDatePicker.superclass.postMixInProperties.apply(this,arguments);
var _c33=dojo.i18n.getLocalization("dojo.widget","DropdownDatePicker",this.lang);
this.iconAlt=_c33.selectDate;
if(typeof (this.value)=="string"&&this.value.toLowerCase()=="today"){
this.value=new Date();
}
if(this.value&&isNaN(this.value)){
var orig=this.value;
this.value=dojo.date.fromRfc3339(this.value);
if(!this.value){
this.value=new Date(orig);
dojo.deprecated("dojo.widget.DropdownDatePicker","date attributes must be passed in Rfc3339 format","0.5");
}
}
if(this.value&&!isNaN(this.value)){
this.value=new Date(this.value);
}
},fillInTemplate:function(args,frag){
dojo.widget.DropdownDatePicker.superclass.fillInTemplate.call(this,args,frag);
var _c37={widgetContainerId:this.widgetId,lang:this.lang,value:this.value,startDate:this.startDate,endDate:this.endDate,displayWeeks:this.displayWeeks,weekStartsOn:this.weekStartsOn,adjustWeeks:this.adjustWeeks,staticDisplay:this.staticDisplay};
this.datePicker=dojo.widget.createWidget("DatePicker",_c37,this.containerNode,"child");
dojo.event.connect(this.datePicker,"onValueChanged",this,"_updateText");
if(this.value){
this._updateText();
}
this.containerNode.explodeClassName="calendarBodyContainer";
this.valueNode.name=this.name;
dojo.event.connect(this.popup,"show",this.datePicker,"focusCalendar");
dojo.event.connect(this.popup,"close",this,"focusInput");
dojo.event.connect(this.datePicker,"cancel",this.popup,"close");
},focusInput:function(){
var _c38=this.inputNode;
setTimeout(function(){
_c38.focus();
},0);
},getValue:function(){
return this.valueNode.value;
},getDate:function(){
return this.datePicker.value;
},setValue:function(_c39){
this.setDate(_c39);
},setDate:function(_c3a){
this.datePicker.setDate(_c3a);
this._syncValueNode();
},_updateText:function(){
if(this.dateFormat){
dojo.deprecated("dojo.widget.DropdownDatePicker","Must use displayFormat attribute instead of dateFormat.  See dojo.date.format for specification.","0.5");
this.inputNode.value=dojo.date.strftime(this.datePicker.value,this.dateFormat,this.lang);
}else{
if(this.datePicker.value){
this.inputNode.value=dojo.date.format(this.datePicker.value,{formatLength:this.formatLength,datePattern:this.displayFormat,selector:"dateOnly",locale:this.lang});
}else{
this.inputNode.value="";
}
}
if(this.value<this.datePicker.startDate||this.value>this.datePicker.endDate){
this.inputNode.value="";
}
this._syncValueNode();
this.onValueChanged(this.getDate());
this.hideContainer();
},onValueChanged:function(_c3b){
},onInputChange:function(){
if(this.dateFormat){
dojo.deprecated("dojo.widget.DropdownDatePicker","Cannot parse user input.  Must use displayFormat attribute instead of dateFormat.  See dojo.date.format for specification.","0.5");
}else{
var _c3c=dojo.string.trim(this.inputNode.value);
if(_c3c){
var _c3d=dojo.date.parse(_c3c,{formatLength:this.formatLength,datePattern:this.displayFormat,selector:"dateOnly",locale:this.lang});
if(_c3d){
this.setDate(_c3d);
}
}else{
this.valueNode.value=_c3c;
}
}
if(_c3c){
this._updateText();
}
},_syncValueNode:function(){
var date=this.datePicker.value;
var _c3f="";
switch(this.saveFormat.toLowerCase()){
case "rfc":
case "iso":
case "":
_c3f=dojo.date.toRfc3339(date,"dateOnly");
break;
case "posix":
case "unix":
_c3f=Number(date);
break;
default:
if(date){
_c3f=dojo.date.format(date,{datePattern:this.saveFormat,selector:"dateOnly",locale:this.lang});
}
}
this.valueNode.value=_c3f;
},destroy:function(_c40){
this.datePicker.destroy(_c40);
dojo.widget.DropdownDatePicker.superclass.destroy.apply(this,arguments);
}});
dojo.provide("jsresources.activities.strings");
dojo.provide("jsresources.common.date");

