/*
	Copyright (c) 2004-2006, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/community/licensing.shtml
*/

/*
	This is a compiled version of Dojo, built for deployment and not for
	development. To get an editable version, please visit:

		http://dojotoolkit.org

	for documentation and information on getting the source.
*/

if(typeof dojo=="undefined"){
var dj_global=this;
var dj_currentContext=this;
function dj_undef(_1,_2){
return (typeof (_2||dj_currentContext)[_1]=="undefined");
}
if(dj_undef("djConfig",this)){
var djConfig={};
}
if(dj_undef("dojo",this)){
var dojo={};
}
dojo.global=function(){
return dj_currentContext;
};
dojo.locale=djConfig.locale;
dojo.version={major:0,minor:0,patch:0,flag:"dev",revision:Number("$Rev: 6426 $".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);
}
try{
if(djConfig.isDebug){
dojo.hostenv.println("FATAL exception raised: "+_12);
}
}
catch(e){
}
throw _13||Error(_12);
};
dojo.debug=function(){
};
dojo.debugShallow=function(obj){
};
dojo.profile={start:function(){
},end:function(){
},stop:function(){
},dump:function(){
}};
function dj_eval(_15){
return dj_global.eval?dj_global.eval(_15):eval(_15);
}
dojo.unimplemented=function(_16,_17){
var _18="'"+_16+"' not implemented";
if(_17!=null){
_18+=" "+_17;
}
dojo.raise(_18);
};
dojo.deprecated=function(_19,_1a,_1b){
var _1c="DEPRECATED: "+_19;
if(_1a){
_1c+=" "+_1a;
}
if(_1b){
_1c+=" -- will be removed in version: "+_1b;
}
dojo.debug(_1c);
};
dojo.render=(function(){
function vscaffold(_1d,_1e){
var tmp={capable:false,support:{builtin:false,plugin:false},prefixes:_1d};
for(var i=0;i<_1e.length;i++){
tmp[_1e[i]]=false;
}
return tmp;
}
return {name:"",ver:dojo.version,os:{win:false,linux:false,osx:false},html:vscaffold(["html"],["ie","opera","khtml","safari","moz"]),svg:vscaffold(["svg"],["corel","adobe","batik"]),vml:vscaffold(["vml"],["ie"]),swf:vscaffold(["Swf","Flash","Mm"],["mm"]),swt:vscaffold(["Swt"],["ibm"])};
})();
dojo.hostenv=(function(){
var _21={isDebug:false,allowQueryConfig:false,baseScriptUri:"",baseRelativePath:"",libraryScriptUri:"",iePreventClobber:false,ieClobberMinimal:true,preventBackButtonFix:true,delayMozLoadingFix:false,searchIds:[],parseWidgets:true};
if(typeof djConfig=="undefined"){
djConfig=_21;
}else{
for(var _22 in _21){
if(typeof djConfig[_22]=="undefined"){
djConfig[_22]=_21[_22];
}
}
}
return {name_:"(unset)",version_:"(unset)",getName:function(){
return this.name_;
},getVersion:function(){
return this.version_;
},getText:function(uri){
dojo.unimplemented("getText","uri="+uri);
}};
})();
dojo.hostenv.getBaseScriptUri=function(){
if(djConfig.baseScriptUri.length){
return djConfig.baseScriptUri;
}
var uri=new String(djConfig.libraryScriptUri||djConfig.baseRelativePath);
if(!uri){
dojo.raise("Nothing returned by getLibraryScriptUri(): "+uri);
}
var _25=uri.lastIndexOf("/");
djConfig.baseScriptUri=djConfig.baseRelativePath;
return djConfig.baseScriptUri;
};
(function(){
var _26={pkgFileName:"__package__",loading_modules_:{},loaded_modules_:{},addedToLoadingCount:[],removedFromLoadingCount:[],inFlightCount:0,modulePrefixes_:{dojo:{name:"dojo",value:"src"}},setModulePrefix:function(_27,_28){
this.modulePrefixes_[_27]={name:_27,value:_28};
},moduleHasPrefix:function(_29){
var mp=this.modulePrefixes_;
return Boolean(mp[_29]&&mp[_29].value);
},getModulePrefix:function(_2b){
if(this.moduleHasPrefix(_2b)){
return this.modulePrefixes_[_2b].value;
}
return _2b;
},getTextStack:[],loadUriStack:[],loadedUris:[],post_load_:false,modulesLoadedListeners:[],unloadListeners:[],loadNotifying:false};
for(var _2c in _26){
dojo.hostenv[_2c]=_26[_2c];
}
})();
dojo.hostenv.loadPath=function(_2d,_2e,cb){
var uri;
if(_2d.charAt(0)=="/"||_2d.match(/^\w+:/)){
uri=_2d;
}else{
uri=this.getBaseScriptUri()+_2d;
}
if(djConfig.cacheBust&&dojo.render.html.capable){
uri+="?"+String(djConfig.cacheBust).replace(/\W+/g,"");
}
try{
return !_2e?this.loadUri(uri,cb):this.loadUriAndCheck(uri,_2e,cb);
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.hostenv.loadUri=function(uri,cb){
if(this.loadedUris[uri]){
return true;
}
var _33=this.getText(uri,null,true);
if(!_33){
return false;
}
this.loadedUris[uri]=true;
if(cb){
_33="("+_33+")";
}
var _34=dj_eval(_33);
if(cb){
cb(_34);
}
return true;
};
dojo.hostenv.loadUriAndCheck=function(uri,_36,cb){
var ok=true;
try{
ok=this.loadUri(uri,cb);
}
catch(e){
dojo.debug("failed loading ",uri," with error: ",e);
}
return Boolean(ok&&this.findModule(_36,false));
};
dojo.loaded=function(){
};
dojo.unloaded=function(){
};
dojo.hostenv.loaded=function(){
this.loadNotifying=true;
this.post_load_=true;
var mll=this.modulesLoadedListeners;
for(var x=0;x<mll.length;x++){
mll[x]();
}
this.modulesLoadedListeners=[];
this.loadNotifying=false;
dojo.loaded();
};
dojo.hostenv.unloaded=function(){
var mll=this.unloadListeners;
while(mll.length){
(mll.pop())();
}
dojo.unloaded();
};
dojo.addOnLoad=function(obj,_3d){
var dh=dojo.hostenv;
if(arguments.length==1){
dh.modulesLoadedListeners.push(obj);
}else{
if(arguments.length>1){
dh.modulesLoadedListeners.push(function(){
obj[_3d]();
});
}
}
if(dh.post_load_&&dh.inFlightCount==0&&!dh.loadNotifying){
dh.callLoaded();
}
};
dojo.addOnUnload=function(obj,_40){
var dh=dojo.hostenv;
if(arguments.length==1){
dh.unloadListeners.push(obj);
}else{
if(arguments.length>1){
dh.unloadListeners.push(function(){
obj[_40]();
});
}
}
};
dojo.hostenv.modulesLoaded=function(){
if(this.post_load_){
return;
}
if(this.loadUriStack.length==0&&this.getTextStack.length==0){
if(this.inFlightCount>0){
dojo.debug("files still in flight!");
return;
}
dojo.hostenv.callLoaded();
}
};
dojo.hostenv.callLoaded=function(){
if(typeof setTimeout=="object"){
setTimeout("dojo.hostenv.loaded();",0);
}else{
dojo.hostenv.loaded();
}
};
dojo.hostenv.getModuleSymbols=function(_42){
var _43=_42.split(".");
for(var i=_43.length;i>0;i--){
var _45=_43.slice(0,i).join(".");
if((i==1)&&!this.moduleHasPrefix(_45)){
_43[0]="../"+_43[0];
}else{
var _46=this.getModulePrefix(_45);
if(_46!=_45){
_43.splice(0,i,_46);
break;
}
}
}
return _43;
};
dojo.hostenv._global_omit_module_check=false;
dojo.hostenv.loadModule=function(_47,_48,_49){
if(!_47){
return;
}
_49=this._global_omit_module_check||_49;
var _4a=this.findModule(_47,false);
if(_4a){
return _4a;
}
if(dj_undef(_47,this.loading_modules_)){
this.addedToLoadingCount.push(_47);
}
this.loading_modules_[_47]=1;
var _4b=_47.replace(/\./g,"/")+".js";
var _4c=_47.split(".");
var _4d=this.getModuleSymbols(_47);
var _4e=((_4d[0].charAt(0)!="/")&&!_4d[0].match(/^\w+:/));
var _4f=_4d[_4d.length-1];
var ok;
if(_4f=="*"){
_47=_4c.slice(0,-1).join(".");
while(_4d.length){
_4d.pop();
_4d.push(this.pkgFileName);
_4b=_4d.join("/")+".js";
if(_4e&&_4b.charAt(0)=="/"){
_4b=_4b.slice(1);
}
ok=this.loadPath(_4b,!_49?_47:null);
if(ok){
break;
}
_4d.pop();
}
}else{
_4b=_4d.join("/")+".js";
_47=_4c.join(".");
var _51=!_49?_47:null;
ok=this.loadPath(_4b,_51);
if(!ok&&!_48){
_4d.pop();
while(_4d.length){
_4b=_4d.join("/")+".js";
ok=this.loadPath(_4b,_51);
if(ok){
break;
}
_4d.pop();
_4b=_4d.join("/")+"/"+this.pkgFileName+".js";
if(_4e&&_4b.charAt(0)=="/"){
_4b=_4b.slice(1);
}
ok=this.loadPath(_4b,_51);
if(ok){
break;
}
}
}
if(!ok&&!_49){
dojo.raise("Could not load '"+_47+"'; last tried '"+_4b+"'");
}
}
if(!_49&&!this["isXDomain"]){
_4a=this.findModule(_47,false);
if(!_4a){
dojo.raise("symbol '"+_47+"' is not defined after loading '"+_4b+"'");
}
}
return _4a;
};
dojo.hostenv.startPackage=function(_52){
var _53=String(_52);
var _54=_53;
var _55=_52.split(/\./);
if(_55[_55.length-1]=="*"){
_55.pop();
_54=_55.join(".");
}
var _56=dojo.evalObjPath(_54,true);
this.loaded_modules_[_53]=_56;
this.loaded_modules_[_54]=_56;
return _56;
};
dojo.hostenv.findModule=function(_57,_58){
var lmn=String(_57);
if(this.loaded_modules_[lmn]){
return this.loaded_modules_[lmn];
}
if(_58){
dojo.raise("no loaded module named '"+_57+"'");
}
return null;
};
dojo.kwCompoundRequire=function(_5a){
var _5b=_5a["common"]||[];
var _5c=_5a[dojo.hostenv.name_]?_5b.concat(_5a[dojo.hostenv.name_]||[]):_5b.concat(_5a["default"]||[]);
for(var x=0;x<_5c.length;x++){
var _5e=_5c[x];
if(_5e.constructor==Array){
dojo.hostenv.loadModule.apply(dojo.hostenv,_5e);
}else{
dojo.hostenv.loadModule(_5e);
}
}
};
dojo.require=function(_5f){
dojo.hostenv.loadModule.apply(dojo.hostenv,arguments);
};
dojo.requireIf=function(_60,_61){
var _62=arguments[0];
if((_62===true)||(_62=="common")||(_62&&dojo.render[_62].capable)){
var _63=[];
for(var i=1;i<arguments.length;i++){
_63.push(arguments[i]);
}
dojo.require.apply(dojo,_63);
}
};
dojo.requireAfterIf=dojo.requireIf;
dojo.provide=function(_65){
return dojo.hostenv.startPackage.apply(dojo.hostenv,arguments);
};
dojo.registerModulePath=function(_66,_67){
return dojo.hostenv.setModulePrefix(_66,_67);
};
dojo.setModulePrefix=function(_68,_69){
dojo.deprecated("dojo.setModulePrefix(\""+_68+"\", \""+_69+"\")","replaced by dojo.registerModulePath","0.5");
return dojo.registerModulePath(_68,_69);
};
dojo.exists=function(obj,_6b){
var p=_6b.split(".");
for(var i=0;i<p.length;i++){
if(!obj[p[i]]){
return false;
}
obj=obj[p[i]];
}
return true;
};
dojo.hostenv.normalizeLocale=function(_6e){
return _6e?_6e.toLowerCase():dojo.locale;
};
dojo.hostenv.searchLocalePath=function(_6f,_70,_71){
_6f=dojo.hostenv.normalizeLocale(_6f);
var _72=_6f.split("-");
var _73=[];
for(var i=_72.length;i>0;i--){
_73.push(_72.slice(0,i).join("-"));
}
_73.push(false);
if(_70){
_73.reverse();
}
for(var j=_73.length-1;j>=0;j--){
var loc=_73[j]||"ROOT";
var _77=_71(loc);
if(_77){
break;
}
}
};
dojo.hostenv.localesGenerated=["ROOT","es-es","es","it-it","pt-br","de","fr-fr","zh-cn","pt","en-us","zh","fr","zh-tw","it","en-gb","xx","de-de","ko-kr","ja-jp","ko","en","ja"];
dojo.hostenv.registerNlsPrefix=function(){
dojo.registerModulePath("nls","nls");
};
dojo.hostenv.preloadLocalizations=function(){
if(dojo.hostenv.localesGenerated){
dojo.hostenv.registerNlsPrefix();
function preload(_78){
_78=dojo.hostenv.normalizeLocale(_78);
dojo.hostenv.searchLocalePath(_78,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 _7b=djConfig.extraLocale||[];
for(var i=0;i<_7b.length;i++){
preload(_7b[i]);
}
}
dojo.hostenv.preloadLocalizations=function(){
};
};
dojo.requireLocalization=function(_7d,_7e,_7f){
dojo.hostenv.preloadLocalizations();
var _80=[_7d,"nls",_7e].join(".");
var _81=dojo.hostenv.findModule(_80);
if(_81){
if(djConfig.localizationComplete&&_81._built){
return;
}
var _82=dojo.hostenv.normalizeLocale(_7f).replace("-","_");
var _83=_80+"."+_82;
if(dojo.hostenv.findModule(_83)){
return;
}
}
_81=dojo.hostenv.startPackage(_80);
var _84=dojo.hostenv.getModuleSymbols(_7d);
var _85=_84.concat("nls").join("/");
var _86;
dojo.hostenv.searchLocalePath(_7f,false,function(loc){
var _88=loc.replace("-","_");
var _89=_80+"."+_88;
var _8a=false;
if(!dojo.hostenv.findModule(_89)){
dojo.hostenv.startPackage(_89);
var _8b=[_85];
if(loc!="ROOT"){
_8b.push(loc);
}
_8b.push(_7e);
var _8c=_8b.join("/")+".js";
_8a=dojo.hostenv.loadPath(_8c,null,function(_8d){
var _8e=function(){
};
_8e.prototype=_86;
_81[_88]=new _8e();
for(var j in _8d){
_81[_88][j]=_8d[j];
}
});
}else{
_8a=true;
}
if(_8a&&_81[_88]){
_86=_81[_88];
}else{
_81[_88]=_86;
}
});
};
(function(){
var _90=djConfig.extraLocale;
if(_90){
if(!_90 instanceof Array){
_90=[_90];
}
var req=dojo.requireLocalization;
dojo.requireLocalization=function(m,b,_94){
req(m,b,_94);
if(_94){
return;
}
for(var i=0;i<_90.length;i++){
req(m,b,_90[i]);
}
};
}
})();
}
if(typeof window!="undefined"){
(function(){
if(djConfig.allowQueryConfig){
var _96=document.location.toString();
var _97=_96.split("?",2);
if(_97.length>1){
var _98=_97[1];
var _99=_98.split("&");
for(var x in _99){
var sp=_99[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 _9d=document.getElementsByTagName("script");
var _9e=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i;
for(var i=0;i<_9d.length;i++){
var src=_9d[i].getAttribute("src");
if(!src){
continue;
}
var m=src.match(_9e);
if(m){
var _a2=src.substring(0,m.index);
if(src.indexOf("bootstrap1")>-1){
_a2+="../";
}
if(!this["djConfig"]){
djConfig={};
}
if(djConfig["baseScriptUri"]==""){
djConfig["baseScriptUri"]=_a2;
}
if(djConfig["baseRelativePath"]==""){
djConfig["baseRelativePath"]=_a2;
}
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 _aa=dua.indexOf("Gecko");
drh.mozilla=drh.moz=(_aa>=0)&&(!drh.khtml);
if(drh.mozilla){
drh.geckoVersion=dua.substring(_aa+6,_aa+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 _ac=window["document"];
var tdi=_ac["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;
}
}
})();
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 _b0=null;
var _b1=null;
try{
_b0=new XMLHttpRequest();
}
catch(e){
}
if(!_b0){
for(var i=0;i<3;++i){
var _b3=dojo.hostenv._XMLHTTP_PROGIDS[i];
try{
_b0=new ActiveXObject(_b3);
}
catch(e){
_b1=e;
}
if(_b0){
dojo.hostenv._XMLHTTP_PROGIDS=[_b3];
break;
}
}
}
if(!_b0){
return dojo.raise("XMLHTTP not available",_b1);
}
return _b0;
};
dojo.hostenv._blockAsync=false;
dojo.hostenv.getText=function(uri,_b5,_b6){
if(!_b5){
this._blockAsync=true;
}
var _b7=this.getXmlhttpObject();
function isDocumentOk(_b8){
var _b9=_b8["status"];
return Boolean((!_b9)||((200<=_b9)&&(300>_b9))||(_b9==304));
}
if(_b5){
var _ba=this,_bb=null,gbl=dojo.global();
var xhr=dojo.evalObjPath("dojo.io.XMLHTTPTransport");
_b7.onreadystatechange=function(){
if(_bb){
gbl.clearTimeout(_bb);
_bb=null;
}
if(_ba._blockAsync||(xhr&&xhr._blockAsync)){
_bb=gbl.setTimeout(function(){
_b7.onreadystatechange.apply(this);
},10);
}else{
if(4==_b7.readyState){
if(isDocumentOk(_b7)){
_b5(_b7.responseText);
}
}
}
};
}
_b7.open("GET",uri,_b5?true:false);
try{
_b7.send(null);
if(_b5){
return null;
}
if(!isDocumentOk(_b7)){
var err=Error("Unable to load "+uri+" status:"+_b7.status);
err.status=_b7.status;
err.responseText=_b7.responseText;
throw err;
}
}
catch(e){
this._blockAsync=false;
if((_b6)&&(!_b5)){
return null;
}else{
throw e;
}
}
this._blockAsync=false;
return _b7.responseText;
};
dojo.hostenv.defaultDebugContainerId="dojoDebug";
dojo.hostenv._println_buffer=[];
dojo.hostenv._println_safe=false;
dojo.hostenv.println=function(_bf){
if(!dojo.hostenv._println_safe){
dojo.hostenv._println_buffer.push(_bf);
}else{
try{
var _c0=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId);
if(!_c0){
_c0=dojo.body();
}
var div=document.createElement("div");
div.appendChild(document.createTextNode(_bf));
_c0.appendChild(div);
}
catch(e){
try{
document.write("<div>"+_bf+"</div>");
}
catch(e2){
window.status=_bf;
}
}
}
};
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(_c2,_c3,fp,_c5){
var _c6=_c2["on"+_c3]||function(){
};
_c2["on"+_c3]=function(){
fp.apply(_c2,arguments);
_c6.apply(_c2,arguments);
};
return true;
}
function dj_load_init(e){
var _c8=(e&&e.type)?e.type.toLowerCase():"load";
if(arguments.callee.initialized||(_c8!="domcontentloaded"&&_c8!="load")){
return;
}
arguments.callee.initialized=true;
if(typeof (_timer)!="undefined"){
clearInterval(_timer);
delete _timer;
}
var _c9=function(){
if(dojo.render.html.ie){
dojo.hostenv.makeWidgets();
}
};
if(dojo.hostenv.inFlightCount==0){
_c9();
dojo.hostenv.modulesLoaded();
}else{
dojo.addOnLoad(_c9);
}
}
if(document.addEventListener){
if(dojo.render.html.opera||(dojo.render.html.moz&&!djConfig.delayMozLoadingFix)){
document.addEventListener("DOMContentLoaded",dj_load_init,null);
}
window.addEventListener("load",dj_load_init,null);
}
if(dojo.render.html.ie&&dojo.render.os.win){
document.attachEvent("onreadystatechange",function(e){
if(document.readyState=="complete"){
dj_load_init();
}
});
}
if(/(WebKit|khtml)/i.test(navigator.userAgent)){
var _timer=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
dj_load_init();
}
},10);
}
if(dojo.render.html.ie){
dj_addNodeEvtHdlr(window,"beforeunload",function(){
dojo.hostenv._unloading=true;
window.setTimeout(function(){
dojo.hostenv._unloading=false;
},0);
});
}
dj_addNodeEvtHdlr(window,"unload",function(){
dojo.hostenv.unloaded();
if((!dojo.render.html.ie)||(dojo.render.html.ie&&dojo.hostenv._unloading)){
dojo.hostenv.unloaded();
}
});
dojo.hostenv.makeWidgets=function(){
var _cb=[];
if(djConfig.searchIds&&djConfig.searchIds.length>0){
_cb=_cb.concat(djConfig.searchIds);
}
if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){
_cb=_cb.concat(dojo.hostenv.searchIds);
}
if((djConfig.parseWidgets)||(_cb.length>0)){
if(dojo.evalObjPath("dojo.widget.Parse")){
var _cc=new dojo.xml.Parse();
if(_cb.length>0){
for(var x=0;x<_cb.length;x++){
var _ce=document.getElementById(_cb[x]);
if(!_ce){
continue;
}
var _cf=_cc.parseElement(_ce,null,true);
dojo.widget.getParser().createComponents(_cf);
}
}else{
if(djConfig.parseWidgets){
var _cf=_cc.parseElement(dojo.body(),null,true);
dojo.widget.getParser().createComponents(_cf);
}
}
}
}
};
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(_d4,_d5){
dj_currentContext=_d4;
dj_currentDocument=_d5;
};
dojo._fireCallback=function(_d6,_d7,_d8){
if((_d7)&&((typeof _d6=="string")||(_d6 instanceof String))){
_d6=_d7[_d6];
}
return (_d7?_d6.apply(_d7,_d8||[]):_d6());
};
dojo.withGlobal=function(_d9,_da,_db,_dc){
var _dd;
var _de=dj_currentContext;
var _df=dj_currentDocument;
try{
dojo.setContext(_d9,_d9.document);
_dd=dojo._fireCallback(_da,_db,_dc);
}
finally{
dojo.setContext(_de,_df);
}
return _dd;
};
dojo.withDoc=function(_e0,_e1,_e2,_e3){
var _e4;
var _e5=dj_currentDocument;
try{
dj_currentDocument=_e0;
_e4=dojo._fireCallback(_e1,_e2,_e3);
}
finally{
dj_currentDocument=_e5;
}
return _e4;
};
}
(function(){
if(typeof dj_usingBootstrap!="undefined"){
return;
}
var _e6=false;
var _e7=false;
var _e8=false;
if((typeof this["load"]=="function")&&((typeof this["Packages"]=="function")||(typeof this["Packages"]=="object"))){
_e6=true;
}else{
if(typeof this["load"]=="function"){
_e7=true;
}else{
if(window.widget){
_e8=true;
}
}
}
var _e9=[];
if((this["djConfig"])&&((djConfig["isDebug"])||(djConfig["debugAtAllCosts"]))){
_e9.push("debug.js");
}
if((this["djConfig"])&&(djConfig["debugAtAllCosts"])&&(!_e6)&&(!_e8)){
_e9.push("browser_debug.js");
}
var _ea=djConfig["baseScriptUri"];
if((this["djConfig"])&&(djConfig["baseLoaderUri"])){
_ea=djConfig["baseLoaderUri"];
}
for(var x=0;x<_e9.length;x++){
var _ec=_ea+"src/"+_e9[x];
if(_e6||_e7){
load(_ec);
}else{
try{
document.write("<scr"+"ipt type='text/javascript' src='"+_ec+"'></scr"+"ipt>");
}
catch(e){
var _ed=document.createElement("script");
_ed.src=_ec;
document.getElementsByTagName("head")[0].appendChild(_ed);
}
}
}
})();
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,_f4,_f5){
var out="";
for(var i=0;i<_f4;i++){
out+=str;
if(_f5&&i<_f4-1){
out+=_f5;
}
}
return out;
};
dojo.string.pad=function(str,len,c,dir){
var out=String(str);
if(!c){
c="0";
}
if(!dir){
dir=1;
}
while(out.length<len){
if(dir>0){
out=c+out;
}else{
out+=c;
}
}
return out;
};
dojo.string.padLeft=function(str,len,c){
return dojo.string.pad(str,len,c,1);
};
dojo.string.padRight=function(str,len,c){
return dojo.string.pad(str,len,c,-1);
};
dojo.provide("dojo.string");
dojo.provide("dojo.lang.common");
dojo.lang.inherits=function(_103,_104){
if(typeof _104!="function"){
dojo.raise("dojo.inherits: superclass argument ["+_104+"] must be a function (subclass: ["+_103+"']");
}
_103.prototype=new _104();
_103.prototype.constructor=_103;
_103.superclass=_104.prototype;
_103["super"]=_104.prototype;
};
dojo.lang._mixin=function(obj,_106){
var tobj={};
for(var x in _106){
if((typeof tobj[x]=="undefined")||(tobj[x]!=_106[x])){
obj[x]=_106[x];
}
}
if(dojo.render.html.ie&&(typeof (_106["toString"])=="function")&&(_106["toString"]!=obj["toString"])&&(_106["toString"]!=tobj["toString"])){
obj.toString=_106.toString;
}
return obj;
};
dojo.lang.mixin=function(obj,_10a){
for(var i=1,l=arguments.length;i<l;i++){
dojo.lang._mixin(obj,arguments[i]);
}
return obj;
};
dojo.lang.extend=function(_10d,_10e){
for(var i=1,l=arguments.length;i<l;i++){
dojo.lang._mixin(_10d.prototype,arguments[i]);
}
return _10d;
};
dojo.inherits=dojo.lang.inherits;
dojo.mixin=dojo.lang.mixin;
dojo.extend=dojo.lang.extend;
dojo.lang.find=function(_111,_112,_113,_114){
if(!dojo.lang.isArrayLike(_111)&&dojo.lang.isArrayLike(_112)){
dojo.deprecated("dojo.lang.find(value, array)","use dojo.lang.find(array, value) instead","0.5");
var temp=_111;
_111=_112;
_112=temp;
}
var _116=dojo.lang.isString(_111);
if(_116){
_111=_111.split("");
}
if(_114){
var step=-1;
var i=_111.length-1;
var end=-1;
}else{
var step=1;
var i=0;
var end=_111.length;
}
if(_113){
while(i!=end){
if(_111[i]===_112){
return i;
}
i+=step;
}
}else{
while(i!=end){
if(_111[i]==_112){
return i;
}
i+=step;
}
}
return -1;
};
dojo.lang.indexOf=dojo.lang.find;
dojo.lang.findLast=function(_11a,_11b,_11c){
return dojo.lang.find(_11a,_11b,_11c,true);
};
dojo.lang.lastIndexOf=dojo.lang.findLast;
dojo.lang.inArray=function(_11d,_11e){
return dojo.lang.find(_11d,_11e)>-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){
if(!it){
return false;
}
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()&&/\{\s*\[native code\]\s*\}/.test(String(it));
};
dojo.lang.isBoolean=function(it){
return (it instanceof Boolean||typeof it=="boolean");
};
dojo.lang.isNumber=function(it){
return (it instanceof Number||typeof it=="number");
};
dojo.lang.isUndefined=function(it){
return ((typeof (it)=="undefined")&&(it==undefined));
};
dojo.provide("dojo.lang.extras");
dojo.lang.setTimeout=function(func,_129){
var _12a=window,_12b=2;
if(!dojo.lang.isFunction(func)){
_12a=func;
func=_129;
_129=arguments[2];
_12b++;
}
if(dojo.lang.isString(func)){
func=_12a[func];
}
var args=[];
for(var i=_12b;i<arguments.length;i++){
args.push(arguments[i]);
}
return dojo.global().setTimeout(function(){
func.apply(_12a,args);
},_129);
};
dojo.lang.clearTimeout=function(_12e){
dojo.global().clearTimeout(_12e);
};
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(_137,_138,_139){
with(dojo.parseObjPath(_137,_138,_139)){
return dojo.evalProp(prop,obj,_139);
}
};
dojo.lang.setObjPathValue=function(_13a,_13b,_13c,_13d){
if(arguments.length<4){
_13d=true;
}
with(dojo.parseObjPath(_13a,_13c,_13d)){
if(obj&&(_13d||(prop in obj))){
obj[prop]=_13b;
}
}
};
dojo.provide("dojo.lang.declare");
dojo.lang.declare=function(_13e,_13f,init,_141){
if((dojo.lang.isFunction(_141))||((!_141)&&(!dojo.lang.isFunction(init)))){
var temp=_141;
_141=init;
init=temp;
}
var _143=[];
if(dojo.lang.isArray(_13f)){
_143=_13f;
_13f=_143.shift();
}
if(!init){
init=dojo.evalObjPath(_13e,false);
if((init)&&(!dojo.lang.isFunction(init))){
init=null;
}
}
var ctor=dojo.lang.declare._makeConstructor();
var scp=(_13f?_13f.prototype:null);
if(scp){
scp.prototyping=true;
ctor.prototype=new _13f();
scp.prototyping=false;
}
ctor.superclass=scp;
ctor.mixins=_143;
for(var i=0,l=_143.length;i<l;i++){
dojo.lang.extend(ctor,_143[i].prototype);
}
ctor.prototype.initializer=null;
ctor.prototype.declaredClass=_13e;
if(dojo.lang.isArray(_141)){
dojo.lang.extend.apply(dojo.lang,[ctor].concat(_141));
}else{
dojo.lang.extend(ctor,(_141)||{});
}
dojo.lang.extend(ctor,dojo.lang.declare._common);
ctor.prototype.constructor=ctor;
ctor.prototype.initializer=(ctor.prototype.initializer)||(init)||(function(){
});
dojo.lang.setObjPathValue(_13e,ctor,null,true);
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(_14d,_14e,args){
var _150,_151=this.___proto;
this.___proto=_14d;
try{
_150=_14d[_14e].apply(this,(args||[]));
}
catch(e){
throw e;
}
finally{
this.___proto=_151;
}
return _150;
},_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]);
}};
dojo.declare=dojo.lang.declare;
dojo.provide("dojo.io.common");
dojo.io.transports=[];
dojo.io.hdlrFuncNames=["load","error","timeout"];
dojo.io.Request=function(url,_156,_157,_158){
if((arguments.length==1)&&(arguments[0].constructor==Object)){
this.fromKwArgs(arguments[0]);
}else{
this.url=url;
if(_156){
this.mimetype=_156;
}
if(_157){
this.transport=_157;
}
if(arguments.length>=4){
this.changeUrl=_158;
}
}
};
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,_15b,_15c){
},error:function(type,_15e,_15f,_160){
},timeout:function(type,_162,_163,_164){
},handle:function(type,data,_167,_168){
},timeoutSeconds:0,abort:function(){
},fromKwArgs:function(_169){
if(_169["url"]){
_169.url=_169.url.toString();
}
if(_169["formNode"]){
_169.formNode=dojo.byId(_169.formNode);
}
if(!_169["method"]&&_169["formNode"]&&_169["formNode"].method){
_169.method=_169["formNode"].method;
}
if(!_169["handle"]&&_169["handler"]){
_169.handle=_169.handler;
}
if(!_169["load"]&&_169["loaded"]){
_169.load=_169.loaded;
}
if(!_169["changeUrl"]&&_169["changeURL"]){
_169.changeUrl=_169.changeURL;
}
_169.encoding=dojo.lang.firstValued(_169["encoding"],djConfig["bindEncoding"],"");
_169.sendTransport=dojo.lang.firstValued(_169["sendTransport"],djConfig["ioSendTransport"],false);
var _16a=dojo.lang.isFunction;
for(var x=0;x<dojo.io.hdlrFuncNames.length;x++){
var fn=dojo.io.hdlrFuncNames[x];
if(_169[fn]&&_16a(_169[fn])){
continue;
}
if(_169["handle"]&&_16a(_169["handle"])){
_169[fn]=_169.handle;
}
}
dojo.lang.mixin(this,_169);
}});
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(_171){
if(!(_171 instanceof dojo.io.Request)){
try{
_171=new dojo.io.Request(_171);
}
catch(e){
dojo.debug(e);
}
}
var _172="";
if(_171["transport"]){
_172=_171["transport"];
if(!this[_172]){
dojo.io.sendBindError(_171,"No dojo.io.bind() transport with name '"+_171["transport"]+"'.");
return _171;
}
if(!this[_172].canHandle(_171)){
dojo.io.sendBindError(_171,"dojo.io.bind() transport with name '"+_171["transport"]+"' cannot handle this type of request.");
return _171;
}
}else{
for(var x=0;x<dojo.io.transports.length;x++){
var tmp=dojo.io.transports[x];
if((this[tmp])&&(this[tmp].canHandle(_171))){
_172=tmp;
break;
}
}
if(_172==""){
dojo.io.sendBindError(_171,"None of the loaded transports for dojo.io.bind()"+" can handle the request.");
return _171;
}
}
this[_172].bind(_171);
_171.bindSuccess=true;
return _171;
};
dojo.io.sendBindError=function(_175,_176){
if((typeof _175.error=="function"||typeof _175.handle=="function")&&(typeof setTimeout=="function"||typeof setTimeout=="object")){
var _177=new dojo.io.Error(_176);
setTimeout(function(){
_175[(typeof _175.error=="function")?"error":"handle"]("error",_177,null,_175);
},50);
}else{
dojo.raise(_176);
}
};
dojo.io.queueBind=function(_178){
if(!(_178 instanceof dojo.io.Request)){
try{
_178=new dojo.io.Request(_178);
}
catch(e){
dojo.debug(e);
}
}
var _179=_178.load;
_178.load=function(){
dojo.io._queueBindInFlight=false;
var ret=_179.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
var _17b=_178.error;
_178.error=function(){
dojo.io._queueBindInFlight=false;
var ret=_17b.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
dojo.io._bindQueue.push(_178);
dojo.io._dispatchNextQueueBind();
return _178;
};
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,_17e,last){
var enc=/utf/i.test(_17e||"")?encodeURIComponent:dojo.string.encodeAscii;
var _181=[];
var _182=new Object();
for(var name in map){
var _184=function(elt){
var val=enc(name)+"="+enc(elt);
_181[(last==name)?"push":"unshift"](val);
};
if(!_182[name]){
var _187=map[name];
if(dojo.lang.isArray(_187)){
dojo.lang.forEach(_187,_184);
}else{
_184(_187);
}
}
}
return _181.join("&");
};
dojo.io.setIFrameSrc=function(_188,src,_18a){
try{
var r=dojo.render.html;
if(!_18a){
if(r.safari){
_188.location=src;
}else{
frames[_188.name].location=src;
}
}else{
var idoc;
if(r.ie){
idoc=_188.contentWindow.document;
}else{
if(r.safari){
idoc=_188.document;
}else{
idoc=_188.contentWindow;
}
}
if(!idoc){
_188.location=src;
return;
}else{
idoc.location.replace(src);
}
}
}
catch(e){
dojo.debug(e);
dojo.debug("setIFrameSrc: "+e);
}
};
dojo.provide("dojo.lang.array");
dojo.lang.has=function(obj,name){
try{
return typeof obj[name]!="undefined";
}
catch(e){
return false;
}
};
dojo.lang.isEmpty=function(obj){
if(dojo.lang.isObject(obj)){
var tmp={};
var _191=0;
for(var x in obj){
if(obj[x]&&(!tmp[x])){
_191++;
break;
}
}
return _191==0;
}else{
if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){
return obj.length==0;
}
}
};
dojo.lang.map=function(arr,obj,_195){
var _196=dojo.lang.isString(arr);
if(_196){
arr=arr.split("");
}
if(dojo.lang.isFunction(obj)&&(!_195)){
_195=obj;
obj=dj_global;
}else{
if(dojo.lang.isFunction(obj)&&_195){
var _197=obj;
obj=_195;
_195=_197;
}
}
if(Array.map){
var _198=Array.map(arr,_195,obj);
}else{
var _198=[];
for(var i=0;i<arr.length;++i){
_198.push(_195.call(obj,arr[i]));
}
}
if(_196){
return _198.join("");
}else{
return _198;
}
};
dojo.lang.reduce=function(arr,_19b,obj,_19d){
var _19e=_19b;
var ob=obj?obj:dj_global;
dojo.lang.map(arr,function(val){
_19e=_19d.call(ob,_19e,val);
});
return _19e;
};
dojo.lang.forEach=function(_1a1,_1a2,_1a3){
if(dojo.lang.isString(_1a1)){
_1a1=_1a1.split("");
}
if(Array.forEach){
Array.forEach(_1a1,_1a2,_1a3);
}else{
if(!_1a3){
_1a3=dj_global;
}
for(var i=0,l=_1a1.length;i<l;i++){
_1a2.call(_1a3,_1a1[i],i,_1a1);
}
}
};
dojo.lang._everyOrSome=function(_1a6,arr,_1a8,_1a9){
if(dojo.lang.isString(arr)){
arr=arr.split("");
}
if(Array.every){
return Array[_1a6?"every":"some"](arr,_1a8,_1a9);
}else{
if(!_1a9){
_1a9=dj_global;
}
for(var i=0,l=arr.length;i<l;i++){
var _1ac=_1a8.call(_1a9,arr[i],i,arr);
if(_1a6&&!_1ac){
return false;
}else{
if((!_1a6)&&(_1ac)){
return true;
}
}
}
return Boolean(_1a6);
}
};
dojo.lang.every=function(arr,_1ae,_1af){
return this._everyOrSome(true,arr,_1ae,_1af);
};
dojo.lang.some=function(arr,_1b1,_1b2){
return this._everyOrSome(false,arr,_1b1,_1b2);
};
dojo.lang.filter=function(arr,_1b4,_1b5){
var _1b6=dojo.lang.isString(arr);
if(_1b6){
arr=arr.split("");
}
var _1b7;
if(Array.filter){
_1b7=Array.filter(arr,_1b4,_1b5);
}else{
if(!_1b5){
if(arguments.length>=3){
dojo.raise("thisObject doesn't exist!");
}
_1b5=dj_global;
}
_1b7=[];
for(var i=0;i<arr.length;i++){
if(_1b4.call(_1b5,arr[i],i,arr)){
_1b7.push(arr[i]);
}
}
}
if(_1b6){
return _1b7.join("");
}else{
return _1b7;
}
};
dojo.lang.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;
};
dojo.lang.toArray=function(_1bc,_1bd){
var _1be=[];
for(var i=_1bd||0;i<_1bc.length;i++){
_1be.push(_1bc[i]);
}
return _1be;
};
dojo.provide("dojo.lang.func");
dojo.lang.hitch=function(_1c0,_1c1){
var fcn=(dojo.lang.isString(_1c1)?_1c0[_1c1]:_1c1)||function(){
};
return function(){
return fcn.apply(_1c0,arguments);
};
};
dojo.lang.anonCtr=0;
dojo.lang.anon={};
dojo.lang.nameAnonFunc=function(_1c3,_1c4,_1c5){
var nso=(_1c4||dojo.lang.anon);
if((_1c5)||((dj_global["djConfig"])&&(djConfig["slowAnonFuncLookups"]==true))){
for(var x in nso){
try{
if(nso[x]===_1c3){
return x;
}
}
catch(e){
}
}
}
var ret="__"+dojo.lang.anonCtr++;
while(typeof nso[ret]!="undefined"){
ret="__"+dojo.lang.anonCtr++;
}
nso[ret]=_1c3;
return ret;
};
dojo.lang.forward=function(_1c9){
return function(){
return this[_1c9].apply(this,arguments);
};
};
dojo.lang.curry=function(ns,func){
var _1cc=[];
ns=ns||dj_global;
if(dojo.lang.isString(func)){
func=ns[func];
}
for(var x=2;x<arguments.length;x++){
_1cc.push(arguments[x]);
}
var _1ce=(func["__preJoinArity"]||func.length)-_1cc.length;
function gather(_1cf,_1d0,_1d1){
var _1d2=_1d1;
var _1d3=_1d0.slice(0);
for(var x=0;x<_1cf.length;x++){
_1d3.push(_1cf[x]);
}
_1d1=_1d1-_1cf.length;
if(_1d1<=0){
var res=func.apply(ns,_1d3);
_1d1=_1d2;
return res;
}else{
return function(){
return gather(arguments,_1d3,_1d1);
};
}
}
return gather([],_1cc,_1ce);
};
dojo.lang.curryArguments=function(ns,func,args,_1d9){
var _1da=[];
var x=_1d9||0;
for(x=_1d9;x<args.length;x++){
_1da.push(args[x]);
}
return dojo.lang.curry.apply(dojo.lang,[ns,func].concat(_1da));
};
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,_1e0,_1e1){
if(!farr.length){
if(typeof _1e1=="function"){
_1e1();
}
return;
}
if((typeof _1e0=="undefined")&&(typeof cb=="number")){
_1e0=cb;
cb=function(){
};
}else{
if(!cb){
cb=function(){
};
if(!_1e0){
_1e0=0;
}
}
}
setTimeout(function(){
(farr.shift())();
cb();
dojo.lang.delayThese(farr,cb,_1e0,_1e1);
},_1e0);
};
dojo.provide("dojo.string.extras");
dojo.string.substituteParams=function(_1e2,hash){
var map=(typeof hash=="object")?hash:dojo.lang.toArray(arguments,1);
return _1e2.replace(/\%\{(\w+)\}/g,function(_1e5,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 _1e8=str.split(" ");
for(var i=0;i<_1e8.length;i++){
_1e8[i]=_1e8[i].charAt(0).toUpperCase()+_1e8[i].substring(1);
}
return _1e8.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 _1ed=escape(str);
var _1ee,re=/%u([0-9A-F]{4})/i;
while((_1ee=_1ed.match(re))){
var num=Number("0x"+_1ee[1]);
var _1f1=escape("&#"+num+";");
ret+=_1ed.substring(0,_1ee.index)+_1f1;
_1ed=_1ed.substring(_1ee.index+_1ee[0].length);
}
ret+=_1ed.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,_1f6){
str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
if(!_1f6){
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,_1ff){
if(_1ff){
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,_203,_204){
if(_204){
str=str.toLowerCase();
_203=_203.toLowerCase();
}
return str.indexOf(_203)==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,_20a){
if(_20a=="\n"){
text=text.replace(/\r\n/g,"\n");
text=text.replace(/\r/g,"\n");
}else{
if(_20a=="\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,_20c){
var _20d=[];
for(var i=0,_20f=0;i<str.length;i++){
if(str.charAt(i)=="\\"){
i++;
continue;
}
if(str.charAt(i)==_20c){
_20d.push(str.substring(_20f,i));
_20f=i+1;
}
}
_20d.push(str.substr(_20f));
return _20d;
};
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 _211=dojo.doc();
do{
var id="dj_unique_"+(++arguments.callee._idIncrement);
}while(_211.getElementById(id));
return id;
};
dojo.dom.getUniqueId._idIncrement=0;
dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(_213,_214){
var node=_213.firstChild;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.nextSibling;
}
if(_214&&node&&node.tagName&&node.tagName.toLowerCase()!=_214.toLowerCase()){
node=dojo.dom.nextElement(node,_214);
}
return node;
};
dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_216,_217){
var node=_216.lastChild;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.previousSibling;
}
if(_217&&node&&node.tagName&&node.tagName.toLowerCase()!=_217.toLowerCase()){
node=dojo.dom.prevElement(node,_217);
}
return node;
};
dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(node,_21a){
if(!node){
return null;
}
do{
node=node.nextSibling;
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
if(node&&_21a&&_21a.toLowerCase()!=node.tagName.toLowerCase()){
return dojo.dom.nextElement(node,_21a);
}
return node;
};
dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(node,_21c){
if(!node){
return null;
}
if(_21c){
_21c=_21c.toLowerCase();
}
do{
node=node.previousSibling;
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
if(node&&_21c&&_21c.toLowerCase()!=node.tagName.toLowerCase()){
return dojo.dom.prevElement(node,_21c);
}
return node;
};
dojo.dom.moveChildren=function(_21d,_21e,trim){
var _220=0;
if(trim){
while(_21d.hasChildNodes()&&_21d.firstChild.nodeType==dojo.dom.TEXT_NODE){
_21d.removeChild(_21d.firstChild);
}
while(_21d.hasChildNodes()&&_21d.lastChild.nodeType==dojo.dom.TEXT_NODE){
_21d.removeChild(_21d.lastChild);
}
}
while(_21d.hasChildNodes()){
_21e.appendChild(_21d.firstChild);
_220++;
}
return _220;
};
dojo.dom.copyChildren=function(_221,_222,trim){
var _224=_221.cloneNode(true);
return this.moveChildren(_224,_222,trim);
};
dojo.dom.removeChildren=function(node){
var _226=node.childNodes.length;
while(node.hasChildNodes()){
node.removeChild(node.firstChild);
}
return _226;
};
dojo.dom.replaceChildren=function(node,_228){
dojo.dom.removeChildren(node);
node.appendChild(_228);
};
dojo.dom.removeNode=function(node){
if(node&&node.parentNode){
return node.parentNode.removeChild(node);
}
};
dojo.dom.getAncestors=function(node,_22b,_22c){
var _22d=[];
var _22e=(_22b&&(_22b instanceof Function||typeof _22b=="function"));
while(node){
if(!_22e||_22b(node)){
_22d.push(node);
}
if(_22c&&_22d.length>0){
return _22d[0];
}
node=node.parentNode;
}
if(_22c){
return null;
}
return _22d;
};
dojo.dom.getAncestorsByTag=function(node,tag,_231){
tag=tag.toLowerCase();
return dojo.dom.getAncestors(node,function(el){
return ((el.tagName)&&(el.tagName.toLowerCase()==tag));
},_231);
};
dojo.dom.getFirstAncestorByTag=function(node,tag){
return dojo.dom.getAncestorsByTag(node,tag,true);
};
dojo.dom.isDescendantOf=function(node,_236,_237){
if(_237&&node){
node=node.parentNode;
}
while(node){
if(node==_236){
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 _23a=dojo.doc();
if(!dj_undef("ActiveXObject")){
var _23b=["MSXML2","Microsoft","MSXML","MSXML3"];
for(var i=0;i<_23b.length;i++){
try{
doc=new ActiveXObject(_23b[i]+".XMLDOM");
}
catch(e){
}
if(doc){
break;
}
}
}else{
if((_23a.implementation)&&(_23a.implementation.createDocument)){
doc=_23a.implementation.createDocument("","",null);
}
}
return doc;
};
dojo.dom.createDocumentFromText=function(str,_23e){
if(!_23e){
_23e="text/xml";
}
if(!dj_undef("DOMParser")){
var _23f=new DOMParser();
return _23f.parseFromString(str,_23e);
}else{
if(!dj_undef("ActiveXObject")){
var _240=dojo.dom.createDocument();
if(_240){
_240.async=false;
_240.loadXML(str);
return _240;
}else{
dojo.debug("toXml didn't work?");
}
}else{
var _241=dojo.doc();
if(_241.createElement){
var tmp=_241.createElement("xml");
tmp.innerHTML=str;
if(_241.implementation&&_241.implementation.createDocument){
var _243=_241.implementation.createDocument("foo","",null);
for(var i=0;i<tmp.childNodes.length;i++){
_243.importNode(tmp.childNodes.item(i),true);
}
return _243;
}
return ((tmp.document)&&(tmp.document.firstChild?tmp.document.firstChild:tmp));
}
}
}
return null;
};
dojo.dom.prependChild=function(node,_246){
if(_246.firstChild){
_246.insertBefore(node,_246.firstChild);
}else{
_246.appendChild(node);
}
return true;
};
dojo.dom.insertBefore=function(node,ref,_249){
if(_249!=true&&(node===ref||node.nextSibling===ref)){
return false;
}
var _24a=ref.parentNode;
_24a.insertBefore(node,ref);
return true;
};
dojo.dom.insertAfter=function(node,ref,_24d){
var pn=ref.parentNode;
if(ref==pn.lastChild){
if((_24d!=true)&&(node===ref)){
return false;
}
pn.appendChild(node);
}else{
return this.insertBefore(node,ref.nextSibling,_24d);
}
return true;
};
dojo.dom.insertAtPosition=function(node,ref,_251){
if((!node)||(!ref)||(!_251)){
return false;
}
switch(_251.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,_253,_254){
var _255=_253.childNodes;
if(!_255.length){
_253.appendChild(node);
return true;
}
var _256=null;
for(var i=0;i<_255.length;i++){
var _258=_255.item(i)["getAttribute"]?parseInt(_255.item(i).getAttribute("dojoinsertionindex")):-1;
if(_258<_254){
_256=_255.item(i);
}
}
if(_256){
return dojo.dom.insertAfter(node,_256);
}else{
return dojo.dom.insertBefore(node,_255.item(0));
}
};
dojo.dom.textContent=function(node,text){
if(arguments.length>1){
var _25b=dojo.doc();
dojo.dom.replaceChildren(node,_25b.createTextNode(text));
return text;
}else{
if(node.textContent!=undefined){
return node.textContent;
}
var _25c="";
if(node==null){
return _25c;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
_25c+=dojo.dom.textContent(node.childNodes[i]);
break;
case 3:
case 2:
case 4:
_25c+=node.childNodes[i].nodeValue;
break;
default:
break;
}
}
return _25c;
}
};
dojo.dom.hasParent=function(node){
return 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,_262,_263,_264){
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(_262,_263,_264);
}else{
var _265=elem.ownerDocument;
var _266=_265.createNode(2,_263,_262);
_266.nodeValue=_264;
elem.setAttributeNode(_266);
}
};
dojo.provide("dojo.undo.browser");
try{
if((!djConfig["preventBackButtonFix"])&&(!dojo.hostenv.post_load_)){
document.write("<iframe style='border: 0px; width: 1px; height: 1px; position: absolute; bottom: 0px; right: 0px; visibility: visible;' name='djhistory' id='djhistory' src='"+(dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"'></iframe>");
}
}
catch(e){
}
if(dojo.render.html.opera){
dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work.");
}
dojo.undo.browser={initialHref:window.location.href,initialHash:window.location.hash,moveForward:false,historyStack:[],forwardStack:[],historyIframe:null,bookmarkAnchor:null,locationTimer:null,setInitialState:function(args){
this.initialState=this._createState(this.initialHref,args,this.initialHash);
},addToHistory:function(args){
this.forwardStack=[];
var hash=null;
var url=null;
if(!this.historyIframe){
this.historyIframe=window.frames["djhistory"];
}
if(!this.bookmarkAnchor){
this.bookmarkAnchor=document.createElement("a");
dojo.body().appendChild(this.bookmarkAnchor);
this.bookmarkAnchor.style.display="none";
}
if(args["changeUrl"]){
hash="#"+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());
if(this.historyStack.length==0&&this.initialState.urlHash==hash){
this.initialState=this._createState(url,args,hash);
return;
}else{
if(this.historyStack.length>0&&this.historyStack[this.historyStack.length-1].urlHash==hash){
this.historyStack[this.historyStack.length-1]=this._createState(url,args,hash);
return;
}
}
this.changingUrl=true;
setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;",1);
this.bookmarkAnchor.href=hash;
if(dojo.render.html.ie){
url=this._loadIframeHistory();
var _26b=args["back"]||args["backButton"]||args["handle"];
var tcb=function(_26d){
if(window.location.hash!=""){
setTimeout("window.location.href = '"+hash+"';",1);
}
_26b.apply(this,[_26d]);
};
if(args["back"]){
args.back=tcb;
}else{
if(args["backButton"]){
args.backButton=tcb;
}else{
if(args["handle"]){
args.handle=tcb;
}
}
}
var _26e=args["forward"]||args["forwardButton"]||args["handle"];
var tfw=function(_270){
if(window.location.hash!=""){
window.location.href=hash;
}
if(_26e){
_26e.apply(this,[_270]);
}
};
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,_273){
if(!dojo.render.html.opera){
var _274=this._getUrlQuery(_273.href);
if(_274==null){
if(this.historyStack.length==1){
this.handleBackButton();
}
return;
}
if(this.moveForward){
this.moveForward=false;
return;
}
if(this.historyStack.length>=2&&_274==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){
this.handleBackButton();
}else{
if(this.forwardStack.length>0&&_274==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){
this.handleForwardButton();
}
}
}
},handleBackButton:function(){
var _275=this.historyStack.pop();
if(!_275){
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(_275);
},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 _27c=url.split("?");
if(_27c.length<2){
return null;
}else{
return _27c[1];
}
},_loadIframeHistory:function(){
var url=dojo.hostenv.getBaseScriptUri()+"iframe_history.html?"+(new Date()).getTime();
this.moveForward=true;
dojo.io.setIFrameSrc(this.historyIframe,url,false);
return url;
}};
dojo.provide("dojo.io.BrowserIO");
dojo.io.checkChildrenForFile=function(node){
var _27f=false;
var _280=node.getElementsByTagName("input");
dojo.lang.forEach(_280,function(_281){
if(_27f){
return;
}
if(_281.getAttribute("type")=="file"){
_27f=true;
}
});
return _27f;
};
dojo.io.formHasFile=function(_282){
return dojo.io.checkChildrenForFile(_282);
};
dojo.io.updateNode=function(node,_284){
node=dojo.byId(node);
var args=_284;
if(dojo.lang.isString(_284)){
args={url:_284};
}
args.mimetype="text/html";
args.load=function(t,d,e){
while(node.firstChild){
if(dojo["event"]){
try{
dojo.event.browser.clean(node.firstChild);
}
catch(e){
}
}
node.removeChild(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(_28b,_28c,_28d){
if((!_28b)||(!_28b.tagName)||(!_28b.tagName.toLowerCase()=="form")){
dojo.raise("Attempted to encode a non-form element.");
}
if(!_28d){
_28d=dojo.io.formFilter;
}
var enc=/utf/i.test(_28c||"")?encodeURIComponent:dojo.string.encodeAscii;
var _28f=[];
for(var i=0;i<_28b.elements.length;i++){
var elm=_28b.elements[i];
if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_28d(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){
_28f.push(name+"="+enc(elm.options[j].value));
}
}
}else{
if(dojo.lang.inArray(["radio","checkbox"],type)){
if(elm.checked){
_28f.push(name+"="+enc(elm.value));
}
}else{
_28f.push(name+"="+enc(elm.value));
}
}
}
var _295=_28b.getElementsByTagName("input");
for(var i=0;i<_295.length;i++){
var _296=_295[i];
if(_296.type.toLowerCase()=="image"&&_296.form==_28b&&_28d(_296)){
var name=enc(_296.name);
_28f.push(name+"="+enc(_296.value));
_28f.push(name+".x=0");
_28f.push(name+".y=0");
}
}
return _28f.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 _29c=form.getElementsByTagName("input");
for(var i=0;i<_29c.length;i++){
var _29d=_29c[i];
if(_29d.type.toLowerCase()=="image"&&_29d.form==form){
this.connect(_29d,"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 _2a4=false;
if(node.disabled||!node.name){
_2a4=false;
}else{
if(dojo.lang.inArray(["submit","button","image"],type)){
if(!this.clickedButton){
this.clickedButton=node;
}
_2a4=node==this.clickedButton;
}else{
_2a4=!dojo.lang.inArray(["file","submit","reset","button"],type);
}
}
return _2a4;
},connect:function(_2a5,_2a6,_2a7){
if(dojo.evalObjPath("dojo.event.connect")){
dojo.event.connect(_2a5,_2a6,this,_2a7);
}else{
var fcn=dojo.lang.hitch(this,_2a7);
_2a5[_2a6]=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 _2aa=this;
var _2ab={};
this.useCache=false;
this.preventCache=false;
function getCacheKey(url,_2ad,_2ae){
return url+"|"+_2ad+"|"+_2ae.toLowerCase();
}
function addToCache(url,_2b0,_2b1,http){
_2ab[getCacheKey(url,_2b0,_2b1)]=http;
}
function getFromCache(url,_2b4,_2b5){
return _2ab[getCacheKey(url,_2b4,_2b5)];
}
this.clearCache=function(){
_2ab={};
};
function doLoad(_2b6,http,url,_2b9,_2ba){
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(_2b6.method.toLowerCase()=="head"){
var _2bc=http.getAllResponseHeaders();
ret={};
ret.toString=function(){
return _2bc;
};
var _2bd=_2bc.split(/[\r\n]+/g);
for(var i=0;i<_2bd.length;i++){
var pair=_2bd[i].match(/^([^:]+)\s*:\s*(.+)$/i);
if(pair){
ret[pair[1]]=pair[2];
}
}
}else{
if(_2b6.mimetype=="text/javascript"){
try{
ret=dj_eval(http.responseText);
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=null;
}
}else{
if(_2b6.mimetype=="text/json"||_2b6.mimetype=="application/json"){
try{
ret=dj_eval("("+http.responseText+")");
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=false;
}
}else{
if((_2b6.mimetype=="application/xml")||(_2b6.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(_2ba){
addToCache(url,_2b9,_2b6.method,http);
}
_2b6[(typeof _2b6.load=="function")?"load":"handle"]("load",ret,http,_2b6);
}else{
var _2c0=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText);
_2b6[(typeof _2b6.error=="function")?"error":"handle"]("error",_2c0,http,_2b6);
}
}
function setHeaders(http,_2c2){
if(_2c2["headers"]){
for(var _2c3 in _2c2["headers"]){
if(_2c3.toLowerCase()=="content-type"&&!_2c2["contentType"]){
_2c2["contentType"]=_2c2["headers"][_2c3];
}else{
http.setRequestHeader(_2c3,_2c2["headers"][_2c3]);
}
}
}
}
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&&!_2aa._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 _2c7=new dojo.io.Error("XMLHttpTransport.watchInFlight Error: "+e);
tif.req[(typeof tif.req.error=="function")?"error":"handle"]("error",_2c7,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 _2c8=dojo.hostenv.getXmlhttpObject()?true:false;
this.canHandle=function(_2c9){
return _2c8&&dojo.lang.inArray(["text/plain","text/html","application/xml","text/xml","text/javascript","text/json","application/json"],(_2c9["mimetype"].toLowerCase()||""))&&!(_2c9["formNode"]&&dojo.io.formHasFile(_2c9["formNode"]));
};
this.multipartBoundary="45309FFF-BD65-4d50-99C9-36986896A96F";
this.bind=function(_2ca){
if(!_2ca["url"]){
if(!_2ca["formNode"]&&(_2ca["backButton"]||_2ca["back"]||_2ca["changeUrl"]||_2ca["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(_2ca);
return true;
}
}
var url=_2ca.url;
var _2cc="";
if(_2ca["formNode"]){
var ta=_2ca.formNode.getAttribute("action");
if((ta)&&(!_2ca["url"])){
url=ta;
}
var tp=_2ca.formNode.getAttribute("method");
if((tp)&&(!_2ca["method"])){
_2ca.method=tp;
}
_2cc+=dojo.io.encodeForm(_2ca.formNode,_2ca.encoding,_2ca["formFilter"]);
}
if(url.indexOf("#")>-1){
dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url);
url=url.split("#")[0];
}
if(_2ca["file"]){
_2ca.method="post";
}
if(!_2ca["method"]){
_2ca.method="get";
}
if(_2ca.method.toLowerCase()=="get"){
_2ca.multipart=false;
}else{
if(_2ca["file"]){
_2ca.multipart=true;
}else{
if(!_2ca["multipart"]){
_2ca.multipart=false;
}
}
}
if(_2ca["backButton"]||_2ca["back"]||_2ca["changeUrl"]){
dojo.undo.browser.addToHistory(_2ca);
}
var _2cf=_2ca["content"]||{};
if(_2ca.sendTransport){
_2cf["dojo.transport"]="xmlhttp";
}
do{
if(_2ca.postContent){
_2cc=_2ca.postContent;
break;
}
if(_2cf){
_2cc+=dojo.io.argsFromMap(_2cf,_2ca.encoding);
}
if(_2ca.method.toLowerCase()=="get"||!_2ca.multipart){
break;
}
var t=[];
if(_2cc.length){
var q=_2cc.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(_2ca.file){
if(dojo.lang.isArray(_2ca.file)){
for(var i=0;i<_2ca.file.length;++i){
var o=_2ca.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=_2ca.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+"--","");
_2cc=t.join("\r\n");
}
}while(false);
var _2d5=_2ca["sync"]?false:true;
var _2d6=_2ca["preventCache"]||(this.preventCache==true&&_2ca["preventCache"]!=false);
var _2d7=_2ca["useCache"]==true||(this.useCache==true&&_2ca["useCache"]!=false);
if(!_2d6&&_2d7){
var _2d8=getFromCache(url,_2cc,_2ca.method);
if(_2d8){
doLoad(_2ca,_2d8,url,_2cc,false);
return;
}
}
var http=dojo.hostenv.getXmlhttpObject(_2ca);
var _2da=false;
if(_2d5){
var _2db=this.inFlight.push({"req":_2ca,"http":http,"url":url,"query":_2cc,"useCache":_2d7,"startTime":_2ca.timeoutSeconds?(new Date()).getTime():0});
this.startWatchingInFlight();
}else{
_2aa._blockAsync=true;
}
if(_2ca.method.toLowerCase()=="post"){
if(!_2ca.user){
http.open("POST",url,_2d5);
}else{
http.open("POST",url,_2d5,_2ca.user,_2ca.password);
}
setHeaders(http,_2ca);
http.setRequestHeader("Content-Type",_2ca.multipart?("multipart/form-data; boundary="+this.multipartBoundary):(_2ca.contentType||"application/x-www-form-urlencoded"));
try{
http.send(_2cc);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_2ca,{status:404},url,_2cc,_2d7);
}
}else{
var _2dc=url;
if(_2cc!=""){
_2dc+=(_2dc.indexOf("?")>-1?"&":"?")+_2cc;
}
if(_2d6){
_2dc+=(dojo.string.endsWithAny(_2dc,"?","&")?"":(_2dc.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf();
}
if(!_2ca.user){
http.open(_2ca.method.toUpperCase(),_2dc,_2d5);
}else{
http.open(_2ca.method.toUpperCase(),_2dc,_2d5,_2ca.user,_2ca.password);
}
setHeaders(http,_2ca);
try{
http.send(null);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_2ca,{status:404},url,_2cc,_2d7);
}
}
if(!_2d5){
doLoad(_2ca,http,url,_2cc,_2d7);
_2aa._blockAsync=false;
}
_2ca.abort=function(){
try{
http._aborted=true;
}
catch(e){
}
return http.abort();
};
return;
};
dojo.io.transports.addTransport("XMLHTTPTransport");
};
dojo.provide("dojo.io.cookie");
dojo.io.cookie.setCookie=function(name,_2de,days,path,_2e1,_2e2){
var _2e3=-1;
if(typeof days=="number"&&days>=0){
var d=new Date();
d.setTime(d.getTime()+(days*24*60*60*1000));
_2e3=d.toGMTString();
}
_2de=escape(_2de);
document.cookie=name+"="+_2de+";"+(_2e3!=-1?" expires="+_2e3+";":"")+(path?"path="+path:"")+(_2e1?"; domain="+_2e1:"")+(_2e2?"; 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 _2e7=document.cookie.substring(idx+name.length+1);
var end=_2e7.indexOf(";");
if(end==-1){
end=_2e7.length;
}
_2e7=_2e7.substring(0,end);
_2e7=unescape(_2e7);
return _2e7;
};
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,_2ee,_2ef,_2f0){
if(arguments.length==5){
_2f0=_2ee;
_2ee=null;
_2ef=null;
}
var _2f1=[],_2f2,_2f3="";
if(!_2f0){
_2f2=dojo.io.cookie.getObjectCookie(name);
}
if(days>=0){
if(!_2f2){
_2f2={};
}
for(var prop in obj){
if(prop==null){
delete _2f2[prop];
}else{
if(typeof obj[prop]=="string"||typeof obj[prop]=="number"){
_2f2[prop]=obj[prop];
}
}
}
prop=null;
for(var prop in _2f2){
_2f1.push(escape(prop)+"="+escape(_2f2[prop]));
}
_2f3=_2f1.join("&");
}
dojo.io.cookie.setCookie(name,_2f3,days,path,_2ee,_2ef);
};
dojo.io.cookie.getObjectCookie=function(name){
var _2f6=null,_2f7=dojo.io.cookie.getCookie(name);
if(_2f7){
_2f6={};
var _2f8=_2f7.split("&");
for(var i=0;i<_2f8.length;i++){
var pair=_2f8[i].split("=");
var _2fb=pair[1];
if(isNaN(_2fb)){
_2fb=unescape(pair[1]);
}
_2f6[unescape(pair[0])]=_2fb;
}
}
return _2f6;
};
dojo.io.cookie.isSupported=function(){
if(typeof navigator.cookieEnabled!="boolean"){
dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null);
var _2fc=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__");
navigator.cookieEnabled=(_2fc=="CookiesAllowed");
if(navigator.cookieEnabled){
this.deleteCookie("__TestingYourBrowserForCookieSupport__");
}
}
return navigator.cookieEnabled;
};
if(!dojo.io.cookies){
dojo.io.cookies=dojo.io.cookie;
}
dojo.provide("dojo.io.*");
dojo.provide("dojo.io");
dojo.deprecated("dojo.io","replaced by dojo.io.*","0.5");
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(_2fe,uri){
var loc=dojo.hostenv.getModulePrefix(_2fe);
if(!loc){
return null;
}
if(loc.lastIndexOf("/")!=loc.length-1){
loc+="/";
}
return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri()+loc,uri);
};
this.Uri=function(){
var uri=arguments[0];
for(var i=1;i<arguments.length;i++){
if(!arguments[i]){
continue;
}
var _303=new dojo.uri.Uri(arguments[i].toString());
var _304=new dojo.uri.Uri(uri.toString());
if((_303.path=="")&&(_303.scheme==null)&&(_303.authority==null)&&(_303.query==null)){
if(_303.fragment!=null){
_304.fragment=_303.fragment;
}
_303=_304;
}else{
if(_303.scheme==null){
_303.scheme=_304.scheme;
if(_303.authority==null){
_303.authority=_304.authority;
if(_303.path.charAt(0)!="/"){
var path=_304.path.substring(0,_304.path.lastIndexOf("/")+1)+_303.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;
}
}
}
}
_303.path=segs.join("/");
}
}
}
}
uri="";
if(_303.scheme!=null){
uri+=_303.scheme+":";
}
if(_303.authority!=null){
uri+="//"+_303.authority;
}
uri+=_303.path;
if(_303.query!=null){
uri+="?"+_303.query;
}
if(_303.fragment!=null){
uri+="#"+_303.fragment;
}
}
this.uri=uri.toString();
var _308="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";
var r=this.uri.match(new RegExp(_308));
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){
_308="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$";
r=this.authority.match(new RegExp(_308));
this.user=r[3]||null;
this.password=r[4]||null;
this.host=r[5];
this.port=r[7]||null;
}
this.toString=function(){
return this.uri;
};
};
};
dojo.provide("dojo.uri.*");
dojo.provide("dojo.io.IframeIO");
dojo.io.createIFrame=function(_30a,_30b,uri){
if(window[_30a]){
return window[_30a];
}
if(window.frames[_30a]){
return window.frames[_30a];
}
var r=dojo.render.html;
var _30e=null;
var turi=uri||dojo.uri.dojoUri("iframe_history.html?noInit=true");
var _310=((r.ie)&&(dojo.render.os.win))?"<iframe name=\""+_30a+"\" src=\""+turi+"\" onload=\""+_30b+"\">":"iframe";
_30e=document.createElement(_310);
with(_30e){
name=_30a;
setAttribute("name",_30a);
id=_30a;
}
dojo.body().appendChild(_30e);
window[_30a]=_30e;
with(_30e.style){
if(!r.safari){
position="absolute";
}
left=top="0px";
height=width="1px";
visibility="hidden";
}
if(!r.ie){
dojo.io.setIFrameSrc(_30e,turi,true);
_30e.onload=new Function(_30b);
}
return _30e;
};
dojo.io.IframeTransport=new function(){
var _311=this;
this.currentRequest=null;
this.requestQueue=[];
this.iframeName="dojoIoIframe";
this.fireNextRequest=function(){
try{
if((this.currentRequest)||(this.requestQueue.length==0)){
return;
}
var cr=this.currentRequest=this.requestQueue.shift();
cr._contentToClean=[];
var fn=cr["formNode"];
var _314=cr["content"]||{};
if(cr.sendTransport){
_314["dojo.transport"]="iframe";
}
if(fn){
if(_314){
for(var x in _314){
if(!fn[x]){
var tn;
if(dojo.render.html.ie){
tn=document.createElement("<input type='hidden' name='"+x+"' value='"+_314[x]+"'>");
fn.appendChild(tn);
}else{
tn=document.createElement("input");
fn.appendChild(tn);
tn.type="hidden";
tn.name=x;
tn.value=_314[x];
}
cr._contentToClean.push(x);
}else{
fn[x].value=_314[x];
}
}
}
if(cr["url"]){
cr._originalAction=fn.getAttribute("action");
fn.setAttribute("action",cr.url);
}
if(!fn.getAttribute("method")){
fn.setAttribute("method",(cr["method"])?cr["method"]:"post");
}
cr._originalTarget=fn.getAttribute("target");
fn.setAttribute("target",this.iframeName);
fn.target=this.iframeName;
fn.submit();
}else{
var _317=dojo.io.argsFromMap(this.currentRequest.content);
var _318=cr.url+(cr.url.indexOf("?")>-1?"&":"?")+_317;
dojo.io.setIFrameSrc(this.iframe,_318,true);
}
}
catch(e){
this.iframeOnload(e);
}
};
this.canHandle=function(_319){
return ((dojo.lang.inArray(["text/plain","text/html","text/javascript","text/json","application/json"],_319["mimetype"]))&&(dojo.lang.inArray(["post","get"],_319["method"].toLowerCase()))&&(!((_319["sync"])&&(_319["sync"]==true))));
};
this.bind=function(_31a){
if(!this["iframe"]){
this.setUpIframe();
}
this.requestQueue.push(_31a);
this.fireNextRequest();
return;
};
this.setUpIframe=function(){
this.iframe=dojo.io.createIFrame(this.iframeName,"dojo.io.IframeTransport.iframeOnload();");
};
this.iframeOnload=function(_31b){
if(!_311.currentRequest){
_311.fireNextRequest();
return;
}
var req=_311.currentRequest;
if(req.formNode){
var _31d=req._contentToClean;
for(var i=0;i<_31d.length;i++){
var key=_31d[i];
if(dojo.render.html.safari){
var _320=req.formNode;
for(var j=0;j<_320.childNodes.length;j++){
var _322=_320.childNodes[j];
if(_322.name==key){
var _323=_322.parentNode;
_323.removeChild(_322);
break;
}
}
}else{
var _324=req.formNode[key];
req.formNode.removeChild(_324);
req.formNode[key]=null;
}
}
if(req["_originalAction"]){
req.formNode.setAttribute("action",req._originalAction);
}
if(req["_originalTarget"]){
req.formNode.setAttribute("target",req._originalTarget);
req.formNode.target=req._originalTarget;
}
}
var _325=function(_326){
var doc=_326.contentDocument||((_326.contentWindow)&&(_326.contentWindow.document))||((_326.name)&&(document.frames[_326.name])&&(document.frames[_326.name].document))||null;
return doc;
};
var _328;
var _329=false;
if(_31b){
this._callError(req,"IframeTransport Request Error: "+_31b);
}else{
var ifd=_325(_311.iframe);
try{
var cmt=req.mimetype;
if((cmt=="text/javascript")||(cmt=="text/json")||(cmt=="application/json")){
var js=ifd.getElementsByTagName("textarea")[0].value;
if(cmt=="text/json"||cmt=="application/json"){
js="("+js+")";
}
_328=dj_eval(js);
}else{
if(cmt=="text/html"){
_328=ifd;
}else{
_328=ifd.getElementsByTagName("textarea")[0].value;
}
}
_329=true;
}
catch(e){
this._callError(req,"IframeTransport Error: "+e);
}
}
try{
if(_329&&dojo.lang.isFunction(req["load"])){
req.load("load",_328,req);
}
}
catch(e){
throw e;
}
finally{
_311.currentRequest=null;
_311.fireNextRequest();
}
};
this._callError=function(req,_32e){
var _32f=new dojo.io.Error(_32e);
if(dojo.lang.isFunction(req["error"])){
req.error("error",_32f,req);
}
};
dojo.io.transports.addTransport("IframeTransport");
};
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(_336){
if(_336){
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(_337,_338){
var rgb=null;
if(dojo.lang.isArray(_337)){
rgb=_337;
}else{
if(_337 instanceof dojo.gfx.color.Color){
rgb=_337.toRgb();
}else{
rgb=new dojo.gfx.color.Color(_337).toRgb();
}
}
return dojo.gfx.color.blend(this.toRgb(),rgb,_338);
}});
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,_33c){
if(typeof a=="string"){
return dojo.gfx.color.blendHex(a,b,_33c);
}
if(!_33c){
_33c=0;
}
_33c=Math.min(Math.max(-1,_33c),1);
_33c=((_33c+1)/2);
var c=[];
for(var x=0;x<3;x++){
c[x]=parseInt(b[x]+((a[x]-b[x])*_33c));
}
return c;
};
dojo.gfx.color.blendHex=function(a,b,_341){
return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a),dojo.gfx.color.hex2rgb(b),_341));
};
dojo.gfx.color.extractRGB=function(_342){
var hex="0123456789abcdef";
_342=_342.toLowerCase();
if(_342.indexOf("rgb")==0){
var _344=_342.match(/rgba*\((\d+), *(\d+), *(\d+)/i);
var ret=_344.splice(1,3);
return ret;
}else{
var _346=dojo.gfx.color.hex2rgb(_342);
if(_346){
return _346;
}else{
return dojo.gfx.color.named[_342]||[255,255,255];
}
}
};
dojo.gfx.color.hex2rgb=function(hex){
var _348="0123456789ABCDEF";
var rgb=new Array(3);
if(hex.indexOf("#")==0){
hex=hex.substring(1);
}
hex=hex.toUpperCase();
if(hex.replace(new RegExp("["+_348+"]","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]=_348.indexOf(rgb[i].charAt(0))*16+_348.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(_351,end){
this.start=_351;
this.end=end;
if(dojo.lang.isArray(_351)){
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-_351;
this.getValue=function(n){
return (diff*n)+this.start;
};
}
};
dojo.lfx.easeDefault=function(n){
if(dojo.render.html.khtml){
return (parseFloat("0.5")+((Math.sin((n+parseFloat("1.5"))*Math.PI))/2));
}else{
return (0.5+((Math.sin((n+1.5)*Math.PI))/2));
}
};
dojo.lfx.easeIn=function(n){
return Math.pow(n,3);
};
dojo.lfx.easeOut=function(n){
return (1-Math.pow(1-n,3));
};
dojo.lfx.easeInOut=function(n){
return ((3*Math.pow(n,2))-(2*Math.pow(n,3)));
};
dojo.lfx.IAnimation=function(){
};
dojo.lang.extend(dojo.lfx.IAnimation,{curve:null,duration:1000,easing:null,repeatCount:0,rate:25,handler:null,beforeBegin:null,onBegin:null,onAnimate:null,onEnd:null,onPlay:null,onPause:null,onStop:null,play:null,pause:null,stop:null,connect:function(evt,_360,_361){
if(!_361){
_361=_360;
_360=this;
}
_361=dojo.lang.hitch(_360,_361);
var _362=this[evt]||function(){
};
this[evt]=function(){
var ret=_362.apply(this,arguments);
_361.apply(this,arguments);
return ret;
};
return this;
},fire:function(evt,args){
if(this[evt]){
this[evt].apply(this,(args||[]));
}
return this;
},repeat:function(_366){
this.repeatCount=_366;
return this;
},_active:false,_paused:false});
dojo.lfx.Animation=function(_367,_368,_369,_36a,_36b,rate){
dojo.lfx.IAnimation.call(this);
if(dojo.lang.isNumber(_367)||(!_367&&_368.getValue)){
rate=_36b;
_36b=_36a;
_36a=_369;
_369=_368;
_368=_367;
_367=null;
}else{
if(_367.getValue||dojo.lang.isArray(_367)){
rate=_36a;
_36b=_369;
_36a=_368;
_369=_367;
_368=null;
_367=null;
}
}
if(dojo.lang.isArray(_369)){
this.curve=new dojo.lfx.Line(_369[0],_369[1]);
}else{
this.curve=_369;
}
if(_368!=null&&_368>0){
this.duration=_368;
}
if(_36b){
this.repeatCount=_36b;
}
if(rate){
this.rate=rate;
}
if(_367){
dojo.lang.forEach(["handler","beforeBegin","onBegin","onEnd","onPlay","onStop","onAnimate"],function(item){
if(_367[item]){
this.connect(item,_367[item]);
}
},this);
}
if(_36a&&dojo.lang.isFunction(_36a)){
this.easing=_36a;
}
};
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(_36e,_36f){
if(_36f){
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(_36e>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_36f);
}),_36e);
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 _371=this.curve.getValue(step);
if(this._percent==0){
if(!this._startRepeatCount){
this._startRepeatCount=this.repeatCount;
}
this.fire("handler",["begin",_371]);
this.fire("onBegin",[_371]);
}
this.fire("handler",["play",_371]);
this.fire("onPlay",[_371]);
this._cycle();
return this;
},pause:function(){
clearTimeout(this._timer);
if(!this._active){
return this;
}
this._paused=true;
var _372=this.curve.getValue(this._percent/100);
this.fire("handler",["pause",_372]);
this.fire("onPause",[_372]);
return this;
},gotoPercent:function(pct,_374){
clearTimeout(this._timer);
this._active=true;
this._paused=true;
this._percent=pct;
if(_374){
this.play();
}
return this;
},stop:function(_375){
clearTimeout(this._timer);
var step=this._percent/100;
if(_375){
step=1;
}
var _377=this.curve.getValue(step);
this.fire("handler",["stop",_377]);
this.fire("onStop",[_377]);
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 _37a=this.curve.getValue(step);
this.fire("handler",["animate",_37a]);
this.fire("onAnimate",[_37a]);
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(_37b){
dojo.lfx.IAnimation.call(this);
this._anims=[];
this._animsEnded=0;
var _37c=arguments;
if(_37c.length==1&&(dojo.lang.isArray(_37c[0])||dojo.lang.isArrayLike(_37c[0]))){
_37c=_37c[0];
}
dojo.lang.forEach(_37c,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(_37e,_37f){
if(!this._anims.length){
return this;
}
this.fire("beforeBegin");
if(_37e>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_37f);
}),_37e);
return this;
}
if(_37f||this._anims[0].percent==0){
this.fire("onBegin");
}
this.fire("onPlay");
this._animsCall("play",null,_37f);
return this;
},pause:function(){
this.fire("onPause");
this._animsCall("pause");
return this;
},stop:function(_380){
this.fire("onStop");
this._animsCall("stop",_380);
return this;
},_onAnimsEnded:function(){
this._animsEnded++;
if(this._animsEnded>=this._anims.length){
this.fire("onEnd");
}
return this;
},_animsCall:function(_381){
var args=[];
if(arguments.length>1){
for(var i=1;i<arguments.length;i++){
args.push(arguments[i]);
}
}
var _384=this;
dojo.lang.forEach(this._anims,function(anim){
anim[_381](args);
},_384);
return this;
}});
dojo.lfx.Chain=function(_386){
dojo.lfx.IAnimation.call(this);
this._anims=[];
this._currAnim=-1;
var _387=arguments;
if(_387.length==1&&(dojo.lang.isArray(_387[0])||dojo.lang.isArrayLike(_387[0]))){
_387=_387[0];
}
var _388=this;
dojo.lang.forEach(_387,function(anim,i,_38b){
this._anims.push(anim);
if(i<_38b.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(_38c,_38d){
if(!this._anims.length){
return this;
}
if(_38d||!this._anims[this._currAnim]){
this._currAnim=0;
}
var _38e=this._anims[this._currAnim];
this.fire("beforeBegin");
if(_38c>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_38d);
}),_38c);
return this;
}
if(_38e){
if(this._currAnim==0){
this.fire("handler",["begin",this._currAnim]);
this.fire("onBegin",[this._currAnim]);
}
this.fire("onPlay",[this._currAnim]);
_38e.play(null,_38d);
}
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 _38f=this._anims[this._currAnim];
if(_38f){
if(!_38f._active||_38f._paused){
this.play();
}else{
this.pause();
}
}
return this;
},stop:function(){
var _390=this._anims[this._currAnim];
if(_390){
_390.stop();
this.fire("onStop",[this._currAnim]);
}
return _390;
},_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(_391){
var _392=arguments;
if(dojo.lang.isArray(arguments[0])){
_392=arguments[0];
}
if(_392.length==1){
return _392[0];
}
return new dojo.lfx.Combine(_392);
};
dojo.lfx.chain=function(_393){
var _394=arguments;
if(dojo.lang.isArray(arguments[0])){
_394=arguments[0];
}
if(_394.length==1){
return _394[0];
}
return new dojo.lfx.Chain(_394);
};
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,_39a){
return (new RegExp("(^|\\s+)"+_39a+"(\\s+|$)")).test(dojo.html.getClass(node));
};
dojo.html.prependClass=function(node,_39c){
_39c+=" "+dojo.html.getClass(node);
return dojo.html.setClass(node,_39c);
};
dojo.html.addClass=function(node,_39e){
if(dojo.html.hasClass(node,_39e)){
return false;
}
_39e=(dojo.html.getClass(node)+" "+_39e).replace(/^\s+|\s+$/g,"");
return dojo.html.setClass(node,_39e);
};
dojo.html.setClass=function(node,_3a0){
node=dojo.byId(node);
var cs=new String(_3a0);
try{
if(typeof node.className=="string"){
node.className=cs;
}else{
if(node.setAttribute){
node.setAttribute("class",_3a0);
node.className=cs;
}else{
return false;
}
}
}
catch(e){
dojo.debug("dojo.html.setClass() failed",e);
}
return true;
};
dojo.html.removeClass=function(node,_3a3,_3a4){
try{
if(!_3a4){
var _3a5=dojo.html.getClass(node).replace(new RegExp("(^|\\s+)"+_3a3+"(\\s+|$)"),"$1$2");
}else{
var _3a5=dojo.html.getClass(node).replace(_3a3,"");
}
dojo.html.setClass(node,_3a5);
}
catch(e){
dojo.debug("dojo.html.removeClass() failed",e);
}
return true;
};
dojo.html.replaceClass=function(node,_3a7,_3a8){
dojo.html.removeClass(node,_3a8);
dojo.html.addClass(node,_3a7);
};
dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2};
dojo.html.getElementsByClass=function(_3a9,_3aa,_3ab,_3ac,_3ad){
_3ad=false;
var _3ae=dojo.doc();
_3aa=dojo.byId(_3aa)||_3ae;
var _3af=_3a9.split(/\s+/g);
var _3b0=[];
if(_3ac!=1&&_3ac!=2){
_3ac=0;
}
var _3b1=new RegExp("(\\s|^)(("+_3af.join(")|(")+"))(\\s|$)");
var _3b2=_3af.join(" ").length;
var _3b3=[];
if(!_3ad&&_3ae.evaluate){
var _3b4=".//"+(_3ab||"*")+"[contains(";
if(_3ac!=dojo.html.classMatchType.ContainsAny){
_3b4+="concat(' ',@class,' '), ' "+_3af.join(" ') and contains(concat(' ',@class,' '), ' ")+" ')";
if(_3ac==2){
_3b4+=" and string-length(@class)="+_3b2+"]";
}else{
_3b4+="]";
}
}else{
_3b4+="concat(' ',@class,' '), ' "+_3af.join(" ') or contains(concat(' ',@class,' '), ' ")+" ')]";
}
var _3b5=_3ae.evaluate(_3b4,_3aa,null,XPathResult.ANY_TYPE,null);
var _3b6=_3b5.iterateNext();
while(_3b6){
try{
_3b3.push(_3b6);
_3b6=_3b5.iterateNext();
}
catch(e){
break;
}
}
return _3b3;
}else{
if(!_3ab){
_3ab="*";
}
_3b3=_3aa.getElementsByTagName(_3ab);
var node,i=0;
outer:
while(node=_3b3[i++]){
var _3b9=dojo.html.getClasses(node);
if(_3b9.length==0){
continue outer;
}
var _3ba=0;
for(var j=0;j<_3b9.length;j++){
if(_3b1.test(_3b9[j])){
if(_3ac==dojo.html.classMatchType.ContainsAny){
_3b0.push(node);
continue outer;
}else{
_3ba++;
}
}else{
if(_3ac==dojo.html.classMatchType.IsOnly){
continue outer;
}
}
}
if(_3ba==_3af.length){
if((_3ac==dojo.html.classMatchType.IsOnly)&&(_3ba==_3b9.length)){
_3b0.push(node);
}else{
if(_3ac==dojo.html.classMatchType.ContainsAll){
_3b0.push(node);
}
}
}
}
return _3b0;
}
};
dojo.html.getElementsByClassName=dojo.html.getElementsByClass;
dojo.html.toCamelCase=function(_3bc){
var arr=_3bc.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(_3c0){
return _3c0.replace(/([A-Z])/g,"-$1").toLowerCase();
};
dojo.html.getComputedStyle=function(node,_3c2,_3c3){
node=dojo.byId(node);
var _3c2=dojo.html.toSelectorCase(_3c2);
var _3c4=dojo.html.toCamelCase(_3c2);
if(!node||!node.style){
return _3c3;
}else{
if(document.defaultView&&dojo.html.isDescendantOf(node,node.ownerDocument)){
try{
var cs=document.defaultView.getComputedStyle(node,"");
if(cs){
return cs.getPropertyValue(_3c2);
}
}
catch(e){
if(node.style.getPropertyValue){
return node.style.getPropertyValue(_3c2);
}else{
return _3c3;
}
}
}else{
if(node.currentStyle){
return node.currentStyle[_3c4];
}
}
}
if(node.style.getPropertyValue){
return node.style.getPropertyValue(_3c2);
}else{
return _3c3;
}
};
dojo.html.getStyleProperty=function(node,_3c7){
node=dojo.byId(node);
return (node&&node.style?node.style[dojo.html.toCamelCase(_3c7)]:undefined);
};
dojo.html.getStyle=function(node,_3c9){
var _3ca=dojo.html.getStyleProperty(node,_3c9);
return (_3ca?_3ca:dojo.html.getComputedStyle(node,_3c9));
};
dojo.html.setStyle=function(node,_3cc,_3cd){
node=dojo.byId(node);
if(node&&node.style){
var _3ce=dojo.html.toCamelCase(_3cc);
node.style[_3ce]=_3cd;
}
};
dojo.html.setStyleText=function(_3cf,text){
try{
_3cf.style.cssText=text;
}
catch(e){
_3cf.setAttribute("style",text);
}
};
dojo.html.copyStyle=function(_3d1,_3d2){
if(!_3d2.style.cssText){
_3d1.setAttribute("style",_3d2.getAttribute("style"));
}else{
_3d1.style.cssText=_3d2.style.cssText;
}
dojo.html.addClass(_3d1,dojo.html.getClass(_3d2));
};
dojo.html.getUnitValue=function(node,_3d4,_3d5){
var s=dojo.html.getComputedStyle(node,_3d4);
if((!s)||((s=="auto")&&(_3d5))){
return {value:0,units:"px"};
}
var _3d7=s.match(/(\-?[\d.]+)([a-z%]*)/i);
if(!_3d7){
return dojo.html.getUnitValue.bad;
}
return {value:Number(_3d7[1]),units:_3d7[2].toLowerCase()};
};
dojo.html.getUnitValue.bad={value:NaN,units:""};
dojo.html.getPixelValue=function(node,_3d9,_3da){
var _3db=dojo.html.getUnitValue(node,_3d9,_3da);
if(isNaN(_3db.value)){
return 0;
}
if((_3db.value)&&(_3db.units!="px")){
return NaN;
}
return _3db.value;
};
dojo.html.setPositivePixelValue=function(node,_3dd,_3de){
if(isNaN(_3de)){
return false;
}
node.style[_3dd]=Math.max(0,_3de)+"px";
return true;
};
dojo.html.styleSheet=null;
dojo.html.insertCssRule=function(_3df,_3e0,_3e1){
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){
_3e1=dojo.html.styleSheet.cssRules.length;
}else{
if(dojo.html.styleSheet.rules){
_3e1=dojo.html.styleSheet.rules.length;
}else{
return null;
}
}
}
if(dojo.html.styleSheet.insertRule){
var rule=_3df+" { "+_3e0+" }";
return dojo.html.styleSheet.insertRule(rule,_3e1);
}else{
if(dojo.html.styleSheet.addRule){
return dojo.html.styleSheet.addRule(_3df,_3e0,_3e1);
}else{
return null;
}
}
};
dojo.html.removeCssRule=function(_3e3){
if(!dojo.html.styleSheet){
dojo.debug("no stylesheet defined for removing rules");
return false;
}
if(dojo.render.html.ie){
if(!_3e3){
_3e3=dojo.html.styleSheet.rules.length;
dojo.html.styleSheet.removeRule(_3e3);
}
}else{
if(document.styleSheets[0]){
if(!_3e3){
_3e3=dojo.html.styleSheet.cssRules.length;
}
dojo.html.styleSheet.deleteRule(_3e3);
}
}
return true;
};
dojo.html._insertedCssFiles=[];
dojo.html.insertCssFile=function(URI,doc,_3e6,_3e7){
if(!URI){
return;
}
if(!doc){
doc=document;
}
var _3e8=dojo.hostenv.getText(URI,false,_3e7);
if(_3e8===null){
return;
}
_3e8=dojo.html.fixPathsInCssText(_3e8,URI);
if(_3e6){
var idx=-1,node,ent=dojo.html._insertedCssFiles;
for(var i=0;i<ent.length;i++){
if((ent[i].doc==doc)&&(ent[i].cssText==_3e8)){
idx=i;
node=ent[i].nodeRef;
break;
}
}
if(node){
var _3ed=doc.getElementsByTagName("style");
for(var i=0;i<_3ed.length;i++){
if(_3ed[i]==node){
return;
}
}
dojo.html._insertedCssFiles.shift(idx,1);
}
}
var _3ee=dojo.html.insertCssText(_3e8);
dojo.html._insertedCssFiles.push({"doc":doc,"cssText":_3e8,"nodeRef":_3ee});
if(_3ee&&djConfig.isDebug){
_3ee.setAttribute("dbgHref",URI);
}
return _3ee;
};
dojo.html.insertCssText=function(_3ef,doc,URI){
if(!_3ef){
return;
}
if(!doc){
doc=document;
}
if(URI){
_3ef=dojo.html.fixPathsInCssText(_3ef,URI);
}
var _3f2=doc.createElement("style");
_3f2.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(_3f2);
}
if(_3f2.styleSheet){
_3f2.styleSheet.cssText=_3ef;
}else{
var _3f4=doc.createTextNode(_3ef);
_3f2.appendChild(_3f4);
}
return _3f2;
};
dojo.html.fixPathsInCssText=function(_3f5,URI){
function iefixPathsInCssText(){
var _3f7=/AlphaImageLoader\(src\=['"]([\t\s\w()\/.\\'"-:#=&?~]*)['"]/;
while(_3f8=_3f7.exec(_3f5)){
url=_3f8[1].replace(_3fa,"$2");
if(!_3fb.exec(url)){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=_3f5.substring(0,_3f8.index)+"AlphaImageLoader(src='"+url+"'";
_3f5=_3f5.substr(_3f8.index+_3f8[0].length);
}
return str+_3f5;
}
if(!_3f5||!URI){
return;
}
var _3f8,str="",url="";
var _3fd=/url\(\s*([\t\s\w()\/.\\'"-:#=&?]+)\s*\)/;
var _3fb=/(file|https?|ftps?):\/\//;
var _3fa=/^[\s]*(['"]?)([\w()\/.\\'"-:#=&?]*)\1[\s]*?$/;
if(dojo.render.html.ie55||dojo.render.html.ie60){
_3f5=iefixPathsInCssText();
}
while(_3f8=_3fd.exec(_3f5)){
url=_3f8[1].replace(_3fa,"$2");
if(!_3fb.exec(url)){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=_3f5.substring(0,_3f8.index)+"url("+url+")";
_3f5=_3f5.substr(_3f8.index+_3f8[0].length);
}
return str+_3f5;
};
dojo.html.setActiveStyleSheet=function(_3fe){
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")==_3fe){
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 _40a={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 _40a){
if(_40a[p]){
dojo.html.addClass(node,p);
}
}
};
dojo.provide("dojo.html.display");
dojo.html._toggle=function(node,_40d,_40e){
node=dojo.byId(node);
_40e(node,!_40d(node));
return _40d(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,_413){
dojo.html[(_413?"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,_419){
dojo.html.setStyle(node,"display",((_419 instanceof String||typeof _419=="string")?_419:(_419?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,_41d){
dojo.html.setStyle(node,"visibility",((_41d instanceof String||typeof _41d=="string")?_41d:(_41d?"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,_421,_422){
node=dojo.byId(node);
var h=dojo.render.html;
if(!_422){
if(_421>=1){
if(h.ie){
dojo.html.clearOpacity(node);
return;
}else{
_421=0.999999;
}
}else{
if(_421<0){
_421=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="+_421*100+")";
}
}
node.style.filter="Alpha(Opacity="+_421*100+")";
}else{
if(h.moz){
node.style.opacity=_421;
node.style.MozOpacity=_421;
}else{
if(h.safari){
node.style.opacity=_421;
node.style.KhtmlOpacity=_421;
}else{
node.style.opacity=_421;
}
}
}
};
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 _42d;
do{
_42d=dojo.html.getStyle(node,"background-color");
if(_42d.toLowerCase()=="rgba(0, 0, 0, 0)"){
_42d="transparent";
}
if(node==document.getElementsByTagName("body")[0]){
node=null;
break;
}
node=node.parentNode;
}while(node&&dojo.lang.inArray(["transparent",""],_42d));
if(_42d=="transparent"){
_42d=[255,255,255,0];
}else{
_42d=dojo.gfx.color.extractRGB(_42d);
}
return _42d;
};
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 _430=dojo.global();
var _431=dojo.doc();
var w=0;
var h=0;
if(dojo.render.html.mozilla){
w=_431.documentElement.clientWidth;
h=_430.innerHeight;
}else{
if(!dojo.render.html.opera&&_430.innerWidth){
w=_430.innerWidth;
h=_430.innerHeight;
}else{
if(!dojo.render.html.opera&&dojo.exists(_431,"documentElement.clientWidth")){
var w2=_431.documentElement.clientWidth;
if(!w||w2&&w2<w){
w=w2;
}
h=_431.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 _435=dojo.global();
var _436=dojo.doc();
var top=_435.pageYOffset||_436.documentElement.scrollTop||dojo.body().scrollTop||0;
var left=_435.pageXOffset||_436.documentElement.scrollLeft||dojo.body().scrollLeft||0;
return {top:top,left:left,offset:{x:left,y:top}};
};
dojo.html.getParentByType=function(node,type){
var _43b=dojo.doc();
var _43c=dojo.byId(node);
type=type.toLowerCase();
while((_43c)&&(_43c.nodeName.toLowerCase()!=type)){
if(_43c==(_43b["body"]||_43b["documentElement"])){
return null;
}
_43c=_43c.parentNode;
}
return _43c;
};
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 _444={x:0,y:0};
if(e.pageX||e.pageY){
_444.x=e.pageX;
_444.y=e.pageY;
}else{
var de=dojo.doc().documentElement;
var db=dojo.body();
_444.x=e.clientX+((de||db)["scrollLeft"])-((de||db)["clientLeft"]);
_444.y=e.clientY+((de||db)["scrollTop"])-((de||db)["clientTop"]);
}
return _444;
};
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 _449=dojo.doc().createElement("script");
_449.src="javascript:'dojo.html.createExternalElement=function(doc, tag){ return doc.createElement(tag); }'";
dojo.doc().getElementsByTagName("head")[0].appendChild(_449);
})();
}
}else{
dojo.html.createExternalElement=function(doc,tag){
return doc.createElement(tag);
};
}
dojo.html._callDeprecated=function(_44c,_44d,args,_44f,_450){
dojo.deprecated("dojo.html."+_44c,"replaced by dojo.html."+_44d+"("+(_44f?"node, {"+_44f+": "+_44f+"}":"")+")"+(_450?"."+_450:""),"0.5");
var _451=[];
if(_44f){
var _452={};
_452[_44f]=args[1];
_451.push(args[0]);
_451.push(_452);
}else{
_451=args;
}
var ret=dojo.html[_44d].apply(dojo.html,args);
if(_450){
return ret[_450];
}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.html.layout");
dojo.html.sumAncestorProperties=function(node,prop){
node=dojo.byId(node);
if(!node){
return 0;
}
var _456=0;
while(node){
if(dojo.html.getComputedStyle(node,"position")=="fixed"){
return 0;
}
var val=node[prop];
if(val){
_456+=val-0;
if(node==dojo.body()){
break;
}
}
node=node.parentNode;
}
return _456;
};
dojo.html.setStyleAttributes=function(node,_459){
node=dojo.byId(node);
var _45a=_459.replace(/(;)?\s*$/,"").split(";");
for(var i=0;i<_45a.length;i++){
var _45c=_45a[i].split(":");
var name=_45c[0].replace(/\s*$/,"").replace(/^\s*/,"").toLowerCase();
var _45e=_45c[1].replace(/\s*$/,"").replace(/^\s*/,"");
switch(name){
case "opacity":
dojo.html.setOpacity(node,_45e);
break;
case "content-height":
dojo.html.setContentBox(node,{height:_45e});
break;
case "content-width":
dojo.html.setContentBox(node,{width:_45e});
break;
case "outer-height":
dojo.html.setMarginBox(node,{height:_45e});
break;
case "outer-width":
dojo.html.setMarginBox(node,{width:_45e});
break;
default:
node.style[dojo.html.toCamelCase(name)]=_45e;
}
}
};
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,_460,_461){
node=dojo.byId(node,node.ownerDocument);
var ret={x:0,y:0};
var bs=dojo.html.boxSizing;
if(!_461){
_461=bs.CONTENT_BOX;
}
var _464=2;
var _465;
switch(_461){
case bs.MARGIN_BOX:
_465=3;
break;
case bs.BORDER_BOX:
_465=2;
break;
case bs.PADDING_BOX:
default:
_465=1;
break;
case bs.CONTENT_BOX:
_465=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){
_464=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 _469;
if((h.safari)&&(node.style.getPropertyValue("position")=="absolute")&&(node.parentNode==db)){
_469=db;
}else{
_469=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 _46b=node;
do{
var n=_46b["offsetLeft"];
if(!h.opera||n>0){
ret.x+=isNaN(n)?0:n;
}
var m=_46b["offsetTop"];
ret.y+=isNaN(m)?0:m;
_46b=_46b.offsetParent;
}while((_46b!=_469)&&(_46b!=null));
}else{
if(node["x"]&&node["y"]){
ret.x+=isNaN(node.x)?0:node.x;
ret.y+=isNaN(node.y)?0:node.y;
}
}
}
}
if(_460){
var _46e=dojo.html.getScroll();
ret.y+=_46e.top;
ret.x+=_46e.left;
}
var _46f=[dojo.html.getPaddingExtent,dojo.html.getBorderExtent,dojo.html.getMarginExtent];
if(_464>_465){
for(var i=_465;i<_464;++i){
ret.y+=_46f[i](node,"top");
ret.x+=_46f[i](node,"left");
}
}else{
if(_464<_465){
for(var i=_465;i>_464;--i){
ret.y-=_46f[i-1](node,"top");
ret.x-=_46f[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,_473,_474){
var _475=0;
for(var x=0;x<_473.length;x++){
_475+=dojo.html.getPixelValue(node,_473[x],_474);
}
return _475;
};
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 _482=dojo.html.getBorder(node);
return {width:pad.width+_482.width,height:pad.height+_482.height};
};
dojo.html.getBoxSizing=function(node){
var h=dojo.render.html;
var bs=dojo.html.boxSizing;
if((h.ie)||(h.opera)){
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 _487=dojo.html.getStyle(node,"-moz-box-sizing");
if(!_487){
_487=dojo.html.getStyle(node,"box-sizing");
}
return (_487?_487: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 _48c=dojo.html.getBorder(node);
return {width:box.width-_48c.width,height:box.height-_48c.height};
};
dojo.html.getContentBox=function(node){
node=dojo.byId(node);
var _48e=dojo.html.getPadBorder(node);
return {width:node.offsetWidth-_48e.width,height:node.offsetHeight-_48e.height};
};
dojo.html.setContentBox=function(node,args){
node=dojo.byId(node);
var _491=0;
var _492=0;
var isbb=dojo.html.isBorderBox(node);
var _494=(isbb?dojo.html.getPadBorder(node):{width:0,height:0});
var ret={};
if(typeof args.width!="undefined"){
_491=args.width+_494.width;
ret.width=dojo.html.setPositivePixelValue(node,"width",_491);
}
if(typeof args.height!="undefined"){
_492=args.height+_494.height;
ret.height=dojo.html.setPositivePixelValue(node,"height",_492);
}
return ret;
};
dojo.html.getMarginBox=function(node){
var _497=dojo.html.getBorderBox(node);
var _498=dojo.html.getMargin(node);
return {width:_497.width+_498.width,height:_497.height+_498.height};
};
dojo.html.setMarginBox=function(node,args){
node=dojo.byId(node);
var _49b=0;
var _49c=0;
var isbb=dojo.html.isBorderBox(node);
var _49e=(!isbb?dojo.html.getPadBorder(node):{width:0,height:0});
var _49f=dojo.html.getMargin(node);
var ret={};
if(typeof args.width!="undefined"){
_49b=args.width-_49e.width;
_49b-=_49f.width;
ret.width=dojo.html.setPositivePixelValue(node,"width",_49b);
}
if(typeof args.height!="undefined"){
_49c=args.height-_49e.height;
_49c-=_49f.height;
ret.height=dojo.html.setPositivePixelValue(node,"height",_49c);
}
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(_4a4,_4a5,_4a6){
if(_4a4 instanceof Array||typeof _4a4=="array"){
dojo.deprecated("dojo.html.toCoordinateArray","use dojo.html.toCoordinateObject({left: , top: , width: , height: }) instead","0.5");
while(_4a4.length<4){
_4a4.push(0);
}
while(_4a4.length>4){
_4a4.pop();
}
var ret={left:_4a4[0],top:_4a4[1],width:_4a4[2],height:_4a4[3]};
}else{
if(!_4a4.nodeType&&!(_4a4 instanceof String||typeof _4a4=="string")&&("width" in _4a4||"height" in _4a4||"left" in _4a4||"x" in _4a4||"top" in _4a4||"y" in _4a4)){
var ret={left:_4a4.left||_4a4.x||0,top:_4a4.top||_4a4.y||0,width:_4a4.width||0,height:_4a4.height||0};
}else{
var node=dojo.byId(_4a4);
var pos=dojo.html.abs(node,_4a5,_4a6);
var _4aa=dojo.html.getMarginBox(node);
var ret={left:pos.left,top:pos.top,width:_4aa.width,height:_4aa.height};
}
}
ret.x=ret.left;
ret.y=ret.top;
return ret;
};
dojo.html.setMarginBoxWidth=dojo.html.setOuterWidth=function(node,_4ac){
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,_4af){
return dojo.html._callDeprecated("getTotalOffset","getAbsolutePosition",arguments,null,type);
};
dojo.html.getAbsoluteX=function(node,_4b1){
return dojo.html._callDeprecated("getAbsoluteX","getAbsolutePosition",arguments,null,"x");
};
dojo.html.getAbsoluteY=function(node,_4b3){
return dojo.html._callDeprecated("getAbsoluteY","getAbsolutePosition",arguments,null,"y");
};
dojo.html.totalOffsetLeft=function(node,_4b5){
return dojo.html._callDeprecated("totalOffsetLeft","getAbsolutePosition",arguments,null,"left");
};
dojo.html.totalOffsetTop=function(node,_4b7){
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,_4c1){
return dojo.html._callDeprecated("setContentBoxWidth","setContentBox",arguments,"width");
};
dojo.html.setContentBoxHeight=dojo.html.setContentHeight=function(node,_4c3){
return dojo.html._callDeprecated("setContentBoxHeight","setContentBox",arguments,"height");
};
dojo.provide("dojo.lfx.html");
dojo.lfx.html._byId=function(_4c4){
if(!_4c4){
return [];
}
if(dojo.lang.isArrayLike(_4c4)){
if(!_4c4.alreadyChecked){
var n=[];
dojo.lang.forEach(_4c4,function(node){
n.push(dojo.byId(node));
});
n.alreadyChecked=true;
return n;
}else{
return _4c4;
}
}else{
var n=[];
n.push(dojo.byId(_4c4));
n.alreadyChecked=true;
return n;
}
};
dojo.lfx.html.propertyAnimation=function(_4c7,_4c8,_4c9,_4ca,_4cb){
_4c7=dojo.lfx.html._byId(_4c7);
var _4cc={"propertyMap":_4c8,"nodes":_4c7,"duration":_4c9,"easing":_4ca||dojo.lfx.easeDefault};
var _4cd=function(args){
if(args.nodes.length==1){
var pm=args.propertyMap;
if(!dojo.lang.isArray(args.propertyMap)){
var parr=[];
for(var _4d1 in pm){
pm[_4d1].property=_4d1;
parr.push(pm[_4d1]);
}
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 _4d3=function(_4d4){
var _4d5=[];
dojo.lang.forEach(_4d4,function(c){
_4d5.push(Math.round(c));
});
return _4d5;
};
var _4d7=function(n,_4d9){
n=dojo.byId(n);
if(!n||!n.style){
return;
}
for(var s in _4d9){
if(s=="opacity"){
dojo.html.setOpacity(n,_4d9[s]);
}else{
n.style[s]=_4d9[s];
}
}
};
var _4db=function(_4dc){
this._properties=_4dc;
this.diffs=new Array(_4dc.length);
dojo.lang.forEach(_4dc,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 _4e3=null;
if(dojo.lang.isArray(prop.start)){
}else{
if(prop.start instanceof dojo.gfx.color.Color){
_4e3=(prop.units||"rgb")+"(";
for(var j=0;j<prop.startRgb.length;j++){
_4e3+=Math.round(((prop.endRgb[j]-prop.startRgb[j])*n)+prop.startRgb[j])+(j<prop.startRgb.length-1?",":"");
}
_4e3+=")";
}else{
_4e3=((this.diffs[i])*n)+prop.start+(prop.property!="opacity"?prop.units||"px":"");
}
}
ret[dojo.html.toCamelCase(prop.property)]=_4e3;
},this);
return ret;
};
};
var anim=new dojo.lfx.Animation({beforeBegin:function(){
_4cd(_4cc);
anim.curve=new _4db(_4cc.propertyMap);
},onAnimate:function(_4e6){
dojo.lang.forEach(_4cc.nodes,function(node){
_4d7(node,_4e6);
});
}},_4cc.duration,null,_4cc.easing);
if(_4cb){
for(var x in _4cb){
if(dojo.lang.isFunction(_4cb[x])){
anim.connect(x,anim,_4cb[x]);
}
}
}
return anim;
};
dojo.lfx.html._makeFadeable=function(_4e9){
var _4ea=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(_4e9)){
dojo.lang.forEach(_4e9,_4ea);
}else{
_4ea(_4e9);
}
};
dojo.lfx.html.fade=function(_4ec,_4ed,_4ee,_4ef,_4f0){
_4ec=dojo.lfx.html._byId(_4ec);
var _4f1={property:"opacity"};
if(!dj_undef("start",_4ed)){
_4f1.start=_4ed.start;
}else{
_4f1.start=function(){
return dojo.html.getOpacity(_4ec[0]);
};
}
if(!dj_undef("end",_4ed)){
_4f1.end=_4ed.end;
}else{
dojo.raise("dojo.lfx.html.fade needs an end value");
}
var anim=dojo.lfx.propertyAnimation(_4ec,[_4f1],_4ee,_4ef);
anim.connect("beforeBegin",function(){
dojo.lfx.html._makeFadeable(_4ec);
});
if(_4f0){
anim.connect("onEnd",function(){
_4f0(_4ec,anim);
});
}
return anim;
};
dojo.lfx.html.fadeIn=function(_4f3,_4f4,_4f5,_4f6){
return dojo.lfx.html.fade(_4f3,{end:1},_4f4,_4f5,_4f6);
};
dojo.lfx.html.fadeOut=function(_4f7,_4f8,_4f9,_4fa){
return dojo.lfx.html.fade(_4f7,{end:0},_4f8,_4f9,_4fa);
};
dojo.lfx.html.fadeShow=function(_4fb,_4fc,_4fd,_4fe){
_4fb=dojo.lfx.html._byId(_4fb);
dojo.lang.forEach(_4fb,function(node){
dojo.html.setOpacity(node,0);
});
var anim=dojo.lfx.html.fadeIn(_4fb,_4fc,_4fd,_4fe);
anim.connect("beforeBegin",function(){
if(dojo.lang.isArrayLike(_4fb)){
dojo.lang.forEach(_4fb,dojo.html.show);
}else{
dojo.html.show(_4fb);
}
});
return anim;
};
dojo.lfx.html.fadeHide=function(_501,_502,_503,_504){
var anim=dojo.lfx.html.fadeOut(_501,_502,_503,function(){
if(dojo.lang.isArrayLike(_501)){
dojo.lang.forEach(_501,dojo.html.hide);
}else{
dojo.html.hide(_501);
}
if(_504){
_504(_501,anim);
}
});
return anim;
};
dojo.lfx.html.wipeIn=function(_506,_507,_508,_509){
_506=dojo.lfx.html._byId(_506);
var _50a=[];
dojo.lang.forEach(_506,function(node){
var _50c={};
dojo.html.show(node);
var _50d=dojo.html.getBorderBox(node).height;
dojo.html.hide(node);
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:1,end:function(){
return _50d;
}}},_507,_508);
anim.connect("beforeBegin",function(){
_50c.overflow=node.style.overflow;
_50c.height=node.style.height;
with(node.style){
overflow="hidden";
_50d="1px";
}
dojo.html.show(node);
});
anim.connect("onEnd",function(){
with(node.style){
overflow=_50c.overflow;
_50d=_50c.height;
}
if(_509){
_509(node,anim);
}
});
_50a.push(anim);
});
return dojo.lfx.combine(_50a);
};
dojo.lfx.html.wipeOut=function(_50f,_510,_511,_512){
_50f=dojo.lfx.html._byId(_50f);
var _513=[];
dojo.lang.forEach(_50f,function(node){
var _515={};
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:function(){
return dojo.html.getContentBox(node).height;
},end:1}},_510,_511,{"beforeBegin":function(){
_515.overflow=node.style.overflow;
_515.height=node.style.height;
with(node.style){
overflow="hidden";
}
dojo.html.show(node);
},"onEnd":function(){
dojo.html.hide(node);
with(node.style){
overflow=_515.overflow;
height=_515.height;
}
if(_512){
_512(node,anim);
}
}});
_513.push(anim);
});
return dojo.lfx.combine(_513);
};
dojo.lfx.html.slideTo=function(_517,_518,_519,_51a,_51b){
_517=dojo.lfx.html._byId(_517);
var _51c=[];
var _51d=dojo.html.getComputedStyle;
if(dojo.lang.isArray(_518)){
dojo.deprecated("dojo.lfx.html.slideTo(node, array)","use dojo.lfx.html.slideTo(node, {top: value, left: value});","0.5");
_518={top:_518[0],left:_518[1]};
}
dojo.lang.forEach(_517,function(node){
var top=null;
var left=null;
var init=(function(){
var _522=node;
return function(){
var pos=_51d(_522,"position");
top=(pos=="absolute"?node.offsetTop:parseInt(_51d(node,"top"))||0);
left=(pos=="absolute"?node.offsetLeft:parseInt(_51d(node,"left"))||0);
if(!dojo.lang.inArray(["absolute","relative"],pos)){
var ret=dojo.html.abs(_522,true);
dojo.html.setStyleAttributes(_522,"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:(_518.top||0)},"left":{start:left,end:(_518.left||0)}},_519,_51a,{"beforeBegin":init});
if(_51b){
anim.connect("onEnd",function(){
_51b(_517,anim);
});
}
_51c.push(anim);
});
return dojo.lfx.combine(_51c);
};
dojo.lfx.html.slideBy=function(_526,_527,_528,_529,_52a){
_526=dojo.lfx.html._byId(_526);
var _52b=[];
var _52c=dojo.html.getComputedStyle;
if(dojo.lang.isArray(_527)){
dojo.deprecated("dojo.lfx.html.slideBy(node, array)","use dojo.lfx.html.slideBy(node, {top: value, left: value});","0.5");
_527={top:_527[0],left:_527[1]};
}
dojo.lang.forEach(_526,function(node){
var top=null;
var left=null;
var init=(function(){
var _531=node;
return function(){
var pos=_52c(_531,"position");
top=(pos=="absolute"?node.offsetTop:parseInt(_52c(node,"top"))||0);
left=(pos=="absolute"?node.offsetLeft:parseInt(_52c(node,"left"))||0);
if(!dojo.lang.inArray(["absolute","relative"],pos)){
var ret=dojo.html.abs(_531,true);
dojo.html.setStyleAttributes(_531,"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+(_527.top||0)},"left":{start:left,end:left+(_527.left||0)}},_528,_529).connect("beforeBegin",init);
if(_52a){
anim.connect("onEnd",function(){
_52a(_526,anim);
});
}
_52b.push(anim);
});
return dojo.lfx.combine(_52b);
};
dojo.lfx.html.explode=function(_535,_536,_537,_538,_539){
var h=dojo.html;
_535=dojo.byId(_535);
_536=dojo.byId(_536);
var _53b=h.toCoordinateObject(_535,true);
var _53c=document.createElement("div");
h.copyStyle(_53c,_536);
if(_536.explodeClassName){
_53c.className=_536.explodeClassName;
}
with(_53c.style){
position="absolute";
display="none";
}
dojo.body().appendChild(_53c);
with(_536.style){
visibility="hidden";
display="block";
}
var _53d=h.toCoordinateObject(_536,true);
with(_536.style){
display="none";
visibility="visible";
}
var _53e={opacity:{start:0.5,end:1}};
dojo.lang.forEach(["height","width","top","left"],function(type){
_53e[type]={start:_53b[type],end:_53d[type]};
});
var anim=new dojo.lfx.propertyAnimation(_53c,_53e,_537,_538,{"beforeBegin":function(){
h.setDisplay(_53c,"block");
},"onEnd":function(){
h.setDisplay(_536,"block");
_53c.parentNode.removeChild(_53c);
}});
if(_539){
anim.connect("onEnd",function(){
_539(_536,anim);
});
}
return anim;
};
dojo.lfx.html.implode=function(_541,end,_543,_544,_545){
var h=dojo.html;
_541=dojo.byId(_541);
end=dojo.byId(end);
var _547=dojo.html.toCoordinateObject(_541,true);
var _548=dojo.html.toCoordinateObject(end,true);
var _549=document.createElement("div");
dojo.html.copyStyle(_549,_541);
if(_541.explodeClassName){
_549.className=_541.explodeClassName;
}
dojo.html.setOpacity(_549,0.3);
with(_549.style){
position="absolute";
display="none";
backgroundColor=h.getStyle(_541,"background-color").toLowerCase();
}
dojo.body().appendChild(_549);
var _54a={opacity:{start:1,end:0.5}};
dojo.lang.forEach(["height","width","top","left"],function(type){
_54a[type]={start:_547[type],end:_548[type]};
});
var anim=new dojo.lfx.propertyAnimation(_549,_54a,_543,_544,{"beforeBegin":function(){
dojo.html.hide(_541);
dojo.html.show(_549);
},"onEnd":function(){
_549.parentNode.removeChild(_549);
}});
if(_545){
anim.connect("onEnd",function(){
_545(_541,anim);
});
}
return anim;
};
dojo.lfx.html.highlight=function(_54d,_54e,_54f,_550,_551){
_54d=dojo.lfx.html._byId(_54d);
var _552=[];
dojo.lang.forEach(_54d,function(node){
var _554=dojo.html.getBackgroundColor(node);
var bg=dojo.html.getStyle(node,"background-color").toLowerCase();
var _556=dojo.html.getStyle(node,"background-image");
var _557=(bg=="transparent"||bg=="rgba(0, 0, 0, 0)");
while(_554.length>3){
_554.pop();
}
var rgb=new dojo.gfx.color.Color(_54e);
var _559=new dojo.gfx.color.Color(_554);
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:rgb,end:_559}},_54f,_550,{"beforeBegin":function(){
if(_556){
node.style.backgroundImage="none";
}
node.style.backgroundColor="rgb("+rgb.toRgb().join(",")+")";
},"onEnd":function(){
if(_556){
node.style.backgroundImage=_556;
}
if(_557){
node.style.backgroundColor="transparent";
}
if(_551){
_551(node,anim);
}
}});
_552.push(anim);
});
return dojo.lfx.combine(_552);
};
dojo.lfx.html.unhighlight=function(_55b,_55c,_55d,_55e,_55f){
_55b=dojo.lfx.html._byId(_55b);
var _560=[];
dojo.lang.forEach(_55b,function(node){
var _562=new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node));
var rgb=new dojo.gfx.color.Color(_55c);
var _564=dojo.html.getStyle(node,"background-image");
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:_562,end:rgb}},_55d,_55e,{"beforeBegin":function(){
if(_564){
node.style.backgroundImage="none";
}
node.style.backgroundColor="rgb("+_562.toRgb().join(",")+")";
},"onEnd":function(){
if(_55f){
_55f(node,anim);
}
}});
_560.push(anim);
});
return dojo.lfx.combine(_560);
};
dojo.lang.mixin(dojo.lfx,dojo.lfx.html);
dojo.provide("dojo.lfx.*");
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,_567){
var dl=dojo.lang;
var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(args.length>2)?args[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false};
switch(args.length){
case 0:
return;
case 1:
return;
case 2:
ao.srcFunc=args[0];
ao.adviceFunc=args[1];
break;
case 3:
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=args[0];
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
}else{
if((dl.isString(args[1]))&&(dl.isString(args[2]))){
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
}else{
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){
ao.adviceType="after";
ao.srcObj=args[0];
ao.srcFunc=args[1];
var _56a=dl.nameAnonFunc(args[2],ao.adviceObj,_567);
ao.adviceFunc=_56a;
}else{
if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=dj_global;
var _56a=dl.nameAnonFunc(args[0],ao.srcObj,_567);
ao.srcFunc=_56a;
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 _56a=dl.nameAnonFunc(args[1],dj_global,_567);
ao.srcFunc=_56a;
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 _56a=dl.nameAnonFunc(args[3],dj_global,_567);
ao.adviceObj=dj_global;
ao.adviceFunc=_56a;
}else{
if(dl.isObject(args[1])){
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=dj_global;
ao.adviceFunc=args[3];
}else{
if(dl.isObject(args[2])){
ao.srcObj=dj_global;
ao.srcFunc=args[1];
ao.adviceObj=args[2];
ao.adviceFunc=args[3];
}else{
ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global;
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
ao.aroundFunc=args[3];
}
}
}
}
}
}
break;
case 6:
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=args[3];
ao.adviceFunc=args[4];
ao.aroundFunc=args[5];
ao.aroundObj=dj_global;
break;
default:
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=args[3];
ao.adviceFunc=args[4];
ao.aroundObj=args[5];
ao.aroundFunc=args[6];
ao.once=args[7];
ao.delay=args[8];
ao.rate=args[9];
ao.adviceMsg=args[10];
break;
}
if(dl.isFunction(ao.aroundFunc)){
var _56a=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,_567);
ao.aroundFunc=_56a;
}
if(dl.isFunction(ao.srcFunc)){
ao.srcFunc=dl.getNameInObj(ao.srcObj,ao.srcFunc);
}
if(dl.isFunction(ao.adviceFunc)){
ao.adviceFunc=dl.getNameInObj(ao.adviceObj,ao.adviceFunc);
}
if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){
ao.aroundFunc=dl.getNameInObj(ao.aroundObj,ao.aroundFunc);
}
if(!ao.srcObj){
dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc);
}
if(!ao.adviceObj){
dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc);
}
if(!ao.adviceFunc){
dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc);
dojo.debugShallow(ao);
}
return ao;
}
this.connect=function(){
if(arguments.length==1){
var ao=arguments[0];
}else{
var ao=interpolateArgs(arguments,true);
}
if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){
if(dojo.render.html.ie){
ao.srcFunc="onkeydown";
this.connect(ao);
}
ao.srcFunc="onkeypress";
}
if(dojo.lang.isArray(ao.srcObj)&&ao.srcObj!=""){
var _56c={};
for(var x in ao){
_56c[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);
}
_56c.srcObj=src;
mjps.push(dojo.event.connect.call(dojo.event,_56c));
});
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 _574;
if((arguments.length==1)&&(typeof a1=="object")){
_574=a1;
}else{
_574={srcObj:a1,srcFunc:a2};
}
_574.adviceFunc=function(){
var _575=[];
for(var x=0;x<arguments.length;x++){
_575.push(arguments[x]);
}
dojo.debug("("+_574.srcObj+")."+_574.srcFunc,":",_575.join(", "));
};
this.kwConnect(_574);
};
this.connectBefore=function(){
var args=["before"];
for(var i=0;i<arguments.length;i++){
args.push(arguments[i]);
}
return this.connect.apply(this,args);
};
this.connectAround=function(){
var args=["around"];
for(var i=0;i<arguments.length;i++){
args.push(arguments[i]);
}
return this.connect.apply(this,args);
};
this.connectOnce=function(){
var ao=interpolateArgs(arguments,true);
ao.once=true;
return this.connect(ao);
};
this._kwConnectImpl=function(_57c,_57d){
var fn=(_57d)?"disconnect":"connect";
if(typeof _57c["srcFunc"]=="function"){
_57c.srcObj=_57c["srcObj"]||dj_global;
var _57f=dojo.lang.nameAnonFunc(_57c.srcFunc,_57c.srcObj,true);
_57c.srcFunc=_57f;
}
if(typeof _57c["adviceFunc"]=="function"){
_57c.adviceObj=_57c["adviceObj"]||dj_global;
var _57f=dojo.lang.nameAnonFunc(_57c.adviceFunc,_57c.adviceObj,true);
_57c.adviceFunc=_57f;
}
_57c.srcObj=_57c["srcObj"]||dj_global;
_57c.adviceObj=_57c["adviceObj"]||_57c["targetObj"]||dj_global;
_57c.adviceFunc=_57c["adviceFunc"]||_57c["targetFunc"];
return dojo.event[fn](_57c);
};
this.kwConnect=function(_580){
return this._kwConnectImpl(_580,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";
}
var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc);
return mjp.removeAdvice(ao.adviceObj,ao.adviceFunc,ao.adviceType,ao.once);
};
this.kwDisconnect=function(_583){
return this._kwConnectImpl(_583,true);
};
};
dojo.event.MethodInvocation=function(_584,obj,args){
this.jp_=_584;
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,_58c){
this.object=obj||dj_global;
this.methodname=_58c;
this.methodfunc=this.object[_58c];
this.squelch=false;
};
dojo.event.MethodJoinPoint.getForMethod=function(obj,_58e){
if(!obj){
obj=dj_global;
}
if(!obj[_58e]){
obj[_58e]=function(){
};
if(!obj[_58e]){
dojo.raise("Cannot set do-nothing method on that object "+_58e);
}
}else{
if((!dojo.lang.isFunction(obj[_58e]))&&(!dojo.lang.isAlien(obj[_58e]))){
return null;
}
}
var _58f=_58e+"$joinpoint";
var _590=_58e+"$joinpoint$method";
var _591=obj[_58f];
if(!_591){
var _592=false;
if(dojo.event["browser"]){
if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){
_592=true;
dojo.event.browser.addClobberNodeAttrs(obj,[_58f,_590,_58e]);
}
}
var _593=obj[_58e].length;
obj[_590]=obj[_58e];
_591=obj[_58f]=new dojo.event.MethodJoinPoint(obj,_590);
obj[_58e]=function(){
var args=[];
if((_592)&&(!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)&&(_592)&&(dojo.event.browser.isEvent(arguments[x]))){
args.push(dojo.event.browser.fixEvent(arguments[x],this));
}else{
args.push(arguments[x]);
}
}
}
return _591.run.apply(_591,args);
};
obj[_58e].__preJoinArity=_593;
}
return _591;
};
dojo.lang.extend(dojo.event.MethodJoinPoint,{unintercept:function(){
this.object[this.methodname]=this.methodfunc;
this.before=[];
this.after=[];
this.around=[];
},disconnect:dojo.lang.forward("unintercept"),run:function(){
var obj=this.object||dj_global;
var args=arguments;
var _599=[];
for(var x=0;x<args.length;x++){
_599[x]=args[x];
}
var _59b=function(marr){
if(!marr){
dojo.debug("Null argument to unrollAdvice()");
return;
}
var _59d=marr[0]||dj_global;
var _59e=marr[1];
if(!_59d[_59e]){
dojo.raise("function \""+_59e+"\" does not exist on \""+_59d+"\"");
}
var _59f=marr[2]||dj_global;
var _5a0=marr[3];
var msg=marr[6];
var _5a2;
var to={args:[],jp_:this,object:obj,proceed:function(){
return _59d[_59e].apply(_59d,to.args);
}};
to.args=_599;
var _5a4=parseInt(marr[4]);
var _5a5=((!isNaN(_5a4))&&(marr[4]!==null)&&(typeof marr[4]!="undefined"));
if(marr[5]){
var rate=parseInt(marr[5]);
var cur=new Date();
var _5a8=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;
_59b(mcpy);
},tod);
}
return;
}else{
marr.last=cur;
}
}
if(_5a0){
_59f[_5a0].call(_59f,to);
}else{
if((_5a5)&&((dojo.render.html)||(dojo.render.svg))){
dj_global["setTimeout"](function(){
if(msg){
_59d[_59e].call(_59d,to);
}else{
_59d[_59e].apply(_59d,args);
}
},_5a4);
}else{
if(msg){
_59d[_59e].call(_59d,to);
}else{
_59d[_59e].apply(_59d,args);
}
}
}
};
var _5ab=function(){
if(this.squelch){
try{
return _59b.apply(this,arguments);
}
catch(e){
dojo.debug(e);
}
}else{
return _59b.apply(this,arguments);
}
};
if((this["before"])&&(this.before.length>0)){
dojo.lang.forEach(this.before.concat(new Array()),_5ab);
}
var _5ac;
try{
if((this["around"])&&(this.around.length>0)){
var mi=new dojo.event.MethodInvocation(this,obj,args);
_5ac=mi.proceed();
}else{
if(this.methodfunc){
_5ac=this.object[this.methodname].apply(this.object,args);
}
}
}
catch(e){
if(!this.squelch){
dojo.raise(e);
}
}
if((this["after"])&&(this.after.length>0)){
dojo.lang.forEach(this.after.concat(new Array()),_5ab);
}
return (this.methodfunc)?_5ac:null;
},getArr:function(kind){
var type="after";
if((typeof kind=="string")&&(kind.indexOf("before")!=-1)){
type="before";
}else{
if(kind=="around"){
type="around";
}
}
if(!this[type]){
this[type]=[];
}
return this[type];
},kwAddAdvice:function(args){
this.addAdvice(args["adviceObj"],args["adviceFunc"],args["aroundObj"],args["aroundFunc"],args["adviceType"],args["precedence"],args["once"],args["delay"],args["rate"],args["adviceMsg"]);
},addAdvice:function(_5b1,_5b2,_5b3,_5b4,_5b5,_5b6,once,_5b8,rate,_5ba){
var arr=this.getArr(_5b5);
if(!arr){
dojo.raise("bad this: "+this);
}
var ao=[_5b1,_5b2,_5b3,_5b4,_5b8,rate,_5ba];
if(once){
if(this.hasAdvice(_5b1,_5b2,_5b5,arr)>=0){
return;
}
}
if(_5b6=="first"){
arr.unshift(ao);
}else{
arr.push(ao);
}
},hasAdvice:function(_5bd,_5be,_5bf,arr){
if(!arr){
arr=this.getArr(_5bf);
}
var ind=-1;
for(var x=0;x<arr.length;x++){
var aao=(typeof _5be=="object")?(new String(_5be)).toString():_5be;
var a1o=(typeof arr[x][1]=="object")?(new String(arr[x][1])).toString():arr[x][1];
if((arr[x][0]==_5bd)&&(a1o==aao)){
ind=x;
}
}
return ind;
},removeAdvice:function(_5c5,_5c6,_5c7,once){
var arr=this.getArr(_5c7);
var ind=this.hasAdvice(_5c5,_5c6,_5c7,arr);
if(ind==-1){
return false;
}
while(ind!=-1){
arr.splice(ind,1);
if(once){
break;
}
ind=this.hasAdvice(_5c5,_5c6,_5c7,arr);
}
return true;
}});
dojo.provide("dojo.event.topic");
dojo.event.topic=new function(){
this.topics={};
this.getTopic=function(_5cb){
if(!this.topics[_5cb]){
this.topics[_5cb]=new this.TopicImpl(_5cb);
}
return this.topics[_5cb];
};
this.registerPublisher=function(_5cc,obj,_5ce){
var _5cc=this.getTopic(_5cc);
_5cc.registerPublisher(obj,_5ce);
};
this.subscribe=function(_5cf,obj,_5d1){
var _5cf=this.getTopic(_5cf);
_5cf.subscribe(obj,_5d1);
};
this.unsubscribe=function(_5d2,obj,_5d4){
var _5d2=this.getTopic(_5d2);
_5d2.unsubscribe(obj,_5d4);
};
this.destroy=function(_5d5){
this.getTopic(_5d5).destroy();
delete this.topics[_5d5];
};
this.publishApply=function(_5d6,args){
var _5d6=this.getTopic(_5d6);
_5d6.sendMessage.apply(_5d6,args);
};
this.publish=function(_5d8,_5d9){
var _5d8=this.getTopic(_5d8);
var args=[];
for(var x=1;x<arguments.length;x++){
args.push(arguments[x]);
}
_5d8.sendMessage.apply(_5d8,args);
};
};
dojo.event.topic.TopicImpl=function(_5dc){
this.topicName=_5dc;
this.subscribe=function(_5dd,_5de){
var tf=_5de||_5dd;
var to=(!_5de)?dj_global:_5dd;
return dojo.event.kwConnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
};
this.unsubscribe=function(_5e1,_5e2){
var tf=(!_5e2)?_5e1:_5e2;
var to=(!_5e2)?null:_5e1;
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(_5e5){
this._getJoinPoint().squelch=_5e5;
};
this.destroy=function(){
this._getJoinPoint().disconnect();
};
this.registerPublisher=function(_5e6,_5e7){
dojo.event.connect(_5e6,_5e7,this,"sendMessage");
};
this.sendMessage=function(_5e8){
};
};
dojo.provide("dojo.xml.Parse");
dojo.xml.Parse=function(){
function getTagName(node){
return ((node)&&(node.tagName)?node.tagName.toLowerCase():"");
}
function getDojoTagName(node){
var _5eb=getTagName(node);
if(!_5eb){
return "";
}
if((dojo.widget)&&(dojo.widget.tags[_5eb])){
return _5eb;
}
var p=_5eb.indexOf(":");
if(p>=0){
return _5eb;
}
if(_5eb.substr(0,5)=="dojo:"){
return _5eb;
}
if(dojo.render.html.capable&&dojo.render.html.ie&&node.scopeName!="HTML"){
return node.scopeName.toLowerCase()+":"+_5eb;
}
if(_5eb.substr(0,4)=="dojo"){
return "dojo:"+_5eb.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 _5ee=node.className||node.getAttribute("class");
if((_5ee)&&(_5ee.indexOf)&&(_5ee.indexOf("dojo-")!=-1)){
var _5ef=_5ee.split(" ");
for(var x=0,c=_5ef.length;x<c;x++){
if(_5ef[x].slice(0,5)=="dojo-"){
return "dojo:"+_5ef[x].substr(5).toLowerCase();
}
}
}
}
return "";
}
this.parseElement=function(node,_5f3,_5f4,_5f5){
var _5f6={};
var _5f7=getTagName(node);
if((_5f7)&&(_5f7.indexOf("/")==0)){
return null;
}
var _5f8=true;
if(_5f4){
var _5f9=getDojoTagName(node);
_5f7=_5f9||_5f7;
_5f8=Boolean(_5f9);
}
if(node&&node.getAttribute&&node.getAttribute("parseWidgets")&&node.getAttribute("parseWidgets")=="false"){
return {};
}
_5f6[_5f7]=[];
var pos=_5f7.indexOf(":");
if(pos>0){
var ns=_5f7.substring(0,pos);
_5f6["ns"]=ns;
if((dojo.ns)&&(!dojo.ns.allow(ns))){
_5f8=false;
}
}
if(_5f8){
var _5fc=this.parseAttributes(node);
for(var attr in _5fc){
if((!_5f6[_5f7][attr])||(typeof _5f6[_5f7][attr]!="array")){
_5f6[_5f7][attr]=[];
}
_5f6[_5f7][attr].push(_5fc[attr]);
}
_5f6[_5f7].nodeRef=node;
_5f6.tagName=_5f7;
_5f6.index=_5f5||0;
}
var _5fe=0;
for(var i=0;i<node.childNodes.length;i++){
var tcn=node.childNodes.item(i);
switch(tcn.nodeType){
case dojo.dom.ELEMENT_NODE:
_5fe++;
var ctn=getDojoTagName(tcn)||getTagName(tcn);
if(!_5f6[ctn]){
_5f6[ctn]=[];
}
_5f6[ctn].push(this.parseElement(tcn,true,_5f4,_5fe));
if((tcn.childNodes.length==1)&&(tcn.childNodes.item(0).nodeType==dojo.dom.TEXT_NODE)){
_5f6[ctn][_5f6[ctn].length-1].value=tcn.childNodes.item(0).nodeValue;
}
break;
case dojo.dom.TEXT_NODE:
if(node.childNodes.length==1){
_5f6[_5f7].push({value:node.childNodes.item(0).nodeValue});
}
break;
default:
break;
}
}
return _5f6;
};
this.parseAttributes=function(node){
var _603={};
var atts=node.attributes;
var _605,i=0;
while((_605=atts[i++])){
if((dojo.render.html.capable)&&(dojo.render.html.ie)){
if(!_605){
continue;
}
if((typeof _605=="object")&&(typeof _605.nodeValue=="undefined")||(_605.nodeValue==null)||(_605.nodeValue=="")){
continue;
}
}
var nn=_605.nodeName.split(":");
nn=(nn.length==2)?nn[1]:_605.nodeName;
_603[nn]={value:_605.nodeValue};
}
return _603;
};
};
dojo.provide("dojo.ns");
dojo.ns={namespaces:{},failed:{},loading:{},loaded:{},register:function(name,_609,_60a,_60b){
if(!_60b||!this.namespaces[name]){
this.namespaces[name]=new dojo.ns.Ns(name,_609,_60a);
}
},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,_612,_613){
this.name=name;
this.module=_612;
this.resolver=_613;
this._loaded=[];
this._failed=[];
};
dojo.ns.Ns.prototype.resolve=function(name,_615,_616){
if(!this.resolver||djConfig["skipAutoRequire"]){
return false;
}
var _617=this.resolver(name,_615);
if((_617)&&(!this._loaded[_617])&&(!this._failed[_617])){
var req=dojo.require;
req(_617,false,true);
if(dojo.hostenv.findModule(_617,false)){
this._loaded[_617]=true;
}else{
if(!_616){
dojo.raise("dojo.ns.Ns.resolve: module '"+_617+"' not found after loading via namespace '"+this.name+"'");
}
this._failed[_617]=true;
}
}
return Boolean(this._loaded[_617]);
};
dojo.registerNamespace=function(name,_61a,_61b){
dojo.ns.register.apply(dojo.ns,arguments);
};
dojo.registerNamespaceResolver=function(name,_61d){
var n=dojo.ns.namespaces[name];
if(n){
n.resolver=_61d;
}
};
dojo.registerNamespaceManifest=function(_61f,path,name,_622,_623){
dojo.registerModulePath(name,path);
dojo.registerNamespace(name,_622,_623);
};
dojo.registerNamespace("dojo","dojo.widget");
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(_626){
var na;
var tna;
if(_626){
tna=_626.all||_626.getElementsByTagName("*");
na=[_626];
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 _62a={};
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){
}
try{
window.onload=null;
}
catch(e){
}
try{
window.onunload=null;
}
catch(e){
}
dojo._ie_clobber.clobberNodes=[];
});
}
dojo.event.browser=new function(){
var _62e=0;
this.normalizedEventName=function(_62f){
switch(_62f){
case "CheckboxStateChange":
case "DOMAttrModified":
case "DOMMenuItemActive":
case "DOMMenuItemInactive":
case "DOMMouseScroll":
case "DOMNodeInserted":
case "DOMNodeRemoved":
case "RadioStateChange":
return _62f;
break;
default:
return _62f.toLowerCase();
break;
}
};
this.clean=function(node){
if(dojo.render.html.ie){
dojo._ie_clobber.clobber(node);
}
};
this.addClobberNode=function(node){
if(!dojo.render.html.ie){
return;
}
if(!node["__doClobber__"]){
node.__doClobber__=true;
dojo._ie_clobber.clobberNodes.push(node);
node.__clobberAttrs__=[];
}
};
this.addClobberNodeAttrs=function(node,_633){
if(!dojo.render.html.ie){
return;
}
this.addClobberNode(node);
for(var x=0;x<_633.length;x++){
node.__clobberAttrs__.push(_633[x]);
}
};
this.removeListener=function(node,_636,fp,_638){
if(!_638){
var _638=false;
}
_636=dojo.event.browser.normalizedEventName(_636);
if((_636=="onkey")||(_636=="key")){
if(dojo.render.html.ie){
this.removeListener(node,"onkeydown",fp,_638);
}
_636="onkeypress";
}
if(_636.substr(0,2)=="on"){
_636=_636.substr(2);
}
if(node.removeEventListener){
node.removeEventListener(_636,fp,_638);
}
};
this.addListener=function(node,_63a,fp,_63c,_63d){
if(!node){
return;
}
if(!_63c){
var _63c=false;
}
_63a=dojo.event.browser.normalizedEventName(_63a);
if((_63a=="onkey")||(_63a=="key")){
if(dojo.render.html.ie){
this.addListener(node,"onkeydown",fp,_63c,_63d);
}
_63a="onkeypress";
}
if(_63a.substr(0,2)!="on"){
_63a="on"+_63a;
}
if(!_63d){
var _63e=function(evt){
if(!evt){
evt=window.event;
}
var ret=fp(dojo.event.browser.fixEvent(evt,this));
if(_63c){
dojo.event.browser.stopEvent(evt);
}
return ret;
};
}else{
_63e=fp;
}
if(node.addEventListener){
node.addEventListener(_63a.substr(2),_63e,_63c);
return _63e;
}else{
if(typeof node[_63a]=="function"){
var _641=node[_63a];
node[_63a]=function(e){
_641(e);
return _63e(e);
};
}else{
node[_63a]=_63e;
}
if(dojo.render.html.ie){
this.addClobberNodeAttrs(node,[_63a]);
}
return _63e;
}
};
this.isEvent=function(obj){
return (typeof obj!="undefined")&&(typeof Event!="undefined")&&(obj.eventPhase);
};
this.currentEvent=null;
this.callListener=function(_644,_645){
if(typeof _644!="function"){
dojo.raise("listener not a function: "+_644);
}
dojo.event.browser.currentEvent.currentTarget=_645;
return _644.call(_645,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,_648){
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 _64a=evt.keyCode;
if(_64a>=65&&_64a<=90&&evt.shiftKey==false){
_64a+=32;
}
if(_64a>=1&&_64a<=26&&evt.ctrlKey){
_64a+=96;
}
evt.key=String.fromCharCode(_64a);
}
}
}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 _64a=evt.which;
if((evt.ctrlKey||evt.altKey||evt.metaKey)&&(evt.which>=65&&evt.which<=90&&evt.shiftKey==false)){
_64a+=32;
}
evt.key=String.fromCharCode(_64a);
}
}
}
}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 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;
default:
evt.key=evt.charCode>0?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=(_648?_648: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 _64c=((dojo.render.html.ie55)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;
if(!evt.pageX){
evt.pageX=evt.clientX+(_64c.scrollLeft||0);
}
if(!evt.pageY){
evt.pageY=evt.clientY+(_64c.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.returnValue=false;
evt.cancelBubble=true;
}else{
evt.preventDefault();
evt.stopPropagation();
}
};
};
dojo.provide("dojo.event.*");
dojo.provide("dojo.widget.Manager");
dojo.widget.manager=new function(){
this.widgets=[];
this.widgetIds=[];
this.topWidgets={};
var _64e={};
var _64f=[];
this.getUniqueId=function(_650){
var _651;
do{
_651=_650+"_"+(_64e[_650]!=undefined?++_64e[_650]:_64e[_650]=0);
}while(this.getWidgetById(_651));
return _651;
};
this.add=function(_652){
this.widgets.push(_652);
if(!_652.extraArgs["id"]){
_652.extraArgs["id"]=_652.extraArgs["ID"];
}
if(_652.widgetId==""){
if(_652["id"]){
_652.widgetId=_652["id"];
}else{
if(_652.extraArgs["id"]){
_652.widgetId=_652.extraArgs["id"];
}else{
_652.widgetId=this.getUniqueId(_652.widgetType);
}
}
}
if(this.widgetIds[_652.widgetId]){
dojo.debug("widget ID collision on ID: "+_652.widgetId);
}
this.widgetIds[_652.widgetId]=_652;
};
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(_654){
if(dojo.lang.isNumber(_654)){
var tw=this.widgets[_654].widgetId;
delete this.widgetIds[tw];
this.widgets.splice(_654,1);
}else{
this.removeById(_654);
}
};
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 _65b=(type.indexOf(":")<0?function(x){
return x.widgetType.toLowerCase();
}:function(x){
return x.getNamespacedType();
});
var ret=[];
dojo.lang.forEach(this.widgets,function(x){
if(_65b(x)==lt){
ret.push(x);
}
});
return ret;
};
this.getWidgetsByFilter=function(_660,_661){
var ret=[];
dojo.lang.every(this.widgets,function(x){
if(_660(x)){
ret.push(x);
if(_661){
return false;
}
}
return true;
});
return (_661?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 _667={};
var _668=["dojo.widget"];
for(var i=0;i<_668.length;i++){
_668[_668[i]]=true;
}
this.registerWidgetPackage=function(_66a){
if(!_668[_66a]){
_668[_66a]=true;
_668.push(_66a);
}
};
this.getWidgetPackageList=function(){
return dojo.lang.map(_668,function(elt){
return (elt!==true?elt:undefined);
});
};
this.getImplementation=function(_66c,_66d,_66e,ns){
var impl=this.getImplementationName(_66c,ns);
if(impl){
var ret=_66d?new impl(_66d):new impl();
return ret;
}
};
function buildPrefixCache(){
for(var _672 in dojo.render){
if(dojo.render[_672]["capable"]===true){
var _673=dojo.render[_672].prefixes;
for(var i=0;i<_673.length;i++){
_64f.push(_673[i].toLowerCase());
}
}
}
}
var _675=function(_676,_677){
if(!_677){
return null;
}
for(var i=0,l=_64f.length,_67a;i<=l;i++){
_67a=(i<l?_677[_64f[i]]:_677);
if(!_67a){
continue;
}
for(var name in _67a){
if(name.toLowerCase()==_676){
return _67a[name];
}
}
}
return null;
};
var _67c=function(_67d,_67e){
var _67f=dojo.evalObjPath(_67e,false);
return (_67f?_675(_67d,_67f):null);
};
this.getImplementationName=function(_680,ns){
var _682=_680.toLowerCase();
ns=ns||"dojo";
var imps=_667[ns]||(_667[ns]={});
var impl=imps[_682];
if(impl){
return impl;
}
if(!_64f.length){
buildPrefixCache();
}
var _685=dojo.ns.get(ns);
if(!_685){
dojo.ns.register(ns,ns+".widget");
_685=dojo.ns.get(ns);
}
if(_685){
_685.resolve(_680);
}
impl=_67c(_682,_685.module);
if(impl){
return (imps[_682]=impl);
}
_685=dojo.ns.require(ns);
if((_685)&&(_685.resolver)){
_685.resolve(_680);
impl=_67c(_682,_685.module);
if(impl){
return (imps[_682]=impl);
}
}
dojo.deprecated("dojo.widget.Manager.getImplementationName","Could not locate widget implementation for \""+_680+"\" in \""+_685.module+"\" registered to namespace \""+_685.name+"\". "+"Developers must specify correct namespaces for all non-Dojo widgets","0.5");
for(var i=0;i<_668.length;i++){
impl=_67c(_682,_668[i]);
if(impl){
return (imps[_682]=impl);
}
}
throw new Error("Could not locate widget implementation for \""+_680+"\" in \""+_685.module+"\" registered to namespace \""+_685.name+"\"");
};
this.resizing=false;
this.onWindowResized=function(){
if(this.resizing){
return;
}
try{
this.resizing=true;
for(var id in this.topWidgets){
var _688=this.topWidgets[id];
if(_688.checkSize){
_688.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(_68d,_68e){
dw[(_68e||_68d)]=h(_68d);
};
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 _690=dwm.getAllWidgets.apply(dwm,arguments);
if(arguments.length>0){
return _690[n];
}
return _690;
};
g("registerWidgetPackage");
g("getImplementation","getWidgetImplementation");
g("getImplementationName","getWidgetImplementationName");
dw.widgets=dwm.widgets;
dw.widgetIds=dwm.widgetIds;
dw.root=dwm.root;
})();
dojo.provide("dojo.a11y");
dojo.a11y={imgPath:dojo.uri.dojoUri("src/widget/templates/images"),doAccessibleCheck:true,accessible:null,checkAccessible:function(){
if(this.accessible===null){
this.accessible=false;
if(this.doAccessibleCheck==true){
this.accessible=this.testAccessible();
}
}
return this.accessible;
},testAccessible:function(){
this.accessible=false;
if(dojo.render.html.ie||dojo.render.html.mozilla){
var div=document.createElement("div");
div.style.backgroundImage="url(\""+this.imgPath+"/tab_close.gif\")";
dojo.body().appendChild(div);
var _692=null;
if(window.getComputedStyle){
var _693=getComputedStyle(div,"");
_692=_693.getPropertyValue("background-image");
}else{
_692=div.currentStyle.backgroundImage;
}
var _694=false;
if(_692!=null&&(_692=="none"||_692=="url(invalid-url:)")){
this.accessible=true;
}
dojo.body().removeChild(div);
}
return this.accessible;
},setCheckAccessible:function(_695){
this.doAccessibleCheck=_695;
},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,children:[],extraArgs:{},isTopLevel:false,isModal:false,isEnabled:true,isHidden: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.isEnabled=true;
},disable:function(){
this.isEnabled=false;
},hide:function(){
this.isHidden=true;
},show:function(){
this.isHidden=false;
},onResized:function(){
this.notifyChildrenOfResize();
},notifyChildrenOfResize:function(){
for(var i=0;i<this.children.length;i++){
var _697=this.children[i];
if(_697.onResized){
_697.onResized();
}
}
},create:function(args,_699,_69a,ns){
if(ns){
this.ns=ns;
}
this.satisfyPropertySets(args,_699,_69a);
this.mixInProperties(args,_699,_69a);
this.postMixInProperties(args,_699,_69a);
dojo.widget.manager.add(this);
this.buildRendering(args,_699,_69a);
this.initialize(args,_699,_69a);
this.postInitialize(args,_699,_69a);
this.postCreate(args,_699,_69a);
return this;
},destroy:function(_69c){
this.destroyChildren();
this.uninitialize();
this.destroyRendering(_69c);
dojo.widget.manager.removeById(this.widgetId);
},destroyChildren:function(){
var _69d;
var i=0;
while(this.children.length>i){
_69d=this.children[i];
if(_69d instanceof dojo.widget.Widget){
this.removeChild(_69d);
_69d.destroy();
continue;
}
i++;
}
},getChildrenOfType:function(type,_6a0){
var ret=[];
var _6a2=dojo.lang.isFunction(type);
if(!_6a2){
type=type.toLowerCase();
}
for(var x=0;x<this.children.length;x++){
if(_6a2){
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(_6a0){
ret=ret.concat(this.children[x].getChildrenOfType(type,_6a0));
}
}
return ret;
},getDescendants:function(){
var _6a4=[];
var _6a5=[this];
var elem;
while((elem=_6a5.pop())){
_6a4.push(elem);
if(elem.children){
dojo.lang.forEach(elem.children,function(elem){
_6a5.push(elem);
});
}
}
return _6a4;
},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 _6ac;
var _6ad=dojo.widget.lcArgsCache[this.widgetType];
if(_6ad==null){
_6ad={};
for(var y in this){
_6ad[((new String(y)).toLowerCase())]=y;
}
dojo.widget.lcArgsCache[this.widgetType]=_6ad;
}
var _6af={};
for(var x in args){
if(!this[x]){
var y=_6ad[(new String(x)).toLowerCase()];
if(y){
args[y]=args[x];
x=y;
}
}
if(_6af[x]){
continue;
}
_6af[x]=true;
if((typeof this[x])!=(typeof _6ac)){
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]=args[x];
}else{
var _6b1=args[x].split(";");
for(var y=0;y<_6b1.length;y++){
var si=_6b1[y].indexOf(":");
if((si!=-1)&&(_6b1[y].length>si)){
this[x][_6b1[y].substr(0,si).replace(/^\s+|\s+$/g,"")]=_6b1[y].substr(si+1);
}
}
}
}else{
this[x]=args[x];
}
}
}
}
}
}
}
}
}else{
this.extraArgs[x.toLowerCase()]=args[x];
}
}
},postMixInProperties:function(args,frag,_6b5){
},initialize:function(args,frag,_6b8){
return false;
},postInitialize:function(args,frag,_6bb){
return false;
},postCreate:function(args,frag,_6be){
return false;
},uninitialize:function(){
return false;
},buildRendering:function(args,frag,_6c1){
dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", ");
return false;
},destroyRendering:function(){
dojo.unimplemented("dojo.widget.Widget.destroyRendering");
return false;
},cleanUp:function(){
dojo.unimplemented("dojo.widget.Widget.cleanUp");
return false;
},addedTo:function(_6c2){
},addChild:function(_6c3){
dojo.unimplemented("dojo.widget.Widget.addChild");
return false;
},removeChild:function(_6c4){
for(var x=0;x<this.children.length;x++){
if(this.children[x]===_6c4){
this.children.splice(x,1);
break;
}
}
return _6c4;
},resize:function(_6c6,_6c7){
this.setWidth(_6c6);
this.setHeight(_6c7);
},setWidth:function(_6c8){
if((typeof _6c8=="string")&&(_6c8.substr(-1)=="%")){
this.setPercentageWidth(_6c8);
}else{
this.setNativeWidth(_6c8);
}
},setHeight:function(_6c9){
if((typeof _6c9=="string")&&(_6c9.substr(-1)=="%")){
this.setPercentageHeight(_6c9);
}else{
this.setNativeHeight(_6c9);
}
},setPercentageHeight:function(_6ca){
return false;
},setNativeHeight:function(_6cb){
return false;
},setPercentageWidth:function(_6cc){
return false;
},setNativeWidth:function(_6cd){
return false;
},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(_6d1,_6d2,_6d3){
var _6d4=_6d2.parseProperties(_6d1["dojo:propertyset"]);
};
dojo.widget.tags["dojo:connect"]=function(_6d5,_6d6,_6d7){
var _6d8=_6d6.parseProperties(_6d5["dojo:connect"]);
};
dojo.widget.buildWidgetFromParseTree=function(type,frag,_6db,_6dc,_6dd,_6de){
dojo.a11y.setAccessibleMode();
var _6df=type.split(":");
_6df=(_6df.length==2)?_6df[1]:type;
var _6e0=_6de||_6db.parseProperties(frag[frag["ns"]+":"+_6df]);
var _6e1=dojo.widget.manager.getImplementation(_6df,null,null,frag["ns"]);
if(!_6e1){
throw new Error("cannot find \""+type+"\" widget");
}else{
if(!_6e1.create){
throw new Error("\""+type+"\" widget object has no \"create\" method and does not appear to implement *Widget");
}
}
_6e0["dojoinsertionindex"]=_6dd;
var ret=_6e1.create(_6e0,frag,_6dc,frag["ns"]);
return ret;
};
dojo.widget.defineWidget=function(_6e3,_6e4,_6e5,init,_6e7){
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(_6ea,_6eb,_6ec,init,_6ee){
var _6ef=_6ea.split(".");
var type=_6ef.pop();
var regx="\\.("+(_6eb?_6eb+"|":"")+dojo.widget.defineWidget.renderers+")\\.";
var r=_6ea.search(new RegExp(regx));
_6ef=(r<0?_6ef.join("."):_6ea.substr(0,r));
dojo.widget.manager.registerWidgetPackage(_6ef);
var pos=_6ef.indexOf(".");
var _6f4=(pos>-1)?_6ef.substring(0,pos):_6ef;
_6ee=(_6ee)||{};
_6ee.widgetType=type;
if((!init)&&(_6ee["classConstructor"])){
init=_6ee.classConstructor;
delete _6ee.classConstructor;
}
dojo.declare(_6ea,_6ec,init,_6ee);
};
dojo.provide("dojo.widget.Parse");
dojo.widget.Parse=function(_6f5){
this.propertySetsList=[];
this.fragment=_6f5;
this.createComponents=function(frag,_6f7){
var _6f8=[];
var _6f9=false;
try{
if((frag)&&(frag["tagName"])&&(frag!=frag["nodeRef"])){
var _6fa=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;
if(_6fa[ltn]){
_6f9=true;
var ret=_6fa[ltn](frag,this,_6f7,frag["index"]);
_6f8.push(ret);
}else{
if(ltn.indexOf(":")==-1){
ltn="dojo:"+ltn;
}
var ret=dojo.widget.buildWidgetFromParseTree(ltn,frag,this,_6f7,frag["index"]);
if(ret){
_6f9=true;
_6f8.push(ret);
}
}
}
}
}
catch(e){
dojo.debug("dojo.widget.Parse: error:"+e);
}
if(!_6f9){
_6f8=_6f8.concat(this.createSubComponents(frag,_6f7));
}
return _6f8;
};
this.createSubComponents=function(_6ff,_700){
var frag,_702=[];
for(var item in _6ff){
frag=_6ff[item];
if((frag)&&(typeof frag=="object")&&(frag!=_6ff.nodeRef)&&(frag!=_6ff["tagName"])){
_702=_702.concat(this.createComponents(frag,_700));
}
}
return _702;
};
this.parsePropertySets=function(_704){
return [];
};
this.parseProperties=function(_705){
var _706={};
for(var item in _705){
if((_705[item]==_705["tagName"])||(_705[item]==_705.nodeRef)){
}else{
if((_705[item]["tagName"])&&(dojo.widget.tags[_705[item].tagName.toLowerCase()])){
}else{
if((_705[item][0])&&(_705[item][0].value!="")&&(_705[item][0].value!=null)){
try{
if(item.toLowerCase()=="dataprovider"){
var _708=this;
this.getDataProvider(_708,_705[item][0].value);
_706.dataProvider=this.dataProvider;
}
_706[item]=_705[item][0].value;
var _709=this.parseProperties(_705[item]);
for(var _70a in _709){
_706[_70a]=_709[_70a];
}
}
catch(e){
dojo.debug(e);
}
}
}
switch(item.toLowerCase()){
case "checked":
case "disabled":
if(typeof _706[item]!="boolean"){
_706[item]=true;
}
break;
}
}
}
return _706;
};
this.getDataProvider=function(_70b,_70c){
dojo.io.bind({url:_70c,load:function(type,_70e){
if(type=="load"){
_70b.dataProvider=_70e;
}
},mimetype:"text/javascript",sync:true});
};
this.getPropertySetById=function(_70f){
for(var x=0;x<this.propertySetsList.length;x++){
if(_70f==this.propertySetsList[x]["id"][0].value){
return this.propertySetsList[x];
}
}
return "";
};
this.getPropertySetsByType=function(_711){
var _712=[];
for(var x=0;x<this.propertySetsList.length;x++){
var cpl=this.propertySetsList[x];
var cpcc=cpl["componentClass"]||cpl["componentType"]||null;
var _716=this.propertySetsList[x]["id"][0].value;
if((cpcc)&&(_716==cpcc[0].value)){
_712.push(cpl);
}
}
return _712;
};
this.getPropertySets=function(_717){
var ppl="dojo:propertyproviderlist";
var _719=[];
var _71a=_717["tagName"];
if(_717[ppl]){
var _71b=_717[ppl].value.split(" ");
for(var _71c in _71b){
if((_71c.indexOf("..")==-1)&&(_71c.indexOf("://")==-1)){
var _71d=this.getPropertySetById(_71c);
if(_71d!=""){
_719.push(_71d);
}
}else{
}
}
}
return (this.getPropertySetsByType(_71a)).concat(_719);
};
this.createComponentFromScript=function(_71e,_71f,_720,ns){
_720.fastMixIn=true;
var ltn=(ns||"dojo")+":"+_71f.toLowerCase();
if(dojo.widget.tags[ltn]){
return [dojo.widget.tags[ltn](_720,this,null,null,_720)];
}
return [dojo.widget.buildWidgetFromParseTree(ltn,_720,this,null,null,_720)];
};
};
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,_725,_726,_727){
var _728=false;
var _729=(typeof name=="string");
if(_729){
var pos=name.indexOf(":");
var ns=(pos>-1)?name.substring(0,pos):"dojo";
if(pos>-1){
name=name.substring(pos+1);
}
var _72c=name.toLowerCase();
var _72d=ns+":"+_72c;
_728=(dojo.byId(name)&&(!dojo.widget.tags[_72d]));
}
if((arguments.length==1)&&((_728)||(!_729))){
var xp=new dojo.xml.Parse();
var tn=(_728)?dojo.byId(name):name;
return dojo.widget.getParser().createComponents(xp.parseElement(tn,null,true))[0];
}
function fromScript(_730,name,_732,ns){
_732[_72d]={dojotype:[{value:_72c}],nodeRef:_730,fastMixIn:true};
_732.ns=ns;
return dojo.widget.getParser().createComponentFromScript(_730,name,_732,ns);
}
_725=_725||{};
var _734=false;
var tn=null;
var h=dojo.render.html.capable;
if(h){
tn=document.createElement("span");
}
if(!_726){
_734=true;
_726=tn;
if(h){
dojo.body().appendChild(_726);
}
}else{
if(_727){
dojo.dom.insertAtPosition(tn,_726,_727);
}else{
tn=_726;
}
}
var _736=fromScript(tn,name.toLowerCase(),_725,ns);
if((!_736)||(!_736[0])||(typeof _736[0].widgetType=="undefined")){
throw new Error("createWidget: Creation of \""+name+"\" widget failed.");
}
try{
if(_734){
if(_736[0].domNode.parentNode){
_736[0].domNode.parentNode.removeChild(_736[0].domNode);
}
}
}
catch(e){
dojo.debug(e);
}
return _736[0];
};
dojo.provide("dojo.widget.DomWidget");
dojo.widget._cssFiles={};
dojo.widget._cssStrings={};
dojo.widget._templateCache={};
dojo.widget.defaultStrings={dojoRoot:dojo.hostenv.getBaseScriptUri(),baseScriptUri:dojo.hostenv.getBaseScriptUri()};
dojo.widget.fillFromTemplateCache=function(obj,_738,_739,_73a){
var _73b=_738||obj.templatePath;
var _73c=dojo.widget._templateCache;
if(!obj["widgetType"]){
do{
var _73d="__dummyTemplate__"+dojo.widget._templateCache.dummyCount++;
}while(_73c[_73d]);
obj.widgetType=_73d;
}
var wt=obj.widgetType;
var ts=_73c[wt];
if(!ts){
_73c[wt]={"string":null,"node":null};
if(_73a){
ts={};
}else{
ts=_73c[wt];
}
}
if((!obj.templateString)&&(!_73a)){
obj.templateString=_739||ts["string"];
}
if((!obj.templateNode)&&(!_73a)){
obj.templateNode=ts["node"];
}
if((!obj.templateNode)&&(!obj.templateString)&&(_73b)){
var _740=dojo.hostenv.getText(_73b);
if(_740){
_740=_740.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");
var _741=_740.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_741){
_740=_741[1];
}
}else{
_740="";
}
obj.templateString=_740;
if(!_73a){
_73c[wt]["string"]=_740;
}
}
if((!ts["string"])&&(!_73a)){
ts.string=obj.templateString;
}
};
dojo.widget._templateCache.dummyCount=0;
dojo.widget.attachProperties=["dojoAttachPoint","id"];
dojo.widget.eventAttachProperty="dojoAttachEvent";
dojo.widget.onBuildProperty="dojoOnBuild";
dojo.widget.waiNames=["waiRole","waiState"];
dojo.widget.wai={waiRole:{name:"waiRole","namespace":"http://www.w3.org/TR/xhtml2",alias:"x2",prefix:"wairole:"},waiState:{name:"waiState","namespace":"http://www.w3.org/2005/07/aaa",alias:"aaa",prefix:""},setAttr:function(node,ns,attr,_745){
if(dojo.render.html.ie){
node.setAttribute(this[ns].alias+":"+attr,this[ns].prefix+_745);
}else{
node.setAttributeNS(this[ns]["namespace"],attr,this[ns].prefix+_745);
}
},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 _74c=true;
if(dojo.render.html.ie){
_74c=node.removeAttribute(this[ns].alias+":"+attr);
}else{
node.removeAttributeNS(this[ns]["namespace"],attr);
}
return _74c;
}};
dojo.widget.attachTemplateNodes=function(_74d,_74e,_74f){
var _750=dojo.dom.ELEMENT_NODE;
function trim(str){
return str.replace(/^\s+|\s+$/g,"");
}
if(!_74d){
_74d=_74e.domNode;
}
if(_74d.nodeType!=_750){
return;
}
var _752=_74d.all||_74d.getElementsByTagName("*");
var _753=_74e;
for(var x=-1;x<_752.length;x++){
var _755=(x==-1)?_74d:_752[x];
var _756=[];
if(!_74e.widgetsInTemplate||!_755.getAttribute("dojoType")){
for(var y=0;y<this.attachProperties.length;y++){
var _758=_755.getAttribute(this.attachProperties[y]);
if(_758){
_756=_758.split(";");
for(var z=0;z<_756.length;z++){
if(dojo.lang.isArray(_74e[_756[z]])){
_74e[_756[z]].push(_755);
}else{
_74e[_756[z]]=_755;
}
}
break;
}
}
var _75a=_755.getAttribute(this.eventAttachProperty);
if(_75a){
var evts=_75a.split(";");
for(var y=0;y<evts.length;y++){
if((!evts[y])||(!evts[y].length)){
continue;
}
var _75c=null;
var tevt=trim(evts[y]);
if(evts[y].indexOf(":")>=0){
var _75e=tevt.split(":");
tevt=trim(_75e[0]);
_75c=trim(_75e[1]);
}
if(!_75c){
_75c=tevt;
}
var tf=function(){
var ntf=new String(_75c);
return function(evt){
if(_753[ntf]){
_753[ntf](dojo.event.browser.fixEvent(evt,this));
}
};
}();
dojo.event.browser.addListener(_755,tevt,tf,false,true);
}
}
for(var y=0;y<_74f.length;y++){
var _762=_755.getAttribute(_74f[y]);
if((_762)&&(_762.length)){
var _75c=null;
var _763=_74f[y].substr(4);
_75c=trim(_762);
var _764=[_75c];
if(_75c.indexOf(";")>=0){
_764=dojo.lang.map(_75c.split(";"),trim);
}
for(var z=0;z<_764.length;z++){
if(!_764[z].length){
continue;
}
var tf=function(){
var ntf=new String(_764[z]);
return function(evt){
if(_753[ntf]){
_753[ntf](dojo.event.browser.fixEvent(evt,this));
}
};
}();
dojo.event.browser.addListener(_755,_763,tf,false,true);
}
}
}
}
var _767=_755.getAttribute(this.templateProperty);
if(_767){
_74e[_767]=_755;
}
dojo.lang.forEach(dojo.widget.waiNames,function(name){
var wai=dojo.widget.wai[name];
var val=_755.getAttribute(wai.name);
if(val){
if(val.indexOf("-")==-1){
dojo.widget.wai.setAttr(_755,wai.name,"role",val);
}else{
var _76b=val.split("-");
dojo.widget.wai.setAttr(_755,wai.name,_76b[0],_76b[1]);
}
}
},this);
var _76c=_755.getAttribute(this.onBuildProperty);
if(_76c){
eval("var node = baseNode; var widget = targetObj; "+_76c);
}
}
};
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(_774,_775,pos,ref,_778){
if(!this.isContainer){
dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget");
return null;
}else{
if(_778==undefined){
_778=this.children.length;
}
this.addWidgetAsDirectChild(_774,_775,pos,ref,_778);
this.registerChild(_774,_778);
}
return _774;
},addWidgetAsDirectChild:function(_779,_77a,pos,ref,_77d){
if((!this.containerNode)&&(!_77a)){
this.containerNode=this.domNode;
}
var cn=(_77a)?_77a:this.containerNode;
if(!pos){
pos="after";
}
if(!ref){
if(!cn){
cn=dojo.body();
}
ref=cn.lastChild;
}
if(!_77d){
_77d=0;
}
_779.domNode.setAttribute("dojoinsertionindex",_77d);
if(!ref){
cn.appendChild(_779.domNode);
}else{
if(pos=="insertAtIndex"){
dojo.dom.insertAtIndex(_779.domNode,ref.parentNode,_77d);
}else{
if((pos=="after")&&(ref===cn.lastChild)){
cn.appendChild(_779.domNode);
}else{
dojo.dom.insertAtPosition(_779.domNode,cn,pos);
}
}
}
},registerChild:function(_77f,_780){
_77f.dojoInsertionIndex=_780;
var idx=-1;
for(var i=0;i<this.children.length;i++){
if(this.children[i].dojoInsertionIndex<=_780){
idx=i;
}
}
this.children.splice(idx+1,0,_77f);
_77f.parent=this;
_77f.addedTo(this,idx+1);
delete dojo.widget.manager.topWidgets[_77f.widgetId];
},removeChild:function(_783){
dojo.dom.removeNode(_783.domNode);
return dojo.widget.DomWidget.superclass.removeChild.call(this,_783);
},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,_787){
var _788=this.getFragNodeRef(frag);
if(_787&&(_787.snarfChildDomOutput||!_788)){
_787.addWidgetAsDirectChild(this,"","insertAtIndex","",args["dojoinsertionindex"],_788);
}else{
if(_788){
if(this.domNode&&(this.domNode!==_788)){
var _789=_788.parentNode.replaceChild(this.domNode,_788);
}
}
}
if(_787){
_787.registerChild(this,args.dojoinsertionindex);
}else{
dojo.widget.manager.topWidgets[this.widgetId]=this;
}
if(this.widgetsInTemplate){
var _78a=new dojo.xml.Parse();
var _78b;
var _78c=this.domNode.getElementsByTagName("*");
for(var i=0;i<_78c.length;i++){
if(_78c[i].getAttribute("dojoAttachPoint")=="subContainerWidget"){
_78b=_78c[i];
}
if(_78c[i].getAttribute("dojoType")){
_78c[i].setAttribute("_isSubWidget",true);
}
}
if(this.isContainer&&!this.containerNode){
if(_78b){
var src=this.getFragNodeRef(frag);
if(src){
dojo.dom.moveChildren(src,_78b);
frag["dojoDontFollow"]=true;
}
}else{
dojo.debug("No subContainerWidget node can be found in template file for widget "+this);
}
}
var _78f=_78a.parseElement(this.domNode,null,true);
dojo.widget.getParser().createSubComponents(_78f,this);
var _790=[];
var _791=[this];
var w;
while((w=_791.pop())){
for(var i=0;i<w.children.length;i++){
var _793=w.children[i];
if(_793._processedSubWidgets||!_793.extraArgs["_issubwidget"]){
continue;
}
_790.push(_793);
if(_793.isContainer){
_791.push(_793);
}
}
}
for(var i=0;i<_790.length;i++){
var _794=_790[i];
if(_794._processedSubWidgets){
dojo.debug("This should not happen: widget._processedSubWidgets is already true!");
return;
}
_794._processedSubWidgets=true;
if(_794.extraArgs["dojoattachevent"]){
var evts=_794.extraArgs["dojoattachevent"].split(";");
for(var j=0;j<evts.length;j++){
var _797=null;
var tevt=dojo.string.trim(evts[j]);
if(tevt.indexOf(":")>=0){
var _799=tevt.split(":");
tevt=dojo.string.trim(_799[0]);
_797=dojo.string.trim(_799[1]);
}
if(!_797){
_797=tevt;
}
if(dojo.lang.isFunction(_794[tevt])){
dojo.event.kwConnect({srcObj:_794,srcFunc:tevt,targetObj:this,targetFunc:_797});
}else{
alert(tevt+" is not a function in widget "+_794);
}
}
}
if(_794.extraArgs["dojoattachpoint"]){
this[_794.extraArgs["dojoattachpoint"]]=_794;
}
}
}
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 _79d=args["templateCssPath"]||this.templateCssPath;
if(_79d&&!dojo.widget._cssFiles[_79d.toString()]){
if((!this.templateCssString)&&(_79d)){
this.templateCssString=dojo.hostenv.getText(_79d);
this.templateCssPath=null;
}
dojo.widget._cssFiles[_79d.toString()]=true;
}
if((this["templateCssString"])&&(!this.templateCssString["loaded"])){
dojo.html.insertCssText(this.templateCssString,null,_79d);
if(!this.templateCssString){
this.templateCssString="";
}
this.templateCssString.loaded=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 _7a0=false;
if(args["templatepath"]){
_7a0=true;
args["templatePath"]=args["templatepath"];
}
dojo.widget.fillFromTemplateCache(this,args["templatePath"],null,_7a0);
var ts=dojo.widget._templateCache[this.widgetType];
if((ts)&&(!_7a0)){
if(!this.templateString.length){
this.templateString=ts["string"];
}
if(!this.templateNode){
this.templateNode=ts["node"];
}
}
var _7a2=false;
var node=null;
var tstr=this.templateString;
if((!this.templateNode)&&(this.templateString)){
_7a2=this.templateString.match(/\$\{([^\}]+)\}/g);
if(_7a2){
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<_7a2.length;i++){
var key=_7a2[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 _7a9;
if((kval)||(dojo.lang.isString(kval))){
_7a9=new String((dojo.lang.isFunction(kval))?kval.call(this,key,this.templateString):kval);
while(_7a9.indexOf("\"")>-1){
_7a9=_7a9.replace("\"","&quot;");
}
tstr=tstr.replace(_7a2[i],_7a9);
}
}
}else{
this.templateNode=this.createNodesFromText(this.templateString,true)[0];
if(!_7a0){
ts.node=this.templateNode;
}
}
}
if((!this.templateNode)&&(!_7a2)){
dojo.debug("DomWidget.buildFromTemplate: could not create template");
return false;
}else{
if(!_7a2){
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(_7ab,_7ac){
if(!_7ab){
_7ab=this.domNode;
}
if(!_7ac){
_7ac=this;
}
return dojo.widget.attachTemplateNodes(_7ab,_7ac,dojo.widget.getDojoEventsFromStr(this.templateString));
},fillInTemplate:function(){
},destroyRendering:function(){
try{
delete this.domNode;
}
catch(e){
}
},cleanUp:function(){
},getContainerHeight:function(){
dojo.unimplemented("dojo.widget.DomWidget.getContainerHeight");
},getContainerWidth:function(){
dojo.unimplemented("dojo.widget.DomWidget.getContainerWidth");
},createNodesFromText:function(){
dojo.unimplemented("dojo.widget.DomWidget.createNodesFromText");
}});
dojo.provide("dojo.html.util");
dojo.html.getElementWindow=function(_7ad){
return dojo.html.getDocumentWindow(_7ad.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 _7b5=dojo.html.getCursorPosition(e);
with(dojo.html){
var _7b6=getAbsolutePosition(node,true);
var bb=getBorderBox(node);
var _7b8=_7b6.x+(bb.width/2);
var _7b9=_7b6.y+(bb.height/2);
}
with(dojo.html.gravity){
return ((_7b5.x<_7b8?WEST:EAST)|(_7b5.y<_7b9?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(_7ba,e){
_7ba=dojo.byId(_7ba);
var _7bc=dojo.html.getCursorPosition(e);
var bb=dojo.html.getBorderBox(_7ba);
var _7be=dojo.html.getAbsolutePosition(_7ba,true,dojo.html.boxSizing.BORDER_BOX);
var top=_7be.y;
var _7c0=top+bb.height;
var left=_7be.x;
var _7c2=left+bb.width;
return (_7bc.x>=left&&_7bc.x<=_7c2&&_7bc.y>=top&&_7bc.y<=_7c0);
};
dojo.html.renderedTextContent=function(node){
node=dojo.byId(node);
var _7c4="";
if(node==null){
return _7c4;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
var _7c6="unknown";
try{
_7c6=dojo.html.getStyle(node.childNodes[i],"display");
}
catch(E){
}
switch(_7c6){
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":
_7c4+="\n";
_7c4+=dojo.html.renderedTextContent(node.childNodes[i]);
_7c4+="\n";
break;
case "none":
break;
default:
if(node.childNodes[i].tagName&&node.childNodes[i].tagName.toLowerCase()=="br"){
_7c4+="\n";
}else{
_7c4+=dojo.html.renderedTextContent(node.childNodes[i]);
}
break;
}
break;
case 3:
case 2:
case 4:
var text=node.childNodes[i].nodeValue;
var _7c8="unknown";
try{
_7c8=dojo.html.getStyle(node,"text-transform");
}
catch(E){
}
switch(_7c8){
case "capitalize":
var _7c9=text.split(" ");
for(var i=0;i<_7c9.length;i++){
_7c9[i]=_7c9[i].charAt(0).toUpperCase()+_7c9[i].substring(1);
}
text=_7c9.join(" ");
break;
case "uppercase":
text=text.toUpperCase();
break;
case "lowercase":
text=text.toLowerCase();
break;
default:
break;
}
switch(_7c8){
case "nowrap":
break;
case "pre-wrap":
break;
case "pre-line":
break;
case "pre":
break;
default:
text=text.replace(/\s+/," ");
if(/\s$/.test(_7c4)){
text.replace(/^\s/,"");
}
break;
}
_7c4+=text;
break;
default:
break;
}
}
return _7c4;
};
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 _7cd="none";
if((/^<t[dh][\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table><tbody><tr>"+txt+"</tr></tbody></table>";
_7cd="cell";
}else{
if((/^<tr[\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table><tbody>"+txt+"</tbody></table>";
_7cd="row";
}else{
if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table>"+txt+"</table>";
_7cd="section";
}
}
}
tn.innerHTML=txt;
if(tn["normalize"]){
tn.normalize();
}
var _7ce=null;
switch(_7cd){
case "cell":
_7ce=tn.getElementsByTagName("tr")[0];
break;
case "row":
_7ce=tn.getElementsByTagName("tbody")[0];
break;
case "section":
_7ce=tn.getElementsByTagName("table")[0];
break;
default:
_7ce=tn;
break;
}
var _7cf=[];
for(var x=0;x<_7ce.childNodes.length;x++){
_7cf.push(_7ce.childNodes[x].cloneNode(true));
}
tn.style.display="none";
dojo.body().removeChild(tn);
return _7cf;
};
dojo.html.placeOnScreen=function(node,_7d2,_7d3,_7d4,_7d5,_7d6,_7d7){
if(_7d2 instanceof Array||typeof _7d2=="array"){
_7d7=_7d6;
_7d6=_7d5;
_7d5=_7d4;
_7d4=_7d3;
_7d3=_7d2[1];
_7d2=_7d2[0];
}
if(_7d6 instanceof String||typeof _7d6=="string"){
_7d6=_7d6.split(",");
}
if(!isNaN(_7d4)){
_7d4=[Number(_7d4),Number(_7d4)];
}else{
if(!(_7d4 instanceof Array||typeof _7d4=="array")){
_7d4=[0,0];
}
}
var _7d8=dojo.html.getScroll().offset;
var view=dojo.html.getViewport();
node=dojo.byId(node);
var _7da=node.style.display;
node.style.display="";
var bb=dojo.html.getBorderBox(node);
var w=bb.width;
var h=bb.height;
node.style.display=_7da;
if(!(_7d6 instanceof Array||typeof _7d6=="array")){
_7d6=["TL"];
}
var _7de,_7df,_7e0=Infinity,_7e1;
for(var _7e2=0;_7e2<_7d6.length;++_7e2){
var _7e3=_7d6[_7e2];
var _7e4=true;
var tryX=_7d2-(_7e3.charAt(1)=="L"?0:w)+_7d4[0]*(_7e3.charAt(1)=="L"?1:-1);
var tryY=_7d3-(_7e3.charAt(0)=="T"?0:h)+_7d4[1]*(_7e3.charAt(0)=="T"?1:-1);
if(_7d5){
tryX-=_7d8.x;
tryY-=_7d8.y;
}
if(tryX<0){
tryX=0;
_7e4=false;
}
if(tryY<0){
tryY=0;
_7e4=false;
}
var x=tryX+w;
if(x>view.width){
x=view.width-w;
_7e4=false;
}else{
x=tryX;
}
x=Math.max(_7d4[0],x)+_7d8.x;
var y=tryY+h;
if(y>view.height){
y=view.height-h;
_7e4=false;
}else{
y=tryY;
}
y=Math.max(_7d4[1],y)+_7d8.y;
if(_7e4){
_7de=x;
_7df=y;
_7e0=0;
_7e1=_7e3;
break;
}else{
var dist=Math.pow(x-tryX-_7d8.x,2)+Math.pow(y-tryY-_7d8.y,2);
if(_7e0>dist){
_7e0=dist;
_7de=x;
_7df=y;
_7e1=_7e3;
}
}
}
if(!_7d7){
node.style.left=_7de+"px";
node.style.top=_7df+"px";
}
return {left:_7de,top:_7df,x:_7de,y:_7df,dist:_7e0,corner:_7e1};
};
dojo.html.placeOnScreenPoint=function(node,_7eb,_7ec,_7ed,_7ee){
dojo.deprecated("dojo.html.placeOnScreenPoint","use dojo.html.placeOnScreen() instead","0.5");
return dojo.html.placeOnScreen(node,_7eb,_7ec,_7ed,_7ee,["TL","TR","BL","BR"]);
};
dojo.html.placeOnScreenAroundElement=function(node,_7f0,_7f1,_7f2,_7f3,_7f4){
var best,_7f6=Infinity;
_7f0=dojo.byId(_7f0);
var _7f7=_7f0.style.display;
_7f0.style.display="";
var mb=dojo.html.getElementBox(_7f0,_7f2);
var _7f9=mb.width;
var _7fa=mb.height;
var _7fb=dojo.html.getAbsolutePosition(_7f0,true,_7f2);
_7f0.style.display=_7f7;
for(var _7fc in _7f3){
var pos,_7fe,_7ff;
var _800=_7f3[_7fc];
_7fe=_7fb.x+(_7fc.charAt(1)=="L"?0:_7f9);
_7ff=_7fb.y+(_7fc.charAt(0)=="T"?0:_7fa);
pos=dojo.html.placeOnScreen(node,_7fe,_7ff,_7f1,true,_800,true);
if(pos.dist==0){
best=pos;
break;
}else{
if(_7f6>pos.dist){
_7f6=pos.dist;
best=pos;
}
}
}
if(!_7f4){
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 _802=node.parentNode;
var _803=_802.scrollTop+dojo.html.getBorderBox(_802).height;
var _804=node.offsetTop+dojo.html.getMarginBox(node).height;
if(_803<_804){
_802.scrollTop+=(_804-_803);
}else{
if(_802.scrollTop>node.offsetTop){
_802.scrollTop-=(_802.scrollTop-node.offsetTop);
}
}
}
}
};
dojo.provide("dojo.lfx.toggle");
dojo.lfx.toggle.plain={show:function(node,_806,_807,_808){
dojo.html.show(node);
if(dojo.lang.isFunction(_808)){
_808();
}
},hide:function(node,_80a,_80b,_80c){
dojo.html.hide(node);
if(dojo.lang.isFunction(_80c)){
_80c();
}
}};
dojo.lfx.toggle.fade={show:function(node,_80e,_80f,_810){
dojo.lfx.fadeShow(node,_80e,_80f,_810).play();
},hide:function(node,_812,_813,_814){
dojo.lfx.fadeHide(node,_812,_813,_814).play();
}};
dojo.lfx.toggle.wipe={show:function(node,_816,_817,_818){
dojo.lfx.wipeIn(node,_816,_817,_818).play();
},hide:function(node,_81a,_81b,_81c){
dojo.lfx.wipeOut(node,_81a,_81b,_81c).play();
}};
dojo.lfx.toggle.explode={show:function(node,_81e,_81f,_820,_821){
dojo.lfx.explode(_821||{x:0,y:0,width:0,height:0},node,_81e,_81f,_820).play();
},hide:function(node,_823,_824,_825,_826){
dojo.lfx.implode(node,_826||{x:0,y:0,width:0,height:0},_823,_824,_825).play();
}};
dojo.provide("dojo.widget.HtmlWidget");
dojo.declare("dojo.widget.HtmlWidget",dojo.widget.DomWidget,{widgetType:"HtmlWidget",templateCssPath:null,templatePath:null,lang:"",toggle:"plain",toggleDuration:150,animationInProgress:false,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;
},getContainerHeight:function(){
dojo.unimplemented("dojo.widget.HtmlWidget.getContainerHeight");
},getContainerWidth:function(){
return this.parent.domNode.offsetWidth;
},setNativeHeight:function(_82b){
var ch=this.getContainerHeight();
},createNodesFromText:function(txt,wrap){
return dojo.html.createNodesFromText(txt,wrap);
},destroyRendering:function(_82f){
try{
if(!_82f&&this.domNode){
dojo.event.browser.clean(this.domNode);
}
this.domNode.parentNode.removeChild(this.domNode);
delete this.domNode;
}
catch(e){
}
},isShowing:function(){
return dojo.html.isShowing(this.domNode);
},toggleShowing:function(){
if(this.isHidden){
this.show();
}else{
this.hide();
}
},show:function(){
this.animationInProgress=true;
this.isHidden=false;
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(){
this.animationInProgress=true;
this.isHidden=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 _833=w||wh.width;
var _834=h||wh.height;
if(this.width==_833&&this.height==_834){
return false;
}
this.width=_833;
this.height=_834;
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(_837){
if(_837.checkSize){
_837.checkSize();
}
});
}});
dojo.provide("dojo.widget.*");
dojo.provide("struts.widget.Bind");
dojo.widget.defineWidget("struts.widget.Bind",dojo.widget.HtmlWidget,{widgetType:"Bind",executeScripts:false,targets:"",targetsArray:null,href:"",handler:"",loadingText:"Loading...",errorText:"",showError:true,showLoading:true,listenTopics:"",notifyTopics:"",notifyTopicsArray:null,beforeLoading:"",afterLoading:"",formId:"",formFilter:"",formNode:null,event:"",indicator:"",parseContent:true,postCreate:function(){
var self=this;
if(!dojo.string.isBlank(this.listenTopics)){
this.log("Listening to "+this.listenTopics+" to refresh");
var _839=this.listenTopics.split(",");
if(_839){
dojo.lang.forEach(_839,function(_83a){
dojo.event.topic.subscribe(_83a,self,"reloadContents");
});
}
}
if(!dojo.string.isBlank(this.notifyTopics)){
this.notifyTopicsArray=this.notifyTopics.split(",");
}
if(!dojo.string.isBlank(this.targets)){
this.targetsArray=this.targets.split(",");
}
if(!dojo.string.isBlank(this.event)){
dojo.event.connect(this.domNode,this.event,function(evt){
evt.preventDefault();
evt.stopPropagation();
self.reloadContents();
});
}
if(dojo.string.isBlank(this.href)&&dojo.string.isBlank(this.formId)){
this.formNode=dojo.dom.getFirstAncestorByTag(this.domNode,"form");
}else{
this.formNode=dojo.byId(this.formId);
}
if(this.formNode&&dojo.string.isBlank(this.href)){
this.href=this.formNode.action;
}
if(!dojo.string.isBlank(this.formId)){
this.formNode=dojo.byId(this.formId);
}
},log:function(text){
dojo.debug("["+(this.widgetId?this.widgetId:"unknown")+"] "+text);
},setContent:function(text){
if(this.targetsArray){
var self=this;
var _83f=new dojo.xml.Parse();
dojo.lang.forEach(this.targetsArray,function(_840){
var node=dojo.byId(_840);
node.innerHTML=text;
if(self.parseContent&&text!=self.loadingText){
var frag=_83f.parseElement(node,null,true);
dojo.widget.getParser().createSubComponents(frag,dojo.widget.byId(_840));
}
});
}
},bindHandler:function(type,data,e){
dojo.html.hide(this.indicator);
if(!dojo.string.isBlank(this.afterLoading)){
this.log("Executing "+this.afterLoading);
eval(this.afterLoading);
}
this.notify(data,type,e);
if(type=="load"){
if(this.executeScripts){
var _846=this.parse(data);
this.setContent(_846.text);
if(_846.scripts&&_846.scripts.length>0){
var _847="";
for(var i=0;i<_846.scripts.length;i++){
_847+=_846.scripts[i];
}
(new Function("_container_",_847+"; return this;"))(this);
}
}else{
this.setContent(data);
}
}else{
if(this.showError){
var _849=dojo.string.isBlank(this.errorText)?e.message:this.errorText;
this.setContent(_849);
}
}
},notify:function(data,type,e){
if(this.notifyTopicsArray){
var self=this;
dojo.lang.forEach(this.notifyTopicsArray,function(_84e){
try{
dojo.event.topic.publish(_84e,data,type,e);
}
catch(ex){
self.log(ex);
}
});
}
},onDownloadStart:function(_84f){
if(!dojo.string.isBlank(this.beforeLoading)){
var data=null;
var type=null;
eval(this.beforeLoading);
}
if(this.showLoading&&!dojo.string.isBlank(this.loadingText)){
_84f.text=this.loadingText;
}
},reloadContents:function(evt){
if(!dojo.string.isBlank(this.handler)){
this.log("Invoking handler: "+this.handler);
window[this.handler](this,this.domNode);
}else{
if(!dojo.string.isBlank(this.beforeLoading)){
this.log("Executing "+this.beforeLoading);
var data=null;
var type=null;
eval(this.beforeLoading);
}
try{
var self=this;
var _856={cancel:false};
this.notify(this.widgetId,"before",_856);
if(_856.cancel){
this.log("Request canceled");
return;
}
if(dojo.string.isBlank(this.href)){
return;
}
if(this.formNode&&this.formNode.onsubmit!=null){
var _857=this.formNode.onsubmit.call(evt);
if(_857!=null&&!_857){
this.log("Request canceled by 'onsubmit' of the form");
return;
}
}
dojo.html.show(this.indicator);
if(this.showLoading){
this.setContent(this.loadingText);
}
dojo.io.bind({url:this.href,useCache:false,preventCache:true,formNode:self.formNode,formFilter:window[self.formFilter],handler:function(type,data,e){
dojo.lang.hitch(self,"bindHandler")(type,data,e);
},mimetype:"text/html"});
}
catch(ex){
var _85b=dojo.string.isBlank(this.errorText)?ex:this.errorText;
this.setContent(_85b);
}
}
},parse:function(s){
this.log("Parsing: "+s);
var _85d=[];
var tmp=[];
var _85f=[];
while(_85d){
_85d=s.match(/<script([^>]*)>([\s\S]*?)<\/script>/i);
if(!_85d){
break;
}
if(_85d[1]){
attr=_85d[1].match(/src=(['"]?)([^"']*)\1/i);
if(attr){
var tmp2=attr[2].search(/.*(\bdojo\b(?:\.uncompressed)?\.js)$/);
if(tmp2>-1){
this.log("Security note! inhibit:"+attr[2]+" from  beeing loaded again.");
}
}
}
if(_85d[2]){
var sc=_85d[2].replace(/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g,"");
if(!sc){
continue;
}
tmp=[];
while(tmp){
tmp=sc.match(/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix))\((['"]).*?\1\)\s*;?/);
if(!tmp){
break;
}
sc=sc.replace(tmp[0],"");
}
_85f.push(sc);
}
s=s.replace(/<script[^>]*>[\s\S]*?<\/script>/i,"");
}
return {text:s,scripts:_85f};
}});
dojo.provide("struts.widget.BindAnchor");
dojo.widget.defineWidget("struts.widget.BindAnchor",struts.widget.Bind,{widgetType:"BindAnchor",event:"onclick",postCreate:function(){
struts.widget.BindAnchor.superclass.postCreate.apply(this);
this.domNode.href="#";
}});
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,_864){
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,_868){
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();
}
}},_868));
},_cacheSetting:function(_86e,_86f){
for(var x in this.bindArgs){
if(dojo.lang.isUndefined(_86e[x])){
_86e[x]=this.bindArgs[x];
}
}
if(dojo.lang.isUndefined(_86e.useCache)){
_86e.useCache=_86f;
}
if(dojo.lang.isUndefined(_86e.preventCache)){
_86e.preventCache=!_86f;
}
if(dojo.lang.isUndefined(_86e.mimetype)){
_86e.mimetype="text/html";
}
return _86e;
},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(_874){
var st=this[_874];
var err="";
var _877=this.scriptScope||window;
for(var i=0;i<st.length;i++){
try{
st[i].call(_877);
}
catch(e){
err+="\n"+st[i]+" failed: "+e.description;
}
}
this[_874]=[];
if(err.length){
var name=(_874=="_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(_87e,obj,func){
if(typeof func=="undefined"){
_87e.push(obj);
}else{
_87e.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,_888,_889){
if(!_888){
_888="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[_888](e);
if(e.returnValue){
switch(_889){
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 _88c=[],_88d=[],tmp=[];
var _88f=[],_890=[],attr=[],_892=[];
var str="",path="",fix="",_896="",tag="",_898="";
if(!url){
url="./";
}
if(s){
var _899=/<title[^>]*>([\s\S]*?)<\/title>/i;
while(_88f=_899.exec(s)){
_88c.push(_88f[1]);
s=s.substring(0,_88f.index)+s.substr(_88f.index+_88f[0].length);
}
if(this.adjustPaths){
var _89a=/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i;
var _89b=/\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@]+?)\2/i;
var _89c=/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/;
while(tag=_89a.exec(s)){
str+=s.substring(0,tag.index);
s=s.substring((tag.index+tag[0].length),s.length);
tag=tag[0];
_896="";
while(attr=_89b.exec(tag)){
path="";
_898=attr[3];
switch(attr[1].toLowerCase()){
case "src":
case "href":
if(_89c.exec(_898)){
path=_898;
}else{
path=(new dojo.uri.Uri(url,_898).toString());
}
break;
case "style":
path=dojo.html.fixPathsInCssText(_898,url);
break;
default:
path=_898;
}
fix=" "+attr[1]+"="+attr[2]+path+attr[2];
_896+=tag.substring(0,attr.index)+fix;
tag=tag.substring((attr.index+attr[0].length),tag.length);
}
str+=_896+tag;
}
s=str+s;
}
_899=/(?:<(style)[^>]*>([\s\S]*?)<\/style>|<link ([^>]*rel=['"]?stylesheet['"]?[^>]*)>)/i;
while(_88f=_899.exec(s)){
if(_88f[1]&&_88f[1].toLowerCase()=="style"){
_892.push(dojo.html.fixPathsInCssText(_88f[2],url));
}else{
if(attr=_88f[3].match(/href=(['"]?)([^'">]*)\1/i)){
_892.push({path:attr[2]});
}
}
s=s.substring(0,_88f.index)+s.substr(_88f.index+_88f[0].length);
}
var _899=/<script([^>]*)>([\s\S]*?)<\/script>/i;
var _89d=/src=(['"]?)([^"']*)\1/i;
var _89e=/.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/;
var _89f=/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g;
var _8a0=/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix|registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/;
while(_88f=_899.exec(s)){
if(this.executeScripts&&_88f[1]){
if(attr=_89d.exec(_88f[1])){
if(_89e.exec(attr[2])){
dojo.debug("Security note! inhibit:"+attr[2]+" from  being loaded again.");
}else{
_88d.push({path:attr[2]});
}
}
}
if(_88f[2]){
var sc=_88f[2].replace(_89f,"");
if(!sc){
continue;
}
while(tmp=_8a0.exec(sc)){
_890.push(tmp[0]);
sc=sc.substring(0,tmp.index)+sc.substr(tmp.index+tmp[0].length);
}
if(this.executeScripts){
_88d.push(sc);
}
}
s=s.substr(0,_88f.index)+s.substr(_88f.index+_88f[0].length);
}
if(this.extractContent){
_88f=s.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_88f){
s=_88f[1];
}
}
if(this.executeScripts&&this.scriptSeparation){
var _899=/(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/;
var _8a2=/([\s'";:\(])scriptScope(.*)/;
str="";
while(tag=_899.exec(s)){
tmp=((tag[3]=="'")?"\"":"'");
fix="";
str+=s.substring(0,tag.index)+tag[1];
while(attr=_8a2.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":_892,"titles":_88c,"requires":_890,"scripts":_88d,"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=[];
var node=this.containerNode||this.domNode;
while(node.firstChild){
try{
dojo.event.browser.clean(node.firstChild);
}
catch(e){
}
node.removeChild(node.firstChild);
}
try{
if(typeof cont!="string"){
node.innerHTML="";
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));
}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 _8a8=this;
function asyncParse(){
if(_8a8.executeScripts){
_8a8._executeScripts(data.scripts);
}
if(_8a8.parseContent){
var node=_8a8.containerNode||_8a8.domNode;
var _8aa=new dojo.xml.Parse();
var frag=_8aa.parseElement(node,null,true);
dojo.widget.getParser().createSubComponents(frag,_8a8);
}
_8a8.onResized();
_8a8.onLoad();
}
if(dojo.hostenv.isXDomain&&data.requires.length){
dojo.addOnLoad(asyncParse);
}else{
asyncParse();
}
}
},setHandler:function(_8ac){
var fcn=dojo.lang.isFunction(_8ac)?_8ac:window[_8ac];
if(!dojo.lang.isFunction(fcn)){
this._handleDefaults("Unable to set handler, '"+_8ac+"' 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(_8af){
var self=this;
var tmp="",code="";
for(var i=0;i<_8af.length;i++){
if(_8af[i].path){
dojo.io.bind(this._cacheSetting({"url":_8af[i].path,"load":function(type,_8b5){
dojo.lang.hitch(self,tmp=";"+_8b5);
},"error":function(type,_8b7){
_8b7.text=type+" downloading remote script";
self._handleDefaults.call(self,_8b7,"onExecError","debug");
},"mimetype":"text/plain","sync":true},this.cacheContent));
code+=tmp;
}else{
code+=_8af[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.lang.timing.Timer");
dojo.lang.timing.Timer=function(_8bb){
this.timer=null;
this.isRunning=false;
this.interval=_8bb;
this.onStart=null;
this.onStop=null;
};
dojo.extend(dojo.lang.timing.Timer,{onTick:function(){
},setInterval:function(_8bc){
if(this.isRunning){
dj_global.clearInterval(this.timer);
}
this.interval=_8bc;
if(this.isRunning){
this.timer=dj_global.setInterval(dojo.lang.hitch(this,"onTick"),this.interval);
}
},start:function(){
if(typeof this.onStart=="function"){
this.onStart();
}
this.isRunning=true;
this.timer=dj_global.setInterval(dojo.lang.hitch(this,"onTick"),this.interval);
},stop:function(){
if(typeof this.onStop=="function"){
this.onStop();
}
this.isRunning=false;
dj_global.clearInterval(this.timer);
}});
dojo.provide("struts.widget.BindDiv");
dojo.widget.defineWidget("struts.widget.BindDiv",dojo.widget.ContentPane,{widgetType:"BindDiv",href:"",extractContent:false,parseContent:false,cacheContent:false,refreshOnShow:false,executeScripts:false,updateFreq:0,delay:0,autoStart:true,timer:null,loadingText:"Loading...",showLoading:true,errorText:"",showError:true,listenTopics:"",notifyTopics:"",notifyTopicsArray:null,stopTimerListenTopics:"",startTimerListenTopics:"",beforeLoading:"",afterLoading:"",formId:"",formFilter:"",firstTime:true,indicator:"",parseContent:true,onDownloadStart:function(_8bd){
if(!dojo.string.isBlank(this.beforeLoading)){
this.log("Executing "+this.beforeLoading);
var _8be=eval(this.beforeLoading);
if(_8be!==null&&!_8be){
return;
}
}
if(!this.showLoading){
_8bd.returnValue=false;
return;
}
if(this.showLoading&&!dojo.string.isBlank(this.loadingText)){
_8bd.text=this.loadingText;
}
},onDownloadError:function(_8bf){
this.onError(_8bf);
},onContentError:function(_8c0){
this.onError(_8c0);
},onExecError:function(_8c1){
this.onError(_8c1);
},onError:function(_8c2){
if(this.showError){
if(!dojo.string.isBlank(this.errorText)){
_8c2.text=this.errorText;
}
}else{
_8c2.text="";
}
},notify:function(data,type,e){
if(this.notifyTopicsArray){
var self=this;
dojo.lang.forEach(this.notifyTopicsArray,function(_8c7){
try{
dojo.event.topic.publish(_8c7,data,type,e);
}
catch(ex){
self.log(ex);
}
});
}
},postCreate:function(args,frag){
struts.widget.BindDiv.superclass.postCreate.apply(this);
var self=this;
var _8cb=function(){
dojo.lang.hitch(self,"refresh")();
};
var _8cc=function(){
dojo.lang.hitch(self,"startTimer")();
};
if(this.updateFreq>0){
this.timer=new dojo.lang.timing.Timer(this.updateFreq);
this.timer.onTick=_8cb;
if(this.autoStart){
if(this.delay>0){
dojo.lang.setTimeout(this.delay,_8cc);
}else{
this.startTimer();
}
}
}else{
if(this.delay>0){
dojo.lang.setTimeout(this.delay,_8cb);
}
}
if(this.autoStart){
if(this.delay>0){
if(this.updateFreq>0){
dojo.lang.setTimeout(this.delay,_8cc);
}else{
dojo.lang.setTimeout(this.delay,_8cb);
}
}
}
if(!dojo.string.isBlank(this.listenTopics)){
this.log("Listening to "+this.listenTopics+" to refresh");
var _8cd=this.listenTopics.split(",");
if(_8cd){
dojo.lang.forEach(_8cd,function(_8ce){
dojo.event.topic.subscribe(_8ce,self,"refresh");
});
}
}
if(!dojo.string.isBlank(this.notifyTopics)){
this.notifyTopicsArray=this.notifyTopics.split(",");
}
if(!dojo.string.isBlank(this.stopTimerListenTopics)){
this.log("Listening to "+this.stopTimerListenTopics+" to stop timer");
var _8cf=this.stopTimerListenTopics.split(",");
if(_8cf){
dojo.lang.forEach(_8cf,function(_8d0){
dojo.event.topic.subscribe(_8d0,self,"stopTimer");
});
}
}
if(!dojo.string.isBlank(this.startTimerListenTopics)){
this.log("Listening to "+this.stopTimerListenTopics+" to start timer");
var _8d1=this.startTimerListenTopics.split(",");
if(_8d1){
dojo.lang.forEach(_8d1,function(_8d2){
dojo.event.topic.subscribe(_8d2,self,"startTimer");
});
}
}
},_downloadExternalContent:function(url,_8d4){
if(this.firstTime){
this.firstTime=false;
if(this.delay>0){
return;
}
}
var _8d5={cancel:false};
this.notify(this.widgetId,"before",_8d5);
if(_8d5.cancel){
return;
}
dojo.html.show(this.indicator);
this._handleDefaults("Loading...","onDownloadStart");
var self=this;
dojo.io.bind({url:url,useCache:_8d4,preventCache:!_8d4,mimetype:"text/html",formNode:dojo.byId(self.formId),formFilter:window[self.formFilter],handler:function(type,data,e){
dojo.html.hide(self.indicator);
if(!dojo.string.isBlank(self.afterLoading)){
self.log("Executing "+self.afterLoading);
eval(self.afterLoading);
}
self.notify(data,type,null);
if(type=="load"){
self.onDownloadEnd.call(self,url,data);
}else{
self._handleDefaults.call(self,"Error loading '"+url+"' ("+e.status+" "+e.statusText+")","onDownloadError");
self.onLoad();
}
}});
},log:function(text){
dojo.debug("["+this.widgetId+"] "+text);
},stopTimer:function(){
if(this.timer&&this.timer.isRunning){
this.log("stopping timer");
this.timer.stop();
}
},startTimer:function(){
if(this.timer&&!this.timer.isRunning){
this.log("starting timer with update interval "+this.updateFreq);
this.timer.start();
}
},splitAndFixPaths:function(s,url){
var _8dd=[],_8de=[],tmp=[];
var _8e0=[],_8e1=[],attr=[],_8e3=[];
var str="",path="",fix="",_8e7="",tag="",_8e9="";
if(!url){
url="./";
}
if(s){
var _8ea=/<title[^>]*>([\s\S]*?)<\/title>/i;
while(_8e0=_8ea.exec(s)){
_8dd.push(_8e0[1]);
s=s.substring(0,_8e0.index)+s.substr(_8e0.index+_8e0[0].length);
}
if(this.adjustPaths){
var _8eb=/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i;
var _8ec=/\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@!]+?)\2/i;
var _8ed=/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/;
while(tag=_8eb.exec(s)){
str+=s.substring(0,tag.index);
s=s.substring((tag.index+tag[0].length),s.length);
tag=tag[0];
_8e7="";
while(attr=_8ec.exec(tag)){
path="";
_8e9=attr[3];
switch(attr[1].toLowerCase()){
case "src":
case "href":
if(_8ed.exec(_8e9)){
path=_8e9;
}else{
path=(new dojo.uri.Uri(url,_8e9).toString());
}
break;
case "style":
path=dojo.html.fixPathsInCssText(_8e9,url);
break;
default:
path=_8e9;
}
fix=" "+attr[1]+"="+attr[2]+path+attr[2];
_8e7+=tag.substring(0,attr.index)+fix;
tag=tag.substring((attr.index+attr[0].length),tag.length);
}
str+=_8e7+tag;
}
s=str+s;
}
_8ea=/(?:<(style)[^>]*>([\s\S]*?)<\/style>|<link ([^>]*rel=['"]?stylesheet['"]?[^>]*)>)/i;
while(_8e0=_8ea.exec(s)){
if(_8e0[1]&&_8e0[1].toLowerCase()=="style"){
_8e3.push(dojo.html.fixPathsInCssText(_8e0[2],url));
}else{
if(attr=_8e0[3].match(/href=(['"]?)([^'">]*)\1/i)){
_8e3.push({path:attr[2]});
}
}
s=s.substring(0,_8e0.index)+s.substr(_8e0.index+_8e0[0].length);
}
var _8ea=/<script([^>]*)>([\s\S]*?)<\/script>/i;
var _8ee=/src=(['"]?)([^"']*)\1/i;
var _8ef=/.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/;
var _8f0=/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g;
var _8f1=/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix|registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/;
while(_8e0=_8ea.exec(s)){
if(this.executeScripts&&_8e0[1]){
if(attr=_8ee.exec(_8e0[1])){
if(_8ef.exec(attr[2])){
dojo.debug("Security note! inhibit:"+attr[2]+" from  being loaded again.");
}else{
_8de.push({path:attr[2]});
}
}
}
if(_8e0[2]){
var sc=_8e0[2].replace(_8f0,"");
if(!sc){
continue;
}
while(tmp=_8f1.exec(sc)){
_8e1.push(tmp[0]);
sc=sc.substring(0,tmp.index)+sc.substr(tmp.index+tmp[0].length);
}
if(this.executeScripts){
_8de.push(sc);
}
}
s=s.substr(0,_8e0.index)+s.substr(_8e0.index+_8e0[0].length);
}
if(this.extractContent){
_8e0=s.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_8e0){
s=_8e0[1];
}
}
if(this.executeScripts&&this.scriptSeparation){
var _8ea=/(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/;
var _8f3=/([\s'";:\(])scriptScope(.*)/;
str="";
while(tag=_8ea.exec(s)){
tmp=((tag[3]=="'")?"\"":"'");
fix="";
str+=s.substring(0,tag.index)+tag[1];
while(attr=_8f3.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":_8e3,"titles":_8dd,"requires":_8e1,"scripts":_8de,"url":url};
}});
dojo.provide("dojo.html.*");
dojo.provide("dojo.widget.html.stabile");
dojo.widget.html.stabile={_sqQuotables:new RegExp("([\\\\'])","g"),_depth:0,_recur:false,depthLimit:2};
dojo.widget.html.stabile.getState=function(id){
dojo.widget.html.stabile.setup();
return dojo.widget.html.stabile.widgetState[id];
};
dojo.widget.html.stabile.setState=function(id,_8f6,_8f7){
dojo.widget.html.stabile.setup();
dojo.widget.html.stabile.widgetState[id]=_8f6;
if(_8f7){
dojo.widget.html.stabile.commit(dojo.widget.html.stabile.widgetState);
}
};
dojo.widget.html.stabile.setup=function(){
if(!dojo.widget.html.stabile.widgetState){
var text=dojo.widget.html.stabile.getStorage().value;
dojo.widget.html.stabile.widgetState=text?dj_eval("("+text+")"):{};
}
};
dojo.widget.html.stabile.commit=function(_8f9){
dojo.widget.html.stabile.getStorage().value=dojo.widget.html.stabile.description(_8f9);
};
dojo.widget.html.stabile.description=function(v,_8fb){
var _8fc=dojo.widget.html.stabile._depth;
var _8fd=function(){
return this.description(this,true);
};
try{
if(v===void (0)){
return "undefined";
}
if(v===null){
return "null";
}
if(typeof (v)=="boolean"||typeof (v)=="number"||v instanceof Boolean||v instanceof Number){
return v.toString();
}
if(typeof (v)=="string"||v instanceof String){
var v1=v.replace(dojo.widget.html.stabile._sqQuotables,"\\$1");
v1=v1.replace(/\n/g,"\\n");
v1=v1.replace(/\r/g,"\\r");
return "'"+v1+"'";
}
if(v instanceof Date){
return "new Date("+d.getFullYear+","+d.getMonth()+","+d.getDate()+")";
}
var d;
if(v instanceof Array||v.push){
if(_8fc>=dojo.widget.html.stabile.depthLimit){
return "[ ... ]";
}
d="[";
var _900=true;
dojo.widget.html.stabile._depth++;
for(var i=0;i<v.length;i++){
if(_900){
_900=false;
}else{
d+=",";
}
d+=arguments.callee(v[i],_8fb);
}
return d+"]";
}
if(v.constructor==Object||v.toString==_8fd){
if(_8fc>=dojo.widget.html.stabile.depthLimit){
return "{ ... }";
}
if(typeof (v.hasOwnProperty)!="function"&&v.prototype){
throw new Error("description: "+v+" not supported by script engine");
}
var _900=true;
d="{";
dojo.widget.html.stabile._depth++;
for(var key in v){
if(v[key]==void (0)||typeof (v[key])=="function"){
continue;
}
if(_900){
_900=false;
}else{
d+=", ";
}
var kd=key;
if(!kd.match(/^[a-zA-Z_][a-zA-Z0-9_]*$/)){
kd=arguments.callee(key,_8fb);
}
d+=kd+": "+arguments.callee(v[key],_8fb);
}
return d+"}";
}
if(_8fb){
if(dojo.widget.html.stabile._recur){
var _904=Object.prototype.toString;
return _904.apply(v,[]);
}else{
dojo.widget.html.stabile._recur=true;
return v.toString();
}
}else{
throw new Error("Unknown type: "+v);
return "'unknown'";
}
}
finally{
dojo.widget.html.stabile._depth=_8fc;
}
};
dojo.widget.html.stabile.getStorage=function(){
if(dojo.widget.html.stabile.dataField){
return dojo.widget.html.stabile.dataField;
}
var form=document.forms._dojo_form;
return dojo.widget.html.stabile.dataField=form?form.stabile:{value:""};
};
dojo.provide("dojo.html.selection");
dojo.html.selectionType={NONE:0,TEXT:1,CONTROL:2};
dojo.html.clearSelection=function(){
var _906=dojo.global();
var _907=dojo.doc();
try{
if(_906["getSelection"]){
if(dojo.render.html.safari){
_906.getSelection().collapse();
}else{
_906.getSelection().removeAllRanges();
}
}else{
if(_907.selection){
if(_907.selection.empty){
_907.selection.empty();
}else{
if(_907.selection.clear){
_907.selection.clear();
}
}
}
}
return true;
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.html.disableSelection=function(_908){
_908=dojo.byId(_908)||dojo.body();
var h=dojo.render.html;
if(h.mozilla){
_908.style.MozUserSelect="none";
}else{
if(h.safari){
_908.style.KhtmlUserSelect="none";
}else{
if(h.ie){
_908.unselectable="on";
}else{
return false;
}
}
}
return true;
};
dojo.html.enableSelection=function(_90a){
_90a=dojo.byId(_90a)||dojo.body();
var h=dojo.render.html;
if(h.mozilla){
_90a.style.MozUserSelect="";
}else{
if(h.safari){
_90a.style.KhtmlUserSelect="";
}else{
if(h.ie){
_90a.unselectable="off";
}else{
return false;
}
}
}
return true;
};
dojo.html.selectElement=function(_90c){
dojo.deprecated("dojo.html.selectElement","replaced by dojo.html.selection.selectElementChildren",0.5);
};
dojo.html.selectInputText=function(_90d){
var _90e=dojo.global();
var _90f=dojo.doc();
_90d=dojo.byId(_90d);
if(_90f["selection"]&&dojo.body()["createTextRange"]){
var _910=_90d.createTextRange();
_910.moveStart("character",0);
_910.moveEnd("character",_90d.value.length);
_910.select();
}else{
if(_90e["getSelection"]){
var _911=_90e.getSelection();
_90d.setSelectionRange(0,_90d.value.length);
}
}
_90d.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 _912=dojo.html.selectionType.TEXT;
var oSel;
try{
oSel=dojo.global().getSelection();
}
catch(e){
}
if(oSel&&oSel.rangeCount==1){
var _914=oSel.getRangeAt(0);
if(_914.startContainer==_914.endContainer&&(_914.endOffset-_914.startOffset)==1&&_914.startContainer.nodeType!=dojo.dom.TEXT_NODE){
_912=dojo.html.selectionType.CONTROL;
}
}
return _912;
}
},isCollapsed:function(){
var _915=dojo.global();
var _916=dojo.doc();
if(_916["selection"]){
return _916.selection.createRange().text=="";
}else{
if(_915["getSelection"]){
var _917=_915.getSelection();
if(dojo.lang.isString(_917)){
return _917=="";
}else{
return _917.isCollapsed||_917.toString()=="";
}
}
}
},getSelectedElement:function(){
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
if(dojo.doc()["selection"]){
var _918=dojo.doc().selection.createRange();
if(_918&&_918.item){
return dojo.doc().selection.createRange().item(0);
}
}else{
var _919=dojo.global().getSelection();
return _919.anchorNode.childNodes[_919.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 _91b=dojo.global().getSelection();
if(_91b){
var node=_91b.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 _91d=dojo.global().getSelection();
if(_91d){
return _91d.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 _91e=dojo.global().getSelection();
if(_91e&&_91e.rangeCount){
var frag=_91e.getRangeAt(0).cloneContents();
var div=document.createElement("div");
div.appendChild(frag);
return div.innerHTML;
}
return null;
}
},hasAncestorElement:function(_921){
return (dojo.html.selection.getAncestorElement.apply(this,arguments)!=null);
},getAncestorElement:function(_922){
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(_927){
var _928=dojo.global();
var _929=dojo.doc();
_927=dojo.byId(_927);
if(_929.selection&&dojo.body().createTextRange){
try{
var _92a=dojo.body().createControlRange();
_92a.addElement(_927);
_92a.select();
}
catch(e){
dojo.html.selection.selectElementChildren(_927);
}
}else{
if(_928["getSelection"]){
var _92b=_928.getSelection();
if(_92b["removeAllRanges"]){
var _92a=_929.createRange();
_92a.selectNode(_927);
_92b.removeAllRanges();
_92b.addRange(_92a);
}
}
}
},selectElementChildren:function(_92c){
var _92d=dojo.global();
var _92e=dojo.doc();
_92c=dojo.byId(_92c);
if(_92e.selection&&dojo.body().createTextRange){
var _92f=dojo.body().createTextRange();
_92f.moveToElementText(_92c);
_92f.select();
}else{
if(_92d["getSelection"]){
var _930=_92d.getSelection();
if(_930["setBaseAndExtent"]){
_930.setBaseAndExtent(_92c,0,_92c,_92c.innerText.length-1);
}else{
if(_930["selectAllChildren"]){
_930.selectAllChildren(_92c);
}
}
}
}
},getBookmark:function(){
var _931;
var _932=dojo.doc();
if(_932["selection"]){
var _933=_932.selection.createRange();
_931=_933.getBookmark();
}else{
var _934;
try{
_934=dojo.global().getSelection();
}
catch(e){
}
if(_934){
var _933=_934.getRangeAt(0);
_931=_933.cloneRange();
}else{
dojo.debug("No idea how to store the current selection for this browser!");
}
}
return _931;
},moveToBookmark:function(_935){
var _936=dojo.doc();
if(_936["selection"]){
var _937=_936.selection.createRange();
_937.moveToBookmark(_935);
_937.select();
}else{
var _938;
try{
_938=dojo.global().getSelection();
}
catch(e){
}
if(_938&&_938["removeAllRanges"]){
_938.removeAllRanges();
_938.addRange(_935);
}else{
dojo.debug("No idea how to restore selection for this browser!");
}
}
},collapse:function(_939){
if(dojo.global()["getSelection"]){
var _93a=dojo.global().getSelection();
if(_93a.removeAllRanges){
if(_939){
_93a.collapseToStart();
}else{
_93a.collapseToEnd();
}
}else{
dojo.global().getSelection().collapse(_939);
}
}else{
if(dojo.doc().selection){
var _93b=dojo.doc().selection.createRange();
_93b.collapse(_939);
_93b.select();
}
}
},remove:function(){
if(dojo.doc().selection){
var _93c=dojo.doc().selection;
if(_93c.type.toUpperCase()!="NONE"){
_93c.clear();
}
return _93c;
}else{
var _93c=dojo.global().getSelection();
for(var i=0;i<_93c.rangeCount;i++){
_93c.getRangeAt(i).deleteContents();
}
return _93c;
}
}});
dojo.provide("dojo.html.iframe");
dojo.html.iframeContentWindow=function(_93e){
var win=dojo.html.getDocumentWindow(dojo.html.iframeContentDocument(_93e))||dojo.html.iframeContentDocument(_93e).__parent__||(_93e.name&&document.frames[_93e.name])||null;
return win;
};
dojo.html.iframeContentDocument=function(_940){
var doc=_940.contentDocument||((_940.contentWindow)&&(_940.contentWindow.document))||((_940.name)&&(document.frames[_940.name])&&(document.frames[_940.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 _944=dojo.html.getMarginBox(this.domNode);
if(_944.width==0||_944.height==0){
dojo.lang.setTimeout(this,this.onResized,100);
return;
}
this.iframe.style.width=_944.width+"px";
this.iframe.style.height=_944.height+"px";
}
},size:function(node){
if(!this.iframe){
return;
}
var _946=dojo.html.toCoordinateObject(node,true,dojo.html.boxSizing.BORDER_BOX);
this.iframe.style.width=_946.width+"px";
this.iframe.style.height=_946.height+"px";
this.iframe.style.left=_946.left+"px";
this.iframe.style.top=_946.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){
return;
}
this.iframe.style.display="block";
},hide:function(){
if(!this.iframe){
return;
}
this.iframe.style.display="none";
},remove:function(){
dojo.html.removeNode(this.iframe);
}});
dojo.provide("dojo.widget.PopupContainer");
dojo.declare("dojo.widget.PopupContainerBase",null,function(){
this.queueOnAnimationFinish=[];
},{isContainer:true,templateString:"<div dojoAttachPoint=\"containerNode\" style=\"display:none;position:absolute;\" class=\"dojoPopupContainer\" ></div>",isShowingNow:false,currentSubpopup:null,beginZIndex:1000,parentPopup:null,parent:null,popupIndex:0,aroundBox:dojo.html.boxSizing.BORDER_BOX,openedForWindow:null,processKey:function(evt){
return false;
},applyPopupBasicStyle:function(){
with(this.domNode.style){
display="none";
position="absolute";
}
},aboutToShow:function(){
},open:function(x,y,_94b,_94c,_94d,_94e){
if(this.isShowingNow){
return;
}
this.aboutToShow();
if(this.animationInProgress){
this.queueOnAnimationFinish.push(this.open,arguments);
return;
}
this.parent=_94b;
var _94f=false,node,_951;
if(typeof x=="object"){
node=x;
_951=_94c;
_94c=_94b;
_94b=y;
_94f=true;
}
dojo.body().appendChild(this.domNode);
_94c=_94c||_94b["domNode"]||[];
var _952=null;
this.isTopLevel=true;
while(_94b){
if(_94b!==this&&(_94b.setOpenedSubpopup!=undefined&&_94b.applyPopupBasicStyle!=undefined)){
_952=_94b;
this.isTopLevel=false;
_952.setOpenedSubpopup(this);
break;
}
_94b=_94b.parent;
}
this.parentPopup=_952;
this.popupIndex=_952?_952.popupIndex+1:1;
if(this.isTopLevel){
var _953=dojo.html.isNode(_94c)?_94c:null;
dojo.widget.PopupManager.opened(this,_953);
}
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(_94c instanceof Array){
_94c={left:_94c[0],top:_94c[1],width:0,height:0};
}
with(this.domNode.style){
display="";
zIndex=this.beginZIndex+this.popupIndex;
}
if(_94f){
this.move(node,_94e,_951);
}else{
this.move(x,y,_94e,_94d);
}
this.domNode.style.display="none";
this.explodeSrc=_94c;
this.show();
this.isShowingNow=true;
},move:function(x,y,_956,_957){
var _958=(typeof x=="object");
if(_958){
var _959=_956;
var node=x;
_956=y;
if(!_959){
_959={"BL":"TL","TL":"BL"};
}
dojo.html.placeOnScreenAroundElement(this.domNode,node,_956,this.aroundBox,_959);
}else{
if(!_957){
_957="TL,TR,BL,BR";
}
dojo.html.placeOnScreen(this.domNode,x,y,_956,true,_957);
}
},close:function(_95b){
if(_95b){
this.domNode.style.display="none";
}
if(this.animationInProgress){
this.queueOnAnimationFinish.push(this.close,[]);
return;
}
this.closeSubpopup(_95b);
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;
try{
this.parent.domNode.focus();
}
catch(e){
}
if(this._bookmark&&dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){
if(this.openedForWindow){
this.openedForWindow.focus();
}
dojo.withGlobal(this.openedForWindow||dojo.global(),"moveToBookmark",dojo.html.selection,[this._bookmark]);
}
this._bookmark=null;
},closeAll:function(_95c){
if(this.parentPopup){
this.parentPopup.closeAll(_95c);
}else{
this.close(_95c);
}
},setOpenedSubpopup:function(_95d){
this.currentSubpopup=_95d;
},closeSubpopup:function(_95e){
if(this.currentSubpopup==null){
return;
}
this.currentSubpopup.close(_95e);
this.currentSubpopup=null;
},onShow:function(){
dojo.widget.PopupContainer.superclass.onShow.apply(this,arguments);
this.openedSize={w:this.domNode.style.width,h:this.domNode.style.height};
if(dojo.render.html.ie){
if(!this.bgIframe){
this.bgIframe=new dojo.html.BackgroundIframe();
this.bgIframe.setZIndex(this.domNode);
}
this.bgIframe.size(this.domNode);
this.bgIframe.show();
}
this.processQueue();
},processQueue:function(){
if(!this.queueOnAnimationFinish.length){
return;
}
var func=this.queueOnAnimationFinish.shift();
var args=this.queueOnAnimationFinish.shift();
func.apply(this,args);
},onHide:function(){
dojo.widget.HtmlWidget.prototype.onHide.call(this);
if(this.openedSize){
with(this.domNode.style){
width=this.openedSize.w;
height=this.openedSize.h;
}
}
this.processQueue();
}});
dojo.widget.defineWidget("dojo.widget.PopupContainer",[dojo.widget.HtmlWidget,dojo.widget.PopupContainerBase],{});
dojo.widget.PopupManager=new function(){
this.currentMenu=null;
this.currentButton=null;
this.currentFocusMenu=null;
this.focusNode=null;
this.registeredWindows=[];
this.registerWin=function(win){
if(!win.__PopupManagerRegistered){
dojo.event.connect(win.document,"onmousedown",this,"onClick");
dojo.event.connect(win,"onscroll",this,"onClick");
dojo.event.connect(win.document,"onkey",this,"onKey");
win.__PopupManagerRegistered=true;
this.registeredWindows.push(win);
}
};
this.registerAllWindows=function(_962){
if(!_962){
_962=dojo.html.getDocumentWindow(window.top&&window.top.document||window.document);
}
this.registerWin(_962);
for(var i=0;i<_962.frames.length;i++){
try{
var win=dojo.html.getDocumentWindow(_962.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,_969){
if(menu==this.currentMenu){
return;
}
if(this.currentMenu){
this.currentMenu.close();
}
this.currentMenu=menu;
this.currentFocusMenu=menu;
this.currentButton=_969;
};
this.setFocusedMenu=function(menu){
this.currentFocusMenu=menu;
};
this.onKey=function(e){
if(!e.key){
return;
}
if(!this.currentMenu||!this.currentMenu.isShowingNow){
return;
}
var m=this.currentFocusMenu;
while(m){
if(m.processKey(e)){
e.preventDefault();
e.stopPropagation();
break;
}
m=m.parentPopup;
}
},this.onClick=function(e){
if(!this.currentMenu){
return;
}
var _96e=dojo.html.getScroll().offset;
var m=this.currentMenu;
while(m){
if(dojo.html.overElement(m.domNode,e)||dojo.html.isDescendantOf(e.target,m.domNode)){
return;
}
m=m.currentSubpopup;
}
if(this.currentButton&&dojo.html.overElement(this.currentButton,e)){
return;
}
this.currentMenu.close();
};
};
dojo.provide("dojo.widget.ComboBox");
dojo.widget.incrementalComboBoxDataProvider=function(url,_971,_972){
this.searchUrl=url;
this.inFlight=false;
this.activeRequest=null;
this.allowCache=false;
this.cache={};
this.init=function(cbox){
this.searchUrl=cbox.dataUrl;
};
this.addToCache=function(_974,data){
if(this.allowCache){
this.cache[_974]=data;
}
};
this.startSearch=function(_976,type,_978){
if(this.inFlight){
}
var tss=encodeURIComponent(_976);
var _97a=dojo.string.substituteParams(this.searchUrl,{"searchString":tss});
var _97b=this;
var _97c=dojo.io.bind({url:_97a,method:"get",mimetype:"text/json",load:function(type,data,evt){
_97b.inFlight=false;
if(!dojo.lang.isArray(data)){
var _980=[];
for(var key in data){
_980.push([data[key],key]);
}
data=_980;
}
_97b.addToCache(_976,data);
_97b.provideSearchResults(data);
}});
this.inFlight=true;
};
};
dojo.widget.ComboBoxDataProvider=function(_982,_983,_984){
this.data=[];
this.searchTimeout=_984||500;
this.searchLimit=_983||30;
this.searchType="STARTSTRING";
this.caseSensitive=false;
this._lastSearch="";
this._lastSearchResults=null;
this.init=function(cbox,node){
if(!dojo.string.isBlank(cbox.dataUrl)){
this.getData(cbox.dataUrl);
}else{
if((node)&&(node.nodeName.toLowerCase()=="select")){
var opts=node.getElementsByTagName("option");
var ol=opts.length;
var data=[];
for(var x=0;x<ol;x++){
var text=opts[x].textContent||opts[x].innerText||opts[x].innerHTML;
var _98c=[String(text),String(opts[x].value)];
data.push(_98c);
if(opts[x].selected){
cbox.setAllValues(_98c[0],_98c[1]);
}
}
this.setData(data);
}
}
};
this.getData=function(url){
dojo.io.bind({url:url,load:dojo.lang.hitch(this,function(type,data,evt){
if(!dojo.lang.isArray(data)){
var _991=[];
for(var key in data){
_991.push([data[key],key]);
}
data=_991;
}
this.setData(data);
}),mimetype:"text/json"});
};
this.startSearch=function(_993,type,_995){
this._preformSearch(_993,type,_995);
};
this._preformSearch=function(_996,type,_998){
var st=type||this.searchType;
var ret=[];
if(!this.caseSensitive){
_996=_996.toLowerCase();
}
for(var x=0;x<this.data.length;x++){
if((!_998)&&(ret.length>=this.searchLimit)){
break;
}
var _99c=new String((!this.caseSensitive)?this.data[x][0].toLowerCase():this.data[x][0]);
if(_99c.length<_996.length){
continue;
}
if(st=="STARTSTRING"){
if(_996==_99c.substr(0,_996.length)){
ret.push(this.data[x]);
}
}else{
if(st=="SUBSTRING"){
if(_99c.indexOf(_996)>=0){
ret.push(this.data[x]);
}
}else{
if(st=="STARTWORD"){
var idx=_99c.indexOf(_996);
if(idx==0){
ret.push(this.data[x]);
}
if(idx<=0){
continue;
}
var _99e=false;
while(idx!=-1){
if(" ,/(".indexOf(_99c.charAt(idx-1))!=-1){
_99e=true;
break;
}
idx=_99c.indexOf(_996,idx+1);
}
if(!_99e){
continue;
}else{
ret.push(this.data[x]);
}
}
}
}
}
this.provideSearchResults(ret);
};
this.provideSearchResults=function(_99f){
};
this.addData=function(_9a0){
this.data=this.data.concat(_9a0);
};
this.setData=function(_9a1){
this.data=_9a1;
};
if(_982){
this.setData(_982);
}
};
dojo.widget.defineWidget("dojo.widget.ComboBox",dojo.widget.HtmlWidget,{isContainer:false,forceValidOption:false,searchType:"stringstart",dataProvider:null,startSearch:function(_9a2){
},selectNextResult:function(){
},selectPrevResult:function(){
},setSelectedResult:function(){
},autoComplete:true,name:"",textInputNode:null,comboBoxValue:null,comboBoxSelectionValue:null,optionsListWrapper:null,optionsListNode:null,downArrowNode:null,searchTimer:null,searchDelay:100,dataUrl:"",fadeTime:200,disabled:false,maxListLength:8,mode:"local",selectedResult:null,_highlighted_option:null,_prev_key_backspace:false,_prev_key_esc:false,_gotFocus:false,_mouseover_list:false,dataProviderClass:"dojo.widget.ComboBoxDataProvider",buttonSrc:dojo.uri.dojoUri("src/widget/templates/images/combo_box_arrow.png"),dropdownToggle:"fade",templateString:"<span _=\"whitespace and CR's between tags adds &nbsp; in FF\"\n	class=\"dojoComboBoxOuter\"\n	><input style=\"display:none\"  tabindex=\"-1\" name=\"\" value=\"\" \n		dojoAttachPoint=\"comboBoxValue\"\n	><input style=\"display:none\"  tabindex=\"-1\" name=\"\" value=\"\" \n		dojoAttachPoint=\"comboBoxSelectionValue\"\n	><input type=\"text\" autocomplete=\"off\" class=\"dojoComboBox\"\n		dojoAttachEvent=\"key:_handleKeyEvents; keyUp: onKeyUp; compositionEnd; onResize;\"\n		dojoAttachPoint=\"textInputNode\"\n	><img hspace=\"0\"\n		vspace=\"0\"\n		class=\"dojoComboBox\"\n		dojoAttachPoint=\"downArrowNode\"\n		dojoAttachEvent=\"onMouseUp: handleArrowClick; onResize;\"\n		src=\"${this.buttonSrc}\"\n></span>\n",templateCssString:".dojoComboBoxOuter {\n	border: 0px !important;\n	margin: 0px !important;\n	padding: 0px !important;\n	background: transparent !important;\n	white-space: nowrap !important;\n}\n\n.dojoComboBox {\n	border: 1px inset #afafaf;\n	margin: 0px;\n	padding: 0px;\n	vertical-align: middle !important;\n	float: none !important;\n	position: static !important;\n	display: inline !important;\n}\n\n/* the input box */\ninput.dojoComboBox {\n	border-right-width: 0px !important; \n	margin-right: 0px !important;\n	padding-right: 0px !important;\n}\n\n/* the down arrow */\nimg.dojoComboBox {\n	border-left-width: 0px !important;\n	padding-left: 0px !important;\n	margin-left: 0px !important;\n}\n\n/* IE vertical-alignment calculations can be off by +-1 but these margins are collapsed away */\n.dj_ie img.dojoComboBox {\n	margin-top: 1px; \n	margin-bottom: 1px; \n}\n\n/* the drop down */\n.dojoComboBoxOptions {\n	font-family: Verdana, Helvetica, Garamond, sans-serif;\n	/* font-size: 0.7em; */\n	background-color: white;\n	border: 1px solid #afafaf;\n	position: absolute;\n	z-index: 1000; \n	overflow: auto;\n	cursor: default;\n}\n\n.dojoComboBoxItem {\n	padding-left: 2px;\n	padding-top: 2px;\n	margin: 0px;\n}\n\n.dojoComboBoxItemEven {\n	background-color: #f4f4f4;\n}\n\n.dojoComboBoxItemOdd {\n	background-color: white;\n}\n\n.dojoComboBoxItemHighlight {\n	background-color: #63709A;\n	color: white;\n}\n",templateCssPath:dojo.uri.dojoUri("src/widget/templates/ComboBox.css"),setValue:function(_9a3){
this.comboBoxValue.value=_9a3;
if(this.textInputNode.value!=_9a3){
this.textInputNode.value=_9a3;
dojo.widget.html.stabile.setState(this.widgetId,this.getState(),true);
this.onValueChanged(_9a3);
}
},onValueChanged:function(){
},getValue:function(){
return this.comboBoxValue.value;
},getState:function(){
return {value:this.getValue()};
},setState:function(_9a4){
this.setValue(_9a4.value);
},enable:function(){
this.disabled=false;
this.isEnabled=true;
this.textInputNode.removeAttribute("disabled");
},disable:function(){
this.disabled=true;
this.isEnabled=false;
this.textInputNode.setAttribute("disabled",true);
},getCaretPos:function(_9a5){
if(dojo.lang.isNumber(_9a5.selectionStart)){
return _9a5.selectionStart;
}else{
if(dojo.render.html.ie){
var tr=document.selection.createRange().duplicate();
var ntr=_9a5.createTextRange();
tr.move("character",0);
ntr.move("character",0);
try{
ntr.setEndPoint("EndToEnd",tr);
return String(ntr.text).replace(/\r/g,"").length;
}
catch(e){
return 0;
}
}
}
},setCaretPos:function(_9a8,_9a9){
_9a9=parseInt(_9a9);
this.setSelectedRange(_9a8,_9a9,_9a9);
},setSelectedRange:function(_9aa,_9ab,end){
if(!end){
end=_9aa.value.length;
}
if(_9aa.setSelectionRange){
_9aa.focus();
_9aa.setSelectionRange(_9ab,end);
}else{
if(_9aa.createTextRange){
var _9ad=_9aa.createTextRange();
with(_9ad){
collapse(true);
moveEnd("character",end);
moveStart("character",_9ab);
select();
}
}else{
_9aa.value=_9aa.value;
_9aa.blur();
_9aa.focus();
var dist=parseInt(_9aa.value.length)-end;
var _9af=String.fromCharCode(37);
var tcc=_9af.charCodeAt(0);
for(var x=0;x<dist;x++){
var te=document.createEvent("KeyEvents");
te.initKeyEvent("keypress",true,true,null,false,false,false,false,tcc,tcc);
_9aa.dispatchEvent(te);
}
}
}
},_handleKeyEvents:function(evt){
if(evt.ctrlKey||evt.altKey||!evt.key){
return;
}
this._prev_key_backspace=false;
this._prev_key_esc=false;
var k=dojo.event.browser.keys;
var _9b5=true;
switch(evt.key){
case k.KEY_DOWN_ARROW:
if(!this.popupWidget.isShowingNow){
this.startSearchFromInput();
}
this.highlightNextOption();
dojo.event.browser.stopEvent(evt);
return;
case k.KEY_UP_ARROW:
this.highlightPrevOption();
dojo.event.browser.stopEvent(evt);
return;
case k.KEY_TAB:
if(!this.autoComplete&&this.popupWidget.isShowingNow&&this._highlighted_option){
dojo.event.browser.stopEvent(evt);
this.selectOption({"target":this._highlighted_option,"noHide":false});
this.setSelectedRange(this.textInputNode,this.textInputNode.value.length,null);
}else{
this.selectOption();
return;
}
break;
case k.KEY_ENTER:
if(this.popupWidget.isShowingNow){
dojo.event.browser.stopEvent(evt);
}
if(this.autoComplete){
this.selectOption();
return;
}
case " ":
if(this.popupWidget.isShowingNow&&this._highlighted_option){
dojo.event.browser.stopEvent(evt);
this.selectOption();
this.hideResultList();
return;
}
break;
case k.KEY_ESCAPE:
this.hideResultList();
this._prev_key_esc=true;
return;
case k.KEY_BACKSPACE:
this._prev_key_backspace=true;
if(!this.textInputNode.value.length){
this.setAllValues("","");
this.hideResultList();
_9b5=false;
}
break;
case k.KEY_RIGHT_ARROW:
case k.KEY_LEFT_ARROW:
_9b5=false;
break;
default:
if(evt.charCode==0){
_9b5=false;
}
}
if(this.searchTimer){
clearTimeout(this.searchTimer);
}
if(_9b5){
this.blurOptionNode();
this.searchTimer=setTimeout(dojo.lang.hitch(this,this.startSearchFromInput),this.searchDelay);
}
},compositionEnd:function(evt){
evt.key=evt.keyCode;
this._handleKeyEvents(evt);
},onKeyUp:function(evt){
this.setValue(this.textInputNode.value);
},setSelectedValue:function(_9b8){
this.comboBoxSelectionValue.value=_9b8;
},setAllValues:function(_9b9,_9ba){
this.setSelectedValue(_9ba);
this.setValue(_9b9);
},focusOptionNode:function(node){
if(this._highlighted_option!=node){
this.blurOptionNode();
this._highlighted_option=node;
dojo.html.addClass(this._highlighted_option,"dojoComboBoxItemHighlight");
}
},blurOptionNode:function(){
if(this._highlighted_option){
dojo.html.removeClass(this._highlighted_option,"dojoComboBoxItemHighlight");
this._highlighted_option=null;
}
},highlightNextOption:function(){
if((!this._highlighted_option)||!this._highlighted_option.parentNode){
this.focusOptionNode(this.optionsListNode.firstChild);
}else{
if(this._highlighted_option.nextSibling){
this.focusOptionNode(this._highlighted_option.nextSibling);
}
}
dojo.html.scrollIntoView(this._highlighted_option);
},highlightPrevOption:function(){
if(this._highlighted_option&&this._highlighted_option.previousSibling){
this.focusOptionNode(this._highlighted_option.previousSibling);
}else{
this._highlighted_option=null;
this.hideResultList();
return;
}
dojo.html.scrollIntoView(this._highlighted_option);
},itemMouseOver:function(evt){
if(evt.target===this.optionsListNode){
return;
}
this.focusOptionNode(evt.target);
dojo.html.addClass(this._highlighted_option,"dojoComboBoxItemHighlight");
},itemMouseOut:function(evt){
if(evt.target===this.optionsListNode){
return;
}
this.blurOptionNode();
},onResize:function(){
var _9be=dojo.html.getContentBox(this.textInputNode);
if(_9be.height==0){
dojo.lang.setTimeout(this,"onResize",50);
return;
}
var _9bf={width:_9be.height,height:_9be.height};
dojo.html.setContentBox(this.downArrowNode,_9bf);
},fillInTemplate:function(args,frag){
dojo.html.applyBrowserClass(this.domNode);
var _9c2=this.getFragNodeRef(frag);
if(!this.name&&_9c2.name){
this.name=_9c2.name;
}
this.comboBoxValue.name=this.name;
this.comboBoxSelectionValue.name=this.name+"_selected";
dojo.html.copyStyle(this.domNode,_9c2);
dojo.html.copyStyle(this.textInputNode,_9c2);
dojo.html.copyStyle(this.downArrowNode,_9c2);
with(this.downArrowNode.style){
width="0px";
height="0px";
}
var _9c3;
if(this.mode=="remote"){
_9c3=dojo.widget.incrementalComboBoxDataProvider;
}else{
if(typeof this.dataProviderClass=="string"){
_9c3=dojo.evalObjPath(this.dataProviderClass);
}else{
_9c3=this.dataProviderClass;
}
}
this.dataProvider=new _9c3();
this.dataProvider.init(this,this.getFragNodeRef(frag));
this.popupWidget=new dojo.widget.createWidget("PopupContainer",{toggle:this.dropdownToggle,toggleDuration:this.toggleDuration});
dojo.event.connect(this,"destroy",this.popupWidget,"destroy");
this.optionsListNode=this.popupWidget.domNode;
this.domNode.appendChild(this.optionsListNode);
dojo.html.addClass(this.optionsListNode,"dojoComboBoxOptions");
dojo.event.connect(this.optionsListNode,"onclick",this,"selectOption");
dojo.event.connect(this.optionsListNode,"onmouseover",this,"_onMouseOver");
dojo.event.connect(this.optionsListNode,"onmouseout",this,"_onMouseOut");
dojo.event.connect(this.optionsListNode,"onmouseover",this,"itemMouseOver");
dojo.event.connect(this.optionsListNode,"onmouseout",this,"itemMouseOut");
},focus:function(){
this.tryFocus();
},openResultList:function(_9c4){
if(!this.isEnabled){
return;
}
this.clearResultList();
if(!_9c4.length){
this.hideResultList();
}
if((this.autoComplete)&&(_9c4.length)&&(!this._prev_key_backspace)&&(this.textInputNode.value.length>0)){
var cpos=this.getCaretPos(this.textInputNode);
if((cpos+1)>this.textInputNode.value.length){
this.textInputNode.value+=_9c4[0][0].substr(cpos);
this.setSelectedRange(this.textInputNode,cpos,this.textInputNode.value.length);
}
}
var even=true;
while(_9c4.length){
var tr=_9c4.shift();
if(tr){
var td=document.createElement("div");
td.appendChild(document.createTextNode(tr[0]));
td.setAttribute("resultName",tr[0]);
td.setAttribute("resultValue",tr[1]);
td.className="dojoComboBoxItem "+((even)?"dojoComboBoxItemEven":"dojoComboBoxItemOdd");
even=(!even);
this.optionsListNode.appendChild(td);
}
}
this.showResultList();
},onFocusInput:function(){
this._hasFocus=true;
},onBlurInput:function(){
this._hasFocus=false;
this._handleBlurTimer(true,500);
},_handleBlurTimer:function(_9c9,_9ca){
if(this.blurTimer&&(_9c9||_9ca)){
clearTimeout(this.blurTimer);
}
if(_9ca){
this.blurTimer=dojo.lang.setTimeout(this,"checkBlurred",_9ca);
}
},_onMouseOver:function(evt){
if(!this._mouseover_list){
this._handleBlurTimer(true,0);
this._mouseover_list=true;
}
},_onMouseOut:function(evt){
var _9cd=evt.relatedTarget;
if(!_9cd||_9cd.parentNode!=this.optionsListNode){
this._mouseover_list=false;
this._handleBlurTimer(true,100);
this.tryFocus();
}
},_isInputEqualToResult:function(_9ce){
var _9cf=this.textInputNode.value;
if(!this.dataProvider.caseSensitive){
_9cf=_9cf.toLowerCase();
_9ce=_9ce.toLowerCase();
}
return (_9cf==_9ce);
},_isValidOption:function(){
var tgt=dojo.html.firstElement(this.optionsListNode);
var _9d1=false;
while(!_9d1&&tgt){
if(this._isInputEqualToResult(tgt.getAttribute("resultName"))){
_9d1=true;
}else{
tgt=dojo.html.nextElement(tgt);
}
}
return _9d1;
},checkBlurred:function(){
if(!this._hasFocus&&!this._mouseover_list){
this.hideResultList();
if(!this.textInputNode.value.length){
this.setAllValues("","");
return;
}
var _9d2=this._isValidOption();
if(this.forceValidOption&&!_9d2){
this.setAllValues("","");
return;
}
if(!_9d2){
this.setSelectedValue("");
}
}
},sizeBackgroundIframe:function(){
var mb=dojo.html.getMarginBox(this.optionsListNode);
if(mb.width==0||mb.height==0){
dojo.lang.setTimeout(this,"sizeBackgroundIframe",100);
return;
}
},selectOption:function(evt){
var tgt=null;
if(!evt){
evt={target:this._highlighted_option};
}
if(!dojo.html.isDescendantOf(evt.target,this.optionsListNode)){
if(!this.textInputNode.value.length){
return;
}
tgt=dojo.html.firstElement(this.optionsListNode);
if(!tgt||!this._isInputEqualToResult(tgt.getAttribute("resultName"))){
return;
}
}else{
tgt=evt.target;
}
while((tgt.nodeType!=1)||(!tgt.getAttribute("resultName"))){
tgt=tgt.parentNode;
if(tgt===dojo.body()){
return false;
}
}
this.selectedResult=[tgt.getAttribute("resultName"),tgt.getAttribute("resultValue")];
this.setAllValues(tgt.getAttribute("resultName"),tgt.getAttribute("resultValue"));
if(!evt.noHide){
this.hideResultList();
this.setSelectedRange(this.textInputNode,0,null);
}
this.tryFocus();
},clearResultList:function(){
if(this.optionsListNode.innerHTML){
this.optionsListNode.innerHTML="";
}
},hideResultList:function(){
this.popupWidget.close();
},showResultList:function(){
var _9d6=this.optionsListNode.childNodes;
if(_9d6.length){
var _9d7=this.maxListLength;
if(_9d6.length<_9d7){
_9d7=_9d6.length;
}
with(this.optionsListNode.style){
display="";
if(_9d7==_9d6.length){
height="";
}else{
height=_9d7*dojo.html.getMarginBox(_9d6[0]).height+"px";
}
width=(dojo.html.getMarginBox(this.domNode).width-2)+"px";
}
this.popupWidget.open(this.domNode,this,this.downArrowNode);
}else{
this.hideResultList();
}
},handleArrowClick:function(){
this._handleBlurTimer(true,0);
this.tryFocus();
if(this.popupWidget.isShowingNow){
this.hideResultList();
}else{
this.startSearch("");
}
},tryFocus:function(){
try{
this.textInputNode.focus();
}
catch(e){
}
},startSearchFromInput:function(){
this.startSearch(this.textInputNode.value);
},postCreate:function(){
this.onResize();
dojo.event.connect(this,"startSearch",this.dataProvider,"startSearch");
dojo.event.connect(this.dataProvider,"provideSearchResults",this,"openResultList");
dojo.event.connect(this.textInputNode,"onblur",this,"onBlurInput");
dojo.event.connect(this.textInputNode,"onfocus",this,"onFocusInput");
if(this.disabled){
this.disable();
}
var s=dojo.widget.html.stabile.getState(this.widgetId);
if(s){
this.setState(s);
}
}});
dojo.provide("struts.widget.ComboBox");
struts.widget.ComboBoxDataProvider=function(_9d9,_9da,_9db){
this.data=[];
this.searchTimeout=_9db||500;
this.searchLimit=_9da||30;
this.searchType="STARTSTRING";
this.caseSensitive=false;
this._lastSearch="";
this._lastSearchResults=null;
this.formId="";
this.formFilter="";
this.firstRequest=true;
this.cbox=null;
this.init=function(cbox,node){
this.cbox=cbox;
this.formId=cbox.formId;
this.formFilter=cbox.formFilter;
this.searchLimit=cbox.searchLimit;
if(!dojo.string.isBlank(cbox.dataUrl)){
this.getData(cbox.dataUrl);
}else{
if((node)&&(node.nodeName.toLowerCase()=="select")){
var opts=node.getElementsByTagName("option");
var ol=opts.length;
var data=[];
for(var x=0;x<ol;x++){
var text=opts[x].textContent||opts[x].innerText||opts[x].innerHTML;
var _9e3=[String(text),String(opts[x].value)];
data.push(_9e3);
if(opts[x].selected){
cbox.setAllValues(_9e3[0],_9e3[1]);
}
}
this.setData(data);
}
}
};
this.getData=function(url){
dojo.html.show(this.cbox.indicator);
dojo.io.bind({url:url,formNode:dojo.byId(this.formId),formFilter:window[this.formFilter],load:dojo.lang.hitch(this,function(type,data,evt){
dojo.html.hide(this.cbox.indicator);
if(!this.firstRequest){
this.cbox.notify.apply(this.cbox,[data,type,evt]);
}
var _9e8=null;
var _9e9=data[this.cbox.dataFieldName];
if(!dojo.lang.isArray(data)){
if(_9e9){
if(dojo.lang.isArray(_9e9)){
_9e8=_9e9;
}else{
if(dojo.lang.isObject(_9e9)){
_9e8=[];
for(var key in _9e9){
_9e8.push([_9e9[key],key]);
}
}
}
}else{
var _9eb=[];
for(var key in data){
if(dojo.string.startsWith(key,this.cbox.name)){
_9e8=data[key];
break;
}else{
_9eb.push([data[key],key]);
}
if(!_9e8&&dojo.lang.isArray(data[key])&&!dojo.lang.isString(data[key])){
_9e8=data[key];
}
}
if(!_9e8){
_9e8=_9eb;
}
}
data=_9e8;
}
this.setData(data);
this.firstRequest=false;
}),mimetype:"text/json"});
};
this.startSearch=function(_9ec,type,_9ee){
this._preformSearch(_9ec,type,_9ee);
};
this._preformSearch=function(_9ef,type,_9f1){
var st=type||this.searchType;
var ret=[];
if(!this.caseSensitive){
_9ef=_9ef.toLowerCase();
}
for(var x=0;x<this.data.length;x++){
if(!this.data[x]){
continue;
}
if((!_9f1)&&(ret.length>=this.searchLimit)){
break;
}
var _9f5=new String((!this.caseSensitive)?this.data[x][0].toLowerCase():this.data[x][0]);
if(_9f5.length<_9ef.length){
continue;
}
if(st=="STARTSTRING"){
if(_9ef==_9f5.substr(0,_9ef.length)){
ret.push(this.data[x]);
}
}else{
if(st=="SUBSTRING"){
if(_9f5.indexOf(_9ef)>=0){
ret.push(this.data[x]);
}
}else{
if(st=="STARTWORD"){
var idx=_9f5.indexOf(_9ef);
if(idx==0){
ret.push(this.data[x]);
}
if(idx<=0){
continue;
}
var _9f7=false;
while(idx!=-1){
if(" ,/(".indexOf(_9f5.charAt(idx-1))!=-1){
_9f7=true;
break;
}
idx=_9f5.indexOf(_9ef,idx+1);
}
if(!_9f7){
continue;
}else{
ret.push(this.data[x]);
}
}
}
}
}
this.provideSearchResults(ret);
};
this.provideSearchResults=function(_9f8){
};
this.addData=function(_9f9){
this.data=this.data.concat(_9f9);
};
this.setData=function(_9fa){
this.data=_9fa;
for(var i=0;i<this.data.length;i++){
var _9fc=this.data[i];
if(!dojo.lang.isArray(_9fc)){
this.data[i]=[_9fc,_9fc];
}
}
};
if(_9d9){
this.setData(_9d9);
}
};
dojo.widget.defineWidget("struts.widget.ComboBox",dojo.widget.ComboBox,{widgetType:"ComboBox",dropdownHeight:120,dropdownWidth:0,itemHeight:0,listenTopics:"",notifyTopics:"",notifyTopicsArray:null,indicator:"",formId:"",formFilter:"",dataProviderClass:"struts.widget.ComboBoxDataProvider",loadOnType:false,loadMinimum:3,initialValue:"",initialKey:"",visibleDownArrow:true,fadeTime:100,searchType:"STARTSTRING",dataFieldName:"",keyName:"",templateCssString:"/*\n * $Id: pom.xml 560558 2007-07-28 15:47:10Z apetrelli $\n *\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements.  See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership.  The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License.  You may obtain a copy of the License at\n *\n *  http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied.  See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\n.dojoComboBoxOuter {\n	border: 0px !important;\n	margin: 0px !important;\n	padding: 0px !important;\n	background: transparent !important;\n	white-space: nowrap !important;\n}\n\n.dojoComboBox {\n	border: 1px inset #afafaf;\n	margin: 0px;\n	padding: 0px;\n	vertical-align: middle !important;\n	float: none !important;\n	position: static !important;\n	display: inline;\n}\n\n/* the input box */\ninput.dojoComboBox {\n	border-right-width: 1px !important;\n	margin-right: 0px !important;\n	padding-right: 0px !important;\n}\n\n/* the down arrow */\nimg.dojoComboBox {\n	border-left-width: 0px !important;\n	padding-left: 0px !important;\n	margin-left: 0px !important;\n}\n\n/* IE vertical-alignment calculations can be off by +-1 but these margins are collapsed away */\n.dj_ie img.dojoComboBox {\n	margin-top: 1px;\n	margin-bottom: 1px;\n}\n\n/* the drop down */\n.dojoComboBoxOptions {\n	font-family: Verdana, Helvetica, Garamond, sans-serif;\n	/* font-size: 0.7em; */\n	background-color: white;\n	border: 1px solid #afafaf;\n	position: absolute;\n	z-index: 1000;\n	overflow: auto;\n	cursor: default;\n}\n\n.dojoComboBoxItem {\n	padding-left: 2px;\n	padding-top: 2px;\n	margin: 0px;\n}\n\n.dojoComboBoxItemEven {\n	background-color: #f4f4f4;\n}\n\n.dojoComboBoxItemOdd {\n	background-color: white;\n}\n\n.dojoComboBoxItemHighlight {\n	background-color: #63709A;\n	color: white;\n}\n",templateCssPath:dojo.uri.dojoUri("struts/ComboBox.css"),searchLimit:30,showResultList:function(){
var _9fd=this.optionsListNode.childNodes;
if(_9fd.length){
this.optionsListNode.style.width=this.dropdownWidth===0?(dojo.html.getMarginBox(this.domNode).width-2)+"px":this.dropdownWidth+"px";
if(this.itemHeight===0||dojo.string.isBlank(this.textInputNode.value)){
this.optionsListNode.style.height=this.dropdownHeight+"px";
this.optionsListNode.style.display="";
this.itemHeight=dojo.html.getMarginBox(_9fd[0]).height;
}
var _9fe=this.itemHeight*_9fd.length;
if(_9fe<this.dropdownHeight){
this.optionsListNode.style.height=_9fe+2+"px";
}
this.popupWidget.open(this.domNode,this,this.downArrowNode);
}else{
this.hideResultList();
}
},openResultList:function(_9ff){
if(!this.isEnabled){
return;
}
this.clearResultList();
if(!_9ff.length){
this.hideResultList();
}
if((this.autoComplete)&&(_9ff.length)&&(!this._prev_key_backspace)&&(this.textInputNode.value.length>0)){
var cpos=this.getCaretPos(this.textInputNode);
if((cpos+1)>this.textInputNode.value.length){
this.textInputNode.value+=_9ff[0][0].substr(cpos);
this.setSelectedRange(this.textInputNode,cpos,this.textInputNode.value.length);
}
}
var _a01=this.textInputNode.value;
var even=true;
while(_9ff.length){
var tr=_9ff.shift();
if(tr){
var td=document.createElement("div");
var text=tr[0];
var i=text.toLowerCase().indexOf(_a01.toLowerCase());
if(i>=0){
var pre=text.substring(0,i);
var _a08=text.substring(i,i+_a01.length);
var post=text.substring(i+_a01.length);
if(!dojo.string.isBlank(pre)){
td.appendChild(document.createTextNode(pre));
}
var _a0a=document.createElement("b");
td.appendChild(_a0a);
_a0a.appendChild(document.createTextNode(_a08));
td.appendChild(document.createTextNode(post));
}else{
td.appendChild(document.createTextNode(tr[0]));
}
td.setAttribute("resultName",tr[0]);
td.setAttribute("resultValue",tr[1]);
td.className="dojoComboBoxItem "+((even)?"dojoComboBoxItemEven":"dojoComboBoxItemOdd");
even=(!even);
this.optionsListNode.appendChild(td);
}
}
this.showResultList();
},postCreate:function(){
struts.widget.ComboBox.superclass.postCreate.apply(this);
var self=this;
if(!dojo.string.isBlank(this.listenTopics)){
var _a0c=this.listenTopics.split(",");
for(var i=0;i<_a0c.length;i++){
dojo.event.topic.subscribe(_a0c[i],function(){
var _a0e={cancel:false};
self.notify(this.widgetId,"before",_a0e);
if(_a0e.cancel){
return;
}
self.clearValues();
self.dataProvider.getData(self.dataUrl);
});
}
}
if(!dojo.string.isBlank(this.notifyTopics)){
this.notifyTopicsArray=this.notifyTopics.split(",");
}
this.comboBoxSelectionValue.name=dojo.string.isBlank(this.keyName)?this.name+"Key":this.keyName;
this.comboBoxValue.value=this.initialValue;
this.comboBoxSelectionValue.value=this.initialKey;
this.textInputNode.value=this.initialValue;
if(!this.visibleDownArrow){
dojo.html.hide(this.downArrowNode);
}
if(!dojo.string.isBlank(this.searchType)){
this.dataProvider.searchType=this.searchType.toUpperCase();
}
},clearValues:function(){
this.comboBoxValue.value="";
this.comboBoxSelectionValue.value="";
this.textInputNode.value="";
},onValueChanged:function(data){
this.notify(data,"valuechanged",null);
},notify:function(data,type,e){
if(this.notifyTopicsArray){
dojo.lang.forEach(this.notifyTopicsArray,function(_a13){
try{
dojo.event.topic.publish(_a13,data,type,e);
}
catch(ex){
dojo.debug(ex);
}
});
}
},startSearchFromInput:function(){
var _a14=this.textInputNode.value;
if(this.loadOnType){
if(_a14.length>=this.loadMinimum){
var _a15=this.dataUrl+(this.dataUrl.indexOf("?")>-1?"&":"?");
_a15+=this.name+"="+_a14;
this.dataProvider.getData(_a15);
this.startSearch(_a14);
}else{
this.hideResultList();
}
}else{
this.startSearch(_a14);
}
}});
dojo.provide("dojo.widget.DropdownContainer");
dojo.widget.defineWidget("dojo.widget.DropdownContainer",dojo.widget.HtmlWidget,{inputWidth:"7em",id:"",inputId:"",inputName:"",iconURL:dojo.uri.dojoUri("src/widget/templates/images/combo_box_arrow.png"),iconAlt:"",inputNode:null,buttonNode:null,containerNode:null,containerToggle:"plain",containerToggleDuration:150,containerAnimInProgress:false,templateString:"<span style=\"white-space:nowrap\"><input type=\"hidden\" name=\"\" value=\"\" dojoAttachPoint=\"valueNode\" /><input name=\"\" type=\"text\" value=\"\" style=\"vertical-align:middle;\" dojoAttachPoint=\"inputNode\" autocomplete=\"off\" /> <img src=\"${this.iconURL}\" alt=\"${this.iconAlt}\" dojoAttachEvent=\"onclick: onIconClick\" dojoAttachPoint=\"buttonNode\" style=\"vertical-align:middle; cursor:pointer; cursor:hand\" /></span>",templateCssPath:"",fillInTemplate:function(args,frag){
var _a18=this.getFragNodeRef(frag);
this.popup=dojo.widget.createWidget("PopupContainer",{toggle:this.containerToggle,toggleDuration:this.containerToggleDuration});
this.containerNode=this.popup.domNode;
this.domNode.appendChild(this.popup.domNode);
if(this.id){
this.domNode.id=this.id;
}
if(this.inputId){
this.inputNode.id=this.inputId;
}
if(this.inputName){
this.inputNode.name=this.inputName;
}
this.inputNode.style.width=this.inputWidth;
dojo.event.connect(this.inputNode,"onchange",this,"onInputChange");
},onIconClick:function(evt){
if(!this.isEnabled){
return;
}
if(!this.popup.isShowingNow){
this.popup.open(this.inputNode,this,this.buttonNode);
}else{
this.popup.close();
}
},hideContainer:function(){
if(this.popup.isShowingNow){
this.popup.close();
}
},onInputChange:function(){
}});
dojo.provide("dojo.date.serialize");
dojo.date.setIso8601=function(_a1a,_a1b){
var _a1c=(_a1b.indexOf("T")==-1)?_a1b.split(" "):_a1b.split("T");
_a1a=dojo.date.setIso8601Date(_a1a,_a1c[0]);
if(_a1c.length==2){
_a1a=dojo.date.setIso8601Time(_a1a,_a1c[1]);
}
return _a1a;
};
dojo.date.fromIso8601=function(_a1d){
return dojo.date.setIso8601(new Date(0,0),_a1d);
};
dojo.date.setIso8601Date=function(_a1e,_a1f){
var _a20="^([0-9]{4})((-?([0-9]{2})(-?([0-9]{2}))?)|"+"(-?([0-9]{3}))|(-?W([0-9]{2})(-?([1-7]))?))?$";
var d=_a1f.match(new RegExp(_a20));
if(!d){
dojo.debug("invalid date string: "+_a1f);
return null;
}
var year=d[1];
var _a23=d[4];
var date=d[6];
var _a25=d[8];
var week=d[10];
var _a27=d[12]?d[12]:1;
_a1e.setFullYear(year);
if(_a25){
_a1e.setMonth(0);
_a1e.setDate(Number(_a25));
}else{
if(week){
_a1e.setMonth(0);
_a1e.setDate(1);
var gd=_a1e.getDay();
var day=gd?gd:7;
var _a2a=Number(_a27)+(7*Number(week));
if(day<=4){
_a1e.setDate(_a2a+1-day);
}else{
_a1e.setDate(_a2a+8-day);
}
}else{
if(_a23){
_a1e.setDate(1);
_a1e.setMonth(_a23-1);
}
if(date){
_a1e.setDate(date);
}
}
}
return _a1e;
};
dojo.date.fromIso8601Date=function(_a2b){
return dojo.date.setIso8601Date(new Date(0,0),_a2b);
};
dojo.date.setIso8601Time=function(_a2c,_a2d){
var _a2e="Z|(([-+])([0-9]{2})(:?([0-9]{2}))?)$";
var d=_a2d.match(new RegExp(_a2e));
var _a30=0;
if(d){
if(d[0]!="Z"){
_a30=(Number(d[3])*60)+Number(d[5]);
_a30*=((d[2]=="-")?1:-1);
}
_a30-=_a2c.getTimezoneOffset();
_a2d=_a2d.substr(0,_a2d.length-d[0].length);
}
var _a31="^([0-9]{2})(:?([0-9]{2})(:?([0-9]{2})(.([0-9]+))?)?)?$";
d=_a2d.match(new RegExp(_a31));
if(!d){
dojo.debug("invalid time string: "+_a2d);
return null;
}
var _a32=d[1];
var mins=Number((d[3])?d[3]:0);
var secs=(d[5])?d[5]:0;
var ms=d[7]?(Number("0."+d[7])*1000):0;
_a2c.setHours(_a32);
_a2c.setMinutes(mins);
_a2c.setSeconds(secs);
_a2c.setMilliseconds(ms);
if(_a30!==0){
_a2c.setTime(_a2c.getTime()+_a30*60000);
}
return _a2c;
};
dojo.date.fromIso8601Time=function(_a36){
return dojo.date.setIso8601Time(new Date(0,0),_a36);
};
dojo.date.toRfc3339=function(_a37,_a38){
if(!_a37){
_a37=new Date();
}
var _=dojo.string.pad;
var _a3a=[];
if(_a38!="timeOnly"){
var date=[_(_a37.getFullYear(),4),_(_a37.getMonth()+1,2),_(_a37.getDate(),2)].join("-");
_a3a.push(date);
}
if(_a38!="dateOnly"){
var time=[_(_a37.getHours(),2),_(_a37.getMinutes(),2),_(_a37.getSeconds(),2)].join(":");
var _a3d=_a37.getTimezoneOffset();
time+=(_a3d>0?"-":"+")+_(Math.floor(Math.abs(_a3d)/60),2)+":"+_(Math.abs(_a3d)%60,2);
_a3a.push(time);
}
return _a3a.join("T");
};
dojo.date.fromRfc3339=function(_a3e){
if(_a3e.indexOf("Tany")!=-1){
_a3e=_a3e.replace("Tany","");
}
var _a3f=new Date();
return dojo.date.setIso8601(_a3f,_a3e);
};
dojo.provide("dojo.date.common");
dojo.date.setDayOfYear=function(_a40,_a41){
_a40.setMonth(0);
_a40.setDate(_a41);
return _a40;
};
dojo.date.getDayOfYear=function(_a42){
var _a43=_a42.getFullYear();
var _a44=new Date(_a43-1,11,31);
return Math.floor((_a42.getTime()-_a44.getTime())/86400000);
};
dojo.date.setWeekOfYear=function(_a45,week,_a47){
if(arguments.length==1){
_a47=0;
}
dojo.unimplemented("dojo.date.setWeekOfYear");
};
dojo.date.getWeekOfYear=function(_a48,_a49){
if(arguments.length==1){
_a49=0;
}
var _a4a=new Date(_a48.getFullYear(),0,1);
var day=_a4a.getDay();
_a4a.setDate(_a4a.getDate()-day+_a49-(day>_a49?7:0));
return Math.floor((_a48.getTime()-_a4a.getTime())/604800000);
};
dojo.date.setIsoWeekOfYear=function(_a4c,week,_a4e){
if(arguments.length==1){
_a4e=1;
}
dojo.unimplemented("dojo.date.setIsoWeekOfYear");
};
dojo.date.getIsoWeekOfYear=function(_a4f,_a50){
if(arguments.length==1){
_a50=1;
}
dojo.unimplemented("dojo.date.getIsoWeekOfYear");
};
dojo.date.shortTimezones=["IDLW","BET","HST","MART","AKST","PST","MST","CST","EST","AST","NFT","BST","FST","AT","GMT","CET","EET","MSK","IRT","GST","AFT","AGTT","IST","NPT","ALMT","MMT","JT","AWST","JST","ACST","AEST","LHST","VUT","NFT","NZT","CHAST","PHOT","LINT"];
dojo.date.timezoneOffsets=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,540,570,600,630,660,690,720,765,780,840];
dojo.date.getDaysInMonth=function(_a51){
var _a52=_a51.getMonth();
var days=[31,28,31,30,31,30,31,31,30,31,30,31];
if(_a52==1&&dojo.date.isLeapYear(_a51)){
return 29;
}else{
return days[_a52];
}
};
dojo.date.isLeapYear=function(_a54){
var year=_a54.getFullYear();
return (year%400==0)?true:(year%100==0)?false:(year%4==0)?true:false;
};
dojo.date.getTimezoneName=function(_a56){
var str=_a56.toString();
var tz="";
var _a59;
var pos=str.indexOf("(");
if(pos>-1){
pos++;
tz=str.substring(pos,str.indexOf(")"));
}else{
var pat=/([A-Z\/]+) \d{4}$/;
if((_a59=str.match(pat))){
tz=_a59[1];
}else{
str=_a56.toLocaleString();
pat=/ ([A-Z\/]+)$/;
if((_a59=str.match(pat))){
tz=_a59[1];
}
}
}
return tz=="AM"||tz=="PM"?"":tz;
};
dojo.date.getOrdinal=function(_a5c){
var date=_a5c.getDate();
if(date%100!=11&&date%10==1){
return "st";
}else{
if(date%100!=12&&date%10==2){
return "nd";
}else{
if(date%100!=13&&date%10==3){
return "rd";
}else{
return "th";
}
}
}
};
dojo.date.compareTypes={DATE:1,TIME:2};
dojo.date.compare=function(_a5e,_a5f,_a60){
var dA=_a5e;
var dB=_a5f||new Date();
var now=new Date();
with(dojo.date.compareTypes){
var opt=_a60||(DATE|TIME);
var d1=new Date((opt&DATE)?dA.getFullYear():now.getFullYear(),(opt&DATE)?dA.getMonth():now.getMonth(),(opt&DATE)?dA.getDate():now.getDate(),(opt&TIME)?dA.getHours():0,(opt&TIME)?dA.getMinutes():0,(opt&TIME)?dA.getSeconds():0);
var d2=new Date((opt&DATE)?dB.getFullYear():now.getFullYear(),(opt&DATE)?dB.getMonth():now.getMonth(),(opt&DATE)?dB.getDate():now.getDate(),(opt&TIME)?dB.getHours():0,(opt&TIME)?dB.getMinutes():0,(opt&TIME)?dB.getSeconds():0);
}
if(d1.valueOf()>d2.valueOf()){
return 1;
}
if(d1.valueOf()<d2.valueOf()){
return -1;
}
return 0;
};
dojo.date.dateParts={YEAR:0,MONTH:1,DAY:2,HOUR:3,MINUTE:4,SECOND:5,MILLISECOND:6,QUARTER:7,WEEK:8,WEEKDAY:9};
dojo.date.add=function(dt,_a68,incr){
if(typeof dt=="number"){
dt=new Date(dt);
}
function fixOvershoot(){
if(sum.getDate()<dt.getDate()){
sum.setDate(0);
}
}
var sum=new Date(dt);
with(dojo.date.dateParts){
switch(_a68){
case YEAR:
sum.setFullYear(dt.getFullYear()+incr);
fixOvershoot();
break;
case QUARTER:
incr*=3;
case MONTH:
sum.setMonth(dt.getMonth()+incr);
fixOvershoot();
break;
case WEEK:
incr*=7;
case DAY:
sum.setDate(dt.getDate()+incr);
break;
case WEEKDAY:
var dat=dt.getDate();
var _a6c=0;
var days=0;
var strt=0;
var trgt=0;
var adj=0;
var mod=incr%5;
if(mod==0){
days=(incr>0)?5:-5;
_a6c=(incr>0)?((incr-5)/5):((incr+5)/5);
}else{
days=mod;
_a6c=parseInt(incr/5);
}
strt=dt.getDay();
if(strt==6&&incr>0){
adj=1;
}else{
if(strt==0&&incr<0){
adj=-1;
}
}
trgt=(strt+days);
if(trgt==0||trgt==6){
adj=(incr>0)?2:-2;
}
sum.setDate(dat+(7*_a6c)+days+adj);
break;
case HOUR:
sum.setHours(sum.getHours()+incr);
break;
case MINUTE:
sum.setMinutes(sum.getMinutes()+incr);
break;
case SECOND:
sum.setSeconds(sum.getSeconds()+incr);
break;
case MILLISECOND:
sum.setMilliseconds(sum.getMilliseconds()+incr);
break;
default:
break;
}
}
return sum;
};
dojo.date.diff=function(dtA,dtB,_a74){
if(typeof dtA=="number"){
dtA=new Date(dtA);
}
if(typeof dtB=="number"){
dtB=new Date(dtB);
}
var _a75=dtB.getFullYear()-dtA.getFullYear();
var _a76=(dtB.getMonth()-dtA.getMonth())+(_a75*12);
var _a77=dtB.getTime()-dtA.getTime();
var _a78=_a77/1000;
var _a79=_a78/60;
var _a7a=_a79/60;
var _a7b=_a7a/24;
var _a7c=_a7b/7;
var _a7d=0;
with(dojo.date.dateParts){
switch(_a74){
case YEAR:
_a7d=_a75;
break;
case QUARTER:
var mA=dtA.getMonth();
var mB=dtB.getMonth();
var qA=Math.floor(mA/3)+1;
var qB=Math.floor(mB/3)+1;
qB+=(_a75*4);
_a7d=qB-qA;
break;
case MONTH:
_a7d=_a76;
break;
case WEEK:
_a7d=parseInt(_a7c);
break;
case DAY:
_a7d=_a7b;
break;
case WEEKDAY:
var days=Math.round(_a7b);
var _a83=parseInt(days/7);
var mod=days%7;
if(mod==0){
days=_a83*5;
}else{
var adj=0;
var aDay=dtA.getDay();
var bDay=dtB.getDay();
_a83=parseInt(days/7);
mod=days%7;
var _a88=new Date(dtA);
_a88.setDate(_a88.getDate()+(_a83*7));
var _a89=_a88.getDay();
if(_a7b>0){
switch(true){
case aDay==6:
adj=-1;
break;
case aDay==0:
adj=0;
break;
case bDay==6:
adj=-1;
break;
case bDay==0:
adj=-2;
break;
case (_a89+mod)>5:
adj=-2;
break;
default:
break;
}
}else{
if(_a7b<0){
switch(true){
case aDay==6:
adj=0;
break;
case aDay==0:
adj=1;
break;
case bDay==6:
adj=2;
break;
case bDay==0:
adj=1;
break;
case (_a89+mod)<0:
adj=2;
break;
default:
break;
}
}
}
days+=adj;
days-=(_a83*2);
}
_a7d=days;
break;
case HOUR:
_a7d=_a7a;
break;
case MINUTE:
_a7d=_a79;
break;
case SECOND:
_a7d=_a78;
break;
case MILLISECOND:
_a7d=_a77;
break;
default:
break;
}
}
return Math.round(_a7d);
};
dojo.provide("dojo.date.supplemental");
dojo.date.getFirstDayOfWeek=function(_a8a){
var _a8b={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,gb:0,sy:4};
_a8a=dojo.hostenv.normalizeLocale(_a8a);
var _a8c=_a8a.split("-")[1];
var dow=_a8b[_a8c];
return (typeof dow=="undefined")?1:dow;
};
dojo.date.getWeekend=function(_a8e){
var _a8f={eg:5,il:5,sy:5,"in":0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4};
var _a90={ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6};
_a8e=dojo.hostenv.normalizeLocale(_a8e);
var _a91=_a8e.split("-")[1];
var _a92=_a8f[_a91];
var end=_a90[_a91];
if(typeof _a92=="undefined"){
_a92=6;
}
if(typeof end=="undefined"){
end=0;
}
return {start:_a92,end:end};
};
dojo.date.isWeekend=function(_a94,_a95){
var _a96=dojo.date.getWeekend(_a95);
var day=(_a94||new Date()).getDay();
if(_a96.end<_a96.start){
_a96.end+=7;
if(day<_a96.start){
day+=7;
}
}
return day>=_a96.start&&day<=_a96.end;
};
dojo.provide("dojo.i18n.common");
dojo.i18n.getLocalization=function(_a98,_a99,_a9a){
dojo.hostenv.preloadLocalizations();
_a9a=dojo.hostenv.normalizeLocale(_a9a);
var _a9b=_a9a.split("-");
var _a9c=[_a98,"nls",_a99].join(".");
var _a9d=dojo.hostenv.findModule(_a9c,true);
var _a9e;
for(var i=_a9b.length;i>0;i--){
var loc=_a9b.slice(0,i).join("_");
if(_a9d[loc]){
_a9e=_a9d[loc];
break;
}
}
if(!_a9e){
_a9e=_a9d.ROOT;
}
if(_a9e){
var _aa1=function(){
};
_aa1.prototype=_a9e;
return new _aa1();
}
dojo.raise("Bundle not found: "+_a99+" in "+_a98+" , locale="+_a9a);
};
dojo.i18n.isLTR=function(_aa2){
var lang=dojo.hostenv.normalizeLocale(_aa2).split("-")[0];
var RTL={ar:true,fa:true,he:true,ur:true,yi:true};
return !RTL[lang];
};
dojo.provide("dojo.date.format");
(function(){
dojo.date.format=function(_aa5,_aa6){
if(typeof _aa6=="string"){
dojo.deprecated("dojo.date.format","To format dates with POSIX-style strings, please use dojo.date.strftime instead","0.5");
return dojo.date.strftime(_aa5,_aa6);
}
function formatPattern(_aa7,_aa8){
return _aa8.replace(/[a-zA-Z]+/g,function(_aa9){
var s;
var c=_aa9.charAt(0);
var l=_aa9.length;
var pad;
var _aae=["abbr","wide","narrow"];
switch(c){
case "G":
if(l>3){
dojo.unimplemented("Era format not implemented");
}
s=info.eras[_aa7.getFullYear()<0?1:0];
break;
case "y":
s=_aa7.getFullYear();
switch(l){
case 1:
break;
case 2:
s=String(s).substr(-2);
break;
default:
pad=true;
}
break;
case "Q":
case "q":
s=Math.ceil((_aa7.getMonth()+1)/3);
switch(l){
case 1:
case 2:
pad=true;
break;
case 3:
case 4:
dojo.unimplemented("Quarter format not implemented");
}
break;
case "M":
case "L":
var m=_aa7.getMonth();
var _ab1;
switch(l){
case 1:
case 2:
s=m+1;
pad=true;
break;
case 3:
case 4:
case 5:
_ab1=_aae[l-3];
break;
}
if(_ab1){
var type=(c=="L")?"standalone":"format";
var prop=["months",type,_ab1].join("-");
s=info[prop][m];
}
break;
case "w":
var _ab4=0;
s=dojo.date.getWeekOfYear(_aa7,_ab4);
pad=true;
break;
case "d":
s=_aa7.getDate();
pad=true;
break;
case "D":
s=dojo.date.getDayOfYear(_aa7);
pad=true;
break;
case "E":
case "e":
case "c":
var d=_aa7.getDay();
var _ab1;
switch(l){
case 1:
case 2:
if(c=="e"){
var _ab6=dojo.date.getFirstDayOfWeek(_aa6.locale);
d=(d-_ab6+7)%7;
}
if(c!="c"){
s=d+1;
pad=true;
break;
}
case 3:
case 4:
case 5:
_ab1=_aae[l-3];
break;
}
if(_ab1){
var type=(c=="c")?"standalone":"format";
var prop=["days",type,_ab1].join("-");
s=info[prop][d];
}
break;
case "a":
var _ab7=(_aa7.getHours()<12)?"am":"pm";
s=info[_ab7];
break;
case "h":
case "H":
case "K":
case "k":
var h=_aa7.getHours();
switch(c){
case "h":
s=(h%12)||12;
break;
case "H":
s=h;
break;
case "K":
s=(h%12);
break;
case "k":
s=h||24;
break;
}
pad=true;
break;
case "m":
s=_aa7.getMinutes();
pad=true;
break;
case "s":
s=_aa7.getSeconds();
pad=true;
break;
case "S":
s=Math.round(_aa7.getMilliseconds()*Math.pow(10,l-3));
break;
case "v":
case "z":
s=dojo.date.getTimezoneName(_aa7);
if(s){
break;
}
l=4;
case "Z":
var _ab9=_aa7.getTimezoneOffset();
var tz=[(_ab9<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_ab9)/60),2),dojo.string.pad(Math.abs(_ab9)%60,2)];
if(l==4){
tz.splice(0,0,"GMT");
tz.splice(3,0,":");
}
s=tz.join("");
break;
case "Y":
case "u":
case "W":
case "F":
case "g":
case "A":
dojo.debug(_aa9+" modifier not yet implemented");
s="?";
break;
default:
dojo.raise("dojo.date.format: invalid pattern char: "+_aa8);
}
if(pad){
s=dojo.string.pad(s,l);
}
return s;
});
}
_aa6=_aa6||{};
var _abb=dojo.hostenv.normalizeLocale(_aa6.locale);
var _abc=_aa6.formatLength||"full";
var info=dojo.date._getGregorianBundle(_abb);
var str=[];
var _abe=dojo.lang.curry(this,formatPattern,_aa5);
if(_aa6.selector!="timeOnly"){
var _abf=_aa6.datePattern||info["dateFormat-"+_abc];
if(_abf){
str.push(_processPattern(_abf,_abe));
}
}
if(_aa6.selector!="dateOnly"){
var _ac0=_aa6.timePattern||info["timeFormat-"+_abc];
if(_ac0){
str.push(_processPattern(_ac0,_abe));
}
}
var _ac1=str.join(" ");
return _ac1;
};
dojo.date.parse=function(_ac2,_ac3){
_ac3=_ac3||{};
var _ac4=dojo.hostenv.normalizeLocale(_ac3.locale);
var info=dojo.date._getGregorianBundle(_ac4);
var _ac6=_ac3.formatLength||"full";
if(!_ac3.selector){
_ac3.selector="dateOnly";
}
var _ac7=_ac3.datePattern||info["dateFormat-"+_ac6];
var _ac8=_ac3.timePattern||info["timeFormat-"+_ac6];
var _ac9;
if(_ac3.selector=="dateOnly"){
_ac9=_ac7;
}else{
if(_ac3.selector=="timeOnly"){
_ac9=_ac8;
}else{
if(_ac3.selector=="dateTime"){
_ac9=_ac7+" "+_ac8;
}else{
var msg="dojo.date.parse: Unknown selector param passed: '"+_ac3.selector+"'.";
msg+=" Defaulting to date pattern.";
dojo.debug(msg);
_ac9=_ac7;
}
}
}
var _acb=[];
var _acc=_processPattern(_ac9,dojo.lang.curry(this,_buildDateTimeRE,_acb,info,_ac3));
var _acd=new RegExp("^"+_acc+"$");
var _ace=_acd.exec(_ac2);
if(!_ace){
return null;
}
var _acf=["abbr","wide","narrow"];
var _ad0=new Date(1972,0);
var _ad1={};
for(var i=1;i<_ace.length;i++){
var grp=_acb[i-1];
var l=grp.length;
var v=_ace[i];
switch(grp.charAt(0)){
case "y":
if(l!=2){
_ad0.setFullYear(v);
_ad1.year=v;
}else{
if(v<100){
v=Number(v);
var year=""+new Date().getFullYear();
var _ad7=year.substring(0,2)*100;
var _ad8=Number(year.substring(2,4));
var _ad9=Math.min(_ad8+20,99);
var num=(v<_ad9)?_ad7+v:_ad7-100+v;
_ad0.setFullYear(num);
_ad1.year=num;
}else{
if(_ac3.strict){
return null;
}
_ad0.setFullYear(v);
_ad1.year=v;
}
}
break;
case "M":
if(l>2){
if(!_ac3.strict){
v=v.replace(/\./g,"");
v=v.toLowerCase();
}
var _adb=info["months-format-"+_acf[l-3]].concat();
for(var j=0;j<_adb.length;j++){
if(!_ac3.strict){
_adb[j]=_adb[j].toLowerCase();
}
if(v==_adb[j]){
_ad0.setMonth(j);
_ad1.month=j;
break;
}
}
if(j==_adb.length){
dojo.debug("dojo.date.parse: Could not parse month name: '"+v+"'.");
return null;
}
}else{
_ad0.setMonth(v-1);
_ad1.month=v-1;
}
break;
case "E":
case "e":
if(!_ac3.strict){
v=v.toLowerCase();
}
var days=info["days-format-"+_acf[l-3]].concat();
for(var j=0;j<days.length;j++){
if(!_ac3.strict){
days[j]=days[j].toLowerCase();
}
if(v==days[j]){
break;
}
}
if(j==days.length){
dojo.debug("dojo.date.parse: Could not parse weekday name: '"+v+"'.");
return null;
}
break;
case "d":
_ad0.setDate(v);
_ad1.date=v;
break;
case "a":
var am=_ac3.am||info.am;
var pm=_ac3.pm||info.pm;
if(!_ac3.strict){
v=v.replace(/\./g,"").toLowerCase();
am=am.replace(/\./g,"").toLowerCase();
pm=pm.replace(/\./g,"").toLowerCase();
}
if(_ac3.strict&&v!=am&&v!=pm){
dojo.debug("dojo.date.parse: Could not parse am/pm part.");
return null;
}
var _ae0=_ad0.getHours();
if(v==pm&&_ae0<12){
_ad0.setHours(_ae0+12);
}else{
if(v==am&&_ae0==12){
_ad0.setHours(0);
}
}
break;
case "K":
if(v==24){
v=0;
}
case "h":
case "H":
case "k":
if(v>23){
dojo.debug("dojo.date.parse: Illegal hours value");
return null;
}
_ad0.setHours(v);
break;
case "m":
_ad0.setMinutes(v);
break;
case "s":
_ad0.setSeconds(v);
break;
case "S":
_ad0.setMilliseconds(v);
break;
default:
dojo.unimplemented("dojo.date.parse: unsupported pattern char="+grp.charAt(0));
}
}
if(_ad1.year&&_ad0.getFullYear()!=_ad1.year){
dojo.debug("Parsed year: '"+_ad0.getFullYear()+"' did not match input year: '"+_ad1.year+"'.");
return null;
}
if(_ad1.month&&_ad0.getMonth()!=_ad1.month){
dojo.debug("Parsed month: '"+_ad0.getMonth()+"' did not match input month: '"+_ad1.month+"'.");
return null;
}
if(_ad1.date&&_ad0.getDate()!=_ad1.date){
dojo.debug("Parsed day of month: '"+_ad0.getDate()+"' did not match input day of month: '"+_ad1.date+"'.");
return null;
}
return _ad0;
};
function _processPattern(_ae1,_ae2,_ae3,_ae4){
var _ae5=function(x){
return x;
};
_ae2=_ae2||_ae5;
_ae3=_ae3||_ae5;
_ae4=_ae4||_ae5;
var _ae7=_ae1.match(/(''|[^'])+/g);
var _ae8=false;
for(var i=0;i<_ae7.length;i++){
if(!_ae7[i]){
_ae7[i]="";
}else{
_ae7[i]=(_ae8?_ae3:_ae2)(_ae7[i]);
_ae8=!_ae8;
}
}
return _ae4(_ae7.join(""));
}
function _buildDateTimeRE(_aea,info,_aec,_aed){
return _aed.replace(/[a-zA-Z]+/g,function(_aee){
var s;
var c=_aee.charAt(0);
var l=_aee.length;
switch(c){
case "y":
s="\\d"+((l==2)?"{2,4}":"+");
break;
case "M":
s=(l>2)?"\\S+":"\\d{1,2}";
break;
case "d":
s="\\d{1,2}";
break;
case "E":
s="\\S+";
break;
case "h":
case "H":
case "K":
case "k":
s="\\d{1,2}";
break;
case "m":
case "s":
s="[0-5]\\d";
break;
case "S":
s="\\d{1,3}";
break;
case "a":
var am=_aec.am||info.am||"AM";
var pm=_aec.pm||info.pm||"PM";
if(_aec.strict){
s=am+"|"+pm;
}else{
s=am;
s+=(am!=am.toLowerCase())?"|"+am.toLowerCase():"";
s+="|";
s+=(pm!=pm.toLowerCase())?pm+"|"+pm.toLowerCase():pm;
}
break;
default:
dojo.unimplemented("parse of date format, pattern="+_aed);
}
if(_aea){
_aea.push(_aee);
}
return "\\s*("+s+")\\s*";
});
}
})();
dojo.date.strftime=function(_af4,_af5,_af6){
var _af7=null;
function _(s,n){
return dojo.string.pad(s,n||2,_af7||"0");
}
var info=dojo.date._getGregorianBundle(_af6);
function $(_afb){
switch(_afb){
case "a":
return dojo.date.getDayShortName(_af4,_af6);
case "A":
return dojo.date.getDayName(_af4,_af6);
case "b":
case "h":
return dojo.date.getMonthShortName(_af4,_af6);
case "B":
return dojo.date.getMonthName(_af4,_af6);
case "c":
return dojo.date.format(_af4,{locale:_af6});
case "C":
return _(Math.floor(_af4.getFullYear()/100));
case "d":
return _(_af4.getDate());
case "D":
return $("m")+"/"+$("d")+"/"+$("y");
case "e":
if(_af7==null){
_af7=" ";
}
return _(_af4.getDate());
case "f":
if(_af7==null){
_af7=" ";
}
return _(_af4.getMonth()+1);
case "g":
break;
case "G":
dojo.unimplemented("unimplemented modifier 'G'");
break;
case "F":
return $("Y")+"-"+$("m")+"-"+$("d");
case "H":
return _(_af4.getHours());
case "I":
return _(_af4.getHours()%12||12);
case "j":
return _(dojo.date.getDayOfYear(_af4),3);
case "k":
if(_af7==null){
_af7=" ";
}
return _(_af4.getHours());
case "l":
if(_af7==null){
_af7=" ";
}
return _(_af4.getHours()%12||12);
case "m":
return _(_af4.getMonth()+1);
case "M":
return _(_af4.getMinutes());
case "n":
return "\n";
case "p":
return info[_af4.getHours()<12?"am":"pm"];
case "r":
return $("I")+":"+$("M")+":"+$("S")+" "+$("p");
case "R":
return $("H")+":"+$("M");
case "S":
return _(_af4.getSeconds());
case "t":
return "\t";
case "T":
return $("H")+":"+$("M")+":"+$("S");
case "u":
return String(_af4.getDay()||7);
case "U":
return _(dojo.date.getWeekOfYear(_af4));
case "V":
return _(dojo.date.getIsoWeekOfYear(_af4));
case "W":
return _(dojo.date.getWeekOfYear(_af4,1));
case "w":
return String(_af4.getDay());
case "x":
return dojo.date.format(_af4,{selector:"dateOnly",locale:_af6});
case "X":
return dojo.date.format(_af4,{selector:"timeOnly",locale:_af6});
case "y":
return _(_af4.getFullYear()%100);
case "Y":
return String(_af4.getFullYear());
case "z":
var _afc=_af4.getTimezoneOffset();
return (_afc>0?"-":"+")+_(Math.floor(Math.abs(_afc)/60))+":"+_(Math.abs(_afc)%60);
case "Z":
return dojo.date.getTimezoneName(_af4);
case "%":
return "%";
}
}
var _afd="";
var i=0;
var _aff=0;
var _b00=null;
while((_aff=_af5.indexOf("%",i))!=-1){
_afd+=_af5.substring(i,_aff++);
switch(_af5.charAt(_aff++)){
case "_":
_af7=" ";
break;
case "-":
_af7="";
break;
case "0":
_af7="0";
break;
case "^":
_b00="upper";
break;
case "*":
_b00="lower";
break;
case "#":
_b00="swap";
break;
default:
_af7=null;
_aff--;
break;
}
var _b01=$(_af5.charAt(_aff++));
switch(_b00){
case "upper":
_b01=_b01.toUpperCase();
break;
case "lower":
_b01=_b01.toLowerCase();
break;
case "swap":
var _b02=_b01.toLowerCase();
var _b03="";
var j=0;
var ch="";
while(j<_b01.length){
ch=_b01.charAt(j);
_b03+=(ch==_b02.charAt(j))?ch.toUpperCase():ch.toLowerCase();
j++;
}
_b01=_b03;
break;
default:
break;
}
_b00=null;
_afd+=_b01;
i=_aff;
}
_afd+=_af5.substring(i);
return _afd;
};
(function(){
var _b06=[];
dojo.date.addCustomFormats=function(_b07,_b08){
_b06.push({pkg:_b07,name:_b08});
};
dojo.date._getGregorianBundle=function(_b09){
var _b0a={};
dojo.lang.forEach(_b06,function(desc){
var _b0c=dojo.i18n.getLocalization(desc.pkg,desc.name,_b09);
_b0a=dojo.lang.mixin(_b0a,_b0c);
},this);
return _b0a;
};
})();
dojo.date.addCustomFormats("dojo.i18n.calendar","gregorian");
dojo.date.addCustomFormats("dojo.i18n.calendar","gregorianExtras");
dojo.date.getNames=function(item,type,use,_b10){
var _b11;
var _b12=dojo.date._getGregorianBundle(_b10);
var _b13=[item,use,type];
if(use=="standAlone"){
_b11=_b12[_b13.join("-")];
}
_b13[1]="format";
return (_b11||_b12[_b13.join("-")]).concat();
};
dojo.date.getDayName=function(_b14,_b15){
return dojo.date.getNames("days","wide","format",_b15)[_b14.getDay()];
};
dojo.date.getDayShortName=function(_b16,_b17){
return dojo.date.getNames("days","abbr","format",_b17)[_b16.getDay()];
};
dojo.date.getMonthName=function(_b18,_b19){
return dojo.date.getNames("months","wide","format",_b19)[_b18.getMonth()];
};
dojo.date.getMonthShortName=function(_b1a,_b1b){
return dojo.date.getNames("months","abbr","format",_b1b)[_b1a.getMonth()];
};
dojo.date.toRelativeString=function(_b1c){
var now=new Date();
var diff=(now-_b1c)/1000;
var end=" ago";
var _b20=false;
if(diff<0){
_b20=true;
end=" from now";
diff=-diff;
}
if(diff<60){
diff=Math.round(diff);
return diff+" second"+(diff==1?"":"s")+end;
}
if(diff<60*60){
diff=Math.round(diff/60);
return diff+" minute"+(diff==1?"":"s")+end;
}
if(diff<60*60*24){
diff=Math.round(diff/3600);
return diff+" hour"+(diff==1?"":"s")+end;
}
if(diff<60*60*24*7){
diff=Math.round(diff/(3600*24));
if(diff==1){
return _b20?"Tomorrow":"Yesterday";
}else{
return diff+" days"+end;
}
}
return dojo.date.format(_b1c);
};
dojo.date.toSql=function(_b21,_b22){
return dojo.date.strftime(_b21,"%F"+!_b22?" %T":"");
};
dojo.date.fromSql=function(_b23){
var _b24=_b23.split(/[\- :]/g);
while(_b24.length<6){
_b24.push(0);
}
return new Date(_b24[0],(parseInt(_b24[1],10)-1),_b24[2],_b24[3],_b24[4],_b24[5]);
};
dojo.provide("dojo.widget.TimePicker");
dojo.widget.defineWidget("dojo.widget.TimePicker",dojo.widget.HtmlWidget,function(){
this.time="";
this.useDefaultTime=false;
this.useDefaultMinutes=false;
this.storedTime="";
this.currentTime={};
this.classNames={selectedTime:"selectedItem"};
this.any="any";
this.selectedTime={hour:"",minute:"",amPm:"",anyTime:false};
this.hourIndexMap=["",2,4,6,8,10,1,3,5,7,9,11,0];
this.minuteIndexMap=[0,2,4,6,8,10,1,3,5,7,9,11];
},{isContainer:false,templateString:"<div class=\"timePickerContainer\" dojoAttachPoint=\"timePickerContainerNode\">\n	<table class=\"timeContainer\" cellspacing=\"0\" >\n		<thead>\n			<tr>\n				<td class=\"timeCorner cornerTopLeft\" valign=\"top\">&nbsp;</td>\n				<td class=\"timeLabelContainer hourSelector\">${this.calendar.field-hour}</td>\n				<td class=\"timeLabelContainer minutesHeading\">${this.calendar.field-minute}</td>\n				<td class=\"timeCorner cornerTopRight\" valign=\"top\">&nbsp;</td>\n			</tr>\n		</thead>\n		<tbody>\n			<tr>\n				<td valign=\"top\" colspan=\"2\" class=\"hours\">\n					<table align=\"center\">\n						<tbody dojoAttachPoint=\"hourContainerNode\"  \n							dojoAttachEvent=\"onClick: onSetSelectedHour;\">\n							<tr>\n								<td>12</td>\n								<td>6</td>\n							</tr>\n							<tr>\n								<td>1</td>\n								<td>7</td>\n							</tr>\n							<tr>\n								<td>2</td>\n								<td>8</td>\n							</tr>\n							<tr>\n								<td>3</td>\n								<td>9</td>\n							</tr>\n							<tr>\n								<td>4</td>\n								<td>10</td>\n							</tr>\n							<tr>\n								<td>5</td>\n								<td>11</td>\n							</tr>\n						</tbody>\n					</table>\n				</td>\n				<td valign=\"top\" class=\"minutes\" colspan=\"2\">\n					<table align=\"center\">\n						<tbody dojoAttachPoint=\"minuteContainerNode\" \n							dojoAttachEvent=\"onClick: onSetSelectedMinute;\">\n							<tr>\n								<td>00</td>\n								<td>30</td>\n							</tr>\n							<tr>\n								<td>05</td>\n								<td>35</td>\n							</tr>\n							<tr>\n								<td>10</td>\n								<td>40</td>\n							</tr>\n							<tr>\n								<td>15</td>\n								<td>45</td>\n							</tr>\n							<tr>\n								<td>20</td>\n								<td>50</td>\n							</tr>\n							<tr>\n								<td>25</td>\n								<td>55</td>\n							</tr>\n						</tbody>\n					</table>\n				</td>\n			</tr>\n			<tr>\n				<td class=\"cornerBottomLeft\">&nbsp;</td>\n				<td valign=\"top\" class=\"timeOptions\">\n					<table class=\"amPmContainer\">\n						<tbody dojoAttachPoint=\"amPmContainerNode\" \n							dojoAttachEvent=\"onClick: onSetSelectedAmPm;\">\n							<tr>\n								<td id=\"am\">${this.calendar.am}</td>\n								<td id=\"pm\">${this.calendar.pm}</td>\n							</tr>\n						</tbody>\n					</table>\n				</td>\n				<td class=\"timeOptions\">\n					<div dojoAttachPoint=\"anyTimeContainerNode\" \n						dojoAttachEvent=\"onClick: onSetSelectedAnyTime;\" \n						class=\"anyTimeContainer\">${this.widgetStrings.any}</div>\n				</td>\n				<td class=\"cornerBottomRight\">&nbsp;</td>\n			</tr>\n		</tbody>\n	</table>\n</div>\n",templateCssString:"/*Time Picker */\n.timePickerContainer {\n	width:122px;\n	font-family:Tahoma, Myriad, Helvetica, Arial, Verdana, sans-serif;\n	font-size:16px;\n}\n\n.timeContainer {\n	border-collapse:collapse;\n	border-spacing:0;\n}\n\n.timeContainer thead {\n	color:#293a4b;\n	font-size:0.9em;\n	font-weight:700;\n}\n\n.timeContainer thead td {\n	padding:0.25em;\n	font-size:0.80em;\n	border-bottom:1px solid #6782A8;\n}\n\n.timeCorner {\n	width:10px;\n}\n\n.cornerTopLeft {\n	background: url(\"images/dpCurveTL.png\") top left no-repeat;\n}\n\n.cornerTopRight {\n	background: url(\"images/dpCurveTR.png\") top right no-repeat;\n}\n\n.timeLabelContainer {\n	background: url(\"images/dpMonthBg.png\") top left repeat-x;\n}\n\n.hours, .minutes, .timeBorder {\n	background: #7591bc url(\"images/dpBg.gif\") top left repeat-x;\n\n}\n\n.hours td, .minutes td {\n	padding:0.2em;\n	text-align:center;\n	font-size:0.7em;\n	font-weight:bold;\n	cursor:pointer;\n	cursor:hand;\n	color:#fff;\n}\n\n.minutes {\n	border-left:1px solid #f5d1db;\n}\n\n.hours {\n	border-right:1px solid #6782A8;\n}\n\n.hourSelector {\n	border-right:1px solid #6782A8;\n	padding:5px;\n	padding-right:10px;\n}\n\n.minutesSelector {\n	padding:5px;\n	border-left:1px solid #f5c7d4;\n	text-align:center;\n}\n\n.minutesHeading {\n	padding-left:9px !important;\n}\n\n.timeOptions {\n	background-color:#F9C9D7;\n}\n\n.timeContainer .cornerBottomLeft, .timeContainer .cornerBottomRight, .timeContainer .timeOptions {\n	border-top:1px solid #6782A8;\n}\n\n.timeContainer .cornerBottomLeft {\n	background: url(\"images/dpCurveBL.png\") bottom left no-repeat !important;\n	width:9px !important;\n	padding:0;\n	margin:0;\n}\n\n.timeContainer .cornerBottomRight {\n	background: url(\"images/dpCurveBR.png\") bottom right no-repeat !important;\n	width:9px !important;\n	padding:0;\n	margin:0;\n}\n\n.timeOptions {\n	color:#fff;\n	background:url(\"images/dpYearBg.png\") top left repeat-x;\n\n}\n\n.selectedItem {\n	background-color:#fff;\n	color:#6782a8 !important;\n}\n\n.timeOptions .selectedItem {\n	color:#fff !important;\n	background-color:#9ec3fb !important;\n}\n\n.anyTimeContainer {\n	text-align:center;\n	font-weight:bold;\n	font-size:0.7em;\n	padding:0.1em;\n	cursor:pointer;\n	cursor:hand;\n	color:#fff !important;\n}\n\n.amPmContainer {\n	width:100%;\n}\n\n.amPmContainer td {\n	text-align:center;\n	font-size:0.7em;\n	font-weight:bold;\n	cursor:pointer;\n	cursor:hand;\n	color:#fff;\n}\n\n\n\n/*.timePickerContainer {\n	margin:1.75em 0 0.5em 0;\n	width:10em;\n	float:left;\n}\n\n.timeContainer {\n	border-collapse:collapse;\n	border-spacing:0;\n}\n\n.timeContainer thead td{\n	border-bottom:1px solid #e6e6e6;\n	padding:0 0.4em 0.2em 0.4em;\n}\n\n.timeContainer td {\n	font-size:0.9em;\n	padding:0 0.25em 0 0.25em;\n	text-align:left;\n	cursor:pointer;cursor:hand;\n}\n\n.timeContainer td.minutesHeading {\n	border-left:1px solid #e6e6e6;\n	border-right:1px solid #e6e6e6;	\n}\n\n.timeContainer .minutes {\n	border-left:1px solid #e6e6e6;\n	border-right:1px solid #e6e6e6;\n}\n\n.selectedItem {\n	background-color:#3a3a3a;\n	color:#ffffff;\n}*/\n",templateCssPath:dojo.uri.dojoUri("src/widget/templates/TimePicker.css"),fillInTemplate:function(args,frag){
var _b27=this.getFragNodeRef(frag);
dojo.html.copyStyle(this.domNode,_b27);
this.initData();
this.initUI();
},postMixInProperties:function(_b28,frag){
dojo.widget.TimePicker.superclass.postMixInProperties.apply(this,arguments);
this.calendar=dojo.i18n.getLocalization("dojo.i18n.calendar","gregorian",this.lang);
this.widgetStrings=dojo.i18n.getLocalization("dojo.widget","TimePicker",this.lang);
},initData:function(){
if(this.storedTime.indexOf("T")!=-1&&this.storedTime.split("T")[1]&&this.storedTime!=" "&&this.storedTime.split("T")[1]!="any"){
this.time=dojo.widget.TimePicker.util.fromRfcDateTime(this.storedTime,this.useDefaultMinutes,this.selectedTime.anyTime);
}else{
if(this.useDefaultTime){
this.time=dojo.widget.TimePicker.util.fromRfcDateTime("",this.useDefaultMinutes,this.selectedTime.anyTime);
}else{
this.selectedTime.anyTime=true;
this.time=dojo.widget.TimePicker.util.fromRfcDateTime("",0,1);
}
}
},initUI:function(){
if(!this.selectedTime.anyTime&&this.time){
var _b2a=dojo.widget.TimePicker.util.toAmPmHour(this.time.getHours());
var hour=_b2a[0];
var isAm=_b2a[1];
var _b2d=this.time.getMinutes();
var _b2e=parseInt(_b2d/5);
this.onSetSelectedHour(this.hourIndexMap[hour]);
this.onSetSelectedMinute(this.minuteIndexMap[_b2e]);
this.onSetSelectedAmPm(isAm);
}else{
this.onSetSelectedAnyTime();
}
},setTime:function(date){
if(date){
this.selectedTime.anyTime=false;
this.setDateTime(dojo.date.toRfc3339(date));
}else{
this.selectedTime.anyTime=true;
}
this.initData();
this.initUI();
},setDateTime:function(_b30){
this.storedTime=_b30;
},onClearSelectedHour:function(evt){
this.clearSelectedHour();
},onClearSelectedMinute:function(evt){
this.clearSelectedMinute();
},onClearSelectedAmPm:function(evt){
this.clearSelectedAmPm();
},onClearSelectedAnyTime:function(evt){
this.clearSelectedAnyTime();
if(this.selectedTime.anyTime){
this.selectedTime.anyTime=false;
this.time=dojo.widget.TimePicker.util.fromRfcDateTime("",this.useDefaultMinutes);
this.initUI();
}
},clearSelectedHour:function(){
var _b35=this.hourContainerNode.getElementsByTagName("td");
for(var i=0;i<_b35.length;i++){
dojo.html.setClass(_b35.item(i),"");
}
},clearSelectedMinute:function(){
var _b37=this.minuteContainerNode.getElementsByTagName("td");
for(var i=0;i<_b37.length;i++){
dojo.html.setClass(_b37.item(i),"");
}
},clearSelectedAmPm:function(){
var _b39=this.amPmContainerNode.getElementsByTagName("td");
for(var i=0;i<_b39.length;i++){
dojo.html.setClass(_b39.item(i),"");
}
},clearSelectedAnyTime:function(){
dojo.html.setClass(this.anyTimeContainerNode,"anyTimeContainer");
},onSetSelectedHour:function(evt){
this.onClearSelectedAnyTime();
this.onClearSelectedHour();
this.setSelectedHour(evt);
this.onSetTime();
},setSelectedHour:function(evt){
if(evt&&evt.target){
if(evt.target.nodeType==dojo.dom.ELEMENT_NODE){
var _b3d=evt.target;
}else{
var _b3d=evt.target.parentNode;
}
dojo.event.browser.stopEvent(evt);
dojo.html.setClass(_b3d,this.classNames.selectedTime);
this.selectedTime["hour"]=_b3d.innerHTML;
}else{
if(!isNaN(evt)){
var _b3e=this.hourContainerNode.getElementsByTagName("td");
if(_b3e.item(evt)){
dojo.html.setClass(_b3e.item(evt),this.classNames.selectedTime);
this.selectedTime["hour"]=_b3e.item(evt).innerHTML;
}
}
}
this.selectedTime.anyTime=false;
},onSetSelectedMinute:function(evt){
this.onClearSelectedAnyTime();
this.onClearSelectedMinute();
this.setSelectedMinute(evt);
this.selectedTime.anyTime=false;
this.onSetTime();
},setSelectedMinute:function(evt){
if(evt&&evt.target){
if(evt.target.nodeType==dojo.dom.ELEMENT_NODE){
var _b41=evt.target;
}else{
var _b41=evt.target.parentNode;
}
dojo.event.browser.stopEvent(evt);
dojo.html.setClass(_b41,this.classNames.selectedTime);
this.selectedTime["minute"]=_b41.innerHTML;
}else{
if(!isNaN(evt)){
var _b42=this.minuteContainerNode.getElementsByTagName("td");
if(_b42.item(evt)){
dojo.html.setClass(_b42.item(evt),this.classNames.selectedTime);
this.selectedTime["minute"]=_b42.item(evt).innerHTML;
}
}
}
},onSetSelectedAmPm:function(evt){
this.onClearSelectedAnyTime();
this.onClearSelectedAmPm();
this.setSelectedAmPm(evt);
this.selectedTime.anyTime=false;
this.onSetTime();
},setSelectedAmPm:function(evt){
var _b45=evt.target;
if(evt&&_b45){
if(_b45.nodeType!=dojo.dom.ELEMENT_NODE){
_b45=_b45.parentNode;
}
dojo.event.browser.stopEvent(evt);
this.selectedTime.amPm=_b45.id;
dojo.html.setClass(_b45,this.classNames.selectedTime);
}else{
evt=evt?0:1;
var _b46=this.amPmContainerNode.getElementsByTagName("td");
if(_b46.item(evt)){
this.selectedTime.amPm=_b46.item(evt).id;
dojo.html.setClass(_b46.item(evt),this.classNames.selectedTime);
}
}
},onSetSelectedAnyTime:function(evt){
this.onClearSelectedHour();
this.onClearSelectedMinute();
this.onClearSelectedAmPm();
this.setSelectedAnyTime();
this.onSetTime();
},setSelectedAnyTime:function(evt){
this.selectedTime.anyTime=true;
dojo.html.setClass(this.anyTimeContainerNode,this.classNames.selectedTime+" "+"anyTimeContainer");
},onClick:function(evt){
dojo.event.browser.stopEvent(evt);
},onSetTime:function(){
if(this.selectedTime.anyTime){
this.time=new Date();
var _b4a=dojo.widget.TimePicker.util.toRfcDateTime(this.time);
this.setDateTime(_b4a.split("T")[0]);
}else{
var hour=12;
var _b4c=0;
var isAm=false;
if(this.selectedTime["hour"]){
hour=parseInt(this.selectedTime["hour"],10);
}
if(this.selectedTime["minute"]){
_b4c=parseInt(this.selectedTime["minute"],10);
}
if(this.selectedTime["amPm"]){
isAm=(this.selectedTime["amPm"].toLowerCase()=="am");
}
this.time=new Date();
this.time.setHours(dojo.widget.TimePicker.util.fromAmPmHour(hour,isAm));
this.time.setMinutes(_b4c);
this.setDateTime(dojo.widget.TimePicker.util.toRfcDateTime(this.time));
}
}});
dojo.widget.TimePicker.util=new function(){
this.toRfcDateTime=function(_b4e){
if(!_b4e){
_b4e=new Date();
}
_b4e.setSeconds(0);
return dojo.date.strftime(_b4e,"%Y-%m-%dT%H:%M:00%z");
};
this.fromRfcDateTime=function(_b4f,_b50,_b51){
var _b52=new Date();
if(!_b4f||_b4f.indexOf("T")==-1){
if(_b50){
_b52.setMinutes(Math.floor(_b52.getMinutes()/5)*5);
}else{
_b52.setMinutes(0);
}
}else{
var _b53=_b4f.split("T")[1].split(":");
var _b52=new Date();
_b52.setHours(_b53[0]);
_b52.setMinutes(_b53[1]);
}
return _b52;
};
this.toAmPmHour=function(hour){
var _b55=hour;
var isAm=true;
if(_b55==0){
_b55=12;
}else{
if(_b55>12){
_b55=_b55-12;
isAm=false;
}else{
if(_b55==12){
isAm=false;
}
}
}
return [_b55,isAm];
};
this.fromAmPmHour=function(_b57,isAm){
var hour=parseInt(_b57,10);
if(isAm&&hour==12){
hour=0;
}else{
if(!isAm&&hour<12){
hour=hour+12;
}
}
return hour;
};
};
dojo.provide("dojo.widget.DropdownTimePicker");
dojo.widget.defineWidget("dojo.widget.DropdownTimePicker",dojo.widget.DropdownContainer,{iconURL:dojo.uri.dojoUri("src/widget/templates/images/timeIcon.gif"),zIndex:"10",displayFormat:"",timeFormat:"",formatLength:"short",value:"",postMixInProperties:function(){
dojo.widget.DropdownTimePicker.superclass.postMixInProperties.apply(this,arguments);
var _b5a=dojo.i18n.getLocalization("dojo.widget","DropdownTimePicker",this.lang);
this.iconAlt=_b5a.selectTime;
},fillInTemplate:function(){
dojo.widget.DropdownTimePicker.superclass.fillInTemplate.apply(this,arguments);
var _b5b={widgetContainerId:this.widgetId,lang:this.lang};
this.timePicker=dojo.widget.createWidget("TimePicker",_b5b,this.containerNode,"child");
dojo.event.connect(this.timePicker,"onSetTime",this,"onSetTime");
dojo.event.connect(this.inputNode,"onchange",this,"onInputChange");
this.containerNode.style.zIndex=this.zIndex;
this.containerNode.explodeClassName="timeBorder";
if(this.value){
this.timePicker.selectedTime.anyTime=false;
this.timePicker.setDateTime("2005-01-01T"+this.value);
this.timePicker.initData();
this.timePicker.initUI();
this.onSetTime();
}
},onSetTime:function(){
if(this.timePicker.selectedTime.anyTime){
this.inputNode.value="";
}else{
if(this.timeFormat){
dojo.deprecated("dojo.widget.DropdownTimePicker","Must use displayFormat attribute instead of timeFormat.  See dojo.date.format for specification.","0.5");
this.inputNode.value=dojo.date.strftime(this.timePicker.time,this.timeFormat,this.lang);
}else{
this.inputNode.value=dojo.date.format(this.timePicker.time,{formatLength:this.formatLength,datePattern:this.displayFormat,selector:"timeOnly",locale:this.lang});
}
}
this.hideContainer();
},onInputChange:function(){
this.timePicker.time="2005-01-01T"+this.inputNode.value;
this.timePicker.setDateTime(this.timePicker.time);
this.timePicker.initData();
this.timePicker.initUI();
},enable:function(){
this.inputNode.disabled=false;
this.timePicker.enable();
dojo.widget.DropdownTimePicker.superclass.enable.apply(this,arguments);
},disable:function(){
this.inputNode.disabled=true;
this.timePicker.disable();
dojo.widget.DropdownTimePicker.superclass.disable.apply(this,arguments);
}});
dojo.provide("dojo.widget.DatePicker");
dojo.widget.defineWidget("dojo.widget.DatePicker",dojo.widget.HtmlWidget,{value:"",name:"",displayWeeks:6,adjustWeeks:false,startDate:"1492-10-12",endDate:"2941-10-12",weekStartsOn:"",storedDate:"",staticDisplay:false,dayWidth:"narrow",classNames:{previous:"previousMonth",disabledPrevious:"previousMonthDisabled",current:"currentMonth",disabledCurrent:"currentMonthDisabled",next:"nextMonth",disabledNext:"nextMonthDisabled",currentDate:"currentDate",selectedDate:"selectedItem"},templateString:"<div class=\"datePickerContainer\" dojoAttachPoint=\"datePickerContainerNode\">\n	<table cellspacing=\"0\" cellpadding=\"0\" class=\"calendarContainer\">\n		<thead>\n			<tr>\n				<td class=\"monthWrapper\" valign=\"top\">\n					<table class=\"monthContainer\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n						<tr>\n							<td class=\"monthCurve monthCurveTL\" valign=\"top\"></td>\n							<td class=\"monthLabelContainer\" valign=\"top\">\n								<span dojoAttachPoint=\"increaseWeekNode\" \n									dojoAttachEvent=\"onClick: onIncrementWeek;\" \n									class=\"incrementControl increase\">\n									<img src=\"${dojoRoot}src/widget/templates/images/incrementMonth.png\" \n									alt=\"&darr;\" style=\"width:7px;height:5px;\" />\n								</span>\n								<span \n									dojoAttachPoint=\"increaseMonthNode\" \n									dojoAttachEvent=\"onClick: onIncrementMonth;\" class=\"incrementControl increase\">\n									<img src=\"${dojoRoot}src/widget/templates/images/incrementMonth.png\" \n										alt=\"&darr;\"  dojoAttachPoint=\"incrementMonthImageNode\">\n								</span>\n								<span \n									dojoAttachPoint=\"decreaseWeekNode\" \n									dojoAttachEvent=\"onClick: onIncrementWeek;\" \n									class=\"incrementControl decrease\">\n									<img src=\"${dojoRoot}src/widget/templates/images/decrementMonth.png\" alt=\"&uarr;\" style=\"width:7px;height:5px;\" />\n								</span>\n								<span \n									dojoAttachPoint=\"decreaseMonthNode\" \n									dojoAttachEvent=\"onClick: onIncrementMonth;\" class=\"incrementControl decrease\">\n									<img src=\"${dojoRoot}src/widget/templates/images/decrementMonth.png\" \n										alt=\"&uarr;\" dojoAttachPoint=\"decrementMonthImageNode\">\n								</span>\n								<span dojoAttachPoint=\"monthLabelNode\" class=\"month\"></span>\n							</td>\n							<td class=\"monthCurve monthCurveTR\" valign=\"top\"></td>\n						</tr>\n					</table>\n				</td>\n			</tr>\n		</thead>\n		<tbody>\n			<tr>\n				<td colspan=\"3\">\n					<table class=\"calendarBodyContainer\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n						<thead>\n							<tr dojoAttachPoint=\"dayLabelsRow\">\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n							</tr>\n						</thead>\n						<tbody dojoAttachPoint=\"calendarDatesContainerNode\" \n							dojoAttachEvent=\"onClick: _handleUiClick;\">\n							<tr dojoAttachPoint=\"calendarWeekTemplate\">\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n								<td></td>\n							</tr>\n						</tbody>\n					</table>\n				</td>\n			</tr>\n		</tbody>\n		<tfoot>\n			<tr>\n				<td colspan=\"3\" class=\"yearWrapper\">\n					<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" class=\"yearContainer\">\n						<tr>\n							<td class=\"curveBL\" valign=\"top\"></td>\n							<td valign=\"top\">\n								<h3 class=\"yearLabel\">\n									<span dojoAttachPoint=\"previousYearLabelNode\"\n										dojoAttachEvent=\"onClick: onIncrementYear;\" class=\"previousYear\"></span>\n									<span class=\"selectedYear\" dojoAttachPoint=\"currentYearLabelNode\"></span>\n									<span dojoAttachPoint=\"nextYearLabelNode\" \n										dojoAttachEvent=\"onClick: onIncrementYear;\" class=\"nextYear\"></span>\n								</h3>\n							</td>\n							<td class=\"curveBR\" valign=\"top\"></td>\n						</tr>\n					</table>\n				</td>\n			</tr>\n		</tfoot>\n	</table>\n	\n</div>\n",templateCssString:".datePickerContainer {\n	width:164px; /* needed for proper user styling */\n}\n\n.calendarContainer {\n/*	border:1px solid #566f8f;*/\n}\n\n.calendarBodyContainer {\n	width:100%; /* needed for the explode effect (explain?) */\n	background: #7591bc url(\"images/dpBg.gif\") top left repeat-x;\n}\n\n.calendarBodyContainer thead tr td {\n	color:#293a4b;\n	font:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\n	text-align:center;\n	padding:0.25em;\n	background: url(\"images/dpHorizLine.gif\") bottom left repeat-x;\n}\n\n.calendarBodyContainer tbody tr td {\n	color:#fff;\n	font:bold 0.7em Helvetica, Arial, Verdana, sans-serif;\n	text-align:center;\n	padding:0.4em;\n	background: url(\"images/dpVertLine.gif\") top right repeat-y;\n	cursor:pointer;\n	cursor:hand;\n}\n\n\n.monthWrapper {\n	padding-bottom:2px;\n	background: url(\"images/dpHorizLine.gif\") bottom left repeat-x;\n}\n\n.monthContainer {\n	width:100%;\n}\n\n.monthLabelContainer {\n	text-align:center;\n	font:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\n	background: url(\"images/dpMonthBg.png\") repeat-x top left !important;\n	color:#293a4b;\n	padding:0.25em;\n}\n\n.monthCurve {\n	width:12px;\n}\n\n.monthCurveTL {\n	background: url(\"images/dpCurveTL.png\") no-repeat top left !important;\n}\n\n.monthCurveTR {\n		background: url(\"images/dpCurveTR.png\") no-repeat top right !important;\n}\n\n\n.yearWrapper {\n	background: url(\"images/dpHorizLineFoot.gif\") top left repeat-x;\n	padding-top:2px;\n}\n\n.yearContainer {\n	width:100%;\n}\n\n.yearContainer td {\n	background:url(\"images/dpYearBg.png\") top left repeat-x;\n}\n\n.yearContainer .yearLabel {\n	margin:0;\n	padding:0.45em 0 0.45em 0;\n	color:#fff;\n	font:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\n	text-align:center;\n}\n\n.curveBL {\n	background: url(\"images/dpCurveBL.png\") bottom left no-repeat !important;\n	width:9px !important;\n	padding:0;\n	margin:0;\n}\n\n.curveBR {\n	background: url(\"images/dpCurveBR.png\") bottom right no-repeat !important;\n	width:9px !important;\n	padding:0;\n	margin:0;\n}\n\n\n.previousMonth {\n	background-color:#6782a8 !important;\n}\n\n.previousMonthDisabled {\n	background-color:#a4a5a6 !important;\n	cursor:default !important\n}\n.currentMonth {\n}\n\n.currentMonthDisabled {\n	background-color:#bbbbbc !important;\n	cursor:default !important\n}\n.nextMonth {\n	background-color:#6782a8 !important;\n}\n.nextMonthDisabled {\n	background-color:#a4a5a6 !important;\n	cursor:default !important;\n}\n\n.currentDate {\n	text-decoration:underline;\n	font-style:italic;\n}\n\n.selectedItem {\n	background-color:#fff !important;\n	color:#6782a8 !important;\n}\n\n.yearLabel .selectedYear {\n	padding:0.2em;\n	background-color:#9ec3fb !important;\n}\n\n.nextYear, .previousYear {\n	cursor:pointer;cursor:hand;\n	padding:0;\n}\n\n.nextYear {\n	margin:0 0 0 0.55em;\n}\n\n.previousYear {\n	margin:0 0.55em 0 0;\n}\n\n.incrementControl {\n	cursor:pointer;cursor:hand;\n	width:1em;\n}\n\n.increase {\n	float:right;\n}\n\n.decrease {\n	float:left;\n}\n\n.lastColumn {\n	background-image:none !important;\n}\n\n\n",templateCssPath:dojo.uri.dojoUri("src/widget/templates/DatePicker.css"),postMixInProperties:function(){
dojo.widget.DatePicker.superclass.postMixInProperties.apply(this,arguments);
if(this.storedDate){
dojo.deprecated("dojo.widget.DatePicker","use 'value' instead of 'storedDate'","0.5");
this.value=this.storedDate;
}
this.startDate=dojo.date.fromRfc3339(this.startDate);
this.endDate=dojo.date.fromRfc3339(this.endDate);
this.startDate.setHours(0,0,0,0);
this.endDate.setHours(24,0,0,-1);
if(!this.weekStartsOn){
this.weekStartsOn=dojo.date.getFirstDayOfWeek(this.lang);
}
this.today=new Date();
this.today.setHours(0,0,0,0);
if(typeof (this.value)=="string"&&this.value.toLowerCase()=="today"){
this.value=new Date();
}else{
if(this.value&&(typeof this.value=="string")&&(this.value.split("-").length>2)){
this.value=dojo.date.fromRfc3339(this.value);
this.value.setHours(0,0,0,0);
}
}
},fillInTemplate:function(args,frag){
dojo.widget.DatePicker.superclass.fillInTemplate.apply(this,arguments);
var _b5e=this.getFragNodeRef(frag);
dojo.html.copyStyle(this.domNode,_b5e);
this.weekTemplate=dojo.dom.removeNode(this.calendarWeekTemplate);
this._preInitUI(this.value?this.value:this.today,false,true);
var _b5f=dojo.lang.unnest(dojo.date.getNames("days",this.dayWidth,"standAlone",this.lang));
if(this.weekStartsOn>0){
for(var i=0;i<this.weekStartsOn;i++){
_b5f.push(_b5f.shift());
}
}
var _b61=this.dayLabelsRow.getElementsByTagName("td");
for(i=0;i<7;i++){
_b61.item(i).innerHTML=_b5f[i];
}
if(this.value){
this.setValue(this.value);
}
},getValue:function(){
return dojo.date.toRfc3339(new Date(this.value),"dateOnly");
},getDate:function(){
return this.value;
},setValue:function(_b62){
this.setDate(_b62);
},setDate:function(_b63){
if(typeof _b63=="string"){
this.value=dojo.date.fromRfc3339(_b63);
}else{
this.value=new Date(_b63);
}
this.value.setHours(0,0,0,0);
if(this.selectedNode!=null){
dojo.html.removeClass(this.selectedNode,this.classNames.selectedDate);
}
if(this.clickedNode!=null){
dojo.html.addClass(this.clickedNode,this.classNames.selectedDate);
this.selectedNode=this.clickedNode;
}else{
this._preInitUI(this.value,false,true);
}
this.clickedNode=null;
this.onValueChanged(this.value);
},_preInitUI:function(_b64,_b65,_b66){
if(_b64<this.startDate||_b64>this.endDate){
_b64=new Date((_b64<this.startDate)?this.startDate:this.endDate);
}
this.firstDay=this._initFirstDay(_b64,_b65);
this.selectedIsUsed=false;
this.currentIsUsed=false;
var _b67=new Date(this.firstDay);
var _b68=_b67.getMonth();
this.curMonth=new Date(_b67);
this.curMonth.setDate(_b67.getDate()+6);
this.curMonth.setDate(1);
if(this.displayWeeks==""||this.adjustWeeks){
this.adjustWeeks=true;
this.displayWeeks=Math.ceil((dojo.date.getDaysInMonth(this.curMonth)+this._getAdjustedDay(this.curMonth))/7);
}
var days=this.displayWeeks*7;
if(dojo.date.diff(this.startDate,this.endDate,dojo.date.dateParts.DAY)<days){
this.staticDisplay=true;
if(dojo.date.diff(_b67,this.endDate,dojo.date.dateParts.DAY)>days){
this._preInitUI(this.startDate,true,false);
_b67=new Date(this.firstDay);
}
this.curMonth=new Date(_b67);
this.curMonth.setDate(_b67.getDate()+6);
this.curMonth.setDate(1);
var _b6a=(_b67.getMonth()==this.curMonth.getMonth())?"current":"previous";
}
if(_b66){
this._initUI(days);
}
},_initUI:function(days){
dojo.dom.removeChildren(this.calendarDatesContainerNode);
for(var i=0;i<this.displayWeeks;i++){
this.calendarDatesContainerNode.appendChild(this.weekTemplate.cloneNode(true));
}
var _b6d=new Date(this.firstDay);
this._setMonthLabel(this.curMonth.getMonth());
this._setYearLabels(this.curMonth.getFullYear());
var _b6e=this.calendarDatesContainerNode.getElementsByTagName("td");
var _b6f=this.calendarDatesContainerNode.getElementsByTagName("tr");
var _b70;
for(i=0;i<days;i++){
_b70=_b6e.item(i);
_b70.innerHTML=_b6d.getDate();
var _b71=(_b6d.getMonth()<this.curMonth.getMonth())?"previous":(_b6d.getMonth()==this.curMonth.getMonth())?"current":"next";
var _b72=_b71;
if(this._isDisabledDate(_b6d)){
var _b73={previous:"disabledPrevious",current:"disabledCurrent",next:"disabledNext"};
_b72=_b73[_b71];
}
dojo.html.setClass(_b70,this._getDateClassName(_b6d,_b72));
if(dojo.html.hasClass(_b70,this.classNames.selectedDate)){
this.selectedNode=_b70;
}
_b6d=dojo.date.add(_b6d,dojo.date.dateParts.DAY,1);
}
this.lastDay=dojo.date.add(_b6d,dojo.date.dateParts.DAY,-1);
this._initControls();
},_initControls:function(){
var d=this.firstDay;
var d2=this.lastDay;
var _b76,_b77,_b78,_b79,_b7a,_b7b;
_b76=_b77=_b78=_b79=_b7a=_b7b=!this.staticDisplay;
with(dojo.date.dateParts){
var add=dojo.date.add;
if(_b76&&add(d,DAY,(-1*(this._getAdjustedDay(d)+1)))<this.startDate){
_b76=_b78=_b7a=false;
}
if(_b77&&d2>this.endDate){
_b77=_b79=_b7b=false;
}
if(_b78&&add(d,DAY,-1)<this.startDate){
_b78=_b7a=false;
}
if(_b79&&add(d2,DAY,1)>this.endDate){
_b79=_b7b=false;
}
if(_b7a&&add(d2,YEAR,-1)<this.startDate){
_b7a=false;
}
if(_b7b&&add(d,YEAR,1)>this.endDate){
_b7b=false;
}
}
function enableControl(node,_b7e){
dojo.html.setVisibility(node,_b7e?"":"hidden");
}
enableControl(this.decreaseWeekNode,_b76);
enableControl(this.increaseWeekNode,_b77);
enableControl(this.decreaseMonthNode,_b78);
enableControl(this.increaseMonthNode,_b79);
enableControl(this.previousYearLabelNode,_b7a);
enableControl(this.nextYearLabelNode,_b7b);
},_incrementWeek:function(evt){
var d=new Date(this.firstDay);
switch(evt.target){
case this.increaseWeekNode.getElementsByTagName("img").item(0):
case this.increaseWeekNode:
var _b81=dojo.date.add(d,dojo.date.dateParts.WEEK,1);
if(_b81<this.endDate){
d=dojo.date.add(d,dojo.date.dateParts.WEEK,1);
}
break;
case this.decreaseWeekNode.getElementsByTagName("img").item(0):
case this.decreaseWeekNode:
if(d>=this.startDate){
d=dojo.date.add(d,dojo.date.dateParts.WEEK,-1);
}
break;
}
this._preInitUI(d,true,true);
},_incrementMonth:function(evt){
var d=new Date(this.curMonth);
var _b84=new Date(this.firstDay);
switch(evt.currentTarget){
case this.increaseMonthNode.getElementsByTagName("img").item(0):
case this.increaseMonthNode:
_b84=dojo.date.add(_b84,dojo.date.dateParts.DAY,this.displayWeeks*7);
if(_b84<this.endDate){
d=dojo.date.add(d,dojo.date.dateParts.MONTH,1);
}else{
var _b85=true;
}
break;
case this.decreaseMonthNode.getElementsByTagName("img").item(0):
case this.decreaseMonthNode:
if(_b84>this.startDate){
d=dojo.date.add(d,dojo.date.dateParts.MONTH,-1);
}else{
var _b86=true;
}
break;
}
if(_b86){
d=new Date(this.startDate);
}else{
if(_b85){
d=new Date(this.endDate);
}
}
this._preInitUI(d,false,true);
},_incrementYear:function(evt){
var year=this.curMonth.getFullYear();
var _b89=new Date(this.firstDay);
switch(evt.target){
case this.nextYearLabelNode:
_b89=dojo.date.add(_b89,dojo.date.dateParts.YEAR,1);
if(_b89<this.endDate){
year++;
}else{
var _b8a=true;
}
break;
case this.previousYearLabelNode:
_b89=dojo.date.add(_b89,dojo.date.dateParts.YEAR,-1);
if(_b89>this.startDate){
year--;
}else{
var _b8b=true;
}
break;
}
var d;
if(_b8b){
d=new Date(this.startDate);
}else{
if(_b8a){
d=new Date(this.endDate);
}else{
d=new Date(year,this.curMonth.getMonth(),1);
}
}
this._preInitUI(d,false,true);
},onIncrementWeek:function(evt){
evt.stopPropagation();
if(!this.staticDisplay){
this._incrementWeek(evt);
}
},onIncrementMonth:function(evt){
evt.stopPropagation();
if(!this.staticDisplay){
this._incrementMonth(evt);
}
},onIncrementYear:function(evt){
evt.stopPropagation();
if(!this.staticDisplay){
this._incrementYear(evt);
}
},_setMonthLabel:function(_b90){
this.monthLabelNode.innerHTML=dojo.date.getNames("months","wide","standAlone",this.lang)[_b90];
},_setYearLabels:function(year){
var y=year-1;
var that=this;
function f(n){
that[n+"YearLabelNode"].innerHTML=dojo.date.format(new Date(y++,0),{formatLength:"yearOnly",locale:that.lang});
}
f("previous");
f("current");
f("next");
},_getDateClassName:function(date,_b96){
var _b97=this.classNames[_b96];
if((!this.selectedIsUsed&&this.value)&&(Number(date)==Number(this.value))){
_b97=this.classNames.selectedDate+" "+_b97;
this.selectedIsUsed=true;
}
if((!this.currentIsUsed)&&(Number(date)==Number(this.today))){
_b97=_b97+" "+this.classNames.currentDate;
this.currentIsUsed=true;
}
return _b97;
},onClick:function(evt){
dojo.event.browser.stopEvent(evt);
},_handleUiClick:function(evt){
var _b9a=evt.target;
if(_b9a.nodeType!=dojo.dom.ELEMENT_NODE){
_b9a=_b9a.parentNode;
}
dojo.event.browser.stopEvent(evt);
this.selectedIsUsed=this.todayIsUsed=false;
var _b9b=this.curMonth.getMonth();
var year=this.curMonth.getFullYear();
if(dojo.html.hasClass(_b9a,this.classNames["disabledPrevious"])||dojo.html.hasClass(_b9a,this.classNames["disabledCurrent"])||dojo.html.hasClass(_b9a,this.classNames["disabledNext"])){
return;
}else{
if(dojo.html.hasClass(_b9a,this.classNames["next"])){
_b9b=++_b9b%12;
if(_b9b===0){
++year;
}
}else{
if(dojo.html.hasClass(_b9a,this.classNames["previous"])){
_b9b=--_b9b%12;
if(_b9b==11){
--year;
}
}
}
}
this.clickedNode=_b9a;
this.setDate(new Date(year,_b9b,_b9a.innerHTML));
},onValueChanged:function(date){
},_isDisabledDate:function(_b9e){
if(_b9e<this.startDate||_b9e>this.endDate){
return true;
}
return this.isDisabledDate(_b9e,this.lang);
},isDisabledDate:function(_b9f,_ba0){
return false;
},_initFirstDay:function(_ba1,adj){
var d=new Date(_ba1);
if(!adj){
d.setDate(1);
}
d.setDate(d.getDate()-this._getAdjustedDay(d,this.weekStartsOn));
d.setHours(0,0,0,0);
return d;
},_getAdjustedDay:function(_ba4){
var days=[0,1,2,3,4,5,6];
if(this.weekStartsOn>0){
for(var i=0;i<this.weekStartsOn;i++){
days.unshift(days.pop());
}
}
return days[_ba4.getDay()];
}});
dojo.provide("dojo.widget.DropdownDatePicker");
dojo.widget.defineWidget("dojo.widget.DropdownDatePicker",dojo.widget.DropdownContainer,{iconURL:dojo.uri.dojoUri("src/widget/templates/images/dateIcon.gif"),zIndex:"10",formatLength:"short",displayFormat:"",dateFormat:"",saveFormat:"",value:"",name:"",displayWeeks:6,adjustWeeks:false,startDate:"1492-10-12",endDate:"2941-10-12",weekStartsOn:"",staticDisplay:false,postMixInProperties:function(_ba7,frag){
dojo.widget.DropdownDatePicker.superclass.postMixInProperties.apply(this,arguments);
var _ba9=dojo.i18n.getLocalization("dojo.widget","DropdownDatePicker",this.lang);
this.iconAlt=_ba9.selectDate;
if(typeof (this.value)=="string"&&this.value.toLowerCase()=="today"){
this.value=new Date();
}
if(this.value&&isNaN(this.value)){
var orig=this.value;
this.value=dojo.date.fromRfc3339(this.value);
if(!this.value){
this.value=new Date(orig);
dojo.deprecated("dojo.widget.DropdownDatePicker","date attributes must be passed in Rfc3339 format","0.5");
}
}
if(this.value&&!isNaN(this.value)){
this.value=new Date(this.value);
}
},fillInTemplate:function(args,frag){
dojo.widget.DropdownDatePicker.superclass.fillInTemplate.call(this,args,frag);
var _bad={widgetContainerId:this.widgetId,lang:this.lang,value:this.value,startDate:this.startDate,endDate:this.endDate,displayWeeks:this.displayWeeks,weekStartsOn:this.weekStartsOn,adjustWeeks:this.adjustWeeks,staticDisplay:this.staticDisplay};
this.datePicker=dojo.widget.createWidget("DatePicker",_bad,this.containerNode,"child");
dojo.event.connect(this.datePicker,"onValueChanged",this,"onSetDate");
if(this.value){
this.onSetDate();
}
this.containerNode.style.zIndex=this.zIndex;
this.containerNode.explodeClassName="calendarBodyContainer";
this.valueNode.name=this.name;
},getValue:function(){
return this.valueNode.value;
},getDate:function(){
return this.datePicker.value;
},setValue:function(_bae){
this.setDate(_bae);
},setDate:function(_baf){
this.datePicker.setDate(_baf);
this._synchValueNode();
},onSetDate:function(){
if(this.dateFormat){
dojo.deprecated("dojo.widget.DropdownDatePicker","Must use displayFormat attribute instead of dateFormat.  See dojo.date.format for specification.","0.5");
this.inputNode.value=dojo.date.strftime(this.datePicker.value,this.dateFormat,this.lang);
}else{
this.inputNode.value=dojo.date.format(this.datePicker.value,{formatLength:this.formatLength,datePattern:this.displayFormat,selector:"dateOnly",locale:this.lang});
}
if(this.value<this.datePicker.startDate||this.value>this.datePicker.endDate){
this.inputNode.value="";
}
this._synchValueNode();
this.onValueChanged(this.getDate());
this.hideContainer();
},onValueChanged:function(_bb0){
},onInputChange:function(){
if(this.dateFormat){
dojo.deprecated("dojo.widget.DropdownDatePicker","Cannot parse user input.  Must use displayFormat attribute instead of dateFormat.  See dojo.date.format for specification.","0.5");
}else{
var _bb1=dojo.string.trim(this.inputNode.value);
if(_bb1){
var _bb2=dojo.date.parse(_bb1,{formatLength:this.formatLength,datePattern:this.displayFormat,selector:"dateOnly",locale:this.lang});
if(_bb2){
this.setDate(_bb2);
}
}else{
this.valueNode.value=_bb1;
}
}
if(_bb1){
this.onSetDate();
}
},_synchValueNode:function(){
var date=this.datePicker.value;
var _bb4;
switch(this.saveFormat.toLowerCase()){
case "rfc":
case "iso":
case "":
_bb4=dojo.date.toRfc3339(date,"dateOnly");
break;
case "posix":
case "unix":
_bb4=Number(date);
break;
default:
_bb4=dojo.date.format(date,{datePattern:this.saveFormat,selector:"dateOnly",locale:this.lang});
}
this.valueNode.value=_bb4;
},enable:function(){
this.inputNode.disabled=false;
this.datePicker.enable();
dojo.widget.DropdownDatePicker.superclass.enable.apply(this,arguments);
},disable:function(){
this.inputNode.disabled=true;
this.datePicker.disable();
dojo.widget.DropdownDatePicker.superclass.disable.apply(this,arguments);
}});
dojo.provide("struts.widget.StrutsTimePicker");
dojo.widget.defineWidget("struts.widget.StrutsTimePicker",dojo.widget.DropdownTimePicker,{widgetType:"TimePicker",inputName:"",name:"",postCreate:function(){
struts.widget.StrutsTimePicker.superclass.postCreate.apply(this,arguments);
if(this.value.toLowerCase()=="today"){
this.value=dojo.date.toRfc3339(new Date());
}
this.inputNode.name=this.name;
this.valueNode.name=this.inputName;
},onSetTime:function(){
struts.widget.StrutsTimePicker.superclass.onSetTime.apply(this,arguments);
if(this.timePicker.selectedTime.anyTime){
this.valueNode.value="";
}else{
this.valueNode.value=dojo.date.toRfc3339(this.timePicker.time);
}
}});
dojo.provide("dojo.widget.RichText");
if(dojo.hostenv.post_load_){
(function(){
var _bb5=dojo.doc().createElement("textarea");
_bb5.id="dojo.widget.RichText.savedContent";
_bb5.style="display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;";
dojo.body().appendChild(_bb5);
})();
}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,{inheritWidth:false,focusOnLoad:true,saveName:"",_content:"",height:"",minHeight:"1em",isClosed:true,isLoaded:false,useActiveX:false,relativeImageUrls:false,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",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");
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(_bba){
var h=dojo.render.html;
dojo.event.topic.publish("dojo.widget.RichText::open",this);
if(!this.isClosed){
this.close();
}
this._content="";
if((arguments.length==1)&&(_bba["nodeName"])){
this.domNode=_bba;
}
if((this.domNode["nodeName"])&&(this.domNode.nodeName.toLowerCase()=="textarea")){
this.textarea=this.domNode;
var html=dojo.string.trim(this.textarea.value);
if(html==""){
html="&nbsp;";
}
this.domNode=dojo.doc().createElement("div");
dojo.html.copyStyle(this.domNode,this.textarea);
var _bbd=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(_bbd,10);
}else{
_bbd();
}
if(!h.safari){
dojo.html.insertBefore(this.domNode,this.textarea);
}
if(this.textarea.form){
dojo.event.connect(this.textarea.form,"onsubmit",dojo.lang.hitch(this,function(){
this.textarea.value=this.getEditorContent();
}));
}
var _bbe=this;
dojo.event.connect(this,"postCreate",function(){
dojo.html.insertAfter(_bbe.textarea,_bbe.domNode);
});
}else{
var html=this._preFilterContent(dojo.string.trim(this.domNode.innerHTML));
if(html==""){
html="&nbsp;";
}
}
var _bbf=dojo.html.getContentBox(this.domNode);
this._oldHeight=_bbf.height;
this._oldWidth=_bbf.width;
this._firstChildContributingMargin=this._getContributingMargin(this.domNode,"top");
this._lastChildContributingMargin=this._getContributingMargin(this.domNode,"bottom");
this.savedContent=dojo.doc().createElement("div");
while(this.domNode.hasChildNodes()){
this.savedContent.appendChild(this.domNode.firstChild);
}
this.editingArea=dojo.doc().createElement("div");
this.domNode.appendChild(this.editingArea);
if((this.domNode["nodeName"])&&(this.domNode.nodeName=="LI")){
this.domNode.innerHTML=" <br>";
}
if(this.saveName!=""){
var _bc0=dojo.doc().getElementById("dojo.widget.RichText.savedContent");
if(_bc0.value!=""){
var _bc1=_bc0.value.split(this._SEPARATOR);
for(var i=0;i<_bc1.length;i++){
var data=_bc1[i].split(":");
if(data[0]==this.saveName){
html=data[1];
_bc1.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.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></head><body style='margin: 0; padding: 0;border: 0; overflow: hidden;'><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;
}
}
if(!this._cacheLocalBlockFormatNames()){
var _bc5=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","div","ul"];
var _bc6="";
for(var i in _bc5){
if(_bc5[i].charAt(1)!="l"){
_bc6+="<"+_bc5[i]+"><span>content</span></"+_bc5[i]+">";
}else{
_bc6+="<"+_bc5[i]+"><li>content</li></"+_bc5[i]+">";
}
}
with(this.editNode.style){
position="absolute";
left="-2000px";
top="-2000px";
}
this.editNode.innerHTML=_bc6;
var node=this.editNode.firstChild;
while(node){
dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[node.firstChild]);
var _bc8=node.tagName.toLowerCase();
this._local2NativeFormatNames[_bc8]=this.queryCommandValue("formatblock");
this._native2LocalFormatNames[this._local2NativeFormatNames[_bc8]]=_bc8;
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(_bca,side){
if(dojo.html.getPixelValue(_bca,"border-"+side+"-width",false)){
return false;
}else{
if(dojo.html.getPixelValue(_bca,"padding-"+side,false)){
return false;
}else{
return true;
}
}
},_getContributingMargin:function(_bcc,_bcd){
if(_bcd=="top"){
var _bce="previousSibling";
var _bcf="nextSibling";
var _bd0="firstChild";
var _bd1="margin-top";
var _bd2="margin-bottom";
}else{
var _bce="nextSibling";
var _bcf="previousSibling";
var _bd0="lastChild";
var _bd1="margin-bottom";
var _bd2="margin-top";
}
var _bd3=dojo.html.getPixelValue(_bcc,_bd1,false);
function isSignificantNode(_bd4){
return !(_bd4.nodeType==3&&dojo.string.isBlank(_bd4.data))&&dojo.html.getStyle(_bd4,"display")!="none"&&!dojo.html.isPositionAbsolute(_bd4);
}
var _bd5=0;
var _bd6=_bcc[_bd0];
while(_bd6){
while((!isSignificantNode(_bd6))&&_bd6[_bcf]){
_bd6=_bd6[_bcf];
}
_bd5=Math.max(_bd5,dojo.html.getPixelValue(_bd6,_bd1,false));
if(!this._hasCollapseableMargin(_bd6,_bcd)){
break;
}
_bd6=_bd6[_bd0];
}
if(!this._hasCollapseableMargin(_bcc,_bcd)){
return parseInt(_bd5);
}
var _bd7=0;
var _bd8=_bcc[_bce];
while(_bd8){
if(isSignificantNode(_bd8)){
_bd7=dojo.html.getPixelValue(_bd8,_bd2,false);
break;
}
_bd8=_bd8[_bce];
}
if(!_bd8){
_bd7=dojo.html.getPixelValue(_bcc.parentNode,_bd1,false);
}
if(_bd5>_bd3){
return parseInt(Math.max((_bd5-_bd3)-_bd7,0));
}else{
return 0;
}
},_drawIframe:function(html){
var _bda=Boolean(dojo.render.html.moz&&(typeof window.XML=="undefined"));
if(!this.iframe){
var _bdb=(new dojo.uri.Uri(dojo.doc().location)).host;
this.iframe=dojo.doc().createElement("iframe");
with(this.iframe){
style.border="none";
style.lineHeight="0";
style.verticalAlign="bottom";
scrolling=this.height?"auto":"no";
}
}
this.iframe.src=dojo.uri.dojoUri("src/widget/templates/richtextframe.html")+((dojo.doc().domain!=_bdb)?("#"+dojo.doc().domain):"");
this.iframe.width=this.inheritWidth?this._oldWidth:"100%";
if(this.height){
this.iframe.style.height=this.height;
}else{
var _bdc=this._oldHeight;
if(this._hasCollapseableMargin(this.domNode,"top")){
_bdc+=this._firstChildContributingMargin;
}
if(this._hasCollapseableMargin(this.domNode,"bottom")){
_bdc+=this._lastChildContributingMargin;
}
this.iframe.height=_bdc;
}
var _bdd=dojo.doc().createElement("div");
_bdd.innerHTML=html;
if(this.relativeImageUrls){
var imgs=_bdd.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=_bdd.innerHTML;
}
var _be0=dojo.html.firstElement(_bdd);
var _be1=dojo.html.lastElement(_bdd);
if(_be0){
_be0.style.marginTop=this._firstChildContributingMargin+"px";
}
if(_be1){
_be1.style.marginBottom=this._lastChildContributingMargin+"px";
}
_bdd.style.position="absolute";
this.editingArea.appendChild(_bdd);
this.editingArea.appendChild(this.iframe);
if(dojo.render.html.safari){
this.iframe.src=this.iframe.src;
}
var _be2=false;
var _be3=dojo.lang.hitch(this,function(){
if(!_be2){
_be2=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 _be4=(function(_be5){
return function(_be6){
return dojo.html.getStyle(_be5,_be6);
};
})(this.domNode);
var font=_be4("font-weight")+" "+_be4("font-size")+" "+_be4("font-family");
var _be8="1.0";
var _be9=dojo.html.getUnitValue(this.domNode,"line-height");
if(_be9.value&&_be9.units==""){
_be8=_be9.value;
}
dojo.html.insertCssText("    body,html { background: transparent; padding: 0; margin: 0; }\n"+"    body { top: 0; left: 0; right: 0;"+(((this.height)||(dojo.render.html.opera))?"":" position: fixed; ")+"        font: "+font+";\n"+"        min-height: "+this.minHeight+"; \n"+"        line-height: "+_be8+"} \n"+"    p { margin: 1em 0 !important; }\n"+"    body > *:first-child { padding-top: 0 !important; margin-top: "+this._firstChildContributingMargin+"px !important; }\n"+"    body > *:last-child { padding-bottom: 0 !important; margin-bottom: "+this._lastChildContributingMargin+"px !important; }\n"+"    li > ul:-moz-first-node, li > ol:-moz-first-node { padding-top: 1.2em; }\n"+"    li { min-height: 1.2em; }\n"+"",this.document);
_bdd.parentNode.removeChild(_bdd);
this.document.body.innerHTML=html;
if(_bda||dojo.render.html.safari){
this.document.designMode="on";
}
this.onLoad();
}else{
_bdd.parentNode.removeChild(_bdd);
this.editNode.innerHTML=html;
this.onDisplayChanged();
}
});
if(this.editNode){
_be3();
}else{
if(dojo.render.html.moz){
this.iframe.onload=function(){
setTimeout(_be3,250);
};
}else{
this.iframe.onload=_be3;
}
}
},_applyEditingAreaStyleSheets:function(){
var _bea=[];
if(this.styleSheets){
_bea=this.styleSheets.split(";");
}
_bea=_bea.concat(this.editingAreaStyleSheets);
this.editingAreaStyleSheets=[];
if(_bea.length>0){
for(var i=0;i<_bea.length;i++){
var url=_bea[i];
if(url){
this.addStyleSheet(new dojo.uri.Uri(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 _bf0=this.document.createElement("link");
with(_bf0){
rel="stylesheet";
type="text/css";
href=url;
}
head.appendChild(_bf0);
}
},removeStyleSheet:function(uri){
var url=uri.toString();
var _bf3=dojo.lang.find(this.editingAreaStyleSheets,url);
if(_bf3==-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[_bf3];
var _bf4=this.document.getElementsByTagName("link");
for(var i=0;i<_bf4.length;i++){
if(_bf4[i].href==url){
if(dojo.render.html.ie){
_bf4[i].href="";
}
dojo.html.removeNode(_bf4[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;
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){
return false;
}
}
var _bf9=new ActiveXObject("DEGetBlockFmtNamesParam.DEGetBlockFmtNamesParam");
obj.ExecCommand(this._activeX.command["getblockformatnames"],0,_bf9);
var _bfa=new VBArray(_bf9.Names);
var _bfb=_bfa.toArray();
var _bfc=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","ul","","","","","div"];
for(var i=0;i<_bfc.length;++i){
if(_bfc[i].length>0){
this._local2NativeFormatNames[_bfb[i]]=_bfc[i];
this._native2LocalFormatNames[_bfc[i]]=_bfb[i];
}
}
if(!this.object){
dojo.body().removeChild(obj);
}
}
return true;
},_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;
this.connect(this,"onDisplayChanged","_updateHeight");
this.window._frameElement=this.object;
}else{
if(this.iframe&&!dojo.render.html.ie){
this.editNode=this.document.body;
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 _c00=dojo.event.browser.addListener;
var self=this;
dojo.lang.forEach(this.events,function(e){
var l=_c00(self.document,e.substr(2).toLowerCase(),dojo.lang.hitch(self,e));
if(e=="onBlur"){
var _c04={unBlur:function(e){
dojo.event.browser.removeListener(doc,"blur",l);
}};
dojo.event.connect("before",self,"close",_c04,"unBlur");
}
});
}
}
}else{
if(dojo.render.html.ie){
this.connect(this,"onDisplayChanged","_updateHeight");
this.editNode.style.zoom=1;
}
}
}
this._applyEditingAreaStyleSheets();
if(this.focusOnLoad){
this.focus();
}
this.onDisplayChanged(e);
},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 _c09=e.ctrlKey?this.KEY_CTRL:0;
if(this._keyHandlers[e.key]){
var _c0a=this._keyHandlers[e.key],i=0,_c0c;
while(_c0c=_c0a[i++]){
if(_c09==_c0c.modifiers){
_c0c.handler.call(this);
e.preventDefault();
break;
}
}
}
dojo.lang.setTimeout(this,this.onKeyPressed,1,e);
},addKeyHandler:function(key,_c0e,_c0f){
if(!(this._keyHandlers[key] instanceof Array)){
this._keyHandlers[key]=[];
}
this._keyHandlers[key].push({modifiers:_c0e||0,handler:_c0f});
},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 _c17=cmd.toLowerCase();
if(_c17=="formatblock"){
if(drh.safari){
_c17="heading";
}
}else{
if(this.object){
switch(_c17){
case "createlink":
_c17="hyperlink";
break;
case "insertimage":
_c17="image";
break;
}
}else{
if(_c17=="hilitecolor"&&!drh.mozilla){
_c17="backcolor";
}
}
}
return _c17;
},queryCommandAvailable:function(_c18){
var ie=1;
var _c1a=1<<1;
var _c1b=1<<2;
var _c1c=1<<3;
var _c1d=1<<4;
var _c1e=false;
if(dojo.render.html.safari){
var tmp=dojo.render.html.UA.split("AppleWebKit/")[1];
var ver=parseFloat(tmp.split(" ")[0]);
if(ver>=420){
_c1e=true;
}
}
function isSupportedBy(_c21){
return {ie:Boolean(_c21&ie),mozilla:Boolean(_c21&_c1a),safari:Boolean(_c21&_c1b),safari420:Boolean(_c21&_c1d),opera:Boolean(_c21&_c1c)};
}
var _c22=null;
switch(_c18.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":
_c22=isSupportedBy(_c1a|ie|_c1b|_c1c);
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":
_c22=isSupportedBy(_c1a|ie|_c1c|_c1d);
break;
case "blockdirltr":
case "blockdirrtl":
case "dirltr":
case "dirrtl":
case "inlinedirltr":
case "inlinedirrtl":
_c22=isSupportedBy(ie);
break;
case "cut":
case "copy":
case "paste":
_c22=isSupportedBy(ie|_c1a|_c1d);
break;
case "inserttable":
_c22=isSupportedBy(_c1a|(this.object?ie:0));
break;
case "insertcell":
case "insertcol":
case "insertrow":
case "deletecells":
case "deletecols":
case "deleterows":
case "mergecells":
case "splitcell":
_c22=isSupportedBy(this.object?ie:0);
break;
default:
return false;
}
return (dojo.render.html.ie&&_c22.ie)||(dojo.render.html.mozilla&&_c22.mozilla)||(dojo.render.html.safari&&_c22.safari)||(_c1e&&_c22.safari420)||(dojo.render.html.opera&&_c22.opera);
},execCommand:function(_c23,_c24){
var _c25;
this.focus();
_c23=this._normalizeCommand(_c23);
if(_c24!=undefined){
if(_c23=="heading"){
throw new Error("unimplemented");
}else{
if(_c23=="formatblock"){
if(this.object){
_c24=this._native2LocalFormatNames[_c24];
}else{
if(drh.ie){
_c24="<"+_c24+">";
}
}
}
}
}
if(this.object){
switch(_c23){
case "hilitecolor":
_c23="setbackcolor";
break;
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_c23="set"+_c23;
break;
case "formatblock":
_c23="setblockformat";
}
if(_c23=="strikethrough"){
_c23="inserthtml";
var _c26=this.document.selection.createRange();
if(!_c26.htmlText){
return;
}
_c24=_c26.htmlText.strike();
}else{
if(_c23=="inserthorizontalrule"){
_c23="inserthtml";
_c24="<hr>";
}
}
if(_c23=="inserthtml"){
var _c26=this.document.selection.createRange();
if(this.document.selection.type.toUpperCase()=="CONTROL"){
for(var i=0;i<_c26.length;i++){
_c26.item(i).outerHTML=_c24;
}
}else{
_c26.pasteHTML(_c24);
_c26.select();
}
_c25=true;
}else{
if(arguments.length==1){
_c25=this.object.ExecCommand(this._activeX.command[_c23],this._activeX.ui.noprompt);
}else{
_c25=this.object.ExecCommand(this._activeX.command[_c23],this._activeX.ui.noprompt,_c24);
}
}
}else{
if(_c23=="inserthtml"){
if(dojo.render.html.ie){
var _c28=this.document.selection.createRange();
_c28.pasteHTML(_c24);
_c28.select();
return true;
}else{
return this.document.execCommand(_c23,false,_c24);
}
}else{
if((_c23=="unlink")&&(this.queryCommandEnabled("unlink"))&&(dojo.render.html.mozilla)){
var _c29=this.window.getSelection();
var _c2a=_c29.getRangeAt(0);
var _c2b=_c2a.startContainer;
var _c2c=_c2a.startOffset;
var _c2d=_c2a.endContainer;
var _c2e=_c2a.endOffset;
var a=dojo.withGlobal(this.window,"getAncestorElement",dojo.html.selection,["a"]);
dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[a]);
_c25=this.document.execCommand("unlink",false,null);
var _c2a=this.document.createRange();
_c2a.setStart(_c2b,_c2c);
_c2a.setEnd(_c2d,_c2e);
_c29.removeAllRanges();
_c29.addRange(_c2a);
return _c25;
}else{
if((_c23=="hilitecolor")&&(dojo.render.html.mozilla)){
this.document.execCommand("useCSS",false,false);
_c25=this.document.execCommand(_c23,false,_c24);
this.document.execCommand("useCSS",false,true);
}else{
if((dojo.render.html.ie)&&((_c23=="backcolor")||(_c23=="forecolor"))){
_c24=arguments.length>1?_c24:null;
_c25=this.document.execCommand(_c23,false,_c24);
}else{
_c24=arguments.length>1?_c24:null;
if(_c24||_c23!="createlink"){
_c25=this.document.execCommand(_c23,false,_c24);
}
}
}
}
}
}
this.onDisplayChanged();
return _c25;
},queryCommandEnabled:function(_c30){
_c30=this._normalizeCommand(_c30);
if(this.object){
switch(_c30){
case "hilitecolor":
_c30="setbackcolor";
break;
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_c30="set"+_c30;
break;
case "formatblock":
_c30="setblockformat";
break;
case "strikethrough":
_c30="bold";
break;
case "inserthorizontalrule":
return true;
}
if(typeof this._activeX.command[_c30]=="undefined"){
return false;
}
var _c31=this.object.QueryStatus(this._activeX.command[_c30]);
return ((_c31!=this._activeX.status.notsupported)&&(_c31!=this._activeX.status.disabled));
}else{
if(dojo.render.html.mozilla){
if(_c30=="unlink"){
return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["a"]);
}else{
if(_c30=="inserttable"){
return true;
}
}
}
var elem=(dojo.render.html.ie)?this.document.selection.createRange():this.document;
return elem.queryCommandEnabled(_c30);
}
},queryCommandState:function(_c33){
_c33=this._normalizeCommand(_c33);
if(this.object){
if(_c33=="forecolor"){
_c33="setforecolor";
}else{
if(_c33=="backcolor"){
_c33="setbackcolor";
}else{
if(_c33=="strikethrough"){
return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["strike"]);
}else{
if(_c33=="inserthorizontalrule"){
return false;
}
}
}
}
if(typeof this._activeX.command[_c33]=="undefined"){
return null;
}
var _c34=this.object.QueryStatus(this._activeX.command[_c33]);
return ((_c34==this._activeX.status.latched)||(_c34==this._activeX.status.ninched));
}else{
return this.document.queryCommandState(_c33);
}
},queryCommandValue:function(_c35){
_c35=this._normalizeCommand(_c35);
if(this.object){
switch(_c35){
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
_c35="get"+_c35;
return this.object.execCommand(this._activeX.command[_c35],this._activeX.ui.noprompt);
case "formatblock":
var _c36=this.object.execCommand(this._activeX.command["getblockformat"],this._activeX.ui.noprompt);
if(_c36){
return this._local2NativeFormatNames[_c36];
}
}
}else{
if(dojo.render.html.ie&&_c35=="formatblock"){
return this._local2NativeFormatNames[this.document.queryCommandValue(_c35)]||this.document.queryCommandValue(_c35);
}
return this.document.queryCommandValue(_c35);
}
},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");
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 _c42=dojo.html.getBorderBox(this.editNode).height;
if(!_c42){
_c42=dojo.html.getBorderBox(this.document.body).height;
}
if(_c42==0){
dojo.debug("Can not figure out the height of the editing area!");
return;
}
this._lastHeight=_c42;
this.editorObject.style.height=this._lastHeight+"px";
this.window.scrollTo(0,0);
},_saveContent:function(e){
var _c44=dojo.doc().getElementById("dojo.widget.RichText.savedContent");
_c44.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 _c47=dojo.global().location.protocol+"//"+dojo.global().location.host;
var _c48=dojo.global().location.pathname;
if(_c48.match(/\/$/)){
}else{
var _c49=_c48.split("/");
if(_c49.length){
_c49.pop();
}
_c48=_c49.join("/")+"/";
}
var _c4a=new RegExp("(<img[^>]* src=[\"'])("+_c47+"("+_c48+")?)","ig");
ec=ec.replace(_c4a,"$1");
}
return ec;
},close:function(save,_c4c){
if(this.isClosed){
return false;
}
if(arguments.length==0){
save=true;
}
this._content=this._postFilterContent(this.editNode.innerHTML);
var _c4d=(this.savedContent.innerHTML!=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;
}
}
this.domNode.parentNode.removeChild(this.domNode);
this.domNode=this.textarea;
}else{
this.domNode.innerHTML="";
}
if(save){
dojo.event.browser.clean(this.savedContent);
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{
while(this.savedContent.hasChildNodes()){
this.domNode.appendChild(this.savedContent.firstChild);
}
}
delete 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 _c4d;
},destroyRendering:function(){
},destroy:function(){
this.destroyRendering();
if(!this.isClosed){
this.close(false);
}
dojo.widget.RichText.superclass.destroy.call(this);
},connect:function(_c4f,_c50,_c51){
dojo.event.connect(_c4f,_c50,this,_c51);
},disconnect:function(_c52,_c53,_c54){
dojo.event.disconnect(_c52,_c53,this,_c54);
},disconnectAllWithRoot:function(_c55){
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;
}},"html",function(){
this.contentPreFilters=[];
this.contentPostFilters=[];
this.contentDomPreFilters=[];
this.contentDomPostFilters=[];
this.styleSheets="";
this.editingAreaStyleSheets=[];
if(dojo.render.html.moz){
this.contentPreFilters.push(this._fixContentForMoz);
}
this._keyHandlers={};
});
dojo.provide("dojo.lang.type");
dojo.lang.whatAmI=function(_c57){
dojo.deprecated("dojo.lang.whatAmI","use dojo.lang.getType instead","0.5");
return dojo.lang.getType(_c57);
};
dojo.lang.whatAmI.custom={};
dojo.lang.getType=function(_c58){
try{
if(dojo.lang.isArray(_c58)){
return "array";
}
if(dojo.lang.isFunction(_c58)){
return "function";
}
if(dojo.lang.isString(_c58)){
return "string";
}
if(dojo.lang.isNumber(_c58)){
return "number";
}
if(dojo.lang.isBoolean(_c58)){
return "boolean";
}
if(dojo.lang.isAlien(_c58)){
return "alien";
}
if(dojo.lang.isUndefined(_c58)){
return "undefined";
}
for(var name in dojo.lang.whatAmI.custom){
if(dojo.lang.whatAmI.custom[name](_c58)){
return name;
}
}
if(dojo.lang.isObject(_c58)){
return "object";
}
}
catch(e){
}
return "unknown";
};
dojo.lang.isNumeric=function(_c5a){
return (!isNaN(_c5a)&&isFinite(_c5a)&&(_c5a!=null)&&!dojo.lang.isBoolean(_c5a)&&!dojo.lang.isArray(_c5a)&&!/^\s*$/.test(_c5a));
};
dojo.lang.isBuiltIn=function(_c5b){
return (dojo.lang.isArray(_c5b)||dojo.lang.isFunction(_c5b)||dojo.lang.isString(_c5b)||dojo.lang.isNumber(_c5b)||dojo.lang.isBoolean(_c5b)||(_c5b==null)||(_c5b instanceof Error)||(typeof _c5b=="error"));
};
dojo.lang.isPureObject=function(_c5c){
return ((_c5c!=null)&&dojo.lang.isObject(_c5c)&&_c5c.constructor==Object);
};
dojo.lang.isOfType=function(_c5d,type,_c5f){
var _c60=false;
if(_c5f){
_c60=_c5f["optional"];
}
if(_c60&&((_c5d===null)||dojo.lang.isUndefined(_c5d))){
return true;
}
if(dojo.lang.isArray(type)){
var _c61=type;
for(var i in _c61){
var _c63=_c61[i];
if(dojo.lang.isOfType(_c5d,_c63)){
return true;
}
}
return false;
}else{
if(dojo.lang.isString(type)){
type=type.toLowerCase();
}
switch(type){
case Array:
case "array":
return dojo.lang.isArray(_c5d);
case Function:
case "function":
return dojo.lang.isFunction(_c5d);
case String:
case "string":
return dojo.lang.isString(_c5d);
case Number:
case "number":
return dojo.lang.isNumber(_c5d);
case "numeric":
return dojo.lang.isNumeric(_c5d);
case Boolean:
case "boolean":
return dojo.lang.isBoolean(_c5d);
case Object:
case "object":
return dojo.lang.isObject(_c5d);
case "pureobject":
return dojo.lang.isPureObject(_c5d);
case "builtin":
return dojo.lang.isBuiltIn(_c5d);
case "alien":
return dojo.lang.isAlien(_c5d);
case "undefined":
return dojo.lang.isUndefined(_c5d);
case null:
case "null":
return (_c5d===null);
case "optional":
dojo.deprecated("dojo.lang.isOfType(value, [type, \"optional\"])","use dojo.lang.isOfType(value, type, {optional: true} ) instead","0.5");
return ((_c5d===null)||dojo.lang.isUndefined(_c5d));
default:
if(dojo.lang.isFunction(type)){
return (_c5d 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 _c65=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_c65[i++]];
}while(i<_c65.length&&obj);
return (obj!=dj_global)?obj:null;
};
dojo.lang.doesObjectExist=function(str){
var _c69=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_c69[i++]];
}while(i<_c69.length&&obj);
return (obj&&obj!=dj_global);
};
dojo.provide("dojo.lang.assert");
dojo.lang.assert=function(_c6c,_c6d){
if(!_c6c){
var _c6e="An assert statement failed.\n"+"The method dojo.lang.assert() was called with a 'false' value.\n";
if(_c6d){
_c6e+="Here's the assert message:\n"+_c6d+"\n";
}
throw new Error(_c6e);
}
};
dojo.lang.assertType=function(_c6f,type,_c71){
if(dojo.lang.isString(_c71)){
dojo.deprecated("dojo.lang.assertType(value, type, \"message\")","use dojo.lang.assertType(value, type) instead","0.5");
}
if(!dojo.lang.isOfType(_c6f,type,_c71)){
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(_c72,_c73,_c74){
var key;
if(!_c74){
if(!dojo.lang.assertValidKeywords._errorMessage){
dojo.lang.assertValidKeywords._errorMessage="In dojo.lang.assertValidKeywords(), found invalid keyword:";
}
_c74=dojo.lang.assertValidKeywords._errorMessage;
}
if(dojo.lang.isArray(_c73)){
for(key in _c72){
if(!dojo.lang.inArray(_c73,key)){
dojo.lang.assert(false,_c74+" "+key);
}
}
}else{
for(key in _c72){
if(!(key in _c73)){
dojo.lang.assert(false,_c74+" "+key);
}
}
}
};
dojo.provide("dojo.AdapterRegistry");
dojo.AdapterRegistry=function(_c76){
this.pairs=[];
this.returnWrappers=_c76||false;
};
dojo.lang.extend(dojo.AdapterRegistry,{register:function(name,_c78,wrap,_c7a,_c7b){
var type=(_c7b)?"unshift":"push";
this.pairs[type]([name,_c78,wrap,_c7a]);
},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,_c83,wrap,_c85){
dojo.lang.reprRegistry.register(name,_c83,wrap,_c85);
};
dojo.lang.repr=function(obj){
if(typeof (obj)=="undefined"){
return "undefined";
}else{
if(obj===null){
return "null";
}
}
try{
if(typeof (obj["__repr__"])=="function"){
return obj["__repr__"]();
}else{
if((typeof (obj["repr"])=="function")&&(obj.repr!=arguments.callee)){
return obj["repr"]();
}
}
return dojo.lang.reprRegistry.match(obj);
}
catch(e){
if(typeof (obj.NAME)=="string"&&(obj.toString==Function.prototype.toString||obj.toString==Object.prototype.toString)){
return obj.NAME;
}
}
if(typeof (obj)=="function"){
obj=(obj+"").replace(/^\s+/,"");
var idx=obj.indexOf("{");
if(idx!=-1){
obj=obj.substr(0,idx)+"{...}";
}
}
return obj+"";
};
dojo.lang.reprArrayLike=function(arr){
try{
var na=dojo.lang.map(arr,dojo.lang.repr);
return "["+na.join(", ")+"]";
}
catch(e){
}
};
(function(){
var m=dojo.lang;
m.registerRepr("arrayLike",m.isArrayLike,m.reprArrayLike);
m.registerRepr("string",m.isString,m.reprString);
m.registerRepr("numbers",m.isNumber,m.reprNumber);
m.registerRepr("boolean",m.isBoolean,m.reprNumber);
})();
dojo.provide("dojo.lang.*");
dojo.provide("dojo.widget.ColorPalette");
dojo.widget.defineWidget("dojo.widget.ColorPalette",dojo.widget.HtmlWidget,{palette:"7x10",bgIframe:null,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 _c8c=this.palettes[this.palette];
for(var i=0;i<_c8c.length;i++){
var tr=this.domNode.insertRow(-1);
for(var j=0;j<_c8c[i].length;j++){
if(_c8c[i][j].length==3){
_c8c[i][j]=_c8c[i][j].replace(/(.)(.)(.)/,"$1$1$2$2$3$3");
}
var td=tr.insertCell(-1);
with(td.style){
backgroundColor="#"+_c8c[i][j];
border="1px solid gray";
width=height="15px";
fontSize="1px";
}
td.color="#"+_c8c[i][j];
td.onmouseover=function(e){
this.style.borderColor="white";
};
td.onmouseout=function(e){
this.style.borderColor="gray";
};
dojo.event.connect(td,"onmousedown",this,"click");
td.innerHTML="&nbsp;";
}
}
if(dojo.render.html.ie){
this.bgIframe=document.createElement("<iframe frameborder='0' src='javascript:void(0);'>");
with(this.bgIframe.style){
position="absolute";
left=top="0px";
display="none";
}
dojo.body().appendChild(this.bgIframe);
dojo.html.setOpacity(this.bgIframe,0);
}
},click:function(e){
this.onColorSelect(e.currentTarget.color);
e.currentTarget.style.borderColor="gray";
},onColorSelect:function(_c94){
},hide:function(){
this.domNode.parentNode.removeChild(this.domNode);
if(this.bgIframe){
this.bgIframe.style.display="none";
}
},showAt:function(x,y){
with(this.domNode.style){
top=y+"px";
left=x+"px";
zIndex=999;
}
dojo.body().appendChild(this.domNode);
if(this.bgIframe){
with(this.bgIframe.style){
display="block";
top=y+"px";
left=x+"px";
zIndex=998;
var s=dojo.html.getMarginBox(this.domNode);
width=s.width+"px";
height=s.height+"px";
}
}
}});
dojo.provide("dojo.widget.Editor2Toolbar");
dojo.widget.Editor2ToolbarItemManager={_registeredItemHandlers:[],registerHandler:function(obj,func){
if(arguments.length==2){
this._registeredItemHandlers.push(function(){
return obj[func].apply(obj,arguments);
});
}else{
this._registeredItemHandlers.push(obj);
}
},removeHandler:function(func){
for(var i in this._registeredItemHandlers){
if(func===this._registeredItemHandlers[i]){
delete this._registeredItemHandlers[i];
return;
}
}
dojo.debug("Editor2ToolbarItemManager handler "+func+" is not registered, can not remove.");
},destroy:function(){
for(var i in this._registeredItemHandlers){
delete this._registeredItemHandlers[i];
}
},getToolbarItem:function(name){
var item;
name=name.toLowerCase();
for(var i in this._registeredItemHandlers){
item=this._registeredItemHandlers[i](name);
if(item){
break;
}
}
if(!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,{initializer:function(name){
this._name=name;
this._command=dojo.widget.Editor2Manager.getCommand(name);
},create:function(node,_ca2,_ca3){
this._domNode=node;
this.disableSelection(this._domNode);
this._parentToolbar=_ca2;
dojo.event.connect(this._domNode,"onclick",this,"onClick");
if(!_ca3){
dojo.event.connect(this._domNode,"onmouseover",this,"onMouseOver");
dojo.event.connect(this._domNode,"onmouseout",this,"onMouseOut");
}
},disableSelection:function(_ca4){
dojo.html.disableSelection(_ca4);
var _ca5=_ca4.all||_ca4.getElementsByTagName("*");
for(var x=0;x<_ca5.length;x++){
dojo.html.disableSelection(_ca5[x]);
}
},onMouseOver:function(){
if(this._command.getState()!=dojo.widget.Editor2Manager.commandState.Disabled){
this.highlightToolbarItem();
}
},onMouseOut:function(){
this.unhighlightToolbarItem();
},destroy:function(){
this._domNode=null;
delete this._command;
this._parentToolbar=null;
},onClick:function(e){
if(this._domNode&&!this._domNode.disabled&&this._command){
e.preventDefault();
e.stopPropagation();
this._command.execute();
}
},refreshState:function(){
if(this._domNode&&this._command){
var em=dojo.widget.Editor2Manager;
var _ca9=this._command.getState();
if(_ca9!=this._lastState){
switch(_ca9){
case em.commandState.Latched:
this.latchToolbarItem();
break;
case em.commandState.Enabled:
this.enableToolbarItem();
break;
case em.commandState.Disabled:
default:
this.disableToolbarItem();
}
this._lastState=_ca9;
}
return _ca9;
}
},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){
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(_caa){
this._dropdown.close();
this._command.execute(_caa);
}});
dojo.declare("dojo.widget.Editor2ToolbarFormatBlockPlainSelect",dojo.widget.Editor2ToolbarButton,{create:function(node,_cac){
this._domNode=node;
this.disableSelection(this._domNode);
this._parentToolbar=_cac;
dojo.event.connect(this._domNode,"onchange",this,"onChange");
},destroy:function(){
this._domNode=null;
this._command=null;
this._parentToolbar=null;
},onChange:function(){
if(this._domNode){
var sv=this._domNode.value.toLowerCase();
this._command.execute(sv);
}
},refreshState:function(){
if(this._domNode&&this._command){
dojo.widget.Editor2ToolbarFormatBlockPlainSelect.superclass.refreshState.call(this);
var _cae=this._command.getValue();
if(!_cae){
_cae="";
}
dojo.lang.forEach(this._domNode.options,function(item){
if(item.value.toLowerCase()==_cae.toLowerCase()){
item.selected=true;
}
});
}
}});
dojo.declare("dojo.widget.Editor2ToolbarComboItem",dojo.widget.Editor2ToolbarDropDownButton,{href:null,create:function(node,_cb1){
dojo.widget.Editor2ToolbarComboItem.superclass.create.call(this,node,_cb1);
if(!this._contentPane){
dojo.require("dojo.widget.ContentPane");
this._contentPane=dojo.widget.createWidget("ContentPane",{preload:"true"});
this._contentPane.addOnLoad(this,"setup");
this._contentPane.setUrl(this.href);
}
},onMouseOver:function(e){
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){
var name=e.currentTarget.getAttribute("dropDownItemName");
this._command.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);
},refreshState:function(){
}});
dojo.declare("dojo.widget.Editor2ToolbarFormatBlockSelect",dojo.widget.Editor2ToolbarComboItem,{href:dojo.uri.dojoUri("src/widget/templates/Editor2/EditorToolbar_FormatBlock.html"),setup:function(){
dojo.widget.Editor2ToolbarFormatBlockSelect.superclass.setup.call(this);
var _cb8=this._contentPane.domNode.all||this._contentPane.domNode.getElementsByTagName("*");
this._blockNames={};
this._blockDisplayNames={};
for(var x=0;x<_cb8.length;x++){
var node=_cb8[x];
dojo.html.disableSelection(node);
var name=node.getAttribute("dropDownItemName");
if(name){
this._blockNames[name]=node;
var _cbc=node.getElementsByTagName(name);
this._blockDisplayNames[name]=_cbc[_cbc.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(){
if(this._command){
var _cbe=this._command.getValue();
if(_cbe==this._lastSelectedFormat&&this._blockDisplayNames){
return;
}
this._lastSelectedFormat=_cbe;
var _cbf=this._domNode.getElementsByTagName("label")[0];
var _cc0=false;
if(this._blockDisplayNames){
for(var name in this._blockDisplayNames){
if(name==_cbe){
_cbf.innerHTML=this._blockDisplayNames[name];
_cc0=true;
break;
}
}
if(!_cc0){
_cbf.innerHTML="&nbsp;";
}
}
}
}});
dojo.declare("dojo.widget.Editor2ToolbarFontSizeSelect",dojo.widget.Editor2ToolbarComboItem,{href:dojo.uri.dojoUri("src/widget/templates/Editor2/EditorToolbar_FontSize.html"),setup:function(){
dojo.widget.Editor2ToolbarFormatBlockSelect.superclass.setup.call(this);
var _cc2=this._contentPane.domNode.all||this._contentPane.domNode.getElementsByTagName("*");
this._fontsizes={};
this._fontSizeDisplayNames={};
for(var x=0;x<_cc2.length;x++){
var node=_cc2[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(){
if(this._command){
var size=this._command.getValue();
if(size==this._lastSelectedSize&&this._fontSizeDisplayNames){
return;
}
this._lastSelectedSize=size;
var _cc8=this._domNode.getElementsByTagName("label")[0];
var _cc9=false;
if(this._fontSizeDisplayNames){
for(var name in this._fontSizeDisplayNames){
if(name==size){
_cc8.innerHTML=this._fontSizeDisplayNames[name];
_cc9=true;
break;
}
}
if(!_cc9){
_cc8.innerHTML="&nbsp;";
}
}
}
}});
dojo.declare("dojo.widget.Editor2ToolbarFontNameSelect",dojo.widget.Editor2ToolbarFontSizeSelect,{href:dojo.uri.dojoUri("src/widget/templates/Editor2/EditorToolbar_FontName.html")});
dojo.widget.defineWidget("dojo.widget.Editor2Toolbar",dojo.widget.HtmlWidget,{templateString:"<div dojoAttachPoint=\"domNode\" class=\"EditorToolbarDomNode\" unselectable=\"on\">\n	<table cellpadding=\"3\" cellspacing=\"0\" border=\"0\">\n		<!--\n			our toolbar should look something like:\n\n			+=======+=======+=======+=============================================+\n			| w   w | style | copy  | bo | it | un | le | ce | ri |\n			| w w w | style |=======|==============|==============|\n			|  w w  | style | paste |  undo | redo | change style |\n			+=======+=======+=======+=============================================+\n		-->\n		<tbody>\n			<tr valign=\"top\">\n				<td rowspan=\"2\">\n					<div class=\"bigIcon\" dojoAttachPoint=\"wikiWordButton\"\n						dojoOnClick=\"wikiWordClick; buttonClick;\">\n						<span style=\"font-size: 30px; margin-left: 5px;\">\n							W\n						</span>\n					</div>\n				</td>\n				<td rowspan=\"2\">\n					<div class=\"bigIcon\" dojoAttachPoint=\"styleDropdownButton\"\n						dojoOnClick=\"styleDropdownClick; buttonClick;\">\n						<span unselectable=\"on\"\n							style=\"font-size: 30px; margin-left: 5px;\">\n							S\n						</span>\n					</div>\n					<div class=\"StyleDropdownContainer\" style=\"display: none;\"\n						dojoAttachPoint=\"styleDropdownContainer\">\n						<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"\n							height=\"100%\" width=\"100%\">\n							<tr valign=\"top\">\n								<td rowspan=\"2\">\n									<div style=\"height: 245px; overflow: auto;\">\n										<div class=\"headingContainer\"\n											unselectable=\"on\"\n											dojoOnClick=\"normalTextClick\">normal</div>\n										<h1 class=\"headingContainer\"\n											unselectable=\"on\"\n											dojoOnClick=\"h1TextClick\">Heading 1</h1>\n										<h2 class=\"headingContainer\"\n											unselectable=\"on\"\n											dojoOnClick=\"h2TextClick\">Heading 2</h2>\n										<h3 class=\"headingContainer\"\n											unselectable=\"on\"\n											dojoOnClick=\"h3TextClick\">Heading 3</h3>\n										<h4 class=\"headingContainer\"\n											unselectable=\"on\"\n											dojoOnClick=\"h4TextClick\">Heading 4</h4>\n										<div class=\"headingContainer\"\n											unselectable=\"on\"\n											dojoOnClick=\"blahTextClick\">blah</div>\n										<div class=\"headingContainer\"\n											unselectable=\"on\"\n											dojoOnClick=\"blahTextClick\">blah</div>\n										<div class=\"headingContainer\"\n											unselectable=\"on\"\n											dojoOnClick=\"blahTextClick\">blah</div>\n										<div class=\"headingContainer\">blah</div>\n										<div class=\"headingContainer\">blah</div>\n										<div class=\"headingContainer\">blah</div>\n										<div class=\"headingContainer\">blah</div>\n									</div>\n								</td>\n								<!--\n								<td>\n									<span class=\"iconContainer\" dojoOnClick=\"buttonClick;\">\n										<span class=\"icon justifyleft\" \n											style=\"float: left;\">&nbsp;</span>\n									</span>\n									<span class=\"iconContainer\" dojoOnClick=\"buttonClick;\">\n										<span class=\"icon justifycenter\" \n											style=\"float: left;\">&nbsp;</span>\n									</span>\n									<span class=\"iconContainer\" dojoOnClick=\"buttonClick;\">\n										<span class=\"icon justifyright\" \n											style=\"float: left;\">&nbsp;</span>\n									</span>\n									<span class=\"iconContainer\" dojoOnClick=\"buttonClick;\">\n										<span class=\"icon justifyfull\" \n											style=\"float: left;\">&nbsp;</span>\n									</span>\n								</td>\n								-->\n							</tr>\n							<tr valign=\"top\">\n								<td>\n									thud\n								</td>\n							</tr>\n						</table>\n					</div>\n				</td>\n				<td>\n					<!-- copy -->\n					<span class=\"iconContainer\" dojoAttachPoint=\"copyButton\"\n						unselectable=\"on\"\n						dojoOnClick=\"copyClick; buttonClick;\">\n						<span class=\"icon copy\" \n							unselectable=\"on\"\n							style=\"float: left;\">&nbsp;</span> copy\n					</span>\n					<!-- \"droppable\" options -->\n					<span class=\"iconContainer\" dojoAttachPoint=\"boldButton\"\n						unselectable=\"on\"\n						dojoOnClick=\"boldClick; buttonClick;\">\n						<span class=\"icon bold\" unselectable=\"on\">&nbsp;</span>\n					</span>\n					<span class=\"iconContainer\" dojoAttachPoint=\"italicButton\"\n						dojoOnClick=\"italicClick; buttonClick;\">\n						<span class=\"icon italic\" unselectable=\"on\">&nbsp;</span>\n					</span>\n					<span class=\"iconContainer\" dojoAttachPoint=\"underlineButton\"\n						dojoOnClick=\"underlineClick; buttonClick;\">\n						<span class=\"icon underline\" unselectable=\"on\">&nbsp;</span>\n					</span>\n					<span class=\"iconContainer\" dojoAttachPoint=\"leftButton\"\n						dojoOnClick=\"leftClick; buttonClick;\">\n						<span class=\"icon justifyleft\" unselectable=\"on\">&nbsp;</span>\n					</span>\n					<span class=\"iconContainer\" dojoAttachPoint=\"fullButton\"\n						dojoOnClick=\"fullClick; buttonClick;\">\n						<span class=\"icon justifyfull\" unselectable=\"on\">&nbsp;</span>\n					</span>\n					<span class=\"iconContainer\" dojoAttachPoint=\"rightButton\"\n						dojoOnClick=\"rightClick; buttonClick;\">\n						<span class=\"icon justifyright\" unselectable=\"on\">&nbsp;</span>\n					</span>\n				</td>\n			</tr>\n			<tr>\n				<td>\n					<!-- paste -->\n					<span class=\"iconContainer\" dojoAttachPoint=\"pasteButton\"\n						dojoOnClick=\"pasteClick; buttonClick;\" unselectable=\"on\">\n						<span class=\"icon paste\" style=\"float: left;\" unselectable=\"on\">&nbsp;</span> paste\n					</span>\n					<!-- \"droppable\" options -->\n					<span class=\"iconContainer\" dojoAttachPoint=\"undoButton\"\n						dojoOnClick=\"undoClick; buttonClick;\" unselectable=\"on\">\n						<span class=\"icon undo\" style=\"float: left;\" unselectable=\"on\">&nbsp;</span> undo\n					</span>\n					<span class=\"iconContainer\" dojoAttachPoint=\"redoButton\"\n						dojoOnClick=\"redoClick; buttonClick;\" unselectable=\"on\">\n						<span class=\"icon redo\" style=\"float: left;\" unselectable=\"on\">&nbsp;</span> redo\n					</span>\n				</td>	\n			</tr>\n		</tbody>\n	</table>\n",templateCssString:".StyleDropdownContainer {\n	position: absolute;\n	z-index: 1000;\n	overflow: auto;\n	cursor: default;\n	width: 250px;\n	height: 250px;\n	background-color: white;\n	border: 1px solid black;\n}\n\n.ColorDropdownContainer {\n	position: absolute;\n	z-index: 1000;\n	overflow: auto;\n	cursor: default;\n	width: 250px;\n	height: 150px;\n	background-color: white;\n	border: 1px solid black;\n}\n\n.EditorToolbarDomNode {\n	background-image: url(buttons/bg-fade.png);\n	background-repeat: repeat-x;\n	background-position: 0px -50px;\n}\n\n.EditorToolbarSmallBg {\n	background-image: url(images/toolbar-bg.gif);\n	background-repeat: repeat-x;\n	background-position: 0px 0px;\n}\n\n/*\nbody {\n	background:url(images/blank.gif) fixed;\n}*/\n\n.IEFixedToolbar {\n	position:absolute;\n	/* top:0; */\n	top: expression(eval((document.documentElement||document.body).scrollTop));\n}\n\ndiv.bigIcon {\n	width: 40px;\n	height: 40px; \n	/* background-color: white; */\n	/* border: 1px solid #a6a7a3; */\n	font-family: Verdana, Trebuchet, Tahoma, Arial;\n}\n\n.iconContainer {\n	font-family: Verdana, Trebuchet, Tahoma, Arial;\n	font-size: 13px;\n	float: left;\n	height: 18px;\n	display: block;\n	/* background-color: white; */\n	cursor: pointer;\n	padding: 1px 4px 1px 1px; /* almost the same as a transparent border */\n	border: 0px;\n}\n\n.dojoE2TBIcon {\n	display: block;\n	text-align: center;\n	min-width: 18px;\n	width: 18px;\n	height: 18px;\n	/* background-color: #a6a7a3; */\n	background-repeat: no-repeat;\n	background-image: url(buttons/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	width: 150px;\n	height: 30px;\n	margin: 0px;\n	/* padding-left: 5px; */\n	overflow: hidden;\n	line-height: 25px;\n	border-bottom: 1px solid black;\n	border-top: 1px solid white;\n}\n\n.EditorToolbarDomNode select {\n	font-size: 14px;\n}\n \n.dojoE2TBIcon_Sep { width: 5px; min-width: 5px; max-width: 5px; background-position: 0px 0px}\n.dojoE2TBIcon_Backcolor { background-position: -18px 0px}\n.dojoE2TBIcon_Bold { background-position: -36px 0px}\n.dojoE2TBIcon_Cancel { background-position: -54px 0px}\n.dojoE2TBIcon_Copy { background-position: -72px 0px}\n.dojoE2TBIcon_Link { background-position: -90px 0px}\n.dojoE2TBIcon_Cut { background-position: -108px 0px}\n.dojoE2TBIcon_Delete { background-position: -126px 0px}\n.dojoE2TBIcon_TextColor { background-position: -144px 0px}\n.dojoE2TBIcon_BackgroundColor { background-position: -162px 0px}\n.dojoE2TBIcon_Indent { background-position: -180px 0px}\n.dojoE2TBIcon_HorizontalLine { background-position: -198px 0px}\n.dojoE2TBIcon_Image { background-position: -216px 0px}\n.dojoE2TBIcon_NumberedList { background-position: -234px 0px}\n.dojoE2TBIcon_Table { background-position: -252px 0px}\n.dojoE2TBIcon_BulletedList { background-position: -270px 0px}\n.dojoE2TBIcon_Italic { background-position: -288px 0px}\n.dojoE2TBIcon_CenterJustify { background-position: -306px 0px}\n.dojoE2TBIcon_BlockJustify { background-position: -324px 0px}\n.dojoE2TBIcon_LeftJustify { background-position: -342px 0px}\n.dojoE2TBIcon_RightJustify { background-position: -360px 0px}\n.dojoE2TBIcon_left_to_right { background-position: -378px 0px}\n.dojoE2TBIcon_list_bullet_indent { background-position: -396px 0px}\n.dojoE2TBIcon_list_bullet_outdent { background-position: -414px 0px}\n.dojoE2TBIcon_list_num_indent { background-position: -432px 0px}\n.dojoE2TBIcon_list_num_outdent { background-position: -450px 0px}\n.dojoE2TBIcon_Outdent { background-position: -468px 0px}\n.dojoE2TBIcon_Paste { 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.dojoUri("src/widget/templates/EditorToolbar.css"),ToolbarLatchedItemStyle:"ToolbarButtonLatched",ToolbarEnabledItemStyle:"ToolbarButtonEnabled",ToolbarDisabledItemStyle:"ToolbarButtonDisabled",ToolbarHighlightedItemStyle:"ToolbarButtonHighlighted",ToolbarHighlightedSelectStyle:"ToolbarSelectHighlighted",ToolbarHighlightedSelectItemStyle:"ToolbarSelectHighlightedItem",postCreate:function(){
var _ccb=dojo.html.getElementsByClass("dojoEditorToolbarItem",this.domNode);
this.items={};
for(var x=0;x<_ccb.length;x++){
var node=_ccb[x];
var _cce=node.getAttribute("dojoETItemName");
if(_cce){
var item=dojo.widget.Editor2ToolbarItemManager.getToolbarItem(_cce);
if(item){
item.create(node,this);
this.items[_cce.toLowerCase()]=item;
}else{
node.style.display="none";
}
}
}
},update:function(){
for(var cmd in this.items){
this.items[cmd].refreshState();
}
},destroy:function(){
for(var it in this.items){
this.items[it].destroy();
delete this.items[it];
}
dojo.widget.Editor2Toolbar.superclass.destroy.call(this);
}},"html",function(){
dojo.event.connect(this,"fillInTemplate",dojo.lang.hitch(this,function(){
if(dojo.render.html.ie){
this.domNode.style.zoom=1;
}
}));
});
dojo.provide("dojo.lfx.shadow");
dojo.lfx.shadow=function(node){
this.shadowPng=dojo.uri.dojoUri("src/html/images/shadow");
this.shadowThickness=8;
this.shadowOffset=15;
this.init(node);
};
dojo.extend(dojo.lfx.shadow,{init:function(node){
this.node=node;
this.pieces={};
var x1=-1*this.shadowThickness;
var y0=this.shadowOffset;
var y1=this.shadowOffset+this.shadowThickness;
this._makePiece("tl","top",y0,"left",x1);
this._makePiece("l","top",y1,"left",x1,"scale");
this._makePiece("tr","top",y0,"left",0);
this._makePiece("r","top",y1,"left",0,"scale");
this._makePiece("bl","top",0,"left",x1);
this._makePiece("b","top",0,"left",0,"crop");
this._makePiece("br","top",0,"left",0);
},_makePiece:function(name,_cd8,_cd9,_cda,_cdb,_cdc){
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+"'"+(_cdc?", sizingMethod='"+_cdc+"'":"")+")";
}else{
img=dojo.doc().createElement("img");
img.src=url;
}
img.style.position="absolute";
img.style[_cd8]=_cd9+"px";
img.style[_cda]=_cdb+"px";
img.style.width=this.shadowThickness+"px";
img.style.height=this.shadowThickness+"px";
this.pieces[name]=img;
this.node.appendChild(img);
},size:function(_cdf,_ce0){
var _ce1=_ce0-(this.shadowOffset+this.shadowThickness+1);
if(_ce1<0){
_ce1=0;
}
if(_ce0<1){
_ce0=1;
}
if(_cdf<1){
_cdf=1;
}
with(this.pieces){
l.style.height=_ce1+"px";
r.style.height=_ce1+"px";
b.style.width=(_cdf-1)+"px";
bl.style.top=(_ce0-1)+"px";
b.style.top=(_ce0-1)+"px";
br.style.top=(_ce0-1)+"px";
tr.style.left=(_cdf-1)+"px";
r.style.left=(_cdf-1)+"px";
br.style.left=(_cdf-1)+"px";
}
}});
dojo.provide("dojo.widget.html.layout");
dojo.widget.html.layout=function(_ce2,_ce3,_ce4){
dojo.html.addClass(_ce2,"dojoLayoutContainer");
_ce3=dojo.lang.filter(_ce3,function(_ce5,idx){
_ce5.idx=idx;
return dojo.lang.inArray(["top","bottom","left","right","client","flood"],_ce5.layoutAlign);
});
if(_ce4&&_ce4!="none"){
var rank=function(_ce8){
switch(_ce8.layoutAlign){
case "flood":
return 1;
case "left":
case "right":
return (_ce4=="left-right")?2:3;
case "top":
case "bottom":
return (_ce4=="left-right")?3:2;
default:
return 4;
}
};
_ce3.sort(function(a,b){
return (rank(a)-rank(b))||(a.idx-b.idx);
});
}
var f={top:dojo.html.getPixelValue(_ce2,"padding-top",true),left:dojo.html.getPixelValue(_ce2,"padding-left",true)};
dojo.lang.mixin(f,dojo.html.getContentBox(_ce2));
dojo.lang.forEach(_ce3,function(_cec){
var elm=_cec.domNode;
var pos=_cec.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";
}
}else{
if(pos=="left"||pos=="right"){
var w=dojo.html.getMarginBox(elm).width;
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"){
dojo.html.setMarginBox(elm,{width:f.width,height:f.height});
}
}
}
if(_cec.onResized){
_cec.onResized();
}
});
};
dojo.html.insertCssText(".dojoLayoutContainer{ position: relative; display: block; }\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.dnd.DragAndDrop");
dojo.declare("dojo.dnd.DragSource",null,{type:"",onDragEnd:function(){
},onDragStart:function(){
},onSelected:function(){
},unregister:function(){
dojo.dnd.dragManager.unregisterDragSource(this);
},reregister:function(){
dojo.dnd.dragManager.registerDragSource(this);
}},function(){
var dm=dojo.dnd.dragManager;
if(dm["registerDragSource"]){
dm.registerDragSource(this);
}
});
dojo.declare("dojo.dnd.DragObject",null,{type:"",onDragStart:function(){
},onDragMove:function(){
},onDragOver:function(){
},onDragOut:function(){
},onDragEnd:function(){
},onDragLeave:this.onDragOut,onDragEnter:this.onDragOver,ondragout:this.onDragOut,ondragover:this.onDragOver},function(){
var dm=dojo.dnd.dragManager;
if(dm["registerDragObject"]){
dm.registerDragObject(this);
}
});
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(_cf4){
if(!dojo.lang.inArray(this.acceptedTypes,"*")){
for(var i=0;i<_cf4.length;i++){
if(!dojo.lang.inArray(this.acceptedTypes,_cf4[i].type)){
return false;
}
}
}
return true;
},unregister:function(){
dojo.dnd.dragManager.unregisterDropTarget(this);
},onDragOver:function(){
},onDragOut:function(){
},onDragMove:function(){
},onDropStart:function(){
},onDrop:function(){
},onDropEnd:function(){
}},function(){
if(this.constructor==dojo.dnd.DropTarget){
return;
}
this.acceptedTypes=[];
dojo.dnd.dragManager.registerDropTarget(this);
});
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(){
},dropTargets:[],registerDropTarget:function(){
},lastDragTarget:null,currentDragTarget:null,onKeyDown:function(){
},onMouseOut:function(){
},onMouseMove:function(){
},onMouseUp:function(){
}});
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:[],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 _cf9=dp+"Idx_"+(this.dsCounter++);
ds.dragSourceId=_cf9;
this.dragSources[_cf9]=ds;
ds.domNode.setAttribute(dp,_cf9);
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 _cfc=ds.dragSourceId;
delete ds.dragSourceId;
delete this.dragSources[_cfc];
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 _cff=dojo.lang.find(this.dropTargets,dt,true);
if(_cff>=0){
this.dropTargets.splice(_cff,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 _d05=e.target.nodeType==dojo.html.TEXT_NODE?e.target.parentNode:e.target;
if(dojo.html.isTag(_d05,"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,_d08){
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(_d09){
var ret=null;
if(!_d09){
return;
}
if(this.currentDropTarget){
e.dragObject=_d09;
var ce=this.currentDropTarget.domNode.childNodes;
if(ce.length>0){
e.dropTarget=ce[0];
while(e.dropTarget==_d09.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{
_d09.dragSource.onDragEnd(e);
}
catch(err){
var _d0c={};
for(var i in e){
if(i=="type"){
_d0c.type="mouseup";
continue;
}
_d0c[i]=e[i];
}
_d09.dragSource.onDragEnd(_d0c);
}
},function(){
_d09.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(_d15){
var tn=_d15.domNode;
if(!tn||dojo.lang.find(_d15.acceptedTypes,this.dragSource.type)<0){
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],_d15]);
},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(_d1c){
if(!_d1c){
return;
}
var tdo=_d1c.onDragStart(e);
if(tdo){
tdo.onDragStart(e);
tdo.dragOffset.y+=dy;
tdo.dragOffset.x+=dx;
tdo.dragSource=_d1c;
this.dragObjects.push(tdo);
}
},this);
this.previousDropTarget=null;
this.cacheTargetLocations();
}
dojo.lang.forEach(this.dragObjects,function(_d1e){
if(_d1e){
_d1e.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 _d21=this.findBestTarget(e);
if(_d21.target===null){
if(this.currentDropTarget){
this.currentDropTarget.onDragOut(e);
this.previousDropTarget=this.currentDropTarget;
this.currentDropTarget=null;
}
this.dropAcceptable=false;
return;
}
if(this.currentDropTarget!==_d21.target){
if(this.currentDropTarget){
this.previousDropTarget=this.currentDropTarget;
this.currentDropTarget.onDragOut(e);
}
this.currentDropTarget=_d21.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 _d23=this;
var _d24=new Object();
_d24.target=null;
_d24.points=null;
dojo.lang.every(this.dropTargetDimensions,function(_d25){
if(!_d23.isInsideBox(e,_d25)){
return true;
}
_d24.target=_d25[2];
_d24.points=_d25;
return Boolean(_d23.nestedTargets);
});
return _d24;
},isInsideBox:function(e,_d27){
if((e.pageX>_d27[0][0])&&(e.pageX<_d27[1][0])&&(e.pageY>_d27[0][1])&&(e.pageY<_d27[1][1])){
return true;
}
return false;
},onMouseOver:function(e){
},onMouseOut:function(e){
}});
dojo.dnd.dragManager=new dojo.dnd.HtmlDragManager();
(function(){
var d=document;
var dm=dojo.dnd.dragManager;
dojo.event.connect(d,"onkeydown",dm,"onKeyDown");
dojo.event.connect(d,"onmouseover",dm,"onMouseOver");
dojo.event.connect(d,"onmouseout",dm,"onMouseOut");
dojo.event.connect(d,"onmousedown",dm,"onMouseDown");
dojo.event.connect(d,"onmouseup",dm,"onMouseUp");
dojo.event.connect(window,"onscroll",dm,"onScroll");
})();
dojo.provide("dojo.dnd.HtmlDragAndDrop");
dojo.declare("dojo.dnd.HtmlDragSource",dojo.dnd.DragSource,{dragClass:"",onDragStart:function(){
var _d2c=new dojo.dnd.HtmlDragObject(this.dragObject,this.type);
if(this.dragClass){
_d2c.dragClass=this.dragClass;
}
if(this.constrainToContainer){
_d2c.constrainTo(this.constrainingContainer||this.domNode.parentNode);
}
return _d2c;
},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(_d2f){
this.constrainToContainer=true;
if(_d2f){
this.constrainingContainer=_d2f;
}
},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(arguments[i]);
}
}},function(node,type){
node=dojo.byId(node);
this.dragObjects=[];
this.constrainToContainer=false;
if(node){
this.domNode=node;
this.dragObject=node;
dojo.dnd.DragSource.call(this);
this.type=(type)||(this.domNode.nodeName.toLowerCase());
}
});
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);
}
if(node.tagName.toLowerCase()=="tr"){
var doc=this.domNode.ownerDocument;
var _d37=doc.createElement("table");
var _d38=doc.createElement("tbody");
_d37.appendChild(_d38);
_d38.appendChild(node);
var _d39=this.domNode.childNodes;
var _d3a=node.childNodes;
for(var i=0;i<_d39.length;i++){
if((_d3a[i])&&(_d3a[i].style)){
_d3a[i].style.width=dojo.html.getContentBox(_d39[i]).width+"px";
}
}
node=_d37;
}
if((dojo.render.html.ie55||dojo.render.html.ie60)&&this.createIframe){
with(node.style){
top="0px";
left="0px";
}
var _d3c=document.createElement("div");
_d3c.appendChild(node);
this.bgIframe=new dojo.html.BackgroundIframe(_d3c);
_d3c.appendChild(this.bgIframe.iframe);
node=_d3c;
}
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.connect(this.domNode,"onclick",this,"squelchOnClick");
dojo.event.topic.publish("dragStart",{source:this});
},getConstraints:function(){
if(this.constrainingContainer.nodeName.toLowerCase()=="body"){
var _d3e=dojo.html.getViewport();
var _d3f=_d3e.width;
var _d40=_d3e.height;
var x=0;
var y=0;
}else{
var _d43=dojo.html.getContentBox(this.constrainingContainer);
_d3f=_d43.width;
_d40=_d43.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+_d3f-mb.width,maxY:y+_d40-mb.height};
},updateDragOffset:function(){
var _d45=dojo.html.getScroll().offset;
if(_d45.y!=this.scrollOffset.y){
var diff=_d45.y-this.scrollOffset.y;
this.dragOffset.y+=diff;
this.scrollOffset.y=_d45.y;
}
if(_d45.x!=this.scrollOffset.x){
var diff=_d45.x-this.scrollOffset.x;
this.dragOffset.x+=diff;
this.scrollOffset.x=_d45.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 _d4d=dojo.html.getAbsolutePosition(this.dragClone,true);
var _d4e={left:this.dragStartPosition.x+1,top:this.dragStartPosition.y+1};
var anim=dojo.lfx.slideTo(this.dragClone,_d4e,500,dojo.lfx.easeOut);
var _d50=this;
dojo.event.connect(anim,"onEnd",function(e){
dojo.lang.setTimeout(function(){
dojo.html.removeNode(_d50.dragClone);
_d50.dragClone=null;
},200);
});
anim.play();
break;
}
dojo.event.topic.publish("dragEnd",{source:this});
},squelchOnClick:function(e){
dojo.event.browser.stopEvent(e);
dojo.lang.setTimeout(function(){
dojo.event.disconnect(this.domNode,"onclick",this,"squelchOnClick");
},50);
},constrainTo:function(_d53){
this.constrainToContainer=true;
if(_d53){
this.constrainingContainer=_d53;
}else{
this.constrainingContainer=this.domNode.parentNode;
}
}},function(node,type){
this.domNode=dojo.byId(node);
this.type=type;
this.constrainToContainer=false;
this.dragSource=null;
});
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,_d58;i<this.domNode.childNodes.length;i++){
_d58=this.domNode.childNodes[i];
if(_d58.nodeType!=dojo.html.ELEMENT_NODE){
continue;
}
var pos=dojo.html.getAbsolutePosition(_d58,true);
var _d5a=dojo.html.getBorderBox(_d58);
this.childBoxes.push({top:pos.y,bottom:pos.y+_d5a.height,left:pos.x,right:pos.x+_d5a.width,height:_d5a.height,width:_d5a.width,node:_d58});
}
return true;
},_getNodeUnderMouse:function(e){
for(var i=0,_d5d;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,_d5f){
var i=this._getNodeUnderMouse(e);
if(!this.dropIndicator){
this.createDropIndicator();
}
var _d61=this.vertical?dojo.html.gravity.WEST:dojo.html.gravity.NORTH;
var hide=false;
if(i<0){
if(this.childBoxes.length){
var _d63=(dojo.html.gravity(this.childBoxes[0].node,e)&_d61);
if(_d63){
hide=true;
}
}else{
var _d63=true;
}
}else{
var _d64=this.childBoxes[i];
var _d63=(dojo.html.gravity(_d64.node,e)&_d61);
if(_d64.node===_d5f[0].dragSource.domNode){
hide=true;
}else{
var _d65=_d63?(i>0?this.childBoxes[i-1]:_d64):(i<this.childBoxes.length-1?this.childBoxes[i+1]:_d64);
if(_d65.node===_d5f[0].dragSource.domNode){
hide=true;
}
}
}
if(hide){
this.dropIndicator.style.display="none";
return;
}else{
this.dropIndicator.style.display="";
}
this.placeIndicator(e,_d5f,i,_d63);
if(!dojo.html.hasParent(this.dropIndicator)){
dojo.body().appendChild(this.dropIndicator);
}
},placeIndicator:function(e,_d67,_d68,_d69){
var _d6a=this.vertical?"left":"top";
var _d6b;
if(_d68<0){
if(this.childBoxes.length){
_d6b=_d69?this.childBoxes[0]:this.childBoxes[this.childBoxes.length-1];
}else{
this.dropIndicator.style[_d6a]=dojo.html.getAbsolutePosition(this.domNode,true)[this.vertical?"x":"y"]+"px";
}
}else{
_d6b=this.childBoxes[_d68];
}
if(_d6b){
this.dropIndicator.style[_d6a]=(_d69?_d6b[_d6a]:_d6b[this.vertical?"right":"bottom"])+"px";
if(this.vertical){
this.dropIndicator.style.height=_d6b.height+"px";
this.dropIndicator.style.top=_d6b.top+"px";
}else{
this.dropIndicator.style.width=_d6b.width+"px";
this.dropIndicator.style.left=_d6b.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 _d6f=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)&_d6f){
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 _d70=this.childBoxes[i];
if(dojo.html.gravity(_d70.node,e)&_d6f){
return this.insert(e,_d70.node,"before");
}else{
return this.insert(e,_d70.node,"after");
}
},insert:function(e,_d72,_d73){
var node=e.dragObject.domNode;
if(_d73=="before"){
return dojo.html.insertBefore(node,_d72);
}else{
if(_d73=="after"){
return dojo.html.insertAfter(node,_d72);
}else{
if(_d73=="append"){
_d72.appendChild(node);
return true;
}
}
}
return false;
}},function(node,_d76){
if(arguments.length==0){
return;
}
this.domNode=dojo.byId(node);
dojo.dnd.DropTarget.call(this);
if(_d76&&dojo.lang.isString(_d76)){
_d76=[_d76];
}
this.acceptedTypes=_d76||[];
});
dojo.provide("dojo.dnd.*");
dojo.provide("dojo.dnd.HtmlDragMove");
dojo.declare("dojo.dnd.HtmlDragMoveSource",dojo.dnd.HtmlDragSource,{onDragStart:function(){
var _d77=new dojo.dnd.HtmlDragMoveObject(this.dragObject,this.type);
if(this.constrainToContainer){
_d77.constrainTo(this.constrainingContainer);
}
return _d77;
},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,{onDragEnd:function(e){
dojo.event.connect(this.domNode,"onclick",this,"squelchOnClick");
},onDragStart:function(e){
dojo.html.clearSelection();
this.dragClone=this.domNode;
this.scrollOffset=dojo.html.getScroll().offset;
this.dragStartPosition=dojo.html.abs(this.domNode,true);
this.dragOffset={y:this.dragStartPosition.y-e.pageY,x:this.dragStartPosition.x-e.pageX};
this.containingBlockPosition=this.domNode.offsetParent?dojo.html.abs(this.domNode.offsetParent,true):{x:0,y:0};
this.dragClone.style.position="absolute";
if(this.constrainToContainer){
this.constraints=this.getConstraints();
}
},setAbsolutePosition:function(x,y){
if(!this.disableY){
this.domNode.style.top=(y-this.containingBlockPosition.y)+"px";
}
if(!this.disableX){
this.domNode.style.left=(x-this.containingBlockPosition.x)+"px";
}
}});
dojo.provide("dojo.widget.Dialog");
dojo.declare("dojo.widget.ModalDialogBase",null,{isContainer:true,shared:{bg:null,bgIframe:null},focusElement:"",bgColor:"black",bgOpacity:0.4,followScroll:true,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 _d7f=this;
setTimeout(function(){
_d7f._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);
if(!this.shared.bg){
this.shared.bg=document.createElement("div");
this.shared.bg.className="dialogUnderlay";
with(this.shared.bg.style){
position="absolute";
left=top="0px";
zIndex=998;
display="none";
}
this.setBackgroundColor(this.bgColor);
b.appendChild(this.shared.bg);
this.shared.bgIframe=new dojo.html.BackgroundIframe(this.shared.bg);
}
},setBackgroundColor:function(_d81){
if(arguments.length>=3){
_d81=new dojo.gfx.color.Color(arguments[0],arguments[1],arguments[2]);
}else{
_d81=new dojo.gfx.color.Color(_d81);
}
this.shared.bg.style.backgroundColor=_d81.toString();
return this.bgColor=_d81;
},setBackgroundOpacity:function(op){
if(arguments.length==0){
op=this.bgOpacity;
}
dojo.html.setOpacity(this.shared.bg,op);
try{
this.bgOpacity=dojo.html.getOpacity(this.shared.bg);
}
catch(e){
this.bgOpacity=op;
}
return this.bgOpacity;
},_sizeBackground:function(){
if(this.bgOpacity>0){
var _d83=dojo.html.getViewport();
var h=_d83.height;
var w=_d83.width;
with(this.shared.bg.style){
width=w+"px";
height=h+"px";
}
var _d86=dojo.html.getScroll().offset;
this.shared.bg.style.top=_d86.y+"px";
this.shared.bg.style.left=_d86.x+"px";
var _d83=dojo.html.getViewport();
if(_d83.width!=w){
this.shared.bg.style.width=_d83.width+"px";
}
if(_d83.height!=h){
this.shared.bg.style.height=_d83.height+"px";
}
}
},_showBackground:function(){
if(this.bgOpacity>0){
this.shared.bg.style.display="block";
}
},placeModalDialog:function(){
var _d87=dojo.html.getScroll().offset;
var _d88=dojo.html.getViewport();
var mb=dojo.html.getMarginBox(this.containerNode);
var x=_d87.x+(_d88.width-mb.width)/2;
var y=_d87.y+(_d88.height-mb.height)/2;
with(this.domNode.style){
left=x+"px";
top=y+"px";
}
},showModalDialog:function(){
if(this.followScroll&&!this._scrollConnected){
this._scrollConnected=true;
dojo.event.connect(window,"onscroll",this,"_onScroll");
}
this.setBackgroundOpacity();
this._sizeBackground();
this._showBackground();
},hideModalDialog:function(){
if(this.focusElement){
dojo.byId(this.focusElement).focus();
dojo.byId(this.focusElement).blur();
}
this.shared.bg.style.display="none";
this.shared.bg.style.width=this.shared.bg.style.height="1px";
if(this._scrollConnected){
this._scrollConnected=false;
dojo.event.disconnect(window,"onscroll",this,"_onScroll");
}
},_onScroll:function(){
var _d8c=dojo.html.getScroll().offset;
this.shared.bg.style.top=_d8c.y+"px";
this.shared.bg.style.left=_d8c.x+"px";
this.placeModalDialog();
},checkSize:function(){
if(this.isShowing()){
this._sizeBackground();
this.placeModalDialog();
this.onResized();
}
}});
dojo.widget.defineWidget("dojo.widget.Dialog",[dojo.widget.ContentPane,dojo.widget.ModalDialogBase],{templateString:"<div id=\"${this.widgetId}\" class=\"dojoDialog\" dojoattachpoint=\"wrapper\">\n	<span dojoattachpoint=\"tabStartOuter\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\"	tabindex=\"0\"></span>\n	<span dojoattachpoint=\"tabStart\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n	<div dojoattachpoint=\"containerNode\" style=\"position: relative; z-index: 2;\"></div>\n	<span dojoattachpoint=\"tabEnd\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n	<span dojoattachpoint=\"tabEndOuter\" dojoonfocus=\"trapTabs\" dojoonblur=\"clearTrap\" tabindex=\"0\"></span>\n</div>\n",blockDuration:0,lifetime:0,show:function(){
if(this.lifetime){
this.timeRemaining=this.lifetime;
if(!this.blockDuration){
dojo.event.connect(this.shared.bg,"onclick",this,"hide");
}else{
dojo.event.disconnect(this.shared.bg,"onclick",this,"hide");
}
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";
}
}
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=node;
dojo.event.connect(node,"onclick",this,"hide");
},setShowControl:function(node){
dojo.event.connect(node,"onclick",this,"show");
},_onTick:function(){
if(this.timer){
this.timeRemaining-=100;
if(this.lifetime-this.timeRemaining>=this.blockDuration){
dojo.event.connect(this.shared.bg,"onclick",this,"hide");
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,{isSizing:false,startPoint:null,startSize:null,minSize:null,targetElmId:"",templateCssString:".dojoHtmlResizeHandle {\n	float: right;\n	position: absolute;\n	right: 2px;\n	bottom: 2px;\n	width: 13px;\n	height: 13px;\n	z-index: 20;\n	cursor: nw-resize;\n	background-image: url(grabCorner.gif);\n	line-height: 0px;\n}",templateCssPath:dojo.uri.dojoUri("src/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.widget.FloatingPane");
dojo.declare("dojo.widget.FloatingPaneBase",null,{title:"",iconSrc:"",hasShadow:false,constrainToContainer:false,taskBarId:"",resizable:true,titleBarDisplay:true,windowState:"normal",displayCloseAction:false,displayMinimizeAction:false,displayMaximizeAction:false,_max_taskBarConnectAttempts:5,_taskBarConnectAttempts:0,templateString:"<div id=\"${this.widgetId}\" dojoAttachEvent=\"onMouseDown\" class=\"dojoFloatingPane\">\n	<div dojoAttachPoint=\"titleBar\" class=\"dojoFloatingPaneTitleBar\"  style=\"display:none\">\n	  	<img dojoAttachPoint=\"titleBarIcon\"  class=\"dojoFloatingPaneTitleBarIcon\">\n		<div dojoAttachPoint=\"closeAction\" dojoAttachEvent=\"onClick:closeWindow\"\n   	  		class=\"dojoFloatingPaneCloseIcon\"></div>\n		<div dojoAttachPoint=\"restoreAction\" dojoAttachEvent=\"onClick:restoreWindow\"\n   	  		class=\"dojoFloatingPaneRestoreIcon\"></div>\n		<div dojoAttachPoint=\"maximizeAction\" dojoAttachEvent=\"onClick:maximizeWindow\"\n   	  		class=\"dojoFloatingPaneMaximizeIcon\"></div>\n		<div dojoAttachPoint=\"minimizeAction\" dojoAttachEvent=\"onClick:minimizeWindow\"\n   	  		class=\"dojoFloatingPaneMinimizeIcon\"></div>\n	  	<div dojoAttachPoint=\"titleBarText\" class=\"dojoFloatingPaneTitleText\">${this.title}</div>\n	</div>\n\n	<div id=\"${this.widgetId}_container\" dojoAttachPoint=\"containerNode\" class=\"dojoFloatingPaneClient\"></div>\n\n	<div dojoAttachPoint=\"resizeBar\" class=\"dojoFloatingPaneResizebar\" style=\"display:none\"></div>\n</div>",templateCssString:"\n/********** Outer Window ***************/\n\n.dojoFloatingPane {\n	/* essential css */\n	position: absolute;\n	overflow: visible;		/* so drop shadow is displayed */\n	z-index: 10;\n\n	/* styling css */\n	border: 1px solid;\n	border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;\n	background-color: ThreeDFace;\n}\n\n\n/********** Title Bar ****************/\n\n.dojoFloatingPaneTitleBar {\n	vertical-align: top;\n	margin: 2px 2px 2px 2px;\n	z-index: 10;\n	background-color: #7596c6;\n	cursor: default;\n	overflow: hidden;\n	border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;\n	vertical-align: middle;\n}\n\n.dojoFloatingPaneTitleText {\n	float: left;\n	padding: 2px 4px 2px 2px;\n	white-space: nowrap;\n	color: CaptionText;\n	font: small-caption;\n}\n\n.dojoTitleBarIcon {\n	float: left;\n	height: 22px;\n	width: 22px;\n	vertical-align: middle;\n	margin-right: 5px;\n	margin-left: 5px;\n}\n\n.dojoFloatingPaneActions{\n	float: right;\n	position: absolute;\n	right: 2px;\n	top: 2px;\n	vertical-align: middle;\n}\n\n\n.dojoFloatingPaneActionItem {\n	vertical-align: middle;\n	margin-right: 1px;\n	height: 22px;\n	width: 22px;\n}\n\n\n.dojoFloatingPaneTitleBarIcon {\n	/* essential css */\n	float: left;\n\n	/* styling css */\n	margin-left: 2px;\n	margin-right: 4px;\n	height: 22px;\n}\n\n/* minimize/maximize icons are specified by CSS only */\n.dojoFloatingPaneMinimizeIcon,\n.dojoFloatingPaneMaximizeIcon,\n.dojoFloatingPaneRestoreIcon,\n.dojoFloatingPaneCloseIcon {\n	vertical-align: middle;\n	height: 22px;\n	width: 22px;\n	float: right;\n}\n.dojoFloatingPaneMinimizeIcon {\n	background-image: url(images/floatingPaneMinimize.gif);\n}\n.dojoFloatingPaneMaximizeIcon {\n	background-image: url(images/floatingPaneMaximize.gif);\n}\n.dojoFloatingPaneRestoreIcon {\n	background-image: url(images/floatingPaneRestore.gif);\n}\n.dojoFloatingPaneCloseIcon {\n	background-image: url(images/floatingPaneClose.gif);\n}\n\n/* bar at bottom of window that holds resize handle */\n.dojoFloatingPaneResizebar {\n	z-index: 10;\n	height: 13px;\n	background-color: ThreeDFace;\n}\n\n/************* Client Area ***************/\n\n.dojoFloatingPaneClient {\n	position: relative;\n	z-index: 10;\n	border: 1px solid;\n	border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;\n	margin: 2px;\n	background-color: ThreeDFace;\n	padding: 8px;\n	font-family: Verdana, Helvetica, Garamond, sans-serif;\n	font-size: 12px;\n	overflow: auto;\n}\n\n",templateCssPath:dojo.uri.dojoUri("src/widget/templates/FloatingPane.css"),fillInFloatingPaneTemplate:function(args,frag){
var _d9b=this.getFragNodeRef(frag);
dojo.html.copyStyle(this.domNode,_d9b);
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 _da0=dojo.html.getViewport();
var _da1=dojo.html.getPadding(dojo.body());
this.resizeTo(_da0.width-_da1.width,_da0.height-_da1.height);
}else{
var _da2=dojo.html.getContentBox(this.domNode.parentNode);
this.resizeTo(_da2.width,_da2.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 _da9=dojo.widget.manager.getWidgetsByType(this.widgetType);
var _daa=[];
for(var x=0;x<_da9.length;x++){
if(this.widgetId!=_da9[x].widgetId){
_daa.push(_da9[x]);
}
}
_daa.sort(function(a,b){
return a.domNode.style.zIndex-b.domNode.style.zIndex;
});
_daa.push(this);
var _dae=100;
for(x=0;x<_daa.length;x++){
_daa[x].domNode.style.zIndex=_dae+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 _db0=dojo.widget.getWidgetById(this.taskBarId);
if(!_db0){
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;
}
_db0.addChild(this);
},showFloatingPane:function(){
this.bringToTop();
},onFloatingPaneShow:function(){
var mb=dojo.html.getMarginBox(this.domNode);
this.resizeTo(mb.width,mb.height);
},resizeTo:function(_db2,_db3){
dojo.html.setMarginBox(this.domNode,{width:_db2,height:_db3});
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(_db2,_db3);
}
this.onResized();
},checkSize:function(){
}});
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();
}});
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(){
dojo.widget.ModalFloatingPane.superclass.show.apply(this,arguments);
this.showModalDialog();
this.placeModalDialog();
this.shared.bg.style.zIndex=this.domNode.style.zIndex-1;
},hide:function(){
this.hideModalDialog();
dojo.widget.ModalFloatingPane.superclass.hide.apply(this,arguments);
},closeWindow:function(){
this.hide();
dojo.widget.ModalFloatingPane.superclass.closeWindow.apply(this,arguments);
}});
dojo.provide("dojo.widget.Editor2Plugin.AlwaysShowToolbar");
dojo.event.topic.subscribe("dojo.widget.Editor2::onLoad",function(_db6){
if(_db6.toolbarAlwaysVisible){
var p=new dojo.widget.Editor2Plugin.AlwaysShowToolbar(_db6);
}
});
dojo.declare("dojo.widget.Editor2Plugin.AlwaysShowToolbar",null,function(_db8){
this.editor=_db8;
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 _dbe=dh.getMarginBox(this.editor.domNode).width;
this._scrollThreshold=dh.abs(tdn,true).y;
if((isIE)&&(db)&&(dh.getStyle(db,"background-image")=="none")){
with(db.style){
backgroundImage="url("+dojo.uri.dojoUri("src/widget/templates/images/blank.gif")+")";
backgroundAttachment="fixed";
}
}
}
var _dbf=(window["pageYOffset"])?window["pageYOffset"]:(document["documentElement"]||document["body"]).scrollTop;
if(_dbf>this._scrollThreshold){
if(!this._fixEnabled){
var _dc0=dojo.html.getMarginBox(tdn);
this.editor.editorObject.style.marginTop=_dc0.height+"px";
if(isIE){
tdn.style.left=dojo.html.abs(tdn,dojo.html.boxSizing.MARGIN_BOX).x;
dojo.body().appendChild(tdn);
dojo.html.addClass(tdn,"IEFixedToolbar");
}else{
with(tdn.style){
position="fixed";
top="0px";
}
}
tdn.style.width=_dc0.width+"px";
tdn.style.zIndex=1000;
this._fixEnabled=true;
}
if(!dojo.render.html.safari){
var _dc1=(this.height)?parseInt(this.editor.height):this.editor._lastHeight;
if(_dbf>(this._scrollThreshold+_dc1)){
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");
dojo.html.insertBefore(tdn,this.editor.object||this.editor.iframe);
}
tdn.style.width="";
this._fixEnabled=false;
}
}
},destroy:function(){
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={_currentInstance:null,_loadedCommands:{},commandState:{Disabled:0,Latched:1,Enabled:2},getCurrentInstance:function(){
return this._currentInstance;
},setCurrentInstance:function(inst){
this._currentInstance=inst;
},registerCommand:function(name,cmd){
name=name.toLowerCase();
if(this._loadedCommands[name]){
delete this._loadedCommands[name];
}
this._loadedCommands[name]=cmd;
},getCommand:function(name){
name=name.toLowerCase();
var _dc6=this._loadedCommands[name];
if(_dc6){
return _dc6;
}
switch(name){
case "htmltoggle":
_dc6=new dojo.widget.Editor2BrowserCommand(name);
break;
case "formatblock":
_dc6=new dojo.widget.Editor2FormatBlockCommand(name);
break;
case "anchor":
_dc6=new dojo.widget.Editor2Command(name);
break;
case "createlink":
_dc6=new dojo.widget.Editor2DialogCommand(name,{contentFile:"dojo.widget.Editor2Plugin.CreateLinkDialog",contentClass:"Editor2CreateLinkDialog",title:"Insert/Edit Link",width:"300px",height:"200px"});
break;
case "insertimage":
_dc6=new dojo.widget.Editor2DialogCommand(name,{contentFile:"dojo.widget.Editor2Plugin.InsertImageDialog",contentClass:"Editor2InsertImageDialog",title:"Insert/Edit Image",width:"400px",height:"270px"});
break;
default:
var _dc7=this.getCurrentInstance();
if((_dc7&&_dc7.queryCommandAvailable(name))||(!_dc7&&dojo.widget.Editor2.prototype.queryCommandAvailable(name))){
_dc6=new dojo.widget.Editor2BrowserCommand(name);
}else{
dojo.debug("dojo.widget.Editor2Manager.getCommand: Unknown command "+name);
return;
}
}
this._loadedCommands[name]=_dc6;
return _dc6;
},destroy:function(){
this._currentInstance=null;
for(var cmd in this._loadedCommands){
this._loadedCommands[cmd].destory();
}
}};
dojo.addOnUnload(dojo.widget.Editor2Manager,"destroy");
dojo.lang.declare("dojo.widget.Editor2Command",null,{initializer:function(name){
this._name=name;
},execute:function(para){
dojo.unimplemented("dojo.widget.Editor2Command.execute");
},getState:function(){
return dojo.widget.Editor2Manager.commandState.Enabled;
},destory:function(){
}});
dojo.lang.declare("dojo.widget.Editor2BrowserCommand",dojo.widget.Editor2Command,{execute:function(para){
var _dcc=dojo.widget.Editor2Manager.getCurrentInstance();
if(_dcc){
_dcc.execCommand(this._name,para);
}
},getState:function(){
var _dcd=dojo.widget.Editor2Manager.getCurrentInstance();
if(_dcd){
try{
if(_dcd.queryCommandEnabled(this._name)){
if(_dcd.queryCommandState(this._name)){
return dojo.widget.Editor2Manager.commandState.Latched;
}else{
return dojo.widget.Editor2Manager.commandState.Enabled;
}
}else{
return dojo.widget.Editor2Manager.commandState.Disabled;
}
}
catch(e){
return dojo.widget.Editor2Manager.commandState.Enabled;
}
}
return dojo.widget.Editor2Manager.commandState.Disabled;
},getValue:function(){
var _dce=dojo.widget.Editor2Manager.getCurrentInstance();
if(_dce){
try{
return _dce.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}\" dojoAttachEvent=\"onMouseDown\" class=\"dojoFloatingPane\">\n	<div dojoAttachPoint=\"titleBar\" class=\"dojoFloatingPaneTitleBar\"  style=\"display:none\">\n	  	<img dojoAttachPoint=\"titleBarIcon\"  class=\"dojoFloatingPaneTitleBarIcon\">\n		<div dojoAttachPoint=\"closeAction\" dojoAttachEvent=\"onClick:hide\"\n   	  		class=\"dojoFloatingPaneCloseIcon\"></div>\n		<div dojoAttachPoint=\"restoreAction\" dojoAttachEvent=\"onClick:restoreWindow\"\n   	  		class=\"dojoFloatingPaneRestoreIcon\"></div>\n		<div dojoAttachPoint=\"maximizeAction\" dojoAttachEvent=\"onClick:maximizeWindow\"\n   	  		class=\"dojoFloatingPaneMaximizeIcon\"></div>\n		<div dojoAttachPoint=\"minimizeAction\" dojoAttachEvent=\"onClick:minimizeWindow\"\n   	  		class=\"dojoFloatingPaneMinimizeIcon\"></div>\n	  	<div dojoAttachPoint=\"titleBarText\" class=\"dojoFloatingPaneTitleText\">${this.title}</div>\n	</div>\n\n	<div id=\"${this.widgetId}_container\" dojoAttachPoint=\"containerNode\" class=\"dojoFloatingPaneClient\"></div>\n\n	<div dojoAttachPoint=\"resizeBar\" class=\"dojoFloatingPaneResizebar\" style=\"display:none\"></div>\n</div>",modal:true,width:false,height:false,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();
}
this.placeModalDialog();
if(this.modal){
this.shared.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);
}});
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(name,_dd2){
this.dialogParas=_dd2;
},{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();
}});
dojo.widget.defineWidget("dojo.widget.Editor2",dojo.widget.RichText,{shareToolbar:false,toolbarAlwaysVisible:false,toolbarWidget:null,scrollInterval:null,toolbarTemplatePath:dojo.uri.dojoUri("src/widget/templates/EditorToolbarOneline.html"),toolbarTemplateCssPath:null,_inSourceMode:false,_htmlEditNode:null,editorOnLoad:function(){
dojo.event.topic.publish("dojo.widget.Editor2::preLoadingToolbar",this);
if(this.toolbarAlwaysVisible){
dojo.require("dojo.widget.Editor2Plugin.AlwaysShowToolbar");
}
var _dd3=dojo.widget.byType("Editor2Toolbar");
if((!_dd3.length)||(!this.shareToolbar)){
if(this.toolbarWidget){
this.toolbarWidget.show();
dojo.html.insertBefore(this.toolbarWidget.domNode,this.domNode.firstChild);
}else{
var _dd4={};
_dd4.templatePath=this.toolbarTemplatePath;
if(this.toolbarTemplateCssPath){
_dd4.templateCssPath=this.toolbarTemplateCssPath;
}
this.toolbarWidget=dojo.widget.createWidget("Editor2Toolbar",_dd4,this.domNode.firstChild,"before");
dojo.event.connect(this,"close",this.toolbarWidget,"hide");
this.toolbarLoaded();
}
}else{
this.toolbarWidget=_dd3[0];
}
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(_dd8,_dd9){
switch(_dd8.toLowerCase()){
case "htmltoggle":
this.toggleHtmlEditing();
break;
default:
dojo.widget.Editor2.superclass.execCommand.apply(this,arguments);
}
},queryCommandEnabled:function(_dda,_ddb){
switch(_dda.toLowerCase()){
case "htmltoggle":
return true;
default:
if(this._inSourceMode){
return false;
}
return dojo.widget.Editor2.superclass.queryCommandEnabled.apply(this,arguments);
}
},queryCommandState:function(_ddc,_ddd){
switch(_ddc.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){
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=this.editNode.innerHTML;
with(this.editorObject.style){
position="absolute";
left="-2000px";
top="-2000px";
}
}else{
this._inSourceMode=false;
this._htmlEditNode.blur();
with(this.editorObject.style){
position="";
left="";
top="";
}
dojo.lang.setTimeout(this,"replaceEditorContent",1,this._htmlEditNode.value);
this._htmlEditNode.style.display="none";
this.focus();
}
this.updateToolbar(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(_ddf){
if((!this.isLoaded)||(!this.toolbarWidget)){
return;
}
var diff=new Date()-this._updateToolbarLastRan;
if((!_ddf)&&(this._updateToolbarLastRan)&&((diff<this._updateToolbarFrequency))){
clearTimeout(this._updateToolbarTimer);
var _de1=this;
this._updateToolbarTimer=setTimeout(function(){
_de1.updateToolbar();
},this._updateToolbarFrequency/2);
return;
}else{
this._updateToolbarLastRan=new Date();
}
if(dojo.widget.Editor2Manager.getCurrentInstance()!==this){
return;
}
this.toolbarWidget.update();
},destroy:function(_de2){
this._htmlEditNode=null;
dojo.event.disconnect(this,"close",this.toolbarWidget,"hide");
if(!_de2){
this.toolbarWidget.destroy();
}
dojo.widget.Editor2.superclass.destroy.call(this);
},onDisplayChanged:function(e){
dojo.widget.Editor2.superclass.onDisplayChanged.call(this,e);
this.updateToolbar();
},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){
this.replaceEditorContent(this._htmlEditNode.value);
}
return dojo.widget.Editor2.superclass.getEditorContent.call(this);
}},"html");


