/*
	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:2,flag:"_2",revision:Number("$Rev: 7616 $".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"||(djConfig["useXDomain"]&&dojo.render.html.opera)){
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);
};
if(djConfig["modulePaths"]){
for(var param in djConfig["modulePaths"]){
dojo.registerModulePath(param,djConfig["modulePaths"][param]);
}
}
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;
dojo.hostenv.registerNlsPrefix=function(){
dojo.registerModulePath("nls","nls");
};
dojo.hostenv.preloadLocalizations=function(){
if(dojo.hostenv.localesGenerated){
dojo.hostenv.registerNlsPrefix();
function preload(_79){
_79=dojo.hostenv.normalizeLocale(_79);
dojo.hostenv.searchLocalePath(_79,true,function(loc){
for(var i=0;i<dojo.hostenv.localesGenerated.length;i++){
if(dojo.hostenv.localesGenerated[i]==loc){
dojo["require"]("nls.dojo_"+loc);
return true;
}
}
return false;
});
}
preload();
var _7c=djConfig.extraLocale||[];
for(var i=0;i<_7c.length;i++){
preload(_7c[i]);
}
}
dojo.hostenv.preloadLocalizations=function(){
};
};
dojo.requireLocalization=function(_7e,_7f,_80,_81){
dojo.hostenv.preloadLocalizations();
var _82=dojo.hostenv.normalizeLocale(_80);
var _83=[_7e,"nls",_7f].join(".");
var _84="";
if(_81){
var _85=_81.split(",");
for(var i=0;i<_85.length;i++){
if(_82.indexOf(_85[i])==0){
if(_85[i].length>_84.length){
_84=_85[i];
}
}
}
if(!_84){
_84="ROOT";
}
}
var _87=_81?_84:_82;
var _88=dojo.hostenv.findModule(_83);
var _89=null;
if(_88){
if(djConfig.localizationComplete&&_88._built){
return;
}
var _8a=_87.replace("-","_");
var _8b=_83+"."+_8a;
_89=dojo.hostenv.findModule(_8b);
}
if(!_89){
_88=dojo.hostenv.startPackage(_83);
var _8c=dojo.hostenv.getModuleSymbols(_7e);
var _8d=_8c.concat("nls").join("/");
var _8e;
dojo.hostenv.searchLocalePath(_87,_81,function(loc){
var _90=loc.replace("-","_");
var _91=_83+"."+_90;
var _92=false;
if(!dojo.hostenv.findModule(_91)){
dojo.hostenv.startPackage(_91);
var _93=[_8d];
if(loc!="ROOT"){
_93.push(loc);
}
_93.push(_7f);
var _94=_93.join("/")+".js";
_92=dojo.hostenv.loadPath(_94,null,function(_95){
var _96=function(){
};
_96.prototype=_8e;
_88[_90]=new _96();
for(var j in _95){
_88[_90][j]=_95[j];
}
});
}else{
_92=true;
}
if(_92&&_88[_90]){
_8e=_88[_90];
}else{
_88[_90]=_8e;
}
if(_81){
return true;
}
});
}
if(_81&&_82!=_84){
_88[_82.replace("-","_")]=_88[_84.replace("-","_")];
}
};
(function(){
var _98=djConfig.extraLocale;
if(_98){
if(!_98 instanceof Array){
_98=[_98];
}
var req=dojo.requireLocalization;
dojo.requireLocalization=function(m,b,_9c,_9d){
req(m,b,_9c,_9d);
if(_9c){
return;
}
for(var i=0;i<_98.length;i++){
req(m,b,_98[i],_9d);
}
};
}
})();
}
if(typeof window!="undefined"){
(function(){
if(djConfig.allowQueryConfig){
var _9f=document.location.toString();
var _a0=_9f.split("?",2);
if(_a0.length>1){
var _a1=_a0[1];
var _a2=_a1.split("&");
for(var x in _a2){
var sp=_a2[x].split("=");
if((sp[0].length>9)&&(sp[0].substr(0,9)=="djConfig.")){
var opt=sp[0].substr(9);
try{
djConfig[opt]=eval(sp[1]);
}
catch(e){
djConfig[opt]=sp[1];
}
}
}
}
}
if(((djConfig["baseScriptUri"]=="")||(djConfig["baseRelativePath"]==""))&&(document&&document.getElementsByTagName)){
var _a6=document.getElementsByTagName("script");
var _a7=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i;
for(var i=0;i<_a6.length;i++){
var src=_a6[i].getAttribute("src");
if(!src){
continue;
}
var m=src.match(_a7);
if(m){
var _ab=src.substring(0,m.index);
if(src.indexOf("bootstrap1")>-1){
_ab+="../";
}
if(!this["djConfig"]){
djConfig={};
}
if(djConfig["baseScriptUri"]==""){
djConfig["baseScriptUri"]=_ab;
}
if(djConfig["baseRelativePath"]==""){
djConfig["baseRelativePath"]=_ab;
}
break;
}
}
}
var dr=dojo.render;
var drh=dojo.render.html;
var drs=dojo.render.svg;
var dua=(drh.UA=navigator.userAgent);
var dav=(drh.AV=navigator.appVersion);
var t=true;
var f=false;
drh.capable=t;
drh.support.builtin=t;
dr.ver=parseFloat(drh.AV);
dr.os.mac=dav.indexOf("Macintosh")>=0;
dr.os.win=dav.indexOf("Windows")>=0;
dr.os.linux=dav.indexOf("X11")>=0;
drh.opera=dua.indexOf("Opera")>=0;
drh.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0);
drh.safari=dav.indexOf("Safari")>=0;
var _b3=dua.indexOf("Gecko");
drh.mozilla=drh.moz=(_b3>=0)&&(!drh.khtml);
if(drh.mozilla){
drh.geckoVersion=dua.substring(_b3+6,_b3+14);
}
drh.ie=(document.all)&&(!drh.opera);
drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0;
drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0;
drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0;
drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0;
var cm=document["compatMode"];
drh.quirks=(cm=="BackCompat")||(cm=="QuirksMode")||drh.ie55||drh.ie50;
dojo.locale=dojo.locale||(drh.ie?navigator.userLanguage:navigator.language).toLowerCase();
dr.vml.capable=drh.ie;
drs.capable=f;
drs.support.plugin=f;
drs.support.builtin=f;
var _b5=window["document"];
var tdi=_b5["implementation"];
if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0"))){
drs.capable=t;
drs.support.builtin=t;
drs.support.plugin=f;
}
if(drh.safari){
var tmp=dua.split("AppleWebKit/")[1];
var ver=parseFloat(tmp.split(" ")[0]);
if(ver>=420){
drs.capable=t;
drs.support.builtin=t;
drs.support.plugin=f;
}
}else{
}
})();
dojo.hostenv.startPackage("dojo.hostenv");
dojo.render.name=dojo.hostenv.name_="browser";
dojo.hostenv.searchIds=[];
dojo.hostenv._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
dojo.hostenv.getXmlhttpObject=function(){
var _b9=null;
var _ba=null;
try{
_b9=new XMLHttpRequest();
}
catch(e){
}
if(!_b9){
for(var i=0;i<3;++i){
var _bc=dojo.hostenv._XMLHTTP_PROGIDS[i];
try{
_b9=new ActiveXObject(_bc);
}
catch(e){
_ba=e;
}
if(_b9){
dojo.hostenv._XMLHTTP_PROGIDS=[_bc];
break;
}
}
}
if(!_b9){
return dojo.raise("XMLHTTP not available",_ba);
}
return _b9;
};
dojo.hostenv._blockAsync=false;
dojo.hostenv.getText=function(uri,_be,_bf){
if(!_be){
this._blockAsync=true;
}
var _c0=this.getXmlhttpObject();
function isDocumentOk(_c1){
var _c2=_c1["status"];
return Boolean((!_c2)||((200<=_c2)&&(300>_c2))||(_c2==304));
}
if(_be){
var _c3=this,_c4=null,gbl=dojo.global();
var xhr=dojo.evalObjPath("dojo.io.XMLHTTPTransport");
_c0.onreadystatechange=function(){
if(_c4){
gbl.clearTimeout(_c4);
_c4=null;
}
if(_c3._blockAsync||(xhr&&xhr._blockAsync)){
_c4=gbl.setTimeout(function(){
_c0.onreadystatechange.apply(this);
},10);
}else{
if(4==_c0.readyState){
if(isDocumentOk(_c0)){
_be(_c0.responseText);
}
}
}
};
}
_c0.open("GET",uri,_be?true:false);
try{
_c0.send(null);
if(_be){
return null;
}
if(!isDocumentOk(_c0)){
var err=Error("Unable to load "+uri+" status:"+_c0.status);
err.status=_c0.status;
err.responseText=_c0.responseText;
throw err;
}
}
catch(e){
this._blockAsync=false;
if((_bf)&&(!_be)){
return null;
}else{
throw e;
}
}
this._blockAsync=false;
return _c0.responseText;
};
dojo.hostenv.defaultDebugContainerId="dojoDebug";
dojo.hostenv._println_buffer=[];
dojo.hostenv._println_safe=false;
dojo.hostenv.println=function(_c8){
if(!dojo.hostenv._println_safe){
dojo.hostenv._println_buffer.push(_c8);
}else{
try{
var _c9=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId);
if(!_c9){
_c9=dojo.body();
}
var div=document.createElement("div");
div.appendChild(document.createTextNode(_c8));
_c9.appendChild(div);
}
catch(e){
try{
document.write("<div>"+_c8+"</div>");
}
catch(e2){
window.status=_c8;
}
}
}
};
dojo.addOnLoad(function(){
dojo.hostenv._println_safe=true;
while(dojo.hostenv._println_buffer.length>0){
dojo.hostenv.println(dojo.hostenv._println_buffer.shift());
}
});
function dj_addNodeEvtHdlr(_cb,_cc,fp){
var _ce=_cb["on"+_cc]||function(){
};
_cb["on"+_cc]=function(){
fp.apply(_cb,arguments);
_ce.apply(_cb,arguments);
};
return true;
}
function dj_load_init(e){
var _d0=(e&&e.type)?e.type.toLowerCase():"load";
if(arguments.callee.initialized||(_d0!="domcontentloaded"&&_d0!="load")){
return;
}
arguments.callee.initialized=true;
if(typeof (_timer)!="undefined"){
clearInterval(_timer);
delete _timer;
}
var _d1=function(){
if(dojo.render.html.ie){
dojo.hostenv.makeWidgets();
}
};
if(dojo.hostenv.inFlightCount==0){
_d1();
dojo.hostenv.modulesLoaded();
}else{
dojo.hostenv.modulesLoadedListeners.unshift(_d1);
}
}
if(document.addEventListener){
if(dojo.render.html.opera||(dojo.render.html.moz&&(djConfig["enableMozDomContentLoaded"]===true))){
document.addEventListener("DOMContentLoaded",dj_load_init,null);
}
window.addEventListener("load",dj_load_init,null);
}
if(dojo.render.html.ie&&dojo.render.os.win){
document.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;
};
}
dojo.requireIf((djConfig["isDebug"]||djConfig["debugAtAllCosts"]),"dojo.debug");
dojo.requireIf(djConfig["debugAtAllCosts"]&&!window.widget&&!djConfig["useXDomain"],"dojo.browser_debug");
dojo.requireIf(djConfig["debugAtAllCosts"]&&!window.widget&&djConfig["useXDomain"],"dojo.browser_debug_xd");
dojo.provide("dojo.lang.common");
dojo.lang.inherits=function(_ee,_ef){
if(!dojo.lang.isFunction(_ef)){
dojo.raise("dojo.inherits: superclass argument ["+_ef+"] must be a function (subclass: ["+_ee+"']");
}
_ee.prototype=new _ef();
_ee.prototype.constructor=_ee;
_ee.superclass=_ef.prototype;
_ee["super"]=_ef.prototype;
};
dojo.lang._mixin=function(obj,_f1){
var _f2={};
for(var x in _f1){
if((typeof _f2[x]=="undefined")||(_f2[x]!=_f1[x])){
obj[x]=_f1[x];
}
}
if(dojo.render.html.ie&&(typeof (_f1["toString"])=="function")&&(_f1["toString"]!=obj["toString"])&&(_f1["toString"]!=_f2["toString"])){
obj.toString=_f1.toString;
}
return obj;
};
dojo.lang.mixin=function(obj,_f5){
for(var i=1,l=arguments.length;i<l;i++){
dojo.lang._mixin(obj,arguments[i]);
}
return obj;
};
dojo.lang.extend=function(_f8,_f9){
for(var i=1,l=arguments.length;i<l;i++){
dojo.lang._mixin(_f8.prototype,arguments[i]);
}
return _f8;
};
dojo.inherits=dojo.lang.inherits;
dojo.mixin=dojo.lang.mixin;
dojo.extend=dojo.lang.extend;
dojo.lang.find=function(_fc,_fd,_fe,_ff){
if(!dojo.lang.isArrayLike(_fc)&&dojo.lang.isArrayLike(_fd)){
dojo.deprecated("dojo.lang.find(value, array)","use dojo.lang.find(array, value) instead","0.5");
var temp=_fc;
_fc=_fd;
_fd=temp;
}
var _101=dojo.lang.isString(_fc);
if(_101){
_fc=_fc.split("");
}
if(_ff){
var step=-1;
var i=_fc.length-1;
var end=-1;
}else{
var step=1;
var i=0;
var end=_fc.length;
}
if(_fe){
while(i!=end){
if(_fc[i]===_fd){
return i;
}
i+=step;
}
}else{
while(i!=end){
if(_fc[i]==_fd){
return i;
}
i+=step;
}
}
return -1;
};
dojo.lang.indexOf=dojo.lang.find;
dojo.lang.findLast=function(_105,_106,_107){
return dojo.lang.find(_105,_106,_107,true);
};
dojo.lang.lastIndexOf=dojo.lang.findLast;
dojo.lang.inArray=function(_108,_109){
return dojo.lang.find(_108,_109)>-1;
};
dojo.lang.isObject=function(it){
if(typeof it=="undefined"){
return false;
}
return (typeof it=="object"||it===null||dojo.lang.isArray(it)||dojo.lang.isFunction(it));
};
dojo.lang.isArray=function(it){
return (it&&it instanceof Array||typeof it=="array");
};
dojo.lang.isArrayLike=function(it){
if((!it)||(dojo.lang.isUndefined(it))){
return false;
}
if(dojo.lang.isString(it)){
return false;
}
if(dojo.lang.isFunction(it)){
return false;
}
if(dojo.lang.isArray(it)){
return true;
}
if((it.tagName)&&(it.tagName.toLowerCase()=="form")){
return false;
}
if(dojo.lang.isNumber(it.length)&&isFinite(it.length)){
return true;
}
return false;
};
dojo.lang.isFunction=function(it){
return (it instanceof Function||typeof it=="function");
};
(function(){
if((dojo.render.html.capable)&&(dojo.render.html["safari"])){
dojo.lang.isFunction=function(it){
if((typeof (it)=="function")&&(it=="[object NodeList]")){
return false;
}
return (it instanceof Function||typeof it=="function");
};
}
})();
dojo.lang.isString=function(it){
return (typeof it=="string"||it instanceof String);
};
dojo.lang.isAlien=function(it){
if(!it){
return false;
}
return !dojo.lang.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));
};
dojo.lang.isBoolean=function(it){
return (it instanceof Boolean||typeof it=="boolean");
};
dojo.lang.isNumber=function(it){
return (it instanceof Number||typeof it=="number");
};
dojo.lang.isUndefined=function(it){
return ((typeof (it)=="undefined")&&(it==undefined));
};
dojo.provide("dojo.dom");
dojo.dom.ELEMENT_NODE=1;
dojo.dom.ATTRIBUTE_NODE=2;
dojo.dom.TEXT_NODE=3;
dojo.dom.CDATA_SECTION_NODE=4;
dojo.dom.ENTITY_REFERENCE_NODE=5;
dojo.dom.ENTITY_NODE=6;
dojo.dom.PROCESSING_INSTRUCTION_NODE=7;
dojo.dom.COMMENT_NODE=8;
dojo.dom.DOCUMENT_NODE=9;
dojo.dom.DOCUMENT_TYPE_NODE=10;
dojo.dom.DOCUMENT_FRAGMENT_NODE=11;
dojo.dom.NOTATION_NODE=12;
dojo.dom.dojoml="http://www.dojotoolkit.org/2004/dojoml";
dojo.dom.xmlns={svg:"http://www.w3.org/2000/svg",smil:"http://www.w3.org/2001/SMIL20/",mml:"http://www.w3.org/1998/Math/MathML",cml:"http://www.xml-cml.org",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml",xul:"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",xbl:"http://www.mozilla.org/xbl",fo:"http://www.w3.org/1999/XSL/Format",xsl:"http://www.w3.org/1999/XSL/Transform",xslt:"http://www.w3.org/1999/XSL/Transform",xi:"http://www.w3.org/2001/XInclude",xforms:"http://www.w3.org/2002/01/xforms",saxon:"http://icl.com/saxon",xalan:"http://xml.apache.org/xslt",xsd:"http://www.w3.org/2001/XMLSchema",dt:"http://www.w3.org/2001/XMLSchema-datatypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",dc:"http://purl.org/dc/elements/1.1/",dcq:"http://purl.org/dc/qualifiers/1.0","soap-env":"http://schemas.xmlsoap.org/soap/envelope/",wsdl:"http://schemas.xmlsoap.org/wsdl/",AdobeExtensions:"http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"};
dojo.dom.isNode=function(wh){
if(typeof Element=="function"){
try{
return wh instanceof Element;
}
catch(e){
}
}else{
return wh&&!isNaN(wh.nodeType);
}
};
dojo.dom.getUniqueId=function(){
var _115=dojo.doc();
do{
var id="dj_unique_"+(++arguments.callee._idIncrement);
}while(_115.getElementById(id));
return id;
};
dojo.dom.getUniqueId._idIncrement=0;
dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(_117,_118){
var node=_117.firstChild;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.nextSibling;
}
if(_118&&node&&node.tagName&&node.tagName.toLowerCase()!=_118.toLowerCase()){
node=dojo.dom.nextElement(node,_118);
}
return node;
};
dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_11a,_11b){
var node=_11a.lastChild;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.previousSibling;
}
if(_11b&&node&&node.tagName&&node.tagName.toLowerCase()!=_11b.toLowerCase()){
node=dojo.dom.prevElement(node,_11b);
}
return node;
};
dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(node,_11e){
if(!node){
return null;
}
do{
node=node.nextSibling;
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
if(node&&_11e&&_11e.toLowerCase()!=node.tagName.toLowerCase()){
return dojo.dom.nextElement(node,_11e);
}
return node;
};
dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(node,_120){
if(!node){
return null;
}
if(_120){
_120=_120.toLowerCase();
}
do{
node=node.previousSibling;
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
if(node&&_120&&_120.toLowerCase()!=node.tagName.toLowerCase()){
return dojo.dom.prevElement(node,_120);
}
return node;
};
dojo.dom.moveChildren=function(_121,_122,trim){
var _124=0;
if(trim){
while(_121.hasChildNodes()&&_121.firstChild.nodeType==dojo.dom.TEXT_NODE){
_121.removeChild(_121.firstChild);
}
while(_121.hasChildNodes()&&_121.lastChild.nodeType==dojo.dom.TEXT_NODE){
_121.removeChild(_121.lastChild);
}
}
while(_121.hasChildNodes()){
_122.appendChild(_121.firstChild);
_124++;
}
return _124;
};
dojo.dom.copyChildren=function(_125,_126,trim){
var _128=_125.cloneNode(true);
return this.moveChildren(_128,_126,trim);
};
dojo.dom.replaceChildren=function(node,_12a){
var _12b=[];
if(dojo.render.html.ie){
for(var i=0;i<node.childNodes.length;i++){
_12b.push(node.childNodes[i]);
}
}
dojo.dom.removeChildren(node);
node.appendChild(_12a);
for(var i=0;i<_12b.length;i++){
dojo.dom.destroyNode(_12b[i]);
}
};
dojo.dom.removeChildren=function(node){
var _12e=node.childNodes.length;
while(node.hasChildNodes()){
dojo.dom.removeNode(node.firstChild);
}
return _12e;
};
dojo.dom.replaceNode=function(node,_130){
return node.parentNode.replaceChild(_130,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,_134,_135){
var _136=[];
var _137=(_134&&(_134 instanceof Function||typeof _134=="function"));
while(node){
if(!_137||_134(node)){
_136.push(node);
}
if(_135&&_136.length>0){
return _136[0];
}
node=node.parentNode;
}
if(_135){
return null;
}
return _136;
};
dojo.dom.getAncestorsByTag=function(node,tag,_13a){
tag=tag.toLowerCase();
return dojo.dom.getAncestors(node,function(el){
return ((el.tagName)&&(el.tagName.toLowerCase()==tag));
},_13a);
};
dojo.dom.getFirstAncestorByTag=function(node,tag){
return dojo.dom.getAncestorsByTag(node,tag,true);
};
dojo.dom.isDescendantOf=function(node,_13f,_140){
if(_140&&node){
node=node.parentNode;
}
while(node){
if(node==_13f){
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 _143=dojo.doc();
if(!dj_undef("ActiveXObject")){
var _144=["MSXML2","Microsoft","MSXML","MSXML3"];
for(var i=0;i<_144.length;i++){
try{
doc=new ActiveXObject(_144[i]+".XMLDOM");
}
catch(e){
}
if(doc){
break;
}
}
}else{
if((_143.implementation)&&(_143.implementation.createDocument)){
doc=_143.implementation.createDocument("","",null);
}
}
return doc;
};
dojo.dom.createDocumentFromText=function(str,_147){
if(!_147){
_147="text/xml";
}
if(!dj_undef("DOMParser")){
var _148=new DOMParser();
return _148.parseFromString(str,_147);
}else{
if(!dj_undef("ActiveXObject")){
var _149=dojo.dom.createDocument();
if(_149){
_149.async=false;
_149.loadXML(str);
return _149;
}else{
dojo.debug("toXml didn't work?");
}
}else{
var _14a=dojo.doc();
if(_14a.createElement){
var tmp=_14a.createElement("xml");
tmp.innerHTML=str;
if(_14a.implementation&&_14a.implementation.createDocument){
var _14c=_14a.implementation.createDocument("foo","",null);
for(var i=0;i<tmp.childNodes.length;i++){
_14c.importNode(tmp.childNodes.item(i),true);
}
return _14c;
}
return ((tmp.document)&&(tmp.document.firstChild?tmp.document.firstChild:tmp));
}
}
}
return null;
};
dojo.dom.prependChild=function(node,_14f){
if(_14f.firstChild){
_14f.insertBefore(node,_14f.firstChild);
}else{
_14f.appendChild(node);
}
return true;
};
dojo.dom.insertBefore=function(node,ref,_152){
if((_152!=true)&&(node===ref||node.nextSibling===ref)){
return false;
}
var _153=ref.parentNode;
_153.insertBefore(node,ref);
return true;
};
dojo.dom.insertAfter=function(node,ref,_156){
var pn=ref.parentNode;
if(ref==pn.lastChild){
if((_156!=true)&&(node===ref)){
return false;
}
pn.appendChild(node);
}else{
return this.insertBefore(node,ref.nextSibling,_156);
}
return true;
};
dojo.dom.insertAtPosition=function(node,ref,_15a){
if((!node)||(!ref)||(!_15a)){
return false;
}
switch(_15a.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,_15c,_15d){
var _15e=_15c.childNodes;
if(!_15e.length||_15e.length==_15d){
_15c.appendChild(node);
return true;
}
if(_15d==0){
return dojo.dom.prependChild(node,_15c);
}
return dojo.dom.insertAfter(node,_15e[_15d-1]);
};
dojo.dom.textContent=function(node,text){
if(arguments.length>1){
var _161=dojo.doc();
dojo.dom.replaceChildren(node,_161.createTextNode(text));
return text;
}else{
if(node.textContent!=undefined){
return node.textContent;
}
var _162="";
if(node==null){
return _162;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
_162+=dojo.dom.textContent(node.childNodes[i]);
break;
case 3:
case 2:
case 4:
_162+=node.childNodes[i].nodeValue;
break;
default:
break;
}
}
return _162;
}
};
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,_168,_169,_16a){
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(_168,_169,_16a);
}else{
var _16b=elem.ownerDocument;
var _16c=_16b.createNode(2,_169,_168);
_16c.nodeValue=_16a;
elem.setAttributeNode(_16c);
}
};
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 _16f=dojo.global();
var _170=dojo.doc();
var w=0;
var h=0;
if(dojo.render.html.mozilla){
w=_170.documentElement.clientWidth;
h=_16f.innerHeight;
}else{
if(!dojo.render.html.opera&&_16f.innerWidth){
w=_16f.innerWidth;
h=_16f.innerHeight;
}else{
if(!dojo.render.html.opera&&dojo.exists(_170,"documentElement.clientWidth")){
var w2=_170.documentElement.clientWidth;
if(!w||w2&&w2<w){
w=w2;
}
h=_170.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 _174=dojo.global();
var _175=dojo.doc();
var top=_174.pageYOffset||_175.documentElement.scrollTop||dojo.body().scrollTop||0;
var left=_174.pageXOffset||_175.documentElement.scrollLeft||dojo.body().scrollLeft||0;
return {top:top,left:left,offset:{x:left,y:top}};
};
dojo.html.getParentByType=function(node,type){
var _17a=dojo.doc();
var _17b=dojo.byId(node);
type=type.toLowerCase();
while((_17b)&&(_17b.nodeName.toLowerCase()!=type)){
if(_17b==(_17a["body"]||_17a["documentElement"])){
return null;
}
_17b=_17b.parentNode;
}
return _17b;
};
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 _183={x:0,y:0};
if(e.pageX||e.pageY){
_183.x=e.pageX;
_183.y=e.pageY;
}else{
var de=dojo.doc().documentElement;
var db=dojo.body();
_183.x=e.clientX+((de||db)["scrollLeft"])-((de||db)["clientLeft"]);
_183.y=e.clientY+((de||db)["scrollTop"])-((de||db)["clientTop"]);
}
return _183;
};
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 _188=dojo.doc().createElement("script");
_188.src="javascript:'dojo.html.createExternalElement=function(doc, tag){ return doc.createElement(tag); }'";
dojo.doc().getElementsByTagName("head")[0].appendChild(_188);
})();
}
}else{
dojo.html.createExternalElement=function(doc,tag){
return doc.createElement(tag);
};
}
dojo.html._callDeprecated=function(_18b,_18c,args,_18e,_18f){
dojo.deprecated("dojo.html."+_18b,"replaced by dojo.html."+_18c+"("+(_18e?"node, {"+_18e+": "+_18e+"}":"")+")"+(_18f?"."+_18f:""),"0.5");
var _190=[];
if(_18e){
var _191={};
_191[_18e]=args[1];
_190.push(args[0]);
_190.push(_191);
}else{
_190=args;
}
var ret=dojo.html[_18c].apply(dojo.html,args);
if(_18f){
return ret[_18f];
}else{
return ret;
}
};
dojo.html.getViewportWidth=function(){
return dojo.html._callDeprecated("getViewportWidth","getViewport",arguments,null,"width");
};
dojo.html.getViewportHeight=function(){
return dojo.html._callDeprecated("getViewportHeight","getViewport",arguments,null,"height");
};
dojo.html.getViewportSize=function(){
return dojo.html._callDeprecated("getViewportSize","getViewport",arguments);
};
dojo.html.getScrollTop=function(){
return dojo.html._callDeprecated("getScrollTop","getScroll",arguments,null,"top");
};
dojo.html.getScrollLeft=function(){
return dojo.html._callDeprecated("getScrollLeft","getScroll",arguments,null,"left");
};
dojo.html.getScrollOffset=function(){
return dojo.html._callDeprecated("getScrollOffset","getScroll",arguments,null,"offset");
};
dojo.provide("dojo.uri.Uri");
dojo.uri=new function(){
this.dojoUri=function(uri){
return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(),uri);
};
this.moduleUri=function(_194,uri){
var loc=dojo.hostenv.getModuleSymbols(_194).join("/");
if(!loc){
return null;
}
if(loc.lastIndexOf("/")!=loc.length-1){
loc+="/";
}
var _197=loc.indexOf(":");
var _198=loc.indexOf("/");
if(loc.charAt(0)!="/"&&(_197==-1||_197>_198)){
loc=dojo.hostenv.getBaseScriptUri()+loc;
}
return new dojo.uri.Uri(loc,uri);
};
this.Uri=function(){
var uri=arguments[0];
for(var i=1;i<arguments.length;i++){
if(!arguments[i]){
continue;
}
var _19b=new dojo.uri.Uri(arguments[i].toString());
var _19c=new dojo.uri.Uri(uri.toString());
if((_19b.path=="")&&(_19b.scheme==null)&&(_19b.authority==null)&&(_19b.query==null)){
if(_19b.fragment!=null){
_19c.fragment=_19b.fragment;
}
_19b=_19c;
}else{
if(_19b.scheme==null){
_19b.scheme=_19c.scheme;
if(_19b.authority==null){
_19b.authority=_19c.authority;
if(_19b.path.charAt(0)!="/"){
var path=_19c.path.substring(0,_19c.path.lastIndexOf("/")+1)+_19b.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;
}
}
}
}
_19b.path=segs.join("/");
}
}
}
}
uri="";
if(_19b.scheme!=null){
uri+=_19b.scheme+":";
}
if(_19b.authority!=null){
uri+="//"+_19b.authority;
}
uri+=_19b.path;
if(_19b.query!=null){
uri+="?"+_19b.query;
}
if(_19b.fragment!=null){
uri+="#"+_19b.fragment;
}
}
this.uri=uri.toString();
var _1a0="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";
var r=this.uri.match(new RegExp(_1a0));
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){
_1a0="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$";
r=this.authority.match(new RegExp(_1a0));
this.user=r[3]||null;
this.password=r[4]||null;
this.host=r[5];
this.port=r[7]||null;
}
this.toString=function(){
return this.uri;
};
};
};
dojo.provide("dojo.html.style");
dojo.html.getClass=function(node){
node=dojo.byId(node);
if(!node){
return "";
}
var cs="";
if(node.className){
cs=node.className;
}else{
if(dojo.html.hasAttribute(node,"class")){
cs=dojo.html.getAttribute(node,"class");
}
}
return cs.replace(/^\s+|\s+$/g,"");
};
dojo.html.getClasses=function(node){
var c=dojo.html.getClass(node);
return (c=="")?[]:c.split(/\s+/g);
};
dojo.html.hasClass=function(node,_1a7){
return (new RegExp("(^|\\s+)"+_1a7+"(\\s+|$)")).test(dojo.html.getClass(node));
};
dojo.html.prependClass=function(node,_1a9){
_1a9+=" "+dojo.html.getClass(node);
return dojo.html.setClass(node,_1a9);
};
dojo.html.addClass=function(node,_1ab){
if(dojo.html.hasClass(node,_1ab)){
return false;
}
_1ab=(dojo.html.getClass(node)+" "+_1ab).replace(/^\s+|\s+$/g,"");
return dojo.html.setClass(node,_1ab);
};
dojo.html.setClass=function(node,_1ad){
node=dojo.byId(node);
var cs=new String(_1ad);
try{
if(typeof node.className=="string"){
node.className=cs;
}else{
if(node.setAttribute){
node.setAttribute("class",_1ad);
node.className=cs;
}else{
return false;
}
}
}
catch(e){
dojo.debug("dojo.html.setClass() failed",e);
}
return true;
};
dojo.html.removeClass=function(node,_1b0,_1b1){
try{
if(!_1b1){
var _1b2=dojo.html.getClass(node).replace(new RegExp("(^|\\s+)"+_1b0+"(\\s+|$)"),"$1$2");
}else{
var _1b2=dojo.html.getClass(node).replace(_1b0,"");
}
dojo.html.setClass(node,_1b2);
}
catch(e){
dojo.debug("dojo.html.removeClass() failed",e);
}
return true;
};
dojo.html.replaceClass=function(node,_1b4,_1b5){
dojo.html.removeClass(node,_1b5);
dojo.html.addClass(node,_1b4);
};
dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2};
dojo.html.getElementsByClass=function(_1b6,_1b7,_1b8,_1b9,_1ba){
_1ba=false;
var _1bb=dojo.doc();
_1b7=dojo.byId(_1b7)||_1bb;
var _1bc=_1b6.split(/\s+/g);
var _1bd=[];
if(_1b9!=1&&_1b9!=2){
_1b9=0;
}
var _1be=new RegExp("(\\s|^)(("+_1bc.join(")|(")+"))(\\s|$)");
var _1bf=_1bc.join(" ").length;
var _1c0=[];
if(!_1ba&&_1bb.evaluate){
var _1c1=".//"+(_1b8||"*")+"[contains(";
if(_1b9!=dojo.html.classMatchType.ContainsAny){
_1c1+="concat(' ',@class,' '), ' "+_1bc.join(" ') and contains(concat(' ',@class,' '), ' ")+" ')";
if(_1b9==2){
_1c1+=" and string-length(@class)="+_1bf+"]";
}else{
_1c1+="]";
}
}else{
_1c1+="concat(' ',@class,' '), ' "+_1bc.join(" ') or contains(concat(' ',@class,' '), ' ")+" ')]";
}
var _1c2=_1bb.evaluate(_1c1,_1b7,null,XPathResult.ANY_TYPE,null);
var _1c3=_1c2.iterateNext();
while(_1c3){
try{
_1c0.push(_1c3);
_1c3=_1c2.iterateNext();
}
catch(e){
break;
}
}
return _1c0;
}else{
if(!_1b8){
_1b8="*";
}
_1c0=_1b7.getElementsByTagName(_1b8);
var node,i=0;
outer:
while(node=_1c0[i++]){
var _1c6=dojo.html.getClasses(node);
if(_1c6.length==0){
continue outer;
}
var _1c7=0;
for(var j=0;j<_1c6.length;j++){
if(_1be.test(_1c6[j])){
if(_1b9==dojo.html.classMatchType.ContainsAny){
_1bd.push(node);
continue outer;
}else{
_1c7++;
}
}else{
if(_1b9==dojo.html.classMatchType.IsOnly){
continue outer;
}
}
}
if(_1c7==_1bc.length){
if((_1b9==dojo.html.classMatchType.IsOnly)&&(_1c7==_1c6.length)){
_1bd.push(node);
}else{
if(_1b9==dojo.html.classMatchType.ContainsAll){
_1bd.push(node);
}
}
}
}
return _1bd;
}
};
dojo.html.getElementsByClassName=dojo.html.getElementsByClass;
dojo.html.toCamelCase=function(_1c9){
var arr=_1c9.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(_1cd){
return _1cd.replace(/([A-Z])/g,"-$1").toLowerCase();
};
if(dojo.render.html.ie){
dojo.html.getComputedStyle=function(node,_1cf,_1d0){
node=dojo.byId(node);
if(!node||!node.style){
return _1d0;
}
return node.currentStyle[dojo.html.toCamelCase(_1cf)];
};
dojo.html.getComputedStyles=function(node){
return node.currentStyle;
};
}else{
dojo.html.getComputedStyle=function(node,_1d3,_1d4){
node=dojo.byId(node);
if(!node||!node.style){
return _1d4;
}
var s=document.defaultView.getComputedStyle(node,null);
return (s&&s[dojo.html.toCamelCase(_1d3)])||"";
};
dojo.html.getComputedStyles=function(node){
return document.defaultView.getComputedStyle(node,null);
};
}
dojo.html.getStyleProperty=function(node,_1d8){
node=dojo.byId(node);
return (node&&node.style?node.style[dojo.html.toCamelCase(_1d8)]:undefined);
};
dojo.html.getStyle=function(node,_1da){
var _1db=dojo.html.getStyleProperty(node,_1da);
return (_1db?_1db:dojo.html.getComputedStyle(node,_1da));
};
dojo.html.setStyle=function(node,_1dd,_1de){
node=dojo.byId(node);
if(node&&node.style){
var _1df=dojo.html.toCamelCase(_1dd);
node.style[_1df]=_1de;
}
};
dojo.html.setStyleText=function(_1e0,text){
try{
_1e0.style.cssText=text;
}
catch(e){
_1e0.setAttribute("style",text);
}
};
dojo.html.copyStyle=function(_1e2,_1e3){
if(!_1e3.style.cssText){
_1e2.setAttribute("style",_1e3.getAttribute("style"));
}else{
_1e2.style.cssText=_1e3.style.cssText;
}
dojo.html.addClass(_1e2,dojo.html.getClass(_1e3));
};
dojo.html.getUnitValue=function(node,_1e5,_1e6){
var s=dojo.html.getComputedStyle(node,_1e5);
if((!s)||((s=="auto")&&(_1e6))){
return {value:0,units:"px"};
}
var _1e8=s.match(/(\-?[\d.]+)([a-z%]*)/i);
if(!_1e8){
return dojo.html.getUnitValue.bad;
}
return {value:Number(_1e8[1]),units:_1e8[2].toLowerCase()};
};
dojo.html.getUnitValue.bad={value:NaN,units:""};
if(dojo.render.html.ie){
dojo.html.toPixelValue=function(_1e9,_1ea){
if(!_1ea){
return 0;
}
if(_1ea.slice(-2)=="px"){
return parseFloat(_1ea);
}
var _1eb=0;
with(_1e9){
var _1ec=style.left;
var _1ed=runtimeStyle.left;
runtimeStyle.left=currentStyle.left;
try{
style.left=_1ea||0;
_1eb=style.pixelLeft;
style.left=_1ec;
runtimeStyle.left=_1ed;
}
catch(e){
}
}
return _1eb;
};
}else{
dojo.html.toPixelValue=function(_1ee,_1ef){
return (_1ef&&(_1ef.slice(-2)=="px")?parseFloat(_1ef):0);
};
}
dojo.html.getPixelValue=function(node,_1f1,_1f2){
return dojo.html.toPixelValue(node,dojo.html.getComputedStyle(node,_1f1));
};
dojo.html.setPositivePixelValue=function(node,_1f4,_1f5){
if(isNaN(_1f5)){
return false;
}
node.style[_1f4]=Math.max(0,_1f5)+"px";
return true;
};
dojo.html.styleSheet=null;
dojo.html.insertCssRule=function(_1f6,_1f7,_1f8){
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){
_1f8=dojo.html.styleSheet.cssRules.length;
}else{
if(dojo.html.styleSheet.rules){
_1f8=dojo.html.styleSheet.rules.length;
}else{
return null;
}
}
}
if(dojo.html.styleSheet.insertRule){
var rule=_1f6+" { "+_1f7+" }";
return dojo.html.styleSheet.insertRule(rule,_1f8);
}else{
if(dojo.html.styleSheet.addRule){
return dojo.html.styleSheet.addRule(_1f6,_1f7,_1f8);
}else{
return null;
}
}
};
dojo.html.removeCssRule=function(_1fa){
if(!dojo.html.styleSheet){
dojo.debug("no stylesheet defined for removing rules");
return false;
}
if(dojo.render.html.ie){
if(!_1fa){
_1fa=dojo.html.styleSheet.rules.length;
dojo.html.styleSheet.removeRule(_1fa);
}
}else{
if(document.styleSheets[0]){
if(!_1fa){
_1fa=dojo.html.styleSheet.cssRules.length;
}
dojo.html.styleSheet.deleteRule(_1fa);
}
}
return true;
};
dojo.html._insertedCssFiles=[];
dojo.html.insertCssFile=function(URI,doc,_1fd,_1fe){
if(!URI){
return;
}
if(!doc){
doc=document;
}
var _1ff=dojo.hostenv.getText(URI,false,_1fe);
if(_1ff===null){
return;
}
_1ff=dojo.html.fixPathsInCssText(_1ff,URI);
if(_1fd){
var idx=-1,node,ent=dojo.html._insertedCssFiles;
for(var i=0;i<ent.length;i++){
if((ent[i].doc==doc)&&(ent[i].cssText==_1ff)){
idx=i;
node=ent[i].nodeRef;
break;
}
}
if(node){
var _204=doc.getElementsByTagName("style");
for(var i=0;i<_204.length;i++){
if(_204[i]==node){
return;
}
}
dojo.html._insertedCssFiles.shift(idx,1);
}
}
var _205=dojo.html.insertCssText(_1ff,doc);
dojo.html._insertedCssFiles.push({"doc":doc,"cssText":_1ff,"nodeRef":_205});
if(_205&&djConfig.isDebug){
_205.setAttribute("dbgHref",URI);
}
return _205;
};
dojo.html.insertCssText=function(_206,doc,URI){
if(!_206){
return;
}
if(!doc){
doc=document;
}
if(URI){
_206=dojo.html.fixPathsInCssText(_206,URI);
}
var _209=doc.createElement("style");
_209.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(_209);
}
if(_209.styleSheet){
var _20b=function(){
try{
_209.styleSheet.cssText=_206;
}
catch(e){
dojo.debug(e);
}
};
if(_209.styleSheet.disabled){
setTimeout(_20b,10);
}else{
_20b();
}
}else{
var _20c=doc.createTextNode(_206);
_209.appendChild(_20c);
}
return _209;
};
dojo.html.fixPathsInCssText=function(_20d,URI){
if(!_20d||!URI){
return;
}
var _20f,str="",url="",_212="[\\t\\s\\w\\(\\)\\/\\.\\\\'\"-:#=&?~]+";
var _213=new RegExp("url\\(\\s*("+_212+")\\s*\\)");
var _214=/(file|https?|ftps?):\/\//;
regexTrim=new RegExp("^[\\s]*(['\"]?)("+_212+")\\1[\\s]*?$");
if(dojo.render.html.ie55||dojo.render.html.ie60){
var _215=new RegExp("AlphaImageLoader\\((.*)src=['\"]("+_212+")['\"]");
while(_20f=_215.exec(_20d)){
url=_20f[2].replace(regexTrim,"$2");
if(!_214.exec(url)){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=_20d.substring(0,_20f.index)+"AlphaImageLoader("+_20f[1]+"src='"+url+"'";
_20d=_20d.substr(_20f.index+_20f[0].length);
}
_20d=str+_20d;
str="";
}
while(_20f=_213.exec(_20d)){
url=_20f[1].replace(regexTrim,"$2");
if(!_214.exec(url)){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=_20d.substring(0,_20f.index)+"url("+url+")";
_20d=_20d.substr(_20f.index+_20f[0].length);
}
return str+_20d;
};
dojo.html.setActiveStyleSheet=function(_216){
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")==_216){
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 _222={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 _222){
if(_222[p]){
dojo.html.addClass(node,p);
}
}
};
dojo.provide("dojo.lang.array");
dojo.lang.mixin(dojo.lang,{has:function(obj,name){
try{
return typeof obj[name]!="undefined";
}
catch(e){
return false;
}
},isEmpty:function(obj){
if(dojo.lang.isObject(obj)){
var tmp={};
var _228=0;
for(var x in obj){
if(obj[x]&&(!tmp[x])){
_228++;
break;
}
}
return _228==0;
}else{
if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){
return obj.length==0;
}
}
},map:function(arr,obj,_22c){
var _22d=dojo.lang.isString(arr);
if(_22d){
arr=arr.split("");
}
if(dojo.lang.isFunction(obj)&&(!_22c)){
_22c=obj;
obj=dj_global;
}else{
if(dojo.lang.isFunction(obj)&&_22c){
var _22e=obj;
obj=_22c;
_22c=_22e;
}
}
if(Array.map){
var _22f=Array.map(arr,_22c,obj);
}else{
var _22f=[];
for(var i=0;i<arr.length;++i){
_22f.push(_22c.call(obj,arr[i]));
}
}
if(_22d){
return _22f.join("");
}else{
return _22f;
}
},reduce:function(arr,_232,obj,_234){
var _235=_232;
if(arguments.length==2){
_234=_232;
_235=arr[0];
arr=arr.slice(1);
}else{
if(arguments.length==3){
if(dojo.lang.isFunction(obj)){
_234=obj;
obj=null;
}
}else{
if(dojo.lang.isFunction(obj)){
var tmp=_234;
_234=obj;
obj=tmp;
}
}
}
var ob=obj||dj_global;
dojo.lang.map(arr,function(val){
_235=_234.call(ob,_235,val);
});
return _235;
},forEach:function(_239,_23a,_23b){
if(dojo.lang.isString(_239)){
_239=_239.split("");
}
if(Array.forEach){
Array.forEach(_239,_23a,_23b);
}else{
if(!_23b){
_23b=dj_global;
}
for(var i=0,l=_239.length;i<l;i++){
_23a.call(_23b,_239[i],i,_239);
}
}
},_everyOrSome:function(_23e,arr,_240,_241){
if(dojo.lang.isString(arr)){
arr=arr.split("");
}
if(Array.every){
return Array[_23e?"every":"some"](arr,_240,_241);
}else{
if(!_241){
_241=dj_global;
}
for(var i=0,l=arr.length;i<l;i++){
var _244=_240.call(_241,arr[i],i,arr);
if(_23e&&!_244){
return false;
}else{
if((!_23e)&&(_244)){
return true;
}
}
}
return Boolean(_23e);
}
},every:function(arr,_246,_247){
return this._everyOrSome(true,arr,_246,_247);
},some:function(arr,_249,_24a){
return this._everyOrSome(false,arr,_249,_24a);
},filter:function(arr,_24c,_24d){
var _24e=dojo.lang.isString(arr);
if(_24e){
arr=arr.split("");
}
var _24f;
if(Array.filter){
_24f=Array.filter(arr,_24c,_24d);
}else{
if(!_24d){
if(arguments.length>=3){
dojo.raise("thisObject doesn't exist!");
}
_24d=dj_global;
}
_24f=[];
for(var i=0;i<arr.length;i++){
if(_24c.call(_24d,arr[i],i,arr)){
_24f.push(arr[i]);
}
}
}
if(_24e){
return _24f.join("");
}else{
return _24f;
}
},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(_254,_255){
var _256=[];
for(var i=_255||0;i<_254.length;i++){
_256.push(_254[i]);
}
return _256;
}});
dojo.provide("dojo.lang.extras");
dojo.lang.setTimeout=function(func,_259){
var _25a=window,_25b=2;
if(!dojo.lang.isFunction(func)){
_25a=func;
func=_259;
_259=arguments[2];
_25b++;
}
if(dojo.lang.isString(func)){
func=_25a[func];
}
var args=[];
for(var i=_25b;i<arguments.length;i++){
args.push(arguments[i]);
}
return dojo.global().setTimeout(function(){
func.apply(_25a,args);
},_259);
};
dojo.lang.clearTimeout=function(_25e){
dojo.global().clearTimeout(_25e);
};
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(_267,_268,_269){
with(dojo.parseObjPath(_267,_268,_269)){
return dojo.evalProp(prop,obj,_269);
}
};
dojo.lang.setObjPathValue=function(_26a,_26b,_26c,_26d){
dojo.deprecated("dojo.lang.setObjPathValue","use dojo.parseObjPath and the '=' operator","0.6");
if(arguments.length<4){
_26d=true;
}
with(dojo.parseObjPath(_26a,_26c,_26d)){
if(obj&&(_26d||(prop in obj))){
obj[prop]=_26b;
}
}
};
dojo.provide("dojo.lang.func");
dojo.lang.hitch=function(_26e,_26f){
var fcn=(dojo.lang.isString(_26f)?_26e[_26f]:_26f)||function(){
};
return function(){
return fcn.apply(_26e,arguments);
};
};
dojo.lang.anonCtr=0;
dojo.lang.anon={};
dojo.lang.nameAnonFunc=function(_271,_272,_273){
var nso=(_272||dojo.lang.anon);
if((_273)||((dj_global["djConfig"])&&(djConfig["slowAnonFuncLookups"]==true))){
for(var x in nso){
try{
if(nso[x]===_271){
return x;
}
}
catch(e){
}
}
}
var ret="__"+dojo.lang.anonCtr++;
while(typeof nso[ret]!="undefined"){
ret="__"+dojo.lang.anonCtr++;
}
nso[ret]=_271;
return ret;
};
dojo.lang.forward=function(_277){
return function(){
return this[_277].apply(this,arguments);
};
};
dojo.lang.curry=function(_278,func){
var _27a=[];
_278=_278||dj_global;
if(dojo.lang.isString(func)){
func=_278[func];
}
for(var x=2;x<arguments.length;x++){
_27a.push(arguments[x]);
}
var _27c=(func["__preJoinArity"]||func.length)-_27a.length;
function gather(_27d,_27e,_27f){
var _280=_27f;
var _281=_27e.slice(0);
for(var x=0;x<_27d.length;x++){
_281.push(_27d[x]);
}
_27f=_27f-_27d.length;
if(_27f<=0){
var res=func.apply(_278,_281);
_27f=_280;
return res;
}else{
return function(){
return gather(arguments,_281,_27f);
};
}
}
return gather([],_27a,_27c);
};
dojo.lang.curryArguments=function(_284,func,args,_287){
var _288=[];
var x=_287||0;
for(x=_287;x<args.length;x++){
_288.push(args[x]);
}
return dojo.lang.curry.apply(dojo.lang,[_284,func].concat(_288));
};
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,_28e,_28f){
if(!farr.length){
if(typeof _28f=="function"){
_28f();
}
return;
}
if((typeof _28e=="undefined")&&(typeof cb=="number")){
_28e=cb;
cb=function(){
};
}else{
if(!cb){
cb=function(){
};
if(!_28e){
_28e=0;
}
}
}
setTimeout(function(){
(farr.shift())();
cb();
dojo.lang.delayThese(farr,cb,_28e,_28f);
},_28e);
};
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,_291){
var dl=dojo.lang;
var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(args.length>2)?args[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false,maxCalls:-1};
switch(args.length){
case 0:
return;
case 1:
return;
case 2:
ao.srcFunc=args[0];
ao.adviceFunc=args[1];
break;
case 3:
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=args[0];
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
}else{
if((dl.isString(args[1]))&&(dl.isString(args[2]))){
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
}else{
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){
ao.adviceType="after";
ao.srcObj=args[0];
ao.srcFunc=args[1];
var _294=dl.nameAnonFunc(args[2],ao.adviceObj,_291);
ao.adviceFunc=_294;
}else{
if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=dj_global;
var _294=dl.nameAnonFunc(args[0],ao.srcObj,_291);
ao.srcFunc=_294;
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 _294=dl.nameAnonFunc(args[1],dj_global,_291);
ao.srcFunc=_294;
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 _294=dl.nameAnonFunc(args[3],dj_global,_291);
ao.adviceObj=dj_global;
ao.adviceFunc=_294;
}else{
if(dl.isObject(args[1])){
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=dj_global;
ao.adviceFunc=args[3];
}else{
if(dl.isObject(args[2])){
ao.srcObj=dj_global;
ao.srcFunc=args[1];
ao.adviceObj=args[2];
ao.adviceFunc=args[3];
}else{
ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global;
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
ao.aroundFunc=args[3];
}
}
}
}
}
}
break;
case 6:
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=args[3];
ao.adviceFunc=args[4];
ao.aroundFunc=args[5];
ao.aroundObj=dj_global;
break;
default:
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=args[3];
ao.adviceFunc=args[4];
ao.aroundObj=args[5];
ao.aroundFunc=args[6];
ao.once=args[7];
ao.delay=args[8];
ao.rate=args[9];
ao.adviceMsg=args[10];
ao.maxCalls=(!isNaN(parseInt(args[11])))?args[11]:-1;
break;
}
if(dl.isFunction(ao.aroundFunc)){
var _294=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,_291);
ao.aroundFunc=_294;
}
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.isArray(ao.srcObj)&&ao.srcObj!=""){
var _296={};
for(var x in ao){
_296[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);
}
_296.srcObj=src;
mjps.push(dojo.event.connect.call(dojo.event,_296));
});
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 _29e;
if((arguments.length==1)&&(typeof a1=="object")){
_29e=a1;
}else{
_29e={srcObj:a1,srcFunc:a2};
}
_29e.adviceFunc=function(){
var _29f=[];
for(var x=0;x<arguments.length;x++){
_29f.push(arguments[x]);
}
dojo.debug("("+_29e.srcObj+")."+_29e.srcFunc,":",_29f.join(", "));
};
this.kwConnect(_29e);
};
this.connectBefore=function(){
var args=["before"];
for(var i=0;i<arguments.length;i++){
args.push(arguments[i]);
}
return this.connect.apply(this,args);
};
this.connectAround=function(){
var args=["around"];
for(var i=0;i<arguments.length;i++){
args.push(arguments[i]);
}
return this.connect.apply(this,args);
};
this.connectOnce=function(){
var ao=interpolateArgs(arguments,true);
ao.once=true;
return this.connect(ao);
};
this.connectRunOnce=function(){
var ao=interpolateArgs(arguments,true);
ao.maxCalls=1;
return this.connect(ao);
};
this._kwConnectImpl=function(_2a7,_2a8){
var fn=(_2a8)?"disconnect":"connect";
if(typeof _2a7["srcFunc"]=="function"){
_2a7.srcObj=_2a7["srcObj"]||dj_global;
var _2aa=dojo.lang.nameAnonFunc(_2a7.srcFunc,_2a7.srcObj,true);
_2a7.srcFunc=_2aa;
}
if(typeof _2a7["adviceFunc"]=="function"){
_2a7.adviceObj=_2a7["adviceObj"]||dj_global;
var _2aa=dojo.lang.nameAnonFunc(_2a7.adviceFunc,_2a7.adviceObj,true);
_2a7.adviceFunc=_2aa;
}
_2a7.srcObj=_2a7["srcObj"]||dj_global;
_2a7.adviceObj=_2a7["adviceObj"]||_2a7["targetObj"]||dj_global;
_2a7.adviceFunc=_2a7["adviceFunc"]||_2a7["targetFunc"];
return dojo.event[fn](_2a7);
};
this.kwConnect=function(_2ab){
return this._kwConnectImpl(_2ab,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(_2ae){
return this._kwConnectImpl(_2ae,true);
};
};
dojo.event.MethodInvocation=function(_2af,obj,args){
this.jp_=_2af;
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,_2b7){
this.object=obj||dj_global;
this.methodname=_2b7;
this.methodfunc=this.object[_2b7];
this.squelch=false;
};
dojo.event.MethodJoinPoint.getForMethod=function(obj,_2b9){
if(!obj){
obj=dj_global;
}
var ofn=obj[_2b9];
if(!ofn){
ofn=obj[_2b9]=function(){
};
if(!obj[_2b9]){
dojo.raise("Cannot set do-nothing method on that object "+_2b9);
}
}else{
if((typeof ofn!="function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){
return null;
}
}
var _2bb=_2b9+"$joinpoint";
var _2bc=_2b9+"$joinpoint$method";
var _2bd=obj[_2bb];
if(!_2bd){
var _2be=false;
if(dojo.event["browser"]){
if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){
_2be=true;
dojo.event.browser.addClobberNodeAttrs(obj,[_2bb,_2bc,_2b9]);
}
}
var _2bf=ofn.length;
obj[_2bc]=ofn;
_2bd=obj[_2bb]=new dojo.event.MethodJoinPoint(obj,_2bc);
if(!_2be){
obj[_2b9]=function(){
return _2bd.run.apply(_2bd,arguments);
};
}else{
obj[_2b9]=function(){
var args=[];
if(!arguments.length){
var evt=null;
try{
if(obj.ownerDocument){
evt=obj.ownerDocument.parentWindow.event;
}else{
if(obj.documentElement){
evt=obj.documentElement.ownerDocument.parentWindow.event;
}else{
if(obj.event){
evt=obj.event;
}else{
evt=window.event;
}
}
}
}
catch(e){
evt=window.event;
}
if(evt){
args.push(dojo.event.browser.fixEvent(evt,this));
}
}else{
for(var x=0;x<arguments.length;x++){
if((x==0)&&(dojo.event.browser.isEvent(arguments[x]))){
args.push(dojo.event.browser.fixEvent(arguments[x],this));
}else{
args.push(arguments[x]);
}
}
}
return _2bd.run.apply(_2bd,args);
};
}
obj[_2b9].__preJoinArity=_2bf;
}
return _2bd;
};
dojo.lang.extend(dojo.event.MethodJoinPoint,{squelch:false,unintercept:function(){
this.object[this.methodname]=this.methodfunc;
this.before=[];
this.after=[];
this.around=[];
},disconnect:dojo.lang.forward("unintercept"),run:function(){
var obj=this.object||dj_global;
var args=arguments;
var _2c5=[];
for(var x=0;x<args.length;x++){
_2c5[x]=args[x];
}
var _2c7=function(marr){
if(!marr){
dojo.debug("Null argument to unrollAdvice()");
return;
}
var _2c9=marr[0]||dj_global;
var _2ca=marr[1];
if(!_2c9[_2ca]){
dojo.raise("function \""+_2ca+"\" does not exist on \""+_2c9+"\"");
}
var _2cb=marr[2]||dj_global;
var _2cc=marr[3];
var msg=marr[6];
var _2ce=marr[7];
if(_2ce>-1){
if(_2ce==0){
return;
}
marr[7]--;
}
var _2cf;
var to={args:[],jp_:this,object:obj,proceed:function(){
return _2c9[_2ca].apply(_2c9,to.args);
}};
to.args=_2c5;
var _2d1=parseInt(marr[4]);
var _2d2=((!isNaN(_2d1))&&(marr[4]!==null)&&(typeof marr[4]!="undefined"));
if(marr[5]){
var rate=parseInt(marr[5]);
var cur=new Date();
var _2d5=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;
_2c7(mcpy);
},tod);
}
return;
}else{
marr.last=cur;
}
}
if(_2cc){
_2cb[_2cc].call(_2cb,to);
}else{
if((_2d2)&&((dojo.render.html)||(dojo.render.svg))){
dj_global["setTimeout"](function(){
if(msg){
_2c9[_2ca].call(_2c9,to);
}else{
_2c9[_2ca].apply(_2c9,args);
}
},_2d1);
}else{
if(msg){
_2c9[_2ca].call(_2c9,to);
}else{
_2c9[_2ca].apply(_2c9,args);
}
}
}
};
var _2d8=function(){
if(this.squelch){
try{
return _2c7.apply(this,arguments);
}
catch(e){
dojo.debug(e);
}
}else{
return _2c7.apply(this,arguments);
}
};
if((this["before"])&&(this.before.length>0)){
dojo.lang.forEach(this.before.concat(new Array()),_2d8);
}
var _2d9;
try{
if((this["around"])&&(this.around.length>0)){
var mi=new dojo.event.MethodInvocation(this,obj,args);
_2d9=mi.proceed();
}else{
if(this.methodfunc){
_2d9=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()),_2d8);
}
return (this.methodfunc)?_2d9:null;
},getArr:function(kind){
var type="after";
if((typeof kind=="string")&&(kind.indexOf("before")!=-1)){
type="before";
}else{
if(kind=="around"){
type="around";
}
}
if(!this[type]){
this[type]=[];
}
return this[type];
},kwAddAdvice:function(args){
this.addAdvice(args["adviceObj"],args["adviceFunc"],args["aroundObj"],args["aroundFunc"],args["adviceType"],args["precedence"],args["once"],args["delay"],args["rate"],args["adviceMsg"],args["maxCalls"]);
},addAdvice:function(_2de,_2df,_2e0,_2e1,_2e2,_2e3,once,_2e5,rate,_2e7,_2e8){
var arr=this.getArr(_2e2);
if(!arr){
dojo.raise("bad this: "+this);
}
var ao=[_2de,_2df,_2e0,_2e1,_2e5,rate,_2e7,_2e8];
if(once){
if(this.hasAdvice(_2de,_2df,_2e2,arr)>=0){
return;
}
}
if(_2e3=="first"){
arr.unshift(ao);
}else{
arr.push(ao);
}
},hasAdvice:function(_2eb,_2ec,_2ed,arr){
if(!arr){
arr=this.getArr(_2ed);
}
var ind=-1;
for(var x=0;x<arr.length;x++){
var aao=(typeof _2ec=="object")?(new String(_2ec)).toString():_2ec;
var a1o=(typeof arr[x][1]=="object")?(new String(arr[x][1])).toString():arr[x][1];
if((arr[x][0]==_2eb)&&(a1o==aao)){
ind=x;
}
}
return ind;
},removeAdvice:function(_2f3,_2f4,_2f5,once){
var arr=this.getArr(_2f5);
var ind=this.hasAdvice(_2f3,_2f4,_2f5,arr);
if(ind==-1){
return false;
}
while(ind!=-1){
arr.splice(ind,1);
if(once){
break;
}
ind=this.hasAdvice(_2f3,_2f4,_2f5,arr);
}
return true;
}});
dojo.provide("dojo.event.browser");
dojo._ie_clobber=new function(){
this.clobberNodes=[];
function nukeProp(node,prop){
try{
node[prop]=null;
}
catch(e){
}
try{
delete node[prop];
}
catch(e){
}
try{
node.removeAttribute(prop);
}
catch(e){
}
}
this.clobber=function(_2fb){
var na;
var tna;
if(_2fb){
tna=_2fb.all||_2fb.getElementsByTagName("*");
na=[_2fb];
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 _2ff={};
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 _304=0;
this.normalizedEventName=function(_305){
switch(_305){
case "CheckboxStateChange":
case "DOMAttrModified":
case "DOMMenuItemActive":
case "DOMMenuItemInactive":
case "DOMMouseScroll":
case "DOMNodeInserted":
case "DOMNodeRemoved":
case "RadioStateChange":
return _305;
break;
default:
var lcn=_305.toLowerCase();
return (lcn.indexOf("on")==0)?lcn.substr(2):lcn;
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,_30a){
if(!dojo.render.html.ie){
return;
}
this.addClobberNode(node);
for(var x=0;x<_30a.length;x++){
node.__clobberAttrs__.push(_30a[x]);
}
};
this.removeListener=function(node,_30d,fp,_30f){
if(!_30f){
var _30f=false;
}
_30d=dojo.event.browser.normalizedEventName(_30d);
if(_30d=="key"){
if(dojo.render.html.ie){
this.removeListener(node,"onkeydown",fp,_30f);
}
_30d="keypress";
}
if(node.removeEventListener){
node.removeEventListener(_30d,fp,_30f);
}
};
this.addListener=function(node,_311,fp,_313,_314){
if(!node){
return;
}
if(!_313){
var _313=false;
}
_311=dojo.event.browser.normalizedEventName(_311);
if(_311=="key"){
if(dojo.render.html.ie){
this.addListener(node,"onkeydown",fp,_313,_314);
}
_311="keypress";
}
if(!_314){
var _315=function(evt){
if(!evt){
evt=window.event;
}
var ret=fp(dojo.event.browser.fixEvent(evt,this));
if(_313){
dojo.event.browser.stopEvent(evt);
}
return ret;
};
}else{
_315=fp;
}
if(node.addEventListener){
node.addEventListener(_311,_315,_313);
return _315;
}else{
_311="on"+_311;
if(typeof node[_311]=="function"){
var _318=node[_311];
node[_311]=function(e){
_318(e);
return _315(e);
};
}else{
node[_311]=_315;
}
if(dojo.render.html.ie){
this.addClobberNodeAttrs(node,[_311]);
}
return _315;
}
};
this.isEvent=function(obj){
return (typeof obj!="undefined")&&(obj)&&(typeof Event!="undefined")&&(obj.eventPhase);
};
this.currentEvent=null;
this.callListener=function(_31b,_31c){
if(typeof _31b!="function"){
dojo.raise("listener not a function: "+_31b);
}
dojo.event.browser.currentEvent.currentTarget=_31c;
return _31b.call(_31c,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,_31f){
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 _321=evt.keyCode;
if(_321>=65&&_321<=90&&evt.shiftKey==false){
_321+=32;
}
if(_321>=1&&_321<=26&&evt.ctrlKey){
_321+=96;
}
evt.key=String.fromCharCode(_321);
}
}
}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 _321=evt.which;
if((evt.ctrlKey||evt.altKey||evt.metaKey)&&(evt.which>=65&&evt.which<=90&&evt.shiftKey==false)){
_321+=32;
}
evt.key=String.fromCharCode(_321);
}
}
}
}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=(_31f?_31f: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 _323=((dojo.render.html.ie55)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;
if(!evt.pageX){
evt.pageX=evt.clientX+(_323.scrollLeft||0);
}
if(!evt.pageY){
evt.pageY=evt.clientY+(_323.scrollTop||0);
}
if(evt.type=="mouseover"){
evt.relatedTarget=evt.fromElement;
}
if(evt.type=="mouseout"){
evt.relatedTarget=evt.toElement;
}
this.currentEvent=evt;
evt.callListener=this.callListener;
evt.stopPropagation=this._stopPropagation;
evt.preventDefault=this._preventDefault;
}
return evt;
};
this.stopEvent=function(evt){
if(window.event){
evt.cancelBubble=true;
evt.returnValue=false;
}else{
evt.preventDefault();
evt.stopPropagation();
}
};
};
dojo.provide("dojo.string.common");
dojo.string.trim=function(str,wh){
if(!str.replace){
return str;
}
if(!str.length){
return str;
}
var re=(wh>0)?(/^\s+/):(wh<0)?(/\s+$/):(/^\s+|\s+$/g);
return str.replace(re,"");
};
dojo.string.trimStart=function(str){
return dojo.string.trim(str,1);
};
dojo.string.trimEnd=function(str){
return dojo.string.trim(str,-1);
};
dojo.string.repeat=function(str,_32b,_32c){
var out="";
for(var i=0;i<_32b;i++){
out+=str;
if(_32c&&i<_32b-1){
out+=_32c;
}
}
return out;
};
dojo.string.pad=function(str,len,c,dir){
var out=String(str);
if(!c){
c="0";
}
if(!dir){
dir=1;
}
while(out.length<len){
if(dir>0){
out=c+out;
}else{
out+=c;
}
}
return out;
};
dojo.string.padLeft=function(str,len,c){
return dojo.string.pad(str,len,c,1);
};
dojo.string.padRight=function(str,len,c){
return dojo.string.pad(str,len,c,-1);
};
dojo.provide("dojo.string");
dojo.provide("dojo.io.common");
dojo.io.transports=[];
dojo.io.hdlrFuncNames=["load","error","timeout"];
dojo.io.Request=function(url,_33b,_33c,_33d){
if((arguments.length==1)&&(arguments[0].constructor==Object)){
this.fromKwArgs(arguments[0]);
}else{
this.url=url;
if(_33b){
this.mimetype=_33b;
}
if(_33c){
this.transport=_33c;
}
if(arguments.length>=4){
this.changeUrl=_33d;
}
}
};
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,_340,_341){
},error:function(type,_343,_344,_345){
},timeout:function(type,_347,_348,_349){
},handle:function(type,data,_34c,_34d){
},timeoutSeconds:0,abort:function(){
},fromKwArgs:function(_34e){
if(_34e["url"]){
_34e.url=_34e.url.toString();
}
if(_34e["formNode"]){
_34e.formNode=dojo.byId(_34e.formNode);
}
if(!_34e["method"]&&_34e["formNode"]&&_34e["formNode"].method){
_34e.method=_34e["formNode"].method;
}
if(!_34e["handle"]&&_34e["handler"]){
_34e.handle=_34e.handler;
}
if(!_34e["load"]&&_34e["loaded"]){
_34e.load=_34e.loaded;
}
if(!_34e["changeUrl"]&&_34e["changeURL"]){
_34e.changeUrl=_34e.changeURL;
}
_34e.encoding=dojo.lang.firstValued(_34e["encoding"],djConfig["bindEncoding"],"");
_34e.sendTransport=dojo.lang.firstValued(_34e["sendTransport"],djConfig["ioSendTransport"],false);
var _34f=dojo.lang.isFunction;
for(var x=0;x<dojo.io.hdlrFuncNames.length;x++){
var fn=dojo.io.hdlrFuncNames[x];
if(_34e[fn]&&_34f(_34e[fn])){
continue;
}
if(_34e["handle"]&&_34f(_34e["handle"])){
_34e[fn]=_34e.handle;
}
}
dojo.lang.mixin(this,_34e);
}});
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(_356){
if(!(_356 instanceof dojo.io.Request)){
try{
_356=new dojo.io.Request(_356);
}
catch(e){
dojo.debug(e);
}
}
var _357="";
if(_356["transport"]){
_357=_356["transport"];
if(!this[_357]){
dojo.io.sendBindError(_356,"No dojo.io.bind() transport with name '"+_356["transport"]+"'.");
return _356;
}
if(!this[_357].canHandle(_356)){
dojo.io.sendBindError(_356,"dojo.io.bind() transport with name '"+_356["transport"]+"' cannot handle this type of request.");
return _356;
}
}else{
for(var x=0;x<dojo.io.transports.length;x++){
var tmp=dojo.io.transports[x];
if((this[tmp])&&(this[tmp].canHandle(_356))){
_357=tmp;
break;
}
}
if(_357==""){
dojo.io.sendBindError(_356,"None of the loaded transports for dojo.io.bind()"+" can handle the request.");
return _356;
}
}
this[_357].bind(_356);
_356.bindSuccess=true;
return _356;
};
dojo.io.sendBindError=function(_35a,_35b){
if((typeof _35a.error=="function"||typeof _35a.handle=="function")&&(typeof setTimeout=="function"||typeof setTimeout=="object")){
var _35c=new dojo.io.Error(_35b);
setTimeout(function(){
_35a[(typeof _35a.error=="function")?"error":"handle"]("error",_35c,null,_35a);
},50);
}else{
dojo.raise(_35b);
}
};
dojo.io.queueBind=function(_35d){
if(!(_35d instanceof dojo.io.Request)){
try{
_35d=new dojo.io.Request(_35d);
}
catch(e){
dojo.debug(e);
}
}
var _35e=_35d.load;
_35d.load=function(){
dojo.io._queueBindInFlight=false;
var ret=_35e.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
var _360=_35d.error;
_35d.error=function(){
dojo.io._queueBindInFlight=false;
var ret=_360.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
dojo.io._bindQueue.push(_35d);
dojo.io._dispatchNextQueueBind();
return _35d;
};
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,_363,last){
var enc=/utf/i.test(_363||"")?encodeURIComponent:dojo.string.encodeAscii;
var _366=[];
var _367=new Object();
for(var name in map){
var _369=function(elt){
var val=enc(name)+"="+enc(elt);
_366[(last==name)?"push":"unshift"](val);
};
if(!_367[name]){
var _36c=map[name];
if(dojo.lang.isArray(_36c)){
dojo.lang.forEach(_36c,_369);
}else{
_369(_36c);
}
}
}
return _366.join("&");
};
dojo.io.setIFrameSrc=function(_36d,src,_36f){
try{
var r=dojo.render.html;
if(!_36f){
if(r.safari){
_36d.location=src;
}else{
frames[_36d.name].location=src;
}
}else{
var idoc;
if(r.ie){
idoc=_36d.contentWindow.document;
}else{
if(r.safari){
idoc=_36d.document;
}else{
idoc=_36d.contentWindow;
}
}
if(!idoc){
_36d.location=src;
return;
}else{
idoc.location.replace(src);
}
}
}
catch(e){
dojo.debug(e);
dojo.debug("setIFrameSrc: "+e);
}
};
dojo.provide("dojo.string.extras");
dojo.string.substituteParams=function(_372,hash){
var map=(typeof hash=="object")?hash:dojo.lang.toArray(arguments,1);
return _372.replace(/\%\{(\w+)\}/g,function(_375,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 _378=str.split(" ");
for(var i=0;i<_378.length;i++){
_378[i]=_378[i].charAt(0).toUpperCase()+_378[i].substring(1);
}
return _378.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 _37d=escape(str);
var _37e,re=/%u([0-9A-F]{4})/i;
while((_37e=_37d.match(re))){
var num=Number("0x"+_37e[1]);
var _381=escape("&#"+num+";");
ret+=_37d.substring(0,_37e.index)+_381;
_37d=_37d.substring(_37e.index+_37e[0].length);
}
ret+=_37d.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,_386){
str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
if(!_386){
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,_38f){
if(_38f){
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,_393,_394){
if(_394){
str=str.toLowerCase();
_393=_393.toLowerCase();
}
return str.indexOf(_393)==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,_39a){
if(_39a=="\n"){
text=text.replace(/\r\n/g,"\n");
text=text.replace(/\r/g,"\n");
}else{
if(_39a=="\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,_39c){
var _39d=[];
for(var i=0,_39f=0;i<str.length;i++){
if(str.charAt(i)=="\\"){
i++;
continue;
}
if(str.charAt(i)==_39c){
_39d.push(str.substring(_39f,i));
_39f=i+1;
}
}
_39d.push(str.substr(_39f));
return _39d;
};
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='"+(djConfig["dojoIframeHistoryUrl"]||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){
if(djConfig["useXDomain"]&&!djConfig["dojoIframeHistoryUrl"]){
dojo.debug("dojo.undo.browser: When using cross-domain Dojo builds,"+" please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"+" to the path on your domain to iframe_history.html");
}
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 _3a4=args["back"]||args["backButton"]||args["handle"];
var tcb=function(_3a6){
if(window.location.hash!=""){
setTimeout("window.location.href = '"+hash+"';",1);
}
_3a4.apply(this,[_3a6]);
};
if(args["back"]){
args.back=tcb;
}else{
if(args["backButton"]){
args.backButton=tcb;
}else{
if(args["handle"]){
args.handle=tcb;
}
}
}
var _3a7=args["forward"]||args["forwardButton"]||args["handle"];
var tfw=function(_3a9){
if(window.location.hash!=""){
window.location.href=hash;
}
if(_3a7){
_3a7.apply(this,[_3a9]);
}
};
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,_3ac){
if(!dojo.render.html.opera){
var _3ad=this._getUrlQuery(_3ac.href);
if(_3ad==null){
if(this.historyStack.length==1){
this.handleBackButton();
}
return;
}
if(this.moveForward){
this.moveForward=false;
return;
}
if(this.historyStack.length>=2&&_3ad==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){
this.handleBackButton();
}else{
if(this.forwardStack.length>0&&_3ad==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){
this.handleForwardButton();
}
}
}
},handleBackButton:function(){
var _3ae=this.historyStack.pop();
if(!_3ae){
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(_3ae);
},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 _3b5=url.split("?");
if(_3b5.length<2){
return null;
}else{
return _3b5[1];
}
},_loadIframeHistory:function(){
var url=(djConfig["dojoIframeHistoryUrl"]||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 _3b8=false;
var _3b9=node.getElementsByTagName("input");
dojo.lang.forEach(_3b9,function(_3ba){
if(_3b8){
return;
}
if(_3ba.getAttribute("type")=="file"){
_3b8=true;
}
});
return _3b8;
};
dojo.io.formHasFile=function(_3bb){
return dojo.io.checkChildrenForFile(_3bb);
};
dojo.io.updateNode=function(node,_3bd){
node=dojo.byId(node);
var args=_3bd;
if(dojo.lang.isString(_3bd)){
args={url:_3bd};
}
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(_3c4,_3c5,_3c6){
if((!_3c4)||(!_3c4.tagName)||(!_3c4.tagName.toLowerCase()=="form")){
dojo.raise("Attempted to encode a non-form element.");
}
if(!_3c6){
_3c6=dojo.io.formFilter;
}
var enc=/utf/i.test(_3c5||"")?encodeURIComponent:dojo.string.encodeAscii;
var _3c8=[];
for(var i=0;i<_3c4.elements.length;i++){
var elm=_3c4.elements[i];
if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_3c6(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){
_3c8.push(name+"="+enc(elm.options[j].value));
}
}
}else{
if(dojo.lang.inArray(["radio","checkbox"],type)){
if(elm.checked){
_3c8.push(name+"="+enc(elm.value));
}
}else{
_3c8.push(name+"="+enc(elm.value));
}
}
}
var _3ce=_3c4.getElementsByTagName("input");
for(var i=0;i<_3ce.length;i++){
var _3cf=_3ce[i];
if(_3cf.type.toLowerCase()=="image"&&_3cf.form==_3c4&&_3c6(_3cf)){
var name=enc(_3cf.name);
_3c8.push(name+"="+enc(_3cf.value));
_3c8.push(name+".x=0");
_3c8.push(name+".y=0");
}
}
return _3c8.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 _3d5=form.getElementsByTagName("input");
for(var i=0;i<_3d5.length;i++){
var _3d6=_3d5[i];
if(_3d6.type.toLowerCase()=="image"&&_3d6.form==form){
this.connect(_3d6,"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 _3dd=false;
if(node.disabled||!node.name){
_3dd=false;
}else{
if(dojo.lang.inArray(["submit","button","image"],type)){
if(!this.clickedButton){
this.clickedButton=node;
}
_3dd=node==this.clickedButton;
}else{
_3dd=!dojo.lang.inArray(["file","submit","reset","button"],type);
}
}
return _3dd;
},connect:function(_3de,_3df,_3e0){
if(dojo.evalObjPath("dojo.event.connect")){
dojo.event.connect(_3de,_3df,this,_3e0);
}else{
var fcn=dojo.lang.hitch(this,_3e0);
_3de[_3df]=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 _3e3=this;
var _3e4={};
this.useCache=false;
this.preventCache=false;
function getCacheKey(url,_3e6,_3e7){
return url+"|"+_3e6+"|"+_3e7.toLowerCase();
}
function addToCache(url,_3e9,_3ea,http){
_3e4[getCacheKey(url,_3e9,_3ea)]=http;
}
function getFromCache(url,_3ed,_3ee){
return _3e4[getCacheKey(url,_3ed,_3ee)];
}
this.clearCache=function(){
_3e4={};
};
function doLoad(_3ef,http,url,_3f2,_3f3){
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(_3ef.method.toLowerCase()=="head"){
var _3f5=http.getAllResponseHeaders();
ret={};
ret.toString=function(){
return _3f5;
};
var _3f6=_3f5.split(/[\r\n]+/g);
for(var i=0;i<_3f6.length;i++){
var pair=_3f6[i].match(/^([^:]+)\s*:\s*(.+)$/i);
if(pair){
ret[pair[1]]=pair[2];
}
}
}else{
if(_3ef.mimetype=="text/javascript"){
try{
ret=dj_eval(http.responseText);
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=null;
}
}else{
if(_3ef.mimetype=="text/json"||_3ef.mimetype=="application/json"){
try{
ret=dj_eval("("+http.responseText+")");
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=false;
}
}else{
if((_3ef.mimetype=="application/xml")||(_3ef.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(_3f3){
addToCache(url,_3f2,_3ef.method,http);
}
_3ef[(typeof _3ef.load=="function")?"load":"handle"]("load",ret,http,_3ef);
}else{
var _3f9=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText);
_3ef[(typeof _3ef.error=="function")?"error":"handle"]("error",_3f9,http,_3ef);
}
}
function setHeaders(http,_3fb){
if(_3fb["headers"]){
for(var _3fc in _3fb["headers"]){
if(_3fc.toLowerCase()=="content-type"&&!_3fb["contentType"]){
_3fb["contentType"]=_3fb["headers"][_3fc];
}else{
http.setRequestHeader(_3fc,_3fb["headers"][_3fc]);
}
}
}
}
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&&!_3e3._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 _400=new dojo.io.Error("XMLHttpTransport.watchInFlight Error: "+e);
tif.req[(typeof tif.req.error=="function")?"error":"handle"]("error",_400,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 _401=dojo.hostenv.getXmlhttpObject()?true:false;
this.canHandle=function(_402){
return _401&&dojo.lang.inArray(["text/plain","text/html","application/xml","text/xml","text/javascript","text/json","application/json"],(_402["mimetype"].toLowerCase()||""))&&!(_402["formNode"]&&dojo.io.formHasFile(_402["formNode"]));
};
this.multipartBoundary="45309FFF-BD65-4d50-99C9-36986896A96F";
this.bind=function(_403){
if(!_403["url"]){
if(!_403["formNode"]&&(_403["backButton"]||_403["back"]||_403["changeUrl"]||_403["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(_403);
return true;
}
}
var url=_403.url;
var _405="";
if(_403["formNode"]){
var ta=_403.formNode.getAttribute("action");
if((ta)&&(!_403["url"])){
url=ta;
}
var tp=_403.formNode.getAttribute("method");
if((tp)&&(!_403["method"])){
_403.method=tp;
}
_405+=dojo.io.encodeForm(_403.formNode,_403.encoding,_403["formFilter"]);
}
if(url.indexOf("#")>-1){
dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url);
url=url.split("#")[0];
}
if(_403["file"]){
_403.method="post";
}
if(!_403["method"]){
_403.method="get";
}
if(_403.method.toLowerCase()=="get"){
_403.multipart=false;
}else{
if(_403["file"]){
_403.multipart=true;
}else{
if(!_403["multipart"]){
_403.multipart=false;
}
}
}
if(_403["backButton"]||_403["back"]||_403["changeUrl"]){
dojo.undo.browser.addToHistory(_403);
}
var _408=_403["content"]||{};
if(_403.sendTransport){
_408["dojo.transport"]="xmlhttp";
}
do{
if(_403.postContent){
_405=_403.postContent;
break;
}
if(_408){
_405+=dojo.io.argsFromMap(_408,_403.encoding);
}
if(_403.method.toLowerCase()=="get"||!_403.multipart){
break;
}
var t=[];
if(_405.length){
var q=_405.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(_403.file){
if(dojo.lang.isArray(_403.file)){
for(var i=0;i<_403.file.length;++i){
var o=_403.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=_403.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+"--","");
_405=t.join("\r\n");
}
}while(false);
var _40e=_403["sync"]?false:true;
var _40f=_403["preventCache"]||(this.preventCache==true&&_403["preventCache"]!=false);
var _410=_403["useCache"]==true||(this.useCache==true&&_403["useCache"]!=false);
if(!_40f&&_410){
var _411=getFromCache(url,_405,_403.method);
if(_411){
doLoad(_403,_411,url,_405,false);
return;
}
}
var http=dojo.hostenv.getXmlhttpObject(_403);
var _413=false;
if(_40e){
var _414=this.inFlight.push({"req":_403,"http":http,"url":url,"query":_405,"useCache":_410,"startTime":_403.timeoutSeconds?(new Date()).getTime():0});
this.startWatchingInFlight();
}else{
_3e3._blockAsync=true;
}
if(_403.method.toLowerCase()=="post"){
if(!_403.user){
http.open("POST",url,_40e);
}else{
http.open("POST",url,_40e,_403.user,_403.password);
}
setHeaders(http,_403);
http.setRequestHeader("Content-Type",_403.multipart?("multipart/form-data; boundary="+this.multipartBoundary):(_403.contentType||"application/x-www-form-urlencoded"));
try{
http.send(_405);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_403,{status:404},url,_405,_410);
}
}else{
var _415=url;
if(_405!=""){
_415+=(_415.indexOf("?")>-1?"&":"?")+_405;
}
if(_40f){
_415+=(dojo.string.endsWithAny(_415,"?","&")?"":(_415.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf();
}
if(!_403.user){
http.open(_403.method.toUpperCase(),_415,_40e);
}else{
http.open(_403.method.toUpperCase(),_415,_40e,_403.user,_403.password);
}
setHeaders(http,_403);
try{
http.send(null);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_403,{status:404},url,_405,_410);
}
}
if(!_40e){
doLoad(_403,http,url,_405,_410);
_3e3._blockAsync=false;
}
_403.abort=function(){
try{
http._aborted=true;
}
catch(e){
}
return http.abort();
};
return;
};
dojo.io.transports.addTransport("XMLHTTPTransport");
};
}
dojo.provide("dojo.gfx.color");
dojo.gfx.color.Color=function(r,g,b,a){
if(dojo.lang.isArray(r)){
this.r=r[0];
this.g=r[1];
this.b=r[2];
this.a=r[3]||1;
}else{
if(dojo.lang.isString(r)){
var rgb=dojo.gfx.color.extractRGB(r);
this.r=rgb[0];
this.g=rgb[1];
this.b=rgb[2];
this.a=g||1;
}else{
if(r instanceof dojo.gfx.color.Color){
this.r=r.r;
this.b=r.b;
this.g=r.g;
this.a=r.a;
}else{
this.r=r;
this.g=g;
this.b=b;
this.a=a;
}
}
}
};
dojo.gfx.color.Color.fromArray=function(arr){
return new dojo.gfx.color.Color(arr[0],arr[1],arr[2],arr[3]);
};
dojo.extend(dojo.gfx.color.Color,{toRgb:function(_41c){
if(_41c){
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(_41d,_41e){
var rgb=null;
if(dojo.lang.isArray(_41d)){
rgb=_41d;
}else{
if(_41d instanceof dojo.gfx.color.Color){
rgb=_41d.toRgb();
}else{
rgb=new dojo.gfx.color.Color(_41d).toRgb();
}
}
return dojo.gfx.color.blend(this.toRgb(),rgb,_41e);
}});
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,_422){
if(typeof a=="string"){
return dojo.gfx.color.blendHex(a,b,_422);
}
if(!_422){
_422=0;
}
_422=Math.min(Math.max(-1,_422),1);
_422=((_422+1)/2);
var c=[];
for(var x=0;x<3;x++){
c[x]=parseInt(b[x]+((a[x]-b[x])*_422));
}
return c;
};
dojo.gfx.color.blendHex=function(a,b,_427){
return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a),dojo.gfx.color.hex2rgb(b),_427));
};
dojo.gfx.color.extractRGB=function(_428){
var hex="0123456789abcdef";
_428=_428.toLowerCase();
if(_428.indexOf("rgb")==0){
var _42a=_428.match(/rgba*\((\d+), *(\d+), *(\d+)/i);
var ret=_42a.splice(1,3);
return ret;
}else{
var _42c=dojo.gfx.color.hex2rgb(_428);
if(_42c){
return _42c;
}else{
return dojo.gfx.color.named[_428]||[255,255,255];
}
}
};
dojo.gfx.color.hex2rgb=function(hex){
var _42e="0123456789ABCDEF";
var rgb=new Array(3);
if(hex.indexOf("#")==0){
hex=hex.substring(1);
}
hex=hex.toUpperCase();
if(hex.replace(new RegExp("["+_42e+"]","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]=_42e.indexOf(rgb[i].charAt(0))*16+_42e.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(_437,end){
this.start=_437;
this.end=end;
if(dojo.lang.isArray(_437)){
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-_437;
this.getValue=function(n){
return (diff*n)+this.start;
};
}
};
if((dojo.render.html.khtml)&&(!dojo.render.html.safari)){
dojo.lfx.easeDefault=function(n){
return (parseFloat("0.5")+((Math.sin((n+parseFloat("1.5"))*Math.PI))/2));
};
}else{
dojo.lfx.easeDefault=function(n){
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:10,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,_447,_448){
if(!_448){
_448=_447;
_447=this;
}
_448=dojo.lang.hitch(_447,_448);
var _449=this[evt]||function(){
};
this[evt]=function(){
var ret=_449.apply(this,arguments);
_448.apply(this,arguments);
return ret;
};
return this;
},fire:function(evt,args){
if(this[evt]){
this[evt].apply(this,(args||[]));
}
return this;
},repeat:function(_44d){
this.repeatCount=_44d;
return this;
},_active:false,_paused:false});
dojo.lfx.Animation=function(_44e,_44f,_450,_451,_452,rate){
dojo.lfx.IAnimation.call(this);
if(dojo.lang.isNumber(_44e)||(!_44e&&_44f.getValue)){
rate=_452;
_452=_451;
_451=_450;
_450=_44f;
_44f=_44e;
_44e=null;
}else{
if(_44e.getValue||dojo.lang.isArray(_44e)){
rate=_451;
_452=_450;
_451=_44f;
_450=_44e;
_44f=null;
_44e=null;
}
}
if(dojo.lang.isArray(_450)){
this.curve=new dojo.lfx.Line(_450[0],_450[1]);
}else{
this.curve=_450;
}
if(_44f!=null&&_44f>0){
this.duration=_44f;
}
if(_452){
this.repeatCount=_452;
}
if(rate){
this.rate=rate;
}
if(_44e){
dojo.lang.forEach(["handler","beforeBegin","onBegin","onEnd","onPlay","onStop","onAnimate"],function(item){
if(_44e[item]){
this.connect(item,_44e[item]);
}
},this);
}
if(_451&&dojo.lang.isFunction(_451)){
this.easing=_451;
}
};
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(_455,_456){
if(_456){
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(_455>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_456);
}),_455);
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 _458=this.curve.getValue(step);
if(this._percent==0){
if(!this._startRepeatCount){
this._startRepeatCount=this.repeatCount;
}
this.fire("handler",["begin",_458]);
this.fire("onBegin",[_458]);
}
this.fire("handler",["play",_458]);
this.fire("onPlay",[_458]);
this._cycle();
return this;
},pause:function(){
clearTimeout(this._timer);
if(!this._active){
return this;
}
this._paused=true;
var _459=this.curve.getValue(this._percent/100);
this.fire("handler",["pause",_459]);
this.fire("onPause",[_459]);
return this;
},gotoPercent:function(pct,_45b){
clearTimeout(this._timer);
this._active=true;
this._paused=true;
this._percent=pct;
if(_45b){
this.play();
}
return this;
},stop:function(_45c){
clearTimeout(this._timer);
var step=this._percent/100;
if(_45c){
step=1;
}
var _45e=this.curve.getValue(step);
this.fire("handler",["stop",_45e]);
this.fire("onStop",[_45e]);
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 _461=this.curve.getValue(step);
this.fire("handler",["animate",_461]);
this.fire("onAnimate",[_461]);
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(_462){
dojo.lfx.IAnimation.call(this);
this._anims=[];
this._animsEnded=0;
var _463=arguments;
if(_463.length==1&&(dojo.lang.isArray(_463[0])||dojo.lang.isArrayLike(_463[0]))){
_463=_463[0];
}
dojo.lang.forEach(_463,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(_465,_466){
if(!this._anims.length){
return this;
}
this.fire("beforeBegin");
if(_465>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_466);
}),_465);
return this;
}
if(_466||this._anims[0].percent==0){
this.fire("onBegin");
}
this.fire("onPlay");
this._animsCall("play",null,_466);
return this;
},pause:function(){
this.fire("onPause");
this._animsCall("pause");
return this;
},stop:function(_467){
this.fire("onStop");
this._animsCall("stop",_467);
return this;
},_onAnimsEnded:function(){
this._animsEnded++;
if(this._animsEnded>=this._anims.length){
this.fire("onEnd");
}
return this;
},_animsCall:function(_468){
var args=[];
if(arguments.length>1){
for(var i=1;i<arguments.length;i++){
args.push(arguments[i]);
}
}
var _46b=this;
dojo.lang.forEach(this._anims,function(anim){
anim[_468](args);
},_46b);
return this;
}});
dojo.lfx.Chain=function(_46d){
dojo.lfx.IAnimation.call(this);
this._anims=[];
this._currAnim=-1;
var _46e=arguments;
if(_46e.length==1&&(dojo.lang.isArray(_46e[0])||dojo.lang.isArrayLike(_46e[0]))){
_46e=_46e[0];
}
var _46f=this;
dojo.lang.forEach(_46e,function(anim,i,_472){
this._anims.push(anim);
if(i<_472.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(_473,_474){
if(!this._anims.length){
return this;
}
if(_474||!this._anims[this._currAnim]){
this._currAnim=0;
}
var _475=this._anims[this._currAnim];
this.fire("beforeBegin");
if(_473>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_474);
}),_473);
return this;
}
if(_475){
if(this._currAnim==0){
this.fire("handler",["begin",this._currAnim]);
this.fire("onBegin",[this._currAnim]);
}
this.fire("onPlay",[this._currAnim]);
_475.play(null,_474);
}
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 _476=this._anims[this._currAnim];
if(_476){
if(!_476._active||_476._paused){
this.play();
}else{
this.pause();
}
}
return this;
},stop:function(){
var _477=this._anims[this._currAnim];
if(_477){
_477.stop();
this.fire("onStop",[this._currAnim]);
}
return _477;
},_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(_478){
var _479=arguments;
if(dojo.lang.isArray(arguments[0])){
_479=arguments[0];
}
if(_479.length==1){
return _479[0];
}
return new dojo.lfx.Combine(_479);
};
dojo.lfx.chain=function(_47a){
var _47b=arguments;
if(dojo.lang.isArray(arguments[0])){
_47b=arguments[0];
}
if(_47b.length==1){
return _47b[0];
}
return new dojo.lfx.Chain(_47b);
};
dojo.provide("dojo.html.display");
dojo.html._toggle=function(node,_47d,_47e){
node=dojo.byId(node);
_47e(node,!_47d(node));
return _47d(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,_483){
dojo.html[(_483?"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,_489){
dojo.html.setStyle(node,"display",((_489 instanceof String||typeof _489=="string")?_489:(_489?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,_48d){
dojo.html.setStyle(node,"visibility",((_48d instanceof String||typeof _48d=="string")?_48d:(_48d?"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,_491,_492){
node=dojo.byId(node);
var h=dojo.render.html;
if(!_492){
if(_491>=1){
if(h.ie){
dojo.html.clearOpacity(node);
return;
}else{
_491=0.999999;
}
}else{
if(_491<0){
_491=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="+_491*100+")";
}
}
node.style.filter="Alpha(Opacity="+_491*100+")";
}else{
if(h.moz){
node.style.opacity=_491;
node.style.MozOpacity=_491;
}else{
if(h.safari){
node.style.opacity=_491;
node.style.KhtmlOpacity=_491;
}else{
node.style.opacity=_491;
}
}
}
};
dojo.html.clearOpacity=function(node){
node=dojo.byId(node);
var ns=node.style;
var h=dojo.render.html;
if(h.ie){
try{
if(node.filters&&node.filters.alpha){
ns.filter="";
}
}
catch(e){
}
}else{
if(h.moz){
ns.opacity=1;
ns.MozOpacity=1;
}else{
if(h.safari){
ns.opacity=1;
ns.KhtmlOpacity=1;
}else{
ns.opacity=1;
}
}
}
};
dojo.html.getOpacity=function(node){
node=dojo.byId(node);
var h=dojo.render.html;
if(h.ie){
var opac=(node.filters&&node.filters.alpha&&typeof node.filters.alpha.opacity=="number"?node.filters.alpha.opacity:100)/100;
}else{
var opac=node.style.opacity||node.style.MozOpacity||node.style.KhtmlOpacity||1;
}
return opac>=0.999999?1:Number(opac);
};
dojo.provide("dojo.html.color");
dojo.html.getBackgroundColor=function(node){
node=dojo.byId(node);
var _49d;
do{
_49d=dojo.html.getStyle(node,"background-color");
if(_49d.toLowerCase()=="rgba(0, 0, 0, 0)"){
_49d="transparent";
}
if(node==document.getElementsByTagName("body")[0]){
node=null;
break;
}
node=node.parentNode;
}while(node&&dojo.lang.inArray(["transparent",""],_49d));
if(_49d=="transparent"){
_49d=[255,255,255,0];
}else{
_49d=dojo.gfx.color.extractRGB(_49d);
}
return _49d;
};
dojo.provide("dojo.html.layout");
dojo.html.sumAncestorProperties=function(node,prop){
node=dojo.byId(node);
if(!node){
return 0;
}
var _4a0=0;
while(node){
if(dojo.html.getComputedStyle(node,"position")=="fixed"){
return 0;
}
var val=node[prop];
if(val){
_4a0+=val-0;
if(node==dojo.body()){
break;
}
}
node=node.parentNode;
}
return _4a0;
};
dojo.html.setStyleAttributes=function(node,_4a3){
node=dojo.byId(node);
var _4a4=_4a3.replace(/(;)?\s*$/,"").split(";");
for(var i=0;i<_4a4.length;i++){
var _4a6=_4a4[i].split(":");
var name=_4a6[0].replace(/\s*$/,"").replace(/^\s*/,"").toLowerCase();
var _4a8=_4a6[1].replace(/\s*$/,"").replace(/^\s*/,"");
switch(name){
case "opacity":
dojo.html.setOpacity(node,_4a8);
break;
case "content-height":
dojo.html.setContentBox(node,{height:_4a8});
break;
case "content-width":
dojo.html.setContentBox(node,{width:_4a8});
break;
case "outer-height":
dojo.html.setMarginBox(node,{height:_4a8});
break;
case "outer-width":
dojo.html.setMarginBox(node,{width:_4a8});
break;
default:
node.style[dojo.html.toCamelCase(name)]=_4a8;
}
}
};
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,_4aa,_4ab){
node=dojo.byId(node,node.ownerDocument);
var ret={x:0,y:0};
var bs=dojo.html.boxSizing;
if(!_4ab){
_4ab=bs.CONTENT_BOX;
}
var _4ae=2;
var _4af;
switch(_4ab){
case bs.MARGIN_BOX:
_4af=3;
break;
case bs.BORDER_BOX:
_4af=2;
break;
case bs.PADDING_BOX:
default:
_4af=1;
break;
case bs.CONTENT_BOX:
_4af=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){
_4ae=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 _4b3;
if((h.safari)&&(node.style.getPropertyValue("position")=="absolute")&&(node.parentNode==db)){
_4b3=db;
}else{
_4b3=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 _4b5=node;
do{
var n=_4b5["offsetLeft"];
if(!h.opera||n>0){
ret.x+=isNaN(n)?0:n;
}
var m=_4b5["offsetTop"];
ret.y+=isNaN(m)?0:m;
_4b5=_4b5.offsetParent;
}while((_4b5!=_4b3)&&(_4b5!=null));
}else{
if(node["x"]&&node["y"]){
ret.x+=isNaN(node.x)?0:node.x;
ret.y+=isNaN(node.y)?0:node.y;
}
}
}
}
if(_4aa){
var _4b8=dojo.html.getScroll();
ret.y+=_4b8.top;
ret.x+=_4b8.left;
}
var _4b9=[dojo.html.getPaddingExtent,dojo.html.getBorderExtent,dojo.html.getMarginExtent];
if(_4ae>_4af){
for(var i=_4af;i<_4ae;++i){
ret.y+=_4b9[i](node,"top");
ret.x+=_4b9[i](node,"left");
}
}else{
if(_4ae<_4af){
for(var i=_4af;i>_4ae;--i){
ret.y-=_4b9[i-1](node,"top");
ret.x-=_4b9[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,_4bd,_4be){
var _4bf=0;
for(var x=0;x<_4bd.length;x++){
_4bf+=dojo.html.getPixelValue(node,_4bd[x],_4be);
}
return _4bf;
};
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 _4cc=dojo.html.getBorder(node);
return {width:pad.width+_4cc.width,height:pad.height+_4cc.height};
};
dojo.html.getBoxSizing=function(node){
var h=dojo.render.html;
var bs=dojo.html.boxSizing;
if(((h.ie)||(h.opera))&&node.nodeName.toLowerCase()!="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 _4d1;
if(!h.ie){
_4d1=dojo.html.getStyle(node,"-moz-box-sizing");
if(!_4d1){
_4d1=dojo.html.getStyle(node,"box-sizing");
}
}
return (_4d1?_4d1: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 _4d6=dojo.html.getBorder(node);
return {width:box.width-_4d6.width,height:box.height-_4d6.height};
};
dojo.html.getContentBox=function(node){
node=dojo.byId(node);
var _4d8=dojo.html.getPadBorder(node);
return {width:node.offsetWidth-_4d8.width,height:node.offsetHeight-_4d8.height};
};
dojo.html.setContentBox=function(node,args){
node=dojo.byId(node);
var _4db=0;
var _4dc=0;
var isbb=dojo.html.isBorderBox(node);
var _4de=(isbb?dojo.html.getPadBorder(node):{width:0,height:0});
var ret={};
if(typeof args.width!="undefined"){
_4db=args.width+_4de.width;
ret.width=dojo.html.setPositivePixelValue(node,"width",_4db);
}
if(typeof args.height!="undefined"){
_4dc=args.height+_4de.height;
ret.height=dojo.html.setPositivePixelValue(node,"height",_4dc);
}
return ret;
};
dojo.html.getMarginBox=function(node){
var _4e1=dojo.html.getBorderBox(node);
var _4e2=dojo.html.getMargin(node);
return {width:_4e1.width+_4e2.width,height:_4e1.height+_4e2.height};
};
dojo.html.setMarginBox=function(node,args){
node=dojo.byId(node);
var _4e5=0;
var _4e6=0;
var isbb=dojo.html.isBorderBox(node);
var _4e8=(!isbb?dojo.html.getPadBorder(node):{width:0,height:0});
var _4e9=dojo.html.getMargin(node);
var ret={};
if(typeof args.width!="undefined"){
_4e5=args.width-_4e8.width;
_4e5-=_4e9.width;
ret.width=dojo.html.setPositivePixelValue(node,"width",_4e5);
}
if(typeof args.height!="undefined"){
_4e6=args.height-_4e8.height;
_4e6-=_4e9.height;
ret.height=dojo.html.setPositivePixelValue(node,"height",_4e6);
}
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(_4ee,_4ef,_4f0){
if(_4ee instanceof Array||typeof _4ee=="array"){
dojo.deprecated("dojo.html.toCoordinateArray","use dojo.html.toCoordinateObject({left: , top: , width: , height: }) instead","0.5");
while(_4ee.length<4){
_4ee.push(0);
}
while(_4ee.length>4){
_4ee.pop();
}
var ret={left:_4ee[0],top:_4ee[1],width:_4ee[2],height:_4ee[3]};
}else{
if(!_4ee.nodeType&&!(_4ee instanceof String||typeof _4ee=="string")&&("width" in _4ee||"height" in _4ee||"left" in _4ee||"x" in _4ee||"top" in _4ee||"y" in _4ee)){
var ret={left:_4ee.left||_4ee.x||0,top:_4ee.top||_4ee.y||0,width:_4ee.width||0,height:_4ee.height||0};
}else{
var node=dojo.byId(_4ee);
var pos=dojo.html.abs(node,_4ef,_4f0);
var _4f4=dojo.html.getMarginBox(node);
var ret={left:pos.left,top:pos.top,width:_4f4.width,height:_4f4.height};
}
}
ret.x=ret.left;
ret.y=ret.top;
return ret;
};
dojo.html.setMarginBoxWidth=dojo.html.setOuterWidth=function(node,_4f6){
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,_4f9){
return dojo.html._callDeprecated("getTotalOffset","getAbsolutePosition",arguments,null,type);
};
dojo.html.getAbsoluteX=function(node,_4fb){
return dojo.html._callDeprecated("getAbsoluteX","getAbsolutePosition",arguments,null,"x");
};
dojo.html.getAbsoluteY=function(node,_4fd){
return dojo.html._callDeprecated("getAbsoluteY","getAbsolutePosition",arguments,null,"y");
};
dojo.html.totalOffsetLeft=function(node,_4ff){
return dojo.html._callDeprecated("totalOffsetLeft","getAbsolutePosition",arguments,null,"left");
};
dojo.html.totalOffsetTop=function(node,_501){
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,_50b){
return dojo.html._callDeprecated("setContentBoxWidth","setContentBox",arguments,"width");
};
dojo.html.setContentBoxHeight=dojo.html.setContentHeight=function(node,_50d){
return dojo.html._callDeprecated("setContentBoxHeight","setContentBox",arguments,"height");
};
dojo.provide("dojo.lfx.html");
dojo.lfx.html._byId=function(_50e){
if(!_50e){
return [];
}
if(dojo.lang.isArrayLike(_50e)){
if(!_50e.alreadyChecked){
var n=[];
dojo.lang.forEach(_50e,function(node){
n.push(dojo.byId(node));
});
n.alreadyChecked=true;
return n;
}else{
return _50e;
}
}else{
var n=[];
n.push(dojo.byId(_50e));
n.alreadyChecked=true;
return n;
}
};
dojo.lfx.html.propertyAnimation=function(_511,_512,_513,_514,_515){
_511=dojo.lfx.html._byId(_511);
var _516={"propertyMap":_512,"nodes":_511,"duration":_513,"easing":_514||dojo.lfx.easeDefault};
var _517=function(args){
if(args.nodes.length==1){
var pm=args.propertyMap;
if(!dojo.lang.isArray(args.propertyMap)){
var parr=[];
for(var _51b in pm){
pm[_51b].property=_51b;
parr.push(pm[_51b]);
}
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 _51d=function(_51e){
var _51f=[];
dojo.lang.forEach(_51e,function(c){
_51f.push(Math.round(c));
});
return _51f;
};
var _521=function(n,_523){
n=dojo.byId(n);
if(!n||!n.style){
return;
}
for(var s in _523){
try{
if(s=="opacity"){
dojo.html.setOpacity(n,_523[s]);
}else{
n.style[s]=_523[s];
}
}
catch(e){
dojo.debug(e);
}
}
};
var _525=function(_526){
this._properties=_526;
this.diffs=new Array(_526.length);
dojo.lang.forEach(_526,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 _52d=null;
if(dojo.lang.isArray(prop.start)){
}else{
if(prop.start instanceof dojo.gfx.color.Color){
_52d=(prop.units||"rgb")+"(";
for(var j=0;j<prop.startRgb.length;j++){
_52d+=Math.round(((prop.endRgb[j]-prop.startRgb[j])*n)+prop.startRgb[j])+(j<prop.startRgb.length-1?",":"");
}
_52d+=")";
}else{
_52d=((this.diffs[i])*n)+prop.start+(prop.property!="opacity"?prop.units||"px":"");
}
}
ret[dojo.html.toCamelCase(prop.property)]=_52d;
},this);
return ret;
};
};
var anim=new dojo.lfx.Animation({beforeBegin:function(){
_517(_516);
anim.curve=new _525(_516.propertyMap);
},onAnimate:function(_530){
dojo.lang.forEach(_516.nodes,function(node){
_521(node,_530);
});
}},_516.duration,null,_516.easing);
if(_515){
for(var x in _515){
if(dojo.lang.isFunction(_515[x])){
anim.connect(x,anim,_515[x]);
}
}
}
return anim;
};
dojo.lfx.html._makeFadeable=function(_533){
var _534=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(_533)){
dojo.lang.forEach(_533,_534);
}else{
_534(_533);
}
};
dojo.lfx.html.fade=function(_536,_537,_538,_539,_53a){
_536=dojo.lfx.html._byId(_536);
var _53b={property:"opacity"};
if(!dj_undef("start",_537)){
_53b.start=_537.start;
}else{
_53b.start=function(){
return dojo.html.getOpacity(_536[0]);
};
}
if(!dj_undef("end",_537)){
_53b.end=_537.end;
}else{
dojo.raise("dojo.lfx.html.fade needs an end value");
}
var anim=dojo.lfx.propertyAnimation(_536,[_53b],_538,_539);
anim.connect("beforeBegin",function(){
dojo.lfx.html._makeFadeable(_536);
});
if(_53a){
anim.connect("onEnd",function(){
_53a(_536,anim);
});
}
return anim;
};
dojo.lfx.html.fadeIn=function(_53d,_53e,_53f,_540){
return dojo.lfx.html.fade(_53d,{end:1},_53e,_53f,_540);
};
dojo.lfx.html.fadeOut=function(_541,_542,_543,_544){
return dojo.lfx.html.fade(_541,{end:0},_542,_543,_544);
};
dojo.lfx.html.fadeShow=function(_545,_546,_547,_548){
_545=dojo.lfx.html._byId(_545);
dojo.lang.forEach(_545,function(node){
dojo.html.setOpacity(node,0);
});
var anim=dojo.lfx.html.fadeIn(_545,_546,_547,_548);
anim.connect("beforeBegin",function(){
if(dojo.lang.isArrayLike(_545)){
dojo.lang.forEach(_545,dojo.html.show);
}else{
dojo.html.show(_545);
}
});
return anim;
};
dojo.lfx.html.fadeHide=function(_54b,_54c,_54d,_54e){
var anim=dojo.lfx.html.fadeOut(_54b,_54c,_54d,function(){
if(dojo.lang.isArrayLike(_54b)){
dojo.lang.forEach(_54b,dojo.html.hide);
}else{
dojo.html.hide(_54b);
}
if(_54e){
_54e(_54b,anim);
}
});
return anim;
};
dojo.lfx.html.wipeIn=function(_550,_551,_552,_553){
_550=dojo.lfx.html._byId(_550);
var _554=[];
dojo.lang.forEach(_550,function(node){
var _556={};
var _557,_558,_559;
with(node.style){
_557=top;
_558=left;
_559=position;
top="-9999px";
left="-9999px";
position="absolute";
display="";
}
var _55a=dojo.html.getBorderBox(node).height;
with(node.style){
top=_557;
left=_558;
position=_559;
display="none";
}
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:1,end:function(){
return _55a;
}}},_551,_552);
anim.connect("beforeBegin",function(){
_556.overflow=node.style.overflow;
_556.height=node.style.height;
with(node.style){
overflow="hidden";
height="1px";
}
dojo.html.show(node);
});
anim.connect("onEnd",function(){
with(node.style){
overflow=_556.overflow;
height=_556.height;
}
if(_553){
_553(node,anim);
}
});
_554.push(anim);
});
return dojo.lfx.combine(_554);
};
dojo.lfx.html.wipeOut=function(_55c,_55d,_55e,_55f){
_55c=dojo.lfx.html._byId(_55c);
var _560=[];
dojo.lang.forEach(_55c,function(node){
var _562={};
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:function(){
return dojo.html.getContentBox(node).height;
},end:1}},_55d,_55e,{"beforeBegin":function(){
_562.overflow=node.style.overflow;
_562.height=node.style.height;
with(node.style){
overflow="hidden";
}
dojo.html.show(node);
},"onEnd":function(){
dojo.html.hide(node);
with(node.style){
overflow=_562.overflow;
height=_562.height;
}
if(_55f){
_55f(node,anim);
}
}});
_560.push(anim);
});
return dojo.lfx.combine(_560);
};
dojo.lfx.html.slideTo=function(_564,_565,_566,_567,_568){
_564=dojo.lfx.html._byId(_564);
var _569=[];
var _56a=dojo.html.getComputedStyle;
if(dojo.lang.isArray(_565)){
dojo.deprecated("dojo.lfx.html.slideTo(node, array)","use dojo.lfx.html.slideTo(node, {top: value, left: value});","0.5");
_565={top:_565[0],left:_565[1]};
}
dojo.lang.forEach(_564,function(node){
var top=null;
var left=null;
var init=(function(){
var _56f=node;
return function(){
var pos=_56a(_56f,"position");
top=(pos=="absolute"?node.offsetTop:parseInt(_56a(node,"top"))||0);
left=(pos=="absolute"?node.offsetLeft:parseInt(_56a(node,"left"))||0);
if(!dojo.lang.inArray(["absolute","relative"],pos)){
var ret=dojo.html.abs(_56f,true);
dojo.html.setStyleAttributes(_56f,"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:(_565.top||0)},"left":{start:left,end:(_565.left||0)}},_566,_567,{"beforeBegin":init});
if(_568){
anim.connect("onEnd",function(){
_568(_564,anim);
});
}
_569.push(anim);
});
return dojo.lfx.combine(_569);
};
dojo.lfx.html.slideBy=function(_573,_574,_575,_576,_577){
_573=dojo.lfx.html._byId(_573);
var _578=[];
var _579=dojo.html.getComputedStyle;
if(dojo.lang.isArray(_574)){
dojo.deprecated("dojo.lfx.html.slideBy(node, array)","use dojo.lfx.html.slideBy(node, {top: value, left: value});","0.5");
_574={top:_574[0],left:_574[1]};
}
dojo.lang.forEach(_573,function(node){
var top=null;
var left=null;
var init=(function(){
var _57e=node;
return function(){
var pos=_579(_57e,"position");
top=(pos=="absolute"?node.offsetTop:parseInt(_579(node,"top"))||0);
left=(pos=="absolute"?node.offsetLeft:parseInt(_579(node,"left"))||0);
if(!dojo.lang.inArray(["absolute","relative"],pos)){
var ret=dojo.html.abs(_57e,true);
dojo.html.setStyleAttributes(_57e,"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+(_574.top||0)},"left":{start:left,end:left+(_574.left||0)}},_575,_576).connect("beforeBegin",init);
if(_577){
anim.connect("onEnd",function(){
_577(_573,anim);
});
}
_578.push(anim);
});
return dojo.lfx.combine(_578);
};
dojo.lfx.html.explode=function(_582,_583,_584,_585,_586){
var h=dojo.html;
_582=dojo.byId(_582);
_583=dojo.byId(_583);
var _588=h.toCoordinateObject(_582,true);
var _589=document.createElement("div");
h.copyStyle(_589,_583);
if(_583.explodeClassName){
_589.className=_583.explodeClassName;
}
with(_589.style){
position="absolute";
display="none";
var _58a=h.getStyle(_582,"background-color");
backgroundColor=_58a?_58a.toLowerCase():"transparent";
backgroundColor=(backgroundColor=="transparent")?"rgb(221, 221, 221)":backgroundColor;
}
dojo.body().appendChild(_589);
with(_583.style){
visibility="hidden";
display="block";
}
var _58b=h.toCoordinateObject(_583,true);
with(_583.style){
display="none";
visibility="visible";
}
var _58c={opacity:{start:0.5,end:1}};
dojo.lang.forEach(["height","width","top","left"],function(type){
_58c[type]={start:_588[type],end:_58b[type]};
});
var anim=new dojo.lfx.propertyAnimation(_589,_58c,_584,_585,{"beforeBegin":function(){
h.setDisplay(_589,"block");
},"onEnd":function(){
h.setDisplay(_583,"block");
_589.parentNode.removeChild(_589);
}});
if(_586){
anim.connect("onEnd",function(){
_586(_583,anim);
});
}
return anim;
};
dojo.lfx.html.implode=function(_58f,end,_591,_592,_593){
var h=dojo.html;
_58f=dojo.byId(_58f);
end=dojo.byId(end);
var _595=dojo.html.toCoordinateObject(_58f,true);
var _596=dojo.html.toCoordinateObject(end,true);
var _597=document.createElement("div");
dojo.html.copyStyle(_597,_58f);
if(_58f.explodeClassName){
_597.className=_58f.explodeClassName;
}
dojo.html.setOpacity(_597,0.3);
with(_597.style){
position="absolute";
display="none";
backgroundColor=h.getStyle(_58f,"background-color").toLowerCase();
}
dojo.body().appendChild(_597);
var _598={opacity:{start:1,end:0.5}};
dojo.lang.forEach(["height","width","top","left"],function(type){
_598[type]={start:_595[type],end:_596[type]};
});
var anim=new dojo.lfx.propertyAnimation(_597,_598,_591,_592,{"beforeBegin":function(){
dojo.html.hide(_58f);
dojo.html.show(_597);
},"onEnd":function(){
_597.parentNode.removeChild(_597);
}});
if(_593){
anim.connect("onEnd",function(){
_593(_58f,anim);
});
}
return anim;
};
dojo.lfx.html.highlight=function(_59b,_59c,_59d,_59e,_59f){
_59b=dojo.lfx.html._byId(_59b);
var _5a0=[];
dojo.lang.forEach(_59b,function(node){
var _5a2=dojo.html.getBackgroundColor(node);
var bg=dojo.html.getStyle(node,"background-color").toLowerCase();
var _5a4=dojo.html.getStyle(node,"background-image");
var _5a5=(bg=="transparent"||bg=="rgba(0, 0, 0, 0)");
while(_5a2.length>3){
_5a2.pop();
}
var rgb=new dojo.gfx.color.Color(_59c);
var _5a7=new dojo.gfx.color.Color(_5a2);
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:rgb,end:_5a7}},_59d,_59e,{"beforeBegin":function(){
if(_5a4){
node.style.backgroundImage="none";
}
node.style.backgroundColor="rgb("+rgb.toRgb().join(",")+")";
},"onEnd":function(){
if(_5a4){
node.style.backgroundImage=_5a4;
}
if(_5a5){
node.style.backgroundColor="transparent";
}
if(_59f){
_59f(node,anim);
}
}});
_5a0.push(anim);
});
return dojo.lfx.combine(_5a0);
};
dojo.lfx.html.unhighlight=function(_5a9,_5aa,_5ab,_5ac,_5ad){
_5a9=dojo.lfx.html._byId(_5a9);
var _5ae=[];
dojo.lang.forEach(_5a9,function(node){
var _5b0=new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node));
var rgb=new dojo.gfx.color.Color(_5aa);
var _5b2=dojo.html.getStyle(node,"background-image");
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:_5b0,end:rgb}},_5ab,_5ac,{"beforeBegin":function(){
if(_5b2){
node.style.backgroundImage="none";
}
node.style.backgroundColor="rgb("+_5b0.toRgb().join(",")+")";
},"onEnd":function(){
if(_5ad){
_5ad(node,anim);
}
}});
_5ae.push(anim);
});
return dojo.lfx.combine(_5ae);
};
dojo.lang.mixin(dojo.lfx,dojo.lfx.html);
dojo.kwCompoundRequire({browser:["dojo.lfx.html"],dashboard:["dojo.lfx.html"]});
dojo.provide("dojo.lfx.*");
dojo.provide("dojo.lang.declare");
dojo.lang.declare=function(_5b4,_5b5,init,_5b7){
if((dojo.lang.isFunction(_5b7))||((!_5b7)&&(!dojo.lang.isFunction(init)))){
var temp=_5b7;
_5b7=init;
init=temp;
}
var _5b9=[];
if(dojo.lang.isArray(_5b5)){
_5b9=_5b5;
_5b5=_5b9.shift();
}
if(!init){
init=dojo.evalObjPath(_5b4,false);
if((init)&&(!dojo.lang.isFunction(init))){
init=null;
}
}
var ctor=dojo.lang.declare._makeConstructor();
var scp=(_5b5?_5b5.prototype:null);
if(scp){
scp.prototyping=true;
ctor.prototype=new _5b5();
scp.prototyping=false;
}
ctor.superclass=scp;
ctor.mixins=_5b9;
for(var i=0,l=_5b9.length;i<l;i++){
dojo.lang.extend(ctor,_5b9[i].prototype);
}
ctor.prototype.initializer=null;
ctor.prototype.declaredClass=_5b4;
if(dojo.lang.isArray(_5b7)){
dojo.lang.extend.apply(dojo.lang,[ctor].concat(_5b7));
}else{
dojo.lang.extend(ctor,(_5b7)||{});
}
dojo.lang.extend(ctor,dojo.lang.declare._common);
ctor.prototype.constructor=ctor;
ctor.prototype.initializer=(ctor.prototype.initializer)||(init)||(function(){
});
var _5be=dojo.parseObjPath(_5b4,null,true);
_5be.obj[_5be.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(_5c4,_5c5,args){
var _5c7,_5c8=this.___proto;
this.___proto=_5c4;
try{
_5c7=_5c4[_5c5].apply(this,(args||[]));
}
catch(e){
throw e;
}
finally{
this.___proto=_5c8;
}
return _5c7;
},_inherited:function(prop,args){
var p=this._getPropContext();
do{
if((!p.constructor)||(!p.constructor.superclass)){
return;
}
p=p.constructor.superclass;
}while(!(prop in p));
return (dojo.lang.isFunction(p[prop])?this._contextMethod(p,prop,args):p[prop]);
},inherited:function(prop,args){
dojo.deprecated("'inherited' method is dangerous, do not up-call! 'inherited' is slated for removal in 0.5; name your super class (or use superclass property) instead.","0.5");
this._inherited(prop,args);
}};
dojo.declare=dojo.lang.declare;
dojo.provide("dojo.dnd.DragAndDrop");
dojo.declare("dojo.dnd.DragSource",null,{type:"",onDragEnd:function(evt){
},onDragStart:function(evt){
},onSelected:function(evt){
},unregister:function(){
dojo.dnd.dragManager.unregisterDragSource(this);
},reregister:function(){
dojo.dnd.dragManager.registerDragSource(this);
}});
dojo.declare("dojo.dnd.DragObject",null,{type:"",register:function(){
var dm=dojo.dnd.dragManager;
if(dm["registerDragObject"]){
dm.registerDragObject(this);
}
},onDragStart:function(evt){
},onDragMove:function(evt){
},onDragOver:function(evt){
},onDragOut:function(evt){
},onDragEnd:function(evt){
},onDragLeave:dojo.lang.forward("onDragOut"),onDragEnter:dojo.lang.forward("onDragOver"),ondragout:dojo.lang.forward("onDragOut"),ondragover:dojo.lang.forward("onDragOver")});
dojo.declare("dojo.dnd.DropTarget",null,{acceptsType:function(type){
if(!dojo.lang.inArray(this.acceptedTypes,"*")){
if(!dojo.lang.inArray(this.acceptedTypes,type)){
return false;
}
}
return true;
},accepts:function(_5d8){
if(!dojo.lang.inArray(this.acceptedTypes,"*")){
for(var i=0;i<_5d8.length;i++){
if(!dojo.lang.inArray(this.acceptedTypes,_5d8[i].type)){
return false;
}
}
}
return true;
},unregister:function(){
dojo.dnd.dragManager.unregisterDropTarget(this);
},onDragOver:function(evt){
},onDragOut:function(evt){
},onDragMove:function(evt){
},onDropStart:function(evt){
},onDrop:function(evt){
},onDropEnd:function(){
}},function(){
this.acceptedTypes=[];
});
dojo.dnd.DragEvent=function(){
this.dragSource=null;
this.dragObject=null;
this.target=null;
this.eventStatus="success";
};
dojo.declare("dojo.dnd.DragManager",null,{selectedSources:[],dragObjects:[],dragSources:[],registerDragSource:function(_5df){
},dropTargets:[],registerDropTarget:function(_5e0){
},lastDragTarget:null,currentDragTarget:null,onKeyDown:function(){
},onMouseOut:function(){
},onMouseMove:function(){
},onMouseUp:function(){
}});
dojo.provide("dojo.event.topic");
dojo.event.topic=new function(){
this.topics={};
this.getTopic=function(_5e1){
if(!this.topics[_5e1]){
this.topics[_5e1]=new this.TopicImpl(_5e1);
}
return this.topics[_5e1];
};
this.registerPublisher=function(_5e2,obj,_5e4){
var _5e2=this.getTopic(_5e2);
_5e2.registerPublisher(obj,_5e4);
};
this.subscribe=function(_5e5,obj,_5e7){
var _5e5=this.getTopic(_5e5);
_5e5.subscribe(obj,_5e7);
};
this.unsubscribe=function(_5e8,obj,_5ea){
var _5e8=this.getTopic(_5e8);
_5e8.unsubscribe(obj,_5ea);
};
this.destroy=function(_5eb){
this.getTopic(_5eb).destroy();
delete this.topics[_5eb];
};
this.publishApply=function(_5ec,args){
var _5ec=this.getTopic(_5ec);
_5ec.sendMessage.apply(_5ec,args);
};
this.publish=function(_5ee,_5ef){
var _5ee=this.getTopic(_5ee);
var args=[];
for(var x=1;x<arguments.length;x++){
args.push(arguments[x]);
}
_5ee.sendMessage.apply(_5ee,args);
};
};
dojo.event.topic.TopicImpl=function(_5f2){
this.topicName=_5f2;
this.subscribe=function(_5f3,_5f4){
var tf=_5f4||_5f3;
var to=(!_5f4)?dj_global:_5f3;
return dojo.event.kwConnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
};
this.unsubscribe=function(_5f7,_5f8){
var tf=(!_5f8)?_5f7:_5f8;
var to=(!_5f8)?null:_5f7;
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(_5fb){
this._getJoinPoint().squelch=_5fb;
};
this.destroy=function(){
this._getJoinPoint().disconnect();
};
this.registerPublisher=function(_5fc,_5fd){
dojo.event.connect(_5fc,_5fd,this,"sendMessage");
};
this.sendMessage=function(_5fe){
};
};
dojo.kwCompoundRequire({common:["dojo.event.common","dojo.event.topic"],browser:["dojo.event.browser"],dashboard:["dojo.event.browser"]});
dojo.provide("dojo.event.*");
dojo.provide("dojo.dnd.HtmlDragManager");
dojo.declare("dojo.dnd.HtmlDragManager",dojo.dnd.DragManager,{disabled:false,nestedTargets:false,mouseDownTimer:null,dsCounter:0,dsPrefix:"dojoDragSource",dropTargetDimensions:[],currentDropTarget:null,previousDropTarget:null,_dragTriggered:false,selectedSources:[],dragObjects:[],dragSources:[],dropTargets:[],currentX:null,currentY:null,lastX:null,lastY:null,mouseDownX:null,mouseDownY:null,threshold:7,dropAcceptable:false,cancelEvent:function(e){
e.stopPropagation();
e.preventDefault();
},registerDragSource:function(ds){
if(ds["domNode"]){
var dp=this.dsPrefix;
var _602=dp+"Idx_"+(this.dsCounter++);
ds.dragSourceId=_602;
this.dragSources[_602]=ds;
ds.domNode.setAttribute(dp,_602);
if(dojo.render.html.ie){
dojo.event.browser.addListener(ds.domNode,"ondragstart",this.cancelEvent);
}
}
},unregisterDragSource:function(ds){
if(ds["domNode"]){
var dp=this.dsPrefix;
var _605=ds.dragSourceId;
delete ds.dragSourceId;
delete this.dragSources[_605];
ds.domNode.setAttribute(dp,null);
if(dojo.render.html.ie){
dojo.event.browser.removeListener(ds.domNode,"ondragstart",this.cancelEvent);
}
}
},registerDropTarget:function(dt){
this.dropTargets.push(dt);
},unregisterDropTarget:function(dt){
var _608=dojo.lang.find(this.dropTargets,dt,true);
if(_608>=0){
this.dropTargets.splice(_608,1);
}
},getDragSource:function(e){
var tn=e.target;
if(tn===dojo.body()){
return;
}
var ta=dojo.html.getAttribute(tn,this.dsPrefix);
while((!ta)&&(tn)){
tn=tn.parentNode;
if((!tn)||(tn===dojo.body())){
return;
}
ta=dojo.html.getAttribute(tn,this.dsPrefix);
}
return this.dragSources[ta];
},onKeyDown:function(e){
},onMouseDown:function(e){
if(this.disabled){
return;
}
if(dojo.render.html.ie){
if(e.button!=1){
return;
}
}else{
if(e.which!=1){
return;
}
}
var _60e=e.target.nodeType==dojo.html.TEXT_NODE?e.target.parentNode:e.target;
if(dojo.html.isTag(_60e,"button","textarea","input","select","option")){
return;
}
var ds=this.getDragSource(e);
if(!ds){
return;
}
if(!dojo.lang.inArray(this.selectedSources,ds)){
this.selectedSources.push(ds);
ds.onSelected();
}
this.mouseDownX=e.pageX;
this.mouseDownY=e.pageY;
e.preventDefault();
dojo.event.connect(document,"onmousemove",this,"onMouseMove");
},onMouseUp:function(e,_611){
if(this.selectedSources.length==0){
return;
}
this.mouseDownX=null;
this.mouseDownY=null;
this._dragTriggered=false;
e.dragSource=this.dragSource;
if((!e.shiftKey)&&(!e.ctrlKey)){
if(this.currentDropTarget){
this.currentDropTarget.onDropStart();
}
dojo.lang.forEach(this.dragObjects,function(_612){
var ret=null;
if(!_612){
return;
}
if(this.currentDropTarget){
e.dragObject=_612;
var ce=this.currentDropTarget.domNode.childNodes;
if(ce.length>0){
e.dropTarget=ce[0];
while(e.dropTarget==_612.domNode){
e.dropTarget=e.dropTarget.nextSibling;
}
}else{
e.dropTarget=this.currentDropTarget.domNode;
}
if(this.dropAcceptable){
ret=this.currentDropTarget.onDrop(e);
}else{
this.currentDropTarget.onDragOut(e);
}
}
e.dragStatus=this.dropAcceptable&&ret?"dropSuccess":"dropFailure";
dojo.lang.delayThese([function(){
try{
_612.dragSource.onDragEnd(e);
}
catch(err){
var _615={};
for(var i in e){
if(i=="type"){
_615.type="mouseup";
continue;
}
_615[i]=e[i];
}
_612.dragSource.onDragEnd(_615);
}
},function(){
_612.onDragEnd(e);
}]);
},this);
this.selectedSources=[];
this.dragObjects=[];
this.dragSource=null;
if(this.currentDropTarget){
this.currentDropTarget.onDropEnd();
}
}else{
}
dojo.event.disconnect(document,"onmousemove",this,"onMouseMove");
this.currentDropTarget=null;
},onScroll:function(){
for(var i=0;i<this.dragObjects.length;i++){
if(this.dragObjects[i].updateDragOffset){
this.dragObjects[i].updateDragOffset();
}
}
if(this.dragObjects.length){
this.cacheTargetLocations();
}
},_dragStartDistance:function(x,y){
if((!this.mouseDownX)||(!this.mouseDownX)){
return;
}
var dx=Math.abs(x-this.mouseDownX);
var dx2=dx*dx;
var dy=Math.abs(y-this.mouseDownY);
var dy2=dy*dy;
return parseInt(Math.sqrt(dx2+dy2),10);
},cacheTargetLocations:function(){
dojo.profile.start("cacheTargetLocations");
this.dropTargetDimensions=[];
dojo.lang.forEach(this.dropTargets,function(_61e){
var tn=_61e.domNode;
if(!tn||!_61e.accepts([this.dragSource])){
return;
}
var abs=dojo.html.getAbsolutePosition(tn,true);
var bb=dojo.html.getBorderBox(tn);
this.dropTargetDimensions.push([[abs.x,abs.y],[abs.x+bb.width,abs.y+bb.height],_61e]);
},this);
dojo.profile.end("cacheTargetLocations");
},onMouseMove:function(e){
if((dojo.render.html.ie)&&(e.button!=1)){
this.currentDropTarget=null;
this.onMouseUp(e,true);
return;
}
if((this.selectedSources.length)&&(!this.dragObjects.length)){
var dx;
var dy;
if(!this._dragTriggered){
this._dragTriggered=(this._dragStartDistance(e.pageX,e.pageY)>this.threshold);
if(!this._dragTriggered){
return;
}
dx=e.pageX-this.mouseDownX;
dy=e.pageY-this.mouseDownY;
}
this.dragSource=this.selectedSources[0];
dojo.lang.forEach(this.selectedSources,function(_625){
if(!_625){
return;
}
var tdo=_625.onDragStart(e);
if(tdo){
tdo.onDragStart(e);
tdo.dragOffset.y+=dy;
tdo.dragOffset.x+=dx;
tdo.dragSource=_625;
this.dragObjects.push(tdo);
}
},this);
this.previousDropTarget=null;
this.cacheTargetLocations();
}
dojo.lang.forEach(this.dragObjects,function(_627){
if(_627){
_627.onDragMove(e);
}
});
if(this.currentDropTarget){
var c=dojo.html.toCoordinateObject(this.currentDropTarget.domNode,true);
var dtp=[[c.x,c.y],[c.x+c.width,c.y+c.height]];
}
if((!this.nestedTargets)&&(dtp)&&(this.isInsideBox(e,dtp))){
if(this.dropAcceptable){
this.currentDropTarget.onDragMove(e,this.dragObjects);
}
}else{
var _62a=this.findBestTarget(e);
if(_62a.target===null){
if(this.currentDropTarget){
this.currentDropTarget.onDragOut(e);
this.previousDropTarget=this.currentDropTarget;
this.currentDropTarget=null;
}
this.dropAcceptable=false;
return;
}
if(this.currentDropTarget!==_62a.target){
if(this.currentDropTarget){
this.previousDropTarget=this.currentDropTarget;
this.currentDropTarget.onDragOut(e);
}
this.currentDropTarget=_62a.target;
e.dragObjects=this.dragObjects;
this.dropAcceptable=this.currentDropTarget.onDragOver(e);
}else{
if(this.dropAcceptable){
this.currentDropTarget.onDragMove(e,this.dragObjects);
}
}
}
},findBestTarget:function(e){
var _62c=this;
var _62d=new Object();
_62d.target=null;
_62d.points=null;
dojo.lang.every(this.dropTargetDimensions,function(_62e){
if(!_62c.isInsideBox(e,_62e)){
return true;
}
_62d.target=_62e[2];
_62d.points=_62e;
return Boolean(_62c.nestedTargets);
});
return _62d;
},isInsideBox:function(e,_630){
if((e.pageX>_630[0][0])&&(e.pageX<_630[1][0])&&(e.pageY>_630[0][1])&&(e.pageY<_630[1][1])){
return true;
}
return false;
},onMouseOver:function(e){
},onMouseOut:function(e){
}});
dojo.dnd.dragManager=new dojo.dnd.HtmlDragManager();
(function(){
var d=document;
var dm=dojo.dnd.dragManager;
dojo.event.connect(d,"onkeydown",dm,"onKeyDown");
dojo.event.connect(d,"onmouseover",dm,"onMouseOver");
dojo.event.connect(d,"onmouseout",dm,"onMouseOut");
dojo.event.connect(d,"onmousedown",dm,"onMouseDown");
dojo.event.connect(d,"onmouseup",dm,"onMouseUp");
dojo.event.connect(window,"onscroll",dm,"onScroll");
})();
dojo.kwCompoundRequire({common:["dojo.html.common","dojo.html.style"]});
dojo.provide("dojo.html.*");
dojo.provide("dojo.html.util");
dojo.html.getElementWindow=function(_635){
return dojo.html.getDocumentWindow(_635.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 _63d=dojo.html.getCursorPosition(e);
with(dojo.html){
var _63e=getAbsolutePosition(node,true);
var bb=getBorderBox(node);
var _640=_63e.x+(bb.width/2);
var _641=_63e.y+(bb.height/2);
}
with(dojo.html.gravity){
return ((_63d.x<_640?WEST:EAST)|(_63d.y<_641?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(_642,e){
_642=dojo.byId(_642);
var _644=dojo.html.getCursorPosition(e);
var bb=dojo.html.getBorderBox(_642);
var _646=dojo.html.getAbsolutePosition(_642,true,dojo.html.boxSizing.BORDER_BOX);
var top=_646.y;
var _648=top+bb.height;
var left=_646.x;
var _64a=left+bb.width;
return (_644.x>=left&&_644.x<=_64a&&_644.y>=top&&_644.y<=_648);
};
dojo.html.renderedTextContent=function(node){
node=dojo.byId(node);
var _64c="";
if(node==null){
return _64c;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
var _64e="unknown";
try{
_64e=dojo.html.getStyle(node.childNodes[i],"display");
}
catch(E){
}
switch(_64e){
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":
_64c+="\n";
_64c+=dojo.html.renderedTextContent(node.childNodes[i]);
_64c+="\n";
break;
case "none":
break;
default:
if(node.childNodes[i].tagName&&node.childNodes[i].tagName.toLowerCase()=="br"){
_64c+="\n";
}else{
_64c+=dojo.html.renderedTextContent(node.childNodes[i]);
}
break;
}
break;
case 3:
case 2:
case 4:
var text=node.childNodes[i].nodeValue;
var _650="unknown";
try{
_650=dojo.html.getStyle(node,"text-transform");
}
catch(E){
}
switch(_650){
case "capitalize":
var _651=text.split(" ");
for(var i=0;i<_651.length;i++){
_651[i]=_651[i].charAt(0).toUpperCase()+_651[i].substring(1);
}
text=_651.join(" ");
break;
case "uppercase":
text=text.toUpperCase();
break;
case "lowercase":
text=text.toLowerCase();
break;
default:
break;
}
switch(_650){
case "nowrap":
break;
case "pre-wrap":
break;
case "pre-line":
break;
case "pre":
break;
default:
text=text.replace(/\s+/," ");
if(/\s$/.test(_64c)){
text.replace(/^\s/,"");
}
break;
}
_64c+=text;
break;
default:
break;
}
}
return _64c;
};
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 _655="none";
if((/^<t[dh][\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table><tbody><tr>"+txt+"</tr></tbody></table>";
_655="cell";
}else{
if((/^<tr[\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table><tbody>"+txt+"</tbody></table>";
_655="row";
}else{
if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table>"+txt+"</table>";
_655="section";
}
}
}
tn.innerHTML=txt;
if(tn["normalize"]){
tn.normalize();
}
var _656=null;
switch(_655){
case "cell":
_656=tn.getElementsByTagName("tr")[0];
break;
case "row":
_656=tn.getElementsByTagName("tbody")[0];
break;
case "section":
_656=tn.getElementsByTagName("table")[0];
break;
default:
_656=tn;
break;
}
var _657=[];
for(var x=0;x<_656.childNodes.length;x++){
_657.push(_656.childNodes[x].cloneNode(true));
}
tn.style.display="none";
dojo.html.destroyNode(tn);
return _657;
};
dojo.html.placeOnScreen=function(node,_65a,_65b,_65c,_65d,_65e,_65f){
if(_65a instanceof Array||typeof _65a=="array"){
_65f=_65e;
_65e=_65d;
_65d=_65c;
_65c=_65b;
_65b=_65a[1];
_65a=_65a[0];
}
if(_65e instanceof String||typeof _65e=="string"){
_65e=_65e.split(",");
}
if(!isNaN(_65c)){
_65c=[Number(_65c),Number(_65c)];
}else{
if(!(_65c instanceof Array||typeof _65c=="array")){
_65c=[0,0];
}
}
var _660=dojo.html.getScroll().offset;
var view=dojo.html.getViewport();
node=dojo.byId(node);
var _662=node.style.display;
node.style.display="";
var bb=dojo.html.getBorderBox(node);
var w=bb.width;
var h=bb.height;
node.style.display=_662;
if(!(_65e instanceof Array||typeof _65e=="array")){
_65e=["TL"];
}
var _666,_667,_668=Infinity,_669;
for(var _66a=0;_66a<_65e.length;++_66a){
var _66b=_65e[_66a];
var _66c=true;
var tryX=_65a-(_66b.charAt(1)=="L"?0:w)+_65c[0]*(_66b.charAt(1)=="L"?1:-1);
var tryY=_65b-(_66b.charAt(0)=="T"?0:h)+_65c[1]*(_66b.charAt(0)=="T"?1:-1);
if(_65d){
tryX-=_660.x;
tryY-=_660.y;
}
if(tryX<0){
tryX=0;
_66c=false;
}
if(tryY<0){
tryY=0;
_66c=false;
}
var x=tryX+w;
if(x>view.width){
x=view.width-w;
_66c=false;
}else{
x=tryX;
}
x=Math.max(_65c[0],x)+_660.x;
var y=tryY+h;
if(y>view.height){
y=view.height-h;
_66c=false;
}else{
y=tryY;
}
y=Math.max(_65c[1],y)+_660.y;
if(_66c){
_666=x;
_667=y;
_668=0;
_669=_66b;
break;
}else{
var dist=Math.pow(x-tryX-_660.x,2)+Math.pow(y-tryY-_660.y,2);
if(_668>dist){
_668=dist;
_666=x;
_667=y;
_669=_66b;
}
}
}
if(!_65f){
node.style.left=_666+"px";
node.style.top=_667+"px";
}
return {left:_666,top:_667,x:_666,y:_667,dist:_668,corner:_669};
};
dojo.html.placeOnScreenPoint=function(node,_673,_674,_675,_676){
dojo.deprecated("dojo.html.placeOnScreenPoint","use dojo.html.placeOnScreen() instead","0.5");
return dojo.html.placeOnScreen(node,_673,_674,_675,_676,["TL","TR","BL","BR"]);
};
dojo.html.placeOnScreenAroundElement=function(node,_678,_679,_67a,_67b,_67c){
var best,_67e=Infinity;
_678=dojo.byId(_678);
var _67f=_678.style.display;
_678.style.display="";
var mb=dojo.html.getElementBox(_678,_67a);
var _681=mb.width;
var _682=mb.height;
var _683=dojo.html.getAbsolutePosition(_678,true,_67a);
_678.style.display=_67f;
for(var _684 in _67b){
var pos,_686,_687;
var _688=_67b[_684];
_686=_683.x+(_684.charAt(1)=="L"?0:_681);
_687=_683.y+(_684.charAt(0)=="T"?0:_682);
pos=dojo.html.placeOnScreen(node,_686,_687,_679,true,_688,true);
if(pos.dist==0){
best=pos;
break;
}else{
if(_67e>pos.dist){
_67e=pos.dist;
best=pos;
}
}
}
if(!_67c){
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 _68a=node.parentNode;
var _68b=_68a.scrollTop+dojo.html.getBorderBox(_68a).height;
var _68c=node.offsetTop+dojo.html.getMarginBox(node).height;
if(_68b<_68c){
_68a.scrollTop+=(_68c-_68b);
}else{
if(_68a.scrollTop>node.offsetTop){
_68a.scrollTop-=(_68a.scrollTop-node.offsetTop);
}
}
}
}
};
dojo.provide("dojo.html.selection");
dojo.html.selectionType={NONE:0,TEXT:1,CONTROL:2};
dojo.html.clearSelection=function(){
var _68d=dojo.global();
var _68e=dojo.doc();
try{
if(_68d["getSelection"]){
if(dojo.render.html.safari){
_68d.getSelection().collapse();
}else{
_68d.getSelection().removeAllRanges();
}
}else{
if(_68e.selection){
if(_68e.selection.empty){
_68e.selection.empty();
}else{
if(_68e.selection.clear){
_68e.selection.clear();
}
}
}
}
return true;
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.html.disableSelection=function(_68f){
_68f=dojo.byId(_68f)||dojo.body();
var h=dojo.render.html;
if(h.mozilla){
_68f.style.MozUserSelect="none";
}else{
if(h.safari){
_68f.style.KhtmlUserSelect="none";
}else{
if(h.ie){
_68f.unselectable="on";
}else{
return false;
}
}
}
return true;
};
dojo.html.enableSelection=function(_691){
_691=dojo.byId(_691)||dojo.body();
var h=dojo.render.html;
if(h.mozilla){
_691.style.MozUserSelect="";
}else{
if(h.safari){
_691.style.KhtmlUserSelect="";
}else{
if(h.ie){
_691.unselectable="off";
}else{
return false;
}
}
}
return true;
};
dojo.html.selectElement=function(_693){
dojo.deprecated("dojo.html.selectElement","replaced by dojo.html.selection.selectElementChildren",0.5);
};
dojo.html.selectInputText=function(_694){
var _695=dojo.global();
var _696=dojo.doc();
_694=dojo.byId(_694);
if(_696["selection"]&&dojo.body()["createTextRange"]){
var _697=_694.createTextRange();
_697.moveStart("character",0);
_697.moveEnd("character",_694.value.length);
_697.select();
}else{
if(_695["getSelection"]){
var _698=_695.getSelection();
_694.setSelectionRange(0,_694.value.length);
}
}
_694.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 _699=dojo.html.selectionType.TEXT;
var oSel;
try{
oSel=dojo.global().getSelection();
}
catch(e){
}
if(oSel&&oSel.rangeCount==1){
var _69b=oSel.getRangeAt(0);
if(_69b.startContainer==_69b.endContainer&&(_69b.endOffset-_69b.startOffset)==1&&_69b.startContainer.nodeType!=dojo.dom.TEXT_NODE){
_699=dojo.html.selectionType.CONTROL;
}
}
return _699;
}
},isCollapsed:function(){
var _69c=dojo.global();
var _69d=dojo.doc();
if(_69d["selection"]){
return _69d.selection.createRange().text=="";
}else{
if(_69c["getSelection"]){
var _69e=_69c.getSelection();
if(dojo.lang.isString(_69e)){
return _69e=="";
}else{
return _69e.isCollapsed||_69e.toString()=="";
}
}
}
},getSelectedElement:function(){
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
if(dojo.doc()["selection"]){
var _69f=dojo.doc().selection.createRange();
if(_69f&&_69f.item){
return dojo.doc().selection.createRange().item(0);
}
}else{
var _6a0=dojo.global().getSelection();
return _6a0.anchorNode.childNodes[_6a0.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 _6a2=dojo.global().getSelection();
if(_6a2){
var node=_6a2.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 _6a4=dojo.global().getSelection();
if(_6a4){
return _6a4.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 _6a5=dojo.global().getSelection();
if(_6a5&&_6a5.rangeCount){
var frag=_6a5.getRangeAt(0).cloneContents();
var div=document.createElement("div");
div.appendChild(frag);
return div.innerHTML;
}
return null;
}
},hasAncestorElement:function(_6a8){
return (dojo.html.selection.getAncestorElement.apply(this,arguments)!=null);
},getAncestorElement:function(_6a9){
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(_6ae){
var _6af=dojo.global();
var _6b0=dojo.doc();
_6ae=dojo.byId(_6ae);
if(_6b0.selection&&dojo.body().createTextRange){
try{
var _6b1=dojo.body().createControlRange();
_6b1.addElement(_6ae);
_6b1.select();
}
catch(e){
dojo.html.selection.selectElementChildren(_6ae);
}
}else{
if(_6af["getSelection"]){
var _6b2=_6af.getSelection();
if(_6b2["removeAllRanges"]){
var _6b1=_6b0.createRange();
_6b1.selectNode(_6ae);
_6b2.removeAllRanges();
_6b2.addRange(_6b1);
}
}
}
},selectElementChildren:function(_6b3){
var _6b4=dojo.global();
var _6b5=dojo.doc();
_6b3=dojo.byId(_6b3);
if(_6b5.selection&&dojo.body().createTextRange){
var _6b6=dojo.body().createTextRange();
_6b6.moveToElementText(_6b3);
_6b6.select();
}else{
if(_6b4["getSelection"]){
var _6b7=_6b4.getSelection();
if(_6b7["setBaseAndExtent"]){
_6b7.setBaseAndExtent(_6b3,0,_6b3,_6b3.innerText.length-1);
}else{
if(_6b7["selectAllChildren"]){
_6b7.selectAllChildren(_6b3);
}
}
}
}
},getBookmark:function(){
var _6b8;
var _6b9=dojo.doc();
if(_6b9["selection"]){
var _6ba=_6b9.selection.createRange();
_6b8=_6ba.getBookmark();
}else{
var _6bb;
try{
_6bb=dojo.global().getSelection();
}
catch(e){
}
if(_6bb){
var _6ba=_6bb.getRangeAt(0);
_6b8=_6ba.cloneRange();
}else{
dojo.debug("No idea how to store the current selection for this browser!");
}
}
return _6b8;
},moveToBookmark:function(_6bc){
var _6bd=dojo.doc();
if(_6bd["selection"]){
var _6be=_6bd.selection.createRange();
_6be.moveToBookmark(_6bc);
_6be.select();
}else{
var _6bf;
try{
_6bf=dojo.global().getSelection();
}
catch(e){
}
if(_6bf&&_6bf["removeAllRanges"]){
_6bf.removeAllRanges();
_6bf.addRange(_6bc);
}else{
dojo.debug("No idea how to restore selection for this browser!");
}
}
},collapse:function(_6c0){
if(dojo.global()["getSelection"]){
var _6c1=dojo.global().getSelection();
if(_6c1.removeAllRanges){
if(_6c0){
_6c1.collapseToStart();
}else{
_6c1.collapseToEnd();
}
}else{
dojo.global().getSelection().collapse(_6c0);
}
}else{
if(dojo.doc().selection){
var _6c2=dojo.doc().selection.createRange();
_6c2.collapse(_6c0);
_6c2.select();
}
}
},remove:function(){
if(dojo.doc().selection){
var _6c3=dojo.doc().selection;
if(_6c3.type.toUpperCase()!="NONE"){
_6c3.clear();
}
return _6c3;
}else{
var _6c3=dojo.global().getSelection();
for(var i=0;i<_6c3.rangeCount;i++){
_6c3.getRangeAt(i).deleteContents();
}
return _6c3;
}
}});
dojo.provide("dojo.html.iframe");
dojo.html.iframeContentWindow=function(_6c5){
var win=dojo.html.getDocumentWindow(dojo.html.iframeContentDocument(_6c5))||dojo.html.iframeContentDocument(_6c5).__parent__||(_6c5.name&&document.frames[_6c5.name])||null;
return win;
};
dojo.html.iframeContentDocument=function(_6c7){
var doc=_6c7.contentDocument||((_6c7.contentWindow)&&(_6c7.contentWindow.document))||((_6c7.name)&&(document.frames[_6c7.name])&&(document.frames[_6c7.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 _6cb=dojo.html.getMarginBox(this.domNode);
if(_6cb.width==0||_6cb.height==0){
dojo.lang.setTimeout(this,this.onResized,100);
return;
}
this.iframe.style.width=_6cb.width+"px";
this.iframe.style.height=_6cb.height+"px";
}
},size:function(node){
if(!this.iframe){
return;
}
var _6cd=dojo.html.toCoordinateObject(node,true,dojo.html.boxSizing.BORDER_BOX);
with(this.iframe.style){
width=_6cd.width+"px";
height=_6cd.height+"px";
left=_6cd.left+"px";
top=_6cd.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.dnd.HtmlDragAndDrop");
dojo.declare("dojo.dnd.HtmlDragSource",dojo.dnd.DragSource,{dragClass:"",onDragStart:function(){
var _6cf=new dojo.dnd.HtmlDragObject(this.dragObject,this.type);
if(this.dragClass){
_6cf.dragClass=this.dragClass;
}
if(this.constrainToContainer){
_6cf.constrainTo(this.constrainingContainer||this.domNode.parentNode);
}
return _6cf;
},setDragHandle:function(node){
node=dojo.byId(node);
dojo.dnd.dragManager.unregisterDragSource(this);
this.domNode=node;
dojo.dnd.dragManager.registerDragSource(this);
},setDragTarget:function(node){
this.dragObject=node;
},constrainTo:function(_6d2){
this.constrainToContainer=true;
if(_6d2){
this.constrainingContainer=_6d2;
}
},onSelected:function(){
for(var i=0;i<this.dragObjects.length;i++){
dojo.dnd.dragManager.selectedSources.push(new dojo.dnd.HtmlDragSource(this.dragObjects[i]));
}
},addDragObjects:function(el){
for(var i=0;i<arguments.length;i++){
this.dragObjects.push(dojo.byId(arguments[i]));
}
}},function(node,type){
node=dojo.byId(node);
this.dragObjects=[];
this.constrainToContainer=false;
if(node){
this.domNode=node;
this.dragObject=node;
this.type=(type)||(this.domNode.nodeName.toLowerCase());
dojo.dnd.DragSource.prototype.reregister.call(this);
}
});
dojo.declare("dojo.dnd.HtmlDragObject",dojo.dnd.DragObject,{dragClass:"",opacity:0.5,createIframe:true,disableX:false,disableY:false,createDragNode:function(){
var node=this.domNode.cloneNode(true);
if(this.dragClass){
dojo.html.addClass(node,this.dragClass);
}
if(this.opacity<1){
dojo.html.setOpacity(node,this.opacity);
}
var ltn=node.tagName.toLowerCase();
var isTr=(ltn=="tr");
if((isTr)||(ltn=="tbody")){
var doc=this.domNode.ownerDocument;
var _6dc=doc.createElement("table");
if(isTr){
var _6dd=doc.createElement("tbody");
_6dc.appendChild(_6dd);
_6dd.appendChild(node);
}else{
_6dc.appendChild(node);
}
var _6de=((isTr)?this.domNode:this.domNode.firstChild);
var _6df=((isTr)?node:node.firstChild);
var _6e0=_6de.childNodes;
var _6e1=_6df.childNodes;
for(var i=0;i<_6e0.length;i++){
if((_6e1[i])&&(_6e1[i].style)){
_6e1[i].style.width=dojo.html.getContentBox(_6e0[i]).width+"px";
}
}
node=_6dc;
}
if((dojo.render.html.ie55||dojo.render.html.ie60)&&this.createIframe){
with(node.style){
top="0px";
left="0px";
}
var _6e3=document.createElement("div");
_6e3.appendChild(node);
this.bgIframe=new dojo.html.BackgroundIframe(_6e3);
_6e3.appendChild(this.bgIframe.iframe);
node=_6e3;
}
node.style.zIndex=999;
return node;
},onDragStart:function(e){
dojo.html.clearSelection();
this.scrollOffset=dojo.html.getScroll().offset;
this.dragStartPosition=dojo.html.getAbsolutePosition(this.domNode,true);
this.dragOffset={y:this.dragStartPosition.y-e.pageY,x:this.dragStartPosition.x-e.pageX};
this.dragClone=this.createDragNode();
this.containingBlockPosition=this.domNode.offsetParent?dojo.html.getAbsolutePosition(this.domNode.offsetParent,true):{x:0,y:0};
if(this.constrainToContainer){
this.constraints=this.getConstraints();
}
with(this.dragClone.style){
position="absolute";
top=this.dragOffset.y+e.pageY+"px";
left=this.dragOffset.x+e.pageX+"px";
}
dojo.body().appendChild(this.dragClone);
dojo.event.topic.publish("dragStart",{source:this});
},getConstraints:function(){
if(this.constrainingContainer.nodeName.toLowerCase()=="body"){
var _6e5=dojo.html.getViewport();
var _6e6=_6e5.width;
var _6e7=_6e5.height;
var _6e8=dojo.html.getScroll().offset;
var x=_6e8.x;
var y=_6e8.y;
}else{
var _6eb=dojo.html.getContentBox(this.constrainingContainer);
_6e6=_6eb.width;
_6e7=_6eb.height;
x=this.containingBlockPosition.x+dojo.html.getPixelValue(this.constrainingContainer,"padding-left",true)+dojo.html.getBorderExtent(this.constrainingContainer,"left");
y=this.containingBlockPosition.y+dojo.html.getPixelValue(this.constrainingContainer,"padding-top",true)+dojo.html.getBorderExtent(this.constrainingContainer,"top");
}
var mb=dojo.html.getMarginBox(this.domNode);
return {minX:x,minY:y,maxX:x+_6e6-mb.width,maxY:y+_6e7-mb.height};
},updateDragOffset:function(){
var _6ed=dojo.html.getScroll().offset;
if(_6ed.y!=this.scrollOffset.y){
var diff=_6ed.y-this.scrollOffset.y;
this.dragOffset.y+=diff;
this.scrollOffset.y=_6ed.y;
}
if(_6ed.x!=this.scrollOffset.x){
var diff=_6ed.x-this.scrollOffset.x;
this.dragOffset.x+=diff;
this.scrollOffset.x=_6ed.x;
}
},onDragMove:function(e){
this.updateDragOffset();
var x=this.dragOffset.x+e.pageX;
var y=this.dragOffset.y+e.pageY;
if(this.constrainToContainer){
if(x<this.constraints.minX){
x=this.constraints.minX;
}
if(y<this.constraints.minY){
y=this.constraints.minY;
}
if(x>this.constraints.maxX){
x=this.constraints.maxX;
}
if(y>this.constraints.maxY){
y=this.constraints.maxY;
}
}
this.setAbsolutePosition(x,y);
dojo.event.topic.publish("dragMove",{source:this});
},setAbsolutePosition:function(x,y){
if(!this.disableY){
this.dragClone.style.top=y+"px";
}
if(!this.disableX){
this.dragClone.style.left=x+"px";
}
},onDragEnd:function(e){
switch(e.dragStatus){
case "dropSuccess":
dojo.html.removeNode(this.dragClone);
this.dragClone=null;
break;
case "dropFailure":
var _6f5=dojo.html.getAbsolutePosition(this.dragClone,true);
var _6f6={left:this.dragStartPosition.x+1,top:this.dragStartPosition.y+1};
var anim=dojo.lfx.slideTo(this.dragClone,_6f6,300);
var _6f8=this;
dojo.event.connect(anim,"onEnd",function(e){
dojo.html.removeNode(_6f8.dragClone);
_6f8.dragClone=null;
});
anim.play();
break;
}
dojo.event.topic.publish("dragEnd",{source:this});
},constrainTo:function(_6fa){
this.constrainToContainer=true;
if(_6fa){
this.constrainingContainer=_6fa;
}else{
this.constrainingContainer=this.domNode.parentNode;
}
}},function(node,type){
this.domNode=dojo.byId(node);
this.type=type;
this.constrainToContainer=false;
this.dragSource=null;
dojo.dnd.DragObject.prototype.register.call(this);
});
dojo.declare("dojo.dnd.HtmlDropTarget",dojo.dnd.DropTarget,{vertical:false,onDragOver:function(e){
if(!this.accepts(e.dragObjects)){
return false;
}
this.childBoxes=[];
for(var i=0,_6ff;i<this.domNode.childNodes.length;i++){
_6ff=this.domNode.childNodes[i];
if(_6ff.nodeType!=dojo.html.ELEMENT_NODE){
continue;
}
var pos=dojo.html.getAbsolutePosition(_6ff,true);
var _701=dojo.html.getBorderBox(_6ff);
this.childBoxes.push({top:pos.y,bottom:pos.y+_701.height,left:pos.x,right:pos.x+_701.width,height:_701.height,width:_701.width,node:_6ff});
}
return true;
},_getNodeUnderMouse:function(e){
for(var i=0,_704;i<this.childBoxes.length;i++){
with(this.childBoxes[i]){
if(e.pageX>=left&&e.pageX<=right&&e.pageY>=top&&e.pageY<=bottom){
return i;
}
}
}
return -1;
},createDropIndicator:function(){
this.dropIndicator=document.createElement("div");
with(this.dropIndicator.style){
position="absolute";
zIndex=999;
if(this.vertical){
borderLeftWidth="1px";
borderLeftColor="black";
borderLeftStyle="solid";
height=dojo.html.getBorderBox(this.domNode).height+"px";
top=dojo.html.getAbsolutePosition(this.domNode,true).y+"px";
}else{
borderTopWidth="1px";
borderTopColor="black";
borderTopStyle="solid";
width=dojo.html.getBorderBox(this.domNode).width+"px";
left=dojo.html.getAbsolutePosition(this.domNode,true).x+"px";
}
}
},onDragMove:function(e,_706){
var i=this._getNodeUnderMouse(e);
if(!this.dropIndicator){
this.createDropIndicator();
}
var _708=this.vertical?dojo.html.gravity.WEST:dojo.html.gravity.NORTH;
var hide=false;
if(i<0){
if(this.childBoxes.length){
var _70a=(dojo.html.gravity(this.childBoxes[0].node,e)&_708);
if(_70a){
hide=true;
}
}else{
var _70a=true;
}
}else{
var _70b=this.childBoxes[i];
var _70a=(dojo.html.gravity(_70b.node,e)&_708);
if(_70b.node===_706[0].dragSource.domNode){
hide=true;
}else{
var _70c=_70a?(i>0?this.childBoxes[i-1]:_70b):(i<this.childBoxes.length-1?this.childBoxes[i+1]:_70b);
if(_70c.node===_706[0].dragSource.domNode){
hide=true;
}
}
}
if(hide){
this.dropIndicator.style.display="none";
return;
}else{
this.dropIndicator.style.display="";
}
this.placeIndicator(e,_706,i,_70a);
if(!dojo.html.hasParent(this.dropIndicator)){
dojo.body().appendChild(this.dropIndicator);
}
},placeIndicator:function(e,_70e,_70f,_710){
var _711=this.vertical?"left":"top";
var _712;
if(_70f<0){
if(this.childBoxes.length){
_712=_710?this.childBoxes[0]:this.childBoxes[this.childBoxes.length-1];
}else{
this.dropIndicator.style[_711]=dojo.html.getAbsolutePosition(this.domNode,true)[this.vertical?"x":"y"]+"px";
}
}else{
_712=this.childBoxes[_70f];
}
if(_712){
this.dropIndicator.style[_711]=(_710?_712[_711]:_712[this.vertical?"right":"bottom"])+"px";
if(this.vertical){
this.dropIndicator.style.height=_712.height+"px";
this.dropIndicator.style.top=_712.top+"px";
}else{
this.dropIndicator.style.width=_712.width+"px";
this.dropIndicator.style.left=_712.left+"px";
}
}
},onDragOut:function(e){
if(this.dropIndicator){
dojo.html.removeNode(this.dropIndicator);
delete this.dropIndicator;
}
},onDrop:function(e){
this.onDragOut(e);
var i=this._getNodeUnderMouse(e);
var _716=this.vertical?dojo.html.gravity.WEST:dojo.html.gravity.NORTH;
if(i<0){
if(this.childBoxes.length){
if(dojo.html.gravity(this.childBoxes[0].node,e)&_716){
return this.insert(e,this.childBoxes[0].node,"before");
}else{
return this.insert(e,this.childBoxes[this.childBoxes.length-1].node,"after");
}
}
return this.insert(e,this.domNode,"append");
}
var _717=this.childBoxes[i];
if(dojo.html.gravity(_717.node,e)&_716){
return this.insert(e,_717.node,"before");
}else{
return this.insert(e,_717.node,"after");
}
},insert:function(e,_719,_71a){
var node=e.dragObject.domNode;
if(_71a=="before"){
return dojo.html.insertBefore(node,_719);
}else{
if(_71a=="after"){
return dojo.html.insertAfter(node,_719);
}else{
if(_71a=="append"){
_719.appendChild(node);
return true;
}
}
}
return false;
}},function(node,_71d){
if(arguments.length==0){
return;
}
this.domNode=dojo.byId(node);
dojo.dnd.DropTarget.call(this);
if(_71d&&dojo.lang.isString(_71d)){
_71d=[_71d];
}
this.acceptedTypes=_71d||[];
dojo.dnd.dragManager.registerDropTarget(this);
});
dojo.kwCompoundRequire({common:["dojo.dnd.DragAndDrop"],browser:["dojo.dnd.HtmlDragAndDrop"],dashboard:["dojo.dnd.HtmlDragAndDrop"]});
dojo.provide("dojo.dnd.*");
dojo.provide("dojo.dnd.HtmlDragMove");
dojo.declare("dojo.dnd.HtmlDragMoveSource",dojo.dnd.HtmlDragSource,{onDragStart:function(){
var _71e=new dojo.dnd.HtmlDragMoveObject(this.dragObject,this.type);
if(this.constrainToContainer){
_71e.constrainTo(this.constrainingContainer);
}
return _71e;
},onSelected:function(){
for(var i=0;i<this.dragObjects.length;i++){
dojo.dnd.dragManager.selectedSources.push(new dojo.dnd.HtmlDragMoveSource(this.dragObjects[i]));
}
}});
dojo.declare("dojo.dnd.HtmlDragMoveObject",dojo.dnd.HtmlDragObject,{onDragStart:function(e){
dojo.html.clearSelection();
this.dragClone=this.domNode;
if(dojo.html.getComputedStyle(this.domNode,"position")!="absolute"){
this.domNode.style.position="relative";
}
var left=parseInt(dojo.html.getComputedStyle(this.domNode,"left"));
var top=parseInt(dojo.html.getComputedStyle(this.domNode,"top"));
this.dragStartPosition={x:isNaN(left)?0:left,y:isNaN(top)?0:top};
this.scrollOffset=dojo.html.getScroll().offset;
this.dragOffset={y:this.dragStartPosition.y-e.pageY,x:this.dragStartPosition.x-e.pageX};
this.containingBlockPosition={x:0,y:0};
if(this.constrainToContainer){
this.constraints=this.getConstraints();
}
dojo.event.connect(this.domNode,"onclick",this,"_squelchOnClick");
},onDragEnd:function(e){
},setAbsolutePosition:function(x,y){
if(!this.disableY){
this.domNode.style.top=y+"px";
}
if(!this.disableX){
this.domNode.style.left=x+"px";
}
},_squelchOnClick:function(e){
dojo.event.browser.stopEvent(e);
dojo.event.disconnect(this.domNode,"onclick",this,"_squelchOnClick");
}});
dojo.provide("dojo.widget.html.layout");
dojo.widget.html.layout=function(_727,_728,_729){
dojo.html.addClass(_727,"dojoLayoutContainer");
_728=dojo.lang.filter(_728,function(_72a,idx){
_72a.idx=idx;
return dojo.lang.inArray(["top","bottom","left","right","client","flood"],_72a.layoutAlign);
});
if(_729&&_729!="none"){
var rank=function(_72d){
switch(_72d.layoutAlign){
case "flood":
return 1;
case "left":
case "right":
return (_729=="left-right")?2:3;
case "top":
case "bottom":
return (_729=="left-right")?3:2;
default:
return 4;
}
};
_728.sort(function(a,b){
return (rank(a)-rank(b))||(a.idx-b.idx);
});
}
var f={top:dojo.html.getPixelValue(_727,"padding-top",true),left:dojo.html.getPixelValue(_727,"padding-left",true)};
dojo.lang.mixin(f,dojo.html.getContentBox(_727));
dojo.lang.forEach(_728,function(_731){
var elm=_731.domNode;
var pos=_731.layoutAlign;
with(elm.style){
left=f.left+"px";
top=f.top+"px";
bottom="auto";
right="auto";
}
dojo.html.addClass(elm,"dojoAlign"+dojo.string.capitalize(pos));
if((pos=="top")||(pos=="bottom")){
dojo.html.setMarginBox(elm,{width:f.width});
var h=dojo.html.getMarginBox(elm).height;
f.height-=h;
if(pos=="top"){
f.top+=h;
}else{
elm.style.top=f.top+f.height+"px";
}
if(_731.onResized){
_731.onResized();
}
}else{
if(pos=="left"||pos=="right"){
var w=dojo.html.getMarginBox(elm).width;
if(_731.resizeTo){
_731.resizeTo(w,f.height);
}else{
dojo.html.setMarginBox(elm,{width:w,height:f.height});
}
f.width-=w;
if(pos=="left"){
f.left+=w;
}else{
elm.style.left=f.left+f.width+"px";
}
}else{
if(pos=="flood"||pos=="client"){
if(_731.resizeTo){
_731.resizeTo(f.width,f.height);
}else{
dojo.html.setMarginBox(elm,{width:f.width,height:f.height});
}
}
}
}
});
};
dojo.html.insertCssText(".dojoLayoutContainer{ position: relative; display: block; overflow: hidden; }\n"+"body .dojoAlignTop, body .dojoAlignBottom, body .dojoAlignLeft, body .dojoAlignRight { position: absolute; overflow: hidden; }\n"+"body .dojoAlignClient { position: absolute }\n"+".dojoAlignClient { overflow: auto; }\n");
dojo.provide("dojo.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 _739=getTagName(node);
if(!_739){
return "";
}
if((dojo.widget)&&(dojo.widget.tags[_739])){
return _739;
}
var p=_739.indexOf(":");
if(p>=0){
return _739;
}
if(_739.substr(0,5)=="dojo:"){
return _739;
}
if(dojo.render.html.capable&&dojo.render.html.ie&&node.scopeName!="HTML"){
return node.scopeName.toLowerCase()+":"+_739;
}
if(_739.substr(0,4)=="dojo"){
return "dojo:"+_739.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 _73c=node.className||node.getAttribute("class");
if((_73c)&&(_73c.indexOf)&&(_73c.indexOf("dojo-")!=-1)){
var _73d=_73c.split(" ");
for(var x=0,c=_73d.length;x<c;x++){
if(_73d[x].slice(0,5)=="dojo-"){
return "dojo:"+_73d[x].substr(5).toLowerCase();
}
}
}
}
return "";
}
this.parseElement=function(node,_741,_742,_743){
var _744=getTagName(node);
if(isIE&&_744.indexOf("/")==0){
return null;
}
try{
var attr=node.getAttribute("parseWidgets");
if(attr&&attr.toLowerCase()=="false"){
return {};
}
}
catch(e){
}
var _746=true;
if(_742){
var _747=getDojoTagName(node);
_744=_747||_744;
_746=Boolean(_747);
}
var _748={};
_748[_744]=[];
var pos=_744.indexOf(":");
if(pos>0){
var ns=_744.substring(0,pos);
_748["ns"]=ns;
if((dojo.ns)&&(!dojo.ns.allow(ns))){
_746=false;
}
}
if(_746){
var _74b=this.parseAttributes(node);
for(var attr in _74b){
if((!_748[_744][attr])||(typeof _748[_744][attr]!="array")){
_748[_744][attr]=[];
}
_748[_744][attr].push(_74b[attr]);
}
_748[_744].nodeRef=node;
_748.tagName=_744;
_748.index=_743||0;
}
var _74c=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(!_748[ctn]){
_748[ctn]=[];
}
_748[ctn].push(this.parseElement(tcn,true,_742,_74c));
if((tcn.childNodes.length==1)&&(tcn.childNodes.item(0).nodeType==dojo.dom.TEXT_NODE)){
_748[ctn][_748[ctn].length-1].value=tcn.childNodes.item(0).nodeValue;
}
_74c++;
break;
case dojo.dom.TEXT_NODE:
if(node.childNodes.length==1){
_748[_744].push({value:node.childNodes.item(0).nodeValue});
}
break;
default:
break;
}
}
return _748;
};
this.parseAttributes=function(node){
var _751={};
var atts=node.attributes;
var _753,i=0;
while((_753=atts[i++])){
if(isIE){
if(!_753){
continue;
}
if((typeof _753=="object")&&(typeof _753.nodeValue=="undefined")||(_753.nodeValue==null)||(_753.nodeValue=="")){
continue;
}
}
var nn=_753.nodeName.split(":");
nn=(nn.length==2)?nn[1]:_753.nodeName;
_751[nn]={value:_753.nodeValue};
}
return _751;
};
};
dojo.provide("dojo.ns");
dojo.ns={namespaces:{},failed:{},loading:{},loaded:{},register:function(name,_757,_758,_759){
if(!_759||!this.namespaces[name]){
this.namespaces[name]=new dojo.ns.Ns(name,_757,_758);
}
},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,_760,_761){
this.name=name;
this.module=_760;
this.resolver=_761;
this._loaded=[];
this._failed=[];
};
dojo.ns.Ns.prototype.resolve=function(name,_763,_764){
if(!this.resolver||djConfig["skipAutoRequire"]){
return false;
}
var _765=this.resolver(name,_763);
if((_765)&&(!this._loaded[_765])&&(!this._failed[_765])){
var req=dojo.require;
req(_765,false,true);
if(dojo.hostenv.findModule(_765,false)){
this._loaded[_765]=true;
}else{
if(!_764){
dojo.raise("dojo.ns.Ns.resolve: module '"+_765+"' not found after loading via namespace '"+this.name+"'");
}
this._failed[_765]=true;
}
}
return Boolean(this._loaded[_765]);
};
dojo.registerNamespace=function(name,_768,_769){
dojo.ns.register.apply(dojo.ns,arguments);
};
dojo.registerNamespaceResolver=function(name,_76b){
var n=dojo.ns.namespaces[name];
if(n){
n.resolver=_76b;
}
};
dojo.registerNamespaceManifest=function(_76d,path,name,_770,_771){
dojo.registerModulePath(name,path);
dojo.registerNamespace(name,_770,_771);
};
dojo.registerNamespace("dojo","dojo.widget");
dojo.provide("dojo.widget.Manager");
dojo.widget.manager=new function(){
this.widgets=[];
this.widgetIds=[];
this.topWidgets={};
var _772={};
var _773=[];
this.getUniqueId=function(_774){
var _775;
do{
_775=_774+"_"+(_772[_774]!=undefined?++_772[_774]:_772[_774]=0);
}while(this.getWidgetById(_775));
return _775;
};
this.add=function(_776){
this.widgets.push(_776);
if(!_776.extraArgs["id"]){
_776.extraArgs["id"]=_776.extraArgs["ID"];
}
if(_776.widgetId==""){
if(_776["id"]){
_776.widgetId=_776["id"];
}else{
if(_776.extraArgs["id"]){
_776.widgetId=_776.extraArgs["id"];
}else{
_776.widgetId=this.getUniqueId(_776.ns+"_"+_776.widgetType);
}
}
}
if(this.widgetIds[_776.widgetId]){
dojo.debug("widget ID collision on ID: "+_776.widgetId);
}
this.widgetIds[_776.widgetId]=_776;
};
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(_778){
if(dojo.lang.isNumber(_778)){
var tw=this.widgets[_778].widgetId;
delete this.topWidgets[tw];
delete this.widgetIds[tw];
this.widgets.splice(_778,1);
}else{
this.removeById(_778);
}
};
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 _77f=(type.indexOf(":")<0?function(x){
return x.widgetType.toLowerCase();
}:function(x){
return x.getNamespacedType();
});
var ret=[];
dojo.lang.forEach(this.widgets,function(x){
if(_77f(x)==lt){
ret.push(x);
}
});
return ret;
};
this.getWidgetsByFilter=function(_784,_785){
var ret=[];
dojo.lang.every(this.widgets,function(x){
if(_784(x)){
ret.push(x);
if(_785){
return false;
}
}
return true;
});
return (_785?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 _78b={};
var _78c=["dojo.widget"];
for(var i=0;i<_78c.length;i++){
_78c[_78c[i]]=true;
}
this.registerWidgetPackage=function(_78e){
if(!_78c[_78e]){
_78c[_78e]=true;
_78c.push(_78e);
}
};
this.getWidgetPackageList=function(){
return dojo.lang.map(_78c,function(elt){
return (elt!==true?elt:undefined);
});
};
this.getImplementation=function(_790,_791,_792,ns){
var impl=this.getImplementationName(_790,ns);
if(impl){
var ret=_791?new impl(_791):new impl();
return ret;
}
};
function buildPrefixCache(){
for(var _796 in dojo.render){
if(dojo.render[_796]["capable"]===true){
var _797=dojo.render[_796].prefixes;
for(var i=0;i<_797.length;i++){
_773.push(_797[i].toLowerCase());
}
}
}
}
var _799=function(_79a,_79b){
if(!_79b){
return null;
}
for(var i=0,l=_773.length,_79e;i<=l;i++){
_79e=(i<l?_79b[_773[i]]:_79b);
if(!_79e){
continue;
}
for(var name in _79e){
if(name.toLowerCase()==_79a){
return _79e[name];
}
}
}
return null;
};
var _7a0=function(_7a1,_7a2){
var _7a3=dojo.evalObjPath(_7a2,false);
return (_7a3?_799(_7a1,_7a3):null);
};
this.getImplementationName=function(_7a4,ns){
var _7a6=_7a4.toLowerCase();
ns=ns||"dojo";
var imps=_78b[ns]||(_78b[ns]={});
var impl=imps[_7a6];
if(impl){
return impl;
}
if(!_773.length){
buildPrefixCache();
}
var _7a9=dojo.ns.get(ns);
if(!_7a9){
dojo.ns.register(ns,ns+".widget");
_7a9=dojo.ns.get(ns);
}
if(_7a9){
_7a9.resolve(_7a4);
}
impl=_7a0(_7a6,_7a9.module);
if(impl){
return (imps[_7a6]=impl);
}
_7a9=dojo.ns.require(ns);
if((_7a9)&&(_7a9.resolver)){
_7a9.resolve(_7a4);
impl=_7a0(_7a6,_7a9.module);
if(impl){
return (imps[_7a6]=impl);
}
}
dojo.deprecated("dojo.widget.Manager.getImplementationName","Could not locate widget implementation for \""+_7a4+"\" in \""+_7a9.module+"\" registered to namespace \""+_7a9.name+"\". "+"Developers must specify correct namespaces for all non-Dojo widgets","0.5");
for(var i=0;i<_78c.length;i++){
impl=_7a0(_7a6,_78c[i]);
if(impl){
return (imps[_7a6]=impl);
}
}
throw new Error("Could not locate widget implementation for \""+_7a4+"\" in \""+_7a9.module+"\" registered to namespace \""+_7a9.name+"\"");
};
this.resizing=false;
this.onWindowResized=function(){
if(this.resizing){
return;
}
try{
this.resizing=true;
for(var id in this.topWidgets){
var _7ac=this.topWidgets[id];
if(_7ac.checkSize){
_7ac.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(_7b1,_7b2){
dw[(_7b2||_7b1)]=h(_7b1);
};
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 _7b4=dwm.getAllWidgets.apply(dwm,arguments);
if(arguments.length>0){
return _7b4[n];
}
return _7b4;
};
g("registerWidgetPackage");
g("getImplementation","getWidgetImplementation");
g("getImplementationName","getWidgetImplementationName");
dw.widgets=dwm.widgets;
dw.widgetIds=dwm.widgetIds;
dw.root=dwm.root;
})();
dojo.kwCompoundRequire({common:[["dojo.uri.Uri",false,false]]});
dojo.provide("dojo.uri.*");
dojo.provide("dojo.a11y");
dojo.a11y={imgPath:dojo.uri.moduleUri("dojo.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 _7b6=null;
if(window.getComputedStyle){
var _7b7=getComputedStyle(div,"");
_7b6=_7b7.getPropertyValue("background-image");
}else{
_7b6=div.currentStyle.backgroundImage;
}
var _7b8=false;
if(_7b6!=null&&(_7b6=="none"||_7b6=="url(invalid-url:)")){
this.accessible=true;
}
dojo.body().removeChild(div);
}
return this.accessible;
},setCheckAccessible:function(_7b9){
this.doAccessibleCheck=_7b9;
},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 _7bb=this.children[i];
if(_7bb.onResized){
_7bb.onResized();
}
}
},create:function(args,_7bd,_7be,ns){
if(ns){
this.ns=ns;
}
this.satisfyPropertySets(args,_7bd,_7be);
this.mixInProperties(args,_7bd,_7be);
this.postMixInProperties(args,_7bd,_7be);
dojo.widget.manager.add(this);
this.buildRendering(args,_7bd,_7be);
this.initialize(args,_7bd,_7be);
this.postInitialize(args,_7bd,_7be);
this.postCreate(args,_7bd,_7be);
return this;
},destroy:function(_7c0){
if(this.parent){
this.parent.removeChild(this);
}
this.destroyChildren();
this.uninitialize();
this.destroyRendering(_7c0);
dojo.widget.manager.removeById(this.widgetId);
},destroyChildren:function(){
var _7c1;
var i=0;
while(this.children.length>i){
_7c1=this.children[i];
if(_7c1 instanceof dojo.widget.Widget){
this.removeChild(_7c1);
_7c1.destroy();
continue;
}
i++;
}
},getChildrenOfType:function(type,_7c4){
var ret=[];
var _7c6=dojo.lang.isFunction(type);
if(!_7c6){
type=type.toLowerCase();
}
for(var x=0;x<this.children.length;x++){
if(_7c6){
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(_7c4){
ret=ret.concat(this.children[x].getChildrenOfType(type,_7c4));
}
}
return ret;
},getDescendants:function(){
var _7c8=[];
var _7c9=[this];
var elem;
while((elem=_7c9.pop())){
_7c8.push(elem);
if(elem.children){
dojo.lang.forEach(elem.children,function(elem){
_7c9.push(elem);
});
}
}
return _7c8;
},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 _7d0;
var _7d1=dojo.widget.lcArgsCache[this.widgetType];
if(_7d1==null){
_7d1={};
for(var y in this){
_7d1[((new String(y)).toLowerCase())]=y;
}
dojo.widget.lcArgsCache[this.widgetType]=_7d1;
}
var _7d3={};
for(var x in args){
if(!this[x]){
var y=_7d1[(new String(x)).toLowerCase()];
if(y){
args[y]=args[x];
x=y;
}
}
if(_7d3[x]){
continue;
}
_7d3[x]=true;
if((typeof this[x])!=(typeof _7d0)){
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 _7d5=args[x].split(";");
for(var y=0;y<_7d5.length;y++){
var si=_7d5[y].indexOf(":");
if((si!=-1)&&(_7d5[y].length>si)){
this[x][_7d5[y].substr(0,si).replace(/^\s+|\s+$/g,"")]=_7d5[y].substr(si+1);
}
}
}
}else{
this[x]=args[x];
}
}
}
}
}
}
}
}
}else{
this.extraArgs[x.toLowerCase()]=args[x];
}
}
},postMixInProperties:function(args,frag,_7d9){
},initialize:function(args,frag,_7dc){
return false;
},postInitialize:function(args,frag,_7df){
return false;
},postCreate:function(args,frag,_7e2){
return false;
},uninitialize:function(){
return false;
},buildRendering:function(args,frag,_7e5){
dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", ");
return false;
},destroyRendering:function(){
dojo.unimplemented("dojo.widget.Widget.destroyRendering");
return false;
},addedTo:function(_7e6){
},addChild:function(_7e7){
dojo.unimplemented("dojo.widget.Widget.addChild");
return false;
},removeChild:function(_7e8){
for(var x=0;x<this.children.length;x++){
if(this.children[x]===_7e8){
this.children.splice(x,1);
_7e8.parent=null;
break;
}
}
return _7e8;
},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(_7ed,_7ee,_7ef){
var _7f0=_7ee.parseProperties(_7ed["dojo:propertyset"]);
};
dojo.widget.tags["dojo:connect"]=function(_7f1,_7f2,_7f3){
var _7f4=_7f2.parseProperties(_7f1["dojo:connect"]);
};
dojo.widget.buildWidgetFromParseTree=function(type,frag,_7f7,_7f8,_7f9,_7fa){
dojo.a11y.setAccessibleMode();
var _7fb=type.split(":");
_7fb=(_7fb.length==2)?_7fb[1]:type;
var _7fc=_7fa||_7f7.parseProperties(frag[frag["ns"]+":"+_7fb]);
var _7fd=dojo.widget.manager.getImplementation(_7fb,null,null,frag["ns"]);
if(!_7fd){
throw new Error("cannot find \""+type+"\" widget");
}else{
if(!_7fd.create){
throw new Error("\""+type+"\" widget object has no \"create\" method and does not appear to implement *Widget");
}
}
_7fc["dojoinsertionindex"]=_7f9;
var ret=_7fd.create(_7fc,frag,_7f8,frag["ns"]);
return ret;
};
dojo.widget.defineWidget=function(_7ff,_800,_801,init,_803){
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(_806,_807,_808,init,_80a){
var _80b=_806.split(".");
var type=_80b.pop();
var regx="\\.("+(_807?_807+"|":"")+dojo.widget.defineWidget.renderers+")\\.";
var r=_806.search(new RegExp(regx));
_80b=(r<0?_80b.join("."):_806.substr(0,r));
dojo.widget.manager.registerWidgetPackage(_80b);
var pos=_80b.indexOf(".");
var _810=(pos>-1)?_80b.substring(0,pos):_80b;
_80a=(_80a)||{};
_80a.widgetType=type;
if((!init)&&(_80a["classConstructor"])){
init=_80a.classConstructor;
delete _80a.classConstructor;
}
dojo.declare(_806,_808,init,_80a);
};
dojo.provide("dojo.widget.Parse");
dojo.widget.Parse=function(_811){
this.propertySetsList=[];
this.fragment=_811;
this.createComponents=function(frag,_813){
var _814=[];
var _815=false;
try{
if(frag&&frag.tagName&&(frag!=frag.nodeRef)){
var _816=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(_816[ltn]){
_815=true;
ret=_816[ltn](frag,this,_813,frag.index);
_814.push(ret);
}else{
if(ltn.indexOf(":")==-1){
ltn="dojo:"+ltn;
}
ret=dojo.widget.buildWidgetFromParseTree(ltn,frag,this,_813,frag.index);
if(ret){
_815=true;
_814.push(ret);
}
}
}
}
}
catch(e){
dojo.debug("dojo.widget.Parse: error:",e);
}
if(!_815){
_814=_814.concat(this.createSubComponents(frag,_813));
}
return _814;
};
this.createSubComponents=function(_81b,_81c){
var frag,_81e=[];
for(var item in _81b){
frag=_81b[item];
if(frag&&typeof frag=="object"&&(frag!=_81b.nodeRef)&&(frag!=_81b.tagName)&&(!dojo.dom.isNode(frag))){
_81e=_81e.concat(this.createComponents(frag,_81c));
}
}
return _81e;
};
this.parsePropertySets=function(_820){
return [];
};
this.parseProperties=function(_821){
var _822={};
for(var item in _821){
if((_821[item]==_821.tagName)||(_821[item]==_821.nodeRef)){
}else{
var frag=_821[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 _825=this;
this.getDataProvider(_825,frag[0].value);
_822.dataProvider=this.dataProvider;
}
_822[item]=frag[0].value;
var _826=this.parseProperties(frag);
for(var _827 in _826){
_822[_827]=_826[_827];
}
}
catch(e){
dojo.debug(e);
}
}
}
switch(item.toLowerCase()){
case "checked":
case "disabled":
if(typeof _822[item]!="boolean"){
_822[item]=true;
}
break;
}
}
}
return _822;
};
this.getDataProvider=function(_828,_829){
dojo.io.bind({url:_829,load:function(type,_82b){
if(type=="load"){
_828.dataProvider=_82b;
}
},mimetype:"text/javascript",sync:true});
};
this.getPropertySetById=function(_82c){
for(var x=0;x<this.propertySetsList.length;x++){
if(_82c==this.propertySetsList[x]["id"][0].value){
return this.propertySetsList[x];
}
}
return "";
};
this.getPropertySetsByType=function(_82e){
var _82f=[];
for(var x=0;x<this.propertySetsList.length;x++){
var cpl=this.propertySetsList[x];
var cpcc=cpl.componentClass||cpl.componentType||null;
var _833=this.propertySetsList[x]["id"][0].value;
if(cpcc&&(_833==cpcc[0].value)){
_82f.push(cpl);
}
}
return _82f;
};
this.getPropertySets=function(_834){
var ppl="dojo:propertyproviderlist";
var _836=[];
var _837=_834.tagName;
if(_834[ppl]){
var _838=_834[ppl].value.split(" ");
for(var _839 in _838){
if((_839.indexOf("..")==-1)&&(_839.indexOf("://")==-1)){
var _83a=this.getPropertySetById(_839);
if(_83a!=""){
_836.push(_83a);
}
}else{
}
}
}
return this.getPropertySetsByType(_837).concat(_836);
};
this.createComponentFromScript=function(_83b,_83c,_83d,ns){
_83d.fastMixIn=true;
var ltn=(ns||"dojo")+":"+_83c.toLowerCase();
if(dojo.widget.tags[ltn]){
return [dojo.widget.tags[ltn](_83d,this,null,null,_83d)];
}
return [dojo.widget.buildWidgetFromParseTree(ltn,_83d,this,null,null,_83d)];
};
};
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,_842,_843,_844){
var _845=false;
var _846=(typeof name=="string");
if(_846){
var pos=name.indexOf(":");
var ns=(pos>-1)?name.substring(0,pos):"dojo";
if(pos>-1){
name=name.substring(pos+1);
}
var _849=name.toLowerCase();
var _84a=ns+":"+_849;
_845=(dojo.byId(name)&&!dojo.widget.tags[_84a]);
}
if((arguments.length==1)&&(_845||!_846)){
var xp=new dojo.xml.Parse();
var tn=_845?dojo.byId(name):name;
return dojo.widget.getParser().createComponents(xp.parseElement(tn,null,true))[0];
}
function fromScript(_84d,name,_84f,ns){
_84f[_84a]={dojotype:[{value:_849}],nodeRef:_84d,fastMixIn:true};
_84f.ns=ns;
return dojo.widget.getParser().createComponentFromScript(_84d,name,_84f,ns);
}
_842=_842||{};
var _851=false;
var tn=null;
var h=dojo.render.html.capable;
if(h){
tn=document.createElement("span");
}
if(!_843){
_851=true;
_843=tn;
if(h){
dojo.body().appendChild(_843);
}
}else{
if(_844){
dojo.dom.insertAtPosition(tn,_843,_844);
}else{
tn=_843;
}
}
var _853=fromScript(tn,name.toLowerCase(),_842,ns);
if((!_853)||(!_853[0])||(typeof _853[0].widgetType=="undefined")){
throw new Error("createWidget: Creation of \""+name+"\" widget failed.");
}
try{
if(_851&&_853[0].domNode.parentNode){
_853[0].domNode.parentNode.removeChild(_853[0].domNode);
}
}
catch(e){
dojo.debug(e);
}
return _853[0];
};
dojo.provide("dojo.widget.DomWidget");
dojo.widget._cssFiles={};
dojo.widget._cssStrings={};
dojo.widget._templateCache={};
dojo.widget.defaultStrings={dojoRoot:dojo.hostenv.getBaseScriptUri(),dojoWidgetModuleUri:dojo.uri.moduleUri("dojo.widget"),baseScriptUri:dojo.hostenv.getBaseScriptUri()};
dojo.widget.fillFromTemplateCache=function(obj,_855,_856,_857){
var _858=_855||obj.templatePath;
var _859=dojo.widget._templateCache;
if(!_858&&!obj["widgetType"]){
do{
var _85a="__dummyTemplate__"+dojo.widget._templateCache.dummyCount++;
}while(_859[_85a]);
obj.widgetType=_85a;
}
var wt=_858?_858.toString():obj.widgetType;
var ts=_859[wt];
if(!ts){
_859[wt]={"string":null,"node":null};
if(_857){
ts={};
}else{
ts=_859[wt];
}
}
if((!obj.templateString)&&(!_857)){
obj.templateString=_856||ts["string"];
}
if(obj.templateString){
obj.templateString=this._sanitizeTemplateString(obj.templateString);
}
if((!obj.templateNode)&&(!_857)){
obj.templateNode=ts["node"];
}
if((!obj.templateNode)&&(!obj.templateString)&&(_858)){
var _85d=this._sanitizeTemplateString(dojo.hostenv.getText(_858));
obj.templateString=_85d;
if(!_857){
_859[wt]["string"]=_85d;
}
}
if((!ts["string"])&&(!_857)){
ts.string=obj.templateString;
}
};
dojo.widget._sanitizeTemplateString=function(_85e){
if(_85e){
_85e=_85e.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");
var _85f=_85e.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_85f){
_85e=_85f[1];
}
}else{
_85e="";
}
return _85e;
};
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,_863){
if(dojo.render.html.ie){
node.setAttribute(this[ns].alias+":"+attr,this[ns].prefix+_863);
}else{
node.setAttributeNS(this[ns]["namespace"],attr,this[ns].prefix+_863);
}
},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 _86a=true;
if(dojo.render.html.ie){
_86a=node.removeAttribute(this[ns].alias+":"+attr);
}else{
node.removeAttributeNS(this[ns]["namespace"],attr);
}
return _86a;
}};
dojo.widget.attachTemplateNodes=function(_86b,_86c,_86d){
var _86e=dojo.dom.ELEMENT_NODE;
function trim(str){
return str.replace(/^\s+|\s+$/g,"");
}
if(!_86b){
_86b=_86c.domNode;
}
if(_86b.nodeType!=_86e){
return;
}
var _870=_86b.all||_86b.getElementsByTagName("*");
var _871=_86c;
for(var x=-1;x<_870.length;x++){
var _873=(x==-1)?_86b:_870[x];
var _874=[];
if(!_86c.widgetsInTemplate||!_873.getAttribute("dojoType")){
for(var y=0;y<this.attachProperties.length;y++){
var _876=_873.getAttribute(this.attachProperties[y]);
if(_876){
_874=_876.split(";");
for(var z=0;z<_874.length;z++){
if(dojo.lang.isArray(_86c[_874[z]])){
_86c[_874[z]].push(_873);
}else{
_86c[_874[z]]=_873;
}
}
break;
}
}
var _878=_873.getAttribute(this.eventAttachProperty);
if(_878){
var evts=_878.split(";");
for(var y=0;y<evts.length;y++){
if((!evts[y])||(!evts[y].length)){
continue;
}
var _87a=null;
var tevt=trim(evts[y]);
if(evts[y].indexOf(":")>=0){
var _87c=tevt.split(":");
tevt=trim(_87c[0]);
_87a=trim(_87c[1]);
}
if(!_87a){
_87a=tevt;
}
var tf=function(){
var ntf=new String(_87a);
return function(evt){
if(_871[ntf]){
_871[ntf](dojo.event.browser.fixEvent(evt,this));
}
};
}();
dojo.event.browser.addListener(_873,tevt,tf,false,true);
}
}
for(var y=0;y<_86d.length;y++){
var _880=_873.getAttribute(_86d[y]);
if((_880)&&(_880.length)){
var _87a=null;
var _881=_86d[y].substr(4);
_87a=trim(_880);
var _882=[_87a];
if(_87a.indexOf(";")>=0){
_882=dojo.lang.map(_87a.split(";"),trim);
}
for(var z=0;z<_882.length;z++){
if(!_882[z].length){
continue;
}
var tf=function(){
var ntf=new String(_882[z]);
return function(evt){
if(_871[ntf]){
_871[ntf](dojo.event.browser.fixEvent(evt,this));
}
};
}();
dojo.event.browser.addListener(_873,_881,tf,false,true);
}
}
}
}
var _885=_873.getAttribute(this.templateProperty);
if(_885){
_86c[_885]=_873;
}
dojo.lang.forEach(dojo.widget.waiNames,function(name){
var wai=dojo.widget.wai[name];
var val=_873.getAttribute(wai.name);
if(val){
if(val.indexOf("-")==-1){
dojo.widget.wai.setAttr(_873,wai.name,"role",val);
}else{
var _889=val.split("-");
dojo.widget.wai.setAttr(_873,wai.name,_889[0],_889[1]);
}
}
},this);
var _88a=_873.getAttribute(this.onBuildProperty);
if(_88a){
eval("var node = baseNode; var widget = targetObj; "+_88a);
}
}
};
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(_892,_893,pos,ref,_896){
if(!this.isContainer){
dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget");
return null;
}else{
if(_896==undefined){
_896=this.children.length;
}
this.addWidgetAsDirectChild(_892,_893,pos,ref,_896);
this.registerChild(_892,_896);
}
return _892;
},addWidgetAsDirectChild:function(_897,_898,pos,ref,_89b){
if((!this.containerNode)&&(!_898)){
this.containerNode=this.domNode;
}
var cn=(_898)?_898:this.containerNode;
if(!pos){
pos="after";
}
if(!ref){
if(!cn){
cn=dojo.body();
}
ref=cn.lastChild;
}
if(!_89b){
_89b=0;
}
_897.domNode.setAttribute("dojoinsertionindex",_89b);
if(!ref){
cn.appendChild(_897.domNode);
}else{
if(pos=="insertAtIndex"){
dojo.dom.insertAtIndex(_897.domNode,ref.parentNode,_89b);
}else{
if((pos=="after")&&(ref===cn.lastChild)){
cn.appendChild(_897.domNode);
}else{
dojo.dom.insertAtPosition(_897.domNode,cn,pos);
}
}
}
},registerChild:function(_89d,_89e){
_89d.dojoInsertionIndex=_89e;
var idx=-1;
for(var i=0;i<this.children.length;i++){
if(this.children[i].dojoInsertionIndex<=_89e){
idx=i;
}
}
this.children.splice(idx+1,0,_89d);
_89d.parent=this;
_89d.addedTo(this,idx+1);
delete dojo.widget.manager.topWidgets[_89d.widgetId];
},removeChild:function(_8a1){
dojo.dom.removeNode(_8a1.domNode);
return dojo.widget.DomWidget.superclass.removeChild.call(this,_8a1);
},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,_8a5){
var _8a6=this.getFragNodeRef(frag);
if(_8a5&&(_8a5.snarfChildDomOutput||!_8a6)){
_8a5.addWidgetAsDirectChild(this,"","insertAtIndex","",args["dojoinsertionindex"],_8a6);
}else{
if(_8a6){
if(this.domNode&&(this.domNode!==_8a6)){
this._sourceNodeRef=dojo.dom.replaceNode(_8a6,this.domNode);
}
}
}
if(_8a5){
_8a5.registerChild(this,args.dojoinsertionindex);
}else{
dojo.widget.manager.topWidgets[this.widgetId]=this;
}
if(this.widgetsInTemplate){
var _8a7=new dojo.xml.Parse();
var _8a8;
var _8a9=this.domNode.getElementsByTagName("*");
for(var i=0;i<_8a9.length;i++){
if(_8a9[i].getAttribute("dojoAttachPoint")=="subContainerWidget"){
_8a8=_8a9[i];
}
if(_8a9[i].getAttribute("dojoType")){
_8a9[i].setAttribute("isSubWidget",true);
}
}
if(this.isContainer&&!this.containerNode){
if(_8a8){
var src=this.getFragNodeRef(frag);
if(src){
dojo.dom.moveChildren(src,_8a8);
frag["dojoDontFollow"]=true;
}
}else{
dojo.debug("No subContainerWidget node can be found in template file for widget "+this);
}
}
var _8ac=_8a7.parseElement(this.domNode,null,true);
dojo.widget.getParser().createSubComponents(_8ac,this);
var _8ad=[];
var _8ae=[this];
var w;
while((w=_8ae.pop())){
for(var i=0;i<w.children.length;i++){
var _8b0=w.children[i];
if(_8b0._processedSubWidgets||!_8b0.extraArgs["issubwidget"]){
continue;
}
_8ad.push(_8b0);
if(_8b0.isContainer){
_8ae.push(_8b0);
}
}
}
for(var i=0;i<_8ad.length;i++){
var _8b1=_8ad[i];
if(_8b1._processedSubWidgets){
dojo.debug("This should not happen: widget._processedSubWidgets is already true!");
return;
}
_8b1._processedSubWidgets=true;
if(_8b1.extraArgs["dojoattachevent"]){
var evts=_8b1.extraArgs["dojoattachevent"].split(";");
for(var j=0;j<evts.length;j++){
var _8b4=null;
var tevt=dojo.string.trim(evts[j]);
if(tevt.indexOf(":")>=0){
var _8b6=tevt.split(":");
tevt=dojo.string.trim(_8b6[0]);
_8b4=dojo.string.trim(_8b6[1]);
}
if(!_8b4){
_8b4=tevt;
}
if(dojo.lang.isFunction(_8b1[tevt])){
dojo.event.kwConnect({srcObj:_8b1,srcFunc:tevt,targetObj:this,targetFunc:_8b4});
}else{
alert(tevt+" is not a function in widget "+_8b1);
}
}
}
if(_8b1.extraArgs["dojoattachpoint"]){
this[_8b1.extraArgs["dojoattachpoint"]]=_8b1;
}
}
}
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 _8ba=args["templateCssPath"]||this.templateCssPath;
if(_8ba&&!dojo.widget._cssFiles[_8ba.toString()]){
if((!this.templateCssString)&&(_8ba)){
this.templateCssString=dojo.hostenv.getText(_8ba);
this.templateCssPath=null;
}
dojo.widget._cssFiles[_8ba.toString()]=true;
}
if((this["templateCssString"])&&(!dojo.widget._cssStrings[this.templateCssString])){
dojo.html.insertCssText(this.templateCssString,null,_8ba);
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 _8bd=false;
if(args["templatepath"]){
args["templatePath"]=args["templatepath"];
}
dojo.widget.fillFromTemplateCache(this,args["templatePath"],null,_8bd);
var ts=dojo.widget._templateCache[this.templatePath?this.templatePath.toString():this.widgetType];
if((ts)&&(!_8bd)){
if(!this.templateString.length){
this.templateString=ts["string"];
}
if(!this.templateNode){
this.templateNode=ts["node"];
}
}
var _8bf=false;
var node=null;
var tstr=this.templateString;
if((!this.templateNode)&&(this.templateString)){
_8bf=this.templateString.match(/\$\{([^\}]+)\}/g);
if(_8bf){
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<_8bf.length;i++){
var key=_8bf[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 _8c6;
if((kval)||(dojo.lang.isString(kval))){
_8c6=new String((dojo.lang.isFunction(kval))?kval.call(this,key,this.templateString):kval);
while(_8c6.indexOf("\"")>-1){
_8c6=_8c6.replace("\"","&quot;");
}
tstr=tstr.replace(_8bf[i],_8c6);
}
}
}else{
this.templateNode=this.createNodesFromText(this.templateString,true)[0];
if(!_8bd){
ts.node=this.templateNode;
}
}
}
if((!this.templateNode)&&(!_8bf)){
dojo.debug("DomWidget.buildFromTemplate: could not create template");
return false;
}else{
if(!_8bf){
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(_8c8,_8c9){
if(!_8c8){
_8c8=this.domNode;
}
if(!_8c9){
_8c9=this;
}
return dojo.widget.attachTemplateNodes(_8c8,_8c9,dojo.widget.getDojoEventsFromStr(this.templateString));
},fillInTemplate:function(){
},destroyRendering:function(){
try{
dojo.dom.destroyNode(this.domNode);
delete this.domNode;
}
catch(e){
}
if(this._sourceNodeRef){
try{
dojo.dom.destroyNode(this._sourceNodeRef);
}
catch(e){
}
}
},createNodesFromText:function(){
dojo.unimplemented("dojo.widget.DomWidget.createNodesFromText");
}});
dojo.provide("dojo.lfx.toggle");
dojo.lfx.toggle.plain={show:function(node,_8cb,_8cc,_8cd){
dojo.html.show(node);
if(dojo.lang.isFunction(_8cd)){
_8cd();
}
},hide:function(node,_8cf,_8d0,_8d1){
dojo.html.hide(node);
if(dojo.lang.isFunction(_8d1)){
_8d1();
}
}};
dojo.lfx.toggle.fade={show:function(node,_8d3,_8d4,_8d5){
dojo.lfx.fadeShow(node,_8d3,_8d4,_8d5).play();
},hide:function(node,_8d7,_8d8,_8d9){
dojo.lfx.fadeHide(node,_8d7,_8d8,_8d9).play();
}};
dojo.lfx.toggle.wipe={show:function(node,_8db,_8dc,_8dd){
dojo.lfx.wipeIn(node,_8db,_8dc,_8dd).play();
},hide:function(node,_8df,_8e0,_8e1){
dojo.lfx.wipeOut(node,_8df,_8e0,_8e1).play();
}};
dojo.lfx.toggle.explode={show:function(node,_8e3,_8e4,_8e5,_8e6){
dojo.lfx.explode(_8e6||{x:0,y:0,width:0,height:0},node,_8e3,_8e4,_8e5).play();
},hide:function(node,_8e8,_8e9,_8ea,_8eb){
dojo.lfx.implode(node,_8eb||{x:0,y:0,width:0,height:0},_8e8,_8e9,_8ea).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(_8f2){
try{
if(this.bgIframe){
this.bgIframe.remove();
delete this.bgIframe;
}
if(!_8f2&&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 _8f6=w||wh.width;
var _8f7=h||wh.height;
if(this.width==_8f6&&this.height==_8f7){
return false;
}
this.width=_8f6;
this.height=_8f7;
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(_8fa){
if(_8fa.checkSize){
_8fa.checkSize();
}
});
}});
dojo.kwCompoundRequire({common:["dojo.xml.Parse","dojo.widget.Widget","dojo.widget.Parse","dojo.widget.Manager"],browser:["dojo.widget.DomWidget","dojo.widget.HtmlWidget"],dashboard:["dojo.widget.DomWidget","dojo.widget.HtmlWidget"],svg:["dojo.widget.SvgWidget"],rhino:["dojo.widget.SwtWidget"]});
dojo.provide("dojo.widget.*");
dojo.provide("dojo.io.cookie");
dojo.io.cookie.setCookie=function(name,_8fc,days,path,_8ff,_900){
var _901=-1;
if((typeof days=="number")&&(days>=0)){
var d=new Date();
d.setTime(d.getTime()+(days*24*60*60*1000));
_901=d.toGMTString();
}
_8fc=escape(_8fc);
document.cookie=name+"="+_8fc+";"+(_901!=-1?" expires="+_901+";":"")+(path?"path="+path:"")+(_8ff?"; domain="+_8ff:"")+(_900?"; 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 _905=document.cookie.substring(idx+name.length+1);
var end=_905.indexOf(";");
if(end==-1){
end=_905.length;
}
_905=_905.substring(0,end);
_905=unescape(_905);
return _905;
};
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,_90c,_90d,_90e){
if(arguments.length==5){
_90e=_90c;
_90c=null;
_90d=null;
}
var _90f=[],_910,_911="";
if(!_90e){
_910=dojo.io.cookie.getObjectCookie(name);
}
if(days>=0){
if(!_910){
_910={};
}
for(var prop in obj){
if(obj[prop]==null){
delete _910[prop];
}else{
if((typeof obj[prop]=="string")||(typeof obj[prop]=="number")){
_910[prop]=obj[prop];
}
}
}
prop=null;
for(var prop in _910){
_90f.push(escape(prop)+"="+escape(_910[prop]));
}
_911=_90f.join("&");
}
dojo.io.cookie.setCookie(name,_911,days,path,_90c,_90d);
};
dojo.io.cookie.getObjectCookie=function(name){
var _914=null,_915=dojo.io.cookie.getCookie(name);
if(_915){
_914={};
var _916=_915.split("&");
for(var i=0;i<_916.length;i++){
var pair=_916[i].split("=");
var _919=pair[1];
if(isNaN(_919)){
_919=unescape(pair[1]);
}
_914[unescape(pair[0])]=_919;
}
}
return _914;
};
dojo.io.cookie.isSupported=function(){
if(typeof navigator.cookieEnabled!="boolean"){
dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null);
var _91a=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__");
navigator.cookieEnabled=(_91a=="CookiesAllowed");
if(navigator.cookieEnabled){
this.deleteCookie("__TestingYourBrowserForCookieSupport__");
}
}
return navigator.cookieEnabled;
};
if(!dojo.io.cookies){
dojo.io.cookies=dojo.io.cookie;
}
dojo.kwCompoundRequire({common:["dojo.io.common"],rhino:["dojo.io.RhinoIO"],browser:["dojo.io.BrowserIO","dojo.io.cookie"],dashboard:["dojo.io.BrowserIO","dojo.io.cookie"]});
dojo.provide("dojo.io.*");
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,_91d){
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,_921){
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();
}
}},_921));
},_cacheSetting:function(_927,_928){
for(var x in this.bindArgs){
if(dojo.lang.isUndefined(_927[x])){
_927[x]=this.bindArgs[x];
}
}
if(dojo.lang.isUndefined(_927.useCache)){
_927.useCache=_928;
}
if(dojo.lang.isUndefined(_927.preventCache)){
_927.preventCache=!_928;
}
if(dojo.lang.isUndefined(_927.mimetype)){
_927.mimetype="text/html";
}
return _927;
},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(_92d){
var st=this[_92d];
var err="";
var _930=this.scriptScope||window;
for(var i=0;i<st.length;i++){
try{
st[i].call(_930);
}
catch(e){
err+="\n"+st[i]+" failed: "+e.description;
}
}
this[_92d]=[];
if(err.length){
var name=(_92d=="_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(_937,obj,func){
if(typeof func=="undefined"){
_937.push(obj);
}else{
_937.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,_941,_942){
if(!_941){
_941="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[_941](e);
if(e.returnValue){
switch(_942){
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 _945=[],_946=[],tmp=[];
var _948=[],_949=[],attr=[],_94b=[];
var str="",path="",fix="",_94f="",tag="",_951="";
if(!url){
url="./";
}
if(s){
var _952=/<title[^>]*>([\s\S]*?)<\/title>/i;
while(_948=_952.exec(s)){
_945.push(_948[1]);
s=s.substring(0,_948.index)+s.substr(_948.index+_948[0].length);
}
if(this.adjustPaths){
var _953=/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i;
var _954=/\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@]+?)\2/i;
var _955=/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/;
while(tag=_953.exec(s)){
str+=s.substring(0,tag.index);
s=s.substring((tag.index+tag[0].length),s.length);
tag=tag[0];
_94f="";
while(attr=_954.exec(tag)){
path="";
_951=attr[3];
switch(attr[1].toLowerCase()){
case "src":
case "href":
if(_955.exec(_951)){
path=_951;
}else{
path=(new dojo.uri.Uri(url,_951).toString());
}
break;
case "style":
path=dojo.html.fixPathsInCssText(_951,url);
break;
default:
path=_951;
}
fix=" "+attr[1]+"="+attr[2]+path+attr[2];
_94f+=tag.substring(0,attr.index)+fix;
tag=tag.substring((attr.index+attr[0].length),tag.length);
}
str+=_94f+tag;
}
s=str+s;
}
_952=/(?:<(style)[^>]*>([\s\S]*?)<\/style>|<link ([^>]*rel=['"]?stylesheet['"]?[^>]*)>)/i;
while(_948=_952.exec(s)){
if(_948[1]&&_948[1].toLowerCase()=="style"){
_94b.push(dojo.html.fixPathsInCssText(_948[2],url));
}else{
if(attr=_948[3].match(/href=(['"]?)([^'">]*)\1/i)){
_94b.push({path:attr[2]});
}
}
s=s.substring(0,_948.index)+s.substr(_948.index+_948[0].length);
}
var _952=/<script([^>]*)>([\s\S]*?)<\/script>/i;
var _956=/src=(['"]?)([^"']*)\1/i;
var _957=/.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/;
var _958=/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g;
var _959=/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix|registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/;
while(_948=_952.exec(s)){
if(this.executeScripts&&_948[1]){
if(attr=_956.exec(_948[1])){
if(_957.exec(attr[2])){
dojo.debug("Security note! inhibit:"+attr[2]+" from  being loaded again.");
}else{
_946.push({path:attr[2]});
}
}
}
if(_948[2]){
var sc=_948[2].replace(_958,"");
if(!sc){
continue;
}
while(tmp=_959.exec(sc)){
_949.push(tmp[0]);
sc=sc.substring(0,tmp.index)+sc.substr(tmp.index+tmp[0].length);
}
if(this.executeScripts){
_946.push(sc);
}
}
s=s.substr(0,_948.index)+s.substr(_948.index+_948[0].length);
}
if(this.extractContent){
_948=s.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_948){
s=_948[1];
}
}
if(this.executeScripts&&this.scriptSeparation){
var _952=/(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/;
var _95b=/([\s'";:\(])scriptScope(.*)/;
str="";
while(tag=_952.exec(s)){
tmp=((tag[3]=="'")?"\"":"'");
fix="";
str+=s.substring(0,tag.index)+tag[1];
while(attr=_95b.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":_94b,"titles":_945,"requires":_949,"scripts":_946,"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 _961=this;
function asyncParse(){
if(_961.executeScripts){
_961._executeScripts(data.scripts);
}
if(_961.parseContent){
var node=_961.containerNode||_961.domNode;
var _963=new dojo.xml.Parse();
var frag=_963.parseElement(node,null,true);
dojo.widget.getParser().createSubComponents(frag,_961);
}
_961.onResized();
_961.onLoad();
}
if(dojo.hostenv.isXDomain&&data.requires.length){
dojo.addOnLoad(asyncParse);
}else{
asyncParse();
}
}
},setHandler:function(_965){
var fcn=dojo.lang.isFunction(_965)?_965:window[_965];
if(!dojo.lang.isFunction(fcn)){
this._handleDefaults("Unable to set handler, '"+_965+"' 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(_968){
var self=this;
var tmp="",code="";
for(var i=0;i<_968.length;i++){
if(_968[i].path){
dojo.io.bind(this._cacheSetting({"url":_968[i].path,"load":function(type,_96e){
dojo.lang.hitch(self,tmp=";"+_96e);
},"error":function(type,_970){
_970.text=type+" downloading remote script";
self._handleDefaults.call(self,_970,"onExecError","debug");
},"mimetype":"text/plain","sync":true},this.cacheContent));
code+=tmp;
}else{
code+=_968[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.Dialog");
dojo.declare("dojo.widget.ModalDialogBase",null,{isContainer:true,focusElement:"",bgColor:"black",bgOpacity:0.4,followScroll:true,closeOnBackgroundClick:false,trapTabs:function(e){
if(e.target==this.tabStartOuter){
if(this._fromTrap){
this.tabStart.focus();
this._fromTrap=false;
}else{
this._fromTrap=true;
this.tabEnd.focus();
}
}else{
if(e.target==this.tabStart){
if(this._fromTrap){
this._fromTrap=false;
}else{
this._fromTrap=true;
this.tabEnd.focus();
}
}else{
if(e.target==this.tabEndOuter){
if(this._fromTrap){
this.tabEnd.focus();
this._fromTrap=false;
}else{
this._fromTrap=true;
this.tabStart.focus();
}
}else{
if(e.target==this.tabEnd){
if(this._fromTrap){
this._fromTrap=false;
}else{
this._fromTrap=true;
this.tabStart.focus();
}
}
}
}
}
},clearTrap:function(e){
var _976=this;
setTimeout(function(){
_976._fromTrap=false;
},100);
},postCreate:function(){
with(this.domNode.style){
position="absolute";
zIndex=999;
display="none";
overflow="visible";
}
var b=dojo.body();
b.appendChild(this.domNode);
this.bg=document.createElement("div");
this.bg.className="dialogUnderlay";
with(this.bg.style){
position="absolute";
left=top="0px";
zIndex=998;
display="none";
}
b.appendChild(this.bg);
this.setBackgroundColor(this.bgColor);
this.bgIframe=new dojo.html.BackgroundIframe();
if(this.bgIframe.iframe){
with(this.bgIframe.iframe.style){
position="absolute";
left=top="0px";
zIndex=90;
display="none";
}
}
if(this.closeOnBackgroundClick){
dojo.event.kwConnect({srcObj:this.bg,srcFunc:"onclick",adviceObj:this,adviceFunc:"onBackgroundClick",once:true});
}
},uninitialize:function(){
this.bgIframe.remove();
dojo.html.removeNode(this.bg,true);
},setBackgroundColor:function(_978){
if(arguments.length>=3){
_978=new dojo.gfx.color.Color(arguments[0],arguments[1],arguments[2]);
}else{
_978=new dojo.gfx.color.Color(_978);
}
this.bg.style.backgroundColor=_978.toString();
return this.bgColor=_978;
},setBackgroundOpacity:function(op){
if(arguments.length==0){
op=this.bgOpacity;
}
dojo.html.setOpacity(this.bg,op);
try{
this.bgOpacity=dojo.html.getOpacity(this.bg);
}
catch(e){
this.bgOpacity=op;
}
return this.bgOpacity;
},_sizeBackground:function(){
if(this.bgOpacity>0){
var _97a=dojo.html.getViewport();
var h=_97a.height;
var w=_97a.width;
with(this.bg.style){
width=w+"px";
height=h+"px";
}
var _97d=dojo.html.getScroll().offset;
this.bg.style.top=_97d.y+"px";
this.bg.style.left=_97d.x+"px";
var _97a=dojo.html.getViewport();
if(_97a.width!=w){
this.bg.style.width=_97a.width+"px";
}
if(_97a.height!=h){
this.bg.style.height=_97a.height+"px";
}
}
this.bgIframe.size(this.bg);
},_showBackground:function(){
if(this.bgOpacity>0){
this.bg.style.display="block";
}
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="block";
}
},placeModalDialog:function(){
var _97e=dojo.html.getScroll().offset;
var _97f=dojo.html.getViewport();
var mb;
if(this.isShowing()){
mb=dojo.html.getMarginBox(this.domNode);
}else{
dojo.html.setVisibility(this.domNode,false);
dojo.html.show(this.domNode);
mb=dojo.html.getMarginBox(this.domNode);
dojo.html.hide(this.domNode);
dojo.html.setVisibility(this.domNode,true);
}
var x=_97e.x+(_97f.width-mb.width)/2;
var y=_97e.y+(_97f.height-mb.height)/2;
with(this.domNode.style){
left=x+"px";
top=y+"px";
}
},_onKey:function(evt){
if(evt.key){
var node=evt.target;
while(node!=null){
if(node==this.domNode){
return;
}
node=node.parentNode;
}
if(evt.key!=evt.KEY_TAB){
dojo.event.browser.stopEvent(evt);
}else{
if(!dojo.render.html.opera){
try{
this.tabStart.focus();
}
catch(e){
}
}
}
}
},showModalDialog:function(){
if(this.followScroll&&!this._scrollConnected){
this._scrollConnected=true;
dojo.event.connect(window,"onscroll",this,"_onScroll");
}
dojo.event.connect(document.documentElement,"onkey",this,"_onKey");
this.placeModalDialog();
this.setBackgroundOpacity();
this._sizeBackground();
this._showBackground();
this._fromTrap=true;
setTimeout(dojo.lang.hitch(this,function(){
try{
this.tabStart.focus();
}
catch(e){
}
}),50);
},hideModalDialog:function(){
if(this.focusElement){
dojo.byId(this.focusElement).focus();
dojo.byId(this.focusElement).blur();
}
this.bg.style.display="none";
this.bg.style.width=this.bg.style.height="1px";
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="none";
}
dojo.event.disconnect(document.documentElement,"onkey",this,"_onKey");
if(this._scrollConnected){
this._scrollConnected=false;
dojo.event.disconnect(window,"onscroll",this,"_onScroll");
}
},_onScroll:function(){
var _985=dojo.html.getScroll().offset;
this.bg.style.top=_985.y+"px";
this.bg.style.left=_985.x+"px";
this.placeModalDialog();
},checkSize:function(){
if(this.isShowing()){
this._sizeBackground();
this.placeModalDialog();
this.onResized();
}
},onBackgroundClick:function(){
if(this.lifetime-this.timeRemaining>=this.blockDuration){
return;
}
this.hide();
}});
dojo.widget.defineWidget("dojo.widget.Dialog",[dojo.widget.ContentPane,dojo.widget.ModalDialogBase],{templateString:"<div id=\"${this.widgetId}\" class=\"dojoDialog\" dojoattachpoint=\"wrapper\">\n\t<span dojoattachpoint=\"tabStartOuter\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\"\ttabindex=\"0\"></span>\n\t<span dojoattachpoint=\"tabStart\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n\t<div dojoattachpoint=\"containerNode\" style=\"position: relative; z-index: 2;\"></div>\n\t<span dojoattachpoint=\"tabEnd\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n\t<span dojoattachpoint=\"tabEndOuter\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n</div>\n",blockDuration:0,lifetime:0,closeNode:"",postMixInProperties:function(){
dojo.widget.Dialog.superclass.postMixInProperties.apply(this,arguments);
if(this.closeNode){
this.setCloseControl(this.closeNode);
}
},postCreate:function(){
dojo.widget.Dialog.superclass.postCreate.apply(this,arguments);
dojo.widget.ModalDialogBase.prototype.postCreate.apply(this,arguments);
},show:function(){
if(this.lifetime){
this.timeRemaining=this.lifetime;
if(this.timerNode){
this.timerNode.innerHTML=Math.ceil(this.timeRemaining/1000);
}
if(this.blockDuration&&this.closeNode){
if(this.lifetime>this.blockDuration){
this.closeNode.style.visibility="hidden";
}else{
this.closeNode.style.display="none";
}
}
if(this.timer){
clearInterval(this.timer);
}
this.timer=setInterval(dojo.lang.hitch(this,"_onTick"),100);
}
this.showModalDialog();
dojo.widget.Dialog.superclass.show.call(this);
},onLoad:function(){
this.placeModalDialog();
dojo.widget.Dialog.superclass.onLoad.call(this);
},fillInTemplate:function(){
},hide:function(){
this.hideModalDialog();
dojo.widget.Dialog.superclass.hide.call(this);
if(this.timer){
clearInterval(this.timer);
}
},setTimerNode:function(node){
this.timerNode=node;
},setCloseControl:function(node){
this.closeNode=dojo.byId(node);
dojo.event.connect(this.closeNode,"onclick",this,"hide");
},setShowControl:function(node){
node=dojo.byId(node);
dojo.event.connect(node,"onclick",this,"show");
},_onTick:function(){
if(this.timer){
this.timeRemaining-=100;
if(this.lifetime-this.timeRemaining>=this.blockDuration){
if(this.closeNode){
this.closeNode.style.visibility="visible";
}
}
if(!this.timeRemaining){
clearInterval(this.timer);
this.hide();
}else{
if(this.timerNode){
this.timerNode.innerHTML=Math.ceil(this.timeRemaining/1000);
}
}
}
}});
dojo.provide("dojo.widget.ResizeHandle");
dojo.widget.defineWidget("dojo.widget.ResizeHandle",dojo.widget.HtmlWidget,{targetElmId:"",templateCssString:".dojoHtmlResizeHandle {\n\tfloat: right;\n\tposition: absolute;\n\tright: 2px;\n\tbottom: 2px;\n\twidth: 13px;\n\theight: 13px;\n\tz-index: 20;\n\tcursor: nw-resize;\n\tbackground-image: url(grabCorner.gif);\n\tline-height: 0px;\n}\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/ResizeHandle.css"),templateString:"<div class=\"dojoHtmlResizeHandle\"><div></div></div>",postCreate:function(){
dojo.event.connect(this.domNode,"onmousedown",this,"_beginSizing");
},_beginSizing:function(e){
if(this._isSizing){
return false;
}
this.targetWidget=dojo.widget.byId(this.targetElmId);
this.targetDomNode=this.targetWidget?this.targetWidget.domNode:dojo.byId(this.targetElmId);
if(!this.targetDomNode){
return;
}
this._isSizing=true;
this.startPoint={"x":e.clientX,"y":e.clientY};
var mb=dojo.html.getMarginBox(this.targetDomNode);
this.startSize={"w":mb.width,"h":mb.height};
dojo.event.kwConnect({srcObj:dojo.body(),srcFunc:"onmousemove",targetObj:this,targetFunc:"_changeSizing",rate:25});
dojo.event.connect(dojo.body(),"onmouseup",this,"_endSizing");
e.preventDefault();
},_changeSizing:function(e){
try{
if(!e.clientX||!e.clientY){
return;
}
}
catch(e){
return;
}
var dx=this.startPoint.x-e.clientX;
var dy=this.startPoint.y-e.clientY;
var newW=this.startSize.w-dx;
var newH=this.startSize.h-dy;
if(this.minSize){
var mb=dojo.html.getMarginBox(this.targetDomNode);
if(newW<this.minSize.w){
newW=mb.width;
}
if(newH<this.minSize.h){
newH=mb.height;
}
}
if(this.targetWidget){
this.targetWidget.resizeTo(newW,newH);
}else{
dojo.html.setMarginBox(this.targetDomNode,{width:newW,height:newH});
}
e.preventDefault();
},_endSizing:function(e){
dojo.event.disconnect(dojo.body(),"onmousemove",this,"_changeSizing");
dojo.event.disconnect(dojo.body(),"onmouseup",this,"_endSizing");
this._isSizing=false;
}});
dojo.provide("dojo.lfx.shadow");
dojo.lfx.shadow=function(node){
this.shadowPng=dojo.uri.moduleUri("dojo.html","images/shadow");
this.shadowThickness=8;
this.shadowOffset=15;
this.init(node);
};
dojo.extend(dojo.lfx.shadow,{init:function(node){
this.node=node;
this.pieces={};
var x1=-1*this.shadowThickness;
var y0=this.shadowOffset;
var y1=this.shadowOffset+this.shadowThickness;
this._makePiece("tl","top",y0,"left",x1);
this._makePiece("l","top",y1,"left",x1,"scale");
this._makePiece("tr","top",y0,"left",0);
this._makePiece("r","top",y1,"left",0,"scale");
this._makePiece("bl","top",0,"left",x1);
this._makePiece("b","top",0,"left",0,"crop");
this._makePiece("br","top",0,"left",0);
},_makePiece:function(name,_998,_999,_99a,_99b,_99c){
var img;
var url=this.shadowPng+name.toUpperCase()+".png";
if(dojo.render.html.ie55||dojo.render.html.ie60){
img=dojo.doc().createElement("div");
img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"'"+(_99c?", sizingMethod='"+_99c+"'":"")+")";
}else{
img=dojo.doc().createElement("img");
img.src=url;
}
img.style.position="absolute";
img.style[_998]=_999+"px";
img.style[_99a]=_99b+"px";
img.style.width=this.shadowThickness+"px";
img.style.height=this.shadowThickness+"px";
this.pieces[name]=img;
this.node.appendChild(img);
},size:function(_99f,_9a0){
var _9a1=_9a0-(this.shadowOffset+this.shadowThickness+1);
if(_9a1<0){
_9a1=0;
}
if(_9a0<1){
_9a0=1;
}
if(_99f<1){
_99f=1;
}
with(this.pieces){
l.style.height=_9a1+"px";
r.style.height=_9a1+"px";
b.style.width=(_99f-1)+"px";
bl.style.top=(_9a0-1)+"px";
b.style.top=(_9a0-1)+"px";
br.style.top=(_9a0-1)+"px";
tr.style.left=(_99f-1)+"px";
r.style.left=(_99f-1)+"px";
br.style.left=(_99f-1)+"px";
}
}});
dojo.provide("dojo.widget.FloatingPane");
dojo.declare("dojo.widget.FloatingPaneBase",null,{title:"",iconSrc:"",hasShadow:false,constrainToContainer:false,taskBarId:"",resizable:true,titleBarDisplay:true,windowState:"normal",displayCloseAction:false,displayMinimizeAction:false,displayMaximizeAction:false,_max_taskBarConnectAttempts:5,_taskBarConnectAttempts:0,templateString:"<div id=\"${this.widgetId}\" dojoAttachEvent=\"onMouseDown\" class=\"dojoFloatingPane\">\n\t<div dojoAttachPoint=\"titleBar\" class=\"dojoFloatingPaneTitleBar\"  style=\"display:none\">\n\t  \t<img dojoAttachPoint=\"titleBarIcon\"  class=\"dojoFloatingPaneTitleBarIcon\">\n\t\t<div dojoAttachPoint=\"closeAction\" dojoAttachEvent=\"onClick:closeWindow\"\n   \t  \t\tclass=\"dojoFloatingPaneCloseIcon\"></div>\n\t\t<div dojoAttachPoint=\"restoreAction\" dojoAttachEvent=\"onClick:restoreWindow\"\n   \t  \t\tclass=\"dojoFloatingPaneRestoreIcon\"></div>\n\t\t<div dojoAttachPoint=\"maximizeAction\" dojoAttachEvent=\"onClick:maximizeWindow\"\n   \t  \t\tclass=\"dojoFloatingPaneMaximizeIcon\"></div>\n\t\t<div dojoAttachPoint=\"minimizeAction\" dojoAttachEvent=\"onClick:minimizeWindow\"\n   \t  \t\tclass=\"dojoFloatingPaneMinimizeIcon\"></div>\n\t  \t<div dojoAttachPoint=\"titleBarText\" class=\"dojoFloatingPaneTitleText\">${this.title}</div>\n\t</div>\n\n\t<div id=\"${this.widgetId}_container\" dojoAttachPoint=\"containerNode\" class=\"dojoFloatingPaneClient\"></div>\n\n\t<div dojoAttachPoint=\"resizeBar\" class=\"dojoFloatingPaneResizebar\" style=\"display:none\"></div>\n</div>\n",templateCssString:"\n/********** Outer Window ***************/\n\n.dojoFloatingPane {\n\t/* essential css */\n\tposition: absolute;\n\toverflow: visible;\t\t/* so drop shadow is displayed */\n\tz-index: 10;\n\n\t/* styling css */\n\tborder: 1px solid;\n\tborder-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;\n\tbackground-color: ThreeDFace;\n}\n\n\n/********** Title Bar ****************/\n\n.dojoFloatingPaneTitleBar {\n\tvertical-align: top;\n\tmargin: 2px 2px 2px 2px;\n\tz-index: 10;\n\tbackground-color: #7596c6;\n\tcursor: default;\n\toverflow: hidden;\n\tborder-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;\n\tvertical-align: middle;\n}\n\n.dojoFloatingPaneTitleText {\n\tfloat: left;\n\tpadding: 2px 4px 2px 2px;\n\twhite-space: nowrap;\n\tcolor: CaptionText;\n\tfont: small-caption;\n}\n\n.dojoTitleBarIcon {\n\tfloat: left;\n\theight: 22px;\n\twidth: 22px;\n\tvertical-align: middle;\n\tmargin-right: 5px;\n\tmargin-left: 5px;\n}\n\n.dojoFloatingPaneActions{\n\tfloat: right;\n\tposition: absolute;\n\tright: 2px;\n\ttop: 2px;\n\tvertical-align: middle;\n}\n\n\n.dojoFloatingPaneActionItem {\n\tvertical-align: middle;\n\tmargin-right: 1px;\n\theight: 22px;\n\twidth: 22px;\n}\n\n\n.dojoFloatingPaneTitleBarIcon {\n\t/* essential css */\n\tfloat: left;\n\n\t/* styling css */\n\tmargin-left: 2px;\n\tmargin-right: 4px;\n\theight: 22px;\n}\n\n/* minimize/maximize icons are specified by CSS only */\n.dojoFloatingPaneMinimizeIcon,\n.dojoFloatingPaneMaximizeIcon,\n.dojoFloatingPaneRestoreIcon,\n.dojoFloatingPaneCloseIcon {\n\tvertical-align: middle;\n\theight: 22px;\n\twidth: 22px;\n\tfloat: right;\n}\n.dojoFloatingPaneMinimizeIcon {\n\tbackground-image: url(images/floatingPaneMinimize.gif);\n}\n.dojoFloatingPaneMaximizeIcon {\n\tbackground-image: url(images/floatingPaneMaximize.gif);\n}\n.dojoFloatingPaneRestoreIcon {\n\tbackground-image: url(images/floatingPaneRestore.gif);\n}\n.dojoFloatingPaneCloseIcon {\n\tbackground-image: url(images/floatingPaneClose.gif);\n}\n\n/* bar at bottom of window that holds resize handle */\n.dojoFloatingPaneResizebar {\n\tz-index: 10;\n\theight: 13px;\n\tbackground-color: ThreeDFace;\n}\n\n/************* Client Area ***************/\n\n.dojoFloatingPaneClient {\n\tposition: relative;\n\tz-index: 10;\n\tborder: 1px solid;\n\tborder-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;\n\tmargin: 2px;\n\tbackground-color: ThreeDFace;\n\tpadding: 8px;\n\tfont-family: Verdana, Helvetica, Garamond, sans-serif;\n\tfont-size: 12px;\n\toverflow: auto;\n}\n\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/FloatingPane.css"),fillInFloatingPaneTemplate:function(args,frag){
var _9a4=this.getFragNodeRef(frag);
dojo.html.copyStyle(this.domNode,_9a4);
dojo.body().appendChild(this.domNode);
if(!this.isShowing()){
this.windowState="minimized";
}
if(this.iconSrc==""){
dojo.html.removeNode(this.titleBarIcon);
}else{
this.titleBarIcon.src=this.iconSrc.toString();
}
if(this.titleBarDisplay){
this.titleBar.style.display="";
dojo.html.disableSelection(this.titleBar);
this.titleBarIcon.style.display=(this.iconSrc==""?"none":"");
this.minimizeAction.style.display=(this.displayMinimizeAction?"":"none");
this.maximizeAction.style.display=(this.displayMaximizeAction&&this.windowState!="maximized"?"":"none");
this.restoreAction.style.display=(this.displayMaximizeAction&&this.windowState=="maximized"?"":"none");
this.closeAction.style.display=(this.displayCloseAction?"":"none");
this.drag=new dojo.dnd.HtmlDragMoveSource(this.domNode);
if(this.constrainToContainer){
this.drag.constrainTo();
}
this.drag.setDragHandle(this.titleBar);
var self=this;
dojo.event.topic.subscribe("dragMove",function(info){
if(info.source.domNode==self.domNode){
dojo.event.topic.publish("floatingPaneMove",{source:self});
}
});
}
if(this.resizable){
this.resizeBar.style.display="";
this.resizeHandle=dojo.widget.createWidget("ResizeHandle",{targetElmId:this.widgetId,id:this.widgetId+"_resize"});
this.resizeBar.appendChild(this.resizeHandle.domNode);
}
if(this.hasShadow){
this.shadow=new dojo.lfx.shadow(this.domNode);
}
this.bgIframe=new dojo.html.BackgroundIframe(this.domNode);
if(this.taskBarId){
this._taskBarSetup();
}
dojo.body().removeChild(this.domNode);
},postCreate:function(){
if(dojo.hostenv.post_load_){
this._setInitialWindowState();
}else{
dojo.addOnLoad(this,"_setInitialWindowState");
}
},maximizeWindow:function(evt){
var mb=dojo.html.getMarginBox(this.domNode);
this.previous={width:mb.width||this.width,height:mb.height||this.height,left:this.domNode.style.left,top:this.domNode.style.top,bottom:this.domNode.style.bottom,right:this.domNode.style.right};
if(this.domNode.parentNode.style.overflow.toLowerCase()!="hidden"){
this.parentPrevious={overflow:this.domNode.parentNode.style.overflow};
dojo.debug(this.domNode.parentNode.style.overflow);
this.domNode.parentNode.style.overflow="hidden";
}
this.domNode.style.left=dojo.html.getPixelValue(this.domNode.parentNode,"padding-left",true)+"px";
this.domNode.style.top=dojo.html.getPixelValue(this.domNode.parentNode,"padding-top",true)+"px";
if((this.domNode.parentNode.nodeName.toLowerCase()=="body")){
var _9a9=dojo.html.getViewport();
var _9aa=dojo.html.getPadding(dojo.body());
this.resizeTo(_9a9.width-_9aa.width,_9a9.height-_9aa.height);
}else{
var _9ab=dojo.html.getContentBox(this.domNode.parentNode);
this.resizeTo(_9ab.width,_9ab.height);
}
this.maximizeAction.style.display="none";
this.restoreAction.style.display="";
if(this.resizeHandle){
this.resizeHandle.domNode.style.display="none";
}
this.drag.setDragHandle(null);
this.windowState="maximized";
},minimizeWindow:function(evt){
this.hide();
for(var attr in this.parentPrevious){
this.domNode.parentNode.style[attr]=this.parentPrevious[attr];
}
this.lastWindowState=this.windowState;
this.windowState="minimized";
},restoreWindow:function(evt){
if(this.windowState=="minimized"){
this.show();
if(this.lastWindowState=="maximized"){
this.domNode.parentNode.style.overflow="hidden";
this.windowState="maximized";
}else{
this.windowState="normal";
}
}else{
if(this.windowState=="maximized"){
for(var attr in this.previous){
this.domNode.style[attr]=this.previous[attr];
}
for(var attr in this.parentPrevious){
this.domNode.parentNode.style[attr]=this.parentPrevious[attr];
}
this.resizeTo(this.previous.width,this.previous.height);
this.previous=null;
this.parentPrevious=null;
this.restoreAction.style.display="none";
this.maximizeAction.style.display=this.displayMaximizeAction?"":"none";
if(this.resizeHandle){
this.resizeHandle.domNode.style.display="";
}
this.drag.setDragHandle(this.titleBar);
this.windowState="normal";
}else{
}
}
},toggleDisplay:function(){
if(this.windowState=="minimized"){
this.restoreWindow();
}else{
this.minimizeWindow();
}
},closeWindow:function(evt){
dojo.html.removeNode(this.domNode);
this.destroy();
},onMouseDown:function(evt){
this.bringToTop();
},bringToTop:function(){
var _9b2=dojo.widget.manager.getWidgetsByType(this.widgetType);
var _9b3=[];
for(var x=0;x<_9b2.length;x++){
if(this.widgetId!=_9b2[x].widgetId){
_9b3.push(_9b2[x]);
}
}
_9b3.sort(function(a,b){
return a.domNode.style.zIndex-b.domNode.style.zIndex;
});
_9b3.push(this);
var _9b7=100;
for(x=0;x<_9b3.length;x++){
_9b3[x].domNode.style.zIndex=_9b7+x*2;
}
},_setInitialWindowState:function(){
if(this.isShowing()){
this.width=-1;
var mb=dojo.html.getMarginBox(this.domNode);
this.resizeTo(mb.width,mb.height);
}
if(this.windowState=="maximized"){
this.maximizeWindow();
this.show();
return;
}
if(this.windowState=="normal"){
this.show();
return;
}
if(this.windowState=="minimized"){
this.hide();
return;
}
this.windowState="minimized";
},_taskBarSetup:function(){
var _9b9=dojo.widget.getWidgetById(this.taskBarId);
if(!_9b9){
if(this._taskBarConnectAttempts<this._max_taskBarConnectAttempts){
dojo.lang.setTimeout(this,this._taskBarSetup,50);
this._taskBarConnectAttempts++;
}else{
dojo.debug("Unable to connect to the taskBar");
}
return;
}
_9b9.addChild(this);
},showFloatingPane:function(){
this.bringToTop();
},onFloatingPaneShow:function(){
var mb=dojo.html.getMarginBox(this.domNode);
this.resizeTo(mb.width,mb.height);
},resizeTo:function(_9bb,_9bc){
dojo.html.setMarginBox(this.domNode,{width:_9bb,height:_9bc});
dojo.widget.html.layout(this.domNode,[{domNode:this.titleBar,layoutAlign:"top"},{domNode:this.resizeBar,layoutAlign:"bottom"},{domNode:this.containerNode,layoutAlign:"client"}]);
dojo.widget.html.layout(this.containerNode,this.children,"top-bottom");
this.bgIframe.onResized();
if(this.shadow){
this.shadow.size(_9bb,_9bc);
}
this.onResized();
},checkSize:function(){
},destroyFloatingPane:function(){
if(this.resizeHandle){
this.resizeHandle.destroy();
this.resizeHandle=null;
}
}});
dojo.widget.defineWidget("dojo.widget.FloatingPane",[dojo.widget.ContentPane,dojo.widget.FloatingPaneBase],{fillInTemplate:function(args,frag){
this.fillInFloatingPaneTemplate(args,frag);
dojo.widget.FloatingPane.superclass.fillInTemplate.call(this,args,frag);
},postCreate:function(){
dojo.widget.FloatingPaneBase.prototype.postCreate.apply(this,arguments);
dojo.widget.FloatingPane.superclass.postCreate.apply(this,arguments);
},show:function(){
dojo.widget.FloatingPane.superclass.show.apply(this,arguments);
this.showFloatingPane();
},onShow:function(){
dojo.widget.FloatingPane.superclass.onShow.call(this);
this.onFloatingPaneShow();
},destroy:function(){
this.destroyFloatingPane();
dojo.widget.FloatingPane.superclass.destroy.apply(this,arguments);
}});
dojo.widget.defineWidget("dojo.widget.ModalFloatingPane",[dojo.widget.FloatingPane,dojo.widget.ModalDialogBase],{windowState:"minimized",displayCloseAction:true,postCreate:function(){
dojo.widget.ModalDialogBase.prototype.postCreate.call(this);
dojo.widget.ModalFloatingPane.superclass.postCreate.call(this);
},show:function(){
this.showModalDialog();
dojo.widget.ModalFloatingPane.superclass.show.apply(this,arguments);
this.bg.style.zIndex=this.domNode.style.zIndex-1;
},hide:function(){
this.hideModalDialog();
dojo.widget.ModalFloatingPane.superclass.hide.apply(this,arguments);
},closeWindow:function(){
this.hide();
dojo.widget.ModalFloatingPane.superclass.closeWindow.apply(this,arguments);
}});
dojo.provide("dojo.Deferred");
dojo.Deferred=function(_9bf){
this.chain=[];
this.id=this._nextId();
this.fired=-1;
this.paused=0;
this.results=[null,null];
this.canceller=_9bf;
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 _9c1=new dojo.Deferred();
_9c1.callback();
return _9c1;
},repr:function(){
var _9c2;
if(this.fired==-1){
_9c2="unfired";
}else{
if(this.fired==0){
_9c2="success";
}else{
_9c2="error";
}
}
return "Deferred("+this.id+", "+_9c2+")";
},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 _9ca=this.getFunctionFromArgs(cb,cbfn);
if(arguments.length>2){
_9ca=dojo.lang.curryArguments(null,_9ca,arguments,2);
}
return this.addCallbacks(_9ca,_9ca);
},addCallback:function(cb,cbfn){
var _9cd=this.getFunctionFromArgs(cb,cbfn);
if(arguments.length>2){
_9cd=dojo.lang.curryArguments(null,_9cd,arguments,2);
}
return this.addCallbacks(_9cd,null);
},addErrback:function(cb,cbfn){
var _9d0=this.getFunctionFromArgs(cb,cbfn);
if(arguments.length>2){
_9d0=dojo.lang.curryArguments(null,_9d0,arguments,2);
}
return this.addCallbacks(null,_9d0);
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 _9d3=this.chain;
var _9d4=this.fired;
var res=this.results[_9d4];
var self=this;
var cb=null;
while(_9d3.length>0&&this.paused==0){
var pair=_9d3.shift();
var f=pair[_9d4];
if(f==null){
continue;
}
try{
res=f(res);
_9d4=((res instanceof Error)?1:0);
if(res instanceof dojo.Deferred){
cb=function(res){
self._continue(res);
};
this._pause();
}
}
catch(err){
_9d4=1;
res=err;
}
}
this.fired=_9d4;
this.results[_9d4]=res;
if((cb)&&(this.paused)){
res.addBoth(cb);
}
}});
dojo.provide("dojo.widget.RichText");
if(!djConfig["useXDomain"]||djConfig["allowXdRichTextSave"]){
if(dojo.hostenv.post_load_){
(function(){
var _9db=dojo.doc().createElement("textarea");
_9db.id="dojo.widget.RichText.savedContent";
_9db.style="display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;";
dojo.body().appendChild(_9db);
})();
}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(_9e0){
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)&&(_9e0["nodeName"])){
this.domNode=_9e0;
}
if((this.domNode["nodeName"])&&(this.domNode.nodeName.toLowerCase()=="textarea")){
this.textarea=this.domNode;
var html=this._preFilterContent(this.textarea.value);
this.domNode=dojo.doc().createElement("div");
dojo.html.copyStyle(this.domNode,this.textarea);
var _9e3=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(_9e3,10);
}else{
_9e3();
}
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 _9e4=this;
dojo.event.connect(this,"postCreate",function(){
dojo.html.insertAfter(_9e4.textarea,_9e4.domNode);
});
}else{
var html=this._preFilterContent(dojo.string.trim(this.domNode.innerHTML));
}
if(html==""){
html="&nbsp;";
}
var _9e5=dojo.html.getContentBox(this.domNode);
this._oldHeight=_9e5.height;
this._oldWidth=_9e5.width;
this._firstChildContributingMargin=this._getContributingMargin(this.domNode,"top");
this._lastChildContributingMargin=this._getContributingMargin(this.domNode,"bottom");
this.savedContent=html;
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!=""&&(!djConfig["useXDomain"]||djConfig["allowXdRichTextSave"])){
var _9e6=dojo.doc().getElementById("dojo.widget.RichText.savedContent");
if(_9e6.value!=""){
var _9e7=_9e6.value.split(this._SEPARATOR);
for(var i=0;i<_9e7.length;i++){
var data=_9e7[i].split(":");
if(data[0]==this.saveName){
html=data[1];
_9e7.splice(i,1);
break;
}
}
}
dojo.event.connect("before",window,"onunload",this,"_saveContent");
}
if(h.ie70&&this.useActiveX){
dojo.debug("activeX in ie70 is not currently supported, useActiveX is ignored for now.");
this.useActiveX=false;
}
if(this.useActiveX&&h.ie){
var self=this;
setTimeout(function(){
self._drawObject(html);
},0);
}else{
if(h.ie||this._safariIsLeopard()||h.opera){
this.iframe=dojo.doc().createElement("iframe");
this.iframe.src="javascript:void(0)";
this.editorObject=this.iframe;
with(this.iframe.style){
border="0";
width="100%";
}
this.iframe.frameBorder=0;
this.editingArea.appendChild(this.iframe);
this.window=this.iframe.contentWindow;
this.document=this.window.document;
this.document.open();
this.document.write("<html><head><style>body{margin:0;padding:0;border:0;overflow:hidden;}</style></head><body><div></div></body></html>");
this.document.close();
this.editNode=this.document.body.firstChild;
this.editNode.contentEditable=true;
with(this.iframe.style){
if(h.ie70){
if(this.height){
height=this.height;
}
if(this.minHeight){
minHeight=this.minHeight;
}
}else{
height=this.height?this.height:this.minHeight;
}
}
var _9eb=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","div","ul"];
var _9ec="";
for(var i in _9eb){
if(_9eb[i].charAt(1)!="l"){
_9ec+="<"+_9eb[i]+"><span>content</span></"+_9eb[i]+">";
}else{
_9ec+="<"+_9eb[i]+"><li>content</li></"+_9eb[i]+">";
}
}
with(this.editNode.style){
position="absolute";
left="-2000px";
top="-2000px";
}
this.editNode.innerHTML=_9ec;
var node=this.editNode.firstChild;
while(node){
dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[node.firstChild]);
var _9ee=node.tagName.toLowerCase();
this._local2NativeFormatNames[_9ee]=this.queryCommandValue("formatblock");
this._native2LocalFormatNames[this._local2NativeFormatNames[_9ee]]=_9ee;
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(_9f0,side){
if(dojo.html.getPixelValue(_9f0,"border-"+side+"-width",false)){
return false;
}else{
if(dojo.html.getPixelValue(_9f0,"padding-"+side,false)){
return false;
}else{
return true;
}
}
},_getContributingMargin:function(_9f2,_9f3){
if(_9f3=="top"){
var _9f4="previousSibling";
var _9f5="nextSibling";
var _9f6="firstChild";
var _9f7="margin-top";
var _9f8="margin-bottom";
}else{
var _9f4="nextSibling";
var _9f5="previousSibling";
var _9f6="lastChild";
var _9f7="margin-bottom";
var _9f8="margin-top";
}
var _9f9=dojo.html.getPixelValue(_9f2,_9f7,false);
function isSignificantNode(_9fa){
return !(_9fa.nodeType==3&&dojo.string.isBlank(_9fa.data))&&dojo.html.getStyle(_9fa,"display")!="none"&&!dojo.html.isPositionAbsolute(_9fa);
}
var _9fb=0;
var _9fc=_9f2[_9f6];
while(_9fc){
while((!isSignificantNode(_9fc))&&_9fc[_9f5]){
_9fc=_9fc[_9f5];
}
_9fb=Math.max(_9fb,dojo.html.getPixelValue(_9fc,_9f7,false));
if(!this._hasCollapseableMargin(_9fc,_9f3)){
break;
}
_9fc=_9fc[_9f6];
}
if(!this._hasCollapseableMargin(_9f2,_9f3)){
return parseInt(_9fb);
}
var _9fd=0;
var _9fe=_9f2[_9f4];
while(_9fe){
if(isSignificantNode(_9fe)){
_9fd=dojo.html.getPixelValue(_9fe,_9f8,false);
break;
}
_9fe=_9fe[_9f4];
}
if(!_9fe){
_9fd=dojo.html.getPixelValue(_9f2.parentNode,_9f7,false);
}
if(_9fb>_9f9){
return parseInt(Math.max((_9fb-_9f9)-_9fd,0));
}else{
return 0;
}
},_drawIframe:function(html){
var _a00=Boolean(dojo.render.html.moz&&(typeof window.XML=="undefined"));
if(!this.iframe){
var _a01=(new dojo.uri.Uri(dojo.doc().location)).host;
this.iframe=dojo.doc().createElement("iframe");
with(this.iframe){
style.border="none";
style.lineHeight="0";
style.verticalAlign="bottom";
scrolling=this.height?"auto":"no";
}
}
if(djConfig["useXDomain"]&&!djConfig["dojoRichTextFrameUrl"]){
dojo.debug("dojo.widget.RichText: When using cross-domain Dojo builds,"+" please save src/widget/templates/richtextframe.html to your domain and set djConfig.dojoRichTextFrameUrl"+" to the path on your domain to richtextframe.html");
}
this.iframe.src=(djConfig["dojoRichTextFrameUrl"]||dojo.uri.moduleUri("dojo.widget","templates/richtextframe.html"))+((dojo.doc().domain!=_a01)?("#"+dojo.doc().domain):"");
this.iframe.width=this.inheritWidth?this._oldWidth:"100%";
if(this.height){
this.iframe.style.height=this.height;
}else{
var _a02=this._oldHeight;
if(this._hasCollapseableMargin(this.domNode,"top")){
_a02+=this._firstChildContributingMargin;
}
if(this._hasCollapseableMargin(this.domNode,"bottom")){
_a02+=this._lastChildContributingMargin;
}
this.iframe.height=_a02;
}
var _a03=dojo.doc().createElement("div");
_a03.innerHTML=html;
this.editingArea.appendChild(_a03);
if(this.relativeImageUrls){
var imgs=_a03.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=_a03.innerHTML;
}
var _a06=dojo.html.firstElement(_a03);
var _a07=dojo.html.lastElement(_a03);
if(_a06){
_a06.style.marginTop=this._firstChildContributingMargin+"px";
}
if(_a07){
_a07.style.marginBottom=this._lastChildContributingMargin+"px";
}
this.editingArea.appendChild(this.iframe);
if(dojo.render.html.safari){
this.iframe.src=this.iframe.src;
}
var _a08=false;
var _a09=dojo.lang.hitch(this,function(){
if(!_a08){
_a08=true;
}else{
return;
}
if(!this.editNode){
if(this.iframe.contentWindow){
this.window=this.iframe.contentWindow;
this.document=this.iframe.contentWindow.document;
}else{
if(this.iframe.contentDocument){
this.window=this.iframe.contentDocument.window;
this.document=this.iframe.contentDocument;
}
}
var _a0a=(function(_a0b){
return function(_a0c){
return dojo.html.getStyle(_a0b,_a0c);
};
})(this.domNode);
var font=_a0a("font-weight")+" "+_a0a("font-size")+" "+_a0a("font-family");
var _a0e="1.0";
var _a0f=dojo.html.getUnitValue(this.domNode,"line-height");
if(_a0f.value&&_a0f.units==""){
_a0e=_a0f.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:"+_a0e+"}"+"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(_a03);
this.document.body.innerHTML=html;
if(_a00||dojo.render.html.safari){
this.document.designMode="on";
}
this.onLoad();
}else{
dojo.html.removeNode(_a03);
this.editNode.innerHTML=html;
this.onDisplayChanged();
}
});
if(this.editNode){
_a09();
}else{
if(dojo.render.html.moz){
this.iframe.onload=function(){
setTimeout(_a09,250);
};
}else{
this.iframe.onload=_a09;
}
}
},_applyEditingAreaStyleSheets:function(){
var _a10=[];
if(this.styleSheets){
_a10=this.styleSheets.split(";");
this.styleSheets="";
}
_a10=_a10.concat(this.editingAreaStyleSheets);
this.editingAreaStyleSheets=[];
if(_a10.length>0){
for(var i=0;i<_a10.length;i++){
var url=_a10[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 _a16=this.document.createElement("link");
with(_a16){
rel="stylesheet";
type="text/css";
href=url;
}
head.appendChild(_a16);
}
},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 _a19=dojo.lang.find(this.editingAreaStyleSheets,url);
if(_a19==-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[_a19];
var _a1a=this.document.getElementsByTagName("link");
for(var i=0;i<_a1a.length;i++){
if(_a1a[i].href==url){
if(dojo.render.html.ie){
_a1a[i].href="";
}
dojo.html.removeNode(_a1a[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 _a1f=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){
_a1f=true;
}
}
try{
var _a20=new ActiveXObject("DEGetBlockFmtNamesParam.DEGetBlockFmtNamesParam");
obj.ExecCommand(this._activeX.command["getblockformatnames"],0,_a20);
var _a21=new VBArray(_a20.Names);
var _a22=_a21.toArray();
var _a23=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","ul","","","","","div"];
for(var i=0;i<_a23.length;++i){
if(_a23[i].length>0){
this._local2NativeFormatNames[_a22[i]]=_a23[i];
this._native2LocalFormatNames[_a23[i]]=_a22[i];
}
}
}
catch(e){
_a1f=true;
}
if(obj&&!this.object){
dojo.body().removeChild(obj);
}
}
return !_a1f;
},_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 _a27=dojo.event.browser.addListener;
var self=this;
dojo.lang.forEach(this.events,function(e){
var l=_a27(self.document,e.substr(2).toLowerCase(),dojo.lang.hitch(self,e));
if(e=="onBlur"){
var _a2b={unBlur:function(e){
dojo.event.browser.removeListener(doc,"blur",l);
}};
dojo.event.connect("before",self,"close",_a2b,"unBlur");
}
});
}
}
}else{
if(dojo.render.html.ie){
if(!this.height){
this.connect(this,"onDisplayChanged","_updateHeight");
}
this.editNode.style.zoom=1;
}
}
}
this._applyEditingAreaStyleSheets();
if(this.focusOnLoad){
this.focus();
}
this.onDisplayChanged(e);
if(this.onLoadDeferred){
this.onLoadDeferred.callback(true);
}
},onKeyDown:function(e){
if((!e)&&(this.object)){
e=dojo.event.browser.fixEvent(this.window.event);
}
if((dojo.render.html.ie)&&(e.keyCode==e.KEY_TAB)){
e.preventDefault();
e.stopPropagation();
this.execCommand((e.shiftKey?"outdent":"indent"));
}else{
if(dojo.render.html.ie){
if((65<=e.keyCode)&&(e.keyCode<=90)){
e.charCode=e.keyCode;
this.onKeyPress(e);
}
}
}
},onKeyUp:function(e){
return;
},KEY_CTRL:1,onKeyPress:function(e){
if((!e)&&(this.object)){
e=dojo.event.browser.fixEvent(this.window.event);
}
var _a30=e.ctrlKey?this.KEY_CTRL:0;
if(this._keyHandlers[e.key]){
var _a31=this._keyHandlers[e.key],i=0,_a33;
while(_a33=_a31[i++]){
if(_a30==_a33.modifiers){
e.preventDefault();
_a33.handler.call(this);
break;
}
}
}
dojo.lang.setTimeout(this,this.onKeyPressed,1,e);
},addKeyHandler:function(key,_a35,_a36){
if(!(this._keyHandlers[key] instanceof Array)){
this._keyHandlers[key]=[];
}
this._keyHandlers[key].push({modifiers:_a35||0,handler:_a36});
},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 _a3e=cmd.toLowerCase();
if(_a3e=="formatblock"){
if(drh.safari){
_a3e="heading";
}
}else{
if(this.object){
switch(_a3e){
case "createlink":
_a3e="hyperlink";
break;
case "insertimage":
_a3e="image";
break;
}
}else{
if(_a3e=="hilitecolor"&&!drh.mozilla){
_a3e="backcolor";
}
}
}
return _a3e;
},_safariIsLeopard:function(){
var _a3f=false;
if(dojo.render.html.safari){
var tmp=dojo.render.html.UA.split("AppleWebKit/")[1];
var ver=parseFloat(tmp.split(" ")[0]);
if(ver>=420){
_a3f=true;
}
}
return _a3f;
},queryCommandAvailable:function(_a42){
var ie=1;
var _a44=1<<1;
var _a45=1<<2;
var _a46=1<<3;
var _a47=1<<4;
var _a48=this._safariIsLeopard();
function isSupportedBy(_a49){
return {ie:Boolean(_a49&ie),mozilla:Boolean(_a49&_a44),safari:Boolean(_a49&_a45),safari420:Boolean(_a49&_a47),opera:Boolean(_a49&_a46)};
}
var _a4a=null;
switch(_a42.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":
_a4a=isSupportedBy(_a44|ie|_a45|_a46);
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":
_a4a=isSupportedBy(_a44|ie|_a46|_a47);
break;
case "blockdirltr":
case "blockdirrtl":
case "dirltr":
case "dirrtl":
case "inlinedirltr":
case "inlinedirrtl":
_a4a=isSupportedBy(ie);
break;
case "cut":
case "copy":
case "paste":
_a4a=isSupportedBy(ie|_a44|_a47);
break;
case "inserttable":
_a4a=isSupportedBy(_a44|(this.object?ie:0));
break;
case "insertcell":
case "insertcol":
case "insertrow":
case "deletecells":
case "deletecols":
case "deleterows":
case "mergecells":
case "splitcell":
_a4a=isSupportedBy(this.object?ie:0);
break;
default:
return false;
}
return (dojo.render.html.ie&&_a4a.ie)||(dojo.render.html.mozilla&&_a4a.mozilla)||(dojo.render.html.safari&&_a4a.safari)||(_a48&&_a4a.safari420)||(dojo.render.html.opera&&_a4a.opera);
},execCommand:function(_a4b,_a4c){
var _a4d;
this.focus();
_a4b=this._normalizeCommand(_a4b);
if(_a4c!=undefined){
if(_a4b=="heading"){
throw new Error("unimplemented");
}else{
if(_a4b=="formatblock"){
if(this.object){
_a4c=this._native2LocalFormatNames[_a4c];
}else{
if(dojo.render.html.ie){
_a4c="<"+_a4c+">";
}
}
}
}
}
if(this.object){
switch(_a4b){
case "hilitecolor":
_a4b="setbackcolor";
break;
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_a4b="set"+_a4b;
break;
case "formatblock":
_a4b="setblockformat";
}
if(_a4b=="strikethrough"){
_a4b="inserthtml";
var _a4e=this.document.selection.createRange();
if(!_a4e.htmlText){
return;
}
_a4c=_a4e.htmlText.strike();
}else{
if(_a4b=="inserthorizontalrule"){
_a4b="inserthtml";
_a4c="<hr>";
}
}
if(_a4b=="inserthtml"){
var _a4e=this.document.selection.createRange();
if(this.document.selection.type.toUpperCase()=="CONTROL"){
for(var i=0;i<_a4e.length;i++){
_a4e.item(i).outerHTML=_a4c;
}
}else{
_a4e.pasteHTML(_a4c);
_a4e.select();
}
_a4d=true;
}else{
if(arguments.length==1){
_a4d=this.object.ExecCommand(this._activeX.command[_a4b],this._activeX.ui.noprompt);
}else{
_a4d=this.object.ExecCommand(this._activeX.command[_a4b],this._activeX.ui.noprompt,_a4c);
}
}
}else{
if(_a4b=="inserthtml"){
if(dojo.render.html.ie){
var _a50=this.document.selection.createRange();
_a50.pasteHTML(_a4c);
_a50.select();
return true;
}else{
return this.document.execCommand(_a4b,false,_a4c);
}
}else{
if((_a4b=="unlink")&&(this.queryCommandEnabled("unlink"))&&(dojo.render.html.mozilla)){
var _a51=this.window.getSelection();
var _a52=_a51.getRangeAt(0);
var _a53=_a52.startContainer;
var _a54=_a52.startOffset;
var _a55=_a52.endContainer;
var _a56=_a52.endOffset;
var a=dojo.withGlobal(this.window,"getAncestorElement",dojo.html.selection,["a"]);
dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[a]);
_a4d=this.document.execCommand("unlink",false,null);
var _a52=this.document.createRange();
_a52.setStart(_a53,_a54);
_a52.setEnd(_a55,_a56);
_a51.removeAllRanges();
_a51.addRange(_a52);
return _a4d;
}else{
if((_a4b=="hilitecolor")&&(dojo.render.html.mozilla)){
this.document.execCommand("useCSS",false,false);
_a4d=this.document.execCommand(_a4b,false,_a4c);
this.document.execCommand("useCSS",false,true);
}else{
if((dojo.render.html.ie)&&((_a4b=="backcolor")||(_a4b=="forecolor"))){
_a4c=arguments.length>1?_a4c:null;
_a4d=this.document.execCommand(_a4b,false,_a4c);
}else{
_a4c=arguments.length>1?_a4c:null;
if(_a4c||_a4b!="createlink"){
_a4d=this.document.execCommand(_a4b,false,_a4c);
}
}
}
}
}
}
this.onDisplayChanged();
return _a4d;
},queryCommandEnabled:function(_a58){
_a58=this._normalizeCommand(_a58);
if(this.object){
switch(_a58){
case "hilitecolor":
_a58="setbackcolor";
break;
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_a58="set"+_a58;
break;
case "formatblock":
_a58="setblockformat";
break;
case "strikethrough":
_a58="bold";
break;
case "inserthorizontalrule":
return true;
}
if(typeof this._activeX.command[_a58]=="undefined"){
return false;
}
var _a59=this.object.QueryStatus(this._activeX.command[_a58]);
return ((_a59!=this._activeX.status.notsupported)&&(_a59!=this._activeX.status.disabled));
}else{
if(dojo.render.html.mozilla){
if(_a58=="unlink"){
return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["a"]);
}else{
if(_a58=="inserttable"){
return true;
}
}
}
var elem=(dojo.render.html.ie)?this.document.selection.createRange():this.document;
return elem.queryCommandEnabled(_a58);
}
},queryCommandState:function(_a5b){
_a5b=this._normalizeCommand(_a5b);
if(this.object){
if(_a5b=="forecolor"){
_a5b="setforecolor";
}else{
if(_a5b=="backcolor"){
_a5b="setbackcolor";
}else{
if(_a5b=="strikethrough"){
return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["strike"]);
}else{
if(_a5b=="inserthorizontalrule"){
return false;
}
}
}
}
if(typeof this._activeX.command[_a5b]=="undefined"){
return null;
}
var _a5c=this.object.QueryStatus(this._activeX.command[_a5b]);
return ((_a5c==this._activeX.status.latched)||(_a5c==this._activeX.status.ninched));
}else{
return this.document.queryCommandState(_a5b);
}
},queryCommandValue:function(_a5d){
_a5d=this._normalizeCommand(_a5d);
if(this.object){
switch(_a5d){
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_a5d="get"+_a5d;
return this.object.execCommand(this._activeX.command[_a5d],this._activeX.ui.noprompt);
case "formatblock":
var _a5e=this.object.execCommand(this._activeX.command["getblockformat"],this._activeX.ui.noprompt);
if(_a5e){
return this._local2NativeFormatNames[_a5e];
}
}
}else{
if(dojo.render.html.ie&&_a5d=="formatblock"){
return this._local2NativeFormatNames[this.document.queryCommandValue(_a5d)]||this.document.queryCommandValue(_a5d);
}
return this.document.queryCommandValue(_a5d);
}
},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 _a6a=dojo.html.getBorderBox(this.editNode).height;
if(!_a6a){
_a6a=dojo.html.getBorderBox(this.document.body).height;
}
if(_a6a==0){
dojo.debug("Can not figure out the height of the editing area!");
return;
}
this._lastHeight=_a6a;
this.editorObject.style.height=this._lastHeight+"px";
this.window.scrollTo(0,0);
},_saveContent:function(e){
var _a6c=dojo.doc().getElementById("dojo.widget.RichText.savedContent");
_a6c.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 _a6f=dojo.global().location.protocol+"//"+dojo.global().location.host;
var _a70=dojo.global().location.pathname;
if(_a70.match(/\/$/)){
}else{
var _a71=_a70.split("/");
if(_a71.length){
_a71.pop();
}
_a70=_a71.join("/")+"/";
}
var _a72=new RegExp("(<img[^>]* src=[\"'])("+_a6f+"("+_a70+")?)","ig");
ec=ec.replace(_a72,"$1");
}
return ec;
},close:function(save,_a74){
if(this.isClosed){
return false;
}
if(arguments.length==0){
save=true;
}
this._content=this._postFilterContent(this.editNode.innerHTML);
var _a75=(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 _a75;
},destroyRendering:function(){
},destroy:function(){
this.destroyRendering();
if(!this.isClosed){
this.close(false);
}
dojo.widget.RichText.superclass.destroy.call(this);
},connect:function(_a77,_a78,_a79){
dojo.event.connect(_a77,_a78,this,_a79);
},disconnect:function(_a7a,_a7b,_a7c){
dojo.event.disconnect(_a7a,_a7b,this,_a7c);
},disconnectAllWithRoot:function(_a7d){
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(_a7f){
dojo.deprecated("dojo.lang.whatAmI","use dojo.lang.getType instead","0.5");
return dojo.lang.getType(_a7f);
};
dojo.lang.whatAmI.custom={};
dojo.lang.getType=function(_a80){
try{
if(dojo.lang.isArray(_a80)){
return "array";
}
if(dojo.lang.isFunction(_a80)){
return "function";
}
if(dojo.lang.isString(_a80)){
return "string";
}
if(dojo.lang.isNumber(_a80)){
return "number";
}
if(dojo.lang.isBoolean(_a80)){
return "boolean";
}
if(dojo.lang.isAlien(_a80)){
return "alien";
}
if(dojo.lang.isUndefined(_a80)){
return "undefined";
}
for(var name in dojo.lang.whatAmI.custom){
if(dojo.lang.whatAmI.custom[name](_a80)){
return name;
}
}
if(dojo.lang.isObject(_a80)){
return "object";
}
}
catch(e){
}
return "unknown";
};
dojo.lang.isNumeric=function(_a82){
return (!isNaN(_a82)&&isFinite(_a82)&&(_a82!=null)&&!dojo.lang.isBoolean(_a82)&&!dojo.lang.isArray(_a82)&&!/^\s*$/.test(_a82));
};
dojo.lang.isBuiltIn=function(_a83){
return (dojo.lang.isArray(_a83)||dojo.lang.isFunction(_a83)||dojo.lang.isString(_a83)||dojo.lang.isNumber(_a83)||dojo.lang.isBoolean(_a83)||(_a83==null)||(_a83 instanceof Error)||(typeof _a83=="error"));
};
dojo.lang.isPureObject=function(_a84){
return ((_a84!=null)&&dojo.lang.isObject(_a84)&&_a84.constructor==Object);
};
dojo.lang.isOfType=function(_a85,type,_a87){
var _a88=false;
if(_a87){
_a88=_a87["optional"];
}
if(_a88&&((_a85===null)||dojo.lang.isUndefined(_a85))){
return true;
}
if(dojo.lang.isArray(type)){
var _a89=type;
for(var i in _a89){
var _a8b=_a89[i];
if(dojo.lang.isOfType(_a85,_a8b)){
return true;
}
}
return false;
}else{
if(dojo.lang.isString(type)){
type=type.toLowerCase();
}
switch(type){
case Array:
case "array":
return dojo.lang.isArray(_a85);
case Function:
case "function":
return dojo.lang.isFunction(_a85);
case String:
case "string":
return dojo.lang.isString(_a85);
case Number:
case "number":
return dojo.lang.isNumber(_a85);
case "numeric":
return dojo.lang.isNumeric(_a85);
case Boolean:
case "boolean":
return dojo.lang.isBoolean(_a85);
case Object:
case "object":
return dojo.lang.isObject(_a85);
case "pureobject":
return dojo.lang.isPureObject(_a85);
case "builtin":
return dojo.lang.isBuiltIn(_a85);
case "alien":
return dojo.lang.isAlien(_a85);
case "undefined":
return dojo.lang.isUndefined(_a85);
case null:
case "null":
return (_a85===null);
case "optional":
dojo.deprecated("dojo.lang.isOfType(value, [type, \"optional\"])","use dojo.lang.isOfType(value, type, {optional: true} ) instead","0.5");
return ((_a85===null)||dojo.lang.isUndefined(_a85));
default:
if(dojo.lang.isFunction(type)){
return (_a85 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 _a8d=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_a8d[i++]];
}while(i<_a8d.length&&obj);
return (obj!=dj_global)?obj:null;
};
dojo.lang.doesObjectExist=function(str){
var _a91=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_a91[i++]];
}while(i<_a91.length&&obj);
return (obj&&obj!=dj_global);
};
dojo.provide("dojo.lang.assert");
dojo.lang.assert=function(_a94,_a95){
if(!_a94){
var _a96="An assert statement failed.\n"+"The method dojo.lang.assert() was called with a 'false' value.\n";
if(_a95){
_a96+="Here's the assert message:\n"+_a95+"\n";
}
throw new Error(_a96);
}
};
dojo.lang.assertType=function(_a97,type,_a99){
if(dojo.lang.isString(_a99)){
dojo.deprecated("dojo.lang.assertType(value, type, \"message\")","use dojo.lang.assertType(value, type) instead","0.5");
}
if(!dojo.lang.isOfType(_a97,type,_a99)){
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(_a9a,_a9b,_a9c){
var key;
if(!_a9c){
if(!dojo.lang.assertValidKeywords._errorMessage){
dojo.lang.assertValidKeywords._errorMessage="In dojo.lang.assertValidKeywords(), found invalid keyword:";
}
_a9c=dojo.lang.assertValidKeywords._errorMessage;
}
if(dojo.lang.isArray(_a9b)){
for(key in _a9a){
if(!dojo.lang.inArray(_a9b,key)){
dojo.lang.assert(false,_a9c+" "+key);
}
}
}else{
for(key in _a9a){
if(!(key in _a9b)){
dojo.lang.assert(false,_a9c+" "+key);
}
}
}
};
dojo.provide("dojo.AdapterRegistry");
dojo.AdapterRegistry=function(_a9e){
this.pairs=[];
this.returnWrappers=_a9e||false;
};
dojo.lang.extend(dojo.AdapterRegistry,{register:function(name,_aa0,wrap,_aa2,_aa3){
var type=(_aa3)?"unshift":"push";
this.pairs[type]([name,_aa0,wrap,_aa2]);
},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,_aab,wrap,_aad){
dojo.lang.reprRegistry.register(name,_aab,wrap,_aad);
};
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.kwCompoundRequire({common:["dojo.lang.common","dojo.lang.assert","dojo.lang.array","dojo.lang.type","dojo.lang.func","dojo.lang.extras","dojo.lang.repr","dojo.lang.declare"]});
dojo.provide("dojo.lang.*");
dojo.provide("dojo.widget.PopupContainer");
dojo.declare("dojo.widget.PopupContainerBase",null,function(){
this.queueOnAnimationFinish=[];
},{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,_ab6,_ab7,_ab8,_ab9){
if(this.isShowingNow){
return;
}
if(this.animationInProgress){
this.queueOnAnimationFinish.push(this.open,arguments);
return;
}
this.aboutToShow();
var _aba=false,node,_abc;
if(typeof x=="object"){
node=x;
_abc=_ab7;
_ab7=_ab6;
_ab6=y;
_aba=true;
}
this.parent=_ab6;
dojo.body().appendChild(this.domNode);
_ab7=_ab7||_ab6["domNode"]||[];
var _abd=null;
this.isTopLevel=true;
while(_ab6){
if(_ab6!==this&&(_ab6.setOpenedSubpopup!=undefined&&_ab6.applyPopupBasicStyle!=undefined)){
_abd=_ab6;
this.isTopLevel=false;
_abd.setOpenedSubpopup(this);
break;
}
_ab6=_ab6.parent;
}
this.parentPopup=_abd;
this.popupIndex=_abd?_abd.popupIndex+1:1;
if(this.isTopLevel){
var _abe=dojo.html.isNode(_ab7)?_ab7:null;
dojo.widget.PopupManager.opened(this,_abe);
}
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(_ab7 instanceof Array){
_ab7={left:_ab7[0],top:_ab7[1],width:0,height:0};
}
with(this.domNode.style){
display="";
zIndex=this.beginZIndex+this.popupIndex;
}
if(_aba){
this.move(node,_ab9,_abc);
}else{
this.move(x,y,_ab9,_ab8);
}
this.domNode.style.display="none";
this.explodeSrc=_ab7;
this.show();
this.isShowingNow=true;
},move:function(x,y,_ac1,_ac2){
var _ac3=(typeof x=="object");
if(_ac3){
var _ac4=_ac1;
var node=x;
_ac1=y;
if(!_ac4){
_ac4={"BL":"TL","TL":"BL"};
}
dojo.html.placeOnScreenAroundElement(this.domNode,node,_ac1,this.aroundBox,_ac4);
}else{
if(!_ac2){
_ac2="TL,TR,BL,BR";
}
dojo.html.placeOnScreen(this.domNode,x,y,_ac1,true,_ac2);
}
},close:function(_ac6){
if(_ac6){
this.domNode.style.display="none";
}
if(this.animationInProgress){
this.queueOnAnimationFinish.push(this.close,[]);
return;
}
this.closeSubpopup(_ac6);
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(_ac7){
if(this.parentPopup){
this.parentPopup.closeAll(_ac7);
}else{
this.close(_ac7);
}
},setOpenedSubpopup:function(_ac8){
this.currentSubpopup=_ac8;
},closeSubpopup:function(_ac9){
if(this.currentSubpopup==null){
return;
}
this.currentSubpopup.close(_ac9);
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],{isContainer:true,fillInTemplate:function(){
this.applyPopupBasicStyle();
dojo.widget.PopupContainer.superclass.fillInTemplate.apply(this,arguments);
}});
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(_acd){
if(!_acd){
_acd=dojo.html.getDocumentWindow(window.top&&window.top.document||window.document);
}
this.registerWin(_acd);
for(var i=0;i<_acd.frames.length;i++){
try{
var win=dojo.html.getDocumentWindow(_acd.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,_ad4){
if(menu==this.currentMenu){
return;
}
if(this.currentMenu){
this.currentMenu.close();
}
this.currentMenu=menu;
this.currentFocusMenu=menu;
this.currentButton=_ad4;
};
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||m.parentMenu;
}
},this.onClick=function(e){
if(!this.currentMenu){
return;
}
var _ad9=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.closeAll(true);
};
};
dojo.provide("dojo.widget.ColorPalette");
dojo.widget.defineWidget("dojo.widget.ColorPalette",dojo.widget.HtmlWidget,{palette:"7x10",_palettes:{"7x10":[["fff","fcc","fc9","ff9","ffc","9f9","9ff","cff","ccf","fcf"],["ccc","f66","f96","ff6","ff3","6f9","3ff","6ff","99f","f9f"],["c0c0c0","f00","f90","fc6","ff0","3f3","6cc","3cf","66c","c6c"],["999","c00","f60","fc3","fc0","3c0","0cc","36f","63f","c3c"],["666","900","c60","c93","990","090","399","33f","60c","939"],["333","600","930","963","660","060","366","009","339","636"],["000","300","630","633","330","030","033","006","309","303"]],"3x4":[["ffffff","00ff00","008000","0000ff"],["c0c0c0","ffff00","ff00ff","000080"],["808080","ff0000","800080","000000"]]},buildRendering:function(){
this.domNode=document.createElement("table");
dojo.html.disableSelection(this.domNode);
dojo.event.connect(this.domNode,"onmousedown",function(e){
e.preventDefault();
});
with(this.domNode){
cellPadding="0";
cellSpacing="1";
border="1";
style.backgroundColor="white";
}
var _adc=this._palettes[this.palette];
for(var i=0;i<_adc.length;i++){
var tr=this.domNode.insertRow(-1);
for(var j=0;j<_adc[i].length;j++){
if(_adc[i][j].length==3){
_adc[i][j]=_adc[i][j].replace(/(.)(.)(.)/,"$1$1$2$2$3$3");
}
var td=tr.insertCell(-1);
with(td.style){
backgroundColor="#"+_adc[i][j];
border="1px solid gray";
width=height="15px";
fontSize="1px";
}
td.color="#"+_adc[i][j];
td.onmouseover=function(e){
this.style.borderColor="white";
};
td.onmouseout=function(e){
this.style.borderColor="gray";
};
dojo.event.connect(td,"onmousedown",this,"onClick");
td.innerHTML="&nbsp;";
}
}
},onClick:function(e){
this.onColorSelect(e.currentTarget.color);
e.currentTarget.style.borderColor="gray";
},onColorSelect:function(_ae4){
}});
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,_aef,_af0){
this._domNode=node;
var cmd=_aef.parent.getCommand(this._name);
if(cmd){
this._domNode.title=cmd.getText();
}
this.disableSelection(this._domNode);
this._parentToolbar=_aef;
dojo.event.connect(this._domNode,"onclick",this,"onClick");
if(!_af0){
dojo.event.connect(this._domNode,"onmouseover",this,"onMouseOver");
dojo.event.connect(this._domNode,"onmouseout",this,"onMouseOut");
}
},disableSelection:function(_af2){
dojo.html.disableSelection(_af2);
var _af3=_af2.all||_af2.getElementsByTagName("*");
for(var x=0;x<_af3.length;x++){
dojo.html.disableSelection(_af3[x]);
}
},onMouseOver:function(){
var _af5=dojo.widget.Editor2Manager.getCurrentInstance();
if(_af5){
var _af6=_af5.getCommand(this._name);
if(_af6&&_af6.getState()!=dojo.widget.Editor2Manager.commandState.Disabled){
this.highlightToolbarItem();
}
}
},onMouseOut:function(){
this.unhighlightToolbarItem();
},destroy:function(){
this._domNode=null;
this._parentToolbar=null;
},onClick:function(e){
if(this._domNode&&!this._domNode.disabled&&this._parentToolbar.checkAvailability()){
e.preventDefault();
e.stopPropagation();
var _af8=dojo.widget.Editor2Manager.getCurrentInstance();
if(_af8){
var _af9=_af8.getCommand(this._name);
if(_af9){
_af9.execute();
}
}
}
},refreshState:function(){
var _afa=dojo.widget.Editor2Manager.getCurrentInstance();
var em=dojo.widget.Editor2Manager;
if(_afa){
var _afc=_afa.getCommand(this._name);
if(_afc){
var _afd=_afc.getState();
if(_afd!=this._lastState){
switch(_afd){
case em.commandState.Latched:
this.latchToolbarItem();
break;
case em.commandState.Enabled:
this.enableToolbarItem();
break;
case em.commandState.Disabled:
default:
this.disableToolbarItem();
}
this._lastState=_afd;
}
}
}
return em.commandState.Enabled;
},latchToolbarItem:function(){
this._domNode.disabled=false;
this.removeToolbarItemStyle(this._domNode);
dojo.html.addClass(this._domNode,this._parentToolbar.ToolbarLatchedItemStyle);
},enableToolbarItem:function(){
this._domNode.disabled=false;
this.removeToolbarItemStyle(this._domNode);
dojo.html.addClass(this._domNode,this._parentToolbar.ToolbarEnabledItemStyle);
},disableToolbarItem:function(){
this._domNode.disabled=true;
this.removeToolbarItemStyle(this._domNode);
dojo.html.addClass(this._domNode,this._parentToolbar.ToolbarDisabledItemStyle);
},highlightToolbarItem:function(){
dojo.html.addClass(this._domNode,this._parentToolbar.ToolbarHighlightedItemStyle);
},unhighlightToolbarItem:function(){
dojo.html.removeClass(this._domNode,this._parentToolbar.ToolbarHighlightedItemStyle);
},removeToolbarItemStyle:function(){
dojo.html.removeClass(this._domNode,this._parentToolbar.ToolbarEnabledItemStyle);
dojo.html.removeClass(this._domNode,this._parentToolbar.ToolbarLatchedItemStyle);
dojo.html.removeClass(this._domNode,this._parentToolbar.ToolbarDisabledItemStyle);
this.unhighlightToolbarItem();
}});
dojo.declare("dojo.widget.Editor2ToolbarDropDownButton",dojo.widget.Editor2ToolbarButton,{onClick:function(){
if(this._domNode&&!this._domNode.disabled&&this._parentToolbar.checkAvailability()){
if(!this._dropdown){
this._dropdown=dojo.widget.createWidget("PopupContainer",{});
this._domNode.appendChild(this._dropdown.domNode);
}
if(this._dropdown.isShowingNow){
this._dropdown.close();
}else{
this.onDropDownShown();
this._dropdown.open(this._domNode,null,this._domNode);
}
}
},destroy:function(){
this.onDropDownDestroy();
if(this._dropdown){
this._dropdown.destroy();
}
dojo.widget.Editor2ToolbarDropDownButton.superclass.destroy.call(this);
},onDropDownShown:function(){
},onDropDownDestroy:function(){
}});
dojo.declare("dojo.widget.Editor2ToolbarColorPaletteButton",dojo.widget.Editor2ToolbarDropDownButton,{onDropDownShown:function(){
if(!this._colorpalette){
this._colorpalette=dojo.widget.createWidget("ColorPalette",{});
this._dropdown.addChild(this._colorpalette);
this.disableSelection(this._dropdown.domNode);
this.disableSelection(this._colorpalette.domNode);
dojo.event.connect(this._colorpalette,"onColorSelect",this,"setColor");
dojo.event.connect(this._dropdown,"open",this,"latchToolbarItem");
dojo.event.connect(this._dropdown,"close",this,"enableToolbarItem");
}
},setColor:function(_afe){
this._dropdown.close();
var _aff=dojo.widget.Editor2Manager.getCurrentInstance();
if(_aff){
var _b00=_aff.getCommand(this._name);
if(_b00){
_b00.execute(_afe);
}
}
}});
dojo.declare("dojo.widget.Editor2ToolbarFormatBlockPlainSelect",dojo.widget.Editor2ToolbarButton,{create:function(node,_b02){
this._domNode=node;
this._parentToolbar=_b02;
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 _b04=dojo.widget.Editor2Manager.getCurrentInstance();
if(_b04){
var _b05=_b04.getCommand(this._name);
if(_b05){
_b05.execute(sv);
}
}
}
},refreshState:function(){
if(this._domNode){
dojo.widget.Editor2ToolbarFormatBlockPlainSelect.superclass.refreshState.call(this);
var _b06=dojo.widget.Editor2Manager.getCurrentInstance();
if(_b06){
var _b07=_b06.getCommand(this._name);
if(_b07){
var _b08=_b07.getValue();
if(!_b08){
_b08="";
}
dojo.lang.forEach(this._domNode.options,function(item){
if(item.value.toLowerCase()==_b08.toLowerCase()){
item.selected=true;
}
});
}
}
}
}});
dojo.declare("dojo.widget.Editor2ToolbarComboItem",dojo.widget.Editor2ToolbarDropDownButton,{href:null,create:function(node,_b0b){
dojo.widget.Editor2ToolbarComboItem.superclass.create.apply(this,arguments);
if(!this._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 _b10=dojo.widget.Editor2Manager.getCurrentInstance();
if(_b10){
var _b11=_b10.getCommand(this._name);
if(_b11){
_b11.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.moduleUri("dojo.widget","templates/Editor2/EditorToolbar_FormatBlock.html"),setup:function(){
dojo.widget.Editor2ToolbarFormatBlockSelect.superclass.setup.call(this);
var _b14=this._contentPane.domNode.all||this._contentPane.domNode.getElementsByTagName("*");
this._blockNames={};
this._blockDisplayNames={};
for(var x=0;x<_b14.length;x++){
var node=_b14[x];
dojo.html.disableSelection(node);
var name=node.getAttribute("dropDownItemName");
if(name){
this._blockNames[name]=node;
var _b18=node.getElementsByTagName(name);
this._blockDisplayNames[name]=_b18[_b18.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 _b1a=dojo.widget.Editor2Manager.getCurrentInstance();
if(_b1a){
var _b1b=_b1a.getCommand(this._name);
if(_b1b){
var _b1c=_b1b.getValue();
if(_b1c==this._lastSelectedFormat&&this._blockDisplayNames){
return this._lastState;
}
this._lastSelectedFormat=_b1c;
var _b1d=this._domNode.getElementsByTagName("label")[0];
var _b1e=false;
if(this._blockDisplayNames){
for(var name in this._blockDisplayNames){
if(name==_b1c){
_b1d.innerHTML=this._blockDisplayNames[name];
_b1e=true;
break;
}
}
if(!_b1e){
_b1d.innerHTML="&nbsp;";
}
}
}
}
}
return this._lastState;
}});
dojo.declare("dojo.widget.Editor2ToolbarFontSizeSelect",dojo.widget.Editor2ToolbarComboItem,{href:dojo.uri.moduleUri("dojo.widget","templates/Editor2/EditorToolbar_FontSize.html"),setup:function(){
dojo.widget.Editor2ToolbarFormatBlockSelect.superclass.setup.call(this);
var _b20=this._contentPane.domNode.all||this._contentPane.domNode.getElementsByTagName("*");
this._fontsizes={};
this._fontSizeDisplayNames={};
for(var x=0;x<_b20.length;x++){
var node=_b20[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 _b25=dojo.widget.Editor2Manager.getCurrentInstance();
if(_b25){
var _b26=_b25.getCommand(this._name);
if(_b26){
var size=_b26.getValue();
if(size==this._lastSelectedSize&&this._fontSizeDisplayNames){
return this._lastState;
}
this._lastSelectedSize=size;
var _b28=this._domNode.getElementsByTagName("label")[0];
var _b29=false;
if(this._fontSizeDisplayNames){
for(var name in this._fontSizeDisplayNames){
if(name==size){
_b28.innerHTML=this._fontSizeDisplayNames[name];
_b29=true;
break;
}
}
if(!_b29){
_b28.innerHTML="&nbsp;";
}
}
}
}
}
return this._lastState;
}});
dojo.declare("dojo.widget.Editor2ToolbarFontNameSelect",dojo.widget.Editor2ToolbarFontSizeSelect,{href:dojo.uri.moduleUri("dojo.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\t<table cellpadding=\"1\" cellspacing=\"0\" border=\"0\">\n\t\t<tbody>\n\t\t\t<tr valign=\"top\" align=\"left\">\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"htmltoggle\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon\" \n\t\t\t\t\t\tstyle=\"background-image: none; width: 30px;\" >&lt;h&gt;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"copy\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Copy\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"paste\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Paste\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"undo\">\n\t\t\t\t\t\t<!-- FIXME: should we have the text \"undo\" here? -->\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Undo\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"redo\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Redo\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td isSpacer=\"true\">\n\t\t\t\t\t<span class=\"iconContainer\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\"\tstyle=\"width: 5px; min-width: 5px;\"></span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"createlink\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Link\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"insertimage\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Image\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"inserthorizontalrule\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_HorizontalLine \">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"bold\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Bold\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"italic\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Italic\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"underline\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Underline\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"strikethrough\">\n\t\t\t\t\t\t<span \n\t\t\t\t\t\t\tclass=\"dojoE2TBIcon dojoE2TBIcon_StrikeThrough\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td isSpacer=\"true\">\n\t\t\t\t\t<span class=\"iconContainer\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\" \n\t\t\t\t\t\t\tstyle=\"width: 5px; min-width: 5px;\"></span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"insertunorderedlist\">\n\t\t\t\t\t\t<span \n\t\t\t\t\t\t\tclass=\"dojoE2TBIcon dojoE2TBIcon_BulletedList\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"insertorderedlist\">\n\t\t\t\t\t\t<span \n\t\t\t\t\t\t\tclass=\"dojoE2TBIcon dojoE2TBIcon_NumberedList\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td isSpacer=\"true\">\n\t\t\t\t\t<span class=\"iconContainer\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\" style=\"width: 5px; min-width: 5px;\"></span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"indent\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Indent\" \n\t\t\t\t\t\t\tunselectable=\"on\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"outdent\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Outdent\" \n\t\t\t\t\t\t\tunselectable=\"on\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td isSpacer=\"true\">\n\t\t\t\t\t<span class=\"iconContainer\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\" style=\"width: 5px; min-width: 5px;\"></span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"forecolor\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_TextColor\" \n\t\t\t\t\t\t\tunselectable=\"on\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"hilitecolor\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_BackgroundColor\" \n\t\t\t\t\t\t\tunselectable=\"on\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td isSpacer=\"true\">\n\t\t\t\t\t<span class=\"iconContainer\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\" style=\"width: 5px; min-width: 5px;\"></span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"justifyleft\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_LeftJustify\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"justifycenter\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_CenterJustify\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"justifyright\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_RightJustify\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"justifyfull\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_BlockJustify\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\t\n\t\t\t\t<td>\n\t\t\t\t\t<select class=\"dojoEditorToolbarItem\" dojoETItemName=\"plainformatblock\">\n\t\t\t\t\t\t<!-- FIXME: using \"p\" here inserts a paragraph in most cases! -->\n\t\t\t\t\t\t<option value=\"\">-- format --</option>\n\t\t\t\t\t\t<option value=\"p\">Normal</option>\n\t\t\t\t\t\t<option value=\"pre\">Fixed Font</option>\n\t\t\t\t\t\t<option value=\"h1\">Main Heading</option>\n\t\t\t\t\t\t<option value=\"h2\">Section Heading</option>\n\t\t\t\t\t\t<option value=\"h3\">Sub-Heading</option>\n\t\t\t\t\t\t<!-- <option value=\"blockquote\">Block Quote</option> -->\n\t\t\t\t\t</select>\n\t\t\t\t</td>\n\t\t\t\t<td><!-- uncomment to enable save button -->\n\t\t\t\t\t<!-- save -->\n\t\t\t\t\t<!--span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"save\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Save\">&nbsp;</span>\n\t\t\t\t\t</span-->\n\t\t\t\t</td>\n\t\t\t\t<td width=\"*\">&nbsp;</td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n</div>\n",templateCssString:".StyleDropdownContainer {\n\tposition: absolute;\n\tz-index: 1000;\n\toverflow: auto;\n\tcursor: default;\n\twidth: 250px;\n\theight: 250px;\n\tbackground-color: white;\n\tborder: 1px solid black;\n}\n\n.ColorDropdownContainer {\n\tposition: absolute;\n\tz-index: 1000;\n\toverflow: auto;\n\tcursor: default;\n\twidth: 250px;\n\theight: 150px;\n\tbackground-color: white;\n\tborder: 1px solid black;\n}\n\n.EditorToolbarDomNode {\n\tbackground-image: url(buttons/bg-fade.png);\n\tbackground-repeat: repeat-x;\n\tbackground-position: 0px -50px;\n}\n\n.EditorToolbarSmallBg {\n\tbackground-image: url(images/toolbar-bg.gif);\n\tbackground-repeat: repeat-x;\n\tbackground-position: 0px 0px;\n}\n\n/*\nbody {\n\tbackground:url(images/blank.gif) fixed;\n}*/\n\n.IEFixedToolbar {\n\tposition:absolute;\n\t/* top:0; */\n\ttop: expression(eval((document.documentElement||document.body).scrollTop));\n}\n\ndiv.bigIcon {\n\twidth: 40px;\n\theight: 40px; \n\t/* background-color: white; */\n\t/* border: 1px solid #a6a7a3; */\n\tfont-family: Verdana, Trebuchet, Tahoma, Arial;\n}\n\n.iconContainer {\n\tfont-family: Verdana, Trebuchet, Tahoma, Arial;\n\tfont-size: 13px;\n\tfloat: left;\n\theight: 18px;\n\tdisplay: block;\n\t/* background-color: white; */\n\tcursor: pointer;\n\tpadding: 1px 4px 1px 1px; /* almost the same as a transparent border */\n\tborder: 0px;\n}\n\n.dojoE2TBIcon {\n\tdisplay: block;\n\ttext-align: center;\n\tmin-width: 18px;\n\twidth: 18px;\n\theight: 18px;\n\t/* background-color: #a6a7a3; */\n\tbackground-repeat: no-repeat;\n\tbackground-image: url(buttons/aggregate.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() alpha(opacity=30); /* IE */\n    opacity: 0.30; /* Safari, Opera and Mozilla */\n}\n\n.headingContainer {\n\twidth: 150px;\n\theight: 30px;\n\tmargin: 0px;\n\t/* padding-left: 5px; */\n\toverflow: hidden;\n\tline-height: 25px;\n\tborder-bottom: 1px solid black;\n\tborder-top: 1px solid white;\n}\n\n.EditorToolbarDomNode select {\n\tfont-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 { background-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",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/EditorToolbar.css"),ToolbarLatchedItemStyle:"ToolbarButtonLatched",ToolbarEnabledItemStyle:"ToolbarButtonEnabled",ToolbarDisabledItemStyle:"ToolbarButtonDisabled",ToolbarHighlightedItemStyle:"ToolbarButtonHighlighted",ToolbarHighlightedSelectStyle:"ToolbarSelectHighlighted",ToolbarHighlightedSelectItemStyle:"ToolbarSelectHighlightedItem",postCreate:function(){
var _b2b=dojo.html.getElementsByClass("dojoEditorToolbarItem",this.domNode);
this.items={};
for(var x=0;x<_b2b.length;x++){
var node=_b2b[x];
var _b2e=node.getAttribute("dojoETItemName");
if(_b2e){
var item=dojo.widget.Editor2ToolbarItemManager.getToolbarItem(_b2e);
if(item){
item.create(node,this);
this.items[_b2e.toLowerCase()]=item;
}else{
node.style.display="none";
}
}
}
},update:function(){
for(var cmd in this.items){
this.items[cmd].refreshState();
}
},shareGroup:"",checkAvailability:function(){
if(!this.shareGroup){
this.parent.focus();
return true;
}
var _b31=dojo.widget.Editor2Manager.getCurrentInstance();
if(this.shareGroup==_b31.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.uri.cache");
dojo.uri.cache={_cache:{},set:function(uri,_b34){
this._cache[uri.toString()]=_b34;
return uri;
},remove:function(uri){
delete this._cache[uri.toString()];
},get:function(uri){
var key=uri.toString();
var _b38=this._cache[key];
if(!_b38){
_b38=dojo.hostenv.getText(key);
if(_b38){
this._cache[key]=_b38;
}
}
return _b38;
},allow:function(uri){
return uri;
}};
dojo.provide("dojo.widget.Editor2Plugin.AlwaysShowToolbar");
dojo.event.topic.subscribe("dojo.widget.Editor2::onLoad",function(_b3a){
if(_b3a.toolbarAlwaysVisible){
var p=new dojo.widget.Editor2Plugin.AlwaysShowToolbar(_b3a);
}
});
dojo.declare("dojo.widget.Editor2Plugin.AlwaysShowToolbar",null,function(_b3c){
this.editor=_b3c;
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 _b42=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.moduleUri("dojo.widget","templates/images/blank.gif")+")";
backgroundAttachment="fixed";
}
}
}
var _b43=(window["pageYOffset"])?window["pageYOffset"]:(document["documentElement"]||document["body"]).scrollTop;
if(_b43>this._scrollThreshold){
if(!this._fixEnabled){
var _b44=dojo.html.getMarginBox(tdn);
this.editor.editorObject.style.marginTop=_b44.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=_b44.width+"px";
tdn.style.zIndex=1000;
this._fixEnabled=true;
}
if(!dojo.render.html.safari){
var _b45=(this.height)?parseInt(this.editor.height):this.editor._lastHeight;
if(_b43>(this._scrollThreshold+_b45)){
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(_b47,name){
var _b49;
name=name.toLowerCase();
for(var i=0;i<this._registeredHandlers.length;i++){
_b49=this._registeredHandlers[i](_b47,name);
if(_b49){
return _b49;
}
}
switch(name){
case "htmltoggle":
_b49=new dojo.widget.Editor2BrowserCommand(_b47,name);
break;
case "formatblock":
_b49=new dojo.widget.Editor2FormatBlockCommand(_b47,name);
break;
case "anchor":
_b49=new dojo.widget.Editor2Command(_b47,name);
break;
case "createlink":
_b49=new dojo.widget.Editor2DialogCommand(_b47,name,{contentFile:"dojo.widget.Editor2Plugin.CreateLinkDialog",contentClass:"Editor2CreateLinkDialog",title:"Insert/Edit Link",width:"300px",height:"200px"});
break;
case "insertimage":
_b49=new dojo.widget.Editor2DialogCommand(_b47,name,{contentFile:"dojo.widget.Editor2Plugin.InsertImageDialog",contentClass:"Editor2InsertImageDialog",title:"Insert/Edit Image",width:"400px",height:"270px"});
break;
default:
var _b4b=this.getCurrentInstance();
if((_b4b&&_b4b.queryCommandAvailable(name))||(!_b4b&&dojo.widget.Editor2.prototype.queryCommandAvailable(name))){
_b49=new dojo.widget.Editor2BrowserCommand(_b47,name);
}else{
dojo.debug("dojo.widget.Editor2Manager.getCommand: Unknown command "+name);
return;
}
}
return _b49;
},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(_b4c,name){
this._editor=_b4c;
this._updateTime=0;
this._name=name;
},{_text:"Unknown",execute:function(para){
dojo.unimplemented("dojo.widget.Editor2Command.execute");
},getText:function(){
return this._text;
},getState:function(){
return dojo.widget.Editor2Manager.commandState.Enabled;
},destroy:function(){
}});
dojo.widget.Editor2BrowserCommandNames={"bold":"Bold","copy":"Copy","cut":"Cut","Delete":"Delete","indent":"Indent","inserthorizontalrule":"Horizental Rule","insertorderedlist":"Numbered List","insertunorderedlist":"Bullet List","italic":"Italic","justifycenter":"Align Center","justifyfull":"Justify","justifyleft":"Align Left","justifyright":"Align Right","outdent":"Outdent","paste":"Paste","redo":"Redo","removeformat":"Remove Format","selectall":"Select All","strikethrough":"Strikethrough","subscript":"Subscript","superscript":"Superscript","underline":"Underline","undo":"Undo","unlink":"Remove Link","createlink":"Create Link","insertimage":"Insert Image","htmltoggle":"HTML Source","forecolor":"Foreground Color","hilitecolor":"Background Color","plainformatblock":"Paragraph Style","formatblock":"Paragraph Style","fontsize":"Font Size","fontname":"Font Name"};
dojo.lang.declare("dojo.widget.Editor2BrowserCommand",dojo.widget.Editor2Command,function(_b4f,name){
var text=dojo.widget.Editor2BrowserCommandNames[name.toLowerCase()];
if(text){
this._text=text;
}
},{execute:function(para){
this._editor.execCommand(this._name,para);
},getState:function(){
if(this._editor._lastStateTimestamp>this._updateTime||this._state==undefined){
this._updateTime=this._editor._lastStateTimestamp;
try{
if(this._editor.queryCommandEnabled(this._name)){
if(this._editor.queryCommandState(this._name)){
this._state=dojo.widget.Editor2Manager.commandState.Latched;
}else{
this._state=dojo.widget.Editor2Manager.commandState.Enabled;
}
}else{
this._state=dojo.widget.Editor2Manager.commandState.Disabled;
}
}
catch(e){
this._state=dojo.widget.Editor2Manager.commandState.Enabled;
}
}
return this._state;
},getValue:function(){
try{
return this._editor.queryCommandValue(this._name);
}
catch(e){
}
}});
dojo.lang.declare("dojo.widget.Editor2FormatBlockCommand",dojo.widget.Editor2BrowserCommand,{});
dojo.widget.defineWidget("dojo.widget.Editor2Dialog",[dojo.widget.HtmlWidget,dojo.widget.FloatingPaneBase,dojo.widget.ModalDialogBase],{templateString:"<div id=\"${this.widgetId}\" class=\"dojoFloatingPane\">\n\t<span dojoattachpoint=\"tabStartOuter\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\"\ttabindex=\"0\"></span>\n\t<span dojoattachpoint=\"tabStart\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n\t<div dojoAttachPoint=\"titleBar\" class=\"dojoFloatingPaneTitleBar\"  style=\"display:none\">\n\t  \t<img dojoAttachPoint=\"titleBarIcon\"  class=\"dojoFloatingPaneTitleBarIcon\">\n\t\t<div dojoAttachPoint=\"closeAction\" dojoAttachEvent=\"onClick:hide\"\n   \t  \t\tclass=\"dojoFloatingPaneCloseIcon\"></div>\n\t\t<div dojoAttachPoint=\"restoreAction\" dojoAttachEvent=\"onClick:restoreWindow\"\n   \t  \t\tclass=\"dojoFloatingPaneRestoreIcon\"></div>\n\t\t<div dojoAttachPoint=\"maximizeAction\" dojoAttachEvent=\"onClick:maximizeWindow\"\n   \t  \t\tclass=\"dojoFloatingPaneMaximizeIcon\"></div>\n\t\t<div dojoAttachPoint=\"minimizeAction\" dojoAttachEvent=\"onClick:minimizeWindow\"\n   \t  \t\tclass=\"dojoFloatingPaneMinimizeIcon\"></div>\n\t  \t<div dojoAttachPoint=\"titleBarText\" class=\"dojoFloatingPaneTitleText\">${this.title}</div>\n\t</div>\n\n\t<div id=\"${this.widgetId}_container\" dojoAttachPoint=\"containerNode\" class=\"dojoFloatingPaneClient\"></div>\n\t<span dojoattachpoint=\"tabEnd\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n\t<span dojoattachpoint=\"tabEndOuter\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n\t<div dojoAttachPoint=\"resizeBar\" class=\"dojoFloatingPaneResizebar\" style=\"display:none\"></div>\n</div>\n",modal:true,width:"",height:"",windowState:"minimized",displayCloseAction:true,contentFile:"",contentClass:"",fillInTemplate:function(args,frag){
this.fillInFloatingPaneTemplate(args,frag);
dojo.widget.Editor2Dialog.superclass.fillInTemplate.call(this,args,frag);
},postCreate:function(){
if(this.contentFile){
dojo.require(this.contentFile);
}
if(this.modal){
dojo.widget.ModalDialogBase.prototype.postCreate.call(this);
}else{
with(this.domNode.style){
zIndex=999;
display="none";
}
}
dojo.widget.FloatingPaneBase.prototype.postCreate.apply(this,arguments);
dojo.widget.Editor2Dialog.superclass.postCreate.call(this);
if(this.width&&this.height){
with(this.domNode.style){
width=this.width;
height=this.height;
}
}
},createContent:function(){
if(!this.contentWidget&&this.contentClass){
this.contentWidget=dojo.widget.createWidget(this.contentClass);
this.addChild(this.contentWidget);
}
},show:function(){
if(!this.contentWidget){
dojo.widget.Editor2Dialog.superclass.show.apply(this,arguments);
this.createContent();
dojo.widget.Editor2Dialog.superclass.hide.call(this);
}
if(!this.contentWidget||!this.contentWidget.loadContent()){
return;
}
this.showFloatingPane();
dojo.widget.Editor2Dialog.superclass.show.apply(this,arguments);
if(this.modal){
this.showModalDialog();
}
if(this.modal){
this.bg.style.zIndex=this.domNode.style.zIndex-1;
}
},onShow:function(){
dojo.widget.Editor2Dialog.superclass.onShow.call(this);
this.onFloatingPaneShow();
},closeWindow:function(){
this.hide();
dojo.widget.Editor2Dialog.superclass.closeWindow.apply(this,arguments);
},hide:function(){
if(this.modal){
this.hideModalDialog();
}
dojo.widget.Editor2Dialog.superclass.hide.call(this);
},checkSize:function(){
if(this.isShowing()){
if(this.modal){
this._sizeBackground();
}
this.placeModalDialog();
this.onResized();
}
}});
dojo.widget.defineWidget("dojo.widget.Editor2DialogContent",dojo.widget.HtmlWidget,{widgetsInTemplate:true,loadContent:function(){
return true;
},cancel:function(){
this.parent.hide();
}});
dojo.lang.declare("dojo.widget.Editor2DialogCommand",dojo.widget.Editor2BrowserCommand,function(_b55,name,_b57){
this.dialogParas=_b57;
},{execute:function(){
if(!this.dialog){
if(!this.dialogParas.contentFile||!this.dialogParas.contentClass){
alert("contentFile and contentClass should be set for dojo.widget.Editor2DialogCommand.dialogParas!");
return;
}
this.dialog=dojo.widget.createWidget("Editor2Dialog",this.dialogParas);
dojo.body().appendChild(this.dialog.domNode);
dojo.event.connect(this,"destroy",this.dialog,"destroy");
}
this.dialog.show();
},getText:function(){
return this.dialogParas.title||dojo.widget.Editor2DialogCommand.superclass.getText.call(this);
}});
dojo.widget.Editor2ToolbarGroups={};
dojo.widget.defineWidget("dojo.widget.Editor2",dojo.widget.RichText,function(){
this._loadedCommands={};
},{toolbarAlwaysVisible:false,toolbarWidget:null,scrollInterval:null,toolbarTemplatePath:dojo.uri.cache.set(dojo.uri.moduleUri("dojo.widget","templates/EditorToolbarOneline.html"), "<div class=\"EditorToolbarDomNode EditorToolbarSmallBg\">\n\t<table cellpadding=\"1\" cellspacing=\"0\" border=\"0\">\n\t\t<tbody>\n\t\t\t<tr valign=\"top\" align=\"left\">\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"htmltoggle\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon\" \n\t\t\t\t\t\tstyle=\"background-image: none; width: 30px;\" >&lt;h&gt;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"copy\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Copy\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"paste\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Paste\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"undo\">\n\t\t\t\t\t\t<!-- FIXME: should we have the text \"undo\" here? -->\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Undo\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"redo\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Redo\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td isSpacer=\"true\">\n\t\t\t\t\t<span class=\"iconContainer\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\"\tstyle=\"width: 5px; min-width: 5px;\"></span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"createlink\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Link\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"insertimage\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Image\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"inserthorizontalrule\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_HorizontalLine \">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"bold\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Bold\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"italic\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Italic\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"underline\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Underline\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"strikethrough\">\n\t\t\t\t\t\t<span \n\t\t\t\t\t\t\tclass=\"dojoE2TBIcon dojoE2TBIcon_StrikeThrough\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td isSpacer=\"true\">\n\t\t\t\t\t<span class=\"iconContainer\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\" \n\t\t\t\t\t\t\tstyle=\"width: 5px; min-width: 5px;\"></span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"insertunorderedlist\">\n\t\t\t\t\t\t<span \n\t\t\t\t\t\t\tclass=\"dojoE2TBIcon dojoE2TBIcon_BulletedList\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"insertorderedlist\">\n\t\t\t\t\t\t<span \n\t\t\t\t\t\t\tclass=\"dojoE2TBIcon dojoE2TBIcon_NumberedList\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td isSpacer=\"true\">\n\t\t\t\t\t<span class=\"iconContainer\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\" style=\"width: 5px; min-width: 5px;\"></span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"indent\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Indent\" \n\t\t\t\t\t\t\tunselectable=\"on\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"outdent\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Outdent\" \n\t\t\t\t\t\t\tunselectable=\"on\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td isSpacer=\"true\">\n\t\t\t\t\t<span class=\"iconContainer\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\" style=\"width: 5px; min-width: 5px;\"></span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"forecolor\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_TextColor\" \n\t\t\t\t\t\t\tunselectable=\"on\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"hilitecolor\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_BackgroundColor\" \n\t\t\t\t\t\t\tunselectable=\"on\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td isSpacer=\"true\">\n\t\t\t\t\t<span class=\"iconContainer\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Sep\" style=\"width: 5px; min-width: 5px;\"></span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"justifyleft\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_LeftJustify\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"justifycenter\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_CenterJustify\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"justifyright\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_RightJustify\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"justifyfull\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_BlockJustify\">&nbsp;</span>\n\t\t\t\t\t</span>\n\t\t\t\t</td>\t\n\t\t\t\t<td>\n\t\t\t\t\t<select class=\"dojoEditorToolbarItem\" dojoETItemName=\"plainformatblock\">\n\t\t\t\t\t\t<!-- FIXME: using \"p\" here inserts a paragraph in most cases! -->\n\t\t\t\t\t\t<option value=\"\">-- format --</option>\n\t\t\t\t\t\t<option value=\"p\">Normal</option>\n\t\t\t\t\t\t<option value=\"pre\">Fixed Font</option>\n\t\t\t\t\t\t<option value=\"h1\">Main Heading</option>\n\t\t\t\t\t\t<option value=\"h2\">Section Heading</option>\n\t\t\t\t\t\t<option value=\"h3\">Sub-Heading</option>\n\t\t\t\t\t\t<!-- <option value=\"blockquote\">Block Quote</option> -->\n\t\t\t\t\t</select>\n\t\t\t\t</td>\n\t\t\t\t<td><!-- uncomment to enable save button -->\n\t\t\t\t\t<!-- save -->\n\t\t\t\t\t<!--span class=\"iconContainer dojoEditorToolbarItem\" dojoETItemName=\"save\">\n\t\t\t\t\t\t<span class=\"dojoE2TBIcon dojoE2TBIcon_Save\">&nbsp;</span>\n\t\t\t\t\t</span-->\n\t\t\t\t</td>\n\t\t\t\t<td width=\"*\">&nbsp;</td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n</div>\n"),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){
}
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 _b58={shareGroup:this.toolbarGroup,parent:this};
_b58.templateString=dojo.uri.cache.get(this.toolbarTemplatePath);
if(this.toolbarTemplateCssPath){
_b58.templateCssPath=this.toolbarTemplateCssPath;
_b58.templateCssString=dojo.uri.cache.get(this.toolbarTemplateCssPath);
}
if(this.toolbarPlaceHolder){
this.toolbarWidget=dojo.widget.createWidget("Editor2Toolbar",_b58,dojo.byId(this.toolbarPlaceHolder),"after");
}else{
this.toolbarWidget=dojo.widget.createWidget("Editor2Toolbar",_b58,this.domNode.firstChild,"before");
}
if(this.toolbarGroup){
dojo.widget.Editor2ToolbarGroups[this.toolbarGroup]=this.toolbarWidget;
}
dojo.event.connect(this,"close",this.toolbarWidget,"hide");
this.toolbarLoaded();
}
}
dojo.event.topic.registerPublisher("Editor2.clobberFocus",this,"clobberFocus");
dojo.event.topic.subscribe("Editor2.clobberFocus",this,"setBlur");
dojo.event.topic.publish("dojo.widget.Editor2::onLoad",this);
},toolbarLoaded:function(){
},registerLoadedPlugin:function(obj){
if(!this.loadedPlugins){
this.loadedPlugins=[];
}
this.loadedPlugins.push(obj);
},unregisterLoadedPlugin:function(obj){
for(var i in this.loadedPlugins){
if(this.loadedPlugins[i]===obj){
delete this.loadedPlugins[i];
return;
}
}
dojo.debug("dojo.widget.Editor2.unregisterLoadedPlugin: unknow plugin object: "+obj);
},execCommand:function(_b5c,_b5d){
switch(_b5c.toLowerCase()){
case "htmltoggle":
this.toggleHtmlEditing();
break;
default:
dojo.widget.Editor2.superclass.execCommand.apply(this,arguments);
}
},queryCommandEnabled:function(_b5e,_b5f){
switch(_b5e.toLowerCase()){
case "htmltoggle":
return true;
default:
if(this._inSourceMode){
return false;
}
return dojo.widget.Editor2.superclass.queryCommandEnabled.apply(this,arguments);
}
},queryCommandState:function(_b60,_b61){
switch(_b60.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(_b64){
if((!this.isLoaded)||(!this.toolbarWidget)){
return;
}
var diff=new Date()-this._updateToolbarLastRan;
if((!_b64)&&(this._updateToolbarLastRan)&&((diff<this._updateToolbarFrequency))){
clearTimeout(this._updateToolbarTimer);
var _b66=this;
this._updateToolbarTimer=setTimeout(function(){
_b66.updateToolbar();
},this._updateToolbarFrequency/2);
return;
}else{
this._updateToolbarLastRan=new Date();
}
if(dojo.widget.Editor2Manager.getCurrentInstance()!==this){
return;
}
this.toolbarWidget.update();
},destroy:function(_b67){
this._htmlEditNode=null;
dojo.event.disconnect(this,"close",this.toolbarWidget,"hide");
if(!_b67){
this.toolbarWidget.destroy();
}
dojo.widget.Editor2.superclass.destroy.call(this);
},_lastStateTimestamp:0,onDisplayChanged:function(e,_b69){
this._lastStateTimestamp=(new Date()).getTime();
dojo.widget.Editor2.superclass.onDisplayChanged.call(this,e);
this.updateToolbar(_b69);
},onLoad:function(){
try{
dojo.widget.Editor2.superclass.onLoad.call(this);
}
catch(e){
dojo.debug(e);
}
this.editorOnLoad();
},onFocus:function(){
dojo.widget.Editor2.superclass.onFocus.call(this);
this.setFocus();
},getEditorContent:function(){
if(this._inSourceMode){
return this._htmlEditNode.value;
}
return dojo.widget.Editor2.superclass.getEditorContent.call(this);
},replaceEditorContent:function(html){
if(this._inSourceMode){
this._htmlEditNode.value=html;
return;
}
dojo.widget.Editor2.superclass.replaceEditorContent.apply(this,arguments);
},getCommand:function(name){
if(this._loadedCommands[name]){
return this._loadedCommands[name];
}
var cmd=dojo.widget.Editor2Manager.getCommand(this,name);
this._loadedCommands[name]=cmd;
return cmd;
},shortcuts:[["bold"],["italic"],["underline"],["selectall","a"],["insertunorderedlist","\\"]],setupDefaultShortcuts:function(){
var exec=function(cmd){
return function(){
cmd.execute();
};
};
var self=this;
dojo.lang.forEach(this.shortcuts,function(item){
var cmd=self.getCommand(item[0]);
if(cmd){
self.addKeyHandler(item[1]?item[1]:item[0].charAt(0),item[2]==undefined?self.KEY_CTRL:item[2],exec(cmd));
}
});
}});
dojo.provide("dojo.string.Builder");
dojo.string.Builder=function(str){
this.arrConcat=(dojo.render.html.capable&&dojo.render.html["ie"]);
var a=[];
var b="";
var _b75=this.length=b.length;
if(this.arrConcat){
if(b.length>0){
a.push(b);
}
b="";
}
this.toString=this.valueOf=function(){
return (this.arrConcat)?a.join(""):b;
};
this.append=function(){
for(var x=0;x<arguments.length;x++){
var s=arguments[x];
if(dojo.lang.isArrayLike(s)){
this.append.apply(this,s);
}else{
if(this.arrConcat){
a.push(s);
}else{
b+=s;
}
_b75+=s.length;
this.length=_b75;
}
}
return this;
};
this.clear=function(){
a=[];
b="";
_b75=this.length=0;
return this;
};
this.remove=function(f,l){
var s="";
if(this.arrConcat){
b=a.join("");
}
a=[];
if(f>0){
s=b.substring(0,(f-1));
}
b=s+b.substring(f+l);
_b75=this.length=b.length;
if(this.arrConcat){
a.push(b);
b="";
}
return this;
};
this.replace=function(o,n){
if(this.arrConcat){
b=a.join("");
}
a=[];
b=b.replace(o,n);
_b75=this.length=b.length;
if(this.arrConcat){
a.push(b);
b="";
}
return this;
};
this.insert=function(idx,s){
if(this.arrConcat){
b=a.join("");
}
a=[];
if(idx==0){
b=s+b;
}else{
var t=b.split("");
t.splice(idx,0,s);
b=t.join("");
}
_b75=this.length=b.length;
if(this.arrConcat){
a.push(b);
b="";
}
return this;
};
this.append.apply(this,arguments);
};
dojo.kwCompoundRequire({common:["dojo.string","dojo.string.common","dojo.string.extras","dojo.string.Builder"]});
dojo.provide("dojo.string.*");
dojo.provide("dojo.flash");
dojo.flash=function(){
};
dojo.flash={flash6_version:null,flash8_version:null,ready:false,_visible:true,_loadedListeners:new Array(),_installingListeners:new Array(),setSwf:function(_b80){
if(_b80==null||dojo.lang.isUndefined(_b80)){
return;
}
if(_b80.flash6!=null&&!dojo.lang.isUndefined(_b80.flash6)){
this.flash6_version=_b80.flash6;
}
if(_b80.flash8!=null&&!dojo.lang.isUndefined(_b80.flash8)){
this.flash8_version=_b80.flash8;
}
if(!dojo.lang.isUndefined(_b80.visible)){
this._visible=_b80.visible;
}
this._initialize();
},useFlash6:function(){
if(this.flash6_version==null){
return false;
}else{
if(this.flash6_version!=null&&dojo.flash.info.commVersion==6){
return true;
}else{
return false;
}
}
},useFlash8:function(){
if(this.flash8_version==null){
return false;
}else{
if(this.flash8_version!=null&&dojo.flash.info.commVersion==8){
return true;
}else{
return false;
}
}
},addLoadedListener:function(_b81){
this._loadedListeners.push(_b81);
},addInstallingListener:function(_b82){
this._installingListeners.push(_b82);
},loaded:function(){
dojo.flash.ready=true;
if(dojo.flash._loadedListeners.length>0){
for(var i=0;i<dojo.flash._loadedListeners.length;i++){
dojo.flash._loadedListeners[i].call(null);
}
}
},installing:function(){
if(dojo.flash._installingListeners.length>0){
for(var i=0;i<dojo.flash._installingListeners.length;i++){
dojo.flash._installingListeners[i].call(null);
}
}
},_initialize:function(){
var _b85=new dojo.flash.Install();
dojo.flash.installer=_b85;
if(_b85.needed()==true){
_b85.install();
}else{
dojo.flash.obj=new dojo.flash.Embed(this._visible);
dojo.flash.obj.write(dojo.flash.info.commVersion);
dojo.flash.comm=new dojo.flash.Communicator();
}
}};
dojo.flash.Info=function(){
if(dojo.render.html.ie){
document.writeln("<script language=\"VBScript\" type=\"text/vbscript\">");
document.writeln("Function VBGetSwfVer(i)");
document.writeln("  on error resume next");
document.writeln("  Dim swControl, swVersion");
document.writeln("  swVersion = 0");
document.writeln("  set swControl = CreateObject(\"ShockwaveFlash.ShockwaveFlash.\" + CStr(i))");
document.writeln("  if (IsObject(swControl)) then");
document.writeln("    swVersion = swControl.GetVariable(\"$version\")");
document.writeln("  end if");
document.writeln("  VBGetSwfVer = swVersion");
document.writeln("End Function");
document.writeln("</script>");
}
this._detectVersion();
this._detectCommunicationVersion();
};
dojo.flash.Info.prototype={version:-1,versionMajor:-1,versionMinor:-1,versionRevision:-1,capable:false,commVersion:6,installing:false,isVersionOrAbove:function(_b86,_b87,_b88){
_b88=parseFloat("."+_b88);
if(this.versionMajor>=_b86&&this.versionMinor>=_b87&&this.versionRevision>=_b88){
return true;
}else{
return false;
}
},getResourceList:function(_b89,_b8a){
var _b8b=new Array();
var _b8c=_b89;
_b8b.push(_b8c);
var _b8d=djConfig.baseRelativePath;
_b8c=_b8c+"?baseRelativePath="+escape(_b8d);
_b8b.push(_b8c);
_b8c+="'%20'%20quality=";
_b8b.push(_b8c);
_b8c=_b8a;
_b8b.push(_b8c);
_b8c+="?baseRelativePath="+escape(_b8d);
_b8b.push(_b8c);
_b8c+="'%20'%20quality=";
_b8b.push(_b8c);
_b8b.push(djConfig.baseRelativePath+"flash6_gateway.swf");
return _b8b;
},_detectVersion:function(){
var _b8e;
for(var _b8f=25;_b8f>0;_b8f--){
if(dojo.render.html.ie){
_b8e=VBGetSwfVer(_b8f);
}else{
_b8e=this._JSFlashInfo(_b8f);
}
if(_b8e==-1){
this.capable=false;
return;
}else{
if(_b8e!=0){
var _b90;
if(dojo.render.html.ie){
var _b91=_b8e.split(" ");
var _b92=_b91[1];
_b90=_b92.split(",");
}else{
_b90=_b8e.split(".");
}
this.versionMajor=_b90[0];
this.versionMinor=_b90[1];
this.versionRevision=_b90[2];
var _b93=this.versionMajor+"."+this.versionRevision;
this.version=parseFloat(_b93);
this.capable=true;
break;
}
}
}
},_JSFlashInfo:function(_b94){
if(navigator.plugins!=null&&navigator.plugins.length>0){
if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){
var _b95=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";
var _b96=navigator.plugins["Shockwave Flash"+_b95].description;
var _b97=_b96.split(" ");
var _b98=_b97[2].split(".");
var _b99=_b98[0];
var _b9a=_b98[1];
if(_b97[3]!=""){
var _b9b=_b97[3].split("r");
}else{
var _b9b=_b97[4].split("r");
}
var _b9c=_b9b[1]>0?_b9b[1]:0;
var _b9d=_b99+"."+_b9a+"."+_b9c;
return _b9d;
}
}
return -1;
},_detectCommunicationVersion:function(){
if(this.capable==false){
this.commVersion=null;
return;
}
if(typeof djConfig["forceFlashComm"]!="undefined"&&typeof djConfig["forceFlashComm"]!=null){
this.commVersion=djConfig["forceFlashComm"];
return;
}
if(dojo.render.html.safari==true||dojo.render.html.opera==true){
this.commVersion=8;
}else{
this.commVersion=6;
}
}};
dojo.flash.Embed=function(_b9e){
this._visible=_b9e;
};
dojo.flash.Embed.prototype={width:215,height:138,id:"flashObject",_visible:true,protocol:function(){
switch(window.location.protocol){
case "https:":
return "https";
break;
default:
return "http";
break;
}
},write:function(_b9f,_ba0){
if(dojo.lang.isUndefined(_ba0)){
_ba0=false;
}
var _ba1=new dojo.string.Builder();
_ba1.append("width: "+this.width+"px; ");
_ba1.append("height: "+this.height+"px; ");
if(this._visible==false){
_ba1.append("position: absolute; ");
_ba1.append("z-index: 10000; ");
_ba1.append("top: -1000px; ");
_ba1.append("left: -1000px; ");
}
_ba1=_ba1.toString();
var _ba2;
var _ba3;
if(_b9f==6){
_ba3=dojo.flash.flash6_version;
var _ba4=djConfig.baseRelativePath;
_ba3=_ba3+"?baseRelativePath="+escape(_ba4);
_ba2="<embed id=\""+this.id+"\" src=\""+_ba3+"\" "+"    quality=\"high\" bgcolor=\"#ffffff\" "+"    width=\""+this.width+"\" height=\""+this.height+"\" "+"    name=\""+this.id+"\" "+"    align=\"middle\" allowScriptAccess=\"sameDomain\" "+"    type=\"application/x-shockwave-flash\" swLiveConnect=\"true\" "+"    pluginspage=\""+this.protocol()+"://www.macromedia.com/go/getflashplayer\">";
}else{
_ba3=dojo.flash.flash8_version;
var _ba5=_ba3;
var _ba6=_ba3;
var _ba4=djConfig.baseRelativePath;
if(_ba0){
var _ba7=escape(window.location);
document.title=document.title.slice(0,47)+" - Flash Player Installation";
var _ba8=escape(document.title);
_ba5+="?MMredirectURL="+_ba7+"&MMplayerType=ActiveX"+"&MMdoctitle="+_ba8+"&baseRelativePath="+escape(_ba4);
_ba6+="?MMredirectURL="+_ba7+"&MMplayerType=PlugIn"+"&baseRelativePath="+escape(_ba4);
}
if(_ba6.indexOf("?")==-1){
_ba6+="?baseRelativePath="+escape(_ba4)+"' ";
}
_ba2="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" "+"codebase=\""+this.protocol()+"://fpdownload.macromedia.com/pub/shockwave/cabs/flash/"+"swflash.cab#version=8,0,0,0\" "+"width=\""+this.width+"\" "+"height=\""+this.height+"\" "+"id=\""+this.id+"\" "+"align=\"middle\"> "+"<param name=\"allowScriptAccess\" value=\"sameDomain\" /> "+"<param name=\"movie\" value=\""+_ba5+"\" /> "+"<param name=\"quality\" value=\"high\" /> "+"<param name=\"bgcolor\" value=\"#ffffff\" /> "+"<embed src=\""+_ba6+"' "+"quality=\"high\" "+"bgcolor=\"#ffffff\" "+"width=\""+this.width+"\" "+"height=\""+this.height+"\" "+"id=\""+this.id+"\" "+"name=\""+this.id+"\" "+"swLiveConnect=\"true\" "+"align=\"middle\" "+"allowScriptAccess=\"sameDomain\" "+"type=\"application/x-shockwave-flash\" "+"pluginspage=\""+this.protocol()+"://www.macromedia.com/go/getflashplayer\" />"+"</object>";
}
_ba2="<div id=\""+this.id+"Container\" style=\""+_ba1+"\"> "+_ba2+"</div>";
document.writeln(_ba2);
},get:function(){
return document.getElementById(this.id);
},setVisible:function(_ba9){
var _baa=dojo.byId(this.id+"Container");
if(_ba9==true){
_baa.style.visibility="visible";
}else{
_baa.style.position="absolute";
_baa.style.x="-1000px";
_baa.style.y="-1000px";
_baa.style.visibility="hidden";
}
},center:function(){
var _bab=this.width;
var _bac=this.height;
var _bad=dojo.html.getScroll().offset;
var _bae=dojo.html.getViewport();
var x=_bad.x+(_bae.width-_bab)/2;
var y=_bad.y+(_bae.height-_bac)/2;
var _bb1=dojo.byId(this.id+"Container");
_bb1.style.top=y+"px";
_bb1.style.left=x+"px";
}};
dojo.flash.Communicator=function(){
if(dojo.flash.useFlash6()){
this._writeFlash6();
}else{
if(dojo.flash.useFlash8()){
this._writeFlash8();
}
}
};
dojo.flash.Communicator.prototype={_writeFlash6:function(){
var id=dojo.flash.obj.id;
document.writeln("<script language=\"JavaScript\">");
document.writeln("  function "+id+"_DoFSCommand(command, args){ ");
document.writeln("    dojo.flash.comm._handleFSCommand(command, args); ");
document.writeln("}");
document.writeln("</script>");
if(dojo.render.html.ie){
document.writeln("<SCRIPT LANGUAGE=VBScript> ");
document.writeln("on error resume next ");
document.writeln("Sub "+id+"_FSCommand(ByVal command, ByVal args)");
document.writeln(" call "+id+"_DoFSCommand(command, args)");
document.writeln("end sub");
document.writeln("</SCRIPT> ");
}
},_writeFlash8:function(){
},_handleFSCommand:function(_bb3,args){
if(_bb3!=null&&!dojo.lang.isUndefined(_bb3)&&/^FSCommand:(.*)/.test(_bb3)==true){
_bb3=_bb3.match(/^FSCommand:(.*)/)[1];
}
if(_bb3=="addCallback"){
this._fscommandAddCallback(_bb3,args);
}else{
if(_bb3=="call"){
this._fscommandCall(_bb3,args);
}else{
if(_bb3=="fscommandReady"){
this._fscommandReady();
}
}
}
},_fscommandAddCallback:function(_bb5,args){
var _bb7=args;
var _bb8=function(){
return dojo.flash.comm._call(_bb7,arguments);
};
dojo.flash.comm[_bb7]=_bb8;
dojo.flash.obj.get().SetVariable("_succeeded",true);
},_fscommandCall:function(_bb9,args){
var _bbb=dojo.flash.obj.get();
var _bbc=args;
var _bbd=parseInt(_bbb.GetVariable("_numArgs"));
var _bbe=new Array();
for(var i=0;i<_bbd;i++){
var _bc0=_bbb.GetVariable("_"+i);
_bbe.push(_bc0);
}
var _bc1;
if(_bbc.indexOf(".")==-1){
_bc1=window[_bbc];
}else{
_bc1=eval(_bbc);
}
var _bc2=null;
if(!dojo.lang.isUndefined(_bc1)&&_bc1!=null){
_bc2=_bc1.apply(null,_bbe);
}
_bbb.SetVariable("_returnResult",_bc2);
},_fscommandReady:function(){
var _bc3=dojo.flash.obj.get();
_bc3.SetVariable("fscommandReady","true");
},_call:function(_bc4,args){
var _bc6=dojo.flash.obj.get();
_bc6.SetVariable("_functionName",_bc4);
_bc6.SetVariable("_numArgs",args.length);
for(var i=0;i<args.length;i++){
var _bc8=args[i];
_bc8=_bc8.replace(/\0/g,"\\0");
_bc6.SetVariable("_"+i,_bc8);
}
_bc6.TCallLabel("/_flashRunner","execute");
var _bc9=_bc6.GetVariable("_returnResult");
_bc9=_bc9.replace(/\\0/g,"\x00");
return _bc9;
},_addExternalInterfaceCallback:function(_bca){
var _bcb=function(){
var _bcc=new Array(arguments.length);
for(var i=0;i<arguments.length;i++){
_bcc[i]=arguments[i];
}
return dojo.flash.comm._execFlash(_bca,_bcc);
};
dojo.flash.comm[_bca]=_bcb;
},_encodeData:function(data){
var _bcf=/\&([^;]*)\;/g;
data=data.replace(_bcf,"&amp;$1;");
data=data.replace(/</g,"&lt;");
data=data.replace(/>/g,"&gt;");
data=data.replace("\\","&custom_backslash;&custom_backslash;");
data=data.replace(/\n/g,"\\n");
data=data.replace(/\r/g,"\\r");
data=data.replace(/\f/g,"\\f");
data=data.replace(/\0/g,"\\0");
data=data.replace(/\'/g,"\\'");
data=data.replace(/\"/g,"\\\"");
return data;
},_decodeData:function(data){
if(data==null||typeof data=="undefined"){
return data;
}
data=data.replace(/\&custom_lt\;/g,"<");
data=data.replace(/\&custom_gt\;/g,">");
data=eval("\""+data+"\"");
return data;
},_chunkArgumentData:function(_bd1,_bd2){
var _bd3=dojo.flash.obj.get();
var _bd4=Math.ceil(_bd1.length/1024);
for(var i=0;i<_bd4;i++){
var _bd6=i*1024;
var _bd7=i*1024+1024;
if(i==(_bd4-1)){
_bd7=i*1024+_bd1.length;
}
var _bd8=_bd1.substring(_bd6,_bd7);
_bd8=this._encodeData(_bd8);
_bd3.CallFunction("<invoke name=\"chunkArgumentData\" "+"returntype=\"javascript\">"+"<arguments>"+"<string>"+_bd8+"</string>"+"<number>"+_bd2+"</number>"+"</arguments>"+"</invoke>");
}
},_chunkReturnData:function(){
var _bd9=dojo.flash.obj.get();
var _bda=_bd9.getReturnLength();
var _bdb=new Array();
for(var i=0;i<_bda;i++){
var _bdd=_bd9.CallFunction("<invoke name=\"chunkReturnData\" "+"returntype=\"javascript\">"+"<arguments>"+"<number>"+i+"</number>"+"</arguments>"+"</invoke>");
if(_bdd=="\"\""||_bdd=="''"){
_bdd="";
}else{
_bdd=_bdd.substring(1,_bdd.length-1);
}
_bdb.push(_bdd);
}
var _bde=_bdb.join("");
return _bde;
},_execFlash:function(_bdf,_be0){
var _be1=dojo.flash.obj.get();
_be1.startExec();
_be1.setNumberArguments(_be0.length);
for(var i=0;i<_be0.length;i++){
this._chunkArgumentData(_be0[i],i);
}
_be1.exec(_bdf);
var _be3=this._chunkReturnData();
_be3=this._decodeData(_be3);
_be1.endExec();
return _be3;
}};
dojo.flash.Install=function(){
};
dojo.flash.Install.prototype={needed:function(){
if(dojo.flash.info.capable==false){
return true;
}
if(dojo.render.os.mac==true&&!dojo.flash.info.isVersionOrAbove(8,0,0)){
return true;
}
if(!dojo.flash.info.isVersionOrAbove(6,0,0)){
return true;
}
return false;
},install:function(){
dojo.flash.info.installing=true;
dojo.flash.installing();
if(dojo.flash.info.capable==false){
var _be4=new dojo.flash.Embed(false);
_be4.write(8);
}else{
if(dojo.flash.info.isVersionOrAbove(6,0,65)){
var _be4=new dojo.flash.Embed(false);
_be4.write(8,true);
_be4.setVisible(true);
_be4.center();
}else{
alert("This content requires a more recent version of the Macromedia "+" Flash Player.");
window.location.href=+dojo.flash.Embed.protocol()+"://www.macromedia.com/go/getflashplayer";
}
}
},_onInstallStatus:function(msg){
if(msg=="Download.Complete"){
dojo.flash._initialize();
}else{
if(msg=="Download.Cancelled"){
alert("This content requires a more recent version of the Macromedia "+" Flash Player.");
window.location.href=dojo.flash.Embed.protocol()+"://www.macromedia.com/go/getflashplayer";
}else{
if(msg=="Download.Failed"){
alert("There was an error downloading the Flash Player update. "+"Please try again later, or visit macromedia.com to download "+"the latest version of the Flash plugin.");
}
}
}
}};
dojo.flash.info=new dojo.flash.Info();
dojo.provide("dojo.storage");
dojo.storage=new function(){
};
dojo.declare("dojo.storage",null,{SUCCESS:"success",FAILED:"failed",PENDING:"pending",SIZE_NOT_AVAILABLE:"Size not available",SIZE_NO_LIMIT:"No size limit",DEFAULT_NAMESPACE:"default",onHideSettingsUI:null,initialize:function(){
dojo.unimplemented("dojo.storage.initialize");
},isAvailable:function(){
dojo.unimplemented("dojo.storage.isAvailable");
},put:function(key,_be7,_be8,_be9){
dojo.unimplemented("dojo.storage.put");
},get:function(key,_beb){
dojo.unimplemented("dojo.storage.get");
},hasKey:function(key,_bed){
return (this.get(key)!=null);
},getKeys:function(_bee){
dojo.unimplemented("dojo.storage.getKeys");
},clear:function(_bef){
dojo.unimplemented("dojo.storage.clear");
},remove:function(key,_bf1){
dojo.unimplemented("dojo.storage.remove");
},getNamespaces:function(){
dojo.unimplemented("dojo.storage.getNamespaces");
},isPermanent:function(){
dojo.unimplemented("dojo.storage.isPermanent");
},getMaximumSize:function(){
dojo.unimplemented("dojo.storage.getMaximumSize");
},hasSettingsUI:function(){
return false;
},showSettingsUI:function(){
dojo.unimplemented("dojo.storage.showSettingsUI");
},hideSettingsUI:function(){
dojo.unimplemented("dojo.storage.hideSettingsUI");
},getType:function(){
dojo.unimplemented("dojo.storage.getType");
},isValidKey:function(_bf2){
if((_bf2==null)||(typeof _bf2=="undefined")){
return false;
}
return /^[0-9A-Za-z_]*$/.test(_bf2);
},getResourceList:function(){
return new Array();
}});
dojo.storage.manager=new function(){
this.currentProvider=null;
this.available=false;
this._initialized=false;
this._providers=[];
this._onLoadListeners=new Array();
this.initialize=function(){
this.autodetect();
};
this.register=function(name,_bf4){
this._providers[this._providers.length]=_bf4;
this._providers[name]=_bf4;
};
this.setProvider=function(_bf5){
};
this.autodetect=function(){
if(this._initialized==true){
return;
}
var _bf6=null;
for(var i=0;i<this._providers.length;i++){
_bf6=this._providers[i];
if(dojo.lang.isUndefined(djConfig["forceStorageProvider"])==false&&_bf6.getType()==djConfig["forceStorageProvider"]){
_bf6.isAvailable();
break;
}else{
if(dojo.lang.isUndefined(djConfig["forceStorageProvider"])==true&&_bf6.isAvailable()){
break;
}
}
}
if(_bf6==null){
this._initialized=true;
this.available=false;
this.currentProvider=null;
dojo.raise("No storage provider found for this platform");
}
this.currentProvider=_bf6;
for(var i in _bf6){
dojo.storage[i]=_bf6[i];
}
dojo.storage.manager=this;
dojo.storage.initialize();
this._initialized=true;
this.available=true;
};
this.isAvailable=function(){
return this.available;
};
this.addOnLoad=function(func){
this._onLoadListeners.push(func);
if(this.isInitialized()==true){
this.fireLoaded();
}
};
this.removeOnLoad=function(func){
for(var i=0;i<this._onLoadListeners.length;i++){
if(func==this._onLoadListeners[i]){
this._onLoadListeners=this._onLoadListeners.splice(i,1);
break;
}
}
};
this.isInitialized=function(){
if(this.currentProvider.getType()=="dojo.storage.browser.FlashStorageProvider"&&dojo.flash.ready==false){
return false;
}else{
return this._initialized;
}
};
this.supportsProvider=function(_bfb){
try{
var _bfc=eval("new "+_bfb+"()");
var _bfd=_bfc.isAvailable();
if(_bfd==null||typeof _bfd=="undefined"){
return false;
}
return _bfd;
}
catch(exception){
return false;
}
};
this.getProvider=function(){
return this.currentProvider;
};
this.loaded=function(){
this.fireLoaded();
};
this.fireLoaded=function(){
for(var i=0;i<this._onLoadListeners.length;i++){
this._onLoadListeners[i]();
}
};
this.getResourceList=function(){
var _bff=new Array();
for(var i=0;i<dojo.storage.manager._providers.length;i++){
var _c01=dojo.storage.manager._providers[i];
var _c02=_c01.getResourceList();
for(var j=0;j<_c02.length;j++){
_bff[_bff.length]=_c02[j];
}
}
return _bff;
};
};
dojo.provide("dojo.json");
dojo.json={jsonRegistry:new dojo.AdapterRegistry(),register:function(name,_c05,wrap,_c07){
dojo.json.jsonRegistry.register(name,_c05,wrap,_c07);
},evalJson:function(json){
try{
return eval("("+json+")");
}
catch(e){
dojo.debug(e);
return json;
}
},serialize:function(o){
var _c0a=typeof (o);
if(_c0a=="undefined"){
return "undefined";
}else{
if((_c0a=="number")||(_c0a=="boolean")){
return o+"";
}else{
if(o===null){
return "null";
}
}
}
if(_c0a=="string"){
return dojo.string.escapeString(o);
}
var me=arguments.callee;
var _c0c;
if(typeof (o.__json__)=="function"){
_c0c=o.__json__();
if(o!==_c0c){
return me(_c0c);
}
}
if(typeof (o.json)=="function"){
_c0c=o.json();
if(o!==_c0c){
return me(_c0c);
}
}
if(_c0a!="function"&&typeof (o.length)=="number"){
var res=[];
for(var i=0;i<o.length;i++){
var val=me(o[i]);
if(typeof (val)!="string"){
val="undefined";
}
res.push(val);
}
return "["+res.join(",")+"]";
}
try{
window.o=o;
_c0c=dojo.json.jsonRegistry.match(o);
return me(_c0c);
}
catch(e){
}
if(_c0a=="function"){
return null;
}
res=[];
for(var k in o){
var _c11;
if(typeof (k)=="number"){
_c11="\""+k+"\"";
}else{
if(typeof (k)=="string"){
_c11=dojo.string.escapeString(k);
}else{
continue;
}
}
val=me(o[k]);
if(typeof (val)!="string"){
continue;
}
res.push(_c11+":"+val);
}
return "{"+res.join(",")+"}";
}};
dojo.provide("dojo.storage.browser");
dojo.storage.browser.WhatWGStorageProvider=function(){
};
dojo.inherits(dojo.storage.browser.WhatWGStorageProvider,dojo.storage);
dojo.lang.extend(dojo.storage.browser.WhatWGStorageProvider,{initialized:false,_domain:null,_available:null,_statusHandler:null,_allNamespaces:null,_storageEventListener:null,initialize:function(){
if(djConfig["disableWhatWGStorage"]==true){
return;
}
this._domain=location.hostname;
this.initialized=true;
dojo.storage.manager.loaded();
},isAvailable:function(){
try{
var _c12=globalStorage[location.hostname];
}
catch(e){
this._available=false;
return this._available;
}
this._available=true;
return this._available;
},put:function(key,_c14,_c15,_c16){
if(this.isValidKey(key)==false){
dojo.raise("Invalid key given: "+key);
}
key=this.getFullKey(key,_c16);
this._statusHandler=_c15;
if(dojo.lang.isString(_c14)){
_c14="string:"+_c14;
}else{
_c14=dojo.json.serialize(_c14);
}
var self=this;
var _c18=function(evt){
window.removeEventListener("storage",_c18,false);
_c15.call(null,dojo.storage.SUCCESS,key);
};
window.addEventListener("storage",_c18,false);
try{
var _c1a=globalStorage[this._domain];
_c1a.setItem(key,_c14);
}
catch(e){
this._statusHandler.call(null,dojo.storage.FAILED,key,e.toString());
}
},get:function(key,_c1c){
if(this.isValidKey(key)==false){
dojo.raise("Invalid key given: "+key);
}
key=this.getFullKey(key,_c1c);
var _c1d=globalStorage[this._domain];
var _c1e=_c1d.getItem(key);
if(_c1e==null||_c1e==""){
return null;
}
_c1e=_c1e.value;
if(!dojo.lang.isUndefined(_c1e)&&_c1e!=null&&/^string:/.test(_c1e)){
_c1e=_c1e.substring("string:".length);
}else{
_c1e=dojo.json.evalJson(_c1e);
}
return _c1e;
},getNamespaces:function(){
var _c1f=new Array();
_c1f.push(dojo.storage.DEFAULT_NAMESPACE);
var _c20=new Object();
var _c21=globalStorage[this._domain];
var _c22=/^__([^_]*)_/;
for(var i=0;i<_c21.length;i++){
var _c24=_c21.key(i);
if(_c22.test(_c24)==true){
var _c25=_c24.match(_c22)[1];
if(typeof _c20[_c25]=="undefined"){
_c20[_c25]=true;
_c1f.push(_c25);
}
}
}
return _c1f;
},getKeys:function(_c26){
if(_c26==null||typeof _c26=="undefined"){
_c26=dojo.storage.DEFAULT_NAMESPACE;
}
if(this.isValidKey(_c26)==false){
dojo.raise("Invalid namespace given: "+_c26);
}
var _c27;
if(_c26==dojo.storage.DEFAULT_NAMESPACE){
_c27=new RegExp("^([^_]{2}.*)$");
}else{
_c27=new RegExp("^__"+_c26+"_(.*)$");
}
var _c28=globalStorage[this._domain];
var _c29=new Array();
for(var i=0;i<_c28.length;i++){
var _c2b=_c28.key(i);
if(_c27.test(_c2b)==true){
_c2b=_c2b.match(_c27)[1];
_c29.push(_c2b);
}
}
return _c29;
},clear:function(_c2c){
if(_c2c==null||typeof _c2c=="undefined"){
_c2c=dojo.storage.DEFAULT_NAMESPACE;
}
if(this.isValidKey(_c2c)==false){
dojo.raise("Invalid namespace given: "+_c2c);
}
var _c2d;
if(_c2c==dojo.storage.DEFAULT_NAMESPACE){
_c2d=new RegExp("^[^_]{2}");
}else{
_c2d=new RegExp("^__"+_c2c+"_");
}
var _c2e=globalStorage[this._domain];
var keys=new Array();
for(var i=0;i<_c2e.length;i++){
if(_c2d.test(_c2e.key(i))==true){
keys[keys.length]=_c2e.key(i);
}
}
for(var i=0;i<keys.length;i++){
_c2e.removeItem(keys[i]);
}
},remove:function(key,_c32){
key=this.getFullKey(key,_c32);
var _c33=globalStorage[this._domain];
_c33.removeItem(key);
},isPermanent:function(){
return true;
},getMaximumSize:function(){
return dojo.storage.SIZE_NO_LIMIT;
},hasSettingsUI:function(){
return false;
},showSettingsUI:function(){
dojo.raise(this.getType()+" does not support a storage settings user-interface");
},hideSettingsUI:function(){
dojo.raise(this.getType()+" does not support a storage settings user-interface");
},getType:function(){
return "dojo.storage.browser.WhatWGProvider";
},getFullKey:function(key,_c35){
if(_c35==null||typeof _c35=="undefined"){
_c35=dojo.storage.DEFAULT_NAMESPACE;
}
if(this.isValidKey(_c35)==false){
dojo.raise("Invalid namespace given: "+_c35);
}
if(_c35==dojo.storage.DEFAULT_NAMESPACE){
return key;
}else{
return "__"+_c35+"_"+key;
}
}});
dojo.storage.browser.FlashStorageProvider=function(){
};
dojo.inherits(dojo.storage.browser.FlashStorageProvider,dojo.storage);
dojo.lang.extend(dojo.storage.browser.FlashStorageProvider,{initialized:false,_available:null,_statusHandler:null,initialize:function(){
if(djConfig["disableFlashStorage"]==true){
return;
}
var _c36=function(){
dojo.storage._flashLoaded();
};
dojo.flash.addLoadedListener(_c36);
var _c37=dojo.uri.moduleUri("dojo","../Storage_version6.swf").toString();
var _c38=dojo.uri.moduleUri("dojo","../Storage_version8.swf").toString();
dojo.flash.setSwf({flash6:_c37,flash8:_c38,visible:false});
},isAvailable:function(){
if(djConfig["disableFlashStorage"]==true){
this._available=false;
}else{
this._available=true;
}
return this._available;
},put:function(key,_c3a,_c3b,_c3c){
if(this.isValidKey(key)==false){
dojo.raise("Invalid key given: "+key);
}
if(_c3c==null||typeof _c3c=="undefined"){
_c3c=dojo.storage.DEFAULT_NAMESPACE;
}
if(this.isValidKey(_c3c)==false){
dojo.raise("Invalid namespace given: "+_c3c);
}
this._statusHandler=_c3b;
if(dojo.lang.isString(_c3a)){
_c3a="string:"+_c3a;
}else{
_c3a=dojo.json.serialize(_c3a);
}
dojo.flash.comm.put(key,_c3a,_c3c);
},get:function(key,_c3e){
if(this.isValidKey(key)==false){
dojo.raise("Invalid key given: "+key);
}
if(_c3e==null||typeof _c3e=="undefined"){
_c3e=dojo.storage.DEFAULT_NAMESPACE;
}
if(this.isValidKey(_c3e)==false){
dojo.raise("Invalid namespace given: "+_c3e);
}
var _c3f=dojo.flash.comm.get(key,_c3e);
if(_c3f==""){
return null;
}
if(!dojo.lang.isUndefined(_c3f)&&_c3f!=null&&/^string:/.test(_c3f)){
_c3f=_c3f.substring("string:".length);
}else{
_c3f=dojo.json.evalJson(_c3f);
}
return _c3f;
},getKeys:function(_c40){
if(_c40==null||typeof _c40=="undefined"){
_c40=dojo.storage.DEFAULT_NAMESPACE;
}
if(this.isValidKey(_c40)==false){
dojo.raise("Invalid namespace given: "+_c40);
}
var _c41=dojo.flash.comm.getKeys(_c40);
if(_c41==""){
return [];
}
_c41=_c41.split(",");
return _c41;
},getNamespaces:function(){
var _c42=dojo.flash.comm.getNamespaces();
if(_c42==""){
return [dojo.storage.DEFAULT_NAMESPACE];
}
_c42=_c42.split(",");
return _c42;
},clear:function(_c43){
if(_c43==null||typeof _c43=="undefined"){
_c43=dojo.storage.DEFAULT_NAMESPACE;
}
if(this.isValidKey(_c43)==false){
dojo.raise("Invalid namespace given: "+_c43);
}
dojo.flash.comm.clear(_c43);
},remove:function(key,_c45){
if(_c45==null||typeof _c45=="undefined"){
_c45=dojo.storage.DEFAULT_NAMESPACE;
}
if(this.isValidKey(_c45)==false){
dojo.raise("Invalid namespace given: "+_c45);
}
dojo.flash.comm.remove(key,_c45);
},isPermanent:function(){
return true;
},getMaximumSize:function(){
return dojo.storage.SIZE_NO_LIMIT;
},hasSettingsUI:function(){
return true;
},showSettingsUI:function(){
dojo.flash.comm.showSettings();
dojo.flash.obj.setVisible(true);
dojo.flash.obj.center();
},hideSettingsUI:function(){
dojo.flash.obj.setVisible(false);
if(dojo.storage.onHideSettingsUI!=null&&!dojo.lang.isUndefined(dojo.storage.onHideSettingsUI)){
dojo.storage.onHideSettingsUI.call(null);
}
},getType:function(){
return "dojo.storage.browser.FlashStorageProvider";
},getResourceList:function(){
var _c46=dojo.uri.moduleUri("dojo","../Storage_version6.swf").toString();
var _c47=dojo.uri.moduleUri("dojo","../Storage_version8.swf").toString();
var _c48=dojo.flash.info.getResourceList(_c46,_c47);
_c48.push(djConfig.baseRelativePath+"storage_dialog.swf");
return _c48;
},_flashLoaded:function(){
this._allNamespaces=this.getNamespaces();
this._initialized=true;
dojo.storage.manager.loaded();
},_onStatus:function(_c49,key){
var ds=dojo.storage;
var dfo=dojo.flash.obj;
if(_c49==ds.PENDING){
dfo.center();
dfo.setVisible(true);
}else{
dfo.setVisible(false);
}
if((!dj_undef("_statusHandler",ds))&&(ds._statusHandler!=null)){
ds._statusHandler.call(null,_c49,key);
}
}});
dojo.storage.manager.register("dojo.storage.browser.WhatWGStorageProvider",new dojo.storage.browser.WhatWGStorageProvider());
dojo.storage.manager.register("dojo.storage.browser.FlashStorageProvider",new dojo.storage.browser.FlashStorageProvider());
dojo.storage.manager.initialize();
dojo.kwCompoundRequire({common:["dojo.storage"],browser:["dojo.storage.browser"]});
dojo.provide("dojo.storage.*");
dojo.provide("dojo.off");
dojo.lang.mixin(dojo.off,{NETWORK_CHECK:20,STORAGE_NAMESPACE:"dojo_offline",enabled:true,isOnline:false,requireOfflineCache:true,availabilityURL:djConfig.baseRelativePath+"src/off/network_check.txt",pacTestURL:djConfig.baseRelativePath+"src/off/pac_check.txt",goingOnline:false,coreSaveFailed:false,doNetworkChecking:true,hasOfflineCache:null,browserRestart:false,_OFFLINE_CACHE_URL:"http://localhost:8123/polipo/offline?",_onLoadListeners:new Array(),_initializeCalled:false,_storageLoaded:false,_pageLoaded:false,onOnline:function(){
},onOffline:function(){
},goOffline:function(){
if(dojo.sync.isSyncing==true||this.goingOnline==true){
return;
}
this.goingOnline=false;
this.isOnline=false;
this._tellCacheNetworkStatus(false,this.onOffline);
},goOnline:function(_c4d){
if(dojo.sync.isSyncing==true||dojo.off.goingOnline==true){
return;
}
this.goingOnline=true;
this.isOnline=false;
this._isSiteAvailable(_c4d);
},addOnLoad:function(func){
this._onLoadListeners.push(func);
},removeOnLoad:function(func){
for(var i=0;i<this._onLoadListeners.length;i++){
if(func==this._onLoadListeners[i]){
this._onLoadListeners=this._onLoadListeners.splice(i,1);
break;
}
}
},save:function(){
},load:function(_c51){
dojo.sync.load(_c51);
},initialize:function(){
this._initializeCalled=true;
if(this._storageLoaded==true&&this._pageLoaded==true&&this._initializeCalled==true){
this._onLoad();
}
},onSave:function(_c52,_c53,key,_c55,_c56){
if(_c52==true&&_c53==dojo.storage.FAILED){
dojo.off.coreSaveFailed=true;
dojo.off.enabled=false;
}
},onOfflineCacheInstalled:function(){
},addOfflineHost:function(_c57){
if(this.requireOfflineCache==false){
_c57(true);
}
if(this.hasOfflineCache!=true){
_c57(false);
}
this._talkToOfflineCache("addOfflineHost",_c57);
},removeOfflineHost:function(_c58){
if(this.requireOfflineCache==false){
_c58(true);
}
if(this.hasOfflineCache!=true){
_c58(false);
}
this._talkToOfflineCache("removeOfflineHost",_c58);
},isHostAvailableOffline:function(_c59){
this._talkToOfflineCache("isHostAvailableOffline",_c59);
},standardSaveHandler:function(_c5a,_c5b,_c5c,item){
if(_c5a==dojo.storage.FAILED&&_c5b==true){
this.coreSaveFailed=true;
this.enabled=false;
}
if(this.onSave){
onSave(_c5a,_c5b,_c5c,item);
}
},_checkOfflineCacheAvailable:function(_c5e){
var self=this;
if(this.requireOfflineCache==false){
self.hasOfflineCache=false;
resultsCallback();
return;
}
var _c60=setTimeout(function(){
self.hasOfflineCache=false;
_c5e();
},200);
this._talkToOfflineCache("isRunning",function(_c61){
self.hasOfflineCache=true;
window.clearTimeout(_c60);
_c5e();
});
},_onLoad:function(){
dojo.off.files.cache(dojo.storage.manager.getResourceList());
this.load(dojo.lang.hitch(this,this._onFrameworkDataLoaded));
},_onFrameworkDataLoaded:function(){
if(this.requireOfflineCache==false){
this._finishStartingUp();
return;
}
this._checkOfflineCacheAvailable(dojo.lang.hitch(this,this._onOfflineCacheChecked));
},_onOfflineCacheChecked:function(){
if(this.hasOfflineCache==true){
this.isHostAvailableOffline(dojo.lang.hitch(this,this._onHostAvailabilityChecked));
}else{
this._keepCheckingUntilInstalled();
}
},_keepCheckingUntilInstalled:function(){
var _c62=window.setInterval(dojo.lang.hitch(this,function(){
this._checkOfflineCacheAvailable(dojo.lang.hitch(this,function(){
if(this.hasOfflineCache==true){
window.clearTimeout(_c62);
this._onOfflineCacheInstalled();
}
}));
}),1000);
this._finishStartingUp();
},_onHostAvailabilityChecked:function(_c63){
if(_c63==false){
this.addOfflineHost(dojo.lang.hitch(this,this._onHostAdded));
}else{
this._checkPAC(dojo.lang.hitch(this,this._finishStartingUp));
}
},_onHostAdded:function(){
this._checkPAC(dojo.lang.hitch(this,this._finishStartingUp));
},_finishStartingUp:function(){
this._startNetworkThread();
var self=this;
this.goOnline(function(){
for(var i=0;i<self._onLoadListeners.length;i++){
self._onLoadListeners[i]();
}
});
},_onPageLoad:function(){
this._pageLoaded=true;
if(this._pageLoaded==true&&this._storageLoaded==true&&this._initializeCalled==true){
this._onLoad();
}
},_onStorageLoad:function(){
this._storageLoaded=true;
if(this._pageLoaded==true&&this._storageLoaded==true&&this._initializeCalled==true){
this._onLoad();
}
},_isSiteAvailable:function(_c66){
var self=this;
var _c68={url:dojo.off._getAvailabilityURL(),sync:false,mimetype:"text/plain",error:function(type,_c6a){
self.goingOnline=false;
self.isOnline=false;
if(_c66){
_c66(false);
}
},load:function(type,data,evt){
self.goingOnline=false;
self.isOnline=true;
self._tellCacheNetworkStatus(true,function(){
if(_c66){
_c66(true);
}else{
if(self.onOnline){
self.onOnline();
}
}
});
}};
dojo.io.bind(_c68);
},_startNetworkThread:function(){
if(this.doNetworkChecking==false){
return;
}
window.setInterval(function(){
var _c6e={url:dojo.off._getAvailabilityURL(),sync:false,mimetype:"text/plain",error:function(type,_c70){
if(dojo.off.isOnline==true){
dojo.off.isOnline=false;
dojo.off._tellCacheNetworkStatus(false,dojo.lang.hitch(dojo.off,dojo.off.onOffline));
}
},load:function(type,data,evt){
if(dojo.off.isOnline==false){
dojo.off.isOnline=true;
dojo.off._tellCacheNetworkStatus(true,dojo.lang.hitch(dojo.off,dojo.off.onOnline));
}
}};
dojo.io.bind(_c6e);
},this.NETWORK_CHECK*1000);
},_getAvailabilityURL:function(){
var url=this.availabilityURL;
if(url.indexOf("?")==-1){
url+="?";
}else{
url+="&";
}
url+="proxybust="+new Date().getTime();
return url;
},_tellCacheNetworkStatus:function(_c75,_c76){
if(this.requireOfflineCache==false||this.hasOfflineCache==false){
if(_c76){
_c76();
}
return;
}
var _c77;
if(_c75==true){
_c77="goOnline";
}else{
_c77="goOffline";
}
this._talkToOfflineCache(_c77,function(_c78,_c79){
if(_c76){
_c76();
}
});
},_talkToOfflineCache:function(_c7a,_c7b){
var head=document.getElementsByTagName("head")[0];
var _c7d=document.createElement("script");
var url=this._OFFLINE_CACHE_URL+_c7a;
_c7d.setAttribute("src",url);
window.offlineCacheCallback=function(name,_c80){
if(name=="UnknownMethod"){
dojo.raise("Programming error in dojo.off._talkToOfflineCache: "+name);
return;
}
head=null;
_c7d=null;
_c7b(_c80);
};
head.appendChild(_c7d);
},_checkPAC:function(_c81){
var _c82={url:dojo.off.pacTestURL+"?browserbust="+new Date().getTime(),sync:false,mimetype:"text/plain",error:function(type,_c84){
dojo.off.browserRestart=false;
_c81();
},load:function(type,data,evt){
if(data.indexOf("the web application is not in PAC file")!=-1){
dojo.off.browserRestart=true;
}else{
dojo.off.browserRestart=false;
}
_c81();
}};
dojo.io.bind(_c82);
},_onOfflineCacheInstalled:function(){
this.addOfflineHost(dojo.lang.hitch(this,function(){
this._checkPAC(dojo.lang.hitch(this,function(){
if(this.onOfflineCacheInstalled){
this.onOfflineCacheInstalled();
}
}));
}));
}});
dojo.storage.manager.addOnLoad(dojo.lang.hitch(dojo.off,dojo.off._onStorageLoad));
dojo.event.connect(window,"onload",dojo.off,dojo.off._onPageLoad);
dojo.provide("dojo.off.files");
dojo.off.files={listOfURLs:new Array(),_refreshCounter:0,_error:false,_errorMessages:new Array(),_finishedCallback:null,cache:function(_c88){
if(dojo.lang.isString(_c88)){
var url=_c88;
this.listOfURLs.push(url);
}else{
var _c8a=_c88;
for(var i=0;i<_c8a.length;i++){
this.listOfURLs.push(_c8a[i]);
}
}
},remove:function(url){
for(var i=0;i<this.listOfURLs.length;i++){
if(this.listOfURLs[i]==url){
this.listOfURLs=this.listOfURLs.splice(i,1);
break;
}
}
},isAvailable:function(url){
for(var i=0;i<this.listOfURLs.length;i++){
if(this.listOfURLs[i]==url){
return true;
}
}
return false;
},refresh:function(_c90){
dojo.off.files._refreshCounter=0;
dojo.off.files._error=false;
dojo.off.files._errorMessages=new Array();
dojo.off.files._finishedCallback=_c90;
for(var i=0;i<this.listOfURLs.length;i++){
var url=this.listOfURLs[i];
if(dojo.off.requireOfflineCache==true){
if(url.indexOf("?")==-1){
url+="?";
}else{
url+="&";
}
url+="browserbust="+new Date().getTime();
}
window.setTimeout("dojo.off.files._loadFile(\""+url+"\")",10);
}
},_loadFile:function(url){
var xhr=dojo.hostenv.getXmlhttpObject();
var _c95=url;
xhr.onreadystatechange=function(){
if(xhr.readyState==4&&dojo.off.files._error!=true){
if(xhr.status==200){
}else{
if(_c95.indexOf("browserbust=")!=-1){
_c95=_c95.replace(/browserbust\=[0-9]*/,"");
if(_c95.charAt(_c95.length-1)=="?"){
_c95=_c95.replace(/\?$/,"");
}
}
dojo.off.files._error=true;
var msg="Error loading offline resource "+_c95+": "+xhr.statusText;
dojo.off.files._errorMessages.push(msg);
}
dojo.off.files._refreshCounter++;
if(dojo.off.files._refreshCounter==dojo.off.files.listOfURLs.length||dojo.off.files._error==true){
dojo.off.files._finishedCallback(dojo.off.files._error,dojo.off.files._errorMessages);
}
}
};
xhr.open("GET",url,true);
xhr.send(null);
}};
dojo.kwCompoundRequire({common:["dojo.off","dojo.off.files"]});
dojo.provide("dojo.off.*");
dojo.provide("dojo.off.ui");
dojo.lang.mixin(dojo.off.ui,{appName:"setme",autoEmbed:true,autoEmbedID:"dot-widget",runLink:window.location.href,runLinkTitle:"Run Application",learnHowPath:djConfig.baseRelativePath+"src/off/ui-template/learnhow.html",customLearnHowPath:false,htmlTemplatePath:djConfig.baseRelativePath+"src/off/ui-template/widget.html",cssTemplatePath:djConfig.baseRelativePath+"src/off/ui-template/widget.css",onlineImagePath:djConfig.baseRelativePath+"src/off/ui-template/greenball.png",offlineImagePath:djConfig.baseRelativePath+"src/off/ui-template/redball.png",rollerImagePath:djConfig.baseRelativePath+"src/off/ui-template/roller.gif",checkmarkImagePath:djConfig.baseRelativePath+"src/off/ui-template/checkmark.png",learnHowJSPath:djConfig.baseRelativePath+"src/off/ui-template/learnhow.js",onStart:function(){
this._updateSyncUI();
},onRefreshUI:function(){
this._setSyncMessage("Downloading UI...");
},onUpload:function(){
this._setSyncMessage("Uploading new data...");
},onDownload:function(){
this._setSyncMessage("Downloading new data...");
},onFinished:function(){
this._updateSyncUI();
var _c97=dojo.byId("dot-success-checkmark");
var _c98=dojo.byId("dot-sync-details");
if(dojo.sync.successful==true){
this._setSyncMessage("Sync Successful");
if(_c97){
_c97.style.display="inline";
}
}else{
if(dojo.sync.cancelled==true){
this._setSyncMessage("Sync Cancelled");
if(_c97){
_c97.style.display="none";
}
}else{
this._setSyncMessage("Sync Error");
var _c99=dojo.byId("dot-sync-messages");
if(_c99){
dojo.html.addClass(_c99,"dot-sync-error");
}
if(_c97){
_c97.style.display="none";
}
}
}
if(dojo.sync.details.length>0&&_c98){
_c98.style.display="inline";
}
},onCancel:function(){
this._setSyncMessage("Canceling Sync...");
},onOnline:function(){
this._updateNetworkIndicator();
if(dojo.sync.autoSync==true){
window.setTimeout(dojo.lang.hitch(dojo.sync,dojo.sync.synchronize),1000);
}
},onOffline:function(){
this._updateNetworkIndicator();
this._setSyncMessage("You are working offline");
var _c9a=dojo.byId("dot-sync-details");
if(_c9a){
_c9a.style.display="none";
}
},onSave:function(_c9b,_c9c,_c9d,item){
if(_c9b==dojo.storage.FAILED&&_c9c==true){
alert("Please increase the amount of local storage available "+"to this application");
this._showConfiguration();
if(dojo.storage.hasSettingsUI()){
dojo.storage.showSettingsUI();
}
}
},onLoad:function(){
},onOfflineCacheInstalled:function(){
this._hideNeedsOfflineCache();
if(dojo.off.requireOfflineCache==true&&dojo.off.hasOfflineCache==true&&dojo.off.browserRestart==true){
this._needsBrowserRestart();
return;
}else{
var _c9f=dojo.byId("dot-widget-browser-restart");
if(_c9f){
_c9f.style.display="none";
}
}
this._updateSyncUI();
this._initMainEvtHandlers();
this._setOfflineEnabled(dojo.off.enabled);
this._testNetwork();
},_initialize:function(){
dojo.debug("dojo.off.ui._initialize");
if(this._validateAppName(this.appName)==false){
alert("You must set dojo.off.ui.appName; it can only contain "+"letters, numbers, and spaces; right now it "+"is incorrectly set to '"+dojo.off.ui.appName+"'");
dojo.off.enabled=false;
return;
}
this.runLinkText="Run "+this.appName;
dojo.sync.onStart=dojo.lang.hitch(this,this.onStart);
dojo.sync.onRefreshUI=dojo.lang.hitch(this,this.onRefreshUI);
dojo.sync.onUpload=dojo.lang.hitch(this,this.onUpload);
dojo.sync.onDownload=dojo.lang.hitch(this,this.onDownload);
dojo.sync.onFinished=dojo.lang.hitch(this,this.onFinished);
dojo.sync.onCancel=dojo.lang.hitch(this,this.onCancel);
dojo.off.onOnline=dojo.lang.hitch(this,this.onOnline);
dojo.off.onOffline=dojo.lang.hitch(this,this.onOffline);
dojo.off.files.cache([this.htmlTemplatePath,this.cssTemplatePath,this.onlineImagePath,this.offlineImagePath,this.rollerImagePath,this.checkmarkImagePath]);
if(this.autoEmbed==true){
this._doAutoEmbed();
}
},_doAutoEmbed:function(){
dojo.debug("dojo.off.ui._doAutoEmbed");
var _ca0=this.htmlTemplatePath;
var _ca1={url:_ca0,sync:false,mimetype:"text/html",error:function(type,_ca3){
dojo.off.enabled=false;
alert("Error loading the Dojo Offline Widget from "+_ca0+": "+_ca3.message);
},load:dojo.lang.hitch(this,this._templateLoaded)};
dojo.io.bind(_ca1);
},_templateLoaded:function(type,data,evt){
dojo.debug("dojo.of.ui._templateLoaded");
var _ca7=dojo.byId(this.autoEmbedID);
if(_ca7){
_ca7.innerHTML=data;
}
this._initImages();
this._updateNetworkIndicator();
this._initLearnHow();
if(dojo.off.requireOfflineCache==true&&dojo.off.hasOfflineCache==false){
this._showNeedsOfflineCache();
return;
}
if(dojo.off.requireOfflineCache==true&&dojo.off.hasOfflineCache==true&&dojo.off.browserRestart==true){
this._needsBrowserRestart();
return;
}else{
var _ca8=dojo.byId("dot-widget-browser-restart");
if(_ca8){
_ca8.style.display="none";
}
}
this._updateSyncUI();
this._initMainEvtHandlers();
this._setOfflineEnabled(dojo.off.enabled);
this._testNetwork();
},_testNetwork:function(){
var _ca9=dojo.lang.hitch(this,function(_caa){
this._goOnlineFinished(_caa);
if(this.onLoad){
this.onLoad();
}
});
dojo.off.goOnline(_ca9);
},_updateNetworkIndicator:function(){
var _cab=dojo.byId("dot-widget-network-indicator-online");
var _cac=dojo.byId("dot-widget-network-indicator-offline");
var _cad=dojo.byId("dot-widget-title-text");
if(_cab&&_cac){
if(dojo.off.isOnline==true){
_cab.style.display="inline";
_cac.style.display="none";
}else{
_cab.style.display="none";
_cac.style.display="inline";
}
}
if(_cad){
if(dojo.off.isOnline==true){
_cad.innerHTML="Online";
}else{
_cad.innerHTML="Offline";
}
}
},_initLearnHow:function(){
var _cae=dojo.byId("dot-widget-learn-how-link");
if(_cae==null||typeof _cae=="undefined"){
return;
}
if(this.customLearnHowPath==false){
var _caf=djConfig.baseRelativePath;
this.learnHowPath+="?appName="+encodeURIComponent(this.appName)+"&requireOfflineCache="+dojo.off.requireOfflineCache+"&hasOfflineCache="+dojo.off.hasOfflineCache+"&runLink="+encodeURIComponent(this.runLink)+"&runLinkText="+encodeURIComponent(this.runLinkText)+"&baseRelativePath="+encodeURIComponent(_caf);
dojo.off.files.cache(this.learnHowJSPath);
dojo.off.files.cache(this.learnHowPath);
}
_cae.setAttribute("href",this.learnHowPath);
var _cb0=dojo.byId("dot-widget-learn-how-app-name");
if(_cb0==null||typeof _cb0=="undefined"){
return;
}
_cb0.innerHTML="";
_cb0.appendChild(document.createTextNode(this.appName));
},_validateAppName:function(_cb1){
if(_cb1==null||typeof _cb1=="undefined"){
return false;
}
return (/^[a-z0-9 ]*$/i.test(_cb1));
},_updateSyncUI:function(){
var _cb2=dojo.byId("dot-roller");
var _cb3=dojo.byId("dot-success-checkmark");
var _cb4=dojo.byId("dot-sync-messages");
var _cb5=dojo.byId("dot-sync-details");
var _cb6=dojo.byId("dot-sync-cancel");
if(dojo.sync.isSyncing==true){
this._clearSyncMessage();
if(_cb2){
_cb2.style.display="inline";
}
if(_cb3){
_cb3.style.display="none";
}
if(_cb4){
dojo.html.removeClass(_cb4,"dot-sync-error");
}
if(_cb5){
_cb5.style.display="none";
}
if(_cb6){
_cb6.style.display="inline";
}
}else{
if(_cb2){
_cb2.style.display="none";
}
if(_cb6){
_cb6.style.display="none";
}
}
},_setSyncMessage:function(_cb7){
var _cb8=dojo.byId("dot-sync-messages");
if(_cb8){
_cb8.innerHTML=_cb7;
}
},_clearSyncMessage:function(){
this._setSyncMessage("");
},_initImages:function(){
var _cb9=dojo.byId("dot-widget-network-indicator-online");
if(_cb9){
_cb9.setAttribute("src",this.onlineImagePath);
}
var _cba=dojo.byId("dot-widget-network-indicator-offline");
if(_cba){
_cba.setAttribute("src",this.offlineImagePath);
}
var _cbb=dojo.byId("dot-roller");
if(_cbb){
_cbb.setAttribute("src",this.rollerImagePath);
}
var _cbc=dojo.byId("dot-success-checkmark");
if(_cbc){
_cbc.setAttribute("src",this.checkmarkImagePath);
}
},_showDetails:function(evt){
evt.preventDefault();
evt.stopPropagation();
if(dojo.sync.details.length==0){
return;
}
var html="";
html+="<html><head><title>Sync Details</title><head><body>";
html+="<h1>Sync Details</h1>\n";
html+="<ul>\n";
for(var i=0;i<dojo.sync.details.length;i++){
html+="<li>";
html+=dojo.sync.details[i];
html+="</li>";
}
html+="</ul>\n";
html+="<a href='javascript:window.close()' "+"style='text-align: right; padding-right: 2em;'>"+"Close Window"+"</a>\n";
html+="</body></html>";
var _cc0="height=400,width=600,resizable=true,"+"scrollbars=true,toolbar=no,menubar=no,"+"location=no,directories=no,dependent=yes";
var _cc1=window.open("","SyncDetails",_cc0);
if(_cc1==null||typeof _cc1=="undefined"){
alert("Please allow popup windows for this domain; can't display sync details window");
return;
}
_cc1.document.open();
_cc1.document.write(html);
_cc1.document.close();
if(_cc1.focus){
_cc1.focus();
}
},_cancel:function(evt){
evt.preventDefault();
evt.stopPropagation();
dojo.sync.cancel();
},_goOnlineFinished:function(_cc3){
var _cc4=dojo.byId("dot-roller");
if(_cc4){
_cc4.style.display="none";
}
if(_cc3){
this._clearSyncMessage();
this.onOnline();
}else{
this._setSyncMessage("Network not available");
this.onOffline();
}
},_needsBrowserRestart:function(){
var _cc5=dojo.byId("dot-widget-browser-restart");
if(_cc5){
dojo.html.addClass(_cc5,"dot-needs-browser-restart");
}
var _cc6=dojo.byId("dot-widget-browser-restart-app-name");
if(_cc6){
_cc6.innerHTML="";
_cc6.appendChild(document.createTextNode(this.appName));
}
var _cc7=dojo.byId("dot-sync-status");
if(_cc7){
_cc7.style.display="none";
}
},_showNeedsOfflineCache:function(){
var _cc8=dojo.byId("dot-widget-container");
if(_cc8){
dojo.html.addClass(_cc8,"dot-needs-offline-cache");
}
},_hideNeedsOfflineCache:function(){
var _cc9=dojo.byId("dot-widget-container");
if(_cc9){
dojo.html.removeClass(_cc9,"dot-needs-offline-cache");
}
},_initMainEvtHandlers:function(){
var _cca=dojo.byId("dot-sync-details-button");
if(_cca){
dojo.event.connect(_cca,"onclick",this,this._showDetails);
}
var _ccb=dojo.byId("dot-sync-cancel-button");
if(_ccb){
dojo.event.connect(_ccb,"onclick",this,this._cancel);
}
},_setOfflineEnabled:function(_ccc){
var _ccd=new Array();
_ccd.push(dojo.byId("dot-sync-status"));
for(var i=0;i<_ccd.length;i++){
if(_ccd[i]){
if(_ccc){
_ccd[i].style.visibility="visible";
}else{
_ccd[i].style.visibility="hidden";
}
}
}
}});
dojo.off.onSave=dojo.lang.hitch(dojo.off.ui,dojo.off.ui.onSave);
dojo.off.onOfflineCacheInstalled=dojo.lang.hitch(dojo.off.ui,dojo.off.ui.onOfflineCacheInstalled);
dojo.off.addOnLoad(dojo.lang.hitch(dojo.off.ui,dojo.off.ui._initialize));
dojo.provide("dojo.sync");
dojo.sync.CommandLog=function(){
};
dojo.sync.CommandLog.prototype={commands:new Array(),autoSave:true,reasonHalted:null,isReplaying:false,onReplayFinished:null,replay:function(){
if(this.isReplaying==true){
return;
}
this.reasonHalted=null;
if(this.commands.length==0){
this.onReplayFinished();
return;
}
this.isReplaying=true;
var _ccf=this.commands[0];
this.onCommand(_ccf);
},onCommand:function(_cd0){
},add:function(_cd1){
if(this.isReplaying==true){
throw new String("Programming error: you can not call log.add() while "+"we are replaying a command log");
}
this.commands.push(_cd1);
if(this.autoSave==true){
this.save();
}
},length:function(){
return this.commands.length;
},haltReplay:function(_cd2){
if(this.isReplaying==false){
return;
}
if(_cd2!=null&&typeof _cd2!="undefined"){
this.reasonHalted=_cd2.toString();
}
if(this.autoSave==true){
var self=this;
this.save(function(){
self.isReplaying=false;
self.onReplayFinished();
});
}else{
this.isReplaying=false;
this.onReplayFinished();
}
},continueReplay:function(){
if(this.isReplaying==false){
return;
}
this.commands.shift();
if(this.commands.length==0){
if(this.autoSave==true){
var self=this;
this.save(function(){
self.isReplaying=false;
self.onReplayFinished();
});
return;
}else{
this.isReplaying=false;
this.onReplayFinished();
return;
}
}
var _cd5=this.commands[0];
this.onCommand(_cd5);
},clear:function(){
if(this.isReplaying==true){
return;
}
this.commands=new Array();
if(this.autoSave==true){
this.save();
}
},save:function(_cd6){
try{
var self=this;
var _cd8=function(_cd9,key,_cdb){
if(_cd9==dojo.storage.FAILED){
dojo.off.onSave(true,_cdb,key,self.commands,dojo.off.STORAGE_NAMESPACE);
if(_cd6){
_cd6();
}
}else{
if(_cd9==dojo.storage.SUCCESS){
if(_cd6){
_cd6();
}
}
}
};
dojo.storage.put("commandlog",this.commands,_cd8,dojo.off.STORAGE_NAMESPACE);
}
catch(exp){
dojo.off.onSave(true,exp.toString(),"commandlog",this.commands,dojo.off.STORAGE_NAMESPACE);
}
},load:function(_cdc){
var _cdd=dojo.storage.get("commandlog",dojo.off.STORAGE_NAMESPACE);
if(_cdd==null||typeof _cdd=="undefined"){
_cdd=new Array();
}
this.commands=_cdd;
_cdc();
},toString:function(){
var _cde=new String();
_cde+="[";
for(var i=0;i<this.commands.length;i++){
_cde+="{";
for(var j in this.commands[i]){
_cde+=j+": \""+this.commands[i][j]+"\"";
_cde+=", ";
}
_cde+="}, ";
}
_cde+="]";
return _cde;
}};
dojo.lang.mixin(dojo.sync,{onStart:null,onRefreshFiles:null,onUpload:null,onDownload:null,onFinished:null,onCancel:null,isSyncing:false,cancelled:false,successful:true,details:new Array(),autoSync:true,error:false,log:new dojo.sync.CommandLog(),synchronize:function(){
if(this.isSyncing==true||dojo.off.goingOnline==true||dojo.off.isOnline==false){
return;
}
this.isSyncing=true;
this.successful=false;
this.details=new Array();
this.cancelled=false;
this.start();
},cancel:function(){
if(this.isSyncing==false){
return;
}
this.cancelled=true;
if(this.onCancel){
this.onCancel();
}
},start:function(){
if(this.cancelled==true){
this.finished();
return;
}
if(this.onStart){
this.onStart();
}
this.refreshUI();
},refreshUI:function(){
if(this.cancelled==true){
this.finished();
return;
}
if(this.onRefreshUI){
this.onRefreshUI();
}
dojo.off.files.refresh(dojo.lang.hitch(this,function(_ce1,_ce2){
if(_ce1==true){
this.error=true;
this.successful=false;
for(var i=0;i<_ce2.length;i++){
this.details.push(_ce2[i]);
}
this.finished();
}else{
this.upload();
}
}));
},upload:function(){
if(this.cancelled==true){
this.finished();
return;
}
if(this.onUpload){
this.onUpload();
}
var self=this;
if(this.log.onReplayFinished==null){
this.log.onReplayFinished=function(){
self.download();
};
}
this.log.replay();
},download:function(){
if(this.cancelled==true){
this.finished();
return;
}
if(this.onDownload){
this.onDownload();
}
this.doDownload();
},doDownload:function(){
},finishedDownloading:function(_ce5,_ce6){
if(_ce5==false){
this.successful=false;
this.details.push(_ce6);
this.error=true;
}
this.finished();
},finished:function(){
this.isSyncing=false;
if(this.cancelled==false&&this.error==false){
this.successful=true;
}else{
this.successful=false;
}
if(this.onFinished){
this.onFinished();
}
},save:function(_ce7){
this.log.save(function(){
_ce7();
});
},load:function(_ce8){
this.log.load(function(){
_ce8();
});
}});

