/*
	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: 7616 $".match(/[0-9]+/)[0]),toString:function(){
with(dojo.version){
return major+"."+minor+"."+patch+flag+" ("+revision+")";
}
}};
dojo.evalProp=function(_3,_4,_5){
if((!_4)||(!_3)){
return undefined;
}
if(!dj_undef(_3,_4)){
return _4[_3];
}
return (_5?(_4[_3]={}):undefined);
};
dojo.parseObjPath=function(_6,_7,_8){
var _9=(_7||dojo.global());
var _a=_6.split(".");
var _b=_a.pop();
for(var i=0,l=_a.length;i<l&&_9;i++){
_9=dojo.evalProp(_a[i],_9,_8);
}
return {obj:_9,prop:_b};
};
dojo.evalObjPath=function(_e,_f){
if(typeof _e!="string"){
return dojo.global();
}
if(_e.indexOf(".")==-1){
return dojo.evalProp(_e,dojo.global(),_f);
}
var ref=dojo.parseObjPath(_e,dojo.global(),_f);
if(ref){
return dojo.evalProp(ref.prop,ref.obj,_f);
}
return null;
};
dojo.errorToString=function(_11){
if(!dj_undef("message",_11)){
return _11.message;
}else{
if(!dj_undef("description",_11)){
return _11.description;
}else{
return _11;
}
}
};
dojo.raise=function(_12,_13){
if(_13){
_12=_12+": "+dojo.errorToString(_13);
}else{
_12=dojo.errorToString(_12);
}
try{
if(djConfig.isDebug){
dojo.hostenv.println("FATAL exception raised: "+_12);
}
}
catch(e){
}
throw _13||Error(_12);
};
dojo.debug=function(){
};
dojo.debugShallow=function(obj){
};
dojo.profile={start:function(){
},end:function(){
},stop:function(){
},dump:function(){
}};
function dj_eval(_15){
return dj_global.eval?dj_global.eval(_15):eval(_15);
}
dojo.unimplemented=function(_16,_17){
var _18="'"+_16+"' not implemented";
if(_17!=null){
_18+=" "+_17;
}
dojo.raise(_18);
};
dojo.deprecated=function(_19,_1a,_1b){
var _1c="DEPRECATED: "+_19;
if(_1a){
_1c+=" "+_1a;
}
if(_1b){
_1c+=" -- will be removed in version: "+_1b;
}
dojo.debug(_1c);
};
dojo.render=(function(){
function vscaffold(_1d,_1e){
var tmp={capable:false,support:{builtin:false,plugin:false},prefixes:_1d};
for(var i=0;i<_1e.length;i++){
tmp[_1e[i]]=false;
}
return tmp;
}
return {name:"",ver:dojo.version,os:{win:false,linux:false,osx:false},html:vscaffold(["html"],["ie","opera","khtml","safari","moz"]),svg:vscaffold(["svg"],["corel","adobe","batik"]),vml:vscaffold(["vml"],["ie"]),swf:vscaffold(["Swf","Flash","Mm"],["mm"]),swt:vscaffold(["Swt"],["ibm"])};
})();
dojo.hostenv=(function(){
var _21={isDebug:false,allowQueryConfig:false,baseScriptUri:"",baseRelativePath:"",libraryScriptUri:"",iePreventClobber:false,ieClobberMinimal:true,preventBackButtonFix:true,delayMozLoadingFix:false,searchIds:[],parseWidgets:true};
if(typeof djConfig=="undefined"){
djConfig=_21;
}else{
for(var _22 in _21){
if(typeof djConfig[_22]=="undefined"){
djConfig[_22]=_21[_22];
}
}
}
return {name_:"(unset)",version_:"(unset)",getName:function(){
return this.name_;
},getVersion:function(){
return this.version_;
},getText:function(uri){
dojo.unimplemented("getText","uri="+uri);
}};
})();
dojo.hostenv.getBaseScriptUri=function(){
if(djConfig.baseScriptUri.length){
return djConfig.baseScriptUri;
}
var uri=new String(djConfig.libraryScriptUri||djConfig.baseRelativePath);
if(!uri){
dojo.raise("Nothing returned by getLibraryScriptUri(): "+uri);
}
var _25=uri.lastIndexOf("/");
djConfig.baseScriptUri=djConfig.baseRelativePath;
return djConfig.baseScriptUri;
};
(function(){
var _26={pkgFileName:"__package__",loading_modules_:{},loaded_modules_:{},addedToLoadingCount:[],removedFromLoadingCount:[],inFlightCount:0,modulePrefixes_:{dojo:{name:"dojo",value:"src"}},setModulePrefix:function(_27,_28){
this.modulePrefixes_[_27]={name:_27,value:_28};
},moduleHasPrefix:function(_29){
var mp=this.modulePrefixes_;
return Boolean(mp[_29]&&mp[_29].value);
},getModulePrefix:function(_2b){
if(this.moduleHasPrefix(_2b)){
return this.modulePrefixes_[_2b].value;
}
return _2b;
},getTextStack:[],loadUriStack:[],loadedUris:[],post_load_:false,modulesLoadedListeners:[],unloadListeners:[],loadNotifying:false};
for(var _2c in _26){
dojo.hostenv[_2c]=_26[_2c];
}
})();
dojo.hostenv.loadPath=function(_2d,_2e,cb){
var uri;
if(_2d.charAt(0)=="/"||_2d.match(/^\w+:/)){
uri=_2d;
}else{
uri=this.getBaseScriptUri()+_2d;
}
if(djConfig.cacheBust&&dojo.render.html.capable){
uri+="?"+String(djConfig.cacheBust).replace(/\W+/g,"");
}
try{
return !_2e?this.loadUri(uri,cb):this.loadUriAndCheck(uri,_2e,cb);
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.hostenv.loadUri=function(uri,cb){
if(this.loadedUris[uri]){
return true;
}
var _33=this.getText(uri,null,true);
if(!_33){
return false;
}
this.loadedUris[uri]=true;
if(cb){
_33="("+_33+")";
}
var _34=dj_eval(_33);
if(cb){
cb(_34);
}
return true;
};
dojo.hostenv.loadUriAndCheck=function(uri,_36,cb){
var ok=true;
try{
ok=this.loadUri(uri,cb);
}
catch(e){
dojo.debug("failed loading ",uri," with error: ",e);
}
return Boolean(ok&&this.findModule(_36,false));
};
dojo.loaded=function(){
};
dojo.unloaded=function(){
};
dojo.hostenv.loaded=function(){
this.loadNotifying=true;
this.post_load_=true;
var mll=this.modulesLoadedListeners;
for(var x=0;x<mll.length;x++){
mll[x]();
}
this.modulesLoadedListeners=[];
this.loadNotifying=false;
dojo.loaded();
};
dojo.hostenv.unloaded=function(){
var mll=this.unloadListeners;
while(mll.length){
(mll.pop())();
}
dojo.unloaded();
};
dojo.addOnLoad=function(obj,_3d){
var dh=dojo.hostenv;
if(arguments.length==1){
dh.modulesLoadedListeners.push(obj);
}else{
if(arguments.length>1){
dh.modulesLoadedListeners.push(function(){
obj[_3d]();
});
}
}
if(dh.post_load_&&dh.inFlightCount==0&&!dh.loadNotifying){
dh.callLoaded();
}
};
dojo.addOnUnload=function(obj,_40){
var dh=dojo.hostenv;
if(arguments.length==1){
dh.unloadListeners.push(obj);
}else{
if(arguments.length>1){
dh.unloadListeners.push(function(){
obj[_40]();
});
}
}
};
dojo.hostenv.modulesLoaded=function(){
if(this.post_load_){
return;
}
if(this.loadUriStack.length==0&&this.getTextStack.length==0){
if(this.inFlightCount>0){
dojo.debug("files still in flight!");
return;
}
dojo.hostenv.callLoaded();
}
};
dojo.hostenv.callLoaded=function(){
if(typeof setTimeout=="object"||(djConfig["useXDomain"]&&dojo.render.html.opera)){
setTimeout("dojo.hostenv.loaded();",0);
}else{
dojo.hostenv.loaded();
}
};
dojo.hostenv.getModuleSymbols=function(_42){
var _43=_42.split(".");
for(var i=_43.length;i>0;i--){
var _45=_43.slice(0,i).join(".");
if((i==1)&&!this.moduleHasPrefix(_45)){
_43[0]="../"+_43[0];
}else{
var _46=this.getModulePrefix(_45);
if(_46!=_45){
_43.splice(0,i,_46);
break;
}
}
}
return _43;
};
dojo.hostenv._global_omit_module_check=false;
dojo.hostenv.loadModule=function(_47,_48,_49){
if(!_47){
return;
}
_49=this._global_omit_module_check||_49;
var _4a=this.findModule(_47,false);
if(_4a){
return _4a;
}
if(dj_undef(_47,this.loading_modules_)){
this.addedToLoadingCount.push(_47);
}
this.loading_modules_[_47]=1;
var _4b=_47.replace(/\./g,"/")+".js";
var _4c=_47.split(".");
var _4d=this.getModuleSymbols(_47);
var _4e=((_4d[0].charAt(0)!="/")&&!_4d[0].match(/^\w+:/));
var _4f=_4d[_4d.length-1];
var ok;
if(_4f=="*"){
_47=_4c.slice(0,-1).join(".");
while(_4d.length){
_4d.pop();
_4d.push(this.pkgFileName);
_4b=_4d.join("/")+".js";
if(_4e&&_4b.charAt(0)=="/"){
_4b=_4b.slice(1);
}
ok=this.loadPath(_4b,!_49?_47:null);
if(ok){
break;
}
_4d.pop();
}
}else{
_4b=_4d.join("/")+".js";
_47=_4c.join(".");
var _51=!_49?_47:null;
ok=this.loadPath(_4b,_51);
if(!ok&&!_48){
_4d.pop();
while(_4d.length){
_4b=_4d.join("/")+".js";
ok=this.loadPath(_4b,_51);
if(ok){
break;
}
_4d.pop();
_4b=_4d.join("/")+"/"+this.pkgFileName+".js";
if(_4e&&_4b.charAt(0)=="/"){
_4b=_4b.slice(1);
}
ok=this.loadPath(_4b,_51);
if(ok){
break;
}
}
}
if(!ok&&!_49){
dojo.raise("Could not load '"+_47+"'; last tried '"+_4b+"'");
}
}
if(!_49&&!this["isXDomain"]){
_4a=this.findModule(_47,false);
if(!_4a){
dojo.raise("symbol '"+_47+"' is not defined after loading '"+_4b+"'");
}
}
return _4a;
};
dojo.hostenv.startPackage=function(_52){
var _53=String(_52);
var _54=_53;
var _55=_52.split(/\./);
if(_55[_55.length-1]=="*"){
_55.pop();
_54=_55.join(".");
}
var _56=dojo.evalObjPath(_54,true);
this.loaded_modules_[_53]=_56;
this.loaded_modules_[_54]=_56;
return _56;
};
dojo.hostenv.findModule=function(_57,_58){
var lmn=String(_57);
if(this.loaded_modules_[lmn]){
return this.loaded_modules_[lmn];
}
if(_58){
dojo.raise("no loaded module named '"+_57+"'");
}
return null;
};
dojo.kwCompoundRequire=function(_5a){
var _5b=_5a["common"]||[];
var _5c=_5a[dojo.hostenv.name_]?_5b.concat(_5a[dojo.hostenv.name_]||[]):_5b.concat(_5a["default"]||[]);
for(var x=0;x<_5c.length;x++){
var _5e=_5c[x];
if(_5e.constructor==Array){
dojo.hostenv.loadModule.apply(dojo.hostenv,_5e);
}else{
dojo.hostenv.loadModule(_5e);
}
}
};
dojo.require=function(_5f){
dojo.hostenv.loadModule.apply(dojo.hostenv,arguments);
};
dojo.requireIf=function(_60,_61){
var _62=arguments[0];
if((_62===true)||(_62=="common")||(_62&&dojo.render[_62].capable)){
var _63=[];
for(var i=1;i<arguments.length;i++){
_63.push(arguments[i]);
}
dojo.require.apply(dojo,_63);
}
};
dojo.requireAfterIf=dojo.requireIf;
dojo.provide=function(_65){
return dojo.hostenv.startPackage.apply(dojo.hostenv,arguments);
};
dojo.registerModulePath=function(_66,_67){
return dojo.hostenv.setModulePrefix(_66,_67);
};
if(djConfig["modulePaths"]){
for(var param in djConfig["modulePaths"]){
dojo.registerModulePath(param,djConfig["modulePaths"][param]);
}
}
dojo.setModulePrefix=function(_68,_69){
dojo.deprecated("dojo.setModulePrefix(\""+_68+"\", \""+_69+"\")","replaced by dojo.registerModulePath","0.5");
return dojo.registerModulePath(_68,_69);
};
dojo.exists=function(obj,_6b){
var p=_6b.split(".");
for(var i=0;i<p.length;i++){
if(!obj[p[i]]){
return false;
}
obj=obj[p[i]];
}
return true;
};
dojo.hostenv.normalizeLocale=function(_6e){
var _6f=_6e?_6e.toLowerCase():dojo.locale;
if(_6f=="root"){
_6f="ROOT";
}
return _6f;
};
dojo.hostenv.searchLocalePath=function(_70,_71,_72){
_70=dojo.hostenv.normalizeLocale(_70);
var _73=_70.split("-");
var _74=[];
for(var i=_73.length;i>0;i--){
_74.push(_73.slice(0,i).join("-"));
}
_74.push(false);
if(_71){
_74.reverse();
}
for(var j=_74.length-1;j>=0;j--){
var loc=_74[j]||"ROOT";
var _78=_72(loc);
if(_78){
break;
}
}
};
dojo.hostenv.localesGenerated=["ROOT","es-es","es","it-it","pt-br","de","fr-fr","zh-cn","pt","en-us","zh","fr","zh-tw","it","en-gb","xx","de-de","ko-kr","ja-jp","ko","en","ja"];
dojo.hostenv.registerNlsPrefix=function(){
dojo.registerModulePath("nls","nls");
};
dojo.hostenv.preloadLocalizations=function(){
if(dojo.hostenv.localesGenerated){
dojo.hostenv.registerNlsPrefix();
function preload(_79){
_79=dojo.hostenv.normalizeLocale(_79);
dojo.hostenv.searchLocalePath(_79,true,function(loc){
for(var i=0;i<dojo.hostenv.localesGenerated.length;i++){
if(dojo.hostenv.localesGenerated[i]==loc){
dojo["require"]("nls.dojo_"+loc);
return true;
}
}
return false;
});
}
preload();
var _7c=djConfig.extraLocale||[];
for(var i=0;i<_7c.length;i++){
preload(_7c[i]);
}
}
dojo.hostenv.preloadLocalizations=function(){
};
};
dojo.requireLocalization=function(_7e,_7f,_80,_81){
dojo.hostenv.preloadLocalizations();
var _82=dojo.hostenv.normalizeLocale(_80);
var _83=[_7e,"nls",_7f].join(".");
var _84="";
if(_81){
var _85=_81.split(",");
for(var i=0;i<_85.length;i++){
if(_82.indexOf(_85[i])==0){
if(_85[i].length>_84.length){
_84=_85[i];
}
}
}
if(!_84){
_84="ROOT";
}
}
var _87=_81?_84:_82;
var _88=dojo.hostenv.findModule(_83);
var _89=null;
if(_88){
if(djConfig.localizationComplete&&_88._built){
return;
}
var _8a=_87.replace("-","_");
var _8b=_83+"."+_8a;
_89=dojo.hostenv.findModule(_8b);
}
if(!_89){
_88=dojo.hostenv.startPackage(_83);
var _8c=dojo.hostenv.getModuleSymbols(_7e);
var _8d=_8c.concat("nls").join("/");
var _8e;
dojo.hostenv.searchLocalePath(_87,_81,function(loc){
var _90=loc.replace("-","_");
var _91=_83+"."+_90;
var _92=false;
if(!dojo.hostenv.findModule(_91)){
dojo.hostenv.startPackage(_91);
var _93=[_8d];
if(loc!="ROOT"){
_93.push(loc);
}
_93.push(_7f);
var _94=_93.join("/")+".js";
_92=dojo.hostenv.loadPath(_94,null,function(_95){
var _96=function(){
};
_96.prototype=_8e;
_88[_90]=new _96();
for(var j in _95){
_88[_90][j]=_95[j];
}
});
}else{
_92=true;
}
if(_92&&_88[_90]){
_8e=_88[_90];
}else{
_88[_90]=_8e;
}
if(_81){
return true;
}
});
}
if(_81&&_82!=_84){
_88[_82.replace("-","_")]=_88[_84.replace("-","_")];
}
};
(function(){
var _98=djConfig.extraLocale;
if(_98){
if(!_98 instanceof Array){
_98=[_98];
}
var req=dojo.requireLocalization;
dojo.requireLocalization=function(m,b,_9c,_9d){
req(m,b,_9c,_9d);
if(_9c){
return;
}
for(var i=0;i<_98.length;i++){
req(m,b,_98[i],_9d);
}
};
}
})();
}
if(typeof window!="undefined"){
(function(){
if(djConfig.allowQueryConfig){
var _9f=document.location.toString();
var _a0=_9f.split("?",2);
if(_a0.length>1){
var _a1=_a0[1];
var _a2=_a1.split("&");
for(var x in _a2){
var sp=_a2[x].split("=");
if((sp[0].length>9)&&(sp[0].substr(0,9)=="djConfig.")){
var opt=sp[0].substr(9);
try{
djConfig[opt]=eval(sp[1]);
}
catch(e){
djConfig[opt]=sp[1];
}
}
}
}
}
if(((djConfig["baseScriptUri"]=="")||(djConfig["baseRelativePath"]==""))&&(document&&document.getElementsByTagName)){
var _a6=document.getElementsByTagName("script");
var _a7=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i;
for(var i=0;i<_a6.length;i++){
var src=_a6[i].getAttribute("src");
if(!src){
continue;
}
var m=src.match(_a7);
if(m){
var _ab=src.substring(0,m.index);
if(src.indexOf("bootstrap1")>-1){
_ab+="../";
}
if(!this["djConfig"]){
djConfig={};
}
if(djConfig["baseScriptUri"]==""){
djConfig["baseScriptUri"]=_ab;
}
if(djConfig["baseRelativePath"]==""){
djConfig["baseRelativePath"]=_ab;
}
break;
}
}
}
var dr=dojo.render;
var drh=dojo.render.html;
var drs=dojo.render.svg;
var dua=(drh.UA=navigator.userAgent);
var dav=(drh.AV=navigator.appVersion);
var t=true;
var f=false;
drh.capable=t;
drh.support.builtin=t;
dr.ver=parseFloat(drh.AV);
dr.os.mac=dav.indexOf("Macintosh")>=0;
dr.os.win=dav.indexOf("Windows")>=0;
dr.os.linux=dav.indexOf("X11")>=0;
drh.opera=dua.indexOf("Opera")>=0;
drh.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0);
drh.safari=dav.indexOf("Safari")>=0;
var _b3=dua.indexOf("Gecko");
drh.mozilla=drh.moz=(_b3>=0)&&(!drh.khtml);
if(drh.mozilla){
drh.geckoVersion=dua.substring(_b3+6,_b3+14);
}
drh.ie=(document.all)&&(!drh.opera);
drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0;
drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0;
drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0;
drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0;
var cm=document["compatMode"];
drh.quirks=(cm=="BackCompat")||(cm=="QuirksMode")||drh.ie55||drh.ie50;
dojo.locale=dojo.locale||(drh.ie?navigator.userLanguage:navigator.language).toLowerCase();
dr.vml.capable=drh.ie;
drs.capable=f;
drs.support.plugin=f;
drs.support.builtin=f;
var _b5=window["document"];
var tdi=_b5["implementation"];
if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0"))){
drs.capable=t;
drs.support.builtin=t;
drs.support.plugin=f;
}
if(drh.safari){
var tmp=dua.split("AppleWebKit/")[1];
var ver=parseFloat(tmp.split(" ")[0]);
if(ver>=420){
drs.capable=t;
drs.support.builtin=t;
drs.support.plugin=f;
}
}else{
}
})();
dojo.hostenv.startPackage("dojo.hostenv");
dojo.render.name=dojo.hostenv.name_="browser";
dojo.hostenv.searchIds=[];
dojo.hostenv._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
dojo.hostenv.getXmlhttpObject=function(){
var _b9=null;
var _ba=null;
try{
_b9=new XMLHttpRequest();
}
catch(e){
}
if(!_b9){
for(var i=0;i<3;++i){
var _bc=dojo.hostenv._XMLHTTP_PROGIDS[i];
try{
_b9=new ActiveXObject(_bc);
}
catch(e){
_ba=e;
}
if(_b9){
dojo.hostenv._XMLHTTP_PROGIDS=[_bc];
break;
}
}
}
if(!_b9){
return dojo.raise("XMLHTTP not available",_ba);
}
return _b9;
};
dojo.hostenv._blockAsync=false;
dojo.hostenv.getText=function(uri,_be,_bf){
if(!_be){
this._blockAsync=true;
}
var _c0=this.getXmlhttpObject();
function isDocumentOk(_c1){
var _c2=_c1["status"];
return Boolean((!_c2)||((200<=_c2)&&(300>_c2))||(_c2==304));
}
if(_be){
var _c3=this,_c4=null,gbl=dojo.global();
var xhr=dojo.evalObjPath("dojo.io.XMLHTTPTransport");
_c0.onreadystatechange=function(){
if(_c4){
gbl.clearTimeout(_c4);
_c4=null;
}
if(_c3._blockAsync||(xhr&&xhr._blockAsync)){
_c4=gbl.setTimeout(function(){
_c0.onreadystatechange.apply(this);
},10);
}else{
if(4==_c0.readyState){
if(isDocumentOk(_c0)){
_be(_c0.responseText);
}
}
}
};
}
_c0.open("GET",uri,_be?true:false);
try{
_c0.send(null);
if(_be){
return null;
}
if(!isDocumentOk(_c0)){
var err=Error("Unable to load "+uri+" status:"+_c0.status);
err.status=_c0.status;
err.responseText=_c0.responseText;
throw err;
}
}
catch(e){
this._blockAsync=false;
if((_bf)&&(!_be)){
return null;
}else{
throw e;
}
}
this._blockAsync=false;
return _c0.responseText;
};
dojo.hostenv.defaultDebugContainerId="dojoDebug";
dojo.hostenv._println_buffer=[];
dojo.hostenv._println_safe=false;
dojo.hostenv.println=function(_c8){
if(!dojo.hostenv._println_safe){
dojo.hostenv._println_buffer.push(_c8);
}else{
try{
var _c9=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId);
if(!_c9){
_c9=dojo.body();
}
var div=document.createElement("div");
div.appendChild(document.createTextNode(_c8));
_c9.appendChild(div);
}
catch(e){
try{
document.write("<div>"+_c8+"</div>");
}
catch(e2){
window.status=_c8;
}
}
}
};
dojo.addOnLoad(function(){
dojo.hostenv._println_safe=true;
while(dojo.hostenv._println_buffer.length>0){
dojo.hostenv.println(dojo.hostenv._println_buffer.shift());
}
});
function dj_addNodeEvtHdlr(_cb,_cc,fp){
var _ce=_cb["on"+_cc]||function(){
};
_cb["on"+_cc]=function(){
fp.apply(_cb,arguments);
_ce.apply(_cb,arguments);
};
return true;
}
function dj_load_init(e){
var _d0=(e&&e.type)?e.type.toLowerCase():"load";
if(arguments.callee.initialized||(_d0!="domcontentloaded"&&_d0!="load")){
return;
}
arguments.callee.initialized=true;
if(typeof (_timer)!="undefined"){
clearInterval(_timer);
delete _timer;
}
var _d1=function(){
if(dojo.render.html.ie){
dojo.hostenv.makeWidgets();
}
};
if(dojo.hostenv.inFlightCount==0){
_d1();
dojo.hostenv.modulesLoaded();
}else{
dojo.hostenv.modulesLoadedListeners.unshift(_d1);
}
}
if(document.addEventListener){
if(dojo.render.html.opera||(dojo.render.html.moz&&(djConfig["enableMozDomContentLoaded"]===true))){
document.addEventListener("DOMContentLoaded",dj_load_init,null);
}
window.addEventListener("load",dj_load_init,null);
}
if(dojo.render.html.ie&&dojo.render.os.win){
document.attachEvent("onreadystatechange",function(e){
if(document.readyState=="complete"){
dj_load_init();
}
});
}
if(/(WebKit|khtml)/i.test(navigator.userAgent)){
var _timer=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
dj_load_init();
}
},10);
}
if(dojo.render.html.ie){
dj_addNodeEvtHdlr(window,"beforeunload",function(){
dojo.hostenv._unloading=true;
window.setTimeout(function(){
dojo.hostenv._unloading=false;
},0);
});
}
dj_addNodeEvtHdlr(window,"unload",function(){
dojo.hostenv.unloaded();
if((!dojo.render.html.ie)||(dojo.render.html.ie&&dojo.hostenv._unloading)){
dojo.hostenv.unloaded();
}
});
dojo.hostenv.makeWidgets=function(){
var _d3=[];
if(djConfig.searchIds&&djConfig.searchIds.length>0){
_d3=_d3.concat(djConfig.searchIds);
}
if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){
_d3=_d3.concat(dojo.hostenv.searchIds);
}
if((djConfig.parseWidgets)||(_d3.length>0)){
if(dojo.evalObjPath("dojo.widget.Parse")){
var _d4=new dojo.xml.Parse();
if(_d3.length>0){
for(var x=0;x<_d3.length;x++){
var _d6=document.getElementById(_d3[x]);
if(!_d6){
continue;
}
var _d7=_d4.parseElement(_d6,null,true);
dojo.widget.getParser().createComponents(_d7);
}
}else{
if(djConfig.parseWidgets){
var _d7=_d4.parseElement(dojo.body(),null,true);
dojo.widget.getParser().createComponents(_d7);
}
}
}
}
};
dojo.addOnLoad(function(){
if(!dojo.render.html.ie){
dojo.hostenv.makeWidgets();
}
});
try{
if(dojo.render.html.ie){
document.namespaces.add("v","urn:schemas-microsoft-com:vml");
document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)");
}
}
catch(e){
}
dojo.hostenv.writeIncludes=function(){
};
if(!dj_undef("document",this)){
dj_currentDocument=this.document;
}
dojo.doc=function(){
return dj_currentDocument;
};
dojo.body=function(){
return dojo.doc().body||dojo.doc().getElementsByTagName("body")[0];
};
dojo.byId=function(id,doc){
if((id)&&((typeof id=="string")||(id instanceof String))){
if(!doc){
doc=dj_currentDocument;
}
var ele=doc.getElementById(id);
if(ele&&(ele.id!=id)&&doc.all){
ele=null;
eles=doc.all[id];
if(eles){
if(eles.length){
for(var i=0;i<eles.length;i++){
if(eles[i].id==id){
ele=eles[i];
break;
}
}
}else{
ele=eles;
}
}
}
return ele;
}
return id;
};
dojo.setContext=function(_dc,_dd){
dj_currentContext=_dc;
dj_currentDocument=_dd;
};
dojo._fireCallback=function(_de,_df,_e0){
if((_df)&&((typeof _de=="string")||(_de instanceof String))){
_de=_df[_de];
}
return (_df?_de.apply(_df,_e0||[]):_de());
};
dojo.withGlobal=function(_e1,_e2,_e3,_e4){
var _e5;
var _e6=dj_currentContext;
var _e7=dj_currentDocument;
try{
dojo.setContext(_e1,_e1.document);
_e5=dojo._fireCallback(_e2,_e3,_e4);
}
finally{
dojo.setContext(_e6,_e7);
}
return _e5;
};
dojo.withDoc=function(_e8,_e9,_ea,_eb){
var _ec;
var _ed=dj_currentDocument;
try{
dj_currentDocument=_e8;
_ec=dojo._fireCallback(_e9,_ea,_eb);
}
finally{
dj_currentDocument=_ed;
}
return _ec;
};
}
dojo.requireIf((djConfig["isDebug"]||djConfig["debugAtAllCosts"]),"dojo.debug");
dojo.requireIf(djConfig["debugAtAllCosts"]&&!window.widget&&!djConfig["useXDomain"],"dojo.browser_debug");
dojo.requireIf(djConfig["debugAtAllCosts"]&&!window.widget&&djConfig["useXDomain"],"dojo.browser_debug_xd");
dojo.provide("dojo.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(!dojo.lang.isFunction(_104)){
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){
return (it instanceof Function||typeof it=="function");
};
(function(){
if((dojo.render.html.capable)&&(dojo.render.html["safari"])){
dojo.lang.isFunction=function(it){
if((typeof (it)=="function")&&(it=="[object NodeList]")){
return false;
}
return (it instanceof Function||typeof it=="function");
};
}
})();
dojo.lang.isString=function(it){
return (typeof it=="string"||it instanceof String);
};
dojo.lang.isAlien=function(it){
if(!it){
return false;
}
return !dojo.lang.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));
};
dojo.lang.isBoolean=function(it){
return (it instanceof Boolean||typeof it=="boolean");
};
dojo.lang.isNumber=function(it){
return (it instanceof Number||typeof it=="number");
};
dojo.lang.isUndefined=function(it){
return ((typeof (it)=="undefined")&&(it==undefined));
};
dojo.provide("dojo.lang.extras");
dojo.lang.setTimeout=function(func,_12a){
var _12b=window,_12c=2;
if(!dojo.lang.isFunction(func)){
_12b=func;
func=_12a;
_12a=arguments[2];
_12c++;
}
if(dojo.lang.isString(func)){
func=_12b[func];
}
var args=[];
for(var i=_12c;i<arguments.length;i++){
args.push(arguments[i]);
}
return dojo.global().setTimeout(function(){
func.apply(_12b,args);
},_12a);
};
dojo.lang.clearTimeout=function(_12f){
dojo.global().clearTimeout(_12f);
};
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(_138,_139,_13a){
with(dojo.parseObjPath(_138,_139,_13a)){
return dojo.evalProp(prop,obj,_13a);
}
};
dojo.lang.setObjPathValue=function(_13b,_13c,_13d,_13e){
dojo.deprecated("dojo.lang.setObjPathValue","use dojo.parseObjPath and the '=' operator","0.6");
if(arguments.length<4){
_13e=true;
}
with(dojo.parseObjPath(_13b,_13d,_13e)){
if(obj&&(_13e||(prop in obj))){
obj[prop]=_13c;
}
}
};
dojo.provide("dojo.io.common");
dojo.io.transports=[];
dojo.io.hdlrFuncNames=["load","error","timeout"];
dojo.io.Request=function(url,_140,_141,_142){
if((arguments.length==1)&&(arguments[0].constructor==Object)){
this.fromKwArgs(arguments[0]);
}else{
this.url=url;
if(_140){
this.mimetype=_140;
}
if(_141){
this.transport=_141;
}
if(arguments.length>=4){
this.changeUrl=_142;
}
}
};
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,_145,_146){
},error:function(type,_148,_149,_14a){
},timeout:function(type,_14c,_14d,_14e){
},handle:function(type,data,_151,_152){
},timeoutSeconds:0,abort:function(){
},fromKwArgs:function(_153){
if(_153["url"]){
_153.url=_153.url.toString();
}
if(_153["formNode"]){
_153.formNode=dojo.byId(_153.formNode);
}
if(!_153["method"]&&_153["formNode"]&&_153["formNode"].method){
_153.method=_153["formNode"].method;
}
if(!_153["handle"]&&_153["handler"]){
_153.handle=_153.handler;
}
if(!_153["load"]&&_153["loaded"]){
_153.load=_153.loaded;
}
if(!_153["changeUrl"]&&_153["changeURL"]){
_153.changeUrl=_153.changeURL;
}
_153.encoding=dojo.lang.firstValued(_153["encoding"],djConfig["bindEncoding"],"");
_153.sendTransport=dojo.lang.firstValued(_153["sendTransport"],djConfig["ioSendTransport"],false);
var _154=dojo.lang.isFunction;
for(var x=0;x<dojo.io.hdlrFuncNames.length;x++){
var fn=dojo.io.hdlrFuncNames[x];
if(_153[fn]&&_154(_153[fn])){
continue;
}
if(_153["handle"]&&_154(_153["handle"])){
_153[fn]=_153.handle;
}
}
dojo.lang.mixin(this,_153);
}});
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(_15b){
if(!(_15b instanceof dojo.io.Request)){
try{
_15b=new dojo.io.Request(_15b);
}
catch(e){
dojo.debug(e);
}
}
var _15c="";
if(_15b["transport"]){
_15c=_15b["transport"];
if(!this[_15c]){
dojo.io.sendBindError(_15b,"No dojo.io.bind() transport with name '"+_15b["transport"]+"'.");
return _15b;
}
if(!this[_15c].canHandle(_15b)){
dojo.io.sendBindError(_15b,"dojo.io.bind() transport with name '"+_15b["transport"]+"' cannot handle this type of request.");
return _15b;
}
}else{
for(var x=0;x<dojo.io.transports.length;x++){
var tmp=dojo.io.transports[x];
if((this[tmp])&&(this[tmp].canHandle(_15b))){
_15c=tmp;
break;
}
}
if(_15c==""){
dojo.io.sendBindError(_15b,"None of the loaded transports for dojo.io.bind()"+" can handle the request.");
return _15b;
}
}
this[_15c].bind(_15b);
_15b.bindSuccess=true;
return _15b;
};
dojo.io.sendBindError=function(_15f,_160){
if((typeof _15f.error=="function"||typeof _15f.handle=="function")&&(typeof setTimeout=="function"||typeof setTimeout=="object")){
var _161=new dojo.io.Error(_160);
setTimeout(function(){
_15f[(typeof _15f.error=="function")?"error":"handle"]("error",_161,null,_15f);
},50);
}else{
dojo.raise(_160);
}
};
dojo.io.queueBind=function(_162){
if(!(_162 instanceof dojo.io.Request)){
try{
_162=new dojo.io.Request(_162);
}
catch(e){
dojo.debug(e);
}
}
var _163=_162.load;
_162.load=function(){
dojo.io._queueBindInFlight=false;
var ret=_163.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
var _165=_162.error;
_162.error=function(){
dojo.io._queueBindInFlight=false;
var ret=_165.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
dojo.io._bindQueue.push(_162);
dojo.io._dispatchNextQueueBind();
return _162;
};
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,_168,last){
var enc=/utf/i.test(_168||"")?encodeURIComponent:dojo.string.encodeAscii;
var _16b=[];
var _16c=new Object();
for(var name in map){
var _16e=function(elt){
var val=enc(name)+"="+enc(elt);
_16b[(last==name)?"push":"unshift"](val);
};
if(!_16c[name]){
var _171=map[name];
if(dojo.lang.isArray(_171)){
dojo.lang.forEach(_171,_16e);
}else{
_16e(_171);
}
}
}
return _16b.join("&");
};
dojo.io.setIFrameSrc=function(_172,src,_174){
try{
var r=dojo.render.html;
if(!_174){
if(r.safari){
_172.location=src;
}else{
frames[_172.name].location=src;
}
}else{
var idoc;
if(r.ie){
idoc=_172.contentWindow.document;
}else{
if(r.safari){
idoc=_172.document;
}else{
idoc=_172.contentWindow;
}
}
if(!idoc){
_172.location=src;
return;
}else{
idoc.location.replace(src);
}
}
}
catch(e){
dojo.debug(e);
dojo.debug("setIFrameSrc: "+e);
}
};
dojo.provide("dojo.lang.array");
dojo.lang.mixin(dojo.lang,{has:function(obj,name){
try{
return typeof obj[name]!="undefined";
}
catch(e){
return false;
}
},isEmpty:function(obj){
if(dojo.lang.isObject(obj)){
var tmp={};
var _17b=0;
for(var x in obj){
if(obj[x]&&(!tmp[x])){
_17b++;
break;
}
}
return _17b==0;
}else{
if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){
return obj.length==0;
}
}
},map:function(arr,obj,_17f){
var _180=dojo.lang.isString(arr);
if(_180){
arr=arr.split("");
}
if(dojo.lang.isFunction(obj)&&(!_17f)){
_17f=obj;
obj=dj_global;
}else{
if(dojo.lang.isFunction(obj)&&_17f){
var _181=obj;
obj=_17f;
_17f=_181;
}
}
if(Array.map){
var _182=Array.map(arr,_17f,obj);
}else{
var _182=[];
for(var i=0;i<arr.length;++i){
_182.push(_17f.call(obj,arr[i]));
}
}
if(_180){
return _182.join("");
}else{
return _182;
}
},reduce:function(arr,_185,obj,_187){
var _188=_185;
if(arguments.length==2){
_187=_185;
_188=arr[0];
arr=arr.slice(1);
}else{
if(arguments.length==3){
if(dojo.lang.isFunction(obj)){
_187=obj;
obj=null;
}
}else{
if(dojo.lang.isFunction(obj)){
var tmp=_187;
_187=obj;
obj=tmp;
}
}
}
var ob=obj||dj_global;
dojo.lang.map(arr,function(val){
_188=_187.call(ob,_188,val);
});
return _188;
},forEach:function(_18c,_18d,_18e){
if(dojo.lang.isString(_18c)){
_18c=_18c.split("");
}
if(Array.forEach){
Array.forEach(_18c,_18d,_18e);
}else{
if(!_18e){
_18e=dj_global;
}
for(var i=0,l=_18c.length;i<l;i++){
_18d.call(_18e,_18c[i],i,_18c);
}
}
},_everyOrSome:function(_191,arr,_193,_194){
if(dojo.lang.isString(arr)){
arr=arr.split("");
}
if(Array.every){
return Array[_191?"every":"some"](arr,_193,_194);
}else{
if(!_194){
_194=dj_global;
}
for(var i=0,l=arr.length;i<l;i++){
var _197=_193.call(_194,arr[i],i,arr);
if(_191&&!_197){
return false;
}else{
if((!_191)&&(_197)){
return true;
}
}
}
return Boolean(_191);
}
},every:function(arr,_199,_19a){
return this._everyOrSome(true,arr,_199,_19a);
},some:function(arr,_19c,_19d){
return this._everyOrSome(false,arr,_19c,_19d);
},filter:function(arr,_19f,_1a0){
var _1a1=dojo.lang.isString(arr);
if(_1a1){
arr=arr.split("");
}
var _1a2;
if(Array.filter){
_1a2=Array.filter(arr,_19f,_1a0);
}else{
if(!_1a0){
if(arguments.length>=3){
dojo.raise("thisObject doesn't exist!");
}
_1a0=dj_global;
}
_1a2=[];
for(var i=0;i<arr.length;i++){
if(_19f.call(_1a0,arr[i],i,arr)){
_1a2.push(arr[i]);
}
}
}
if(_1a1){
return _1a2.join("");
}else{
return _1a2;
}
},unnest:function(){
var out=[];
for(var i=0;i<arguments.length;i++){
if(dojo.lang.isArrayLike(arguments[i])){
var add=dojo.lang.unnest.apply(this,arguments[i]);
out=out.concat(add);
}else{
out.push(arguments[i]);
}
}
return out;
},toArray:function(_1a7,_1a8){
var _1a9=[];
for(var i=_1a8||0;i<_1a7.length;i++){
_1a9.push(_1a7[i]);
}
return _1a9;
}});
dojo.provide("dojo.lang.func");
dojo.lang.hitch=function(_1ab,_1ac){
var fcn=(dojo.lang.isString(_1ac)?_1ab[_1ac]:_1ac)||function(){
};
return function(){
return fcn.apply(_1ab,arguments);
};
};
dojo.lang.anonCtr=0;
dojo.lang.anon={};
dojo.lang.nameAnonFunc=function(_1ae,_1af,_1b0){
var nso=(_1af||dojo.lang.anon);
if((_1b0)||((dj_global["djConfig"])&&(djConfig["slowAnonFuncLookups"]==true))){
for(var x in nso){
try{
if(nso[x]===_1ae){
return x;
}
}
catch(e){
}
}
}
var ret="__"+dojo.lang.anonCtr++;
while(typeof nso[ret]!="undefined"){
ret="__"+dojo.lang.anonCtr++;
}
nso[ret]=_1ae;
return ret;
};
dojo.lang.forward=function(_1b4){
return function(){
return this[_1b4].apply(this,arguments);
};
};
dojo.lang.curry=function(_1b5,func){
var _1b7=[];
_1b5=_1b5||dj_global;
if(dojo.lang.isString(func)){
func=_1b5[func];
}
for(var x=2;x<arguments.length;x++){
_1b7.push(arguments[x]);
}
var _1b9=(func["__preJoinArity"]||func.length)-_1b7.length;
function gather(_1ba,_1bb,_1bc){
var _1bd=_1bc;
var _1be=_1bb.slice(0);
for(var x=0;x<_1ba.length;x++){
_1be.push(_1ba[x]);
}
_1bc=_1bc-_1ba.length;
if(_1bc<=0){
var res=func.apply(_1b5,_1be);
_1bc=_1bd;
return res;
}else{
return function(){
return gather(arguments,_1be,_1bc);
};
}
}
return gather([],_1b7,_1b9);
};
dojo.lang.curryArguments=function(_1c1,func,args,_1c4){
var _1c5=[];
var x=_1c4||0;
for(x=_1c4;x<args.length;x++){
_1c5.push(args[x]);
}
return dojo.lang.curry.apply(dojo.lang,[_1c1,func].concat(_1c5));
};
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,_1cb,_1cc){
if(!farr.length){
if(typeof _1cc=="function"){
_1cc();
}
return;
}
if((typeof _1cb=="undefined")&&(typeof cb=="number")){
_1cb=cb;
cb=function(){
};
}else{
if(!cb){
cb=function(){
};
if(!_1cb){
_1cb=0;
}
}
}
setTimeout(function(){
(farr.shift())();
cb();
dojo.lang.delayThese(farr,cb,_1cb,_1cc);
},_1cb);
};
dojo.provide("dojo.string.extras");
dojo.string.substituteParams=function(_1cd,hash){
var map=(typeof hash=="object")?hash:dojo.lang.toArray(arguments,1);
return _1cd.replace(/\%\{(\w+)\}/g,function(_1d0,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 _1d3=str.split(" ");
for(var i=0;i<_1d3.length;i++){
_1d3[i]=_1d3[i].charAt(0).toUpperCase()+_1d3[i].substring(1);
}
return _1d3.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 _1d8=escape(str);
var _1d9,re=/%u([0-9A-F]{4})/i;
while((_1d9=_1d8.match(re))){
var num=Number("0x"+_1d9[1]);
var _1dc=escape("&#"+num+";");
ret+=_1d8.substring(0,_1d9.index)+_1dc;
_1d8=_1d8.substring(_1d9.index+_1d9[0].length);
}
ret+=_1d8.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,_1e1){
str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
if(!_1e1){
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,_1ea){
if(_1ea){
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,_1ee,_1ef){
if(_1ef){
str=str.toLowerCase();
_1ee=_1ee.toLowerCase();
}
return str.indexOf(_1ee)==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,_1f5){
if(_1f5=="\n"){
text=text.replace(/\r\n/g,"\n");
text=text.replace(/\r/g,"\n");
}else{
if(_1f5=="\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,_1f7){
var _1f8=[];
for(var i=0,_1fa=0;i<str.length;i++){
if(str.charAt(i)=="\\"){
i++;
continue;
}
if(str.charAt(i)==_1f7){
_1f8.push(str.substring(_1fa,i));
_1fa=i+1;
}
}
_1f8.push(str.substr(_1fa));
return _1f8;
};
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 _1fc=dojo.doc();
do{
var id="dj_unique_"+(++arguments.callee._idIncrement);
}while(_1fc.getElementById(id));
return id;
};
dojo.dom.getUniqueId._idIncrement=0;
dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(_1fe,_1ff){
var node=_1fe.firstChild;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.nextSibling;
}
if(_1ff&&node&&node.tagName&&node.tagName.toLowerCase()!=_1ff.toLowerCase()){
node=dojo.dom.nextElement(node,_1ff);
}
return node;
};
dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_201,_202){
var node=_201.lastChild;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.previousSibling;
}
if(_202&&node&&node.tagName&&node.tagName.toLowerCase()!=_202.toLowerCase()){
node=dojo.dom.prevElement(node,_202);
}
return node;
};
dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(node,_205){
if(!node){
return null;
}
do{
node=node.nextSibling;
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
if(node&&_205&&_205.toLowerCase()!=node.tagName.toLowerCase()){
return dojo.dom.nextElement(node,_205);
}
return node;
};
dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(node,_207){
if(!node){
return null;
}
if(_207){
_207=_207.toLowerCase();
}
do{
node=node.previousSibling;
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
if(node&&_207&&_207.toLowerCase()!=node.tagName.toLowerCase()){
return dojo.dom.prevElement(node,_207);
}
return node;
};
dojo.dom.moveChildren=function(_208,_209,trim){
var _20b=0;
if(trim){
while(_208.hasChildNodes()&&_208.firstChild.nodeType==dojo.dom.TEXT_NODE){
_208.removeChild(_208.firstChild);
}
while(_208.hasChildNodes()&&_208.lastChild.nodeType==dojo.dom.TEXT_NODE){
_208.removeChild(_208.lastChild);
}
}
while(_208.hasChildNodes()){
_209.appendChild(_208.firstChild);
_20b++;
}
return _20b;
};
dojo.dom.copyChildren=function(_20c,_20d,trim){
var _20f=_20c.cloneNode(true);
return this.moveChildren(_20f,_20d,trim);
};
dojo.dom.replaceChildren=function(node,_211){
var _212=[];
if(dojo.render.html.ie){
for(var i=0;i<node.childNodes.length;i++){
_212.push(node.childNodes[i]);
}
}
dojo.dom.removeChildren(node);
node.appendChild(_211);
for(var i=0;i<_212.length;i++){
dojo.dom.destroyNode(_212[i]);
}
};
dojo.dom.removeChildren=function(node){
var _215=node.childNodes.length;
while(node.hasChildNodes()){
dojo.dom.removeNode(node.firstChild);
}
return _215;
};
dojo.dom.replaceNode=function(node,_217){
return node.parentNode.replaceChild(_217,node);
};
dojo.dom.destroyNode=function(node){
if(node.parentNode){
node=dojo.dom.removeNode(node);
}
if(node.nodeType!=3){
if(dojo.evalObjPath("dojo.event.browser.clean",false)){
dojo.event.browser.clean(node);
}
if(dojo.render.html.ie){
node.outerHTML="";
}
}
};
dojo.dom.removeNode=function(node){
if(node&&node.parentNode){
return node.parentNode.removeChild(node);
}
};
dojo.dom.getAncestors=function(node,_21b,_21c){
var _21d=[];
var _21e=(_21b&&(_21b instanceof Function||typeof _21b=="function"));
while(node){
if(!_21e||_21b(node)){
_21d.push(node);
}
if(_21c&&_21d.length>0){
return _21d[0];
}
node=node.parentNode;
}
if(_21c){
return null;
}
return _21d;
};
dojo.dom.getAncestorsByTag=function(node,tag,_221){
tag=tag.toLowerCase();
return dojo.dom.getAncestors(node,function(el){
return ((el.tagName)&&(el.tagName.toLowerCase()==tag));
},_221);
};
dojo.dom.getFirstAncestorByTag=function(node,tag){
return dojo.dom.getAncestorsByTag(node,tag,true);
};
dojo.dom.isDescendantOf=function(node,_226,_227){
if(_227&&node){
node=node.parentNode;
}
while(node){
if(node==_226){
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 _22a=dojo.doc();
if(!dj_undef("ActiveXObject")){
var _22b=["MSXML2","Microsoft","MSXML","MSXML3"];
for(var i=0;i<_22b.length;i++){
try{
doc=new ActiveXObject(_22b[i]+".XMLDOM");
}
catch(e){
}
if(doc){
break;
}
}
}else{
if((_22a.implementation)&&(_22a.implementation.createDocument)){
doc=_22a.implementation.createDocument("","",null);
}
}
return doc;
};
dojo.dom.createDocumentFromText=function(str,_22e){
if(!_22e){
_22e="text/xml";
}
if(!dj_undef("DOMParser")){
var _22f=new DOMParser();
return _22f.parseFromString(str,_22e);
}else{
if(!dj_undef("ActiveXObject")){
var _230=dojo.dom.createDocument();
if(_230){
_230.async=false;
_230.loadXML(str);
return _230;
}else{
dojo.debug("toXml didn't work?");
}
}else{
var _231=dojo.doc();
if(_231.createElement){
var tmp=_231.createElement("xml");
tmp.innerHTML=str;
if(_231.implementation&&_231.implementation.createDocument){
var _233=_231.implementation.createDocument("foo","",null);
for(var i=0;i<tmp.childNodes.length;i++){
_233.importNode(tmp.childNodes.item(i),true);
}
return _233;
}
return ((tmp.document)&&(tmp.document.firstChild?tmp.document.firstChild:tmp));
}
}
}
return null;
};
dojo.dom.prependChild=function(node,_236){
if(_236.firstChild){
_236.insertBefore(node,_236.firstChild);
}else{
_236.appendChild(node);
}
return true;
};
dojo.dom.insertBefore=function(node,ref,_239){
if((_239!=true)&&(node===ref||node.nextSibling===ref)){
return false;
}
var _23a=ref.parentNode;
_23a.insertBefore(node,ref);
return true;
};
dojo.dom.insertAfter=function(node,ref,_23d){
var pn=ref.parentNode;
if(ref==pn.lastChild){
if((_23d!=true)&&(node===ref)){
return false;
}
pn.appendChild(node);
}else{
return this.insertBefore(node,ref.nextSibling,_23d);
}
return true;
};
dojo.dom.insertAtPosition=function(node,ref,_241){
if((!node)||(!ref)||(!_241)){
return false;
}
switch(_241.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,_243,_244){
var _245=_243.childNodes;
if(!_245.length||_245.length==_244){
_243.appendChild(node);
return true;
}
if(_244==0){
return dojo.dom.prependChild(node,_243);
}
return dojo.dom.insertAfter(node,_245[_244-1]);
};
dojo.dom.textContent=function(node,text){
if(arguments.length>1){
var _248=dojo.doc();
dojo.dom.replaceChildren(node,_248.createTextNode(text));
return text;
}else{
if(node.textContent!=undefined){
return node.textContent;
}
var _249="";
if(node==null){
return _249;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
_249+=dojo.dom.textContent(node.childNodes[i]);
break;
case 3:
case 2:
case 4:
_249+=node.childNodes[i].nodeValue;
break;
default:
break;
}
}
return _249;
}
};
dojo.dom.hasParent=function(node){
return Boolean(node&&node.parentNode&&dojo.dom.isNode(node.parentNode));
};
dojo.dom.isTag=function(node){
if(node&&node.tagName){
for(var i=1;i<arguments.length;i++){
if(node.tagName==String(arguments[i])){
return String(arguments[i]);
}
}
}
return "";
};
dojo.dom.setAttributeNS=function(elem,_24f,_250,_251){
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(_24f,_250,_251);
}else{
var _252=elem.ownerDocument;
var _253=_252.createNode(2,_250,_24f);
_253.nodeValue=_251;
elem.setAttributeNode(_253);
}
};
dojo.provide("dojo.undo.browser");
try{
if((!djConfig["preventBackButtonFix"])&&(!dojo.hostenv.post_load_)){
document.write("<iframe style='border: 0px; width: 1px; height: 1px; position: absolute; bottom: 0px; right: 0px; visibility: visible;' name='djhistory' id='djhistory' src='"+(djConfig["dojoIframeHistoryUrl"]||dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"'></iframe>");
}
}
catch(e){
}
if(dojo.render.html.opera){
dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work.");
}
dojo.undo.browser={initialHref:(!dj_undef("window"))?window.location.href:"",initialHash:(!dj_undef("window"))?window.location.hash:"",moveForward:false,historyStack:[],forwardStack:[],historyIframe:null,bookmarkAnchor:null,locationTimer:null,setInitialState:function(args){
this.initialState=this._createState(this.initialHref,args,this.initialHash);
},addToHistory:function(args){
this.forwardStack=[];
var hash=null;
var url=null;
if(!this.historyIframe){
if(djConfig["useXDomain"]&&!djConfig["dojoIframeHistoryUrl"]){
dojo.debug("dojo.undo.browser: When using cross-domain Dojo builds,"+" please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"+" to the path on your domain to iframe_history.html");
}
this.historyIframe=window.frames["djhistory"];
}
if(!this.bookmarkAnchor){
this.bookmarkAnchor=document.createElement("a");
dojo.body().appendChild(this.bookmarkAnchor);
this.bookmarkAnchor.style.display="none";
}
if(args["changeUrl"]){
hash="#"+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());
if(this.historyStack.length==0&&this.initialState.urlHash==hash){
this.initialState=this._createState(url,args,hash);
return;
}else{
if(this.historyStack.length>0&&this.historyStack[this.historyStack.length-1].urlHash==hash){
this.historyStack[this.historyStack.length-1]=this._createState(url,args,hash);
return;
}
}
this.changingUrl=true;
setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;",1);
this.bookmarkAnchor.href=hash;
if(dojo.render.html.ie){
url=this._loadIframeHistory();
var _258=args["back"]||args["backButton"]||args["handle"];
var tcb=function(_25a){
if(window.location.hash!=""){
setTimeout("window.location.href = '"+hash+"';",1);
}
_258.apply(this,[_25a]);
};
if(args["back"]){
args.back=tcb;
}else{
if(args["backButton"]){
args.backButton=tcb;
}else{
if(args["handle"]){
args.handle=tcb;
}
}
}
var _25b=args["forward"]||args["forwardButton"]||args["handle"];
var tfw=function(_25d){
if(window.location.hash!=""){
window.location.href=hash;
}
if(_25b){
_25b.apply(this,[_25d]);
}
};
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,_260){
if(!dojo.render.html.opera){
var _261=this._getUrlQuery(_260.href);
if(_261==null){
if(this.historyStack.length==1){
this.handleBackButton();
}
return;
}
if(this.moveForward){
this.moveForward=false;
return;
}
if(this.historyStack.length>=2&&_261==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){
this.handleBackButton();
}else{
if(this.forwardStack.length>0&&_261==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){
this.handleForwardButton();
}
}
}
},handleBackButton:function(){
var _262=this.historyStack.pop();
if(!_262){
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(_262);
},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 _269=url.split("?");
if(_269.length<2){
return null;
}else{
return _269[1];
}
},_loadIframeHistory:function(){
var url=(djConfig["dojoIframeHistoryUrl"]||dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"?"+(new Date()).getTime();
this.moveForward=true;
dojo.io.setIFrameSrc(this.historyIframe,url,false);
return url;
}};
dojo.provide("dojo.io.BrowserIO");
if(!dj_undef("window")){
dojo.io.checkChildrenForFile=function(node){
var _26c=false;
var _26d=node.getElementsByTagName("input");
dojo.lang.forEach(_26d,function(_26e){
if(_26c){
return;
}
if(_26e.getAttribute("type")=="file"){
_26c=true;
}
});
return _26c;
};
dojo.io.formHasFile=function(_26f){
return dojo.io.checkChildrenForFile(_26f);
};
dojo.io.updateNode=function(node,_271){
node=dojo.byId(node);
var args=_271;
if(dojo.lang.isString(_271)){
args={url:_271};
}
args.mimetype="text/html";
args.load=function(t,d,e){
while(node.firstChild){
dojo.dom.destroyNode(node.firstChild);
}
node.innerHTML=d;
};
dojo.io.bind(args);
};
dojo.io.formFilter=function(node){
var type=(node.type||"").toLowerCase();
return !node.disabled&&node.name&&!dojo.lang.inArray(["file","submit","image","reset","button"],type);
};
dojo.io.encodeForm=function(_278,_279,_27a){
if((!_278)||(!_278.tagName)||(!_278.tagName.toLowerCase()=="form")){
dojo.raise("Attempted to encode a non-form element.");
}
if(!_27a){
_27a=dojo.io.formFilter;
}
var enc=/utf/i.test(_279||"")?encodeURIComponent:dojo.string.encodeAscii;
var _27c=[];
for(var i=0;i<_278.elements.length;i++){
var elm=_278.elements[i];
if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_27a(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){
_27c.push(name+"="+enc(elm.options[j].value));
}
}
}else{
if(dojo.lang.inArray(["radio","checkbox"],type)){
if(elm.checked){
_27c.push(name+"="+enc(elm.value));
}
}else{
_27c.push(name+"="+enc(elm.value));
}
}
}
var _282=_278.getElementsByTagName("input");
for(var i=0;i<_282.length;i++){
var _283=_282[i];
if(_283.type.toLowerCase()=="image"&&_283.form==_278&&_27a(_283)){
var name=enc(_283.name);
_27c.push(name+"="+enc(_283.value));
_27c.push(name+".x=0");
_27c.push(name+".y=0");
}
}
return _27c.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 _289=form.getElementsByTagName("input");
for(var i=0;i<_289.length;i++){
var _28a=_289[i];
if(_28a.type.toLowerCase()=="image"&&_28a.form==form){
this.connect(_28a,"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 _291=false;
if(node.disabled||!node.name){
_291=false;
}else{
if(dojo.lang.inArray(["submit","button","image"],type)){
if(!this.clickedButton){
this.clickedButton=node;
}
_291=node==this.clickedButton;
}else{
_291=!dojo.lang.inArray(["file","submit","reset","button"],type);
}
}
return _291;
},connect:function(_292,_293,_294){
if(dojo.evalObjPath("dojo.event.connect")){
dojo.event.connect(_292,_293,this,_294);
}else{
var fcn=dojo.lang.hitch(this,_294);
_292[_293]=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 _297=this;
var _298={};
this.useCache=false;
this.preventCache=false;
function getCacheKey(url,_29a,_29b){
return url+"|"+_29a+"|"+_29b.toLowerCase();
}
function addToCache(url,_29d,_29e,http){
_298[getCacheKey(url,_29d,_29e)]=http;
}
function getFromCache(url,_2a1,_2a2){
return _298[getCacheKey(url,_2a1,_2a2)];
}
this.clearCache=function(){
_298={};
};
function doLoad(_2a3,http,url,_2a6,_2a7){
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(_2a3.method.toLowerCase()=="head"){
var _2a9=http.getAllResponseHeaders();
ret={};
ret.toString=function(){
return _2a9;
};
var _2aa=_2a9.split(/[\r\n]+/g);
for(var i=0;i<_2aa.length;i++){
var pair=_2aa[i].match(/^([^:]+)\s*:\s*(.+)$/i);
if(pair){
ret[pair[1]]=pair[2];
}
}
}else{
if(_2a3.mimetype=="text/javascript"){
try{
ret=dj_eval(http.responseText);
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=null;
}
}else{
if(_2a3.mimetype=="text/json"||_2a3.mimetype=="application/json"){
try{
ret=dj_eval("("+http.responseText+")");
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=false;
}
}else{
if((_2a3.mimetype=="application/xml")||(_2a3.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(_2a7){
addToCache(url,_2a6,_2a3.method,http);
}
_2a3[(typeof _2a3.load=="function")?"load":"handle"]("load",ret,http,_2a3);
}else{
var _2ad=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText);
_2a3[(typeof _2a3.error=="function")?"error":"handle"]("error",_2ad,http,_2a3);
}
}
function setHeaders(http,_2af){
if(_2af["headers"]){
for(var _2b0 in _2af["headers"]){
if(_2b0.toLowerCase()=="content-type"&&!_2af["contentType"]){
_2af["contentType"]=_2af["headers"][_2b0];
}else{
http.setRequestHeader(_2b0,_2af["headers"][_2b0]);
}
}
}
}
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&&!_297._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 _2b4=new dojo.io.Error("XMLHttpTransport.watchInFlight Error: "+e);
tif.req[(typeof tif.req.error=="function")?"error":"handle"]("error",_2b4,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 _2b5=dojo.hostenv.getXmlhttpObject()?true:false;
this.canHandle=function(_2b6){
return _2b5&&dojo.lang.inArray(["text/plain","text/html","application/xml","text/xml","text/javascript","text/json","application/json"],(_2b6["mimetype"].toLowerCase()||""))&&!(_2b6["formNode"]&&dojo.io.formHasFile(_2b6["formNode"]));
};
this.multipartBoundary="45309FFF-BD65-4d50-99C9-36986896A96F";
this.bind=function(_2b7){
if(!_2b7["url"]){
if(!_2b7["formNode"]&&(_2b7["backButton"]||_2b7["back"]||_2b7["changeUrl"]||_2b7["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(_2b7);
return true;
}
}
var url=_2b7.url;
var _2b9="";
if(_2b7["formNode"]){
var ta=_2b7.formNode.getAttribute("action");
if((ta)&&(!_2b7["url"])){
url=ta;
}
var tp=_2b7.formNode.getAttribute("method");
if((tp)&&(!_2b7["method"])){
_2b7.method=tp;
}
_2b9+=dojo.io.encodeForm(_2b7.formNode,_2b7.encoding,_2b7["formFilter"]);
}
if(url.indexOf("#")>-1){
dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url);
url=url.split("#")[0];
}
if(_2b7["file"]){
_2b7.method="post";
}
if(!_2b7["method"]){
_2b7.method="get";
}
if(_2b7.method.toLowerCase()=="get"){
_2b7.multipart=false;
}else{
if(_2b7["file"]){
_2b7.multipart=true;
}else{
if(!_2b7["multipart"]){
_2b7.multipart=false;
}
}
}
if(_2b7["backButton"]||_2b7["back"]||_2b7["changeUrl"]){
dojo.undo.browser.addToHistory(_2b7);
}
var _2bc=_2b7["content"]||{};
if(_2b7.sendTransport){
_2bc["dojo.transport"]="xmlhttp";
}
do{
if(_2b7.postContent){
_2b9=_2b7.postContent;
break;
}
if(_2bc){
_2b9+=dojo.io.argsFromMap(_2bc,_2b7.encoding);
}
if(_2b7.method.toLowerCase()=="get"||!_2b7.multipart){
break;
}
var t=[];
if(_2b9.length){
var q=_2b9.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(_2b7.file){
if(dojo.lang.isArray(_2b7.file)){
for(var i=0;i<_2b7.file.length;++i){
var o=_2b7.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=_2b7.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+"--","");
_2b9=t.join("\r\n");
}
}while(false);
var _2c2=_2b7["sync"]?false:true;
var _2c3=_2b7["preventCache"]||(this.preventCache==true&&_2b7["preventCache"]!=false);
var _2c4=_2b7["useCache"]==true||(this.useCache==true&&_2b7["useCache"]!=false);
if(!_2c3&&_2c4){
var _2c5=getFromCache(url,_2b9,_2b7.method);
if(_2c5){
doLoad(_2b7,_2c5,url,_2b9,false);
return;
}
}
var http=dojo.hostenv.getXmlhttpObject(_2b7);
var _2c7=false;
if(_2c2){
var _2c8=this.inFlight.push({"req":_2b7,"http":http,"url":url,"query":_2b9,"useCache":_2c4,"startTime":_2b7.timeoutSeconds?(new Date()).getTime():0});
this.startWatchingInFlight();
}else{
_297._blockAsync=true;
}
if(_2b7.method.toLowerCase()=="post"){
if(!_2b7.user){
http.open("POST",url,_2c2);
}else{
http.open("POST",url,_2c2,_2b7.user,_2b7.password);
}
setHeaders(http,_2b7);
http.setRequestHeader("Content-Type",_2b7.multipart?("multipart/form-data; boundary="+this.multipartBoundary):(_2b7.contentType||"application/x-www-form-urlencoded"));
try{
http.send(_2b9);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_2b7,{status:404},url,_2b9,_2c4);
}
}else{
var _2c9=url;
if(_2b9!=""){
_2c9+=(_2c9.indexOf("?")>-1?"&":"?")+_2b9;
}
if(_2c3){
_2c9+=(dojo.string.endsWithAny(_2c9,"?","&")?"":(_2c9.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf();
}
if(!_2b7.user){
http.open(_2b7.method.toUpperCase(),_2c9,_2c2);
}else{
http.open(_2b7.method.toUpperCase(),_2c9,_2c2,_2b7.user,_2b7.password);
}
setHeaders(http,_2b7);
try{
http.send(null);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_2b7,{status:404},url,_2b9,_2c4);
}
}
if(!_2c2){
doLoad(_2b7,http,url,_2b9,_2c4);
_297._blockAsync=false;
}
_2b7.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,_2cb,days,path,_2ce,_2cf){
var _2d0=-1;
if((typeof days=="number")&&(days>=0)){
var d=new Date();
d.setTime(d.getTime()+(days*24*60*60*1000));
_2d0=d.toGMTString();
}
_2cb=escape(_2cb);
document.cookie=name+"="+_2cb+";"+(_2d0!=-1?" expires="+_2d0+";":"")+(path?"path="+path:"")+(_2ce?"; domain="+_2ce:"")+(_2cf?"; 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 _2d4=document.cookie.substring(idx+name.length+1);
var end=_2d4.indexOf(";");
if(end==-1){
end=_2d4.length;
}
_2d4=_2d4.substring(0,end);
_2d4=unescape(_2d4);
return _2d4;
};
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,_2db,_2dc,_2dd){
if(arguments.length==5){
_2dd=_2db;
_2db=null;
_2dc=null;
}
var _2de=[],_2df,_2e0="";
if(!_2dd){
_2df=dojo.io.cookie.getObjectCookie(name);
}
if(days>=0){
if(!_2df){
_2df={};
}
for(var prop in obj){
if(obj[prop]==null){
delete _2df[prop];
}else{
if((typeof obj[prop]=="string")||(typeof obj[prop]=="number")){
_2df[prop]=obj[prop];
}
}
}
prop=null;
for(var prop in _2df){
_2de.push(escape(prop)+"="+escape(_2df[prop]));
}
_2e0=_2de.join("&");
}
dojo.io.cookie.setCookie(name,_2e0,days,path,_2db,_2dc);
};
dojo.io.cookie.getObjectCookie=function(name){
var _2e3=null,_2e4=dojo.io.cookie.getCookie(name);
if(_2e4){
_2e3={};
var _2e5=_2e4.split("&");
for(var i=0;i<_2e5.length;i++){
var pair=_2e5[i].split("=");
var _2e8=pair[1];
if(isNaN(_2e8)){
_2e8=unescape(pair[1]);
}
_2e3[unescape(pair[0])]=_2e8;
}
}
return _2e3;
};
dojo.io.cookie.isSupported=function(){
if(typeof navigator.cookieEnabled!="boolean"){
dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null);
var _2e9=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__");
navigator.cookieEnabled=(_2e9=="CookiesAllowed");
if(navigator.cookieEnabled){
this.deleteCookie("__TestingYourBrowserForCookieSupport__");
}
}
return navigator.cookieEnabled;
};
if(!dojo.io.cookies){
dojo.io.cookies=dojo.io.cookie;
}
dojo.kwCompoundRequire({common:["dojo.io.common"],rhino:["dojo.io.RhinoIO"],browser:["dojo.io.BrowserIO","dojo.io.cookie"],dashboard:["dojo.io.BrowserIO","dojo.io.cookie"]});
dojo.provide("dojo.io.*");
dojo.provide("dojo.xml.Parse");
dojo.xml.Parse=function(){
var isIE=((dojo.render.html.capable)&&(dojo.render.html.ie));
function getTagName(node){
try{
return node.tagName.toLowerCase();
}
catch(e){
return "";
}
}
function getDojoTagName(node){
var _2ed=getTagName(node);
if(!_2ed){
return "";
}
if((dojo.widget)&&(dojo.widget.tags[_2ed])){
return _2ed;
}
var p=_2ed.indexOf(":");
if(p>=0){
return _2ed;
}
if(_2ed.substr(0,5)=="dojo:"){
return _2ed;
}
if(dojo.render.html.capable&&dojo.render.html.ie&&node.scopeName!="HTML"){
return node.scopeName.toLowerCase()+":"+_2ed;
}
if(_2ed.substr(0,4)=="dojo"){
return "dojo:"+_2ed.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 _2f0=node.className||node.getAttribute("class");
if((_2f0)&&(_2f0.indexOf)&&(_2f0.indexOf("dojo-")!=-1)){
var _2f1=_2f0.split(" ");
for(var x=0,c=_2f1.length;x<c;x++){
if(_2f1[x].slice(0,5)=="dojo-"){
return "dojo:"+_2f1[x].substr(5).toLowerCase();
}
}
}
}
return "";
}
this.parseElement=function(node,_2f5,_2f6,_2f7){
var _2f8=getTagName(node);
if(isIE&&_2f8.indexOf("/")==0){
return null;
}
try{
var attr=node.getAttribute("parseWidgets");
if(attr&&attr.toLowerCase()=="false"){
return {};
}
}
catch(e){
}
var _2fa=true;
if(_2f6){
var _2fb=getDojoTagName(node);
_2f8=_2fb||_2f8;
_2fa=Boolean(_2fb);
}
var _2fc={};
_2fc[_2f8]=[];
var pos=_2f8.indexOf(":");
if(pos>0){
var ns=_2f8.substring(0,pos);
_2fc["ns"]=ns;
if((dojo.ns)&&(!dojo.ns.allow(ns))){
_2fa=false;
}
}
if(_2fa){
var _2ff=this.parseAttributes(node);
for(var attr in _2ff){
if((!_2fc[_2f8][attr])||(typeof _2fc[_2f8][attr]!="array")){
_2fc[_2f8][attr]=[];
}
_2fc[_2f8][attr].push(_2ff[attr]);
}
_2fc[_2f8].nodeRef=node;
_2fc.tagName=_2f8;
_2fc.index=_2f7||0;
}
var _300=0;
for(var i=0;i<node.childNodes.length;i++){
var tcn=node.childNodes.item(i);
switch(tcn.nodeType){
case dojo.dom.ELEMENT_NODE:
var ctn=getDojoTagName(tcn)||getTagName(tcn);
if(!_2fc[ctn]){
_2fc[ctn]=[];
}
_2fc[ctn].push(this.parseElement(tcn,true,_2f6,_300));
if((tcn.childNodes.length==1)&&(tcn.childNodes.item(0).nodeType==dojo.dom.TEXT_NODE)){
_2fc[ctn][_2fc[ctn].length-1].value=tcn.childNodes.item(0).nodeValue;
}
_300++;
break;
case dojo.dom.TEXT_NODE:
if(node.childNodes.length==1){
_2fc[_2f8].push({value:node.childNodes.item(0).nodeValue});
}
break;
default:
break;
}
}
return _2fc;
};
this.parseAttributes=function(node){
var _305={};
var atts=node.attributes;
var _307,i=0;
while((_307=atts[i++])){
if(isIE){
if(!_307){
continue;
}
if((typeof _307=="object")&&(typeof _307.nodeValue=="undefined")||(_307.nodeValue==null)||(_307.nodeValue=="")){
continue;
}
}
var nn=_307.nodeName.split(":");
nn=(nn.length==2)?nn[1]:_307.nodeName;
_305[nn]={value:_307.nodeValue};
}
return _305;
};
};
dojo.provide("dojo.lang.declare");
dojo.lang.declare=function(_30a,_30b,init,_30d){
if((dojo.lang.isFunction(_30d))||((!_30d)&&(!dojo.lang.isFunction(init)))){
var temp=_30d;
_30d=init;
init=temp;
}
var _30f=[];
if(dojo.lang.isArray(_30b)){
_30f=_30b;
_30b=_30f.shift();
}
if(!init){
init=dojo.evalObjPath(_30a,false);
if((init)&&(!dojo.lang.isFunction(init))){
init=null;
}
}
var ctor=dojo.lang.declare._makeConstructor();
var scp=(_30b?_30b.prototype:null);
if(scp){
scp.prototyping=true;
ctor.prototype=new _30b();
scp.prototyping=false;
}
ctor.superclass=scp;
ctor.mixins=_30f;
for(var i=0,l=_30f.length;i<l;i++){
dojo.lang.extend(ctor,_30f[i].prototype);
}
ctor.prototype.initializer=null;
ctor.prototype.declaredClass=_30a;
if(dojo.lang.isArray(_30d)){
dojo.lang.extend.apply(dojo.lang,[ctor].concat(_30d));
}else{
dojo.lang.extend(ctor,(_30d)||{});
}
dojo.lang.extend(ctor,dojo.lang.declare._common);
ctor.prototype.constructor=ctor;
ctor.prototype.initializer=(ctor.prototype.initializer)||(init)||(function(){
});
var _314=dojo.parseObjPath(_30a,null,true);
_314.obj[_314.prop]=ctor;
return ctor;
};
dojo.lang.declare._makeConstructor=function(){
return function(){
var self=this._getPropContext();
var s=self.constructor.superclass;
if((s)&&(s.constructor)){
if(s.constructor==arguments.callee){
this._inherited("constructor",arguments);
}else{
this._contextMethod(s,"constructor",arguments);
}
}
var ms=(self.constructor.mixins)||([]);
for(var i=0,m;(m=ms[i]);i++){
(((m.prototype)&&(m.prototype.initializer))||(m)).apply(this,arguments);
}
if((!this.prototyping)&&(self.initializer)){
self.initializer.apply(this,arguments);
}
};
};
dojo.lang.declare._common={_getPropContext:function(){
return (this.___proto||this);
},_contextMethod:function(_31a,_31b,args){
var _31d,_31e=this.___proto;
this.___proto=_31a;
try{
_31d=_31a[_31b].apply(this,(args||[]));
}
catch(e){
throw e;
}
finally{
this.___proto=_31e;
}
return _31d;
},_inherited:function(prop,args){
var p=this._getPropContext();
do{
if((!p.constructor)||(!p.constructor.superclass)){
return;
}
p=p.constructor.superclass;
}while(!(prop in p));
return (dojo.lang.isFunction(p[prop])?this._contextMethod(p,prop,args):p[prop]);
},inherited:function(prop,args){
dojo.deprecated("'inherited' method is dangerous, do not up-call! 'inherited' is slated for removal in 0.5; name your super class (or use superclass property) instead.","0.5");
this._inherited(prop,args);
}};
dojo.declare=dojo.lang.declare;
dojo.provide("dojo.ns");
dojo.ns={namespaces:{},failed:{},loading:{},loaded:{},register:function(name,_325,_326,_327){
if(!_327||!this.namespaces[name]){
this.namespaces[name]=new dojo.ns.Ns(name,_325,_326);
}
},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,_32e,_32f){
this.name=name;
this.module=_32e;
this.resolver=_32f;
this._loaded=[];
this._failed=[];
};
dojo.ns.Ns.prototype.resolve=function(name,_331,_332){
if(!this.resolver||djConfig["skipAutoRequire"]){
return false;
}
var _333=this.resolver(name,_331);
if((_333)&&(!this._loaded[_333])&&(!this._failed[_333])){
var req=dojo.require;
req(_333,false,true);
if(dojo.hostenv.findModule(_333,false)){
this._loaded[_333]=true;
}else{
if(!_332){
dojo.raise("dojo.ns.Ns.resolve: module '"+_333+"' not found after loading via namespace '"+this.name+"'");
}
this._failed[_333]=true;
}
}
return Boolean(this._loaded[_333]);
};
dojo.registerNamespace=function(name,_336,_337){
dojo.ns.register.apply(dojo.ns,arguments);
};
dojo.registerNamespaceResolver=function(name,_339){
var n=dojo.ns.namespaces[name];
if(n){
n.resolver=_339;
}
};
dojo.registerNamespaceManifest=function(_33b,path,name,_33e,_33f){
dojo.registerModulePath(name,path);
dojo.registerNamespace(name,_33e,_33f);
};
dojo.registerNamespace("dojo","dojo.widget");
dojo.provide("dojo.event.common");
dojo.event=new function(){
this._canTimeout=dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]);
function interpolateArgs(args,_341){
var dl=dojo.lang;
var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(args.length>2)?args[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false,maxCalls:-1};
switch(args.length){
case 0:
return;
case 1:
return;
case 2:
ao.srcFunc=args[0];
ao.adviceFunc=args[1];
break;
case 3:
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=args[0];
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
}else{
if((dl.isString(args[1]))&&(dl.isString(args[2]))){
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
}else{
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){
ao.adviceType="after";
ao.srcObj=args[0];
ao.srcFunc=args[1];
var _344=dl.nameAnonFunc(args[2],ao.adviceObj,_341);
ao.adviceFunc=_344;
}else{
if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=dj_global;
var _344=dl.nameAnonFunc(args[0],ao.srcObj,_341);
ao.srcFunc=_344;
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 _344=dl.nameAnonFunc(args[1],dj_global,_341);
ao.srcFunc=_344;
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 _344=dl.nameAnonFunc(args[3],dj_global,_341);
ao.adviceObj=dj_global;
ao.adviceFunc=_344;
}else{
if(dl.isObject(args[1])){
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=dj_global;
ao.adviceFunc=args[3];
}else{
if(dl.isObject(args[2])){
ao.srcObj=dj_global;
ao.srcFunc=args[1];
ao.adviceObj=args[2];
ao.adviceFunc=args[3];
}else{
ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global;
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
ao.aroundFunc=args[3];
}
}
}
}
}
}
break;
case 6:
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=args[3];
ao.adviceFunc=args[4];
ao.aroundFunc=args[5];
ao.aroundObj=dj_global;
break;
default:
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=args[3];
ao.adviceFunc=args[4];
ao.aroundObj=args[5];
ao.aroundFunc=args[6];
ao.once=args[7];
ao.delay=args[8];
ao.rate=args[9];
ao.adviceMsg=args[10];
ao.maxCalls=(!isNaN(parseInt(args[11])))?args[11]:-1;
break;
}
if(dl.isFunction(ao.aroundFunc)){
var _344=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,_341);
ao.aroundFunc=_344;
}
if(dl.isFunction(ao.srcFunc)){
ao.srcFunc=dl.getNameInObj(ao.srcObj,ao.srcFunc);
}
if(dl.isFunction(ao.adviceFunc)){
ao.adviceFunc=dl.getNameInObj(ao.adviceObj,ao.adviceFunc);
}
if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){
ao.aroundFunc=dl.getNameInObj(ao.aroundObj,ao.aroundFunc);
}
if(!ao.srcObj){
dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc);
}
if(!ao.adviceObj){
dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc);
}
if(!ao.adviceFunc){
dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc);
dojo.debugShallow(ao);
}
return ao;
}
this.connect=function(){
if(arguments.length==1){
var ao=arguments[0];
}else{
var ao=interpolateArgs(arguments,true);
}
if(dojo.lang.isArray(ao.srcObj)&&ao.srcObj!=""){
var _346={};
for(var x in ao){
_346[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);
}
_346.srcObj=src;
mjps.push(dojo.event.connect.call(dojo.event,_346));
});
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 _34e;
if((arguments.length==1)&&(typeof a1=="object")){
_34e=a1;
}else{
_34e={srcObj:a1,srcFunc:a2};
}
_34e.adviceFunc=function(){
var _34f=[];
for(var x=0;x<arguments.length;x++){
_34f.push(arguments[x]);
}
dojo.debug("("+_34e.srcObj+")."+_34e.srcFunc,":",_34f.join(", "));
};
this.kwConnect(_34e);
};
this.connectBefore=function(){
var args=["before"];
for(var i=0;i<arguments.length;i++){
args.push(arguments[i]);
}
return this.connect.apply(this,args);
};
this.connectAround=function(){
var args=["around"];
for(var i=0;i<arguments.length;i++){
args.push(arguments[i]);
}
return this.connect.apply(this,args);
};
this.connectOnce=function(){
var ao=interpolateArgs(arguments,true);
ao.once=true;
return this.connect(ao);
};
this.connectRunOnce=function(){
var ao=interpolateArgs(arguments,true);
ao.maxCalls=1;
return this.connect(ao);
};
this._kwConnectImpl=function(_357,_358){
var fn=(_358)?"disconnect":"connect";
if(typeof _357["srcFunc"]=="function"){
_357.srcObj=_357["srcObj"]||dj_global;
var _35a=dojo.lang.nameAnonFunc(_357.srcFunc,_357.srcObj,true);
_357.srcFunc=_35a;
}
if(typeof _357["adviceFunc"]=="function"){
_357.adviceObj=_357["adviceObj"]||dj_global;
var _35a=dojo.lang.nameAnonFunc(_357.adviceFunc,_357.adviceObj,true);
_357.adviceFunc=_35a;
}
_357.srcObj=_357["srcObj"]||dj_global;
_357.adviceObj=_357["adviceObj"]||_357["targetObj"]||dj_global;
_357.adviceFunc=_357["adviceFunc"]||_357["targetFunc"];
return dojo.event[fn](_357);
};
this.kwConnect=function(_35b){
return this._kwConnectImpl(_35b,false);
};
this.disconnect=function(){
if(arguments.length==1){
var ao=arguments[0];
}else{
var ao=interpolateArgs(arguments,true);
}
if(!ao.adviceFunc){
return;
}
if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){
if(dojo.render.html.ie){
ao.srcFunc="onkeydown";
this.disconnect(ao);
}
ao.srcFunc="onkeypress";
}
if(!ao.srcObj[ao.srcFunc]){
return null;
}
var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc,true);
mjp.removeAdvice(ao.adviceObj,ao.adviceFunc,ao.adviceType,ao.once);
return mjp;
};
this.kwDisconnect=function(_35e){
return this._kwConnectImpl(_35e,true);
};
};
dojo.event.MethodInvocation=function(_35f,obj,args){
this.jp_=_35f;
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,_367){
this.object=obj||dj_global;
this.methodname=_367;
this.methodfunc=this.object[_367];
this.squelch=false;
};
dojo.event.MethodJoinPoint.getForMethod=function(obj,_369){
if(!obj){
obj=dj_global;
}
var ofn=obj[_369];
if(!ofn){
ofn=obj[_369]=function(){
};
if(!obj[_369]){
dojo.raise("Cannot set do-nothing method on that object "+_369);
}
}else{
if((typeof ofn!="function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){
return null;
}
}
var _36b=_369+"$joinpoint";
var _36c=_369+"$joinpoint$method";
var _36d=obj[_36b];
if(!_36d){
var _36e=false;
if(dojo.event["browser"]){
if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){
_36e=true;
dojo.event.browser.addClobberNodeAttrs(obj,[_36b,_36c,_369]);
}
}
var _36f=ofn.length;
obj[_36c]=ofn;
_36d=obj[_36b]=new dojo.event.MethodJoinPoint(obj,_36c);
if(!_36e){
obj[_369]=function(){
return _36d.run.apply(_36d,arguments);
};
}else{
obj[_369]=function(){
var args=[];
if(!arguments.length){
var evt=null;
try{
if(obj.ownerDocument){
evt=obj.ownerDocument.parentWindow.event;
}else{
if(obj.documentElement){
evt=obj.documentElement.ownerDocument.parentWindow.event;
}else{
if(obj.event){
evt=obj.event;
}else{
evt=window.event;
}
}
}
}
catch(e){
evt=window.event;
}
if(evt){
args.push(dojo.event.browser.fixEvent(evt,this));
}
}else{
for(var x=0;x<arguments.length;x++){
if((x==0)&&(dojo.event.browser.isEvent(arguments[x]))){
args.push(dojo.event.browser.fixEvent(arguments[x],this));
}else{
args.push(arguments[x]);
}
}
}
return _36d.run.apply(_36d,args);
};
}
obj[_369].__preJoinArity=_36f;
}
return _36d;
};
dojo.lang.extend(dojo.event.MethodJoinPoint,{squelch:false,unintercept:function(){
this.object[this.methodname]=this.methodfunc;
this.before=[];
this.after=[];
this.around=[];
},disconnect:dojo.lang.forward("unintercept"),run:function(){
var obj=this.object||dj_global;
var args=arguments;
var _375=[];
for(var x=0;x<args.length;x++){
_375[x]=args[x];
}
var _377=function(marr){
if(!marr){
dojo.debug("Null argument to unrollAdvice()");
return;
}
var _379=marr[0]||dj_global;
var _37a=marr[1];
if(!_379[_37a]){
dojo.raise("function \""+_37a+"\" does not exist on \""+_379+"\"");
}
var _37b=marr[2]||dj_global;
var _37c=marr[3];
var msg=marr[6];
var _37e=marr[7];
if(_37e>-1){
if(_37e==0){
return;
}
marr[7]--;
}
var _37f;
var to={args:[],jp_:this,object:obj,proceed:function(){
return _379[_37a].apply(_379,to.args);
}};
to.args=_375;
var _381=parseInt(marr[4]);
var _382=((!isNaN(_381))&&(marr[4]!==null)&&(typeof marr[4]!="undefined"));
if(marr[5]){
var rate=parseInt(marr[5]);
var cur=new Date();
var _385=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;
_377(mcpy);
},tod);
}
return;
}else{
marr.last=cur;
}
}
if(_37c){
_37b[_37c].call(_37b,to);
}else{
if((_382)&&((dojo.render.html)||(dojo.render.svg))){
dj_global["setTimeout"](function(){
if(msg){
_379[_37a].call(_379,to);
}else{
_379[_37a].apply(_379,args);
}
},_381);
}else{
if(msg){
_379[_37a].call(_379,to);
}else{
_379[_37a].apply(_379,args);
}
}
}
};
var _388=function(){
if(this.squelch){
try{
return _377.apply(this,arguments);
}
catch(e){
dojo.debug(e);
}
}else{
return _377.apply(this,arguments);
}
};
if((this["before"])&&(this.before.length>0)){
dojo.lang.forEach(this.before.concat(new Array()),_388);
}
var _389;
try{
if((this["around"])&&(this.around.length>0)){
var mi=new dojo.event.MethodInvocation(this,obj,args);
_389=mi.proceed();
}else{
if(this.methodfunc){
_389=this.object[this.methodname].apply(this.object,args);
}
}
}
catch(e){
if(!this.squelch){
dojo.debug(e,"when calling",this.methodname,"on",this.object,"with arguments",args);
dojo.raise(e);
}
}
if((this["after"])&&(this.after.length>0)){
dojo.lang.forEach(this.after.concat(new Array()),_388);
}
return (this.methodfunc)?_389:null;
},getArr:function(kind){
var type="after";
if((typeof kind=="string")&&(kind.indexOf("before")!=-1)){
type="before";
}else{
if(kind=="around"){
type="around";
}
}
if(!this[type]){
this[type]=[];
}
return this[type];
},kwAddAdvice:function(args){
this.addAdvice(args["adviceObj"],args["adviceFunc"],args["aroundObj"],args["aroundFunc"],args["adviceType"],args["precedence"],args["once"],args["delay"],args["rate"],args["adviceMsg"],args["maxCalls"]);
},addAdvice:function(_38e,_38f,_390,_391,_392,_393,once,_395,rate,_397,_398){
var arr=this.getArr(_392);
if(!arr){
dojo.raise("bad this: "+this);
}
var ao=[_38e,_38f,_390,_391,_395,rate,_397,_398];
if(once){
if(this.hasAdvice(_38e,_38f,_392,arr)>=0){
return;
}
}
if(_393=="first"){
arr.unshift(ao);
}else{
arr.push(ao);
}
},hasAdvice:function(_39b,_39c,_39d,arr){
if(!arr){
arr=this.getArr(_39d);
}
var ind=-1;
for(var x=0;x<arr.length;x++){
var aao=(typeof _39c=="object")?(new String(_39c)).toString():_39c;
var a1o=(typeof arr[x][1]=="object")?(new String(arr[x][1])).toString():arr[x][1];
if((arr[x][0]==_39b)&&(a1o==aao)){
ind=x;
}
}
return ind;
},removeAdvice:function(_3a3,_3a4,_3a5,once){
var arr=this.getArr(_3a5);
var ind=this.hasAdvice(_3a3,_3a4,_3a5,arr);
if(ind==-1){
return false;
}
while(ind!=-1){
arr.splice(ind,1);
if(once){
break;
}
ind=this.hasAdvice(_3a3,_3a4,_3a5,arr);
}
return true;
}});
dojo.provide("dojo.event.topic");
dojo.event.topic=new function(){
this.topics={};
this.getTopic=function(_3a9){
if(!this.topics[_3a9]){
this.topics[_3a9]=new this.TopicImpl(_3a9);
}
return this.topics[_3a9];
};
this.registerPublisher=function(_3aa,obj,_3ac){
var _3aa=this.getTopic(_3aa);
_3aa.registerPublisher(obj,_3ac);
};
this.subscribe=function(_3ad,obj,_3af){
var _3ad=this.getTopic(_3ad);
_3ad.subscribe(obj,_3af);
};
this.unsubscribe=function(_3b0,obj,_3b2){
var _3b0=this.getTopic(_3b0);
_3b0.unsubscribe(obj,_3b2);
};
this.destroy=function(_3b3){
this.getTopic(_3b3).destroy();
delete this.topics[_3b3];
};
this.publishApply=function(_3b4,args){
var _3b4=this.getTopic(_3b4);
_3b4.sendMessage.apply(_3b4,args);
};
this.publish=function(_3b6,_3b7){
var _3b6=this.getTopic(_3b6);
var args=[];
for(var x=1;x<arguments.length;x++){
args.push(arguments[x]);
}
_3b6.sendMessage.apply(_3b6,args);
};
};
dojo.event.topic.TopicImpl=function(_3ba){
this.topicName=_3ba;
this.subscribe=function(_3bb,_3bc){
var tf=_3bc||_3bb;
var to=(!_3bc)?dj_global:_3bb;
return dojo.event.kwConnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
};
this.unsubscribe=function(_3bf,_3c0){
var tf=(!_3c0)?_3bf:_3c0;
var to=(!_3c0)?null:_3bf;
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(_3c3){
this._getJoinPoint().squelch=_3c3;
};
this.destroy=function(){
this._getJoinPoint().disconnect();
};
this.registerPublisher=function(_3c4,_3c5){
dojo.event.connect(_3c4,_3c5,this,"sendMessage");
};
this.sendMessage=function(_3c6){
};
};
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(_3c9){
var na;
var tna;
if(_3c9){
tna=_3c9.all||_3c9.getElementsByTagName("*");
na=[_3c9];
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 _3cd={};
for(var i=na.length-1;i>=0;i=i-1){
var el=na[i];
try{
if(el&&el["__clobberAttrs__"]){
for(var j=0;j<el.__clobberAttrs__.length;j++){
nukeProp(el,el.__clobberAttrs__[j]);
}
nukeProp(el,"__clobberAttrs__");
nukeProp(el,"__doClobber__");
}
}
catch(e){
}
}
na=null;
};
};
if(dojo.render.html.ie){
dojo.addOnUnload(function(){
dojo._ie_clobber.clobber();
try{
if((dojo["widget"])&&(dojo.widget["manager"])){
dojo.widget.manager.destroyAll();
}
}
catch(e){
}
if(dojo.widget){
for(var name in dojo.widget._templateCache){
if(dojo.widget._templateCache[name].node){
dojo.dom.destroyNode(dojo.widget._templateCache[name].node);
dojo.widget._templateCache[name].node=null;
delete dojo.widget._templateCache[name].node;
}
}
}
try{
window.onload=null;
}
catch(e){
}
try{
window.onunload=null;
}
catch(e){
}
dojo._ie_clobber.clobberNodes=[];
});
}
dojo.event.browser=new function(){
var _3d2=0;
this.normalizedEventName=function(_3d3){
switch(_3d3){
case "CheckboxStateChange":
case "DOMAttrModified":
case "DOMMenuItemActive":
case "DOMMenuItemInactive":
case "DOMMouseScroll":
case "DOMNodeInserted":
case "DOMNodeRemoved":
case "RadioStateChange":
return _3d3;
break;
default:
var lcn=_3d3.toLowerCase();
return (lcn.indexOf("on")==0)?lcn.substr(2):lcn;
break;
}
};
this.clean=function(node){
if(dojo.render.html.ie){
dojo._ie_clobber.clobber(node);
}
};
this.addClobberNode=function(node){
if(!dojo.render.html.ie){
return;
}
if(!node["__doClobber__"]){
node.__doClobber__=true;
dojo._ie_clobber.clobberNodes.push(node);
node.__clobberAttrs__=[];
}
};
this.addClobberNodeAttrs=function(node,_3d8){
if(!dojo.render.html.ie){
return;
}
this.addClobberNode(node);
for(var x=0;x<_3d8.length;x++){
node.__clobberAttrs__.push(_3d8[x]);
}
};
this.removeListener=function(node,_3db,fp,_3dd){
if(!_3dd){
var _3dd=false;
}
_3db=dojo.event.browser.normalizedEventName(_3db);
if(_3db=="key"){
if(dojo.render.html.ie){
this.removeListener(node,"onkeydown",fp,_3dd);
}
_3db="keypress";
}
if(node.removeEventListener){
node.removeEventListener(_3db,fp,_3dd);
}
};
this.addListener=function(node,_3df,fp,_3e1,_3e2){
if(!node){
return;
}
if(!_3e1){
var _3e1=false;
}
_3df=dojo.event.browser.normalizedEventName(_3df);
if(_3df=="key"){
if(dojo.render.html.ie){
this.addListener(node,"onkeydown",fp,_3e1,_3e2);
}
_3df="keypress";
}
if(!_3e2){
var _3e3=function(evt){
if(!evt){
evt=window.event;
}
var ret=fp(dojo.event.browser.fixEvent(evt,this));
if(_3e1){
dojo.event.browser.stopEvent(evt);
}
return ret;
};
}else{
_3e3=fp;
}
if(node.addEventListener){
node.addEventListener(_3df,_3e3,_3e1);
return _3e3;
}else{
_3df="on"+_3df;
if(typeof node[_3df]=="function"){
var _3e6=node[_3df];
node[_3df]=function(e){
_3e6(e);
return _3e3(e);
};
}else{
node[_3df]=_3e3;
}
if(dojo.render.html.ie){
this.addClobberNodeAttrs(node,[_3df]);
}
return _3e3;
}
};
this.isEvent=function(obj){
return (typeof obj!="undefined")&&(obj)&&(typeof Event!="undefined")&&(obj.eventPhase);
};
this.currentEvent=null;
this.callListener=function(_3e9,_3ea){
if(typeof _3e9!="function"){
dojo.raise("listener not a function: "+_3e9);
}
dojo.event.browser.currentEvent.currentTarget=_3ea;
return _3e9.call(_3ea,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,_3ed){
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 _3ef=evt.keyCode;
if(_3ef>=65&&_3ef<=90&&evt.shiftKey==false){
_3ef+=32;
}
if(_3ef>=1&&_3ef<=26&&evt.ctrlKey){
_3ef+=96;
}
evt.key=String.fromCharCode(_3ef);
}
}
}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 _3ef=evt.which;
if((evt.ctrlKey||evt.altKey||evt.metaKey)&&(evt.which>=65&&evt.which<=90&&evt.shiftKey==false)){
_3ef+=32;
}
evt.key=String.fromCharCode(_3ef);
}
}
}
}else{
if(dojo.render.html.ie){
if(!evt.ctrlKey&&!evt.altKey&&evt.keyCode>=evt.KEY_SPACE){
evt.key=String.fromCharCode(evt.keyCode);
}
}else{
if(dojo.render.html.safari){
switch(evt.keyCode){
case 25:
evt.key=evt.KEY_TAB;
evt.shift=true;
break;
case 63232:
evt.key=evt.KEY_UP_ARROW;
break;
case 63233:
evt.key=evt.KEY_DOWN_ARROW;
break;
case 63234:
evt.key=evt.KEY_LEFT_ARROW;
break;
case 63235:
evt.key=evt.KEY_RIGHT_ARROW;
break;
case 63236:
evt.key=evt.KEY_F1;
break;
case 63237:
evt.key=evt.KEY_F2;
break;
case 63238:
evt.key=evt.KEY_F3;
break;
case 63239:
evt.key=evt.KEY_F4;
break;
case 63240:
evt.key=evt.KEY_F5;
break;
case 63241:
evt.key=evt.KEY_F6;
break;
case 63242:
evt.key=evt.KEY_F7;
break;
case 63243:
evt.key=evt.KEY_F8;
break;
case 63244:
evt.key=evt.KEY_F9;
break;
case 63245:
evt.key=evt.KEY_F10;
break;
case 63246:
evt.key=evt.KEY_F11;
break;
case 63247:
evt.key=evt.KEY_F12;
break;
case 63250:
evt.key=evt.KEY_PAUSE;
break;
case 63272:
evt.key=evt.KEY_DELETE;
break;
case 63273:
evt.key=evt.KEY_HOME;
break;
case 63275:
evt.key=evt.KEY_END;
break;
case 63276:
evt.key=evt.KEY_PAGE_UP;
break;
case 63277:
evt.key=evt.KEY_PAGE_DOWN;
break;
case 63302:
evt.key=evt.KEY_INSERT;
break;
case 63248:
case 63249:
case 63289:
break;
default:
evt.key=evt.charCode>=evt.KEY_SPACE?String.fromCharCode(evt.charCode):evt.keyCode;
}
}else{
evt.key=evt.charCode>0?String.fromCharCode(evt.charCode):evt.keyCode;
}
}
}
}
}
}
if(dojo.render.html.ie){
if(!evt.target){
evt.target=evt.srcElement;
}
if(!evt.currentTarget){
evt.currentTarget=(_3ed?_3ed: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 _3f1=((dojo.render.html.ie55)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;
if(!evt.pageX){
evt.pageX=evt.clientX+(_3f1.scrollLeft||0);
}
if(!evt.pageY){
evt.pageY=evt.clientY+(_3f1.scrollTop||0);
}
if(evt.type=="mouseover"){
evt.relatedTarget=evt.fromElement;
}
if(evt.type=="mouseout"){
evt.relatedTarget=evt.toElement;
}
this.currentEvent=evt;
evt.callListener=this.callListener;
evt.stopPropagation=this._stopPropagation;
evt.preventDefault=this._preventDefault;
}
return evt;
};
this.stopEvent=function(evt){
if(window.event){
evt.cancelBubble=true;
evt.returnValue=false;
}else{
evt.preventDefault();
evt.stopPropagation();
}
};
};
dojo.kwCompoundRequire({common:["dojo.event.common","dojo.event.topic"],browser:["dojo.event.browser"],dashboard:["dojo.event.browser"]});
dojo.provide("dojo.event.*");
dojo.provide("dojo.widget.Manager");
dojo.widget.manager=new function(){
this.widgets=[];
this.widgetIds=[];
this.topWidgets={};
var _3f3={};
var _3f4=[];
this.getUniqueId=function(_3f5){
var _3f6;
do{
_3f6=_3f5+"_"+(_3f3[_3f5]!=undefined?++_3f3[_3f5]:_3f3[_3f5]=0);
}while(this.getWidgetById(_3f6));
return _3f6;
};
this.add=function(_3f7){
this.widgets.push(_3f7);
if(!_3f7.extraArgs["id"]){
_3f7.extraArgs["id"]=_3f7.extraArgs["ID"];
}
if(_3f7.widgetId==""){
if(_3f7["id"]){
_3f7.widgetId=_3f7["id"];
}else{
if(_3f7.extraArgs["id"]){
_3f7.widgetId=_3f7.extraArgs["id"];
}else{
_3f7.widgetId=this.getUniqueId(_3f7.ns+"_"+_3f7.widgetType);
}
}
}
if(this.widgetIds[_3f7.widgetId]){
dojo.debug("widget ID collision on ID: "+_3f7.widgetId);
}
this.widgetIds[_3f7.widgetId]=_3f7;
};
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(_3f9){
if(dojo.lang.isNumber(_3f9)){
var tw=this.widgets[_3f9].widgetId;
delete this.topWidgets[tw];
delete this.widgetIds[tw];
this.widgets.splice(_3f9,1);
}else{
this.removeById(_3f9);
}
};
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 _400=(type.indexOf(":")<0?function(x){
return x.widgetType.toLowerCase();
}:function(x){
return x.getNamespacedType();
});
var ret=[];
dojo.lang.forEach(this.widgets,function(x){
if(_400(x)==lt){
ret.push(x);
}
});
return ret;
};
this.getWidgetsByFilter=function(_405,_406){
var ret=[];
dojo.lang.every(this.widgets,function(x){
if(_405(x)){
ret.push(x);
if(_406){
return false;
}
}
return true;
});
return (_406?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 _40c={};
var _40d=["dojo.widget"];
for(var i=0;i<_40d.length;i++){
_40d[_40d[i]]=true;
}
this.registerWidgetPackage=function(_40f){
if(!_40d[_40f]){
_40d[_40f]=true;
_40d.push(_40f);
}
};
this.getWidgetPackageList=function(){
return dojo.lang.map(_40d,function(elt){
return (elt!==true?elt:undefined);
});
};
this.getImplementation=function(_411,_412,_413,ns){
var impl=this.getImplementationName(_411,ns);
if(impl){
var ret=_412?new impl(_412):new impl();
return ret;
}
};
function buildPrefixCache(){
for(var _417 in dojo.render){
if(dojo.render[_417]["capable"]===true){
var _418=dojo.render[_417].prefixes;
for(var i=0;i<_418.length;i++){
_3f4.push(_418[i].toLowerCase());
}
}
}
}
var _41a=function(_41b,_41c){
if(!_41c){
return null;
}
for(var i=0,l=_3f4.length,_41f;i<=l;i++){
_41f=(i<l?_41c[_3f4[i]]:_41c);
if(!_41f){
continue;
}
for(var name in _41f){
if(name.toLowerCase()==_41b){
return _41f[name];
}
}
}
return null;
};
var _421=function(_422,_423){
var _424=dojo.evalObjPath(_423,false);
return (_424?_41a(_422,_424):null);
};
this.getImplementationName=function(_425,ns){
var _427=_425.toLowerCase();
ns=ns||"dojo";
var imps=_40c[ns]||(_40c[ns]={});
var impl=imps[_427];
if(impl){
return impl;
}
if(!_3f4.length){
buildPrefixCache();
}
var _42a=dojo.ns.get(ns);
if(!_42a){
dojo.ns.register(ns,ns+".widget");
_42a=dojo.ns.get(ns);
}
if(_42a){
_42a.resolve(_425);
}
impl=_421(_427,_42a.module);
if(impl){
return (imps[_427]=impl);
}
_42a=dojo.ns.require(ns);
if((_42a)&&(_42a.resolver)){
_42a.resolve(_425);
impl=_421(_427,_42a.module);
if(impl){
return (imps[_427]=impl);
}
}
dojo.deprecated("dojo.widget.Manager.getImplementationName","Could not locate widget implementation for \""+_425+"\" in \""+_42a.module+"\" registered to namespace \""+_42a.name+"\". "+"Developers must specify correct namespaces for all non-Dojo widgets","0.5");
for(var i=0;i<_40d.length;i++){
impl=_421(_427,_40d[i]);
if(impl){
return (imps[_427]=impl);
}
}
throw new Error("Could not locate widget implementation for \""+_425+"\" in \""+_42a.module+"\" registered to namespace \""+_42a.name+"\"");
};
this.resizing=false;
this.onWindowResized=function(){
if(this.resizing){
return;
}
try{
this.resizing=true;
for(var id in this.topWidgets){
var _42d=this.topWidgets[id];
if(_42d.checkSize){
_42d.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(_432,_433){
dw[(_433||_432)]=h(_432);
};
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 _435=dwm.getAllWidgets.apply(dwm,arguments);
if(arguments.length>0){
return _435[n];
}
return _435;
};
g("registerWidgetPackage");
g("getImplementation","getWidgetImplementation");
g("getImplementationName","getWidgetImplementationName");
dw.widgets=dwm.widgets;
dw.widgetIds=dwm.widgetIds;
dw.root=dwm.root;
})();
dojo.provide("dojo.uri.Uri");
dojo.uri=new function(){
this.dojoUri=function(uri){
return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(),uri);
};
this.moduleUri=function(_437,uri){
var loc=dojo.hostenv.getModuleSymbols(_437).join("/");
if(!loc){
return null;
}
if(loc.lastIndexOf("/")!=loc.length-1){
loc+="/";
}
var _43a=loc.indexOf(":");
var _43b=loc.indexOf("/");
if(loc.charAt(0)!="/"&&(_43a==-1||_43a>_43b)){
loc=dojo.hostenv.getBaseScriptUri()+loc;
}
return new dojo.uri.Uri(loc,uri);
};
this.Uri=function(){
var uri=arguments[0];
for(var i=1;i<arguments.length;i++){
if(!arguments[i]){
continue;
}
var _43e=new dojo.uri.Uri(arguments[i].toString());
var _43f=new dojo.uri.Uri(uri.toString());
if((_43e.path=="")&&(_43e.scheme==null)&&(_43e.authority==null)&&(_43e.query==null)){
if(_43e.fragment!=null){
_43f.fragment=_43e.fragment;
}
_43e=_43f;
}else{
if(_43e.scheme==null){
_43e.scheme=_43f.scheme;
if(_43e.authority==null){
_43e.authority=_43f.authority;
if(_43e.path.charAt(0)!="/"){
var path=_43f.path.substring(0,_43f.path.lastIndexOf("/")+1)+_43e.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;
}
}
}
}
_43e.path=segs.join("/");
}
}
}
}
uri="";
if(_43e.scheme!=null){
uri+=_43e.scheme+":";
}
if(_43e.authority!=null){
uri+="//"+_43e.authority;
}
uri+=_43e.path;
if(_43e.query!=null){
uri+="?"+_43e.query;
}
if(_43e.fragment!=null){
uri+="#"+_43e.fragment;
}
}
this.uri=uri.toString();
var _443="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";
var r=this.uri.match(new RegExp(_443));
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){
_443="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$";
r=this.authority.match(new RegExp(_443));
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.kwCompoundRequire({common:[["dojo.uri.Uri",false,false]]});
dojo.provide("dojo.uri.*");
dojo.provide("dojo.html.common");
dojo.lang.mixin(dojo.html,dojo.dom);
dojo.html.body=function(){
dojo.deprecated("dojo.html.body() moved to dojo.body()","0.5");
return dojo.body();
};
dojo.html.getEventTarget=function(evt){
if(!evt){
evt=dojo.global().event||{};
}
var t=(evt.srcElement?evt.srcElement:(evt.target?evt.target:null));
while((t)&&(t.nodeType!=1)){
t=t.parentNode;
}
return t;
};
dojo.html.getViewport=function(){
var _447=dojo.global();
var _448=dojo.doc();
var w=0;
var h=0;
if(dojo.render.html.mozilla){
w=_448.documentElement.clientWidth;
h=_447.innerHeight;
}else{
if(!dojo.render.html.opera&&_447.innerWidth){
w=_447.innerWidth;
h=_447.innerHeight;
}else{
if(!dojo.render.html.opera&&dojo.exists(_448,"documentElement.clientWidth")){
var w2=_448.documentElement.clientWidth;
if(!w||w2&&w2<w){
w=w2;
}
h=_448.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 _44c=dojo.global();
var _44d=dojo.doc();
var top=_44c.pageYOffset||_44d.documentElement.scrollTop||dojo.body().scrollTop||0;
var left=_44c.pageXOffset||_44d.documentElement.scrollLeft||dojo.body().scrollLeft||0;
return {top:top,left:left,offset:{x:left,y:top}};
};
dojo.html.getParentByType=function(node,type){
var _452=dojo.doc();
var _453=dojo.byId(node);
type=type.toLowerCase();
while((_453)&&(_453.nodeName.toLowerCase()!=type)){
if(_453==(_452["body"]||_452["documentElement"])){
return null;
}
_453=_453.parentNode;
}
return _453;
};
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 _45b={x:0,y:0};
if(e.pageX||e.pageY){
_45b.x=e.pageX;
_45b.y=e.pageY;
}else{
var de=dojo.doc().documentElement;
var db=dojo.body();
_45b.x=e.clientX+((de||db)["scrollLeft"])-((de||db)["clientLeft"]);
_45b.y=e.clientY+((de||db)["scrollTop"])-((de||db)["clientTop"]);
}
return _45b;
};
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 _460=dojo.doc().createElement("script");
_460.src="javascript:'dojo.html.createExternalElement=function(doc, tag){ return doc.createElement(tag); }'";
dojo.doc().getElementsByTagName("head")[0].appendChild(_460);
})();
}
}else{
dojo.html.createExternalElement=function(doc,tag){
return doc.createElement(tag);
};
}
dojo.html._callDeprecated=function(_463,_464,args,_466,_467){
dojo.deprecated("dojo.html."+_463,"replaced by dojo.html."+_464+"("+(_466?"node, {"+_466+": "+_466+"}":"")+")"+(_467?"."+_467:""),"0.5");
var _468=[];
if(_466){
var _469={};
_469[_466]=args[1];
_468.push(args[0]);
_468.push(_469);
}else{
_468=args;
}
var ret=dojo.html[_464].apply(dojo.html,args);
if(_467){
return ret[_467];
}else{
return ret;
}
};
dojo.html.getViewportWidth=function(){
return dojo.html._callDeprecated("getViewportWidth","getViewport",arguments,null,"width");
};
dojo.html.getViewportHeight=function(){
return dojo.html._callDeprecated("getViewportHeight","getViewport",arguments,null,"height");
};
dojo.html.getViewportSize=function(){
return dojo.html._callDeprecated("getViewportSize","getViewport",arguments);
};
dojo.html.getScrollTop=function(){
return dojo.html._callDeprecated("getScrollTop","getScroll",arguments,null,"top");
};
dojo.html.getScrollLeft=function(){
return dojo.html._callDeprecated("getScrollLeft","getScroll",arguments,null,"left");
};
dojo.html.getScrollOffset=function(){
return dojo.html._callDeprecated("getScrollOffset","getScroll",arguments,null,"offset");
};
dojo.provide("dojo.a11y");
dojo.a11y={imgPath:dojo.uri.moduleUri("dojo.widget","templates/images"),doAccessibleCheck:true,accessible:null,checkAccessible:function(){
if(this.accessible===null){
this.accessible=false;
if(this.doAccessibleCheck==true){
this.accessible=this.testAccessible();
}
}
return this.accessible;
},testAccessible:function(){
this.accessible=false;
if(dojo.render.html.ie||dojo.render.html.mozilla){
var div=document.createElement("div");
div.style.backgroundImage="url(\""+this.imgPath+"/tab_close.gif\")";
dojo.body().appendChild(div);
var _46c=null;
if(window.getComputedStyle){
var _46d=getComputedStyle(div,"");
_46c=_46d.getPropertyValue("background-image");
}else{
_46c=div.currentStyle.backgroundImage;
}
var _46e=false;
if(_46c!=null&&(_46c=="none"||_46c=="url(invalid-url:)")){
this.accessible=true;
}
dojo.body().removeChild(div);
}
return this.accessible;
},setCheckAccessible:function(_46f){
this.doAccessibleCheck=_46f;
},setAccessibleMode:function(){
if(this.accessible===null){
if(this.checkAccessible()){
dojo.render.html.prefixes.unshift("a11y");
}
}
return this.accessible;
}};
dojo.provide("dojo.widget.Widget");
dojo.declare("dojo.widget.Widget",null,function(){
this.children=[];
this.extraArgs={};
},{parent:null,isTopLevel:false,disabled:false,isContainer:false,widgetId:"",widgetType:"Widget",ns:"dojo",getNamespacedType:function(){
return (this.ns?this.ns+":"+this.widgetType:this.widgetType).toLowerCase();
},toString:function(){
return "[Widget "+this.getNamespacedType()+", "+(this.widgetId||"NO ID")+"]";
},repr:function(){
return this.toString();
},enable:function(){
this.disabled=false;
},disable:function(){
this.disabled=true;
},onResized:function(){
this.notifyChildrenOfResize();
},notifyChildrenOfResize:function(){
for(var i=0;i<this.children.length;i++){
var _471=this.children[i];
if(_471.onResized){
_471.onResized();
}
}
},create:function(args,_473,_474,ns){
if(ns){
this.ns=ns;
}
this.satisfyPropertySets(args,_473,_474);
this.mixInProperties(args,_473,_474);
this.postMixInProperties(args,_473,_474);
dojo.widget.manager.add(this);
this.buildRendering(args,_473,_474);
this.initialize(args,_473,_474);
this.postInitialize(args,_473,_474);
this.postCreate(args,_473,_474);
return this;
},destroy:function(_476){
if(this.parent){
this.parent.removeChild(this);
}
this.destroyChildren();
this.uninitialize();
this.destroyRendering(_476);
dojo.widget.manager.removeById(this.widgetId);
},destroyChildren:function(){
var _477;
var i=0;
while(this.children.length>i){
_477=this.children[i];
if(_477 instanceof dojo.widget.Widget){
this.removeChild(_477);
_477.destroy();
continue;
}
i++;
}
},getChildrenOfType:function(type,_47a){
var ret=[];
var _47c=dojo.lang.isFunction(type);
if(!_47c){
type=type.toLowerCase();
}
for(var x=0;x<this.children.length;x++){
if(_47c){
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(_47a){
ret=ret.concat(this.children[x].getChildrenOfType(type,_47a));
}
}
return ret;
},getDescendants:function(){
var _47e=[];
var _47f=[this];
var elem;
while((elem=_47f.pop())){
_47e.push(elem);
if(elem.children){
dojo.lang.forEach(elem.children,function(elem){
_47f.push(elem);
});
}
}
return _47e;
},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 _486;
var _487=dojo.widget.lcArgsCache[this.widgetType];
if(_487==null){
_487={};
for(var y in this){
_487[((new String(y)).toLowerCase())]=y;
}
dojo.widget.lcArgsCache[this.widgetType]=_487;
}
var _489={};
for(var x in args){
if(!this[x]){
var y=_487[(new String(x)).toLowerCase()];
if(y){
args[y]=args[x];
x=y;
}
}
if(_489[x]){
continue;
}
_489[x]=true;
if((typeof this[x])!=(typeof _486)){
if(typeof args[x]!="string"){
this[x]=args[x];
}else{
if(dojo.lang.isString(this[x])){
this[x]=args[x];
}else{
if(dojo.lang.isNumber(this[x])){
this[x]=new Number(args[x]);
}else{
if(dojo.lang.isBoolean(this[x])){
this[x]=(args[x].toLowerCase()=="false")?false:true;
}else{
if(dojo.lang.isFunction(this[x])){
if(args[x].search(/[^\w\.]+/i)==-1){
this[x]=dojo.evalObjPath(args[x],false);
}else{
var tn=dojo.lang.nameAnonFunc(new Function(args[x]),this);
dojo.event.kwConnect({srcObj:this,srcFunc:x,adviceObj:this,adviceFunc:tn});
}
}else{
if(dojo.lang.isArray(this[x])){
this[x]=args[x].split(";");
}else{
if(this[x] instanceof Date){
this[x]=new Date(Number(args[x]));
}else{
if(typeof this[x]=="object"){
if(this[x] instanceof dojo.uri.Uri){
this[x]=dojo.uri.dojoUri(args[x]);
}else{
var _48b=args[x].split(";");
for(var y=0;y<_48b.length;y++){
var si=_48b[y].indexOf(":");
if((si!=-1)&&(_48b[y].length>si)){
this[x][_48b[y].substr(0,si).replace(/^\s+|\s+$/g,"")]=_48b[y].substr(si+1);
}
}
}
}else{
this[x]=args[x];
}
}
}
}
}
}
}
}
}else{
this.extraArgs[x.toLowerCase()]=args[x];
}
}
},postMixInProperties:function(args,frag,_48f){
},initialize:function(args,frag,_492){
return false;
},postInitialize:function(args,frag,_495){
return false;
},postCreate:function(args,frag,_498){
return false;
},uninitialize:function(){
return false;
},buildRendering:function(args,frag,_49b){
dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", ");
return false;
},destroyRendering:function(){
dojo.unimplemented("dojo.widget.Widget.destroyRendering");
return false;
},addedTo:function(_49c){
},addChild:function(_49d){
dojo.unimplemented("dojo.widget.Widget.addChild");
return false;
},removeChild:function(_49e){
for(var x=0;x<this.children.length;x++){
if(this.children[x]===_49e){
this.children.splice(x,1);
_49e.parent=null;
break;
}
}
return _49e;
},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(_4a3,_4a4,_4a5){
var _4a6=_4a4.parseProperties(_4a3["dojo:propertyset"]);
};
dojo.widget.tags["dojo:connect"]=function(_4a7,_4a8,_4a9){
var _4aa=_4a8.parseProperties(_4a7["dojo:connect"]);
};
dojo.widget.buildWidgetFromParseTree=function(type,frag,_4ad,_4ae,_4af,_4b0){
dojo.a11y.setAccessibleMode();
var _4b1=type.split(":");
_4b1=(_4b1.length==2)?_4b1[1]:type;
var _4b2=_4b0||_4ad.parseProperties(frag[frag["ns"]+":"+_4b1]);
var _4b3=dojo.widget.manager.getImplementation(_4b1,null,null,frag["ns"]);
if(!_4b3){
throw new Error("cannot find \""+type+"\" widget");
}else{
if(!_4b3.create){
throw new Error("\""+type+"\" widget object has no \"create\" method and does not appear to implement *Widget");
}
}
_4b2["dojoinsertionindex"]=_4af;
var ret=_4b3.create(_4b2,frag,_4ae,frag["ns"]);
return ret;
};
dojo.widget.defineWidget=function(_4b5,_4b6,_4b7,init,_4b9){
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(_4bc,_4bd,_4be,init,_4c0){
var _4c1=_4bc.split(".");
var type=_4c1.pop();
var regx="\\.("+(_4bd?_4bd+"|":"")+dojo.widget.defineWidget.renderers+")\\.";
var r=_4bc.search(new RegExp(regx));
_4c1=(r<0?_4c1.join("."):_4bc.substr(0,r));
dojo.widget.manager.registerWidgetPackage(_4c1);
var pos=_4c1.indexOf(".");
var _4c6=(pos>-1)?_4c1.substring(0,pos):_4c1;
_4c0=(_4c0)||{};
_4c0.widgetType=type;
if((!init)&&(_4c0["classConstructor"])){
init=_4c0.classConstructor;
delete _4c0.classConstructor;
}
dojo.declare(_4bc,_4be,init,_4c0);
};
dojo.provide("dojo.widget.Parse");
dojo.widget.Parse=function(_4c7){
this.propertySetsList=[];
this.fragment=_4c7;
this.createComponents=function(frag,_4c9){
var _4ca=[];
var _4cb=false;
try{
if(frag&&frag.tagName&&(frag!=frag.nodeRef)){
var _4cc=dojo.widget.tags;
var tna=String(frag.tagName).split(";");
for(var x=0;x<tna.length;x++){
var ltn=tna[x].replace(/^\s+|\s+$/g,"").toLowerCase();
frag.tagName=ltn;
var ret;
if(_4cc[ltn]){
_4cb=true;
ret=_4cc[ltn](frag,this,_4c9,frag.index);
_4ca.push(ret);
}else{
if(ltn.indexOf(":")==-1){
ltn="dojo:"+ltn;
}
ret=dojo.widget.buildWidgetFromParseTree(ltn,frag,this,_4c9,frag.index);
if(ret){
_4cb=true;
_4ca.push(ret);
}
}
}
}
}
catch(e){
dojo.debug("dojo.widget.Parse: error:",e);
}
if(!_4cb){
_4ca=_4ca.concat(this.createSubComponents(frag,_4c9));
}
return _4ca;
};
this.createSubComponents=function(_4d1,_4d2){
var frag,_4d4=[];
for(var item in _4d1){
frag=_4d1[item];
if(frag&&typeof frag=="object"&&(frag!=_4d1.nodeRef)&&(frag!=_4d1.tagName)&&(!dojo.dom.isNode(frag))){
_4d4=_4d4.concat(this.createComponents(frag,_4d2));
}
}
return _4d4;
};
this.parsePropertySets=function(_4d6){
return [];
};
this.parseProperties=function(_4d7){
var _4d8={};
for(var item in _4d7){
if((_4d7[item]==_4d7.tagName)||(_4d7[item]==_4d7.nodeRef)){
}else{
var frag=_4d7[item];
if(frag.tagName&&dojo.widget.tags[frag.tagName.toLowerCase()]){
}else{
if(frag[0]&&frag[0].value!=""&&frag[0].value!=null){
try{
if(item.toLowerCase()=="dataprovider"){
var _4db=this;
this.getDataProvider(_4db,frag[0].value);
_4d8.dataProvider=this.dataProvider;
}
_4d8[item]=frag[0].value;
var _4dc=this.parseProperties(frag);
for(var _4dd in _4dc){
_4d8[_4dd]=_4dc[_4dd];
}
}
catch(e){
dojo.debug(e);
}
}
}
switch(item.toLowerCase()){
case "checked":
case "disabled":
if(typeof _4d8[item]!="boolean"){
_4d8[item]=true;
}
break;
}
}
}
return _4d8;
};
this.getDataProvider=function(_4de,_4df){
dojo.io.bind({url:_4df,load:function(type,_4e1){
if(type=="load"){
_4de.dataProvider=_4e1;
}
},mimetype:"text/javascript",sync:true});
};
this.getPropertySetById=function(_4e2){
for(var x=0;x<this.propertySetsList.length;x++){
if(_4e2==this.propertySetsList[x]["id"][0].value){
return this.propertySetsList[x];
}
}
return "";
};
this.getPropertySetsByType=function(_4e4){
var _4e5=[];
for(var x=0;x<this.propertySetsList.length;x++){
var cpl=this.propertySetsList[x];
var cpcc=cpl.componentClass||cpl.componentType||null;
var _4e9=this.propertySetsList[x]["id"][0].value;
if(cpcc&&(_4e9==cpcc[0].value)){
_4e5.push(cpl);
}
}
return _4e5;
};
this.getPropertySets=function(_4ea){
var ppl="dojo:propertyproviderlist";
var _4ec=[];
var _4ed=_4ea.tagName;
if(_4ea[ppl]){
var _4ee=_4ea[ppl].value.split(" ");
for(var _4ef in _4ee){
if((_4ef.indexOf("..")==-1)&&(_4ef.indexOf("://")==-1)){
var _4f0=this.getPropertySetById(_4ef);
if(_4f0!=""){
_4ec.push(_4f0);
}
}else{
}
}
}
return this.getPropertySetsByType(_4ed).concat(_4ec);
};
this.createComponentFromScript=function(_4f1,_4f2,_4f3,ns){
_4f3.fastMixIn=true;
var ltn=(ns||"dojo")+":"+_4f2.toLowerCase();
if(dojo.widget.tags[ltn]){
return [dojo.widget.tags[ltn](_4f3,this,null,null,_4f3)];
}
return [dojo.widget.buildWidgetFromParseTree(ltn,_4f3,this,null,null,_4f3)];
};
};
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,_4f8,_4f9,_4fa){
var _4fb=false;
var _4fc=(typeof name=="string");
if(_4fc){
var pos=name.indexOf(":");
var ns=(pos>-1)?name.substring(0,pos):"dojo";
if(pos>-1){
name=name.substring(pos+1);
}
var _4ff=name.toLowerCase();
var _500=ns+":"+_4ff;
_4fb=(dojo.byId(name)&&!dojo.widget.tags[_500]);
}
if((arguments.length==1)&&(_4fb||!_4fc)){
var xp=new dojo.xml.Parse();
var tn=_4fb?dojo.byId(name):name;
return dojo.widget.getParser().createComponents(xp.parseElement(tn,null,true))[0];
}
function fromScript(_503,name,_505,ns){
_505[_500]={dojotype:[{value:_4ff}],nodeRef:_503,fastMixIn:true};
_505.ns=ns;
return dojo.widget.getParser().createComponentFromScript(_503,name,_505,ns);
}
_4f8=_4f8||{};
var _507=false;
var tn=null;
var h=dojo.render.html.capable;
if(h){
tn=document.createElement("span");
}
if(!_4f9){
_507=true;
_4f9=tn;
if(h){
dojo.body().appendChild(_4f9);
}
}else{
if(_4fa){
dojo.dom.insertAtPosition(tn,_4f9,_4fa);
}else{
tn=_4f9;
}
}
var _509=fromScript(tn,name.toLowerCase(),_4f8,ns);
if((!_509)||(!_509[0])||(typeof _509[0].widgetType=="undefined")){
throw new Error("createWidget: Creation of \""+name+"\" widget failed.");
}
try{
if(_507&&_509[0].domNode.parentNode){
_509[0].domNode.parentNode.removeChild(_509[0].domNode);
}
}
catch(e){
dojo.debug(e);
}
return _509[0];
};
dojo.provide("dojo.html.style");
dojo.html.getClass=function(node){
node=dojo.byId(node);
if(!node){
return "";
}
var cs="";
if(node.className){
cs=node.className;
}else{
if(dojo.html.hasAttribute(node,"class")){
cs=dojo.html.getAttribute(node,"class");
}
}
return cs.replace(/^\s+|\s+$/g,"");
};
dojo.html.getClasses=function(node){
var c=dojo.html.getClass(node);
return (c=="")?[]:c.split(/\s+/g);
};
dojo.html.hasClass=function(node,_50f){
return (new RegExp("(^|\\s+)"+_50f+"(\\s+|$)")).test(dojo.html.getClass(node));
};
dojo.html.prependClass=function(node,_511){
_511+=" "+dojo.html.getClass(node);
return dojo.html.setClass(node,_511);
};
dojo.html.addClass=function(node,_513){
if(dojo.html.hasClass(node,_513)){
return false;
}
_513=(dojo.html.getClass(node)+" "+_513).replace(/^\s+|\s+$/g,"");
return dojo.html.setClass(node,_513);
};
dojo.html.setClass=function(node,_515){
node=dojo.byId(node);
var cs=new String(_515);
try{
if(typeof node.className=="string"){
node.className=cs;
}else{
if(node.setAttribute){
node.setAttribute("class",_515);
node.className=cs;
}else{
return false;
}
}
}
catch(e){
dojo.debug("dojo.html.setClass() failed",e);
}
return true;
};
dojo.html.removeClass=function(node,_518,_519){
try{
if(!_519){
var _51a=dojo.html.getClass(node).replace(new RegExp("(^|\\s+)"+_518+"(\\s+|$)"),"$1$2");
}else{
var _51a=dojo.html.getClass(node).replace(_518,"");
}
dojo.html.setClass(node,_51a);
}
catch(e){
dojo.debug("dojo.html.removeClass() failed",e);
}
return true;
};
dojo.html.replaceClass=function(node,_51c,_51d){
dojo.html.removeClass(node,_51d);
dojo.html.addClass(node,_51c);
};
dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2};
dojo.html.getElementsByClass=function(_51e,_51f,_520,_521,_522){
_522=false;
var _523=dojo.doc();
_51f=dojo.byId(_51f)||_523;
var _524=_51e.split(/\s+/g);
var _525=[];
if(_521!=1&&_521!=2){
_521=0;
}
var _526=new RegExp("(\\s|^)(("+_524.join(")|(")+"))(\\s|$)");
var _527=_524.join(" ").length;
var _528=[];
if(!_522&&_523.evaluate){
var _529=".//"+(_520||"*")+"[contains(";
if(_521!=dojo.html.classMatchType.ContainsAny){
_529+="concat(' ',@class,' '), ' "+_524.join(" ') and contains(concat(' ',@class,' '), ' ")+" ')";
if(_521==2){
_529+=" and string-length(@class)="+_527+"]";
}else{
_529+="]";
}
}else{
_529+="concat(' ',@class,' '), ' "+_524.join(" ') or contains(concat(' ',@class,' '), ' ")+" ')]";
}
var _52a=_523.evaluate(_529,_51f,null,XPathResult.ANY_TYPE,null);
var _52b=_52a.iterateNext();
while(_52b){
try{
_528.push(_52b);
_52b=_52a.iterateNext();
}
catch(e){
break;
}
}
return _528;
}else{
if(!_520){
_520="*";
}
_528=_51f.getElementsByTagName(_520);
var node,i=0;
outer:
while(node=_528[i++]){
var _52e=dojo.html.getClasses(node);
if(_52e.length==0){
continue outer;
}
var _52f=0;
for(var j=0;j<_52e.length;j++){
if(_526.test(_52e[j])){
if(_521==dojo.html.classMatchType.ContainsAny){
_525.push(node);
continue outer;
}else{
_52f++;
}
}else{
if(_521==dojo.html.classMatchType.IsOnly){
continue outer;
}
}
}
if(_52f==_524.length){
if((_521==dojo.html.classMatchType.IsOnly)&&(_52f==_52e.length)){
_525.push(node);
}else{
if(_521==dojo.html.classMatchType.ContainsAll){
_525.push(node);
}
}
}
}
return _525;
}
};
dojo.html.getElementsByClassName=dojo.html.getElementsByClass;
dojo.html.toCamelCase=function(_531){
var arr=_531.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(_535){
return _535.replace(/([A-Z])/g,"-$1").toLowerCase();
};
if(dojo.render.html.ie){
dojo.html.getComputedStyle=function(node,_537,_538){
node=dojo.byId(node);
if(!node||!node.style){
return _538;
}
return node.currentStyle[dojo.html.toCamelCase(_537)];
};
dojo.html.getComputedStyles=function(node){
return node.currentStyle;
};
}else{
dojo.html.getComputedStyle=function(node,_53b,_53c){
node=dojo.byId(node);
if(!node||!node.style){
return _53c;
}
var s=document.defaultView.getComputedStyle(node,null);
return (s&&s[dojo.html.toCamelCase(_53b)])||"";
};
dojo.html.getComputedStyles=function(node){
return document.defaultView.getComputedStyle(node,null);
};
}
dojo.html.getStyleProperty=function(node,_540){
node=dojo.byId(node);
return (node&&node.style?node.style[dojo.html.toCamelCase(_540)]:undefined);
};
dojo.html.getStyle=function(node,_542){
var _543=dojo.html.getStyleProperty(node,_542);
return (_543?_543:dojo.html.getComputedStyle(node,_542));
};
dojo.html.setStyle=function(node,_545,_546){
node=dojo.byId(node);
if(node&&node.style){
var _547=dojo.html.toCamelCase(_545);
node.style[_547]=_546;
}
};
dojo.html.setStyleText=function(_548,text){
try{
_548.style.cssText=text;
}
catch(e){
_548.setAttribute("style",text);
}
};
dojo.html.copyStyle=function(_54a,_54b){
if(!_54b.style.cssText){
_54a.setAttribute("style",_54b.getAttribute("style"));
}else{
_54a.style.cssText=_54b.style.cssText;
}
dojo.html.addClass(_54a,dojo.html.getClass(_54b));
};
dojo.html.getUnitValue=function(node,_54d,_54e){
var s=dojo.html.getComputedStyle(node,_54d);
if((!s)||((s=="auto")&&(_54e))){
return {value:0,units:"px"};
}
var _550=s.match(/(\-?[\d.]+)([a-z%]*)/i);
if(!_550){
return dojo.html.getUnitValue.bad;
}
return {value:Number(_550[1]),units:_550[2].toLowerCase()};
};
dojo.html.getUnitValue.bad={value:NaN,units:""};
if(dojo.render.html.ie){
dojo.html.toPixelValue=function(_551,_552){
if(!_552){
return 0;
}
if(_552.slice(-2)=="px"){
return parseFloat(_552);
}
var _553=0;
with(_551){
var _554=style.left;
var _555=runtimeStyle.left;
runtimeStyle.left=currentStyle.left;
try{
style.left=_552||0;
_553=style.pixelLeft;
style.left=_554;
runtimeStyle.left=_555;
}
catch(e){
}
}
return _553;
};
}else{
dojo.html.toPixelValue=function(_556,_557){
return (_557&&(_557.slice(-2)=="px")?parseFloat(_557):0);
};
}
dojo.html.getPixelValue=function(node,_559,_55a){
return dojo.html.toPixelValue(node,dojo.html.getComputedStyle(node,_559));
};
dojo.html.setPositivePixelValue=function(node,_55c,_55d){
if(isNaN(_55d)){
return false;
}
node.style[_55c]=Math.max(0,_55d)+"px";
return true;
};
dojo.html.styleSheet=null;
dojo.html.insertCssRule=function(_55e,_55f,_560){
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){
_560=dojo.html.styleSheet.cssRules.length;
}else{
if(dojo.html.styleSheet.rules){
_560=dojo.html.styleSheet.rules.length;
}else{
return null;
}
}
}
if(dojo.html.styleSheet.insertRule){
var rule=_55e+" { "+_55f+" }";
return dojo.html.styleSheet.insertRule(rule,_560);
}else{
if(dojo.html.styleSheet.addRule){
return dojo.html.styleSheet.addRule(_55e,_55f,_560);
}else{
return null;
}
}
};
dojo.html.removeCssRule=function(_562){
if(!dojo.html.styleSheet){
dojo.debug("no stylesheet defined for removing rules");
return false;
}
if(dojo.render.html.ie){
if(!_562){
_562=dojo.html.styleSheet.rules.length;
dojo.html.styleSheet.removeRule(_562);
}
}else{
if(document.styleSheets[0]){
if(!_562){
_562=dojo.html.styleSheet.cssRules.length;
}
dojo.html.styleSheet.deleteRule(_562);
}
}
return true;
};
dojo.html._insertedCssFiles=[];
dojo.html.insertCssFile=function(URI,doc,_565,_566){
if(!URI){
return;
}
if(!doc){
doc=document;
}
var _567=dojo.hostenv.getText(URI,false,_566);
if(_567===null){
return;
}
_567=dojo.html.fixPathsInCssText(_567,URI);
if(_565){
var idx=-1,node,ent=dojo.html._insertedCssFiles;
for(var i=0;i<ent.length;i++){
if((ent[i].doc==doc)&&(ent[i].cssText==_567)){
idx=i;
node=ent[i].nodeRef;
break;
}
}
if(node){
var _56c=doc.getElementsByTagName("style");
for(var i=0;i<_56c.length;i++){
if(_56c[i]==node){
return;
}
}
dojo.html._insertedCssFiles.shift(idx,1);
}
}
var _56d=dojo.html.insertCssText(_567,doc);
dojo.html._insertedCssFiles.push({"doc":doc,"cssText":_567,"nodeRef":_56d});
if(_56d&&djConfig.isDebug){
_56d.setAttribute("dbgHref",URI);
}
return _56d;
};
dojo.html.insertCssText=function(_56e,doc,URI){
if(!_56e){
return;
}
if(!doc){
doc=document;
}
if(URI){
_56e=dojo.html.fixPathsInCssText(_56e,URI);
}
var _571=doc.createElement("style");
_571.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(_571);
}
if(_571.styleSheet){
var _573=function(){
try{
_571.styleSheet.cssText=_56e;
}
catch(e){
dojo.debug(e);
}
};
if(_571.styleSheet.disabled){
setTimeout(_573,10);
}else{
_573();
}
}else{
var _574=doc.createTextNode(_56e);
_571.appendChild(_574);
}
return _571;
};
dojo.html.fixPathsInCssText=function(_575,URI){
if(!_575||!URI){
return;
}
var _577,str="",url="",_57a="[\\t\\s\\w\\(\\)\\/\\.\\\\'\"-:#=&?~]+";
var _57b=new RegExp("url\\(\\s*("+_57a+")\\s*\\)");
var _57c=/(file|https?|ftps?):\/\//;
regexTrim=new RegExp("^[\\s]*(['\"]?)("+_57a+")\\1[\\s]*?$");
if(dojo.render.html.ie55||dojo.render.html.ie60){
var _57d=new RegExp("AlphaImageLoader\\((.*)src=['\"]("+_57a+")['\"]");
while(_577=_57d.exec(_575)){
url=_577[2].replace(regexTrim,"$2");
if(!_57c.exec(url)){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=_575.substring(0,_577.index)+"AlphaImageLoader("+_577[1]+"src='"+url+"'";
_575=_575.substr(_577.index+_577[0].length);
}
_575=str+_575;
str="";
}
while(_577=_57b.exec(_575)){
url=_577[1].replace(regexTrim,"$2");
if(!_57c.exec(url)){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=_575.substring(0,_577.index)+"url("+url+")";
_575=_575.substr(_577.index+_577[0].length);
}
return str+_575;
};
dojo.html.setActiveStyleSheet=function(_57e){
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")==_57e){
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 _58a={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 _58a){
if(_58a[p]){
dojo.html.addClass(node,p);
}
}
};
dojo.provide("dojo.widget.DomWidget");
dojo.widget._cssFiles={};
dojo.widget._cssStrings={};
dojo.widget._templateCache={};
dojo.widget.defaultStrings={dojoRoot:dojo.hostenv.getBaseScriptUri(),dojoWidgetModuleUri:dojo.uri.moduleUri("dojo.widget"),baseScriptUri:dojo.hostenv.getBaseScriptUri()};
dojo.widget.fillFromTemplateCache=function(obj,_58d,_58e,_58f){
var _590=_58d||obj.templatePath;
var _591=dojo.widget._templateCache;
if(!_590&&!obj["widgetType"]){
do{
var _592="__dummyTemplate__"+dojo.widget._templateCache.dummyCount++;
}while(_591[_592]);
obj.widgetType=_592;
}
var wt=_590?_590.toString():obj.widgetType;
var ts=_591[wt];
if(!ts){
_591[wt]={"string":null,"node":null};
if(_58f){
ts={};
}else{
ts=_591[wt];
}
}
if((!obj.templateString)&&(!_58f)){
obj.templateString=_58e||ts["string"];
}
if(obj.templateString){
obj.templateString=this._sanitizeTemplateString(obj.templateString);
}
if((!obj.templateNode)&&(!_58f)){
obj.templateNode=ts["node"];
}
if((!obj.templateNode)&&(!obj.templateString)&&(_590)){
var _595=this._sanitizeTemplateString(dojo.hostenv.getText(_590));
obj.templateString=_595;
if(!_58f){
_591[wt]["string"]=_595;
}
}
if((!ts["string"])&&(!_58f)){
ts.string=obj.templateString;
}
};
dojo.widget._sanitizeTemplateString=function(_596){
if(_596){
_596=_596.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");
var _597=_596.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_597){
_596=_597[1];
}
}else{
_596="";
}
return _596;
};
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,_59b){
if(dojo.render.html.ie){
node.setAttribute(this[ns].alias+":"+attr,this[ns].prefix+_59b);
}else{
node.setAttributeNS(this[ns]["namespace"],attr,this[ns].prefix+_59b);
}
},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 _5a2=true;
if(dojo.render.html.ie){
_5a2=node.removeAttribute(this[ns].alias+":"+attr);
}else{
node.removeAttributeNS(this[ns]["namespace"],attr);
}
return _5a2;
}};
dojo.widget.attachTemplateNodes=function(_5a3,_5a4,_5a5){
var _5a6=dojo.dom.ELEMENT_NODE;
function trim(str){
return str.replace(/^\s+|\s+$/g,"");
}
if(!_5a3){
_5a3=_5a4.domNode;
}
if(_5a3.nodeType!=_5a6){
return;
}
var _5a8=_5a3.all||_5a3.getElementsByTagName("*");
var _5a9=_5a4;
for(var x=-1;x<_5a8.length;x++){
var _5ab=(x==-1)?_5a3:_5a8[x];
var _5ac=[];
if(!_5a4.widgetsInTemplate||!_5ab.getAttribute("dojoType")){
for(var y=0;y<this.attachProperties.length;y++){
var _5ae=_5ab.getAttribute(this.attachProperties[y]);
if(_5ae){
_5ac=_5ae.split(";");
for(var z=0;z<_5ac.length;z++){
if(dojo.lang.isArray(_5a4[_5ac[z]])){
_5a4[_5ac[z]].push(_5ab);
}else{
_5a4[_5ac[z]]=_5ab;
}
}
break;
}
}
var _5b0=_5ab.getAttribute(this.eventAttachProperty);
if(_5b0){
var evts=_5b0.split(";");
for(var y=0;y<evts.length;y++){
if((!evts[y])||(!evts[y].length)){
continue;
}
var _5b2=null;
var tevt=trim(evts[y]);
if(evts[y].indexOf(":")>=0){
var _5b4=tevt.split(":");
tevt=trim(_5b4[0]);
_5b2=trim(_5b4[1]);
}
if(!_5b2){
_5b2=tevt;
}
var tf=function(){
var ntf=new String(_5b2);
return function(evt){
if(_5a9[ntf]){
_5a9[ntf](dojo.event.browser.fixEvent(evt,this));
}
};
}();
dojo.event.browser.addListener(_5ab,tevt,tf,false,true);
}
}
for(var y=0;y<_5a5.length;y++){
var _5b8=_5ab.getAttribute(_5a5[y]);
if((_5b8)&&(_5b8.length)){
var _5b2=null;
var _5b9=_5a5[y].substr(4);
_5b2=trim(_5b8);
var _5ba=[_5b2];
if(_5b2.indexOf(";")>=0){
_5ba=dojo.lang.map(_5b2.split(";"),trim);
}
for(var z=0;z<_5ba.length;z++){
if(!_5ba[z].length){
continue;
}
var tf=function(){
var ntf=new String(_5ba[z]);
return function(evt){
if(_5a9[ntf]){
_5a9[ntf](dojo.event.browser.fixEvent(evt,this));
}
};
}();
dojo.event.browser.addListener(_5ab,_5b9,tf,false,true);
}
}
}
}
var _5bd=_5ab.getAttribute(this.templateProperty);
if(_5bd){
_5a4[_5bd]=_5ab;
}
dojo.lang.forEach(dojo.widget.waiNames,function(name){
var wai=dojo.widget.wai[name];
var val=_5ab.getAttribute(wai.name);
if(val){
if(val.indexOf("-")==-1){
dojo.widget.wai.setAttr(_5ab,wai.name,"role",val);
}else{
var _5c1=val.split("-");
dojo.widget.wai.setAttr(_5ab,wai.name,_5c1[0],_5c1[1]);
}
}
},this);
var _5c2=_5ab.getAttribute(this.onBuildProperty);
if(_5c2){
eval("var node = baseNode; var widget = targetObj; "+_5c2);
}
}
};
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(_5ca,_5cb,pos,ref,_5ce){
if(!this.isContainer){
dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget");
return null;
}else{
if(_5ce==undefined){
_5ce=this.children.length;
}
this.addWidgetAsDirectChild(_5ca,_5cb,pos,ref,_5ce);
this.registerChild(_5ca,_5ce);
}
return _5ca;
},addWidgetAsDirectChild:function(_5cf,_5d0,pos,ref,_5d3){
if((!this.containerNode)&&(!_5d0)){
this.containerNode=this.domNode;
}
var cn=(_5d0)?_5d0:this.containerNode;
if(!pos){
pos="after";
}
if(!ref){
if(!cn){
cn=dojo.body();
}
ref=cn.lastChild;
}
if(!_5d3){
_5d3=0;
}
_5cf.domNode.setAttribute("dojoinsertionindex",_5d3);
if(!ref){
cn.appendChild(_5cf.domNode);
}else{
if(pos=="insertAtIndex"){
dojo.dom.insertAtIndex(_5cf.domNode,ref.parentNode,_5d3);
}else{
if((pos=="after")&&(ref===cn.lastChild)){
cn.appendChild(_5cf.domNode);
}else{
dojo.dom.insertAtPosition(_5cf.domNode,cn,pos);
}
}
}
},registerChild:function(_5d5,_5d6){
_5d5.dojoInsertionIndex=_5d6;
var idx=-1;
for(var i=0;i<this.children.length;i++){
if(this.children[i].dojoInsertionIndex<=_5d6){
idx=i;
}
}
this.children.splice(idx+1,0,_5d5);
_5d5.parent=this;
_5d5.addedTo(this,idx+1);
delete dojo.widget.manager.topWidgets[_5d5.widgetId];
},removeChild:function(_5d9){
dojo.dom.removeNode(_5d9.domNode);
return dojo.widget.DomWidget.superclass.removeChild.call(this,_5d9);
},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,_5dd){
var _5de=this.getFragNodeRef(frag);
if(_5dd&&(_5dd.snarfChildDomOutput||!_5de)){
_5dd.addWidgetAsDirectChild(this,"","insertAtIndex","",args["dojoinsertionindex"],_5de);
}else{
if(_5de){
if(this.domNode&&(this.domNode!==_5de)){
this._sourceNodeRef=dojo.dom.replaceNode(_5de,this.domNode);
}
}
}
if(_5dd){
_5dd.registerChild(this,args.dojoinsertionindex);
}else{
dojo.widget.manager.topWidgets[this.widgetId]=this;
}
if(this.widgetsInTemplate){
var _5df=new dojo.xml.Parse();
var _5e0;
var _5e1=this.domNode.getElementsByTagName("*");
for(var i=0;i<_5e1.length;i++){
if(_5e1[i].getAttribute("dojoAttachPoint")=="subContainerWidget"){
_5e0=_5e1[i];
}
if(_5e1[i].getAttribute("dojoType")){
_5e1[i].setAttribute("isSubWidget",true);
}
}
if(this.isContainer&&!this.containerNode){
if(_5e0){
var src=this.getFragNodeRef(frag);
if(src){
dojo.dom.moveChildren(src,_5e0);
frag["dojoDontFollow"]=true;
}
}else{
dojo.debug("No subContainerWidget node can be found in template file for widget "+this);
}
}
var _5e4=_5df.parseElement(this.domNode,null,true);
dojo.widget.getParser().createSubComponents(_5e4,this);
var _5e5=[];
var _5e6=[this];
var w;
while((w=_5e6.pop())){
for(var i=0;i<w.children.length;i++){
var _5e8=w.children[i];
if(_5e8._processedSubWidgets||!_5e8.extraArgs["issubwidget"]){
continue;
}
_5e5.push(_5e8);
if(_5e8.isContainer){
_5e6.push(_5e8);
}
}
}
for(var i=0;i<_5e5.length;i++){
var _5e9=_5e5[i];
if(_5e9._processedSubWidgets){
dojo.debug("This should not happen: widget._processedSubWidgets is already true!");
return;
}
_5e9._processedSubWidgets=true;
if(_5e9.extraArgs["dojoattachevent"]){
var evts=_5e9.extraArgs["dojoattachevent"].split(";");
for(var j=0;j<evts.length;j++){
var _5ec=null;
var tevt=dojo.string.trim(evts[j]);
if(tevt.indexOf(":")>=0){
var _5ee=tevt.split(":");
tevt=dojo.string.trim(_5ee[0]);
_5ec=dojo.string.trim(_5ee[1]);
}
if(!_5ec){
_5ec=tevt;
}
if(dojo.lang.isFunction(_5e9[tevt])){
dojo.event.kwConnect({srcObj:_5e9,srcFunc:tevt,targetObj:this,targetFunc:_5ec});
}else{
alert(tevt+" is not a function in widget "+_5e9);
}
}
}
if(_5e9.extraArgs["dojoattachpoint"]){
this[_5e9.extraArgs["dojoattachpoint"]]=_5e9;
}
}
}
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 _5f2=args["templateCssPath"]||this.templateCssPath;
if(_5f2&&!dojo.widget._cssFiles[_5f2.toString()]){
if((!this.templateCssString)&&(_5f2)){
this.templateCssString=dojo.hostenv.getText(_5f2);
this.templateCssPath=null;
}
dojo.widget._cssFiles[_5f2.toString()]=true;
}
if((this["templateCssString"])&&(!dojo.widget._cssStrings[this.templateCssString])){
dojo.html.insertCssText(this.templateCssString,null,_5f2);
dojo.widget._cssStrings[this.templateCssString]=true;
}
if((!this.preventClobber)&&((this.templatePath)||(this.templateNode)||((this["templateString"])&&(this.templateString.length))||((typeof ts!="undefined")&&((ts["string"])||(ts["node"]))))){
this.buildFromTemplate(args,frag);
}else{
this.domNode=this.getFragNodeRef(frag);
}
this.fillInTemplate(args,frag);
},buildFromTemplate:function(args,frag){
var _5f5=false;
if(args["templatepath"]){
args["templatePath"]=args["templatepath"];
}
dojo.widget.fillFromTemplateCache(this,args["templatePath"],null,_5f5);
var ts=dojo.widget._templateCache[this.templatePath?this.templatePath.toString():this.widgetType];
if((ts)&&(!_5f5)){
if(!this.templateString.length){
this.templateString=ts["string"];
}
if(!this.templateNode){
this.templateNode=ts["node"];
}
}
var _5f7=false;
var node=null;
var tstr=this.templateString;
if((!this.templateNode)&&(this.templateString)){
_5f7=this.templateString.match(/\$\{([^\}]+)\}/g);
if(_5f7){
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<_5f7.length;i++){
var key=_5f7[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 _5fe;
if((kval)||(dojo.lang.isString(kval))){
_5fe=new String((dojo.lang.isFunction(kval))?kval.call(this,key,this.templateString):kval);
while(_5fe.indexOf("\"")>-1){
_5fe=_5fe.replace("\"","&quot;");
}
tstr=tstr.replace(_5f7[i],_5fe);
}
}
}else{
this.templateNode=this.createNodesFromText(this.templateString,true)[0];
if(!_5f5){
ts.node=this.templateNode;
}
}
}
if((!this.templateNode)&&(!_5f7)){
dojo.debug("DomWidget.buildFromTemplate: could not create template");
return false;
}else{
if(!_5f7){
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(_600,_601){
if(!_600){
_600=this.domNode;
}
if(!_601){
_601=this;
}
return dojo.widget.attachTemplateNodes(_600,_601,dojo.widget.getDojoEventsFromStr(this.templateString));
},fillInTemplate:function(){
},destroyRendering:function(){
try{
dojo.dom.destroyNode(this.domNode);
delete this.domNode;
}
catch(e){
}
if(this._sourceNodeRef){
try{
dojo.dom.destroyNode(this._sourceNodeRef);
}
catch(e){
}
}
},createNodesFromText:function(){
dojo.unimplemented("dojo.widget.DomWidget.createNodesFromText");
}});
dojo.provide("dojo.html.display");
dojo.html._toggle=function(node,_603,_604){
node=dojo.byId(node);
_604(node,!_603(node));
return _603(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,_609){
dojo.html[(_609?"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,_60f){
dojo.html.setStyle(node,"display",((_60f instanceof String||typeof _60f=="string")?_60f:(_60f?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,_613){
dojo.html.setStyle(node,"visibility",((_613 instanceof String||typeof _613=="string")?_613:(_613?"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,_617,_618){
node=dojo.byId(node);
var h=dojo.render.html;
if(!_618){
if(_617>=1){
if(h.ie){
dojo.html.clearOpacity(node);
return;
}else{
_617=0.999999;
}
}else{
if(_617<0){
_617=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="+_617*100+")";
}
}
node.style.filter="Alpha(Opacity="+_617*100+")";
}else{
if(h.moz){
node.style.opacity=_617;
node.style.MozOpacity=_617;
}else{
if(h.safari){
node.style.opacity=_617;
node.style.KhtmlOpacity=_617;
}else{
node.style.opacity=_617;
}
}
}
};
dojo.html.clearOpacity=function(node){
node=dojo.byId(node);
var ns=node.style;
var h=dojo.render.html;
if(h.ie){
try{
if(node.filters&&node.filters.alpha){
ns.filter="";
}
}
catch(e){
}
}else{
if(h.moz){
ns.opacity=1;
ns.MozOpacity=1;
}else{
if(h.safari){
ns.opacity=1;
ns.KhtmlOpacity=1;
}else{
ns.opacity=1;
}
}
}
};
dojo.html.getOpacity=function(node){
node=dojo.byId(node);
var h=dojo.render.html;
if(h.ie){
var opac=(node.filters&&node.filters.alpha&&typeof node.filters.alpha.opacity=="number"?node.filters.alpha.opacity:100)/100;
}else{
var opac=node.style.opacity||node.style.MozOpacity||node.style.KhtmlOpacity||1;
}
return opac>=0.999999?1:Number(opac);
};
dojo.provide("dojo.html.layout");
dojo.html.sumAncestorProperties=function(node,prop){
node=dojo.byId(node);
if(!node){
return 0;
}
var _624=0;
while(node){
if(dojo.html.getComputedStyle(node,"position")=="fixed"){
return 0;
}
var val=node[prop];
if(val){
_624+=val-0;
if(node==dojo.body()){
break;
}
}
node=node.parentNode;
}
return _624;
};
dojo.html.setStyleAttributes=function(node,_627){
node=dojo.byId(node);
var _628=_627.replace(/(;)?\s*$/,"").split(";");
for(var i=0;i<_628.length;i++){
var _62a=_628[i].split(":");
var name=_62a[0].replace(/\s*$/,"").replace(/^\s*/,"").toLowerCase();
var _62c=_62a[1].replace(/\s*$/,"").replace(/^\s*/,"");
switch(name){
case "opacity":
dojo.html.setOpacity(node,_62c);
break;
case "content-height":
dojo.html.setContentBox(node,{height:_62c});
break;
case "content-width":
dojo.html.setContentBox(node,{width:_62c});
break;
case "outer-height":
dojo.html.setMarginBox(node,{height:_62c});
break;
case "outer-width":
dojo.html.setMarginBox(node,{width:_62c});
break;
default:
node.style[dojo.html.toCamelCase(name)]=_62c;
}
}
};
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,_62e,_62f){
node=dojo.byId(node,node.ownerDocument);
var ret={x:0,y:0};
var bs=dojo.html.boxSizing;
if(!_62f){
_62f=bs.CONTENT_BOX;
}
var _632=2;
var _633;
switch(_62f){
case bs.MARGIN_BOX:
_633=3;
break;
case bs.BORDER_BOX:
_633=2;
break;
case bs.PADDING_BOX:
default:
_633=1;
break;
case bs.CONTENT_BOX:
_633=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){
_632=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 _637;
if((h.safari)&&(node.style.getPropertyValue("position")=="absolute")&&(node.parentNode==db)){
_637=db;
}else{
_637=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 _639=node;
do{
var n=_639["offsetLeft"];
if(!h.opera||n>0){
ret.x+=isNaN(n)?0:n;
}
var m=_639["offsetTop"];
ret.y+=isNaN(m)?0:m;
_639=_639.offsetParent;
}while((_639!=_637)&&(_639!=null));
}else{
if(node["x"]&&node["y"]){
ret.x+=isNaN(node.x)?0:node.x;
ret.y+=isNaN(node.y)?0:node.y;
}
}
}
}
if(_62e){
var _63c=dojo.html.getScroll();
ret.y+=_63c.top;
ret.x+=_63c.left;
}
var _63d=[dojo.html.getPaddingExtent,dojo.html.getBorderExtent,dojo.html.getMarginExtent];
if(_632>_633){
for(var i=_633;i<_632;++i){
ret.y+=_63d[i](node,"top");
ret.x+=_63d[i](node,"left");
}
}else{
if(_632<_633){
for(var i=_633;i>_632;--i){
ret.y-=_63d[i-1](node,"top");
ret.x-=_63d[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,_641,_642){
var _643=0;
for(var x=0;x<_641.length;x++){
_643+=dojo.html.getPixelValue(node,_641[x],_642);
}
return _643;
};
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 _650=dojo.html.getBorder(node);
return {width:pad.width+_650.width,height:pad.height+_650.height};
};
dojo.html.getBoxSizing=function(node){
var h=dojo.render.html;
var bs=dojo.html.boxSizing;
if(((h.ie)||(h.opera))&&node.nodeName.toLowerCase()!="img"){
var cm=document["compatMode"];
if((cm=="BackCompat")||(cm=="QuirksMode")){
return bs.BORDER_BOX;
}else{
return bs.CONTENT_BOX;
}
}else{
if(arguments.length==0){
node=document.documentElement;
}
var _655;
if(!h.ie){
_655=dojo.html.getStyle(node,"-moz-box-sizing");
if(!_655){
_655=dojo.html.getStyle(node,"box-sizing");
}
}
return (_655?_655: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 _65a=dojo.html.getBorder(node);
return {width:box.width-_65a.width,height:box.height-_65a.height};
};
dojo.html.getContentBox=function(node){
node=dojo.byId(node);
var _65c=dojo.html.getPadBorder(node);
return {width:node.offsetWidth-_65c.width,height:node.offsetHeight-_65c.height};
};
dojo.html.setContentBox=function(node,args){
node=dojo.byId(node);
var _65f=0;
var _660=0;
var isbb=dojo.html.isBorderBox(node);
var _662=(isbb?dojo.html.getPadBorder(node):{width:0,height:0});
var ret={};
if(typeof args.width!="undefined"){
_65f=args.width+_662.width;
ret.width=dojo.html.setPositivePixelValue(node,"width",_65f);
}
if(typeof args.height!="undefined"){
_660=args.height+_662.height;
ret.height=dojo.html.setPositivePixelValue(node,"height",_660);
}
return ret;
};
dojo.html.getMarginBox=function(node){
var _665=dojo.html.getBorderBox(node);
var _666=dojo.html.getMargin(node);
return {width:_665.width+_666.width,height:_665.height+_666.height};
};
dojo.html.setMarginBox=function(node,args){
node=dojo.byId(node);
var _669=0;
var _66a=0;
var isbb=dojo.html.isBorderBox(node);
var _66c=(!isbb?dojo.html.getPadBorder(node):{width:0,height:0});
var _66d=dojo.html.getMargin(node);
var ret={};
if(typeof args.width!="undefined"){
_669=args.width-_66c.width;
_669-=_66d.width;
ret.width=dojo.html.setPositivePixelValue(node,"width",_669);
}
if(typeof args.height!="undefined"){
_66a=args.height-_66c.height;
_66a-=_66d.height;
ret.height=dojo.html.setPositivePixelValue(node,"height",_66a);
}
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(_672,_673,_674){
if(_672 instanceof Array||typeof _672=="array"){
dojo.deprecated("dojo.html.toCoordinateArray","use dojo.html.toCoordinateObject({left: , top: , width: , height: }) instead","0.5");
while(_672.length<4){
_672.push(0);
}
while(_672.length>4){
_672.pop();
}
var ret={left:_672[0],top:_672[1],width:_672[2],height:_672[3]};
}else{
if(!_672.nodeType&&!(_672 instanceof String||typeof _672=="string")&&("width" in _672||"height" in _672||"left" in _672||"x" in _672||"top" in _672||"y" in _672)){
var ret={left:_672.left||_672.x||0,top:_672.top||_672.y||0,width:_672.width||0,height:_672.height||0};
}else{
var node=dojo.byId(_672);
var pos=dojo.html.abs(node,_673,_674);
var _678=dojo.html.getMarginBox(node);
var ret={left:pos.left,top:pos.top,width:_678.width,height:_678.height};
}
}
ret.x=ret.left;
ret.y=ret.top;
return ret;
};
dojo.html.setMarginBoxWidth=dojo.html.setOuterWidth=function(node,_67a){
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,_67d){
return dojo.html._callDeprecated("getTotalOffset","getAbsolutePosition",arguments,null,type);
};
dojo.html.getAbsoluteX=function(node,_67f){
return dojo.html._callDeprecated("getAbsoluteX","getAbsolutePosition",arguments,null,"x");
};
dojo.html.getAbsoluteY=function(node,_681){
return dojo.html._callDeprecated("getAbsoluteY","getAbsolutePosition",arguments,null,"y");
};
dojo.html.totalOffsetLeft=function(node,_683){
return dojo.html._callDeprecated("totalOffsetLeft","getAbsolutePosition",arguments,null,"left");
};
dojo.html.totalOffsetTop=function(node,_685){
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,_68f){
return dojo.html._callDeprecated("setContentBoxWidth","setContentBox",arguments,"width");
};
dojo.html.setContentBoxHeight=dojo.html.setContentHeight=function(node,_691){
return dojo.html._callDeprecated("setContentBoxHeight","setContentBox",arguments,"height");
};
dojo.provide("dojo.html.util");
dojo.html.getElementWindow=function(_692){
return dojo.html.getDocumentWindow(_692.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 _69a=dojo.html.getCursorPosition(e);
with(dojo.html){
var _69b=getAbsolutePosition(node,true);
var bb=getBorderBox(node);
var _69d=_69b.x+(bb.width/2);
var _69e=_69b.y+(bb.height/2);
}
with(dojo.html.gravity){
return ((_69a.x<_69d?WEST:EAST)|(_69a.y<_69e?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(_69f,e){
_69f=dojo.byId(_69f);
var _6a1=dojo.html.getCursorPosition(e);
var bb=dojo.html.getBorderBox(_69f);
var _6a3=dojo.html.getAbsolutePosition(_69f,true,dojo.html.boxSizing.BORDER_BOX);
var top=_6a3.y;
var _6a5=top+bb.height;
var left=_6a3.x;
var _6a7=left+bb.width;
return (_6a1.x>=left&&_6a1.x<=_6a7&&_6a1.y>=top&&_6a1.y<=_6a5);
};
dojo.html.renderedTextContent=function(node){
node=dojo.byId(node);
var _6a9="";
if(node==null){
return _6a9;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
var _6ab="unknown";
try{
_6ab=dojo.html.getStyle(node.childNodes[i],"display");
}
catch(E){
}
switch(_6ab){
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":
_6a9+="\n";
_6a9+=dojo.html.renderedTextContent(node.childNodes[i]);
_6a9+="\n";
break;
case "none":
break;
default:
if(node.childNodes[i].tagName&&node.childNodes[i].tagName.toLowerCase()=="br"){
_6a9+="\n";
}else{
_6a9+=dojo.html.renderedTextContent(node.childNodes[i]);
}
break;
}
break;
case 3:
case 2:
case 4:
var text=node.childNodes[i].nodeValue;
var _6ad="unknown";
try{
_6ad=dojo.html.getStyle(node,"text-transform");
}
catch(E){
}
switch(_6ad){
case "capitalize":
var _6ae=text.split(" ");
for(var i=0;i<_6ae.length;i++){
_6ae[i]=_6ae[i].charAt(0).toUpperCase()+_6ae[i].substring(1);
}
text=_6ae.join(" ");
break;
case "uppercase":
text=text.toUpperCase();
break;
case "lowercase":
text=text.toLowerCase();
break;
default:
break;
}
switch(_6ad){
case "nowrap":
break;
case "pre-wrap":
break;
case "pre-line":
break;
case "pre":
break;
default:
text=text.replace(/\s+/," ");
if(/\s$/.test(_6a9)){
text.replace(/^\s/,"");
}
break;
}
_6a9+=text;
break;
default:
break;
}
}
return _6a9;
};
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 _6b2="none";
if((/^<t[dh][\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table><tbody><tr>"+txt+"</tr></tbody></table>";
_6b2="cell";
}else{
if((/^<tr[\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table><tbody>"+txt+"</tbody></table>";
_6b2="row";
}else{
if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table>"+txt+"</table>";
_6b2="section";
}
}
}
tn.innerHTML=txt;
if(tn["normalize"]){
tn.normalize();
}
var _6b3=null;
switch(_6b2){
case "cell":
_6b3=tn.getElementsByTagName("tr")[0];
break;
case "row":
_6b3=tn.getElementsByTagName("tbody")[0];
break;
case "section":
_6b3=tn.getElementsByTagName("table")[0];
break;
default:
_6b3=tn;
break;
}
var _6b4=[];
for(var x=0;x<_6b3.childNodes.length;x++){
_6b4.push(_6b3.childNodes[x].cloneNode(true));
}
tn.style.display="none";
dojo.html.destroyNode(tn);
return _6b4;
};
dojo.html.placeOnScreen=function(node,_6b7,_6b8,_6b9,_6ba,_6bb,_6bc){
if(_6b7 instanceof Array||typeof _6b7=="array"){
_6bc=_6bb;
_6bb=_6ba;
_6ba=_6b9;
_6b9=_6b8;
_6b8=_6b7[1];
_6b7=_6b7[0];
}
if(_6bb instanceof String||typeof _6bb=="string"){
_6bb=_6bb.split(",");
}
if(!isNaN(_6b9)){
_6b9=[Number(_6b9),Number(_6b9)];
}else{
if(!(_6b9 instanceof Array||typeof _6b9=="array")){
_6b9=[0,0];
}
}
var _6bd=dojo.html.getScroll().offset;
var view=dojo.html.getViewport();
node=dojo.byId(node);
var _6bf=node.style.display;
node.style.display="";
var bb=dojo.html.getBorderBox(node);
var w=bb.width;
var h=bb.height;
node.style.display=_6bf;
if(!(_6bb instanceof Array||typeof _6bb=="array")){
_6bb=["TL"];
}
var _6c3,_6c4,_6c5=Infinity,_6c6;
for(var _6c7=0;_6c7<_6bb.length;++_6c7){
var _6c8=_6bb[_6c7];
var _6c9=true;
var tryX=_6b7-(_6c8.charAt(1)=="L"?0:w)+_6b9[0]*(_6c8.charAt(1)=="L"?1:-1);
var tryY=_6b8-(_6c8.charAt(0)=="T"?0:h)+_6b9[1]*(_6c8.charAt(0)=="T"?1:-1);
if(_6ba){
tryX-=_6bd.x;
tryY-=_6bd.y;
}
if(tryX<0){
tryX=0;
_6c9=false;
}
if(tryY<0){
tryY=0;
_6c9=false;
}
var x=tryX+w;
if(x>view.width){
x=view.width-w;
_6c9=false;
}else{
x=tryX;
}
x=Math.max(_6b9[0],x)+_6bd.x;
var y=tryY+h;
if(y>view.height){
y=view.height-h;
_6c9=false;
}else{
y=tryY;
}
y=Math.max(_6b9[1],y)+_6bd.y;
if(_6c9){
_6c3=x;
_6c4=y;
_6c5=0;
_6c6=_6c8;
break;
}else{
var dist=Math.pow(x-tryX-_6bd.x,2)+Math.pow(y-tryY-_6bd.y,2);
if(_6c5>dist){
_6c5=dist;
_6c3=x;
_6c4=y;
_6c6=_6c8;
}
}
}
if(!_6bc){
node.style.left=_6c3+"px";
node.style.top=_6c4+"px";
}
return {left:_6c3,top:_6c4,x:_6c3,y:_6c4,dist:_6c5,corner:_6c6};
};
dojo.html.placeOnScreenPoint=function(node,_6d0,_6d1,_6d2,_6d3){
dojo.deprecated("dojo.html.placeOnScreenPoint","use dojo.html.placeOnScreen() instead","0.5");
return dojo.html.placeOnScreen(node,_6d0,_6d1,_6d2,_6d3,["TL","TR","BL","BR"]);
};
dojo.html.placeOnScreenAroundElement=function(node,_6d5,_6d6,_6d7,_6d8,_6d9){
var best,_6db=Infinity;
_6d5=dojo.byId(_6d5);
var _6dc=_6d5.style.display;
_6d5.style.display="";
var mb=dojo.html.getElementBox(_6d5,_6d7);
var _6de=mb.width;
var _6df=mb.height;
var _6e0=dojo.html.getAbsolutePosition(_6d5,true,_6d7);
_6d5.style.display=_6dc;
for(var _6e1 in _6d8){
var pos,_6e3,_6e4;
var _6e5=_6d8[_6e1];
_6e3=_6e0.x+(_6e1.charAt(1)=="L"?0:_6de);
_6e4=_6e0.y+(_6e1.charAt(0)=="T"?0:_6df);
pos=dojo.html.placeOnScreen(node,_6e3,_6e4,_6d6,true,_6e5,true);
if(pos.dist==0){
best=pos;
break;
}else{
if(_6db>pos.dist){
_6db=pos.dist;
best=pos;
}
}
}
if(!_6d9){
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 _6e7=node.parentNode;
var _6e8=_6e7.scrollTop+dojo.html.getBorderBox(_6e7).height;
var _6e9=node.offsetTop+dojo.html.getMarginBox(node).height;
if(_6e8<_6e9){
_6e7.scrollTop+=(_6e9-_6e8);
}else{
if(_6e7.scrollTop>node.offsetTop){
_6e7.scrollTop-=(_6e7.scrollTop-node.offsetTop);
}
}
}
}
};
dojo.provide("dojo.gfx.color");
dojo.gfx.color.Color=function(r,g,b,a){
if(dojo.lang.isArray(r)){
this.r=r[0];
this.g=r[1];
this.b=r[2];
this.a=r[3]||1;
}else{
if(dojo.lang.isString(r)){
var rgb=dojo.gfx.color.extractRGB(r);
this.r=rgb[0];
this.g=rgb[1];
this.b=rgb[2];
this.a=g||1;
}else{
if(r instanceof dojo.gfx.color.Color){
this.r=r.r;
this.b=r.b;
this.g=r.g;
this.a=r.a;
}else{
this.r=r;
this.g=g;
this.b=b;
this.a=a;
}
}
}
};
dojo.gfx.color.Color.fromArray=function(arr){
return new dojo.gfx.color.Color(arr[0],arr[1],arr[2],arr[3]);
};
dojo.extend(dojo.gfx.color.Color,{toRgb:function(_6f0){
if(_6f0){
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(_6f1,_6f2){
var rgb=null;
if(dojo.lang.isArray(_6f1)){
rgb=_6f1;
}else{
if(_6f1 instanceof dojo.gfx.color.Color){
rgb=_6f1.toRgb();
}else{
rgb=new dojo.gfx.color.Color(_6f1).toRgb();
}
}
return dojo.gfx.color.blend(this.toRgb(),rgb,_6f2);
}});
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,_6f6){
if(typeof a=="string"){
return dojo.gfx.color.blendHex(a,b,_6f6);
}
if(!_6f6){
_6f6=0;
}
_6f6=Math.min(Math.max(-1,_6f6),1);
_6f6=((_6f6+1)/2);
var c=[];
for(var x=0;x<3;x++){
c[x]=parseInt(b[x]+((a[x]-b[x])*_6f6));
}
return c;
};
dojo.gfx.color.blendHex=function(a,b,_6fb){
return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a),dojo.gfx.color.hex2rgb(b),_6fb));
};
dojo.gfx.color.extractRGB=function(_6fc){
var hex="0123456789abcdef";
_6fc=_6fc.toLowerCase();
if(_6fc.indexOf("rgb")==0){
var _6fe=_6fc.match(/rgba*\((\d+), *(\d+), *(\d+)/i);
var ret=_6fe.splice(1,3);
return ret;
}else{
var _700=dojo.gfx.color.hex2rgb(_6fc);
if(_700){
return _700;
}else{
return dojo.gfx.color.named[_6fc]||[255,255,255];
}
}
};
dojo.gfx.color.hex2rgb=function(hex){
var _702="0123456789ABCDEF";
var rgb=new Array(3);
if(hex.indexOf("#")==0){
hex=hex.substring(1);
}
hex=hex.toUpperCase();
if(hex.replace(new RegExp("["+_702+"]","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]=_702.indexOf(rgb[i].charAt(0))*16+_702.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(_70b,end){
this.start=_70b;
this.end=end;
if(dojo.lang.isArray(_70b)){
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-_70b;
this.getValue=function(n){
return (diff*n)+this.start;
};
}
};
if((dojo.render.html.khtml)&&(!dojo.render.html.safari)){
dojo.lfx.easeDefault=function(n){
return (parseFloat("0.5")+((Math.sin((n+parseFloat("1.5"))*Math.PI))/2));
};
}else{
dojo.lfx.easeDefault=function(n){
return (0.5+((Math.sin((n+1.5)*Math.PI))/2));
};
}
dojo.lfx.easeIn=function(n){
return Math.pow(n,3);
};
dojo.lfx.easeOut=function(n){
return (1-Math.pow(1-n,3));
};
dojo.lfx.easeInOut=function(n){
return ((3*Math.pow(n,2))-(2*Math.pow(n,3)));
};
dojo.lfx.IAnimation=function(){
};
dojo.lang.extend(dojo.lfx.IAnimation,{curve:null,duration:1000,easing:null,repeatCount:0,rate:10,handler:null,beforeBegin:null,onBegin:null,onAnimate:null,onEnd:null,onPlay:null,onPause:null,onStop:null,play:null,pause:null,stop:null,connect:function(evt,_71b,_71c){
if(!_71c){
_71c=_71b;
_71b=this;
}
_71c=dojo.lang.hitch(_71b,_71c);
var _71d=this[evt]||function(){
};
this[evt]=function(){
var ret=_71d.apply(this,arguments);
_71c.apply(this,arguments);
return ret;
};
return this;
},fire:function(evt,args){
if(this[evt]){
this[evt].apply(this,(args||[]));
}
return this;
},repeat:function(_721){
this.repeatCount=_721;
return this;
},_active:false,_paused:false});
dojo.lfx.Animation=function(_722,_723,_724,_725,_726,rate){
dojo.lfx.IAnimation.call(this);
if(dojo.lang.isNumber(_722)||(!_722&&_723.getValue)){
rate=_726;
_726=_725;
_725=_724;
_724=_723;
_723=_722;
_722=null;
}else{
if(_722.getValue||dojo.lang.isArray(_722)){
rate=_725;
_726=_724;
_725=_723;
_724=_722;
_723=null;
_722=null;
}
}
if(dojo.lang.isArray(_724)){
this.curve=new dojo.lfx.Line(_724[0],_724[1]);
}else{
this.curve=_724;
}
if(_723!=null&&_723>0){
this.duration=_723;
}
if(_726){
this.repeatCount=_726;
}
if(rate){
this.rate=rate;
}
if(_722){
dojo.lang.forEach(["handler","beforeBegin","onBegin","onEnd","onPlay","onStop","onAnimate"],function(item){
if(_722[item]){
this.connect(item,_722[item]);
}
},this);
}
if(_725&&dojo.lang.isFunction(_725)){
this.easing=_725;
}
};
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(_729,_72a){
if(_72a){
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(_729>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_72a);
}),_729);
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 _72c=this.curve.getValue(step);
if(this._percent==0){
if(!this._startRepeatCount){
this._startRepeatCount=this.repeatCount;
}
this.fire("handler",["begin",_72c]);
this.fire("onBegin",[_72c]);
}
this.fire("handler",["play",_72c]);
this.fire("onPlay",[_72c]);
this._cycle();
return this;
},pause:function(){
clearTimeout(this._timer);
if(!this._active){
return this;
}
this._paused=true;
var _72d=this.curve.getValue(this._percent/100);
this.fire("handler",["pause",_72d]);
this.fire("onPause",[_72d]);
return this;
},gotoPercent:function(pct,_72f){
clearTimeout(this._timer);
this._active=true;
this._paused=true;
this._percent=pct;
if(_72f){
this.play();
}
return this;
},stop:function(_730){
clearTimeout(this._timer);
var step=this._percent/100;
if(_730){
step=1;
}
var _732=this.curve.getValue(step);
this.fire("handler",["stop",_732]);
this.fire("onStop",[_732]);
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 _735=this.curve.getValue(step);
this.fire("handler",["animate",_735]);
this.fire("onAnimate",[_735]);
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(_736){
dojo.lfx.IAnimation.call(this);
this._anims=[];
this._animsEnded=0;
var _737=arguments;
if(_737.length==1&&(dojo.lang.isArray(_737[0])||dojo.lang.isArrayLike(_737[0]))){
_737=_737[0];
}
dojo.lang.forEach(_737,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(_739,_73a){
if(!this._anims.length){
return this;
}
this.fire("beforeBegin");
if(_739>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_73a);
}),_739);
return this;
}
if(_73a||this._anims[0].percent==0){
this.fire("onBegin");
}
this.fire("onPlay");
this._animsCall("play",null,_73a);
return this;
},pause:function(){
this.fire("onPause");
this._animsCall("pause");
return this;
},stop:function(_73b){
this.fire("onStop");
this._animsCall("stop",_73b);
return this;
},_onAnimsEnded:function(){
this._animsEnded++;
if(this._animsEnded>=this._anims.length){
this.fire("onEnd");
}
return this;
},_animsCall:function(_73c){
var args=[];
if(arguments.length>1){
for(var i=1;i<arguments.length;i++){
args.push(arguments[i]);
}
}
var _73f=this;
dojo.lang.forEach(this._anims,function(anim){
anim[_73c](args);
},_73f);
return this;
}});
dojo.lfx.Chain=function(_741){
dojo.lfx.IAnimation.call(this);
this._anims=[];
this._currAnim=-1;
var _742=arguments;
if(_742.length==1&&(dojo.lang.isArray(_742[0])||dojo.lang.isArrayLike(_742[0]))){
_742=_742[0];
}
var _743=this;
dojo.lang.forEach(_742,function(anim,i,_746){
this._anims.push(anim);
if(i<_746.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(_747,_748){
if(!this._anims.length){
return this;
}
if(_748||!this._anims[this._currAnim]){
this._currAnim=0;
}
var _749=this._anims[this._currAnim];
this.fire("beforeBegin");
if(_747>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_748);
}),_747);
return this;
}
if(_749){
if(this._currAnim==0){
this.fire("handler",["begin",this._currAnim]);
this.fire("onBegin",[this._currAnim]);
}
this.fire("onPlay",[this._currAnim]);
_749.play(null,_748);
}
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 _74a=this._anims[this._currAnim];
if(_74a){
if(!_74a._active||_74a._paused){
this.play();
}else{
this.pause();
}
}
return this;
},stop:function(){
var _74b=this._anims[this._currAnim];
if(_74b){
_74b.stop();
this.fire("onStop",[this._currAnim]);
}
return _74b;
},_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(_74c){
var _74d=arguments;
if(dojo.lang.isArray(arguments[0])){
_74d=arguments[0];
}
if(_74d.length==1){
return _74d[0];
}
return new dojo.lfx.Combine(_74d);
};
dojo.lfx.chain=function(_74e){
var _74f=arguments;
if(dojo.lang.isArray(arguments[0])){
_74f=arguments[0];
}
if(_74f.length==1){
return _74f[0];
}
return new dojo.lfx.Chain(_74f);
};
dojo.provide("dojo.html.color");
dojo.html.getBackgroundColor=function(node){
node=dojo.byId(node);
var _751;
do{
_751=dojo.html.getStyle(node,"background-color");
if(_751.toLowerCase()=="rgba(0, 0, 0, 0)"){
_751="transparent";
}
if(node==document.getElementsByTagName("body")[0]){
node=null;
break;
}
node=node.parentNode;
}while(node&&dojo.lang.inArray(["transparent",""],_751));
if(_751=="transparent"){
_751=[255,255,255,0];
}else{
_751=dojo.gfx.color.extractRGB(_751);
}
return _751;
};
dojo.provide("dojo.lfx.html");
dojo.lfx.html._byId=function(_752){
if(!_752){
return [];
}
if(dojo.lang.isArrayLike(_752)){
if(!_752.alreadyChecked){
var n=[];
dojo.lang.forEach(_752,function(node){
n.push(dojo.byId(node));
});
n.alreadyChecked=true;
return n;
}else{
return _752;
}
}else{
var n=[];
n.push(dojo.byId(_752));
n.alreadyChecked=true;
return n;
}
};
dojo.lfx.html.propertyAnimation=function(_755,_756,_757,_758,_759){
_755=dojo.lfx.html._byId(_755);
var _75a={"propertyMap":_756,"nodes":_755,"duration":_757,"easing":_758||dojo.lfx.easeDefault};
var _75b=function(args){
if(args.nodes.length==1){
var pm=args.propertyMap;
if(!dojo.lang.isArray(args.propertyMap)){
var parr=[];
for(var _75f in pm){
pm[_75f].property=_75f;
parr.push(pm[_75f]);
}
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 _761=function(_762){
var _763=[];
dojo.lang.forEach(_762,function(c){
_763.push(Math.round(c));
});
return _763;
};
var _765=function(n,_767){
n=dojo.byId(n);
if(!n||!n.style){
return;
}
for(var s in _767){
try{
if(s=="opacity"){
dojo.html.setOpacity(n,_767[s]);
}else{
n.style[s]=_767[s];
}
}
catch(e){
dojo.debug(e);
}
}
};
var _769=function(_76a){
this._properties=_76a;
this.diffs=new Array(_76a.length);
dojo.lang.forEach(_76a,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 _771=null;
if(dojo.lang.isArray(prop.start)){
}else{
if(prop.start instanceof dojo.gfx.color.Color){
_771=(prop.units||"rgb")+"(";
for(var j=0;j<prop.startRgb.length;j++){
_771+=Math.round(((prop.endRgb[j]-prop.startRgb[j])*n)+prop.startRgb[j])+(j<prop.startRgb.length-1?",":"");
}
_771+=")";
}else{
_771=((this.diffs[i])*n)+prop.start+(prop.property!="opacity"?prop.units||"px":"");
}
}
ret[dojo.html.toCamelCase(prop.property)]=_771;
},this);
return ret;
};
};
var anim=new dojo.lfx.Animation({beforeBegin:function(){
_75b(_75a);
anim.curve=new _769(_75a.propertyMap);
},onAnimate:function(_774){
dojo.lang.forEach(_75a.nodes,function(node){
_765(node,_774);
});
}},_75a.duration,null,_75a.easing);
if(_759){
for(var x in _759){
if(dojo.lang.isFunction(_759[x])){
anim.connect(x,anim,_759[x]);
}
}
}
return anim;
};
dojo.lfx.html._makeFadeable=function(_777){
var _778=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(_777)){
dojo.lang.forEach(_777,_778);
}else{
_778(_777);
}
};
dojo.lfx.html.fade=function(_77a,_77b,_77c,_77d,_77e){
_77a=dojo.lfx.html._byId(_77a);
var _77f={property:"opacity"};
if(!dj_undef("start",_77b)){
_77f.start=_77b.start;
}else{
_77f.start=function(){
return dojo.html.getOpacity(_77a[0]);
};
}
if(!dj_undef("end",_77b)){
_77f.end=_77b.end;
}else{
dojo.raise("dojo.lfx.html.fade needs an end value");
}
var anim=dojo.lfx.propertyAnimation(_77a,[_77f],_77c,_77d);
anim.connect("beforeBegin",function(){
dojo.lfx.html._makeFadeable(_77a);
});
if(_77e){
anim.connect("onEnd",function(){
_77e(_77a,anim);
});
}
return anim;
};
dojo.lfx.html.fadeIn=function(_781,_782,_783,_784){
return dojo.lfx.html.fade(_781,{end:1},_782,_783,_784);
};
dojo.lfx.html.fadeOut=function(_785,_786,_787,_788){
return dojo.lfx.html.fade(_785,{end:0},_786,_787,_788);
};
dojo.lfx.html.fadeShow=function(_789,_78a,_78b,_78c){
_789=dojo.lfx.html._byId(_789);
dojo.lang.forEach(_789,function(node){
dojo.html.setOpacity(node,0);
});
var anim=dojo.lfx.html.fadeIn(_789,_78a,_78b,_78c);
anim.connect("beforeBegin",function(){
if(dojo.lang.isArrayLike(_789)){
dojo.lang.forEach(_789,dojo.html.show);
}else{
dojo.html.show(_789);
}
});
return anim;
};
dojo.lfx.html.fadeHide=function(_78f,_790,_791,_792){
var anim=dojo.lfx.html.fadeOut(_78f,_790,_791,function(){
if(dojo.lang.isArrayLike(_78f)){
dojo.lang.forEach(_78f,dojo.html.hide);
}else{
dojo.html.hide(_78f);
}
if(_792){
_792(_78f,anim);
}
});
return anim;
};
dojo.lfx.html.wipeIn=function(_794,_795,_796,_797){
_794=dojo.lfx.html._byId(_794);
var _798=[];
dojo.lang.forEach(_794,function(node){
var _79a={};
var _79b,_79c,_79d;
with(node.style){
_79b=top;
_79c=left;
_79d=position;
top="-9999px";
left="-9999px";
position="absolute";
display="";
}
var _79e=dojo.html.getBorderBox(node).height;
with(node.style){
top=_79b;
left=_79c;
position=_79d;
display="none";
}
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:1,end:function(){
return _79e;
}}},_795,_796);
anim.connect("beforeBegin",function(){
_79a.overflow=node.style.overflow;
_79a.height=node.style.height;
with(node.style){
overflow="hidden";
height="1px";
}
dojo.html.show(node);
});
anim.connect("onEnd",function(){
with(node.style){
overflow=_79a.overflow;
height=_79a.height;
}
if(_797){
_797(node,anim);
}
});
_798.push(anim);
});
return dojo.lfx.combine(_798);
};
dojo.lfx.html.wipeOut=function(_7a0,_7a1,_7a2,_7a3){
_7a0=dojo.lfx.html._byId(_7a0);
var _7a4=[];
dojo.lang.forEach(_7a0,function(node){
var _7a6={};
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:function(){
return dojo.html.getContentBox(node).height;
},end:1}},_7a1,_7a2,{"beforeBegin":function(){
_7a6.overflow=node.style.overflow;
_7a6.height=node.style.height;
with(node.style){
overflow="hidden";
}
dojo.html.show(node);
},"onEnd":function(){
dojo.html.hide(node);
with(node.style){
overflow=_7a6.overflow;
height=_7a6.height;
}
if(_7a3){
_7a3(node,anim);
}
}});
_7a4.push(anim);
});
return dojo.lfx.combine(_7a4);
};
dojo.lfx.html.slideTo=function(_7a8,_7a9,_7aa,_7ab,_7ac){
_7a8=dojo.lfx.html._byId(_7a8);
var _7ad=[];
var _7ae=dojo.html.getComputedStyle;
if(dojo.lang.isArray(_7a9)){
dojo.deprecated("dojo.lfx.html.slideTo(node, array)","use dojo.lfx.html.slideTo(node, {top: value, left: value});","0.5");
_7a9={top:_7a9[0],left:_7a9[1]};
}
dojo.lang.forEach(_7a8,function(node){
var top=null;
var left=null;
var init=(function(){
var _7b3=node;
return function(){
var pos=_7ae(_7b3,"position");
top=(pos=="absolute"?node.offsetTop:parseInt(_7ae(node,"top"))||0);
left=(pos=="absolute"?node.offsetLeft:parseInt(_7ae(node,"left"))||0);
if(!dojo.lang.inArray(["absolute","relative"],pos)){
var ret=dojo.html.abs(_7b3,true);
dojo.html.setStyleAttributes(_7b3,"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:(_7a9.top||0)},"left":{start:left,end:(_7a9.left||0)}},_7aa,_7ab,{"beforeBegin":init});
if(_7ac){
anim.connect("onEnd",function(){
_7ac(_7a8,anim);
});
}
_7ad.push(anim);
});
return dojo.lfx.combine(_7ad);
};
dojo.lfx.html.slideBy=function(_7b7,_7b8,_7b9,_7ba,_7bb){
_7b7=dojo.lfx.html._byId(_7b7);
var _7bc=[];
var _7bd=dojo.html.getComputedStyle;
if(dojo.lang.isArray(_7b8)){
dojo.deprecated("dojo.lfx.html.slideBy(node, array)","use dojo.lfx.html.slideBy(node, {top: value, left: value});","0.5");
_7b8={top:_7b8[0],left:_7b8[1]};
}
dojo.lang.forEach(_7b7,function(node){
var top=null;
var left=null;
var init=(function(){
var _7c2=node;
return function(){
var pos=_7bd(_7c2,"position");
top=(pos=="absolute"?node.offsetTop:parseInt(_7bd(node,"top"))||0);
left=(pos=="absolute"?node.offsetLeft:parseInt(_7bd(node,"left"))||0);
if(!dojo.lang.inArray(["absolute","relative"],pos)){
var ret=dojo.html.abs(_7c2,true);
dojo.html.setStyleAttributes(_7c2,"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+(_7b8.top||0)},"left":{start:left,end:left+(_7b8.left||0)}},_7b9,_7ba).connect("beforeBegin",init);
if(_7bb){
anim.connect("onEnd",function(){
_7bb(_7b7,anim);
});
}
_7bc.push(anim);
});
return dojo.lfx.combine(_7bc);
};
dojo.lfx.html.explode=function(_7c6,_7c7,_7c8,_7c9,_7ca){
var h=dojo.html;
_7c6=dojo.byId(_7c6);
_7c7=dojo.byId(_7c7);
var _7cc=h.toCoordinateObject(_7c6,true);
var _7cd=document.createElement("div");
h.copyStyle(_7cd,_7c7);
if(_7c7.explodeClassName){
_7cd.className=_7c7.explodeClassName;
}
with(_7cd.style){
position="absolute";
display="none";
var _7ce=h.getStyle(_7c6,"background-color");
backgroundColor=_7ce?_7ce.toLowerCase():"transparent";
backgroundColor=(backgroundColor=="transparent")?"rgb(221, 221, 221)":backgroundColor;
}
dojo.body().appendChild(_7cd);
with(_7c7.style){
visibility="hidden";
display="block";
}
var _7cf=h.toCoordinateObject(_7c7,true);
with(_7c7.style){
display="none";
visibility="visible";
}
var _7d0={opacity:{start:0.5,end:1}};
dojo.lang.forEach(["height","width","top","left"],function(type){
_7d0[type]={start:_7cc[type],end:_7cf[type]};
});
var anim=new dojo.lfx.propertyAnimation(_7cd,_7d0,_7c8,_7c9,{"beforeBegin":function(){
h.setDisplay(_7cd,"block");
},"onEnd":function(){
h.setDisplay(_7c7,"block");
_7cd.parentNode.removeChild(_7cd);
}});
if(_7ca){
anim.connect("onEnd",function(){
_7ca(_7c7,anim);
});
}
return anim;
};
dojo.lfx.html.implode=function(_7d3,end,_7d5,_7d6,_7d7){
var h=dojo.html;
_7d3=dojo.byId(_7d3);
end=dojo.byId(end);
var _7d9=dojo.html.toCoordinateObject(_7d3,true);
var _7da=dojo.html.toCoordinateObject(end,true);
var _7db=document.createElement("div");
dojo.html.copyStyle(_7db,_7d3);
if(_7d3.explodeClassName){
_7db.className=_7d3.explodeClassName;
}
dojo.html.setOpacity(_7db,0.3);
with(_7db.style){
position="absolute";
display="none";
backgroundColor=h.getStyle(_7d3,"background-color").toLowerCase();
}
dojo.body().appendChild(_7db);
var _7dc={opacity:{start:1,end:0.5}};
dojo.lang.forEach(["height","width","top","left"],function(type){
_7dc[type]={start:_7d9[type],end:_7da[type]};
});
var anim=new dojo.lfx.propertyAnimation(_7db,_7dc,_7d5,_7d6,{"beforeBegin":function(){
dojo.html.hide(_7d3);
dojo.html.show(_7db);
},"onEnd":function(){
_7db.parentNode.removeChild(_7db);
}});
if(_7d7){
anim.connect("onEnd",function(){
_7d7(_7d3,anim);
});
}
return anim;
};
dojo.lfx.html.highlight=function(_7df,_7e0,_7e1,_7e2,_7e3){
_7df=dojo.lfx.html._byId(_7df);
var _7e4=[];
dojo.lang.forEach(_7df,function(node){
var _7e6=dojo.html.getBackgroundColor(node);
var bg=dojo.html.getStyle(node,"background-color").toLowerCase();
var _7e8=dojo.html.getStyle(node,"background-image");
var _7e9=(bg=="transparent"||bg=="rgba(0, 0, 0, 0)");
while(_7e6.length>3){
_7e6.pop();
}
var rgb=new dojo.gfx.color.Color(_7e0);
var _7eb=new dojo.gfx.color.Color(_7e6);
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:rgb,end:_7eb}},_7e1,_7e2,{"beforeBegin":function(){
if(_7e8){
node.style.backgroundImage="none";
}
node.style.backgroundColor="rgb("+rgb.toRgb().join(",")+")";
},"onEnd":function(){
if(_7e8){
node.style.backgroundImage=_7e8;
}
if(_7e9){
node.style.backgroundColor="transparent";
}
if(_7e3){
_7e3(node,anim);
}
}});
_7e4.push(anim);
});
return dojo.lfx.combine(_7e4);
};
dojo.lfx.html.unhighlight=function(_7ed,_7ee,_7ef,_7f0,_7f1){
_7ed=dojo.lfx.html._byId(_7ed);
var _7f2=[];
dojo.lang.forEach(_7ed,function(node){
var _7f4=new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node));
var rgb=new dojo.gfx.color.Color(_7ee);
var _7f6=dojo.html.getStyle(node,"background-image");
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:_7f4,end:rgb}},_7ef,_7f0,{"beforeBegin":function(){
if(_7f6){
node.style.backgroundImage="none";
}
node.style.backgroundColor="rgb("+_7f4.toRgb().join(",")+")";
},"onEnd":function(){
if(_7f1){
_7f1(node,anim);
}
}});
_7f2.push(anim);
});
return dojo.lfx.combine(_7f2);
};
dojo.lang.mixin(dojo.lfx,dojo.lfx.html);
dojo.kwCompoundRequire({browser:["dojo.lfx.html"],dashboard:["dojo.lfx.html"]});
dojo.provide("dojo.lfx.*");
dojo.provide("dojo.lfx.toggle");
dojo.lfx.toggle.plain={show:function(node,_7f9,_7fa,_7fb){
dojo.html.show(node);
if(dojo.lang.isFunction(_7fb)){
_7fb();
}
},hide:function(node,_7fd,_7fe,_7ff){
dojo.html.hide(node);
if(dojo.lang.isFunction(_7ff)){
_7ff();
}
}};
dojo.lfx.toggle.fade={show:function(node,_801,_802,_803){
dojo.lfx.fadeShow(node,_801,_802,_803).play();
},hide:function(node,_805,_806,_807){
dojo.lfx.fadeHide(node,_805,_806,_807).play();
}};
dojo.lfx.toggle.wipe={show:function(node,_809,_80a,_80b){
dojo.lfx.wipeIn(node,_809,_80a,_80b).play();
},hide:function(node,_80d,_80e,_80f){
dojo.lfx.wipeOut(node,_80d,_80e,_80f).play();
}};
dojo.lfx.toggle.explode={show:function(node,_811,_812,_813,_814){
dojo.lfx.explode(_814||{x:0,y:0,width:0,height:0},node,_811,_812,_813).play();
},hide:function(node,_816,_817,_818,_819){
dojo.lfx.implode(node,_819||{x:0,y:0,width:0,height:0},_816,_817,_818).play();
}};
dojo.provide("dojo.widget.HtmlWidget");
dojo.declare("dojo.widget.HtmlWidget",dojo.widget.DomWidget,{templateCssPath:null,templatePath:null,lang:"",toggle:"plain",toggleDuration:150,initialize:function(args,frag){
},postMixInProperties:function(args,frag){
if(this.lang===""){
this.lang=null;
}
this.toggleObj=dojo.lfx.toggle[this.toggle.toLowerCase()]||dojo.lfx.toggle.plain;
},createNodesFromText:function(txt,wrap){
return dojo.html.createNodesFromText(txt,wrap);
},destroyRendering:function(_820){
try{
if(this.bgIframe){
this.bgIframe.remove();
delete this.bgIframe;
}
if(!_820&&this.domNode){
dojo.event.browser.clean(this.domNode);
}
dojo.widget.HtmlWidget.superclass.destroyRendering.call(this);
}
catch(e){
}
},isShowing:function(){
return dojo.html.isShowing(this.domNode);
},toggleShowing:function(){
if(this.isShowing()){
this.hide();
}else{
this.show();
}
},show:function(){
if(this.isShowing()){
return;
}
this.animationInProgress=true;
this.toggleObj.show(this.domNode,this.toggleDuration,null,dojo.lang.hitch(this,this.onShow),this.explodeSrc);
},onShow:function(){
this.animationInProgress=false;
this.checkSize();
},hide:function(){
if(!this.isShowing()){
return;
}
this.animationInProgress=true;
this.toggleObj.hide(this.domNode,this.toggleDuration,null,dojo.lang.hitch(this,this.onHide),this.explodeSrc);
},onHide:function(){
this.animationInProgress=false;
},_isResized:function(w,h){
if(!this.isShowing()){
return false;
}
var wh=dojo.html.getMarginBox(this.domNode);
var _824=w||wh.width;
var _825=h||wh.height;
if(this.width==_824&&this.height==_825){
return false;
}
this.width=_824;
this.height=_825;
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(_828){
if(_828.checkSize){
_828.checkSize();
}
});
}});
dojo.kwCompoundRequire({common:["dojo.xml.Parse","dojo.widget.Widget","dojo.widget.Parse","dojo.widget.Manager"],browser:["dojo.widget.DomWidget","dojo.widget.HtmlWidget"],dashboard:["dojo.widget.DomWidget","dojo.widget.HtmlWidget"],svg:["dojo.widget.SvgWidget"],rhino:["dojo.widget.SwtWidget"]});
dojo.provide("dojo.widget.*");
dojo.provide("dojo.lang.type");
dojo.lang.whatAmI=function(_829){
dojo.deprecated("dojo.lang.whatAmI","use dojo.lang.getType instead","0.5");
return dojo.lang.getType(_829);
};
dojo.lang.whatAmI.custom={};
dojo.lang.getType=function(_82a){
try{
if(dojo.lang.isArray(_82a)){
return "array";
}
if(dojo.lang.isFunction(_82a)){
return "function";
}
if(dojo.lang.isString(_82a)){
return "string";
}
if(dojo.lang.isNumber(_82a)){
return "number";
}
if(dojo.lang.isBoolean(_82a)){
return "boolean";
}
if(dojo.lang.isAlien(_82a)){
return "alien";
}
if(dojo.lang.isUndefined(_82a)){
return "undefined";
}
for(var name in dojo.lang.whatAmI.custom){
if(dojo.lang.whatAmI.custom[name](_82a)){
return name;
}
}
if(dojo.lang.isObject(_82a)){
return "object";
}
}
catch(e){
}
return "unknown";
};
dojo.lang.isNumeric=function(_82c){
return (!isNaN(_82c)&&isFinite(_82c)&&(_82c!=null)&&!dojo.lang.isBoolean(_82c)&&!dojo.lang.isArray(_82c)&&!/^\s*$/.test(_82c));
};
dojo.lang.isBuiltIn=function(_82d){
return (dojo.lang.isArray(_82d)||dojo.lang.isFunction(_82d)||dojo.lang.isString(_82d)||dojo.lang.isNumber(_82d)||dojo.lang.isBoolean(_82d)||(_82d==null)||(_82d instanceof Error)||(typeof _82d=="error"));
};
dojo.lang.isPureObject=function(_82e){
return ((_82e!=null)&&dojo.lang.isObject(_82e)&&_82e.constructor==Object);
};
dojo.lang.isOfType=function(_82f,type,_831){
var _832=false;
if(_831){
_832=_831["optional"];
}
if(_832&&((_82f===null)||dojo.lang.isUndefined(_82f))){
return true;
}
if(dojo.lang.isArray(type)){
var _833=type;
for(var i in _833){
var _835=_833[i];
if(dojo.lang.isOfType(_82f,_835)){
return true;
}
}
return false;
}else{
if(dojo.lang.isString(type)){
type=type.toLowerCase();
}
switch(type){
case Array:
case "array":
return dojo.lang.isArray(_82f);
case Function:
case "function":
return dojo.lang.isFunction(_82f);
case String:
case "string":
return dojo.lang.isString(_82f);
case Number:
case "number":
return dojo.lang.isNumber(_82f);
case "numeric":
return dojo.lang.isNumeric(_82f);
case Boolean:
case "boolean":
return dojo.lang.isBoolean(_82f);
case Object:
case "object":
return dojo.lang.isObject(_82f);
case "pureobject":
return dojo.lang.isPureObject(_82f);
case "builtin":
return dojo.lang.isBuiltIn(_82f);
case "alien":
return dojo.lang.isAlien(_82f);
case "undefined":
return dojo.lang.isUndefined(_82f);
case null:
case "null":
return (_82f===null);
case "optional":
dojo.deprecated("dojo.lang.isOfType(value, [type, \"optional\"])","use dojo.lang.isOfType(value, type, {optional: true} ) instead","0.5");
return ((_82f===null)||dojo.lang.isUndefined(_82f));
default:
if(dojo.lang.isFunction(type)){
return (_82f 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 _837=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_837[i++]];
}while(i<_837.length&&obj);
return (obj!=dj_global)?obj:null;
};
dojo.lang.doesObjectExist=function(str){
var _83b=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_83b[i++]];
}while(i<_83b.length&&obj);
return (obj&&obj!=dj_global);
};
dojo.provide("dojo.lang.assert");
dojo.lang.assert=function(_83e,_83f){
if(!_83e){
var _840="An assert statement failed.\n"+"The method dojo.lang.assert() was called with a 'false' value.\n";
if(_83f){
_840+="Here's the assert message:\n"+_83f+"\n";
}
throw new Error(_840);
}
};
dojo.lang.assertType=function(_841,type,_843){
if(dojo.lang.isString(_843)){
dojo.deprecated("dojo.lang.assertType(value, type, \"message\")","use dojo.lang.assertType(value, type) instead","0.5");
}
if(!dojo.lang.isOfType(_841,type,_843)){
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(_844,_845,_846){
var key;
if(!_846){
if(!dojo.lang.assertValidKeywords._errorMessage){
dojo.lang.assertValidKeywords._errorMessage="In dojo.lang.assertValidKeywords(), found invalid keyword:";
}
_846=dojo.lang.assertValidKeywords._errorMessage;
}
if(dojo.lang.isArray(_845)){
for(key in _844){
if(!dojo.lang.inArray(_845,key)){
dojo.lang.assert(false,_846+" "+key);
}
}
}else{
for(key in _844){
if(!(key in _845)){
dojo.lang.assert(false,_846+" "+key);
}
}
}
};
dojo.provide("dojo.AdapterRegistry");
dojo.AdapterRegistry=function(_848){
this.pairs=[];
this.returnWrappers=_848||false;
};
dojo.lang.extend(dojo.AdapterRegistry,{register:function(name,_84a,wrap,_84c,_84d){
var type=(_84d)?"unshift":"push";
this.pairs[type]([name,_84a,wrap,_84c]);
},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,_855,wrap,_857){
dojo.lang.reprRegistry.register(name,_855,wrap,_857);
};
dojo.lang.repr=function(obj){
if(typeof (obj)=="undefined"){
return "undefined";
}else{
if(obj===null){
return "null";
}
}
try{
if(typeof (obj["__repr__"])=="function"){
return obj["__repr__"]();
}else{
if((typeof (obj["repr"])=="function")&&(obj.repr!=arguments.callee)){
return obj["repr"]();
}
}
return dojo.lang.reprRegistry.match(obj);
}
catch(e){
if(typeof (obj.NAME)=="string"&&(obj.toString==Function.prototype.toString||obj.toString==Object.prototype.toString)){
return obj.NAME;
}
}
if(typeof (obj)=="function"){
obj=(obj+"").replace(/^\s+/,"");
var idx=obj.indexOf("{");
if(idx!=-1){
obj=obj.substr(0,idx)+"{...}";
}
}
return obj+"";
};
dojo.lang.reprArrayLike=function(arr){
try{
var na=dojo.lang.map(arr,dojo.lang.repr);
return "["+na.join(", ")+"]";
}
catch(e){
}
};
(function(){
var m=dojo.lang;
m.registerRepr("arrayLike",m.isArrayLike,m.reprArrayLike);
m.registerRepr("string",m.isString,m.reprString);
m.registerRepr("numbers",m.isNumber,m.reprNumber);
m.registerRepr("boolean",m.isBoolean,m.reprNumber);
})();
dojo.kwCompoundRequire({common:["dojo.lang.common","dojo.lang.assert","dojo.lang.array","dojo.lang.type","dojo.lang.func","dojo.lang.extras","dojo.lang.repr","dojo.lang.declare"]});
dojo.provide("dojo.lang.*");
dojo.provide("dojo.string.Builder");
dojo.string.Builder=function(str){
this.arrConcat=(dojo.render.html.capable&&dojo.render.html["ie"]);
var a=[];
var b="";
var _860=this.length=b.length;
if(this.arrConcat){
if(b.length>0){
a.push(b);
}
b="";
}
this.toString=this.valueOf=function(){
return (this.arrConcat)?a.join(""):b;
};
this.append=function(){
for(var x=0;x<arguments.length;x++){
var s=arguments[x];
if(dojo.lang.isArrayLike(s)){
this.append.apply(this,s);
}else{
if(this.arrConcat){
a.push(s);
}else{
b+=s;
}
_860+=s.length;
this.length=_860;
}
}
return this;
};
this.clear=function(){
a=[];
b="";
_860=this.length=0;
return this;
};
this.remove=function(f,l){
var s="";
if(this.arrConcat){
b=a.join("");
}
a=[];
if(f>0){
s=b.substring(0,(f-1));
}
b=s+b.substring(f+l);
_860=this.length=b.length;
if(this.arrConcat){
a.push(b);
b="";
}
return this;
};
this.replace=function(o,n){
if(this.arrConcat){
b=a.join("");
}
a=[];
b=b.replace(o,n);
_860=this.length=b.length;
if(this.arrConcat){
a.push(b);
b="";
}
return this;
};
this.insert=function(idx,s){
if(this.arrConcat){
b=a.join("");
}
a=[];
if(idx==0){
b=s+b;
}else{
var t=b.split("");
t.splice(idx,0,s);
b=t.join("");
}
_860=this.length=b.length;
if(this.arrConcat){
a.push(b);
b="";
}
return this;
};
this.append.apply(this,arguments);
};
dojo.kwCompoundRequire({common:["dojo.string","dojo.string.common","dojo.string.extras","dojo.string.Builder"]});
dojo.provide("dojo.string.*");
dojo.provide("dojo.widget.ProgressBar");
dojo.widget.defineWidget("dojo.widget.ProgressBar",dojo.widget.HtmlWidget,{progressValue:0,maxProgressValue:100,width:300,height:30,frontPercentClass:"frontPercent",backPercentClass:"backPercent",frontBarClass:"frontBar",backBarClass:"backBar",hasText:false,isVertical:false,showOnlyIntegers:false,dataSource:"",pollInterval:3000,duration:1000,templatePath:dojo.uri.moduleUri("dojo.widget","templates/ProgressBar.html"),templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/ProgressBar.css"),containerNode:null,internalProgress:null,_pixelUnitRatio:0,_pixelPercentRatio:0,_unitPercentRatio:0,_unitPixelRatio:0,_floatDimension:0,_intDimension:0,_progressPercentValue:"0%",_floatMaxProgressValue:0,_dimension:"width",_pixelValue:0,_oInterval:null,_animation:null,_animationStopped:true,_progressValueBak:false,_hasTextBak:false,fillInTemplate:function(args,frag){
this.internalProgress.className=this.frontBarClass;
this.containerNode.className=this.backBarClass;
if(this.isVertical){
this.internalProgress.style.bottom="0px";
this.internalProgress.style.left="0px";
this._dimension="height";
}else{
this.internalProgress.style.top="0px";
this.internalProgress.style.left="0px";
this._dimension="width";
}
this.frontPercentLabel.className=this.frontPercentClass;
this.backPercentLabel.className=this.backPercentClass;
this.progressValue=""+this.progressValue;
this.domNode.style.height=this.height+"px";
this.domNode.style.width=this.width+"px";
this._intDimension=parseInt("0"+eval("this."+this._dimension));
this._floatDimension=parseFloat("0"+eval("this."+this._dimension));
this._pixelPercentRatio=this._floatDimension/100;
this.setMaxProgressValue(this.maxProgressValue,true);
this.setProgressValue(dojo.string.trim(this.progressValue),true);
dojo.debug("float dimension: "+this._floatDimension);
dojo.debug("this._unitPixelRatio: "+this._unitPixelRatio);
this.showText(this.hasText);
},showText:function(_86d){
if(_86d){
this.backPercentLabel.style.display="block";
this.frontPercentLabel.style.display="block";
}else{
this.backPercentLabel.style.display="none";
this.frontPercentLabel.style.display="none";
}
this.hasText=_86d;
},postCreate:function(args,frag){
this.render();
},_backupValues:function(){
this._progressValueBak=this.progressValue;
this._hasTextBak=this.hasText;
},_restoreValues:function(){
this.setProgressValue(this._progressValueBak);
this.showText(this._hasTextBak);
},_setupAnimation:function(){
var _870=this;
dojo.debug("internalProgress width: "+this.internalProgress.style.width);
this._animation=dojo.lfx.html.slideTo(this.internalProgress,{top:0,left:parseInt(this.width)-parseInt(this.internalProgress.style.width)},parseInt(this.duration),null,function(){
var _871=dojo.lfx.html.slideTo(_870.internalProgress,{top:0,left:0},parseInt(_870.duration));
dojo.event.connect(_871,"onEnd",function(){
if(!_870._animationStopped){
_870._animation.play();
}
});
if(!_870._animationStopped){
_871.play();
}
_871=null;
});
},getMaxProgressValue:function(){
return this.maxProgressValue;
},setMaxProgressValue:function(_872,_873){
if(!this._animationStopped){
return;
}
this.maxProgressValue=_872;
this._floatMaxProgressValue=parseFloat("0"+this.maxProgressValue);
this._pixelUnitRatio=this._floatDimension/this.maxProgressValue;
this._unitPercentRatio=this._floatMaxProgressValue/100;
this._unitPixelRatio=this._floatMaxProgressValue/this._floatDimension;
this.setProgressValue(this.progressValue,true);
if(!_873){
this.render();
}
},setProgressValue:function(_874,_875){
if(!this._animationStopped){
return;
}
this._progressPercentValue="0%";
var _876=dojo.string.trim(""+_874);
var _877=parseFloat("0"+_876);
var _878=parseInt("0"+_876);
var _879=0;
if(dojo.string.endsWith(_876,"%",false)){
this._progressPercentValue=Math.min(_877.toFixed(1),100)+"%";
_876=Math.min((_877)*this._unitPercentRatio,this.maxProgressValue);
_879=Math.min((_877)*this._pixelPercentRatio,eval("this."+this._dimension));
}else{
this.progressValue=Math.min(_877,this.maxProgressValue);
this._progressPercentValue=Math.min((_877/this._unitPercentRatio).toFixed(1),100)+"%";
_879=Math.min(_877/this._unitPixelRatio,eval("this."+this._dimension));
}
this.progressValue=dojo.string.trim(_876);
this._pixelValue=_879;
if(!_875){
this.render();
}
},getProgressValue:function(){
return this.progressValue;
},getProgressPercentValue:function(){
return this._progressPercentValue;
},setDataSource:function(_87a){
this.dataSource=_87a;
},setPollInterval:function(_87b){
this.pollInterval=_87b;
},start:function(){
var _87c=dojo.lang.hitch(this,this._showRemoteProgress);
this._oInterval=setInterval(_87c,this.pollInterval);
},startAnimation:function(){
if(this._animationStopped){
this._backupValues();
this.setProgressValue("10%");
this._animationStopped=false;
this._setupAnimation();
this.showText(false);
this.internalProgress.style.height="105%";
this._animation.play();
}
},stopAnimation:function(){
if(this._animation){
this._animationStopped=true;
this._animation.stop();
this.internalProgress.style.height="100%";
this.internalProgress.style.left="0px";
this._restoreValues();
this._setLabelPosition();
}
},_showRemoteProgress:function(){
var _87d=this;
if((this.getMaxProgressValue()==this.getProgressValue())&&this._oInterval){
clearInterval(this._oInterval);
this._oInterval=null;
this.setProgressValue("100%");
return;
}
var _87e={url:_87d.dataSource,method:"POST",mimetype:"text/json",error:function(type,_880){
dojo.debug("[ProgressBar] showRemoteProgress error");
},load:function(type,data,evt){
_87d.setProgressValue((_87d._oInterval?data["progress"]:"100%"));
}};
dojo.io.bind(_87e);
},render:function(){
this._setPercentLabel(dojo.string.trim(this._progressPercentValue));
this._setPixelValue(this._pixelValue);
this._setLabelPosition();
},_setLabelPosition:function(){
var _884=dojo.html.getContentBox(this.frontPercentLabel).width;
var _885=dojo.html.getContentBox(this.frontPercentLabel).height;
var _886=dojo.html.getContentBox(this.backPercentLabel).width;
var _887=dojo.html.getContentBox(this.backPercentLabel).height;
var _888=(parseInt(this.width)-_884)/2+"px";
var _889=(parseInt(this.height)-parseInt(_885))/2+"px";
var _88a=(parseInt(this.width)-_886)/2+"px";
var _88b=(parseInt(this.height)-parseInt(_887))/2+"px";
this.frontPercentLabel.style.left=_888;
this.backPercentLabel.style.left=_88a;
this.frontPercentLabel.style.bottom=_889;
this.backPercentLabel.style.bottom=_88b;
},_setPercentLabel:function(_88c){
dojo.dom.removeChildren(this.frontPercentLabel);
dojo.dom.removeChildren(this.backPercentLabel);
var _88d=this.showOnlyIntegers==false?_88c:parseInt(_88c)+"%";
this.frontPercentLabel.appendChild(document.createTextNode(_88d));
this.backPercentLabel.appendChild(document.createTextNode(_88d));
},_setPixelValue:function(_88e){
eval("this.internalProgress.style."+this._dimension+" = "+_88e+" + 'px'");
this.onChange();
},onChange:function(){
}});
dojo.provide("dojo.html.selection");
dojo.html.selectionType={NONE:0,TEXT:1,CONTROL:2};
dojo.html.clearSelection=function(){
var _88f=dojo.global();
var _890=dojo.doc();
try{
if(_88f["getSelection"]){
if(dojo.render.html.safari){
_88f.getSelection().collapse();
}else{
_88f.getSelection().removeAllRanges();
}
}else{
if(_890.selection){
if(_890.selection.empty){
_890.selection.empty();
}else{
if(_890.selection.clear){
_890.selection.clear();
}
}
}
}
return true;
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.html.disableSelection=function(_891){
_891=dojo.byId(_891)||dojo.body();
var h=dojo.render.html;
if(h.mozilla){
_891.style.MozUserSelect="none";
}else{
if(h.safari){
_891.style.KhtmlUserSelect="none";
}else{
if(h.ie){
_891.unselectable="on";
}else{
return false;
}
}
}
return true;
};
dojo.html.enableSelection=function(_893){
_893=dojo.byId(_893)||dojo.body();
var h=dojo.render.html;
if(h.mozilla){
_893.style.MozUserSelect="";
}else{
if(h.safari){
_893.style.KhtmlUserSelect="";
}else{
if(h.ie){
_893.unselectable="off";
}else{
return false;
}
}
}
return true;
};
dojo.html.selectElement=function(_895){
dojo.deprecated("dojo.html.selectElement","replaced by dojo.html.selection.selectElementChildren",0.5);
};
dojo.html.selectInputText=function(_896){
var _897=dojo.global();
var _898=dojo.doc();
_896=dojo.byId(_896);
if(_898["selection"]&&dojo.body()["createTextRange"]){
var _899=_896.createTextRange();
_899.moveStart("character",0);
_899.moveEnd("character",_896.value.length);
_899.select();
}else{
if(_897["getSelection"]){
var _89a=_897.getSelection();
_896.setSelectionRange(0,_896.value.length);
}
}
_896.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 _89b=dojo.html.selectionType.TEXT;
var oSel;
try{
oSel=dojo.global().getSelection();
}
catch(e){
}
if(oSel&&oSel.rangeCount==1){
var _89d=oSel.getRangeAt(0);
if(_89d.startContainer==_89d.endContainer&&(_89d.endOffset-_89d.startOffset)==1&&_89d.startContainer.nodeType!=dojo.dom.TEXT_NODE){
_89b=dojo.html.selectionType.CONTROL;
}
}
return _89b;
}
},isCollapsed:function(){
var _89e=dojo.global();
var _89f=dojo.doc();
if(_89f["selection"]){
return _89f.selection.createRange().text=="";
}else{
if(_89e["getSelection"]){
var _8a0=_89e.getSelection();
if(dojo.lang.isString(_8a0)){
return _8a0=="";
}else{
return _8a0.isCollapsed||_8a0.toString()=="";
}
}
}
},getSelectedElement:function(){
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
if(dojo.doc()["selection"]){
var _8a1=dojo.doc().selection.createRange();
if(_8a1&&_8a1.item){
return dojo.doc().selection.createRange().item(0);
}
}else{
var _8a2=dojo.global().getSelection();
return _8a2.anchorNode.childNodes[_8a2.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 _8a4=dojo.global().getSelection();
if(_8a4){
var node=_8a4.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 _8a6=dojo.global().getSelection();
if(_8a6){
return _8a6.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 _8a7=dojo.global().getSelection();
if(_8a7&&_8a7.rangeCount){
var frag=_8a7.getRangeAt(0).cloneContents();
var div=document.createElement("div");
div.appendChild(frag);
return div.innerHTML;
}
return null;
}
},hasAncestorElement:function(_8aa){
return (dojo.html.selection.getAncestorElement.apply(this,arguments)!=null);
},getAncestorElement:function(_8ab){
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(_8b0){
var _8b1=dojo.global();
var _8b2=dojo.doc();
_8b0=dojo.byId(_8b0);
if(_8b2.selection&&dojo.body().createTextRange){
try{
var _8b3=dojo.body().createControlRange();
_8b3.addElement(_8b0);
_8b3.select();
}
catch(e){
dojo.html.selection.selectElementChildren(_8b0);
}
}else{
if(_8b1["getSelection"]){
var _8b4=_8b1.getSelection();
if(_8b4["removeAllRanges"]){
var _8b3=_8b2.createRange();
_8b3.selectNode(_8b0);
_8b4.removeAllRanges();
_8b4.addRange(_8b3);
}
}
}
},selectElementChildren:function(_8b5){
var _8b6=dojo.global();
var _8b7=dojo.doc();
_8b5=dojo.byId(_8b5);
if(_8b7.selection&&dojo.body().createTextRange){
var _8b8=dojo.body().createTextRange();
_8b8.moveToElementText(_8b5);
_8b8.select();
}else{
if(_8b6["getSelection"]){
var _8b9=_8b6.getSelection();
if(_8b9["setBaseAndExtent"]){
_8b9.setBaseAndExtent(_8b5,0,_8b5,_8b5.innerText.length-1);
}else{
if(_8b9["selectAllChildren"]){
_8b9.selectAllChildren(_8b5);
}
}
}
}
},getBookmark:function(){
var _8ba;
var _8bb=dojo.doc();
if(_8bb["selection"]){
var _8bc=_8bb.selection.createRange();
_8ba=_8bc.getBookmark();
}else{
var _8bd;
try{
_8bd=dojo.global().getSelection();
}
catch(e){
}
if(_8bd){
var _8bc=_8bd.getRangeAt(0);
_8ba=_8bc.cloneRange();
}else{
dojo.debug("No idea how to store the current selection for this browser!");
}
}
return _8ba;
},moveToBookmark:function(_8be){
var _8bf=dojo.doc();
if(_8bf["selection"]){
var _8c0=_8bf.selection.createRange();
_8c0.moveToBookmark(_8be);
_8c0.select();
}else{
var _8c1;
try{
_8c1=dojo.global().getSelection();
}
catch(e){
}
if(_8c1&&_8c1["removeAllRanges"]){
_8c1.removeAllRanges();
_8c1.addRange(_8be);
}else{
dojo.debug("No idea how to restore selection for this browser!");
}
}
},collapse:function(_8c2){
if(dojo.global()["getSelection"]){
var _8c3=dojo.global().getSelection();
if(_8c3.removeAllRanges){
if(_8c2){
_8c3.collapseToStart();
}else{
_8c3.collapseToEnd();
}
}else{
dojo.global().getSelection().collapse(_8c2);
}
}else{
if(dojo.doc().selection){
var _8c4=dojo.doc().selection.createRange();
_8c4.collapse(_8c2);
_8c4.select();
}
}
},remove:function(){
if(dojo.doc().selection){
var _8c5=dojo.doc().selection;
if(_8c5.type.toUpperCase()!="NONE"){
_8c5.clear();
}
return _8c5;
}else{
var _8c5=dojo.global().getSelection();
for(var i=0;i<_8c5.rangeCount;i++){
_8c5.getRangeAt(i).deleteContents();
}
return _8c5;
}
}});
dojo.provide("js.widget.Acleditor");
dojo.widget.defineWidget("js.widget.Acleditor",dojo.widget.HtmlWidget,{value:"",sel_user:null,display_sel_user:null,roles_picker:null,rolesdata:null,postCreate:function(args,frag,_8c9){
var _8ca=dojo.widget.createWidget("js:Objectpicker",{name:"roles_picker",cdata:dojo.json.evalJson(_8c9.extraArgs.rolesdata)},dojo.byId("sel_role"));
this.sel_user=dojo.byId("sel_user");
this.display_sel_user=dojo.byId("display_sel_user");
this.roles_picker=_8ca;
var _8cb=this;
dojo.addOnLoad(function(){
dojo.event.topic.subscribe("selection_update",this,update_selection_acleditor);
function update_selection_acleditor(args){
if(args.widgetId!="acleditor"){
return;
}
_8cb.sel_user.value=args.Id;
_8cb.display_sel_user.innerHTML=dojo.string.trim(args.name);
_8cb.sel_user.onchange();
}
});
},buildRendering:function(){
this.domNode=document.createElement("table");
dojo.html.disableSelection(this.domNode);
dojo.event.connect(this.domNode,"onmousedown",function(e){
e.preventDefault();
});
this.domNode.setAttribute("cellPadding","0");
this.domNode.setAttribute("cellSpacing","1");
this.domNode.setAttribute("border","1");
this.domNode.style.backgroundColor="#dfdfdf";
var tr1=this.domNode.insertRow(-1);
var td1=tr1.insertCell(-1);
td1.appendChild(this.build_editor());
var tr2=this.domNode.insertRow(-1);
var td2=tr2.insertCell(-1);
td2.appendChild(this.build_pickers());
},build_editor:function(){
var _8d2=document.createElement("table");
_8d2.id="editor_table";
_8d2.setAttribute("cellPadding","0");
_8d2.setAttribute("cellSpacing","1");
_8d2.setAttribute("border","0");
_8d2.setAttribute("width","100%");
_8d2.style.backgroundColor="efefef";
var _8d3=this.value.split(":");
for(var i=0;i<_8d3.length;i++){
if(_8d3[i]==""){
continue;
}
var tr=_8d2.insertRow(-1);
var td1=tr.insertCell(-1);
var _8d7=_8d3[i].split(",");
if(_8d7[0].substring(0,1)=="r"){
td1.innerHTML="<b>"+_8d7[1]+"</b>";
}else{
td1.innerHTML=_8d7[1];
}
var td2=tr.insertCell(-1);
td2.align="right";
td2.id="del_"+_8d7[0];
td2.innerHTML="<img  src=\"./themes/Default/images/delete.gif\">";
td2.onmouseover=function(e){
this.style.cursor="pointer";
};
td2.onmouseout=function(e){
this.style.cursor="default";
};
dojo.event.connect(td2,"onmousedown",this,"onClick");
}
return _8d2;
},build_pickers:function(){
var _8db=document.createElement("table");
_8db.setAttribute("cellPadding","0");
_8db.setAttribute("cellSpacing","1");
_8db.setAttribute("border","0");
var _8dc=_8db.insertRow(-1);
var _8dd=_8dc.insertCell(-1);
var _8de=_8dc.insertCell(-1);
var _8df=_8db.insertRow(-1);
var _8e0=_8df.insertCell(-1);
var _8e1=_8df.insertCell(-1);
_8dd.innerHTML="Users:";
_8dd.setAttribute("Align","right");
_8e0.innerHTML="Roles:";
_8e0.setAttribute("Align","right");
_8de.className="propertyValue";
_8e1.className="propertyValue";
var _8e2=document.createElement("div");
var _8e3="?objpath=domain/base/tables/users/forms/list&mode=dialog&task=select&widgetId=acleditor";
var _8e4="<a href=\"#\" onclick=\"javascript:popwindow('"+_8e3+"')\">Select...</a> <input type=\"hidden\"  id=\"sel_user\" value=\"\" onchange=\"javascript:return;\"> <div id=\"display_sel_user\" style=\"visibility:hidden\"></div>";
_8e2.innerHTML=_8e4;
var _8e5=document.createElement("input");
_8e5.id="sel_role";
_8de.appendChild(_8e2);
_8e1.appendChild(_8e5);
return _8db;
},refresh_display:function(){
var _8e6=document.getElementById("editor_table");
var _8e7=_8e6.parentNode;
_8e7.removeChild(_8e6);
_8e7.appendChild(this.build_editor());
},onClick:function(e){
this.onDeleteSelect(e.currentTarget.id.substring(4));
e.currentTarget.style.borderColor="gray";
},onDeleteSelect:function(_8e9){
}});
dojo.provide("dojo.widget.ColorPalette");
dojo.widget.defineWidget("dojo.widget.ColorPalette",dojo.widget.HtmlWidget,{palette:"7x10",_palettes:{"7x10":[["fff","fcc","fc9","ff9","ffc","9f9","9ff","cff","ccf","fcf"],["ccc","f66","f96","ff6","ff3","6f9","3ff","6ff","99f","f9f"],["c0c0c0","f00","f90","fc6","ff0","3f3","6cc","3cf","66c","c6c"],["999","c00","f60","fc3","fc0","3c0","0cc","36f","63f","c3c"],["666","900","c60","c93","990","090","399","33f","60c","939"],["333","600","930","963","660","060","366","009","339","636"],["000","300","630","633","330","030","033","006","309","303"]],"3x4":[["ffffff","00ff00","008000","0000ff"],["c0c0c0","ffff00","ff00ff","000080"],["808080","ff0000","800080","000000"]]},buildRendering:function(){
this.domNode=document.createElement("table");
dojo.html.disableSelection(this.domNode);
dojo.event.connect(this.domNode,"onmousedown",function(e){
e.preventDefault();
});
with(this.domNode){
cellPadding="0";
cellSpacing="1";
border="1";
style.backgroundColor="white";
}
var _8eb=this._palettes[this.palette];
for(var i=0;i<_8eb.length;i++){
var tr=this.domNode.insertRow(-1);
for(var j=0;j<_8eb[i].length;j++){
if(_8eb[i][j].length==3){
_8eb[i][j]=_8eb[i][j].replace(/(.)(.)(.)/,"$1$1$2$2$3$3");
}
var td=tr.insertCell(-1);
with(td.style){
backgroundColor="#"+_8eb[i][j];
border="1px solid gray";
width=height="15px";
fontSize="1px";
}
td.color="#"+_8eb[i][j];
td.onmouseover=function(e){
this.style.borderColor="white";
};
td.onmouseout=function(e){
this.style.borderColor="gray";
};
dojo.event.connect(td,"onmousedown",this,"onClick");
td.innerHTML="&nbsp;";
}
}
},onClick:function(e){
this.onColorSelect(e.currentTarget.color);
e.currentTarget.style.borderColor="gray";
},onColorSelect:function(_8f3){
}});
dojo.provide("js.widget.Acl");
dojo.widget.defineWidget("js.widget.Acl",dojo.widget.HtmlWidget,{widgetsInTemplate:true,templatePath:dojo.uri.dojoUri("../js/widget/templates/Acl.html"),postCreate:function(args,frag,_8f6){
this.editor.domNode.style.position="absolute";
this.editor.hide();
this.setValue(this.value);
this.set_display_fields(this.value);
dojo.event.connect(this.domNode,"onmouseout",this,"onmouseout");
dojo.event.connect(this.domNode,"onmouseover",this,"onmouseover");
dojo.event.connect(this.domNode,"onclick",this,"onclick");
dojo.event.connect(document,"onmouseup",this,"onmouseup");
dojo.event.connect(this.editor,"onDeleteSelect",this,"onDeleteSelect");
dojo.event.connect(this.editor.sel_user,"onchange",this,"onAddUser");
dojo.event.connect(this.editor.roles_picker,"onchange",this,"onAddRole");
},mouseover_flag:false,expanded:false,value:"",display_container:"",editor:"",display_table:"",display_row:"",display_string:"",form_field:"",set_display_fields:function(acl){
dojo.debug("set_display_fields with "+acl);
if(!acl||acl==""||acl=="::"||acl==null){
this.display_string.innerHTML="public";
return;
}
var _8f8=acl.split(":");
var _8f9="";
for(var i=0;i<_8f8.length;i++){
if(_8f8[i]==""){
continue;
}
var _8fb=_8f8[i].split(",");
if(_8fb[0].substring(0,1)=="r"){
_8f9+="<b>"+_8fb[1]+"</b>"+",";
}else{
_8f9+=_8fb[1]+",";
}
}
_8f9=_8f9.substring(0,_8f9.length-1);
if(_8f9.length>25){
_8f9=_8f9.substring(0,25)+"...";
}
this.display_string.innerHTML=_8f9;
},canonical_acl:function(acl){
var cacl;
if(!acl||acl==""||acl=="::"||acl==null){
return "";
}
var _8fe=acl.split(":");
for(var i=0;i<_8fe.length;i++){
if(_8fe[i]==""){
continue;
}
var _900=_8fe[i].split(",");
if(cacl){
cacl+=_900[0]+":";
}else{
cacl=":"+_900[0]+":";
}
}
return cacl;
},setValue:function(acl){
if(acl==null){
acl="";
}
this.value=acl;
this.form_field.value=this.canonical_acl(acl);
this.editor.value=acl;
this.editor.refresh_display();
},delete_from_acl:function(id){
dojo.debug("delete_from_acl with id as "+id);
var _903=this.value.split(":");
var _904="";
for(var i=0;i<_903.length;i++){
if(_903[i]==""){
continue;
}
var _906=_903[i].split(",");
if(_906[0]==id){
continue;
}else{
_904+=_906[0]+","+_906[1]+":";
}
}
if(_904!=""){
_904=":"+_904;
}
return _904;
},add_to_acl:function(_907){
dojo.debug("add_user_to_acl with token as "+_907);
var _908=this.value.split(":");
var _909="";
var done=false;
for(var i=0;i<_908.length;i++){
if(_908[i]==_907){
done=true;
}
}
if(!done){
_909=this.value+":"+_907+":";
}else{
_909=this.value;
}
return _909;
},onDeleteSelect:function(_90c){
dojo.debug("made it to acl.js with deleted id as "+_90c);
var _90d=this.delete_from_acl(_90c);
this.set_display_fields(_90d);
this.setValue(_90d);
},onAddUser:function(){
dojo.debug("handling onAddUser");
var _90e=this.editor.display_sel_user.innerHTML;
var _90f=this.editor.sel_user.value;
var _910="u"+_90f+","+_90e;
var _911=this.add_to_acl(_910);
this.set_display_fields(_911);
this.setValue(_911);
},onAddRole:function(name,_913){
dojo.debug("onAddRole with added role as "+name+","+_913);
var _914="r"+_913+","+name;
var _915=this.add_to_acl(_914);
this.set_display_fields(_915);
this.setValue(_915);
},expand:function(){
this.editor.show();
this.expanded=true;
this.user_typed_something=false;
},collapse:function(){
this.editor.hide();
this.expanded=false;
},onmouseout:function(e){
this.mouseover_flag=false;
},onmouseover:function(e){
this.mouseover_flag=true;
},onmouseup:function(e){
if(!this.mouseover_flag&&this.expanded){
this.collapse();
}
},onclick:function(e){
if(!this.expanded){
this.expand();
}
},q_initialize:function(v){
this.setValue(v);
}});
dojo.provide("dojo.widget.Checkbox");
dojo.widget.defineWidget("dojo.widget.Checkbox",dojo.widget.HtmlWidget,{templatePath:dojo.uri.moduleUri("dojo.widget","templates/Checkbox.html"),templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/Checkbox.css"),name:"",id:"",checked:false,tabIndex:"",value:"on",postMixInProperties:function(){
dojo.widget.Checkbox.superclass.postMixInProperties.apply(this,arguments);
if(!this.disabled&&this.tabIndex==""){
this.tabIndex="0";
}
},fillInTemplate:function(){
this._setInfo();
},postCreate:function(){
var _91b=true;
this.id=this.id!=""?this.id:this.widgetId;
if(this.id!=""){
var _91c=document.getElementsByTagName("label");
if(_91c!=null&&_91c.length>0){
for(var i=0;i<_91c.length;i++){
if(_91c[i].htmlFor==this.id){
_91c[i].id=(_91c[i].htmlFor+"label");
this._connectEvents(_91c[i]);
dojo.widget.wai.setAttr(this.domNode,"waiState","labelledby",_91c[i].id);
break;
}
}
}
}
this._connectEvents(this.domNode);
this.inputNode.checked=this.checked;
},_connectEvents:function(node){
dojo.event.connect(node,"onmouseover",this,"mouseOver");
dojo.event.connect(node,"onmouseout",this,"mouseOut");
dojo.event.connect(node,"onkey",this,"onKey");
dojo.event.connect(node,"onclick",this,"_onClick");
dojo.html.disableSelection(node);
},_onClick:function(e){
if(this.disabled==false){
this.checked=!this.checked;
this._setInfo();
}
e.preventDefault();
e.stopPropagation();
this.onClick();
},setValue:function(bool){
if(this.disabled==false){
this.checked=bool;
this._setInfo();
}
},onClick:function(){
},onKey:function(e){
var k=dojo.event.browser.keys;
if(e.key==" "){
this._onClick(e);
}
},mouseOver:function(e){
this._hover(e,true);
},mouseOut:function(e){
this._hover(e,false);
},_hover:function(e,_926){
if(this.disabled==false){
var _927=this.checked?"On":"Off";
var _928="dojoHtmlCheckbox"+_927+"Hover";
if(_926){
dojo.html.addClass(this.imageNode,_928);
}else{
dojo.html.removeClass(this.imageNode,_928);
}
}
},_setInfo:function(){
var _929="dojoHtmlCheckbox"+(this.disabled?"Disabled":"")+(this.checked?"On":"Off");
dojo.html.setClass(this.imageNode,"dojoHtmlCheckbox "+_929);
this.inputNode.checked=this.checked;
if(this.disabled){
this.inputNode.setAttribute("disabled",true);
}else{
this.inputNode.removeAttribute("disabled");
}
dojo.widget.wai.setAttr(this.domNode,"waiState","checked",this.checked);
}});
dojo.widget.defineWidget("dojo.widget.a11y.Checkbox",dojo.widget.Checkbox,{templatePath:dojo.uri.moduleUri("dojo.widget","templates/CheckboxA11y.html"),fillInTemplate:function(){
},postCreate:function(args,frag){
this.inputNode.checked=this.checked;
if(this.disabled){
this.inputNode.setAttribute("disabled",true);
}
},_onClick:function(){
this.onClick();
}});
dojo.provide("dojo.i18n.common");
dojo.i18n.getLocalization=function(_92c,_92d,_92e){
dojo.hostenv.preloadLocalizations();
_92e=dojo.hostenv.normalizeLocale(_92e);
var _92f=_92e.split("-");
var _930=[_92c,"nls",_92d].join(".");
var _931=dojo.hostenv.findModule(_930,true);
var _932;
for(var i=_92f.length;i>0;i--){
var loc=_92f.slice(0,i).join("_");
if(_931[loc]){
_932=_931[loc];
break;
}
}
if(!_932){
_932=_931.ROOT;
}
if(_932){
var _935=function(){
};
_935.prototype=_932;
return new _935();
}
dojo.raise("Bundle not found: "+_92d+" in "+_92c+" , locale="+_92e);
};
dojo.i18n.isLTR=function(_936){
var lang=dojo.hostenv.normalizeLocale(_936).split("-")[0];
var RTL={ar:true,fa:true,he:true,ur:true,yi:true};
return !RTL[lang];
};
dojo.provide("js.widget.Boolean");
dojo.widget.defineWidget("js.widget.Boolean",dojo.widget.Checkbox,{postCreate:function(){
js.widget.Boolean.superclass.postCreate.call(this);
if(this.disabled==false&&this.extraArgs.direct_update){
dojo.event.connect(this,"onClick",this,"update_json");
}
},update_json:function(bool){
var id=this.extraArgs.row_id;
var _93b=this.extraArgs.fieldname;
var _93c=this.extraArgs.fieldpath;
var _93d=this.extraArgs.direct_objpath;
var _93e;
if(this.checked){
_93e="on";
}else{
_93e="";
}
var url="?objpath="+_93d+"&action=update_json&"+_93b+"="+_93e+"&"+_93c+".id="+id;
dojo.debug("Boolean control going to bind to url "+url);
var _940=dojo.widget.manager.getWidgetById("qm_msgbox");
_940.domNode.innerHTML="<div class='msgBox'> updating...</div>";
_940.open(this.domNode,this.domNode.parentNode,this.domNode,this.domNode);
dojo.debug("opened msbox, can you see it ?"+_940.domNode.innerHTML);
var _941=this;
dojo.io.bind({method:"get",mimetype:"text/json",url:url,handler:function(type,data,evt){
if(data&&data.status==1){
_940.domNode.innerHTML="<div class='msgBox'> updated</div>";
dojo.lang.setTimeout(_940,"close",1000);
}else{
_941.setValue(!_941.checked);
_940.domNode.innerHTML="<div class='msgBox'> update failed</div>";
dojo.lang.setTimeout(_940.close,1000);
}
}});
}});
dojo.provide("js.widget.Colorpalette");
dojo.widget.defineWidget("js.widget.Colorpalette",dojo.widget.HtmlWidget,{palette:"7x10",_palettes:{"7x10":[["fff","fcc","fc9","ff9","ffc","9f9","9ff","cff","ccf","fcf"],["ccc","f66","f96","ff6","ff3","6f9","3ff","6ff","99f","f9f"],["c0c0c0","f00","f90","fc6","ff0","3f3","6cc","3cf","66c","c6c"],["999","c00","f60","fc3","fc0","3c0","0cc","36f","63f","c3c"],["666","900","c60","c93","990","090","399","33f","60c","939"],["333","600","930","963","660","060","366","009","339","636"],["000","300","630","633","330","030","033","006","309","303"],["","","","","","","","","",""]],"3x4":[["ffffff","00ff00","008000","0000ff"],["c0c0c0","ffff00","ff00ff","000080"],["808080","ff0000","800080","000000"]]},buildRendering:function(){
this.domNode=document.createElement("table");
dojo.html.disableSelection(this.domNode);
dojo.event.connect(this.domNode,"onmousedown",function(e){
e.preventDefault();
});
with(this.domNode){
cellPadding="0";
cellSpacing="1";
border="1";
style.backgroundColor="white";
}
var _946=this._palettes[this.palette];
for(var i=0;i<_946.length;i++){
var tr=this.domNode.insertRow(-1);
for(var j=0;j<_946[i].length;j++){
if(_946[i][j].length==3){
_946[i][j]=_946[i][j].replace(/(.)(.)(.)/,"$1$1$2$2$3$3");
}
var td=tr.insertCell(-1);
with(td.style){
backgroundColor="#"+_946[i][j];
border="1px solid gray";
width=height="15px";
fontSize="1px";
}
td.color="#"+_946[i][j];
td.onmouseover=function(e){
this.style.borderColor="white";
};
td.onmouseout=function(e){
this.style.borderColor="gray";
};
dojo.event.connect(td,"onmouseover",this,"onmouseover");
dojo.event.connect(td,"onmousedown",this,"onClick");
td.innerHTML="&nbsp;";
}
}
},onClick:function(e){
this.onColorSelect(e.currentTarget.color);
e.currentTarget.style.borderColor="gray";
},onmouseover:function(e){
this.onColorHover(e.currentTarget.color);
},onColorSelect:function(_94f){
},onColorHover:function(_950){
}});
dojo.provide("js.widget.Colorpicker");
dojo.widget.defineWidget("js.widget.Colorpicker",dojo.widget.HtmlWidget,{widgetsInTemplate:true,templatePath:dojo.uri.dojoUri("../js/widget/templates/Colorpicker.html"),postCreate:function(args,frag,_953){
this.picker.domNode.style.position="absolute";
this.picker.hide();
this.set_display_fields(this.form_field.value);
dojo.event.connect(this.domNode,"onmouseout",this,"onmouseout");
dojo.event.connect(this.domNode,"onmouseover",this,"onmouseover");
dojo.event.connect(this.domNode,"onclick",this,"onclick");
dojo.event.connect(document,"onmouseup",this,"onmouseup");
dojo.event.connect(this.picker,"onColorSelect",this,"onColorSelect");
dojo.event.connect(this.picker,"onColorHover",this,"onColorHover");
dojo.event.connect(this.display_colorstring,"onkeypress",this,"onUserTypedSomething");
},mouseover_flag:false,expanded:false,user_typed_something:"false",value:"",display_container:"",picker:"",display_table:"",display_row:"",display_colorchip:"",display_colorstring:"",form_field:"",set_display_fields:function(_954){
var _955=_954;
var _956=_954;
if(_954==""||_954=="#"){
_956="blue";
_955="transparent";
}
this.display_colorchip.setAttribute("bgcolor",_956);
this.display_colorstring.value=_955;
},onColorSelect:function(_957){
this.set_display_fields(_957);
this.form_field.value=_957;
this.collapse();
},onUserTypedSomething:function(e){
this.user_typed_something=true;
},onColorHover:function(_959){
this.set_display_fields(_959);
},expand:function(){
this.picker.show();
this.expanded=true;
this.user_typed_something=false;
},collapse:function(){
if(this.user_typed_something){
this.form_field.value=this.display_colorstring.value;
}
this.set_display_fields(this.form_field.value);
this.picker.hide();
this.expanded=false;
},onmouseout:function(e){
this.mouseover_flag=false;
},onmouseover:function(e){
this.mouseover_flag=true;
},onmouseup:function(e){
if(!this.mouseover_flag&&this.expanded){
this.collapse();
}
},onclick:function(e){
if(!this.expanded){
this.expand();
}
}});
dojo.provide("dojo.json");
dojo.json={jsonRegistry:new dojo.AdapterRegistry(),register:function(name,_95f,wrap,_961){
dojo.json.jsonRegistry.register(name,_95f,wrap,_961);
},evalJson:function(json){
try{
return eval("("+json+")");
}
catch(e){
dojo.debug(e);
return json;
}
},serialize:function(o){
var _964=typeof (o);
if(_964=="undefined"){
return "undefined";
}else{
if((_964=="number")||(_964=="boolean")){
return o+"";
}else{
if(o===null){
return "null";
}
}
}
if(_964=="string"){
return dojo.string.escapeString(o);
}
var me=arguments.callee;
var _966;
if(typeof (o.__json__)=="function"){
_966=o.__json__();
if(o!==_966){
return me(_966);
}
}
if(typeof (o.json)=="function"){
_966=o.json();
if(o!==_966){
return me(_966);
}
}
if(_964!="function"&&typeof (o.length)=="number"){
var res=[];
for(var i=0;i<o.length;i++){
var val=me(o[i]);
if(typeof (val)!="string"){
val="undefined";
}
res.push(val);
}
return "["+res.join(",")+"]";
}
try{
window.o=o;
_966=dojo.json.jsonRegistry.match(o);
return me(_966);
}
catch(e){
}
if(_964=="function"){
return null;
}
res=[];
for(var k in o){
var _96b;
if(typeof (k)=="number"){
_96b="\""+k+"\"";
}else{
if(typeof (k)=="string"){
_96b=dojo.string.escapeString(k);
}else{
continue;
}
}
val=me(o[k]);
if(typeof (val)!="string"){
continue;
}
res.push(_96b+":"+val);
}
return "{"+res.join(",")+"}";
}};
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,_96e){
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,_972){
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();
}
}},_972));
},_cacheSetting:function(_978,_979){
for(var x in this.bindArgs){
if(dojo.lang.isUndefined(_978[x])){
_978[x]=this.bindArgs[x];
}
}
if(dojo.lang.isUndefined(_978.useCache)){
_978.useCache=_979;
}
if(dojo.lang.isUndefined(_978.preventCache)){
_978.preventCache=!_979;
}
if(dojo.lang.isUndefined(_978.mimetype)){
_978.mimetype="text/html";
}
return _978;
},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(_97e){
var st=this[_97e];
var err="";
var _981=this.scriptScope||window;
for(var i=0;i<st.length;i++){
try{
st[i].call(_981);
}
catch(e){
err+="\n"+st[i]+" failed: "+e.description;
}
}
this[_97e]=[];
if(err.length){
var name=(_97e=="_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(_988,obj,func){
if(typeof func=="undefined"){
_988.push(obj);
}else{
_988.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,_992,_993){
if(!_992){
_992="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[_992](e);
if(e.returnValue){
switch(_993){
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 _996=[],_997=[],tmp=[];
var _999=[],_99a=[],attr=[],_99c=[];
var str="",path="",fix="",_9a0="",tag="",_9a2="";
if(!url){
url="./";
}
if(s){
var _9a3=/<title[^>]*>([\s\S]*?)<\/title>/i;
while(_999=_9a3.exec(s)){
_996.push(_999[1]);
s=s.substring(0,_999.index)+s.substr(_999.index+_999[0].length);
}
if(this.adjustPaths){
var _9a4=/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i;
var _9a5=/\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@]+?)\2/i;
var _9a6=/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/;
while(tag=_9a4.exec(s)){
str+=s.substring(0,tag.index);
s=s.substring((tag.index+tag[0].length),s.length);
tag=tag[0];
_9a0="";
while(attr=_9a5.exec(tag)){
path="";
_9a2=attr[3];
switch(attr[1].toLowerCase()){
case "src":
case "href":
if(_9a6.exec(_9a2)){
path=_9a2;
}else{
path=(new dojo.uri.Uri(url,_9a2).toString());
}
break;
case "style":
path=dojo.html.fixPathsInCssText(_9a2,url);
break;
default:
path=_9a2;
}
fix=" "+attr[1]+"="+attr[2]+path+attr[2];
_9a0+=tag.substring(0,attr.index)+fix;
tag=tag.substring((attr.index+attr[0].length),tag.length);
}
str+=_9a0+tag;
}
s=str+s;
}
_9a3=/(?:<(style)[^>]*>([\s\S]*?)<\/style>|<link ([^>]*rel=['"]?stylesheet['"]?[^>]*)>)/i;
while(_999=_9a3.exec(s)){
if(_999[1]&&_999[1].toLowerCase()=="style"){
_99c.push(dojo.html.fixPathsInCssText(_999[2],url));
}else{
if(attr=_999[3].match(/href=(['"]?)([^'">]*)\1/i)){
_99c.push({path:attr[2]});
}
}
s=s.substring(0,_999.index)+s.substr(_999.index+_999[0].length);
}
var _9a3=/<script([^>]*)>([\s\S]*?)<\/script>/i;
var _9a7=/src=(['"]?)([^"']*)\1/i;
var _9a8=/.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/;
var _9a9=/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g;
var _9aa=/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix|registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/;
while(_999=_9a3.exec(s)){
if(this.executeScripts&&_999[1]){
if(attr=_9a7.exec(_999[1])){
if(_9a8.exec(attr[2])){
dojo.debug("Security note! inhibit:"+attr[2]+" from  being loaded again.");
}else{
_997.push({path:attr[2]});
}
}
}
if(_999[2]){
var sc=_999[2].replace(_9a9,"");
if(!sc){
continue;
}
while(tmp=_9aa.exec(sc)){
_99a.push(tmp[0]);
sc=sc.substring(0,tmp.index)+sc.substr(tmp.index+tmp[0].length);
}
if(this.executeScripts){
_997.push(sc);
}
}
s=s.substr(0,_999.index)+s.substr(_999.index+_999[0].length);
}
if(this.extractContent){
_999=s.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_999){
s=_999[1];
}
}
if(this.executeScripts&&this.scriptSeparation){
var _9a3=/(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/;
var _9ac=/([\s'";:\(])scriptScope(.*)/;
str="";
while(tag=_9a3.exec(s)){
tmp=((tag[3]=="'")?"\"":"'");
fix="";
str+=s.substring(0,tag.index)+tag[1];
while(attr=_9ac.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":_99c,"titles":_996,"requires":_99a,"scripts":_997,"url":url};
},_setContent:function(cont){
this.destroyChildren();
for(var i=0;i<this._styleNodes.length;i++){
if(this._styleNodes[i]&&this._styleNodes[i].parentNode){
this._styleNodes[i].parentNode.removeChild(this._styleNodes[i]);
}
}
this._styleNodes=[];
try{
var node=this.containerNode||this.domNode;
while(node.firstChild){
dojo.html.destroyNode(node.firstChild);
}
if(typeof cont!="string"){
node.appendChild(cont);
}else{
node.innerHTML=cont;
}
}
catch(e){
e.text="Couldn't load content:"+e.description;
this._handleDefaults(e,"onContentError");
}
},setContent:function(data){
this.abort();
if(this._callOnUnload){
this.onUnload();
}
this._callOnUnload=true;
if(!data||dojo.html.isNode(data)){
this._setContent(data);
this.onResized();
this.onLoad();
}else{
if(typeof data.xml!="string"){
this.href="";
data=this.splitAndFixPaths(data);
}
this._setContent(data.xml);
for(var i=0;i<data.styles.length;i++){
if(data.styles[i].path){
this._styleNodes.push(dojo.html.insertCssFile(data.styles[i].path,dojo.doc(),false,true));
}else{
this._styleNodes.push(dojo.html.insertCssText(data.styles[i]));
}
}
if(this.parseContent){
for(var i=0;i<data.requires.length;i++){
try{
eval(data.requires[i]);
}
catch(e){
e.text="ContentPane: error in package loading calls, "+(e.description||e);
this._handleDefaults(e,"onContentError","debug");
}
}
}
var _9b2=this;
function asyncParse(){
if(_9b2.executeScripts){
_9b2._executeScripts(data.scripts);
}
if(_9b2.parseContent){
var node=_9b2.containerNode||_9b2.domNode;
var _9b4=new dojo.xml.Parse();
var frag=_9b4.parseElement(node,null,true);
dojo.widget.getParser().createSubComponents(frag,_9b2);
}
_9b2.onResized();
_9b2.onLoad();
}
if(dojo.hostenv.isXDomain&&data.requires.length){
dojo.addOnLoad(asyncParse);
}else{
asyncParse();
}
}
},setHandler:function(_9b6){
var fcn=dojo.lang.isFunction(_9b6)?_9b6:window[_9b6];
if(!dojo.lang.isFunction(fcn)){
this._handleDefaults("Unable to set handler, '"+_9b6+"' 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(_9b9){
var self=this;
var tmp="",code="";
for(var i=0;i<_9b9.length;i++){
if(_9b9[i].path){
dojo.io.bind(this._cacheSetting({"url":_9b9[i].path,"load":function(type,_9bf){
dojo.lang.hitch(self,tmp=";"+_9bf);
},"error":function(type,_9c1){
_9c1.text=type+" downloading remote script";
self._handleDefaults.call(self,_9c1,"onExecError","debug");
},"mimetype":"text/plain","sync":true},this.cacheContent));
code+=tmp;
}else{
code+=_9b9[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("js.widget.Layout");
dojo.widget.defineWidget("js.widget.Layout",dojo.widget.ContentPane,{isContainer:true,templatePath:null,templateCssPath:null,name:"",placeholder:null,contained_widget_type:"",contained_widget_tablepath:"",contained_widget_params:"",display_name:"",collection_type:"",page_id:"",rowset_size:0,selected_once:false,selected:false,hovering:false,last_in_layout:null,postCreate:function(args,frag,_9c7){
if(this.rowset_size==0){
var div=document.createElement("div");
div.innerHTML="<font color=\"silver\"> Placeholder, right click to add object in layout "+this.display_name+"</font>";
this.domNode.appendChild(div);
this.placeholder=div;
}
dojo.event.connect(this.domNode,"onclick",this,"_select");
dojo.event.connect(this.domNode,"onmouseout",this,"onmouseout");
dojo.event.connect(this.domNode,"onmouseover",this,"onmouseover");
dojo.event.connect(document.forms[0],"onmouseup",this,"onmouseup");
dojo.event.topic.subscribe("deselect_all",this,layout_unselect);
dojo.event.topic.subscribe("add_layout",this,layout_add);
dojo.event.topic.subscribe("delete_layout",this,layout_delete);
dojo.event.topic.subscribe("moveback_layout",this,layout_moveback);
dojo.event.topic.subscribe("movefwd_layout",this,layout_movefwd);
function layout_unselect(args){
if(!this.selected){
return;
}
this._deselect(args);
}
function layout_add(args){
dojo.debug("here with selected "+this.selected+" and hovering "+this.hovering);
if(!this.selected&&!this.hovering){
return;
}
this.add_to_layout(args);
}
function layout_delete(args){
if(!this.selected){
return;
}
this.delete_from_layout(args);
}
function layout_moveback(args){
if(!this.selected){
return;
}
this.moveback_in_layout(args);
}
function layout_movefwd(args){
if(!this.selected){
return;
}
this.movefwd_in_layout(args);
}
},onmouseout:function(e){
this.hovering=false;
window.parent.dojo.event.topic.publish("now_not_hovering_layout",this);
},onmouseover:function(e){
this.hovering=true;
window.parent.dojo.event.topic.publish("now_hovering_layout",this);
},onmouseup:function(e){
if(!this.hovering&&this.selected){
this._deselect();
}
},hide_placeholder:function(){
if(this.placeholder){
this.placeholder.style.display="none";
}
},add_to_layout:function(args){
dojo.debug("adding a new widget to layout  "+this.widgetId);
dojo.debug(this.contained_widget_params);
var _9d2=dojo.json.evalJson(this.contained_widget_params);
if(this.contained_widget_type=="js:Objecteditor"){
var _9d3={};
_9d3.widgetId="qm_dialog_"+Math.floor(Math.random()*10001);
_9d3.title="Add an object";
if(this.collection_type=="dynamic"){
_9d3.iframesrc="?objpath="+this.contained_widget_tablepath+"/forms/edit&mode=dialog";
}else{
_9d3.iframesrc="?objpath="+this.contained_widget_tablepath+"/forms/list&mode=dialog&task=select";
var _9d4=this;
dojo.event.topic.subscribe("selection_update",function(row){
var _9d6=window.parent.dojo.widget.manager.getWidgetById("qm_queue");
var re=new RegExp("/","g");
var _9d8=_9d4.contained_widget_tablepath.replace(re,".");
var _9d9=_9d4.display_name;
var _9da=_9d4.page_id;
var data={"objpath":"domain/public/tables/collection_data/forms/list","action":"add","public.collection_data.target_id":row.Id,"public.collection_data.tablepath":_9d8,"public.collection_data.collection_name":_9d9,"public.collection_data.page_id":_9da};
dojo.io.bind({method:"post",url:_9d6.post_url,sync:true,content:data,load:function(type,data,evt){
dojo.widget.manager.getWidgetById(_9d3.widgetId).closeWindow();
window.location.reload();
},error:function(){
alert("error in transaction");
}});
});
}
dojo.debug("here3");
var size={};
size.top="100px";
size.left="250px";
size.width="500px";
size.height="400px";
var div=document.createElement("div");
div.style.position="absolute";
document.body.appendChild(div);
for(var s in size){
div.style[s]=size[s];
}
div.style["overflow"]="auto";
div.style.zIndex="1001";
dojo.debug("here4");
var w=dojo.widget.createWidget("js:Qmdialog",_9d3,div);
w.resizeTo(w.domNode.style.height,w.domNode.style.width);
dojo.debug("here5");
dojo.event.connect(w,"closeWindow",function(){
window.location.reload();
});
return null;
}
var _9e3="local_"+Math.floor(Math.random()*10001);
var _9e4={};
for(var x in _9d2.txn_add){
_9e4[x]=_9d2.txn_add[x];
}
_9e4.local_id=_9e3;
window.parent.dojo.event.topic.publish("new_txn",_9e4);
_9d2.txn_update.objpath=_9e3;
_9d2.txn_delete.objpath=_9e3;
var bb=dojo.html.getBorderBox(this.domNode);
var w=dojo.widget.createWidget(this.contained_widget_type,{widgetId:_9e3,design_widget_params:dojo.json.serialize(_9d2),width:bb.width,layout_container:this});
this.last_in_layout=w;
this.children[this.children.length]=w;
w.parent=this;
this.hide_placeholder();
return w;
},delete_from_layout:function(w){
if(this.contained_widget_type=="js:Objecteditor"){
var _9e8=dojo.json.evalJson(w.design_widget_params);
dojo.io.bind({method:"get",url:_9e8.txn_delete.url,sync:true,content:{},load:function(type,data,evt){
window.location.reload();
},error:function(){
alert("error on delete");
}});
return null;
}
return w;
},delete_last_in_layout:function(){
this.delete_from_layout(this.last_in_layout);
},moveback_in_layout:function(w){
if(this.collection_type!="static"){
return;
}
if(this.contained_widget_type=="js:Objecteditor"){
var _9ed=dojo.json.evalJson(w.design_widget_params);
var url;
if(this.collection_type=="dynamic"){
url="?objpath=domain/"+_9ed.schema+"/tables/"+_9ed.table+"/forms/edit&action=swap_sort_order&id1="+_9ed.key+"&id2="+_9ed.previous_key;
}else{
url="?objpath=domain/public/tables/collection_data/forms/edit&action=move_sort_order_up&id="+_9ed.key;
}
dojo.io.bind({method:"get",url:url,sync:true,content:{},load:function(type,data,evt){
window.location.reload();
},error:function(){
alert("error on move");
}});
return null;
}
return w;
},movefwd_in_layout:function(w){
if(this.collection_type!="static"){
return;
}
if(this.contained_widget_type=="js:Objecteditor"){
var _9f3=dojo.json.evalJson(w.design_widget_params);
var url;
if(this.collection_type=="dynamic"){
url="?objpath=domain/"+_9f3.schema+"/tables/"+_9f3.table+"/forms/edit&action=swap_sort_order&id1="+_9f3.key+"&id2="+_9f3.next_key;
}else{
url="?objpath=domain/public/tables/collection_data/forms/edit&action=move_sort_order_down&id="+_9f3.key;
}
alert(url);
dojo.io.bind({method:"get",url:url,sync:true,content:{},load:function(type,data,evt){
window.location.reload();
},error:function(){
alert("error on move");
}});
return null;
}
return w;
},swap_sort_order:function(w1,w2){
var _9fa;
var _9fb;
var _9fc;
var _9fd;
var _9fe=dojo.json.evalJson(w1.design_widget_params);
var _9ff=dojo.json.evalJson(w2.design_widget_params);
re=new RegExp("sort_order");
for(var x in _9fe.txn_update){
dojo.debug(x);
if(x.match(re)){
_9fa=x;
_9fc=_9fe.txn_update[x];
}
}
for(var x in _9ff.txn_update){
if(x.match(re)){
_9fb=x;
_9fd=_9ff.txn_update[x];
}
}
_9fe.txn_update[_9fa]=_9fd;
_9ff.txn_update[_9fb]=_9fc;
w1.design_widget_params=dojo.json.serialize(_9fe);
w2.design_widget_params=dojo.json.serialize(_9ff);
},_select:function(e){
if(this.selected){
return;
}
this.domNode.setAttribute("style","border: 1px dotted black;");
this.selected=true;
this.selected_once=true;
this.onSelected(e);
},_deselect:function(e){
this.domNode.setAttribute("style","border: hidden;");
this.selected=false;
this.onDeselected(e);
},onSelected:function(e){
},onDeselected:function(e){
}});
dojo.provide("js.widget.Column_layout");
dojo.widget.defineWidget("js.widget.Column_layout",js.widget.Layout,{templatePath:null,templateCssPath:null,name:"",numcolumns:0,postCreate:function(args,frag,_a07){
js.widget.Column_layout.superclass.postCreate.call(this,args,frag,_a07);
this.numcolumns=dojo.json.evalJson(this.contained_widget_params).numcolumns;
},add_to_layout:function(args){
var w=js.widget.Column_layout.superclass.add_to_layout.call(this,args);
if(!w){
return;
}
},delete_from_layout:function(w){
var x=js.widget.Column_layout.superclass.delete_from_layout.call(this,w);
if(!x){
return;
}
},moveback_in_layout:function(w){
var x=js.widget.Column_layout.superclass.moveback_in_layout.call(this,w);
if(!x){
return;
}
},movefwd_in_layout:function(w){
var x=js.widget.Column_layout.superclass.movefwd_in_layout.call(this,w);
if(!x){
return;
}
}});
dojo.provide("dojo.date.common");
dojo.date.setDayOfYear=function(_a10,_a11){
_a10.setMonth(0);
_a10.setDate(_a11);
return _a10;
};
dojo.date.getDayOfYear=function(_a12){
var _a13=_a12.getFullYear();
var _a14=new Date(_a13-1,11,31);
return Math.floor((_a12.getTime()-_a14.getTime())/86400000);
};
dojo.date.setWeekOfYear=function(_a15,week,_a17){
if(arguments.length==1){
_a17=0;
}
dojo.unimplemented("dojo.date.setWeekOfYear");
};
dojo.date.getWeekOfYear=function(_a18,_a19){
if(arguments.length==1){
_a19=0;
}
var _a1a=new Date(_a18.getFullYear(),0,1);
var day=_a1a.getDay();
_a1a.setDate(_a1a.getDate()-day+_a19-(day>_a19?7:0));
return Math.floor((_a18.getTime()-_a1a.getTime())/604800000);
};
dojo.date.setIsoWeekOfYear=function(_a1c,week,_a1e){
if(arguments.length==1){
_a1e=1;
}
dojo.unimplemented("dojo.date.setIsoWeekOfYear");
};
dojo.date.getIsoWeekOfYear=function(_a1f,_a20){
if(arguments.length==1){
_a20=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(_a21){
var _a22=_a21.getMonth();
var days=[31,28,31,30,31,30,31,31,30,31,30,31];
if(_a22==1&&dojo.date.isLeapYear(_a21)){
return 29;
}else{
return days[_a22];
}
};
dojo.date.isLeapYear=function(_a24){
var year=_a24.getFullYear();
return (year%400==0)?true:(year%100==0)?false:(year%4==0)?true:false;
};
dojo.date.getTimezoneName=function(_a26){
var str=_a26.toString();
var tz="";
var _a29;
var pos=str.indexOf("(");
if(pos>-1){
pos++;
tz=str.substring(pos,str.indexOf(")"));
}else{
var pat=/([A-Z\/]+) \d{4}$/;
if((_a29=str.match(pat))){
tz=_a29[1];
}else{
str=_a26.toLocaleString();
pat=/ ([A-Z\/]+)$/;
if((_a29=str.match(pat))){
tz=_a29[1];
}
}
}
return tz=="AM"||tz=="PM"?"":tz;
};
dojo.date.getOrdinal=function(_a2c){
var date=_a2c.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(_a2e,_a2f,_a30){
var dA=_a2e;
var dB=_a2f||new Date();
var now=new Date();
with(dojo.date.compareTypes){
var opt=_a30||(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,_a38,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(_a38){
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 _a3c=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;
_a3c=(incr>0)?((incr-5)/5):((incr+5)/5);
}else{
days=mod;
_a3c=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*_a3c)+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,_a44){
if(typeof dtA=="number"){
dtA=new Date(dtA);
}
if(typeof dtB=="number"){
dtB=new Date(dtB);
}
var _a45=dtB.getFullYear()-dtA.getFullYear();
var _a46=(dtB.getMonth()-dtA.getMonth())+(_a45*12);
var _a47=dtB.getTime()-dtA.getTime();
var _a48=_a47/1000;
var _a49=_a48/60;
var _a4a=_a49/60;
var _a4b=_a4a/24;
var _a4c=_a4b/7;
var _a4d=0;
with(dojo.date.dateParts){
switch(_a44){
case YEAR:
_a4d=_a45;
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+=(_a45*4);
_a4d=qB-qA;
break;
case MONTH:
_a4d=_a46;
break;
case WEEK:
_a4d=parseInt(_a4c);
break;
case DAY:
_a4d=_a4b;
break;
case WEEKDAY:
var days=Math.round(_a4b);
var _a53=parseInt(days/7);
var mod=days%7;
if(mod==0){
days=_a53*5;
}else{
var adj=0;
var aDay=dtA.getDay();
var bDay=dtB.getDay();
_a53=parseInt(days/7);
mod=days%7;
var _a58=new Date(dtA);
_a58.setDate(_a58.getDate()+(_a53*7));
var _a59=_a58.getDay();
if(_a4b>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 (_a59+mod)>5:
adj=-2;
break;
default:
break;
}
}else{
if(_a4b<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 (_a59+mod)<0:
adj=2;
break;
default:
break;
}
}
}
days+=adj;
days-=(_a53*2);
}
_a4d=days;
break;
case HOUR:
_a4d=_a4a;
break;
case MINUTE:
_a4d=_a49;
break;
case SECOND:
_a4d=_a48;
break;
case MILLISECOND:
_a4d=_a47;
break;
default:
break;
}
}
return Math.round(_a4d);
};
dojo.provide("dojo.date.supplemental");
dojo.date.getFirstDayOfWeek=function(_a5a){
var _a5b={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};
_a5a=dojo.hostenv.normalizeLocale(_a5a);
var _a5c=_a5a.split("-")[1];
var dow=_a5b[_a5c];
return (typeof dow=="undefined")?1:dow;
};
dojo.date.getWeekend=function(_a5e){
var _a5f={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 _a60={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};
_a5e=dojo.hostenv.normalizeLocale(_a5e);
var _a61=_a5e.split("-")[1];
var _a62=_a5f[_a61];
var end=_a60[_a61];
if(typeof _a62=="undefined"){
_a62=6;
}
if(typeof end=="undefined"){
end=0;
}
return {start:_a62,end:end};
};
dojo.date.isWeekend=function(_a64,_a65){
var _a66=dojo.date.getWeekend(_a65);
var day=(_a64||new Date()).getDay();
if(_a66.end<_a66.start){
_a66.end+=7;
if(day<_a66.start){
day+=7;
}
}
return day>=_a66.start&&day<=_a66.end;
};
dojo.provide("dojo.date.format");
(function(){
dojo.date.format=function(_a68,_a69){
if(typeof _a69=="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(_a68,_a69);
}
function formatPattern(_a6a,_a6b){
return _a6b.replace(/([a-z])\1*/ig,function(_a6c){
var s;
var c=_a6c.charAt(0);
var l=_a6c.length;
var pad;
var _a71=["abbr","wide","narrow"];
switch(c){
case "G":
if(l>3){
dojo.unimplemented("Era format not implemented");
}
s=info.eras[_a6a.getFullYear()<0?1:0];
break;
case "y":
s=_a6a.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((_a6a.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=_a6a.getMonth();
var _a74;
switch(l){
case 1:
case 2:
s=m+1;
pad=true;
break;
case 3:
case 4:
case 5:
_a74=_a71[l-3];
break;
}
if(_a74){
var type=(c=="L")?"standalone":"format";
var prop=["months",type,_a74].join("-");
s=info[prop][m];
}
break;
case "w":
var _a77=0;
s=dojo.date.getWeekOfYear(_a6a,_a77);
pad=true;
break;
case "d":
s=_a6a.getDate();
pad=true;
break;
case "D":
s=dojo.date.getDayOfYear(_a6a);
pad=true;
break;
case "E":
case "e":
case "c":
var d=_a6a.getDay();
var _a74;
switch(l){
case 1:
case 2:
if(c=="e"){
var _a79=dojo.date.getFirstDayOfWeek(_a69.locale);
d=(d-_a79+7)%7;
}
if(c!="c"){
s=d+1;
pad=true;
break;
}
case 3:
case 4:
case 5:
_a74=_a71[l-3];
break;
}
if(_a74){
var type=(c=="c")?"standalone":"format";
var prop=["days",type,_a74].join("-");
s=info[prop][d];
}
break;
case "a":
var _a7a=(_a6a.getHours()<12)?"am":"pm";
s=info[_a7a];
break;
case "h":
case "H":
case "K":
case "k":
var h=_a6a.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=_a6a.getMinutes();
pad=true;
break;
case "s":
s=_a6a.getSeconds();
pad=true;
break;
case "S":
s=Math.round(_a6a.getMilliseconds()*Math.pow(10,l-3));
break;
case "v":
case "z":
s=dojo.date.getTimezoneName(_a6a);
if(s){
break;
}
l=4;
case "Z":
var _a7c=_a6a.getTimezoneOffset();
var tz=[(_a7c<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_a7c)/60),2),dojo.string.pad(Math.abs(_a7c)%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(_a6c+" modifier not yet implemented");
s="?";
break;
default:
dojo.raise("dojo.date.format: invalid pattern char: "+_a6b);
}
if(pad){
s=dojo.string.pad(s,l);
}
return s;
});
}
_a69=_a69||{};
var _a7e=dojo.hostenv.normalizeLocale(_a69.locale);
var _a7f=_a69.formatLength||"full";
var info=dojo.date._getGregorianBundle(_a7e);
var str=[];
var _a81=dojo.lang.curry(this,formatPattern,_a68);
if(_a69.selector!="timeOnly"){
var _a82=_a69.datePattern||info["dateFormat-"+_a7f];
if(_a82){
str.push(_processPattern(_a82,_a81));
}
}
if(_a69.selector!="dateOnly"){
var _a83=_a69.timePattern||info["timeFormat-"+_a7f];
if(_a83){
str.push(_processPattern(_a83,_a81));
}
}
var _a84=str.join(" ");
return _a84;
};
dojo.date.parse=function(_a85,_a86){
_a86=_a86||{};
var _a87=dojo.hostenv.normalizeLocale(_a86.locale);
var info=dojo.date._getGregorianBundle(_a87);
var _a89=_a86.formatLength||"full";
if(!_a86.selector){
_a86.selector="dateOnly";
}
var _a8a=_a86.datePattern||info["dateFormat-"+_a89];
var _a8b=_a86.timePattern||info["timeFormat-"+_a89];
var _a8c;
if(_a86.selector=="dateOnly"){
_a8c=_a8a;
}else{
if(_a86.selector=="timeOnly"){
_a8c=_a8b;
}else{
if(_a86.selector=="dateTime"){
_a8c=_a8a+" "+_a8b;
}else{
var msg="dojo.date.parse: Unknown selector param passed: '"+_a86.selector+"'.";
msg+=" Defaulting to date pattern.";
dojo.debug(msg);
_a8c=_a8a;
}
}
}
var _a8e=[];
var _a8f=_processPattern(_a8c,dojo.lang.curry(this,_buildDateTimeRE,_a8e,info,_a86));
var _a90=new RegExp("^"+_a8f+"$");
var _a91=_a90.exec(_a85);
if(!_a91){
return null;
}
var _a92=["abbr","wide","narrow"];
var _a93=new Date(1972,0);
var _a94={};
for(var i=1;i<_a91.length;i++){
var grp=_a8e[i-1];
var l=grp.length;
var v=_a91[i];
switch(grp.charAt(0)){
case "y":
if(l!=2){
_a93.setFullYear(v);
_a94.year=v;
}else{
if(v<100){
v=Number(v);
var year=""+new Date().getFullYear();
var _a9a=year.substring(0,2)*100;
var _a9b=Number(year.substring(2,4));
var _a9c=Math.min(_a9b+20,99);
var num=(v<_a9c)?_a9a+v:_a9a-100+v;
_a93.setFullYear(num);
_a94.year=num;
}else{
if(_a86.strict){
return null;
}
_a93.setFullYear(v);
_a94.year=v;
}
}
break;
case "M":
if(l>2){
if(!_a86.strict){
v=v.replace(/\./g,"");
v=v.toLowerCase();
}
var _a9e=info["months-format-"+_a92[l-3]].concat();
for(var j=0;j<_a9e.length;j++){
if(!_a86.strict){
_a9e[j]=_a9e[j].toLowerCase();
}
if(v==_a9e[j]){
_a93.setMonth(j);
_a94.month=j;
break;
}
}
if(j==_a9e.length){
dojo.debug("dojo.date.parse: Could not parse month name: '"+v+"'.");
return null;
}
}else{
_a93.setMonth(v-1);
_a94.month=v-1;
}
break;
case "E":
case "e":
if(!_a86.strict){
v=v.toLowerCase();
}
var days=info["days-format-"+_a92[l-3]].concat();
for(var j=0;j<days.length;j++){
if(!_a86.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":
_a93.setDate(v);
_a94.date=v;
break;
case "a":
var am=_a86.am||info.am;
var pm=_a86.pm||info.pm;
if(!_a86.strict){
v=v.replace(/\./g,"").toLowerCase();
am=am.replace(/\./g,"").toLowerCase();
pm=pm.replace(/\./g,"").toLowerCase();
}
if(_a86.strict&&v!=am&&v!=pm){
dojo.debug("dojo.date.parse: Could not parse am/pm part.");
return null;
}
var _aa3=_a93.getHours();
if(v==pm&&_aa3<12){
_a93.setHours(_aa3+12);
}else{
if(v==am&&_aa3==12){
_a93.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;
}
_a93.setHours(v);
break;
case "m":
_a93.setMinutes(v);
break;
case "s":
_a93.setSeconds(v);
break;
case "S":
_a93.setMilliseconds(v);
break;
default:
dojo.unimplemented("dojo.date.parse: unsupported pattern char="+grp.charAt(0));
}
}
if(_a94.year&&_a93.getFullYear()!=_a94.year){
dojo.debug("Parsed year: '"+_a93.getFullYear()+"' did not match input year: '"+_a94.year+"'.");
return null;
}
if(_a94.month&&_a93.getMonth()!=_a94.month){
dojo.debug("Parsed month: '"+_a93.getMonth()+"' did not match input month: '"+_a94.month+"'.");
return null;
}
if(_a94.date&&_a93.getDate()!=_a94.date){
dojo.debug("Parsed day of month: '"+_a93.getDate()+"' did not match input day of month: '"+_a94.date+"'.");
return null;
}
return _a93;
};
function _processPattern(_aa4,_aa5,_aa6,_aa7){
var _aa8=function(x){
return x;
};
_aa5=_aa5||_aa8;
_aa6=_aa6||_aa8;
_aa7=_aa7||_aa8;
var _aaa=_aa4.match(/(''|[^'])+/g);
var _aab=false;
for(var i=0;i<_aaa.length;i++){
if(!_aaa[i]){
_aaa[i]="";
}else{
_aaa[i]=(_aab?_aa6:_aa5)(_aaa[i]);
_aab=!_aab;
}
}
return _aa7(_aaa.join(""));
}
function _buildDateTimeRE(_aad,info,_aaf,_ab0){
return _ab0.replace(/([a-z])\1*/ig,function(_ab1){
var s;
var c=_ab1.charAt(0);
var l=_ab1.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=_aaf.am||info.am||"AM";
var pm=_aaf.pm||info.pm||"PM";
if(_aaf.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="+_ab0);
}
if(_aad){
_aad.push(_ab1);
}
return "\\s*("+s+")\\s*";
});
}
})();
dojo.date.strftime=function(_ab7,_ab8,_ab9){
var _aba=null;
function _(s,n){
return dojo.string.pad(s,n||2,_aba||"0");
}
var info=dojo.date._getGregorianBundle(_ab9);
function $(_abe){
switch(_abe){
case "a":
return dojo.date.getDayShortName(_ab7,_ab9);
case "A":
return dojo.date.getDayName(_ab7,_ab9);
case "b":
case "h":
return dojo.date.getMonthShortName(_ab7,_ab9);
case "B":
return dojo.date.getMonthName(_ab7,_ab9);
case "c":
return dojo.date.format(_ab7,{locale:_ab9});
case "C":
return _(Math.floor(_ab7.getFullYear()/100));
case "d":
return _(_ab7.getDate());
case "D":
return $("m")+"/"+$("d")+"/"+$("y");
case "e":
if(_aba==null){
_aba=" ";
}
return _(_ab7.getDate());
case "f":
if(_aba==null){
_aba=" ";
}
return _(_ab7.getMonth()+1);
case "g":
break;
case "G":
dojo.unimplemented("unimplemented modifier 'G'");
break;
case "F":
return $("Y")+"-"+$("m")+"-"+$("d");
case "H":
return _(_ab7.getHours());
case "I":
return _(_ab7.getHours()%12||12);
case "j":
return _(dojo.date.getDayOfYear(_ab7),3);
case "k":
if(_aba==null){
_aba=" ";
}
return _(_ab7.getHours());
case "l":
if(_aba==null){
_aba=" ";
}
return _(_ab7.getHours()%12||12);
case "m":
return _(_ab7.getMonth()+1);
case "M":
return _(_ab7.getMinutes());
case "n":
return "\n";
case "p":
return info[_ab7.getHours()<12?"am":"pm"];
case "r":
return $("I")+":"+$("M")+":"+$("S")+" "+$("p");
case "R":
return $("H")+":"+$("M");
case "S":
return _(_ab7.getSeconds());
case "t":
return "\t";
case "T":
return $("H")+":"+$("M")+":"+$("S");
case "u":
return String(_ab7.getDay()||7);
case "U":
return _(dojo.date.getWeekOfYear(_ab7));
case "V":
return _(dojo.date.getIsoWeekOfYear(_ab7));
case "W":
return _(dojo.date.getWeekOfYear(_ab7,1));
case "w":
return String(_ab7.getDay());
case "x":
return dojo.date.format(_ab7,{selector:"dateOnly",locale:_ab9});
case "X":
return dojo.date.format(_ab7,{selector:"timeOnly",locale:_ab9});
case "y":
return _(_ab7.getFullYear()%100);
case "Y":
return String(_ab7.getFullYear());
case "z":
var _abf=_ab7.getTimezoneOffset();
return (_abf>0?"-":"+")+_(Math.floor(Math.abs(_abf)/60))+":"+_(Math.abs(_abf)%60);
case "Z":
return dojo.date.getTimezoneName(_ab7);
case "%":
return "%";
}
}
var _ac0="";
var i=0;
var _ac2=0;
var _ac3=null;
while((_ac2=_ab8.indexOf("%",i))!=-1){
_ac0+=_ab8.substring(i,_ac2++);
switch(_ab8.charAt(_ac2++)){
case "_":
_aba=" ";
break;
case "-":
_aba="";
break;
case "0":
_aba="0";
break;
case "^":
_ac3="upper";
break;
case "*":
_ac3="lower";
break;
case "#":
_ac3="swap";
break;
default:
_aba=null;
_ac2--;
break;
}
var _ac4=$(_ab8.charAt(_ac2++));
switch(_ac3){
case "upper":
_ac4=_ac4.toUpperCase();
break;
case "lower":
_ac4=_ac4.toLowerCase();
break;
case "swap":
var _ac5=_ac4.toLowerCase();
var _ac6="";
var j=0;
var ch="";
while(j<_ac4.length){
ch=_ac4.charAt(j);
_ac6+=(ch==_ac5.charAt(j))?ch.toUpperCase():ch.toLowerCase();
j++;
}
_ac4=_ac6;
break;
default:
break;
}
_ac3=null;
_ac0+=_ac4;
i=_ac2;
}
_ac0+=_ab8.substring(i);
return _ac0;
};
(function(){
var _ac9=[];
dojo.date.addCustomFormats=function(_aca,_acb){
_ac9.push({pkg:_aca,name:_acb});
};
dojo.date._getGregorianBundle=function(_acc){
var _acd={};
dojo.lang.forEach(_ac9,function(desc){
var _acf=dojo.i18n.getLocalization(desc.pkg,desc.name,_acc);
_acd=dojo.lang.mixin(_acd,_acf);
},this);
return _acd;
};
})();
dojo.date.addCustomFormats("dojo.i18n.calendar","gregorian");
dojo.date.addCustomFormats("dojo.i18n.calendar","gregorianExtras");
dojo.date.getNames=function(item,type,use,_ad3){
var _ad4;
var _ad5=dojo.date._getGregorianBundle(_ad3);
var _ad6=[item,use,type];
if(use=="standAlone"){
_ad4=_ad5[_ad6.join("-")];
}
_ad6[1]="format";
return (_ad4||_ad5[_ad6.join("-")]).concat();
};
dojo.date.getDayName=function(_ad7,_ad8){
return dojo.date.getNames("days","wide","format",_ad8)[_ad7.getDay()];
};
dojo.date.getDayShortName=function(_ad9,_ada){
return dojo.date.getNames("days","abbr","format",_ada)[_ad9.getDay()];
};
dojo.date.getMonthName=function(_adb,_adc){
return dojo.date.getNames("months","wide","format",_adc)[_adb.getMonth()];
};
dojo.date.getMonthShortName=function(_add,_ade){
return dojo.date.getNames("months","abbr","format",_ade)[_add.getMonth()];
};
dojo.date.toRelativeString=function(_adf){
var now=new Date();
var diff=(now-_adf)/1000;
var end=" ago";
var _ae3=false;
if(diff<0){
_ae3=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 _ae3?"Tomorrow":"Yesterday";
}else{
return diff+" days"+end;
}
}
return dojo.date.format(_adf);
};
dojo.date.toSql=function(_ae4,_ae5){
return dojo.date.strftime(_ae4,"%F"+!_ae5?" %T":"");
};
dojo.date.fromSql=function(_ae6){
var _ae7=_ae6.split(/[\- :]/g);
while(_ae7.length<6){
_ae7.push(0);
}
return new Date(_ae7[0],(parseInt(_ae7[1],10)-1),_ae7[2],_ae7[3],_ae7[4],_ae7[5]);
};
dojo.provide("dojo.date.serialize");
dojo.date.setIso8601=function(_ae8,_ae9){
var _aea=(_ae9.indexOf("T")==-1)?_ae9.split(" "):_ae9.split("T");
_ae8=dojo.date.setIso8601Date(_ae8,_aea[0]);
if(_aea.length==2){
_ae8=dojo.date.setIso8601Time(_ae8,_aea[1]);
}
return _ae8;
};
dojo.date.fromIso8601=function(_aeb){
return dojo.date.setIso8601(new Date(0,0),_aeb);
};
dojo.date.setIso8601Date=function(_aec,_aed){
var _aee="^([0-9]{4})((-?([0-9]{2})(-?([0-9]{2}))?)|"+"(-?([0-9]{3}))|(-?W([0-9]{2})(-?([1-7]))?))?$";
var d=_aed.match(new RegExp(_aee));
if(!d){
dojo.debug("invalid date string: "+_aed);
return null;
}
var year=d[1];
var _af1=d[4];
var date=d[6];
var _af3=d[8];
var week=d[10];
var _af5=d[12]?d[12]:1;
_aec.setFullYear(year);
if(_af3){
_aec.setMonth(0);
_aec.setDate(Number(_af3));
}else{
if(week){
_aec.setMonth(0);
_aec.setDate(1);
var gd=_aec.getDay();
var day=gd?gd:7;
var _af8=Number(_af5)+(7*Number(week));
if(day<=4){
_aec.setDate(_af8+1-day);
}else{
_aec.setDate(_af8+8-day);
}
}else{
if(_af1){
_aec.setDate(1);
_aec.setMonth(_af1-1);
}
if(date){
_aec.setDate(date);
}
}
}
return _aec;
};
dojo.date.fromIso8601Date=function(_af9){
return dojo.date.setIso8601Date(new Date(0,0),_af9);
};
dojo.date.setIso8601Time=function(_afa,_afb){
var _afc="Z|(([-+])([0-9]{2})(:?([0-9]{2}))?)$";
var d=_afb.match(new RegExp(_afc));
var _afe=0;
if(d){
if(d[0]!="Z"){
_afe=(Number(d[3])*60)+Number(d[5]);
_afe*=((d[2]=="-")?1:-1);
}
_afe-=_afa.getTimezoneOffset();
_afb=_afb.substr(0,_afb.length-d[0].length);
}
var _aff="^([0-9]{2})(:?([0-9]{2})(:?([0-9]{2})(.([0-9]+))?)?)?$";
d=_afb.match(new RegExp(_aff));
if(!d){
dojo.debug("invalid time string: "+_afb);
return null;
}
var _b00=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;
_afa.setHours(_b00);
_afa.setMinutes(mins);
_afa.setSeconds(secs);
_afa.setMilliseconds(ms);
if(_afe!==0){
_afa.setTime(_afa.getTime()+_afe*60000);
}
return _afa;
};
dojo.date.fromIso8601Time=function(_b04){
return dojo.date.setIso8601Time(new Date(0,0),_b04);
};
dojo.date.toRfc3339=function(_b05,_b06){
if(!_b05){
_b05=new Date();
}
var _=dojo.string.pad;
var _b08=[];
if(_b06!="timeOnly"){
var date=[_(_b05.getFullYear(),4),_(_b05.getMonth()+1,2),_(_b05.getDate(),2)].join("-");
_b08.push(date);
}
if(_b06!="dateOnly"){
var time=[_(_b05.getHours(),2),_(_b05.getMinutes(),2),_(_b05.getSeconds(),2)].join(":");
var _b0b=_b05.getTimezoneOffset();
time+=(_b0b>0?"-":"+")+_(Math.floor(Math.abs(_b0b)/60),2)+":"+_(Math.abs(_b0b)%60,2);
_b08.push(time);
}
return _b08.join("T");
};
dojo.date.fromRfc3339=function(_b0c){
if(_b0c.indexOf("Tany")!=-1){
_b0c=_b0c.replace("Tany","");
}
var _b0d=new Date();
return dojo.date.setIso8601(_b0d,_b0c);
};
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:"",staticDisplay:false,dayWidth:"narrow",classNames:{previous:"previousMonth",disabledPrevious:"previousMonthDisabled",current:"currentMonth",disabledCurrent:"currentMonthDisabled",next:"nextMonth",disabledNext:"nextMonthDisabled",currentDate:"currentDate",selectedDate:"selectedDate"},templatePath:dojo.uri.moduleUri("dojo.widget","templates/DatePicker.html"),templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/DatePicker.css"),postMixInProperties:function(){
dojo.widget.DatePicker.superclass.postMixInProperties.apply(this,arguments);
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 _b10=this.getFragNodeRef(frag);
dojo.html.copyStyle(this.domNode,_b10);
this.weekTemplate=dojo.dom.removeNode(this.calendarWeekTemplate);
this._preInitUI(this.value?this.value:this.today,false,true);
var _b11=dojo.lang.unnest(dojo.date.getNames("days",this.dayWidth,"standAlone",this.lang));
if(this.weekStartsOn>0){
for(var i=0;i<this.weekStartsOn;i++){
_b11.push(_b11.shift());
}
}
var _b13=this.dayLabelsRow.getElementsByTagName("td");
for(i=0;i<7;i++){
_b13.item(i).innerHTML=_b11[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(_b14){
this.setDate(_b14);
},setDate:function(_b15){
if(_b15==""){
this.value="";
this._preInitUI(this.curMonth,false,true);
}else{
if(typeof _b15=="string"){
this.value=dojo.date.fromRfc3339(_b15);
this.value.setHours(0,0,0,0);
}else{
this.value=new Date(_b15);
this.value.setHours(0,0,0,0);
}
}
if(this.selectedNode!=null){
dojo.html.removeClass(this.selectedNode,this.classNames.selectedDate);
}
if(this.clickedNode!=null){
dojo.debug("adding selectedDate");
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(_b16,_b17,_b18){
if(typeof (this.startDate)=="string"){
this.startDate=dojo.date.fromRfc3339(this.startDate);
}
if(typeof (this.endDate)=="string"){
this.endDate=dojo.date.fromRfc3339(this.endDate);
}
this.startDate.setHours(0,0,0,0);
this.endDate.setHours(24,0,0,-1);
if(_b16<this.startDate||_b16>this.endDate){
_b16=new Date((_b16<this.startDate)?this.startDate:this.endDate);
}
this.firstDay=this._initFirstDay(_b16,_b17);
this.selectedIsUsed=false;
this.currentIsUsed=false;
var _b19=new Date(this.firstDay);
var _b1a=_b19.getMonth();
this.curMonth=new Date(_b19);
this.curMonth.setDate(_b19.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(_b19,this.endDate,dojo.date.dateParts.DAY)>days){
this._preInitUI(this.startDate,true,false);
_b19=new Date(this.firstDay);
}
this.curMonth=new Date(_b19);
this.curMonth.setDate(_b19.getDate()+6);
this.curMonth.setDate(1);
var _b1c=(_b19.getMonth()==this.curMonth.getMonth())?"current":"previous";
}
if(_b18){
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 _b1f=new Date(this.firstDay);
this._setMonthLabel(this.curMonth.getMonth());
this._setYearLabels(this.curMonth.getFullYear());
var _b20=this.calendarDatesContainerNode.getElementsByTagName("td");
var _b21=this.calendarDatesContainerNode.getElementsByTagName("tr");
var _b22;
for(i=0;i<days;i++){
_b22=_b20.item(i);
_b22.innerHTML=_b1f.getDate();
_b22.setAttribute("djDateValue",_b1f.valueOf());
var _b23=(_b1f.getMonth()!=this.curMonth.getMonth()&&Number(_b1f)<Number(this.curMonth))?"previous":(_b1f.getMonth()==this.curMonth.getMonth())?"current":"next";
var _b24=_b23;
if(this._isDisabledDate(_b1f)){
var _b25={previous:"disabledPrevious",current:"disabledCurrent",next:"disabledNext"};
_b24=_b25[_b23];
}
dojo.html.setClass(_b22,this._getDateClassName(_b1f,_b24));
if(dojo.html.hasClass(_b22,this.classNames.selectedDate)){
this.selectedNode=_b22;
}
_b1f=dojo.date.add(_b1f,dojo.date.dateParts.DAY,1);
}
this.lastDay=dojo.date.add(_b1f,dojo.date.dateParts.DAY,-1);
this._initControls();
},_initControls:function(){
var d=this.firstDay;
var d2=this.lastDay;
var _b28,_b29,_b2a,_b2b,_b2c,_b2d;
_b28=_b29=_b2a=_b2b=_b2c=_b2d=!this.staticDisplay;
with(dojo.date.dateParts){
var add=dojo.date.add;
if(_b28&&add(d,DAY,(-1*(this._getAdjustedDay(d)+1)))<this.startDate){
_b28=_b2a=_b2c=false;
}
if(_b29&&d2>this.endDate){
_b29=_b2b=_b2d=false;
}
if(_b2a&&add(d,DAY,-1)<this.startDate){
_b2a=_b2c=false;
}
if(_b2b&&add(d2,DAY,1)>this.endDate){
_b2b=_b2d=false;
}
if(_b2c&&add(d2,YEAR,-1)<this.startDate){
_b2c=false;
}
if(_b2d&&add(d,YEAR,1)>this.endDate){
_b2d=false;
}
}
function enableControl(node,_b30){
dojo.html.setVisibility(node,_b30?"":"hidden");
}
enableControl(this.decreaseWeekNode,_b28);
enableControl(this.increaseWeekNode,_b29);
enableControl(this.decreaseMonthNode,_b2a);
enableControl(this.increaseMonthNode,_b2b);
enableControl(this.previousYearLabelNode,_b2c);
enableControl(this.nextYearLabelNode,_b2d);
},_incrementWeek:function(evt){
var d=new Date(this.firstDay);
switch(evt.target){
case this.increaseWeekNode.getElementsByTagName("img").item(0):
case this.increaseWeekNode:
var _b33=dojo.date.add(d,dojo.date.dateParts.WEEK,1);
if(_b33<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 _b36=new Date(this.firstDay);
switch(evt.currentTarget){
case this.increaseMonthNode.getElementsByTagName("img").item(0):
case this.increaseMonthNode:
_b36=dojo.date.add(_b36,dojo.date.dateParts.DAY,this.displayWeeks*7);
if(_b36<this.endDate){
d=dojo.date.add(d,dojo.date.dateParts.MONTH,1);
}else{
var _b37=true;
}
break;
case this.decreaseMonthNode.getElementsByTagName("img").item(0):
case this.decreaseMonthNode:
if(_b36>this.startDate){
d=dojo.date.add(d,dojo.date.dateParts.MONTH,-1);
}else{
var _b38=true;
}
break;
}
if(_b38){
d=new Date(this.startDate);
}else{
if(_b37){
d=new Date(this.endDate);
}
}
this._preInitUI(d,false,true);
},_incrementYear:function(evt){
var year=this.curMonth.getFullYear();
var _b3b=new Date(this.firstDay);
switch(evt.target){
case this.nextYearLabelNode:
_b3b=dojo.date.add(_b3b,dojo.date.dateParts.YEAR,1);
if(_b3b<this.endDate){
year++;
}else{
var _b3c=true;
}
break;
case this.previousYearLabelNode:
_b3b=dojo.date.add(_b3b,dojo.date.dateParts.YEAR,-1);
if(_b3b>this.startDate){
year--;
}else{
var _b3d=true;
}
break;
}
var d;
if(_b3d){
d=new Date(this.startDate);
}else{
if(_b3c){
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(_b42){
this.monthLabelNode.innerHTML=dojo.date.getNames("months","wide","standAlone",this.lang)[_b42];
},_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,_b48){
var _b49=this.classNames[_b48];
if((!this.selectedIsUsed&&this.value)&&(Number(date)==Number(this.value))){
_b49=this.classNames.selectedDate+" "+_b49;
this.selectedIsUsed=true;
}
if((!this.currentIsUsed)&&(Number(date)==Number(this.today))){
_b49=_b49+" "+this.classNames.currentDate;
this.currentIsUsed=true;
}
return _b49;
},onClick:function(evt){
dojo.event.browser.stopEvent(evt);
},_handleUiClick:function(evt){
var _b4c=evt.target;
if(_b4c.nodeType!=dojo.dom.ELEMENT_NODE){
_b4c=_b4c.parentNode;
}
dojo.event.browser.stopEvent(evt);
this.selectedIsUsed=this.todayIsUsed=false;
if(dojo.html.hasClass(_b4c,this.classNames["disabledPrevious"])||dojo.html.hasClass(_b4c,this.classNames["disabledCurrent"])||dojo.html.hasClass(_b4c,this.classNames["disabledNext"])){
return;
}
this.clickedNode=_b4c;
this.setDate(new Date(Number(dojo.html.getAttribute(_b4c,"djDateValue"))));
},onValueChanged:function(date){
},_isDisabledDate:function(_b4e){
if(_b4e<this.startDate||_b4e>this.endDate){
return true;
}
return this.isDisabledDate(_b4e,this.lang);
},isDisabledDate:function(_b4f,_b50){
return false;
},_initFirstDay:function(_b51,adj){
var d=new Date(_b51);
if(!adj){
d.setDate(1);
}
d.setDate(d.getDate()-this._getAdjustedDay(d,this.weekStartsOn));
d.setHours(0,0,0,0);
return d;
},_getAdjustedDay:function(_b54){
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[_b54.getDay()];
},destroy:function(){
dojo.widget.DatePicker.superclass.destroy.apply(this,arguments);
dojo.html.destroyNode(this.weekTemplate);
}});
dojo.provide("js.widget.Date");
dojo.widget.defineWidget("js.widget.Date",dojo.widget.HtmlWidget,{widgetsInTemplate:true,templatePath:dojo.uri.dojoUri("../js/widget/templates/Date.html"),postCreate:function(){
this.editbox.hide();
this.editbox.domNode.style.position="absolute";
var d=this.stringToDate(this.readbox.innerHTML,"YYYY-MM-DD");
this.editbox.setValue(d);
dojo.event.connect(this.readbox,"onclick",this,"onclick");
dojo.event.connect(this.editbox,"onValueChanged",this,"datepick");
},value:"",editbox_visible:false,edit_enabled:false,dirty:false,content:function(){
if(this.edit_enabled){
return this.editbox.getValue();
}else{
return this.readbox.innerHTML;
}
},editbox:null,readbox:null,stringToDate:function(_b58,_b59){
var year;
var _b5b;
var date;
if(_b59=="YYYY-MM-DD"){
year=parseInt(_b58.split("-")[0],10);
_b5b=parseInt(_b58.split("-")[1],10)-1;
date=parseInt(_b58.split("-")[2],10);
}
return new Date(year,_b5b,date);
},enable_edit:function(){
this.edit_enabled=true;
},enable_read:function(){
var _b5d=this.stringToDate(this.readbox.innerHTML,"YYYY-MM-DD");
var _b5e=this.editbox.getDate();
if(_b5d.getYear()!=_b5e.getYear()||_b5d.getMonth()!=_b5e.getMonth()||_b5d.getDay()!=_b5e.getDay()){
this.dirty=true;
this.readbox.innerHTML=this.editbox.getValue();
}
this.editbox.hide();
this.edit_enabled=false;
return this.dirty;
},datepick:function(){
var _b5f=this.stringToDate(this.readbox.innerHTML,"YYYY-MM-DD");
var _b60=this.editbox.getDate();
if(_b5f.getYear()!=_b60.getYear()||_b5f.getMonth()!=_b60.getMonth()||_b5f.getDay()!=_b60.getDay()){
this.dirty=true;
this.readbox.innerHTML=this.editbox.getValue();
}
this.editbox.hide();
this.editbox_visible=false;
},show_datepicker:function(){
this.editbox.show();
},hide_datepicker:function(){
this.editbox.hide();
},onclick:function(){
if(!this.editbox_visible&&this.edit_enabled){
this.editbox.show();
this.editbox_visible=true;
}else{
this.editbox.hide();
this.editbox_visible=false;
}
}});
dojo.kwCompoundRequire({common:["dojo.html.common","dojo.html.style"]});
dojo.provide("dojo.html.*");
dojo.provide("js.widget.Design_widget");
dojo.widget.defineWidget("js.widget.Design_widget",dojo.widget.HtmlWidget,function(){
this.history=[];
},{height:"",width:"",design_widget_type:"",design_widget_params:"",layout_container:null,value:"",hovering:false,selected:false,editing:false,postCreate:function(args,frag){
if(this.height){
this.editable.style.height=this.height;
}
if(this.width){
this.editable.style.width=this.width+"px";
}
dojo.event.connect(this.editable,"onmouseover",this,"onMouseOver");
dojo.event.connect(this.editable,"onmouseout",this,"onMouseOut");
dojo.event.connect(this.editable,"onclick",this,"onClick");
dojo.event.connect(document.forms[0],"onmouseup",this,"onMouseUp");
dojo.event.topic.subscribe("save_obj",this,obj_save);
dojo.event.topic.subscribe("deselect_all",this,obj_deselect);
dojo.event.topic.subscribe("deselect_obj",this,obj_deselect);
dojo.event.topic.subscribe("delete_obj",this,obj_delete);
dojo.event.topic.subscribe("moveback_obj",this,obj_moveback);
dojo.event.topic.subscribe("movefwd_obj",this,obj_movefwd);
dojo.event.topic.subscribe("edit_obj",this,obj_edit);
function obj_deselect(args){
if(!this.selected){
return;
}
this._onDeselected(args);
}
function obj_delete(args){
if(!this.selected){
return;
}
this.cancelEdit(args);
dojo.event.topic.publish("delete_layout",this);
}
function obj_moveback(args){
if(!this.selected){
return;
}
this.cancelEdit(args);
dojo.event.topic.publish("moveback_layout",this);
}
function obj_movefwd(args){
if(!this.selected){
return;
}
this.cancelEdit(args);
dojo.event.topic.publish("movefwd_layout",this);
}
function obj_save(args){
if(this.widgetId!=args.widgetId){
return;
}
this.saveObject();
}
function obj_edit(){
if(this.selected||this.hovering){
this.onBeginEdit();
}
}
},onMouseOver:function(e){
if(!this.editing){
}
this.hovering=true;
window.parent.dojo.event.topic.publish("now_hovering",this);
this._onHover(e);
},onMouseOut:function(e){
if(!this.editing){
}
this.hovering=false;
window.parent.dojo.event.topic.publish("now_not_hovering",this);
this._onUnhover(e);
},onMouseUp:function(e){
if(this.hovering){
return;
}
if(this.selected){
this._onDeselected(e);
}
},onClick:function(e){
this._onUnhover(e);
this._onSelected(e);
return true;
},_onHover:function(e){
var tx=window.parent.dojo.widget.manager.getWidgetById("qm_queue");
if(tx.hovering_disabled){
return;
}
this.onHover(e);
},_onUnhover:function(e){
var tx=window.parent.dojo.widget.manager.getWidgetById("qm_queue");
if(tx.hovering_disabled){
return;
}
this.onUnhover(e);
},_onSelected:function(e){
this.selected=true;
this.editable.setAttribute("style","border: 2px dashed black;");
this.onSelected(e);
},_onDeselected:function(e){
this.selected=false;
this.editable.setAttribute("style","border: hidden;");
this.onDeselected(e);
},onHover:function(e){
},onUnhover:function(e){
},onSelected:function(e){
},onDeselected:function(e){
},onBeginEdit:function(e){
if(this.editing||this.disabled){
return;
}
this.editing=true;
this._onSelected();
this.onMouseOut();
},saveObject:function(e){
var args=e;
if(!args){
args={};
}
var _b79=dojo.json.evalJson(this.design_widget_params);
var _b7a=_b79.txn_update;
var re=new RegExp("^local_");
var _b7c;
if(!_b7a.objpath.match(re)){
_b7c="local_"+Math.floor(Math.random()*10001);
args.local_id=_b7c;
}
for(var x in _b7a){
if(x!="colname"){
args[x]=_b7a[x];
}
}
this.onSave(args);
if(!_b7a.objpath.match(re)){
_b7a.objpath=_b7c;
var _b7e=dojo.json.serialize(_b79);
this.design_widget_params=_b7e;
}
},saveEdit:function(e){
this.saveObject(e);
this._finishEdit(e);
},cancelEdit:function(e){
this._finishEdit();
return true;
},_finishEdit:function(e){
this.editing=false;
this.onFinishEdit();
return true;
},onFinishEdit:function(){
},undo:function(){
},onChange:function(_b82,_b83){
},onSave:function(args){
window.parent.dojo.event.topic.publish("edit_txn",args);
},checkForValueChange:function(){
var ee=this[this.mode.toLowerCase()];
if((this.value!=ee.value)&&(dojo.string.trim(ee.value)!="")){
this.submitButton.disabled=false;
}
this.onChange(this.value,ee.value);
},disable:function(){
},enable:function(){
}});
dojo.provide("dojo.io.IframeIO");
dojo.io.createIFrame=function(_b86,_b87,uri){
if(window[_b86]){
return window[_b86];
}
if(window.frames[_b86]){
return window.frames[_b86];
}
var r=dojo.render.html;
var _b8a=null;
var turi=uri;
if(!turi){
if(djConfig["useXDomain"]&&!djConfig["dojoIframeHistoryUrl"]){
dojo.debug("dojo.io.createIFrame: When using cross-domain Dojo builds,"+" please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"+" to the path on your domain to iframe_history.html");
}
turi=(djConfig["dojoIframeHistoryUrl"]||dojo.uri.moduleUri("dojo","../iframe_history.html"))+"#noInit=true";
}
var _b8c=((r.ie)&&(dojo.render.os.win))?"<iframe name=\""+_b86+"\" src=\""+turi+"\" onload=\""+_b87+"\">":"iframe";
_b8a=document.createElement(_b8c);
with(_b8a){
name=_b86;
setAttribute("name",_b86);
id=_b86;
}
dojo.body().appendChild(_b8a);
window[_b86]=_b8a;
with(_b8a.style){
if(!r.safari){
position="absolute";
}
left=top="0px";
height=width="1px";
visibility="hidden";
}
if(!r.ie){
dojo.io.setIFrameSrc(_b8a,turi,true);
_b8a.onload=new Function(_b87);
}
return _b8a;
};
dojo.io.IframeTransport=new function(){
var _b8d=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 _b90=cr["content"]||{};
if(cr.sendTransport){
_b90["dojo.transport"]="iframe";
}
if(fn){
if(_b90){
for(var x in _b90){
if(!fn[x]){
var tn;
if(dojo.render.html.ie){
tn=document.createElement("<input type='hidden' name='"+x+"' value='"+_b90[x]+"'>");
fn.appendChild(tn);
}else{
tn=document.createElement("input");
fn.appendChild(tn);
tn.type="hidden";
tn.name=x;
tn.value=_b90[x];
}
cr._contentToClean.push(x);
}else{
fn[x].value=_b90[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 _b93=dojo.io.argsFromMap(this.currentRequest.content);
var _b94=cr.url+(cr.url.indexOf("?")>-1?"&":"?")+_b93;
dojo.io.setIFrameSrc(this.iframe,_b94,true);
}
}
catch(e){
this.iframeOnload(e);
}
};
this.canHandle=function(_b95){
return ((dojo.lang.inArray(["text/plain","text/html","text/javascript","text/json","application/json"],_b95["mimetype"]))&&(dojo.lang.inArray(["post","get"],_b95["method"].toLowerCase()))&&(!((_b95["sync"])&&(_b95["sync"]==true))));
};
this.bind=function(_b96){
if(!this["iframe"]){
this.setUpIframe();
}
this.requestQueue.push(_b96);
this.fireNextRequest();
return;
};
this.setUpIframe=function(){
this.iframe=dojo.io.createIFrame(this.iframeName,"dojo.io.IframeTransport.iframeOnload();");
};
this.iframeOnload=function(_b97){
if(!_b8d.currentRequest){
_b8d.fireNextRequest();
return;
}
var req=_b8d.currentRequest;
if(req.formNode){
var _b99=req._contentToClean;
for(var i=0;i<_b99.length;i++){
var key=_b99[i];
if(dojo.render.html.safari){
var _b9c=req.formNode;
for(var j=0;j<_b9c.childNodes.length;j++){
var _b9e=_b9c.childNodes[j];
if(_b9e.name==key){
var _b9f=_b9e.parentNode;
_b9f.removeChild(_b9e);
break;
}
}
}else{
var _ba0=req.formNode[key];
req.formNode.removeChild(_ba0);
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 _ba1=function(_ba2){
var doc=_ba2.contentDocument||((_ba2.contentWindow)&&(_ba2.contentWindow.document))||((_ba2.name)&&(document.frames[_ba2.name])&&(document.frames[_ba2.name].document))||null;
return doc;
};
var _ba4;
var _ba5=false;
if(_b97){
this._callError(req,"IframeTransport Request Error: "+_b97);
}else{
var ifd=_ba1(_b8d.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+")";
}
_ba4=dj_eval(js);
}else{
if(cmt=="text/html"){
_ba4=ifd;
}else{
_ba4=ifd.getElementsByTagName("textarea")[0].value;
}
}
_ba5=true;
}
catch(e){
this._callError(req,"IframeTransport Error: "+e);
}
}
try{
if(_ba5&&dojo.lang.isFunction(req["load"])){
req.load("load",_ba4,req);
}
}
catch(e){
throw e;
}
finally{
_b8d.currentRequest=null;
_b8d.fireNextRequest();
}
};
this._callError=function(req,_baa){
var _bab=new dojo.io.Error(_baa);
if(dojo.lang.isFunction(req["error"])){
req.error("error",_bab,req);
}
};
dojo.io.transports.addTransport("IframeTransport");
};
dojo.provide("js.widget.Image_editor");
dojo.widget.defineWidget("js.widget.Image_editor",js.widget.Design_widget,function(){
},{templatePath:dojo.uri.dojoUri("../js/widget/templates/Image_editor.html"),templateCssPath:dojo.uri.dojoUri("../js/widget/templates/Image_editor.css"),name:"",imagePicker:null,postCreate:function(args,frag){
this.editable=this.getFragNodeRef(frag);
var re=/img/i;
if(!this.editable.innerHTML.match(re)){
dojo.debug("empty editable in Imageeditor");
this.editable=document.createElement("div");
this.editable.setAttribute("id","display_"+this.widgetId);
var img=document.createElement("img");
this.editable.appendChild(img);
img.setAttribute("src","themes/Default/images/placeholder.jpg");
js.widget.Image_editor.superclass.postCreate.call(this,args,frag);
dojo.html.insertAfter(this.editable,this.topcontainer);
this.layout_container.edit_widget=this;
var src="?objpath=domain/public/tables/images/forms/list&mode=dialog&task=select";
if(!this.layout_container||!this.layout_container.imagePicker||!this.layout_container.imagePicker.isShowing()||!(this.layout_container.imagePicker.iframesrc==src)){
this.showImagePicker(src);
var _bb1=this;
dojo.event.connect(this.imagePicker.closeAction,"onclick",function(){
_bb1.layout_container.imagePicker=null;
_bb1.layout_container.delete_last_in_layout();
});
}
dojo.event.topic.subscribe("selection_update",this,update_selection_and_add);
}else{
js.widget.Image_editor.superclass.postCreate.call(this,args,frag);
dojo.html.insertAfter(this.editable,this.topcontainer);
dojo.event.topic.subscribe("selection_update",this,update_selection);
}
function update_selection(args){
if((args.widgetId&&args.widgetId==this.widgetId)||(!args.widgetId&&this.layout_container&&this.layout_container.last_in_layout.widgetId==this.widgetId)){
var re=new RegExp("src=\"([^\"]*)\"","i");
args.image.match(re);
var src=RegExp.$1;
this.update_editable(dojo.string.trim(src));
this.value=args.Id;
this.saveEdit();
}
}
function update_selection_and_add(args){
if((args.widgetId&&args.widgetId==this.widgetId)||(!args.widgetId&&this.layout_container&&this.layout_container.last_in_layout.widgetId==this.widgetId)){
var re=new RegExp("src=\"([^\"]*)\"","i");
args.image.match(re);
var src=RegExp.$1;
this.update_editable(dojo.string.trim(src));
this.value=args.Id;
this.saveEdit();
this.layout_container.domNode.onclick();
dojo.event.topic.publish("add_layout");
}
}
},onHover:function(){
if(!this.editing){
if(this.disabled){
dojo.html.addClass(this.editable,"editableImageDisabled");
}else{
dojo.html.addClass(this.editable,"editableImage");
}
}
},onUnhover:function(){
if(!this.editing){
dojo.html.removeClass(this.editable,"editableImage");
dojo.html.removeClass(this.editable,"editableImageDisabled");
}
},onSelected:function(){
},onDeselected:function(e){
if(this.editing){
if(e.preventDefault){
e.preventDefault();
}
if(e.stopPropagation){
e.stopPropagation();
}
this.saveEdit(e);
}
},onBeginEdit:function(e){
js.widget.Image_editor.superclass.onBeginEdit.call(this,e);
var src="?objpath=domain/public/tables/images/forms/list&mode=dialog&task=select&widgetId="+this.widgetId;
this.showImagePicker(src);
},saveEdit:function(e){
var _bbc=dojo.json.evalJson(this.design_widget_params);
var _bbd=_bbc.txn_update;
var args={};
args[_bbd.colname]=this.value;
dojo.debug("saveEdit, args: "+dojo.json.serialize(args));
js.widget.Image_editor.superclass.saveEdit.call(this,args);
},onFinishEdit:function(e){
return true;
},showImagePicker:function(_bc0){
var _bc1={};
_bc1.widgetId="ImagePicker";
_bc1.title="Image Picker";
_bc1.iframesrc=_bc0;
var size={};
size.top="100px";
size.left="250px";
size.width="500px";
size.height="400px";
var div=document.createElement("div");
div.style.position="absolute";
document.body.appendChild(div);
for(var s in size){
div.style[s]=size[s];
}
div.style["overflow"]="hidden";
div.style.zIndex="1001";
dojo.html.placeOnScreenAroundElement(div,this.domNode,100,dojo.html.boxSizing.BORDER_BOX,{"BL":"TL","TL":"BL"});
this.imagePicker=dojo.widget.createWidget("js:Qmdialog",_bc1,div);
this.imagePicker.resizeTo(this.imagePicker.domNode.style.height,this.imagePicker.domNode.style.width);
if(this.layout_container){
this.layout_container.imagePicker=this.imagePicker;
}
},update_editable:function(_bc5){
var node=document.getElementById("display_"+this.widgetId);
var _bc7=node.getElementsByTagName("img");
for(var i=0;i<_bc7.length;i++){
_bc7[i].src=_bc5;
}
}});
dojo.provide("js.widget.Objecteditor");
dojo.widget.defineWidget("js.widget.Objecteditor",js.widget.Design_widget,function(){
},{isContainer:true,templatePath:dojo.uri.dojoUri("../js/widget/templates/Objecteditor.html"),templateCssPath:dojo.uri.dojoUri("../js/widget/templates/Objecteditor.css"),name:"",minWidth:250,minHeight:250,postCreate:function(args,frag){
this.editable=this.getFragNodeRef(frag);
if(dojo.string.trim(this.editable.innerHTML)==""){
this.editable.innerHTML="Placeholder content, click to edit...";
}
js.widget.Objecteditor.superclass.postCreate.call(this,args,frag);
dojo.html.insertAfter(this.editable,this.topcontainer);
},onHover:function(){
if(!this.editing){
if(this.disabled){
dojo.html.addClass(this.editable,"editableRegionDisabled");
}else{
dojo.html.addClass(this.editable,"editableRegion");
}
}
},onUnhover:function(){
if(!this.editing){
dojo.html.removeClass(this.editable,"editableRegion");
dojo.html.removeClass(this.editable,"editableRegionDisabled");
}
},onSelected:function(e){
},onDeselected:function(e){
if(this.editing){
if(e.preventDefault){
e.preventDefault();
}
if(e.stopPropagation){
e.stopPropagation();
}
this.saveEdit(e);
}
},onBeginEdit:function(e){
js.widget.Objecteditor.superclass.onBeginEdit.call(this,e);
var _bce=dojo.json.evalJson(this.design_widget_params);
dojo.debug("here1.1");
var _bcf=_bce.txn_update;
dojo.debug("here2");
var _bd0={};
_bd0.widgetId="qm_dialog_"+Math.floor(Math.random()*10001);
_bd0.title="Edit object";
dojo.debug("Objecteditor.onBeginEdit");
dojo.debug(dojo.json.serialize(_bcf));
_bd0.iframesrc=_bcf.url;
dojo.debug("here3");
var size={};
size.top="100px";
size.left="250px";
size.width="500px";
size.height="400px";
var div=document.createElement("div");
div.style.position="absolute";
document.body.appendChild(div);
for(var s in size){
div.style[s]=size[s];
}
div.style["overflow"]="auto";
div.style.zIndex="1010";
dojo.debug("here4");
var w=dojo.widget.createWidget("js:Qmdialog",_bd0,div);
w.resizeTo(w.domNode.style.height,w.domNode.style.width);
dojo.debug("here5");
dojo.event.connect(w,"closeWindow",function(){
window.location.reload();
});
dojo.event.topic.subscribe("selection_update",function(row){
var w=window.parent.dojo.widget.manager.getWidgetById("qm_queue");
var data={"objpath":"domain/public/tables/collection_data/forms/list","action":"update","public.collection_data.id":_bcf.collection_data_id,"public.collection_data.target_id":row.Id};
dojo.io.bind({method:"post",url:w.post_url,sync:true,content:data,load:function(type,data,evt){
dojo.widget.manager.getWidgetById(_bd0.widgetId).closeWindow();
window.location.reload();
},error:function(){
alert("error in transaction");
}});
});
},saveEdit:function(e){
},onFinishEdit:function(e){
}});
dojo.provide("js.widget.Objectpicker");
dojo.widget.defineWidget("js.widget.Objectpicker",dojo.widget.HtmlWidget,{form_field:null,cdata:null,cvalue:null,constraint_fields:null,cforce_selection:null,cnull_option:null,cnull_option_display_name:null,cis_filter:null,templatePath:dojo.uri.dojoUri("../js/widget/templates/Objectpicker.html"),postCreate:function(args,frag,_bdf){
this.form_field.name=this.widgetId;
this.cforce_selection=parseInt(this.extraArgs.force_selection);
this.cnull_option=parseInt(this.extraArgs.null_option);
this.cnull_option_display_name=this.extraArgs.null_option_display_name;
this.cis_filter=parseInt(this.extraArgs.is_filter);
if(this.extraArgs.style_string){
this.form_field.style.cssText=this.extraArgs.style_string;
}
if(this.extraArgs.data){
this.cdata=dojo.json.evalJson(this.extraArgs.data);
}
this.cvalue=parseInt(this.extraArgs.value);
if(this.extraArgs.constraints){
this.constraint_fields=dojo.json.evalJson(this.extraArgs.constraints);
for(var i=0;i<this.constraint_fields.length;i++){
var c=this.constraint_fields[i];
dojo.event.connect(dojo.widget.manager.getWidgetById(c).form_field,"onchange",this,"recalc");
}
}
dojo.event.connect(this.form_field,"onchange",this,"do_onchange");
this.recalc();
if(this.value){
this.q_initialize(this.value);
}
var _be2=this;
document.addOnLoadFunction(function(){
if(_be2.is_unconstrained()){
_be2.form_field.setAttribute("disabled",true);
}
});
},do_onchange:function(evt){
this.cvalue=this.selectedValue();
this.onchange(this.selectedName(),this.selectedValue());
},onchange:function(name,_be5){
},selectedName:function(){
return this.form_field.options[this.form_field.selectedIndex].text;
},selectedValue:function(){
return this.form_field.options[this.form_field.selectedIndex].value;
},selectedRow:function(s){
for(var i=0;i<cdata.length;i++){
if(cdata[i][0]==s){
return cdata[i][1];
}
}
return null;
},check_constraints:function(row){
if(!this.constraint_fields){
return true;
}
for(var i=0;i<this.constraint_fields.length;i++){
var _bea=this.constraint_fields[i];
var _beb=dojo.widget.manager.getWidgetById(_bea).form_field;
var _bec=_beb.options[_beb.selectedIndex].value;
if(row[_bea]&&_bec>0&&row[_bea]!=_bec){
return false;
}
}
return true;
},is_unconstrained:function(){
var _bed=true;
if(!this.constraint_fields){
return false;
}
for(var i=0;i<this.constraint_fields.length;i++){
var _bef=this.constraint_fields[i];
var _bf0=dojo.widget.manager.getWidgetById(_bef).form_field;
var _bf1=parseInt(_bf0.options[_bf0.selectedIndex].value);
if(_bf1>0){
_bed=false;
break;
}
}
return _bed;
},recalc:function(){
if(this.is_unconstrained()){
this.form_field.options.length=0;
this.form_field.innerHTML="";
if(this.cis_filter>0){
opt=new Option("Select here","",false,false);
this.form_field.options[0]=opt;
}else{
opt=new Option(this.cnull_option_display_name,"",false,false);
this.form_field.options[0]=opt;
}
this.form_field.setAttribute("disabled",true);
this.form_field.onchange();
return;
}else{
this.form_field.removeAttribute("disabled");
}
if(!this.cdata){
this.form_field.onchange();
return;
}
this.form_field.options.length=0;
this.form_field.innerHTML="";
var _bf2=0;
var _bf3="";
if(this.cis_filter>0){
opt=new Option("Select here","",false,false);
this.form_field.options[_bf2++]=opt;
}else{
if(this.cforce_selection>0){
opt=new Option("Select here","-1",false,false);
}else{
opt=new Option("Select here","",false,false);
}
this.form_field.options[_bf2++]=opt;
}
var _bf4=null;
var _bf5=0;
for(var i=0;i<this.cdata.length;i++){
if(this.check_constraints(this.cdata[i][1])){
if(this.cvalue==this.cdata[i][1].id){
opt=new Option(this.cdata[i][0],this.cdata[i][1].id,true,true);
_bf4=_bf2;
}else{
opt=new Option(this.cdata[i][0],this.cdata[i][1].id,false,false);
}
_bf5++;
this.form_field.options[_bf2++]=opt;
}
}
if(_bf4){
this.form_field.selectedIndex=_bf4;
}
if(this.cnull_option>0&&this.cis_filter<=0){
opt=new Option(this.cnull_option_display_name,"",false,false);
this.form_field.options[_bf2++]=opt;
}
if(this.cnull_option>0&&this.cis_filter>0){
opt=new Option(this.cnull_option_display_name,"null",false,false);
this.form_field.options[_bf2++]=opt;
}
if(_bf5==0){
this.form_field.setAttribute("disabled",true);
}
this.form_field.onchange();
},valuename:function(v){
for(var i=0;i<this.cdata.length;i++){
if(this.cdata[i][1].id==v){
return cdata[i][0];
}
}
return "";
},q_initialize:function(v){
for(var i=0;i<this.form_field.options.length;i++){
if(this.form_field.options[i].value==v){
this.form_field.options[i].selected=true;
}else{
this.form_field.options[i].selected=false;
}
}
}});
dojo.provide("js.widget.Paragraph_layout");
dojo.widget.defineWidget("js.widget.Paragraph_layout",js.widget.Layout,{templatePath:null,templateCssPath:null,name:"",postCreate:function(args,frag,_bfd){
js.widget.Paragraph_layout.superclass.postCreate.call(this,args,frag,_bfd);
},add_to_layout:function(args){
var w=js.widget.Paragraph_layout.superclass.add_to_layout.call(this,args);
if(!w){
return;
}
this.domNode.appendChild(document.createElement("br"));
this.domNode.appendChild(w.editable);
this.domNode.appendChild(w.domNode);
w.editable.onclick();
},delete_from_layout:function(w){
var x=js.widget.Paragraph_layout.superclass.delete_from_layout.call(this,w);
if(!x){
return;
}
dojo.debug("deleting widget "+w.widgetId+" from paragraph layout  "+this.name);
var _c02=dojo.json.evalJson(w.design_widget_params);
var _c03=_c02.txn_delete;
_c03.action="delete";
window.parent.dojo.event.topic.publish("new_txn",_c03);
w.domNode.style.visibility="hidden";
w.editable.style.visibility="hidden";
window.parent.dojo.event.topic.publish("scratch_txn",w);
},moveback_in_layout:function(w){
var x=js.widget.Paragraph_layout.superclass.moveback_in_layout.call(this,w);
if(!x){
return;
}
var re=new RegExp("^local_");
if(w.widgetId.match(re)){
return;
}
dojo.debug("moving widget "+w.widgetId+" back in paragraph layout "+this.name);
for(var i=0;i<this.children.length;i++){
if(this.children[i]===w){
if(i>0){
var _c08=this.children[i-1];
var _c09=this.children[i];
this.children[i-1]=_c09;
this.children[i]=_c08;
_c09.domNode.parentNode.insertBefore(_c09.domNode,_c08.domNode);
_c09.editable.parentNode.insertBefore(_c09.editable,_c08.domNode);
this.swap_sort_order(_c09,_c08);
dojo.event.topic.publish("save_obj",_c09);
dojo.event.topic.publish("save_obj",_c08);
break;
}
}
}
},movefwd_in_layout:function(w){
if(!this.selected){
return;
}
var x=js.widget.Paragraph_layout.superclass.movefwd_in_layout.call(this,w);
if(!x){
return;
}
var re=new RegExp("^local_");
if(w.widgetId.match(re)){
return;
}
dojo.debug("moving widget "+w.widgetId+" fwd in paragraph layout "+this.name);
for(var i=0;i<this.children.length;i++){
if(this.children[i]===w){
if(i<this.children.length-1){
var _c0e=this.children[i+1];
var _c0f=this.children[i];
this.children[i+1]=_c0f;
this.children[i]=_c0e;
_c0f.domNode.parentNode.insertBefore(_c0e.domNode,_c0f.domNode);
_c0f.editable.parentNode.insertBefore(_c0e.editable,_c0f.domNode);
this.swap_sort_order(_c0f,_c0e);
dojo.event.topic.publish("save_obj",_c0f);
dojo.event.topic.publish("save_obj",_c0e);
break;
}
}
}
}});
dojo.provide("dojo.html.iframe");
dojo.html.iframeContentWindow=function(_c10){
var win=dojo.html.getDocumentWindow(dojo.html.iframeContentDocument(_c10))||dojo.html.iframeContentDocument(_c10).__parent__||(_c10.name&&document.frames[_c10.name])||null;
return win;
};
dojo.html.iframeContentDocument=function(_c12){
var doc=_c12.contentDocument||((_c12.contentWindow)&&(_c12.contentWindow.document))||((_c12.name)&&(document.frames[_c12.name])&&(document.frames[_c12.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 _c16=dojo.html.getMarginBox(this.domNode);
if(_c16.width==0||_c16.height==0){
dojo.lang.setTimeout(this,this.onResized,100);
return;
}
this.iframe.style.width=_c16.width+"px";
this.iframe.style.height=_c16.height+"px";
}
},size:function(node){
if(!this.iframe){
return;
}
var _c18=dojo.html.toCoordinateObject(node,true,dojo.html.boxSizing.BORDER_BOX);
with(this.iframe.style){
width=_c18.width+"px";
height=_c18.height+"px";
left=_c18.left+"px";
top=_c18.top+"px";
}
},setZIndex:function(node){
if(!this.iframe){
return;
}
if(dojo.dom.isNode(node)){
this.iframe.style.zIndex=dojo.html.getStyle(node,"z-index")-1;
}else{
if(!isNaN(node)){
this.iframe.style.zIndex=node;
}
}
},show:function(){
if(this.iframe){
this.iframe.style.display="block";
}
},hide:function(){
if(this.iframe){
this.iframe.style.display="none";
}
},remove:function(){
if(this.iframe){
dojo.html.removeNode(this.iframe,true);
delete this.iframe;
this.iframe=null;
}
}});
dojo.provide("dojo.lfx.shadow");
dojo.lfx.shadow=function(node){
this.shadowPng=dojo.uri.moduleUri("dojo.html","images/shadow");
this.shadowThickness=8;
this.shadowOffset=15;
this.init(node);
};
dojo.extend(dojo.lfx.shadow,{init:function(node){
this.node=node;
this.pieces={};
var x1=-1*this.shadowThickness;
var y0=this.shadowOffset;
var y1=this.shadowOffset+this.shadowThickness;
this._makePiece("tl","top",y0,"left",x1);
this._makePiece("l","top",y1,"left",x1,"scale");
this._makePiece("tr","top",y0,"left",0);
this._makePiece("r","top",y1,"left",0,"scale");
this._makePiece("bl","top",0,"left",x1);
this._makePiece("b","top",0,"left",0,"crop");
this._makePiece("br","top",0,"left",0);
},_makePiece:function(name,_c20,_c21,_c22,_c23,_c24){
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+"'"+(_c24?", sizingMethod='"+_c24+"'":"")+")";
}else{
img=dojo.doc().createElement("img");
img.src=url;
}
img.style.position="absolute";
img.style[_c20]=_c21+"px";
img.style[_c22]=_c23+"px";
img.style.width=this.shadowThickness+"px";
img.style.height=this.shadowThickness+"px";
this.pieces[name]=img;
this.node.appendChild(img);
},size:function(_c27,_c28){
var _c29=_c28-(this.shadowOffset+this.shadowThickness+1);
if(_c29<0){
_c29=0;
}
if(_c28<1){
_c28=1;
}
if(_c27<1){
_c27=1;
}
with(this.pieces){
l.style.height=_c29+"px";
r.style.height=_c29+"px";
b.style.width=(_c27-1)+"px";
bl.style.top=(_c28-1)+"px";
b.style.top=(_c28-1)+"px";
br.style.top=(_c28-1)+"px";
tr.style.left=(_c27-1)+"px";
r.style.left=(_c27-1)+"px";
br.style.left=(_c27-1)+"px";
}
}});
dojo.provide("dojo.widget.html.layout");
dojo.widget.html.layout=function(_c2a,_c2b,_c2c){
dojo.html.addClass(_c2a,"dojoLayoutContainer");
_c2b=dojo.lang.filter(_c2b,function(_c2d,idx){
_c2d.idx=idx;
return dojo.lang.inArray(["top","bottom","left","right","client","flood"],_c2d.layoutAlign);
});
if(_c2c&&_c2c!="none"){
var rank=function(_c30){
switch(_c30.layoutAlign){
case "flood":
return 1;
case "left":
case "right":
return (_c2c=="left-right")?2:3;
case "top":
case "bottom":
return (_c2c=="left-right")?3:2;
default:
return 4;
}
};
_c2b.sort(function(a,b){
return (rank(a)-rank(b))||(a.idx-b.idx);
});
}
var f={top:dojo.html.getPixelValue(_c2a,"padding-top",true),left:dojo.html.getPixelValue(_c2a,"padding-left",true)};
dojo.lang.mixin(f,dojo.html.getContentBox(_c2a));
dojo.lang.forEach(_c2b,function(_c34){
var elm=_c34.domNode;
var pos=_c34.layoutAlign;
with(elm.style){
left=f.left+"px";
top=f.top+"px";
bottom="auto";
right="auto";
}
dojo.html.addClass(elm,"dojoAlign"+dojo.string.capitalize(pos));
if((pos=="top")||(pos=="bottom")){
dojo.html.setMarginBox(elm,{width:f.width});
var h=dojo.html.getMarginBox(elm).height;
f.height-=h;
if(pos=="top"){
f.top+=h;
}else{
elm.style.top=f.top+f.height+"px";
}
if(_c34.onResized){
_c34.onResized();
}
}else{
if(pos=="left"||pos=="right"){
var w=dojo.html.getMarginBox(elm).width;
if(_c34.resizeTo){
_c34.resizeTo(w,f.height);
}else{
dojo.html.setMarginBox(elm,{width:w,height:f.height});
}
f.width-=w;
if(pos=="left"){
f.left+=w;
}else{
elm.style.left=f.left+f.width+"px";
}
}else{
if(pos=="flood"||pos=="client"){
if(_c34.resizeTo){
_c34.resizeTo(f.width,f.height);
}else{
dojo.html.setMarginBox(elm,{width:f.width,height:f.height});
}
}
}
}
});
};
dojo.html.insertCssText(".dojoLayoutContainer{ position: relative; display: block; overflow: hidden; }\n"+"body .dojoAlignTop, body .dojoAlignBottom, body .dojoAlignLeft, body .dojoAlignRight { position: absolute; overflow: hidden; }\n"+"body .dojoAlignClient { position: absolute }\n"+".dojoAlignClient { overflow: auto; }\n");
dojo.provide("dojo.dnd.DragAndDrop");
dojo.declare("dojo.dnd.DragSource",null,{type:"",onDragEnd:function(evt){
},onDragStart:function(evt){
},onSelected:function(evt){
},unregister:function(){
dojo.dnd.dragManager.unregisterDragSource(this);
},reregister:function(){
dojo.dnd.dragManager.registerDragSource(this);
}});
dojo.declare("dojo.dnd.DragObject",null,{type:"",register:function(){
var dm=dojo.dnd.dragManager;
if(dm["registerDragObject"]){
dm.registerDragObject(this);
}
},onDragStart:function(evt){
},onDragMove:function(evt){
},onDragOver:function(evt){
},onDragOut:function(evt){
},onDragEnd:function(evt){
},onDragLeave:dojo.lang.forward("onDragOut"),onDragEnter:dojo.lang.forward("onDragOver"),ondragout:dojo.lang.forward("onDragOut"),ondragover:dojo.lang.forward("onDragOver")});
dojo.declare("dojo.dnd.DropTarget",null,{acceptsType:function(type){
if(!dojo.lang.inArray(this.acceptedTypes,"*")){
if(!dojo.lang.inArray(this.acceptedTypes,type)){
return false;
}
}
return true;
},accepts:function(_c43){
if(!dojo.lang.inArray(this.acceptedTypes,"*")){
for(var i=0;i<_c43.length;i++){
if(!dojo.lang.inArray(this.acceptedTypes,_c43[i].type)){
return false;
}
}
}
return true;
},unregister:function(){
dojo.dnd.dragManager.unregisterDropTarget(this);
},onDragOver:function(evt){
},onDragOut:function(evt){
},onDragMove:function(evt){
},onDropStart:function(evt){
},onDrop:function(evt){
},onDropEnd:function(){
}},function(){
this.acceptedTypes=[];
});
dojo.dnd.DragEvent=function(){
this.dragSource=null;
this.dragObject=null;
this.target=null;
this.eventStatus="success";
};
dojo.declare("dojo.dnd.DragManager",null,{selectedSources:[],dragObjects:[],dragSources:[],registerDragSource:function(_c4a){
},dropTargets:[],registerDropTarget:function(_c4b){
},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:[],dragSources:[],dropTargets:[],currentX:null,currentY:null,lastX:null,lastY:null,mouseDownX:null,mouseDownY:null,threshold:7,dropAcceptable:false,cancelEvent:function(e){
e.stopPropagation();
e.preventDefault();
},registerDragSource:function(ds){
if(ds["domNode"]){
var dp=this.dsPrefix;
var _c4f=dp+"Idx_"+(this.dsCounter++);
ds.dragSourceId=_c4f;
this.dragSources[_c4f]=ds;
ds.domNode.setAttribute(dp,_c4f);
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 _c52=ds.dragSourceId;
delete ds.dragSourceId;
delete this.dragSources[_c52];
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 _c55=dojo.lang.find(this.dropTargets,dt,true);
if(_c55>=0){
this.dropTargets.splice(_c55,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 _c5b=e.target.nodeType==dojo.html.TEXT_NODE?e.target.parentNode:e.target;
if(dojo.html.isTag(_c5b,"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,_c5e){
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(_c5f){
var ret=null;
if(!_c5f){
return;
}
if(this.currentDropTarget){
e.dragObject=_c5f;
var ce=this.currentDropTarget.domNode.childNodes;
if(ce.length>0){
e.dropTarget=ce[0];
while(e.dropTarget==_c5f.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{
_c5f.dragSource.onDragEnd(e);
}
catch(err){
var _c62={};
for(var i in e){
if(i=="type"){
_c62.type="mouseup";
continue;
}
_c62[i]=e[i];
}
_c5f.dragSource.onDragEnd(_c62);
}
},function(){
_c5f.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(_c6b){
var tn=_c6b.domNode;
if(!tn||!_c6b.accepts([this.dragSource])){
return;
}
var abs=dojo.html.getAbsolutePosition(tn,true);
var bb=dojo.html.getBorderBox(tn);
this.dropTargetDimensions.push([[abs.x,abs.y],[abs.x+bb.width,abs.y+bb.height],_c6b]);
},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(_c72){
if(!_c72){
return;
}
var tdo=_c72.onDragStart(e);
if(tdo){
tdo.onDragStart(e);
tdo.dragOffset.y+=dy;
tdo.dragOffset.x+=dx;
tdo.dragSource=_c72;
this.dragObjects.push(tdo);
}
},this);
this.previousDropTarget=null;
this.cacheTargetLocations();
}
dojo.lang.forEach(this.dragObjects,function(_c74){
if(_c74){
_c74.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 _c77=this.findBestTarget(e);
if(_c77.target===null){
if(this.currentDropTarget){
this.currentDropTarget.onDragOut(e);
this.previousDropTarget=this.currentDropTarget;
this.currentDropTarget=null;
}
this.dropAcceptable=false;
return;
}
if(this.currentDropTarget!==_c77.target){
if(this.currentDropTarget){
this.previousDropTarget=this.currentDropTarget;
this.currentDropTarget.onDragOut(e);
}
this.currentDropTarget=_c77.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 _c79=this;
var _c7a=new Object();
_c7a.target=null;
_c7a.points=null;
dojo.lang.every(this.dropTargetDimensions,function(_c7b){
if(!_c79.isInsideBox(e,_c7b)){
return true;
}
_c7a.target=_c7b[2];
_c7a.points=_c7b;
return Boolean(_c79.nestedTargets);
});
return _c7a;
},isInsideBox:function(e,_c7d){
if((e.pageX>_c7d[0][0])&&(e.pageX<_c7d[1][0])&&(e.pageY>_c7d[0][1])&&(e.pageY<_c7d[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 _c82=new dojo.dnd.HtmlDragObject(this.dragObject,this.type);
if(this.dragClass){
_c82.dragClass=this.dragClass;
}
if(this.constrainToContainer){
_c82.constrainTo(this.constrainingContainer||this.domNode.parentNode);
}
return _c82;
},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(_c85){
this.constrainToContainer=true;
if(_c85){
this.constrainingContainer=_c85;
}
},onSelected:function(){
for(var i=0;i<this.dragObjects.length;i++){
dojo.dnd.dragManager.selectedSources.push(new dojo.dnd.HtmlDragSource(this.dragObjects[i]));
}
},addDragObjects:function(el){
for(var i=0;i<arguments.length;i++){
this.dragObjects.push(dojo.byId(arguments[i]));
}
}},function(node,type){
node=dojo.byId(node);
this.dragObjects=[];
this.constrainToContainer=false;
if(node){
this.domNode=node;
this.dragObject=node;
this.type=(type)||(this.domNode.nodeName.toLowerCase());
dojo.dnd.DragSource.prototype.reregister.call(this);
}
});
dojo.declare("dojo.dnd.HtmlDragObject",dojo.dnd.DragObject,{dragClass:"",opacity:0.5,createIframe:true,disableX:false,disableY:false,createDragNode:function(){
var node=this.domNode.cloneNode(true);
if(this.dragClass){
dojo.html.addClass(node,this.dragClass);
}
if(this.opacity<1){
dojo.html.setOpacity(node,this.opacity);
}
var ltn=node.tagName.toLowerCase();
var isTr=(ltn=="tr");
if((isTr)||(ltn=="tbody")){
var doc=this.domNode.ownerDocument;
var _c8f=doc.createElement("table");
if(isTr){
var _c90=doc.createElement("tbody");
_c8f.appendChild(_c90);
_c90.appendChild(node);
}else{
_c8f.appendChild(node);
}
var _c91=((isTr)?this.domNode:this.domNode.firstChild);
var _c92=((isTr)?node:node.firstChild);
var _c93=_c91.childNodes;
var _c94=_c92.childNodes;
for(var i=0;i<_c93.length;i++){
if((_c94[i])&&(_c94[i].style)){
_c94[i].style.width=dojo.html.getContentBox(_c93[i]).width+"px";
}
}
node=_c8f;
}
if((dojo.render.html.ie55||dojo.render.html.ie60)&&this.createIframe){
with(node.style){
top="0px";
left="0px";
}
var _c96=document.createElement("div");
_c96.appendChild(node);
this.bgIframe=new dojo.html.BackgroundIframe(_c96);
_c96.appendChild(this.bgIframe.iframe);
node=_c96;
}
node.style.zIndex=999;
return node;
},onDragStart:function(e){
dojo.html.clearSelection();
this.scrollOffset=dojo.html.getScroll().offset;
this.dragStartPosition=dojo.html.getAbsolutePosition(this.domNode,true);
this.dragOffset={y:this.dragStartPosition.y-e.pageY,x:this.dragStartPosition.x-e.pageX};
this.dragClone=this.createDragNode();
this.containingBlockPosition=this.domNode.offsetParent?dojo.html.getAbsolutePosition(this.domNode.offsetParent,true):{x:0,y:0};
if(this.constrainToContainer){
this.constraints=this.getConstraints();
}
with(this.dragClone.style){
position="absolute";
top=this.dragOffset.y+e.pageY+"px";
left=this.dragOffset.x+e.pageX+"px";
}
dojo.body().appendChild(this.dragClone);
dojo.event.topic.publish("dragStart",{source:this});
},getConstraints:function(){
if(this.constrainingContainer.nodeName.toLowerCase()=="body"){
var _c98=dojo.html.getViewport();
var _c99=_c98.width;
var _c9a=_c98.height;
var _c9b=dojo.html.getScroll().offset;
var x=_c9b.x;
var y=_c9b.y;
}else{
var _c9e=dojo.html.getContentBox(this.constrainingContainer);
_c99=_c9e.width;
_c9a=_c9e.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+_c99-mb.width,maxY:y+_c9a-mb.height};
},updateDragOffset:function(){
var _ca0=dojo.html.getScroll().offset;
if(_ca0.y!=this.scrollOffset.y){
var diff=_ca0.y-this.scrollOffset.y;
this.dragOffset.y+=diff;
this.scrollOffset.y=_ca0.y;
}
if(_ca0.x!=this.scrollOffset.x){
var diff=_ca0.x-this.scrollOffset.x;
this.dragOffset.x+=diff;
this.scrollOffset.x=_ca0.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 _ca8=dojo.html.getAbsolutePosition(this.dragClone,true);
var _ca9={left:this.dragStartPosition.x+1,top:this.dragStartPosition.y+1};
var anim=dojo.lfx.slideTo(this.dragClone,_ca9,300);
var _cab=this;
dojo.event.connect(anim,"onEnd",function(e){
dojo.html.removeNode(_cab.dragClone);
_cab.dragClone=null;
});
anim.play();
break;
}
dojo.event.topic.publish("dragEnd",{source:this});
},constrainTo:function(_cad){
this.constrainToContainer=true;
if(_cad){
this.constrainingContainer=_cad;
}else{
this.constrainingContainer=this.domNode.parentNode;
}
}},function(node,type){
this.domNode=dojo.byId(node);
this.type=type;
this.constrainToContainer=false;
this.dragSource=null;
dojo.dnd.DragObject.prototype.register.call(this);
});
dojo.declare("dojo.dnd.HtmlDropTarget",dojo.dnd.DropTarget,{vertical:false,onDragOver:function(e){
if(!this.accepts(e.dragObjects)){
return false;
}
this.childBoxes=[];
for(var i=0,_cb2;i<this.domNode.childNodes.length;i++){
_cb2=this.domNode.childNodes[i];
if(_cb2.nodeType!=dojo.html.ELEMENT_NODE){
continue;
}
var pos=dojo.html.getAbsolutePosition(_cb2,true);
var _cb4=dojo.html.getBorderBox(_cb2);
this.childBoxes.push({top:pos.y,bottom:pos.y+_cb4.height,left:pos.x,right:pos.x+_cb4.width,height:_cb4.height,width:_cb4.width,node:_cb2});
}
return true;
},_getNodeUnderMouse:function(e){
for(var i=0,_cb7;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,_cb9){
var i=this._getNodeUnderMouse(e);
if(!this.dropIndicator){
this.createDropIndicator();
}
var _cbb=this.vertical?dojo.html.gravity.WEST:dojo.html.gravity.NORTH;
var hide=false;
if(i<0){
if(this.childBoxes.length){
var _cbd=(dojo.html.gravity(this.childBoxes[0].node,e)&_cbb);
if(_cbd){
hide=true;
}
}else{
var _cbd=true;
}
}else{
var _cbe=this.childBoxes[i];
var _cbd=(dojo.html.gravity(_cbe.node,e)&_cbb);
if(_cbe.node===_cb9[0].dragSource.domNode){
hide=true;
}else{
var _cbf=_cbd?(i>0?this.childBoxes[i-1]:_cbe):(i<this.childBoxes.length-1?this.childBoxes[i+1]:_cbe);
if(_cbf.node===_cb9[0].dragSource.domNode){
hide=true;
}
}
}
if(hide){
this.dropIndicator.style.display="none";
return;
}else{
this.dropIndicator.style.display="";
}
this.placeIndicator(e,_cb9,i,_cbd);
if(!dojo.html.hasParent(this.dropIndicator)){
dojo.body().appendChild(this.dropIndicator);
}
},placeIndicator:function(e,_cc1,_cc2,_cc3){
var _cc4=this.vertical?"left":"top";
var _cc5;
if(_cc2<0){
if(this.childBoxes.length){
_cc5=_cc3?this.childBoxes[0]:this.childBoxes[this.childBoxes.length-1];
}else{
this.dropIndicator.style[_cc4]=dojo.html.getAbsolutePosition(this.domNode,true)[this.vertical?"x":"y"]+"px";
}
}else{
_cc5=this.childBoxes[_cc2];
}
if(_cc5){
this.dropIndicator.style[_cc4]=(_cc3?_cc5[_cc4]:_cc5[this.vertical?"right":"bottom"])+"px";
if(this.vertical){
this.dropIndicator.style.height=_cc5.height+"px";
this.dropIndicator.style.top=_cc5.top+"px";
}else{
this.dropIndicator.style.width=_cc5.width+"px";
this.dropIndicator.style.left=_cc5.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 _cc9=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)&_cc9){
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 _cca=this.childBoxes[i];
if(dojo.html.gravity(_cca.node,e)&_cc9){
return this.insert(e,_cca.node,"before");
}else{
return this.insert(e,_cca.node,"after");
}
},insert:function(e,_ccc,_ccd){
var node=e.dragObject.domNode;
if(_ccd=="before"){
return dojo.html.insertBefore(node,_ccc);
}else{
if(_ccd=="after"){
return dojo.html.insertAfter(node,_ccc);
}else{
if(_ccd=="append"){
_ccc.appendChild(node);
return true;
}
}
}
return false;
}},function(node,_cd0){
if(arguments.length==0){
return;
}
this.domNode=dojo.byId(node);
dojo.dnd.DropTarget.call(this);
if(_cd0&&dojo.lang.isString(_cd0)){
_cd0=[_cd0];
}
this.acceptedTypes=_cd0||[];
dojo.dnd.dragManager.registerDropTarget(this);
});
dojo.kwCompoundRequire({common:["dojo.dnd.DragAndDrop"],browser:["dojo.dnd.HtmlDragAndDrop"],dashboard:["dojo.dnd.HtmlDragAndDrop"]});
dojo.provide("dojo.dnd.*");
dojo.provide("dojo.dnd.HtmlDragMove");
dojo.declare("dojo.dnd.HtmlDragMoveSource",dojo.dnd.HtmlDragSource,{onDragStart:function(){
var _cd1=new dojo.dnd.HtmlDragMoveObject(this.dragObject,this.type);
if(this.constrainToContainer){
_cd1.constrainTo(this.constrainingContainer);
}
return _cd1;
},onSelected:function(){
for(var i=0;i<this.dragObjects.length;i++){
dojo.dnd.dragManager.selectedSources.push(new dojo.dnd.HtmlDragMoveSource(this.dragObjects[i]));
}
}});
dojo.declare("dojo.dnd.HtmlDragMoveObject",dojo.dnd.HtmlDragObject,{onDragStart:function(e){
dojo.html.clearSelection();
this.dragClone=this.domNode;
if(dojo.html.getComputedStyle(this.domNode,"position")!="absolute"){
this.domNode.style.position="relative";
}
var left=parseInt(dojo.html.getComputedStyle(this.domNode,"left"));
var top=parseInt(dojo.html.getComputedStyle(this.domNode,"top"));
this.dragStartPosition={x:isNaN(left)?0:left,y:isNaN(top)?0:top};
this.scrollOffset=dojo.html.getScroll().offset;
this.dragOffset={y:this.dragStartPosition.y-e.pageY,x:this.dragStartPosition.x-e.pageX};
this.containingBlockPosition={x:0,y:0};
if(this.constrainToContainer){
this.constraints=this.getConstraints();
}
dojo.event.connect(this.domNode,"onclick",this,"_squelchOnClick");
},onDragEnd:function(e){
},setAbsolutePosition:function(x,y){
if(!this.disableY){
this.domNode.style.top=y+"px";
}
if(!this.disableX){
this.domNode.style.left=x+"px";
}
},_squelchOnClick:function(e){
dojo.event.browser.stopEvent(e);
dojo.event.disconnect(this.domNode,"onclick",this,"_squelchOnClick");
}});
dojo.provide("dojo.widget.Dialog");
dojo.declare("dojo.widget.ModalDialogBase",null,{isContainer:true,focusElement:"",bgColor:"black",bgOpacity:0.4,followScroll:true,closeOnBackgroundClick:false,trapTabs:function(e){
if(e.target==this.tabStartOuter){
if(this._fromTrap){
this.tabStart.focus();
this._fromTrap=false;
}else{
this._fromTrap=true;
this.tabEnd.focus();
}
}else{
if(e.target==this.tabStart){
if(this._fromTrap){
this._fromTrap=false;
}else{
this._fromTrap=true;
this.tabEnd.focus();
}
}else{
if(e.target==this.tabEndOuter){
if(this._fromTrap){
this.tabEnd.focus();
this._fromTrap=false;
}else{
this._fromTrap=true;
this.tabStart.focus();
}
}else{
if(e.target==this.tabEnd){
if(this._fromTrap){
this._fromTrap=false;
}else{
this._fromTrap=true;
this.tabStart.focus();
}
}
}
}
}
},clearTrap:function(e){
var _cdc=this;
setTimeout(function(){
_cdc._fromTrap=false;
},100);
},postCreate:function(){
with(this.domNode.style){
position="absolute";
zIndex=999;
display="none";
overflow="visible";
}
var b=dojo.body();
b.appendChild(this.domNode);
this.bg=document.createElement("div");
this.bg.className="dialogUnderlay";
with(this.bg.style){
position="absolute";
left=top="0px";
zIndex=998;
display="none";
}
b.appendChild(this.bg);
this.setBackgroundColor(this.bgColor);
this.bgIframe=new dojo.html.BackgroundIframe();
if(this.bgIframe.iframe){
with(this.bgIframe.iframe.style){
position="absolute";
left=top="0px";
zIndex=90;
display="none";
}
}
if(this.closeOnBackgroundClick){
dojo.event.kwConnect({srcObj:this.bg,srcFunc:"onclick",adviceObj:this,adviceFunc:"onBackgroundClick",once:true});
}
},uninitialize:function(){
this.bgIframe.remove();
dojo.html.removeNode(this.bg,true);
},setBackgroundColor:function(_cde){
if(arguments.length>=3){
_cde=new dojo.gfx.color.Color(arguments[0],arguments[1],arguments[2]);
}else{
_cde=new dojo.gfx.color.Color(_cde);
}
this.bg.style.backgroundColor=_cde.toString();
return this.bgColor=_cde;
},setBackgroundOpacity:function(op){
if(arguments.length==0){
op=this.bgOpacity;
}
dojo.html.setOpacity(this.bg,op);
try{
this.bgOpacity=dojo.html.getOpacity(this.bg);
}
catch(e){
this.bgOpacity=op;
}
return this.bgOpacity;
},_sizeBackground:function(){
if(this.bgOpacity>0){
var _ce0=dojo.html.getViewport();
var h=_ce0.height;
var w=_ce0.width;
with(this.bg.style){
width=w+"px";
height=h+"px";
}
var _ce3=dojo.html.getScroll().offset;
this.bg.style.top=_ce3.y+"px";
this.bg.style.left=_ce3.x+"px";
var _ce0=dojo.html.getViewport();
if(_ce0.width!=w){
this.bg.style.width=_ce0.width+"px";
}
if(_ce0.height!=h){
this.bg.style.height=_ce0.height+"px";
}
}
this.bgIframe.size(this.bg);
},_showBackground:function(){
if(this.bgOpacity>0){
this.bg.style.display="block";
}
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="block";
}
},placeModalDialog:function(){
var _ce4=dojo.html.getScroll().offset;
var _ce5=dojo.html.getViewport();
var mb;
if(this.isShowing()){
mb=dojo.html.getMarginBox(this.domNode);
}else{
dojo.html.setVisibility(this.domNode,false);
dojo.html.show(this.domNode);
mb=dojo.html.getMarginBox(this.domNode);
dojo.html.hide(this.domNode);
dojo.html.setVisibility(this.domNode,true);
}
var x=_ce4.x+(_ce5.width-mb.width)/2;
var y=_ce4.y+(_ce5.height-mb.height)/2;
with(this.domNode.style){
left=x+"px";
top=y+"px";
}
},_onKey:function(evt){
if(evt.key){
var node=evt.target;
while(node!=null){
if(node==this.domNode){
return;
}
node=node.parentNode;
}
if(evt.key!=evt.KEY_TAB){
dojo.event.browser.stopEvent(evt);
}else{
if(!dojo.render.html.opera){
try{
this.tabStart.focus();
}
catch(e){
}
}
}
}
},showModalDialog:function(){
if(this.followScroll&&!this._scrollConnected){
this._scrollConnected=true;
dojo.event.connect(window,"onscroll",this,"_onScroll");
}
dojo.event.connect(document.documentElement,"onkey",this,"_onKey");
this.placeModalDialog();
this.setBackgroundOpacity();
this._sizeBackground();
this._showBackground();
this._fromTrap=true;
setTimeout(dojo.lang.hitch(this,function(){
try{
this.tabStart.focus();
}
catch(e){
}
}),50);
},hideModalDialog:function(){
if(this.focusElement){
dojo.byId(this.focusElement).focus();
dojo.byId(this.focusElement).blur();
}
this.bg.style.display="none";
this.bg.style.width=this.bg.style.height="1px";
if(this.bgIframe.iframe){
this.bgIframe.iframe.style.display="none";
}
dojo.event.disconnect(document.documentElement,"onkey",this,"_onKey");
if(this._scrollConnected){
this._scrollConnected=false;
dojo.event.disconnect(window,"onscroll",this,"_onScroll");
}
},_onScroll:function(){
var _ceb=dojo.html.getScroll().offset;
this.bg.style.top=_ceb.y+"px";
this.bg.style.left=_ceb.x+"px";
this.placeModalDialog();
},checkSize:function(){
if(this.isShowing()){
this._sizeBackground();
this.placeModalDialog();
this.onResized();
}
},onBackgroundClick:function(){
if(this.lifetime-this.timeRemaining>=this.blockDuration){
return;
}
this.hide();
}});
dojo.widget.defineWidget("dojo.widget.Dialog",[dojo.widget.ContentPane,dojo.widget.ModalDialogBase],{templatePath:dojo.uri.moduleUri("dojo.widget","templates/Dialog.html"),blockDuration:0,lifetime:0,closeNode:"",postMixInProperties:function(){
dojo.widget.Dialog.superclass.postMixInProperties.apply(this,arguments);
if(this.closeNode){
this.setCloseControl(this.closeNode);
}
},postCreate:function(){
dojo.widget.Dialog.superclass.postCreate.apply(this,arguments);
dojo.widget.ModalDialogBase.prototype.postCreate.apply(this,arguments);
},show:function(){
if(this.lifetime){
this.timeRemaining=this.lifetime;
if(this.timerNode){
this.timerNode.innerHTML=Math.ceil(this.timeRemaining/1000);
}
if(this.blockDuration&&this.closeNode){
if(this.lifetime>this.blockDuration){
this.closeNode.style.visibility="hidden";
}else{
this.closeNode.style.display="none";
}
}
if(this.timer){
clearInterval(this.timer);
}
this.timer=setInterval(dojo.lang.hitch(this,"_onTick"),100);
}
this.showModalDialog();
dojo.widget.Dialog.superclass.show.call(this);
},onLoad:function(){
this.placeModalDialog();
dojo.widget.Dialog.superclass.onLoad.call(this);
},fillInTemplate:function(){
},hide:function(){
this.hideModalDialog();
dojo.widget.Dialog.superclass.hide.call(this);
if(this.timer){
clearInterval(this.timer);
}
},setTimerNode:function(node){
this.timerNode=node;
},setCloseControl:function(node){
this.closeNode=dojo.byId(node);
dojo.event.connect(this.closeNode,"onclick",this,"hide");
},setShowControl:function(node){
node=dojo.byId(node);
dojo.event.connect(node,"onclick",this,"show");
},_onTick:function(){
if(this.timer){
this.timeRemaining-=100;
if(this.lifetime-this.timeRemaining>=this.blockDuration){
if(this.closeNode){
this.closeNode.style.visibility="visible";
}
}
if(!this.timeRemaining){
clearInterval(this.timer);
this.hide();
}else{
if(this.timerNode){
this.timerNode.innerHTML=Math.ceil(this.timeRemaining/1000);
}
}
}
}});
dojo.provide("dojo.widget.ResizeHandle");
dojo.widget.defineWidget("dojo.widget.ResizeHandle",dojo.widget.HtmlWidget,{targetElmId:"",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/ResizeHandle.css"),templateString:"<div class=\"dojoHtmlResizeHandle\"><div></div></div>",postCreate:function(){
dojo.event.connect(this.domNode,"onmousedown",this,"_beginSizing");
},_beginSizing:function(e){
if(this._isSizing){
return false;
}
this.targetWidget=dojo.widget.byId(this.targetElmId);
this.targetDomNode=this.targetWidget?this.targetWidget.domNode:dojo.byId(this.targetElmId);
if(!this.targetDomNode){
return;
}
this._isSizing=true;
this.startPoint={"x":e.clientX,"y":e.clientY};
var mb=dojo.html.getMarginBox(this.targetDomNode);
this.startSize={"w":mb.width,"h":mb.height};
dojo.event.kwConnect({srcObj:dojo.body(),srcFunc:"onmousemove",targetObj:this,targetFunc:"_changeSizing",rate:25});
dojo.event.connect(dojo.body(),"onmouseup",this,"_endSizing");
e.preventDefault();
},_changeSizing:function(e){
try{
if(!e.clientX||!e.clientY){
return;
}
}
catch(e){
return;
}
var dx=this.startPoint.x-e.clientX;
var dy=this.startPoint.y-e.clientY;
var newW=this.startSize.w-dx;
var newH=this.startSize.h-dy;
if(this.minSize){
var mb=dojo.html.getMarginBox(this.targetDomNode);
if(newW<this.minSize.w){
newW=mb.width;
}
if(newH<this.minSize.h){
newH=mb.height;
}
}
if(this.targetWidget){
this.targetWidget.resizeTo(newW,newH);
}else{
dojo.html.setMarginBox(this.targetDomNode,{width:newW,height:newH});
}
e.preventDefault();
},_endSizing:function(e){
dojo.event.disconnect(dojo.body(),"onmousemove",this,"_changeSizing");
dojo.event.disconnect(dojo.body(),"onmouseup",this,"_endSizing");
this._isSizing=false;
}});
dojo.provide("dojo.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,templatePath:dojo.uri.moduleUri("dojo.widget","templates/FloatingPane.html"),templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/FloatingPane.css"),fillInFloatingPaneTemplate:function(args,frag){
var _cfa=this.getFragNodeRef(frag);
dojo.html.copyStyle(this.domNode,_cfa);
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 _cff=dojo.html.getViewport();
var _d00=dojo.html.getPadding(dojo.body());
this.resizeTo(_cff.width-_d00.width,_cff.height-_d00.height);
}else{
var _d01=dojo.html.getContentBox(this.domNode.parentNode);
this.resizeTo(_d01.width,_d01.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 _d08=dojo.widget.manager.getWidgetsByType(this.widgetType);
var _d09=[];
for(var x=0;x<_d08.length;x++){
if(this.widgetId!=_d08[x].widgetId){
_d09.push(_d08[x]);
}
}
_d09.sort(function(a,b){
return a.domNode.style.zIndex-b.domNode.style.zIndex;
});
_d09.push(this);
var _d0d=100;
for(x=0;x<_d09.length;x++){
_d09[x].domNode.style.zIndex=_d0d+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 _d0f=dojo.widget.getWidgetById(this.taskBarId);
if(!_d0f){
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;
}
_d0f.addChild(this);
},showFloatingPane:function(){
this.bringToTop();
},onFloatingPaneShow:function(){
var mb=dojo.html.getMarginBox(this.domNode);
this.resizeTo(mb.width,mb.height);
},resizeTo:function(_d11,_d12){
dojo.html.setMarginBox(this.domNode,{width:_d11,height:_d12});
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(_d11,_d12);
}
this.onResized();
},checkSize:function(){
},destroyFloatingPane:function(){
if(this.resizeHandle){
this.resizeHandle.destroy();
this.resizeHandle=null;
}
}});
dojo.widget.defineWidget("dojo.widget.FloatingPane",[dojo.widget.ContentPane,dojo.widget.FloatingPaneBase],{fillInTemplate:function(args,frag){
this.fillInFloatingPaneTemplate(args,frag);
dojo.widget.FloatingPane.superclass.fillInTemplate.call(this,args,frag);
},postCreate:function(){
dojo.widget.FloatingPaneBase.prototype.postCreate.apply(this,arguments);
dojo.widget.FloatingPane.superclass.postCreate.apply(this,arguments);
},show:function(){
dojo.widget.FloatingPane.superclass.show.apply(this,arguments);
this.showFloatingPane();
},onShow:function(){
dojo.widget.FloatingPane.superclass.onShow.call(this);
this.onFloatingPaneShow();
},destroy:function(){
this.destroyFloatingPane();
dojo.widget.FloatingPane.superclass.destroy.apply(this,arguments);
}});
dojo.widget.defineWidget("dojo.widget.ModalFloatingPane",[dojo.widget.FloatingPane,dojo.widget.ModalDialogBase],{windowState:"minimized",displayCloseAction:true,postCreate:function(){
dojo.widget.ModalDialogBase.prototype.postCreate.call(this);
dojo.widget.ModalFloatingPane.superclass.postCreate.call(this);
},show:function(){
this.showModalDialog();
dojo.widget.ModalFloatingPane.superclass.show.apply(this,arguments);
this.bg.style.zIndex=this.domNode.style.zIndex-1;
},hide:function(){
this.hideModalDialog();
dojo.widget.ModalFloatingPane.superclass.hide.apply(this,arguments);
},closeWindow:function(){
this.hide();
dojo.widget.ModalFloatingPane.superclass.closeWindow.apply(this,arguments);
}});
dojo.provide("js.widget.Qmdialog");
dojo.widget.defineWidget("js.widget.Qmdialog",dojo.widget.FloatingPane,function(){
},{iframesrc:"",postMixInProperties:function(args,_d16,_d17){
this.displayCloseAction=true;
this.displayMinimizeAction=true;
this.displayMaximizeAction=true;
this.toggle="wipe";
this.toggleDuration="250";
this.resizable=true;
this.windowState="normal";
this.hasShadow=true;
},postCreate:function(args,frag){
if(this.iframesrc){
var _d1a="<IFRAME name=\"qmdialog\" id=\"qmdialog\" width=\"100%\" height=\"100%\" frameborder=\"0\"  src=\""+this.iframesrc+"&dialogId="+this.widgetId+"\"></IFRAME>";
this.setContent(_d1a);
this.containerNode.style.overflow="hidden";
}
this.resizeTo(this.domNode.style.height,this.domNode.style.width);
}});
dojo.provide("js.widget.String");
dojo.widget.defineWidget("js.widget.String",dojo.widget.HtmlWidget,{postCreate:function(){
this.textbox.style.visibility="hidden";
},edit_enabled:false,dirty:false,content:function(){
if(this.edit_enabled){
return this.textbox.value;
}else{
return this.readbox.innerHTML;
}
},value:"",templatePath:dojo.uri.dojoUri("../js/widget/templates/String.html"),textbox:null,readbox:null,enable_edit:function(){
this.textbox.value=this.readbox.innerHTML;
this.textbox.style.visibility="visible";
this.readbox.style.visibility="hidden";
this.edit_enabled=true;
},enable_read:function(){
if(this.readbox.innerHTML!=this.textbox.value){
this.dirty=true;
this.readbox.innerHTML=this.textbox.value;
}
this.textbox.style.visibility="hidden";
this.readbox.style.visibility="visible";
this.edit_enabled=false;
return this.dirty;
}});
dojo.provide("js.widget.Table_layout");
dojo.widget.defineWidget("js.widget.Table_layout",js.widget.Layout,{templatePath:null,templateCssPath:null,name:"",numcolumns:0,postCreate:function(args,frag,_d1d){
js.widget.Table_layout.superclass.postCreate.call(this,args,frag,_d1d);
this.numcolumns=dojo.json.evalJson(this.contained_widget_params).numcolumns;
},add_to_layout:function(args){
var w=js.widget.Paragraph_layout.superclass.add_to_layout.call(this,args);
if(!w){
return;
}
var _d20=-1;
var _d21=-1;
var _d22=new RegExp("^local_");
for(var i=0;i<this.domNode.rows.length;i++){
var row=this.domNode.rows[i];
for(var j=0;j<row.cells.length;j++){
var cell=row.cells[j];
if((!cell.innerHTML||!cell.innerHTML.match(this.contained_widget_type))&&(!cell.id||!cell.id.match(_d22))){
_d20=i;
_d21=j;
break;
}
}
}
if(_d20<0||_d21<0){
var _d27=this.domNode.insertRow(-1);
for(var i=0;i<this.numcolumns;i++){
_d27.insertCell(-1);
}
_d20=this.domNode.rows.length-1;
_d21=0;
}
var _d28=this.domNode.rows[_d20].cells[_d21];
_d28.appendChild(w.editable);
_d28.appendChild(w.domNode);
_d28.id="local_"+"_"+this.widgetId+"_"+_d20+"_"+_d21;
this.children[this.children.length]=w;
w.editable.onclick();
return w;
},delete_from_layout:function(w){
var x=js.widget.Table_layout.superclass.delete_from_layout.call(this,w);
if(!x){
return;
}
dojo.debug("deleting widget "+w.widgetId+" from table layout  "+this.name);
var _d2b=dojo.json.evalJson(w.design_widget_params);
var _d2c=_d2b.txn_delete;
_d2c.action="delete";
window.parent.dojo.event.topic.publish("new_txn",_d2c);
var re=new RegExp(w.widgetId);
var _d2e=false;
for(var i=0;i<this.domNode.rows.length;i++){
var row=this.domNode.rows[i];
for(var j=0;j<row.cells.length;j++){
var cell=row.cells[j];
if(_d2e){
this.move_cell_down(i,j);
}
if(cell.innerHTML.match(re)&&!_d2e){
_d2e=true;
this.move_cell_down(i,j);
}
}
}
var _d33=this.get_cell_of_widget(w);
var cell=this.domNode.rows[_d33.row].cells[_d33.cell];
cell.id="";
cell.innerHTML="";
w.domNode.style.visibility="hidden";
w.editable.style.visibility="hidden";
window.parent.dojo.event.topic.publish("scratch_txn",w);
},moveback_in_layout:function(w){
var x=js.widget.Table_layout.superclass.moveback_in_layout.call(this,w);
if(!x){
return;
}
var _d36=this.get_cell_of_widget(w);
target_row=_d36.row;
target_cell=_d36.cell;
var _d37;
if(target_row>=0&&target_cell>=0){
this.move_cell_up(target_row,target_cell);
}
var wx=this.get_widget_of_cell(target_row,target_cell);
this.swap_sort_order(w,wx);
dojo.event.topic.publish("save_obj",w);
dojo.event.topic.publish("save_obj",wx);
},movefwd_in_layout:function(w){
var x=js.widget.Paragraph_layout.superclass.movefwd_in_layout.call(this,w);
if(!x){
return;
}
var _d3b=this.get_cell_of_widget(w);
target_row=_d3b.row;
target_cell=_d3b.cell;
if(target_row>=0&&target_cell>=0){
var _d3c=this.move_cell_down(target_row,target_cell);
}
var wx=this.get_widget_of_cell(target_row,target_cell);
this.swap_sort_order(w,wx);
dojo.event.topic.publish("save_obj",w);
dojo.event.topic.publish("save_obj",wx);
},get_cell_of_widget:function(w){
var re=new RegExp(w.widgetId);
var _d40;
var _d41;
for(var i=0;i<this.domNode.rows.length;i++){
var row=this.domNode.rows[i];
for(var j=0;j<row.cells.length;j++){
var cell=row.cells[j];
if(cell.innerHTML.match(re)){
_d40=i;
_d41=j;
break;
}
}
}
return {"row":_d40,"cell":_d41};
},get_widget_of_cell:function(i,j){
var w;
var cell=this.domNode.rows[i].cells[j];
for(var k=0;k<this.children.length-1;k++){
var re=new RegExp(this.children[k].widgetId);
if(cell.innerHTML.match(re)){
w=this.children[k];
break;
}
}
return w;
},move_cell_down:function(i,j){
var cell=this.domNode.rows[i].cells[j];
var _d4f=new RegExp("^local_");
var _d50;
var _d51;
var _d52;
if(j<this.numcolumns-1){
_d50=this.domNode.rows[i].cells[j+1];
if(!_d50.innerHTML.match(this.contained_widget_type)&&!_d50.id.match(_d4f)){
return;
}
this.domNode.rows[i].insertBefore(_d50,cell);
}else{
if(i<this.domNode.rows.length-1){
_d50=this.domNode.rows[i+1].cells[0];
this.domNode.rows[i].insertBefore(_d50,cell);
this.domNode.rows[i+1].insertBefore(cell,this.domNode.rows[i+1].cells[0]);
}else{
}
}
},move_cell_up:function(i,j){
var cell=this.domNode.rows[i].cells[j];
var _d56=new RegExp("^local_");
var _d57;
if(j>0){
_d57=this.domNode.rows[i].cells[j-1];
this.domNode.rows[i].insertBefore(cell,_d57);
}else{
if(i>0){
_d57=this.domNode.rows[i-1].cells[this.numcolumns-1];
this.domNode.rows[i-1].insertBefore(cell,_d57);
this.domNode.rows[i].insertBefore(_d57,this.domNode.rows[i].cells[0]);
}else{
}
}
}});
dojo.provide("js.widget.Texteditor");
dojo.widget.defineWidget("js.widget.Texteditor",js.widget.Design_widget,function(){
},{templatePath:dojo.uri.dojoUri("../js/widget/templates/Texteditor.html"),templateCssPath:dojo.uri.dojoUri("../js/widget/templates/Texteditor.css"),mode:"textarea",name:"",textarea:null,fckeditor:null,fck_ready:false,minWidth:250,minHeight:250,postCreate:function(args,frag){
this.editable=this.getFragNodeRef(frag);
if(dojo.string.trim(this.editable.innerHTML)==""){
this.editable.innerHTML="Placeholder text, click to edit...";
}
js.widget.Texteditor.superclass.postCreate.call(this,args,frag);
if(this.value){
this.editable.innerHTML=this.value;
}else{
this.value=dojo.string.trim(this.editable.innerHTML);
this.editable.innerHTML=this.value;
}
dojo.html.insertAfter(this.editable,this.topcontainer);
this.textarea.id="fck"+this.widgetId;
this.fckeditor=new FCKeditor("fck"+this.widgetId);
this.fckeditor.BasePath="js/fckeditor/";
},onHover:function(){
if(!this.editing){
if(this.disabled){
dojo.html.addClass(this.editable,"editableRegionDisabled");
}else{
dojo.html.addClass(this.editable,"editableRegion");
if(this.mode=="textarea"){
dojo.html.addClass(this.editable,"editableTextareaRegion");
}
}
}
},onUnhover:function(){
if(!this.editing){
dojo.html.removeClass(this.editable,"editableRegion");
dojo.html.removeClass(this.editable,"editableTextareaRegion");
dojo.html.removeClass(this.editable,"editableRegionDisabled");
}
},onSelected:function(e){
this.editable.style.border="hidden";
this.onBeginEdit(e);
},onDeselected:function(e){
if(this.editing){
if(e.preventDefault){
e.preventDefault();
}
if(e.stopPropagation){
e.stopPropagation();
}
this.saveEdit(e);
}
},onBeginEdit:function(e){
js.widget.Texteditor.superclass.onBeginEdit.call(this,e);
var ee=this[this.mode.toLowerCase()];
ee.value=dojo.string.trim(this.value);
ee.style.fontSize=dojo.html.getStyle(this.editable,"font-size");
ee.style.fontWeight=dojo.html.getStyle(this.editable,"font-weight");
ee.style.fontStyle=dojo.html.getStyle(this.editable,"font-style");
var bb=dojo.html.getBorderBox(this.editable);
if(!bb.width){
bb.width=this.editable.style.width;
}
if(!bb.height){
bb.height=this.editable.style.height;
}
if(this.width){
bb.width=this.width;
}
ee.style.width=Math.max(bb.width,this.minWidth)+"px";
if(this.mode.toLowerCase()=="textarea"){
ee.style.display="block";
ee.style.height=Math.max(bb.height,this.minHeight)+"px";
}else{
ee.style.display="";
}
this.topcontainer.style.display="";
this.editable.style.display="none";
this.fckeditor.Height=ee.style.height;
this.fckeditor.Width=ee.style.width;
if(!this.fck_ready){
this.fckeditor.ReplaceTextarea();
this.fck_ready=true;
}else{
this.textarea.style.display="none";
}
},saveEdit:function(e){
var ee=FCKeditorAPI.GetInstance("fck"+this.widgetId);
var _d61=ee.IsDirty();
if(_d61){
this.doFade=true;
this.history.push(this.value);
this.value=ee.GetHTML();
var _d62=dojo.json.evalJson(this.design_widget_params);
var _d63=_d62.txn_update;
var args={};
args[_d63.colname]=this.value;
js.widget.Texteditor.superclass.saveEdit.call(this,args);
this.editable.innerHTML=this.value;
this.textarea.value=this.value;
}else{
this.doFade=false;
js.widget.Texteditor.superclass.cancelEdit.call(this);
}
},onFinishEdit:function(e){
this.topcontainer.style.display="none";
this.editable.style.display="";
if(this.doFade){
dojo.lfx.highlight(this.editable,dojo.gfx.color.hex2rgb("#ffc"),700).play(300);
}
this.doFade=false;
return true;
}});
dojo.provide("js.widget.Txnqueue");
dojo.widget.defineWidget("js.widget.Txnqueue",dojo.widget.HtmlWidget,{templatePath:null,templateCssPath:null,post_url:"",update_objpath:"",txnqueue:[],scratch:null,qhead:0,qtail:0,retries:0,max_retries:1,error_flag:0,loaded_page:"default",hovering_disabled:false,hovering_obj:null,hovering_layout:null,postCreate:function(args,frag,_d68){
this.scratch=document.createDocumentFragment();
dojo.event.topic.subscribe("save_txn",this,txn_save);
dojo.event.topic.subscribe("new_txn",this,txn_new);
dojo.event.topic.subscribe("edit_txn",this,txn_edit);
dojo.event.topic.subscribe("scratch_txn",this,txn_scratch);
dojo.event.topic.subscribe("onload_pageFrame",this,pageFrame_onload);
dojo.event.topic.subscribe("now_hovering",this,obj_hovering);
dojo.event.topic.subscribe("now_not_hovering",this,obj_not_hovering);
dojo.event.topic.subscribe("now_hovering_layout",this,layout_hovering);
dojo.event.topic.subscribe("now_not_hovering_layout",this,layout_not_hovering);
dojo.event.topic.subscribe("add_hovered_layout",this,layout_add_hovered);
dojo.event.topic.subscribe("edit_hovered_obj",this,obj_edit_hovered);
dojo.event.topic.subscribe("delete_hovered_obj",this,obj_delete_hovered);
dojo.event.topic.subscribe("moveback_hovered_obj",this,obj_moveback_hovered);
dojo.event.topic.subscribe("movefwd_hovered_obj",this,obj_movefwd_hovered);
function pageFrame_onload(){
var _d69=window.frames.pageFrame.location.search;
var page=this.search_querystring(_d69,"page");
if(!page){
return;
}
this.loaded_page=page;
dojo.widget.manager.getWidgetById("qm_message").setContent("Page: "+page);
dojo.debug("page "+page+" loaded");
}
function txn_save(args){
this.save_txn();
}
function txn_new(args){
this.new_txn(args);
}
function txn_edit(args){
this.edit_txn(args);
}
function txn_scratch(args){
this.scratch_txn(args);
}
function obj_hovering(w){
if(this.hovering_disabled){
return;
}
this.hovering_obj=w;
}
function obj_not_hovering(w){
}
function layout_hovering(w){
if(this.hovering_disabled){
return;
}
this.hovering_layout=w;
if(this.hovering_obj&&this.hovering_obj.parent&&this.hovering_obj.parent.widgetId!=w.widgetId){
this.hovering_obj=null;
}
}
function layout_not_hovering(w){
}
function layout_add_hovered(){
dojo.debug("attempting to add an object to last hovered layout");
if(this.hovering_obj){
this.hovering_obj.parent.domNode.onclick();
window.frames.pageFrame.dojo.event.topic.publish("add_layout",this.hovering_obj);
}else{
if(this.hovering_layout){
this.hovering_layout.domNode.onclick();
window.frames.pageFrame.dojo.event.topic.publish("add_layout",null);
}else{
window.frames.pageFrame.dojo.event.topic.publish("add_layout",null);
}
}
}
function obj_edit_hovered(){
dojo.debug("attempting to edit last hovered object"+this.hovering_obj);
if(this.hovering_obj){
this.hovering_obj.parent.domNode.onclick();
this.hovering_obj.onClick();
window.frames.pageFrame.dojo.event.topic.publish("edit_obj");
}
}
function obj_delete_hovered(){
dojo.debug("attempting to delete last hovered object");
if(this.hovering_obj){
this.hovering_obj.parent.domNode.onclick();
this.hovering_obj.onClick();
window.frames.pageFrame.dojo.event.topic.publish("delete_obj");
}
}
function obj_moveback_hovered(){
dojo.debug("attempting to moveback last hovered object");
if(this.hovering_obj){
this.hovering_obj.parent.domNode.onclick();
this.hovering_obj.onClick();
window.frames.pageFrame.dojo.event.topic.publish("moveback_obj");
}
}
function obj_movefwd_hovered(){
dojo.debug("attempting to movefwd last hovered object");
if(this.hovering_obj){
this.hovering_obj.parent.domNode.onclick();
this.hovering_obj.onClick();
window.frames.pageFrame.dojo.event.topic.publish("movefwd_obj");
}
}
},testfunc:function(){
alert("Test");
},new_txn:function(_d73){
var re=new RegExp("^local_");
var _d75=_d73.objpath;
if(_d75.match(re)&&_d73.action=="delete"){
var _d76=this.get_local_txn(_d73.objpath);
this.txnqueue[_d76]=null;
this.debug_dump_queue("after deleting local txn in slot "+_d76);
return;
}
if(this.txnqueue.length>0){
this.qtail++;
}
this.txnqueue[this.qtail]={};
for(var x in _d73){
this.txnqueue[this.qtail][x]=_d73[x];
}
this.debug_dump_queue("after new txn with action "+_d73.action);
},shift_txnqueue:function(){
this.txnqueue[this.qhead]=null;
this.qhead++;
},get_local_txn:function(_d78){
for(var i=0;i<this.txnqueue.length;i++){
if(this.txnqueue[i]&&this.txnqueue[i].local_id&&this.txnqueue[i].local_id==_d78){
return i;
}
}
return -1;
},edit_txn:function(args){
var re=new RegExp("^local_");
if(args.objpath.match(re)){
var _d7c=this.get_local_txn(args.objpath);
if(_d7c<0){
if(this.txnqueue.length>0){
this.qtail++;
}
this.txnqueue[this.qtail]={};
_d7c=this.qtail;
this.txnqueue[_d7c].local_id=args.objpath;
this.txnqueue[_d7c].action="action_update_collection_data";
}
for(var x in args){
if(x!="objpath"){
this.txnqueue[_d7c][x]=args[x];
}
}
}else{
args.action="action_update_collection_data";
this.new_txn(args);
}
this.debug_dump_queue("after editing ");
},timer:null,saving:false,posting:false,post_counter:0,save_txn:function(){
if(this.saving){
return;
}
this.saving=true;
var pbar=dojo.widget.manager.getWidgetById("qm_progressbar");
var qmsg=dojo.widget.manager.getWidgetById("qm_message");
if(qmsg){
qmsg.setContent("Saving ...");
}
if(pbar){
pbar.show();
pbar.setPollInterval(100);
pbar.setMaxProgressValue(this.qtail-this.qhead+2);
pbar.setProgressValue(1);
}
this.timer=setInterval(func,100);
var _d80=this;
function func(){
_d80.post_on_timer();
}
},post_on_timer:function(){
dojo.debug("post_on_timer, posting flag was "+this.posting);
if(this.posting){
return;
}
this.posting=true;
var pbar=dojo.widget.manager.getWidgetById("qm_progressbar");
var qmsg=dojo.widget.manager.getWidgetById("qm_message");
dojo.debug("1");
this.post_txn();
dojo.debug("2");
if(this.error_flag>0){
dojo.debug("3");
clearInterval(this.timer);
this.saving=false;
if(qmsg){
qmsg.setContent("Save failed, please retry ...");
}
}
if(pbar){
dojo.debug("4");
pbar.setProgressValue(this.post_counter);
}
if(this.qhead>this.qtail){
dojo.debug("5");
clearInterval(this.timer);
this.saving=false;
if(qmsg){
qmsg.setContent("Done");
}
if(pbar){
pbar.hide();
}
}else{
dojo.debug("6");
if(pbar){
pbar.setProgressValue(this.post_counter);
}
}
dojo.debug("7");
this.posting=false;
dojo.debug("8");
},scratch_txn:function(args){
var w=args;
w.domNode.display="none";
w.editable.display="none";
this.scratch.appendChild(w.domNode);
this.scratch.appendChild(w.editable);
},retry_txn:function(){
this.post_txn();
},post_txn:function(){
if(!this.txnqueue[this.qhead]){
this.ack_txn(this.qhead,null,null,null);
dojo.debug("post_txn return on empty txn");
return;
}
var _d85=this;
dojo.debug("post_txn going to bind");
dojo.io.bind({method:"post",url:this.post_url,sync:true,content:this.txnqueue[_d85.qhead],load:function(type,data,evt){
_d85.ack_txn(_d85.qhead,type,data,evt);
},error:function(){
_d85.err_txn(_d85.qhead);
}});
dojo.debug("post_txn done");
this.debug_dump_queue("after posting txnqueue");
},ack_txn:function(x,type,data,evt){
dojo.debug("got ack on "+x);
this.error_flag=0;
this.post_counter++;
this.shift_txnqueue();
this.retries=0;
},err_txn:function(x){
this.error_flag=1;
if(this.retries<this.max_retries){
this.retries++;
this.retry_txn();
return;
}
this.abort_txnqueue();
},abort_txnqueue:function(){
alert("save aborted due to errors");
},debug_dump_queue:function(x){
dojo.debug("queue stats "+x+" qhead: "+this.qhead+" qtail: "+this.qtail+" length: "+this.txnqueue.length);
for(var i=this.qhead;i<=this.qtail;i++){
if(!this.txnqueue[i]){
continue;
}
for(var k in this.txnqueue[i]){
dojo.debug("index "+i+": key "+k+": "+dojo.json.serialize(this.txnqueue[i][k]));
}
}
},search_querystring:function(_d91,_d92){
var _d93=_d91.split("&");
var _d94;
for(var i=0;i<_d93.length;i++){
param_tokens=_d93[i].split("=");
if(param_tokens[0]==_d92||param_tokens[0]=="?"+_d92){
_d94=param_tokens[1];
}
}
return _d94;
}});
dojo.provide("dojo.widget.SplitContainer");
dojo.widget.defineWidget("dojo.widget.SplitContainer",dojo.widget.HtmlWidget,function(){
this.sizers=[];
},{isContainer:true,templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/SplitContainer.css"),activeSizing:false,sizerWidth:15,orientation:"horizontal",persist:true,postMixInProperties:function(){
dojo.widget.SplitContainer.superclass.postMixInProperties.apply(this,arguments);
this.isHorizontal=(this.orientation=="horizontal");
},fillInTemplate:function(){
dojo.widget.SplitContainer.superclass.fillInTemplate.apply(this,arguments);
dojo.html.addClass(this.domNode,"dojoSplitContainer");
if(dojo.render.html.moz){
this.domNode.style.overflow="-moz-scrollbars-none";
}
var _d96=dojo.html.getContentBox(this.domNode);
this.paneWidth=_d96.width;
this.paneHeight=_d96.height;
},onResized:function(e){
var _d98=dojo.html.getContentBox(this.domNode);
this.paneWidth=_d98.width;
this.paneHeight=_d98.height;
this._layoutPanels();
},postCreate:function(args,_d9a,_d9b){
dojo.widget.SplitContainer.superclass.postCreate.apply(this,arguments);
for(var i=0;i<this.children.length;i++){
with(this.children[i].domNode.style){
position="absolute";
}
dojo.html.addClass(this.children[i].domNode,"dojoSplitPane");
if(i==this.children.length-1){
break;
}
this._addSizer();
}
if(typeof this.sizerWidth=="object"){
try{
this.sizerWidth=parseInt(this.sizerWidth.toString());
}
catch(e){
this.sizerWidth=15;
}
}
this.virtualSizer=document.createElement("div");
this.virtualSizer.style.position="absolute";
this.virtualSizer.style.display="none";
this.virtualSizer.style.zIndex=10;
this.virtualSizer.className=this.isHorizontal?"dojoSplitContainerVirtualSizerH":"dojoSplitContainerVirtualSizerV";
this.domNode.appendChild(this.virtualSizer);
dojo.html.disableSelection(this.virtualSizer);
if(this.persist){
this._restoreState();
}
this.resizeSoon();
},_injectChild:function(_d9d){
with(_d9d.domNode.style){
position="absolute";
}
dojo.html.addClass(_d9d.domNode,"dojoSplitPane");
},_addSizer:function(){
var i=this.sizers.length;
this.sizers[i]=document.createElement("div");
this.sizers[i].style.position="absolute";
this.sizers[i].className=this.isHorizontal?"dojoSplitContainerSizerH":"dojoSplitContainerSizerV";
var self=this;
var _da0=(function(){
var _da1=i;
return function(e){
self.beginSizing(e,_da1);
};
})();
dojo.event.connect(this.sizers[i],"onmousedown",_da0);
this.domNode.appendChild(this.sizers[i]);
dojo.html.disableSelection(this.sizers[i]);
},removeChild:function(_da3){
if(this.sizers.length>0){
for(var x=0;x<this.children.length;x++){
if(this.children[x]===_da3){
var i=this.sizers.length-1;
this.domNode.removeChild(this.sizers[i]);
this.sizers.length=i;
break;
}
}
}
dojo.widget.SplitContainer.superclass.removeChild.call(this,_da3,arguments);
this.onResized();
},addChild:function(_da6){
dojo.widget.SplitContainer.superclass.addChild.apply(this,arguments);
this._injectChild(_da6);
if(this.children.length>1){
this._addSizer();
}
this._layoutPanels();
},_layoutPanels:function(){
if(this.children.length==0){
return;
}
var _da7=this.isHorizontal?this.paneWidth:this.paneHeight;
if(this.children.length>1){
_da7-=this.sizerWidth*(this.children.length-1);
}
var _da8=0;
for(var i=0;i<this.children.length;i++){
_da8+=this.children[i].sizeShare;
}
var _daa=_da7/_da8;
var _dab=0;
for(var i=0;i<this.children.length-1;i++){
var size=Math.round(_daa*this.children[i].sizeShare);
this.children[i].sizeActual=size;
_dab+=size;
}
this.children[this.children.length-1].sizeActual=_da7-_dab;
this._checkSizes();
var pos=0;
var size=this.children[0].sizeActual;
this._movePanel(this.children[0],pos,size);
this.children[0].position=pos;
pos+=size;
for(var i=1;i<this.children.length;i++){
this._moveSlider(this.sizers[i-1],pos,this.sizerWidth);
this.sizers[i-1].position=pos;
pos+=this.sizerWidth;
size=this.children[i].sizeActual;
this._movePanel(this.children[i],pos,size);
this.children[i].position=pos;
pos+=size;
}
},_movePanel:function(_dae,pos,size){
if(this.isHorizontal){
_dae.domNode.style.left=pos+"px";
_dae.domNode.style.top=0;
_dae.resizeTo(size,this.paneHeight);
}else{
_dae.domNode.style.left=0;
_dae.domNode.style.top=pos+"px";
_dae.resizeTo(this.paneWidth,size);
}
},_moveSlider:function(_db1,pos,size){
if(this.isHorizontal){
_db1.style.left=pos+"px";
_db1.style.top=0;
dojo.html.setMarginBox(_db1,{width:size,height:this.paneHeight});
}else{
_db1.style.left=0;
_db1.style.top=pos+"px";
dojo.html.setMarginBox(_db1,{width:this.paneWidth,height:size});
}
},_growPane:function(_db4,pane){
if(_db4>0){
if(pane.sizeActual>pane.sizeMin){
if((pane.sizeActual-pane.sizeMin)>_db4){
pane.sizeActual=pane.sizeActual-_db4;
_db4=0;
}else{
_db4-=pane.sizeActual-pane.sizeMin;
pane.sizeActual=pane.sizeMin;
}
}
}
return _db4;
},_checkSizes:function(){
var _db6=0;
var _db7=0;
for(var i=0;i<this.children.length;i++){
_db7+=this.children[i].sizeActual;
_db6+=this.children[i].sizeMin;
}
if(_db6<=_db7){
var _db9=0;
for(var i=0;i<this.children.length;i++){
if(this.children[i].sizeActual<this.children[i].sizeMin){
_db9+=this.children[i].sizeMin-this.children[i].sizeActual;
this.children[i].sizeActual=this.children[i].sizeMin;
}
}
if(_db9>0){
if(this.isDraggingLeft){
for(var i=this.children.length-1;i>=0;i--){
_db9=this._growPane(_db9,this.children[i]);
}
}else{
for(var i=0;i<this.children.length;i++){
_db9=this._growPane(_db9,this.children[i]);
}
}
}
}else{
for(var i=0;i<this.children.length;i++){
this.children[i].sizeActual=Math.round(_db7*(this.children[i].sizeMin/_db6));
}
}
},beginSizing:function(e,i){
this.paneBefore=this.children[i];
this.paneAfter=this.children[i+1];
this.isSizing=true;
this.sizingSplitter=this.sizers[i];
this.originPos=dojo.html.getAbsolutePosition(this.children[0].domNode,true,dojo.html.boxSizing.MARGIN_BOX);
if(this.isHorizontal){
var _dbc=(e.layerX?e.layerX:e.offsetX);
var _dbd=e.pageX;
this.originPos=this.originPos.x;
}else{
var _dbc=(e.layerY?e.layerY:e.offsetY);
var _dbd=e.pageY;
this.originPos=this.originPos.y;
}
this.startPoint=this.lastPoint=_dbd;
this.screenToClientOffset=_dbd-_dbc;
this.dragOffset=this.lastPoint-this.paneBefore.sizeActual-this.originPos-this.paneBefore.position;
if(!this.activeSizing){
this._showSizingLine();
}
dojo.event.connect(document.documentElement,"onmousemove",this,"changeSizing");
dojo.event.connect(document.documentElement,"onmouseup",this,"endSizing");
dojo.event.browser.stopEvent(e);
},changeSizing:function(e){
this.lastPoint=this.isHorizontal?e.pageX:e.pageY;
if(this.activeSizing){
this.movePoint();
this._updateSize();
}else{
this.movePoint();
this._moveSizingLine();
}
dojo.event.browser.stopEvent(e);
},endSizing:function(e){
if(!this.activeSizing){
this._hideSizingLine();
}
this._updateSize();
this.isSizing=false;
dojo.event.disconnect(document.documentElement,"onmousemove",this,"changeSizing");
dojo.event.disconnect(document.documentElement,"onmouseup",this,"endSizing");
if(this.persist){
this._saveState(this);
}
},movePoint:function(){
var p=this.lastPoint-this.screenToClientOffset;
var a=p-this.dragOffset;
a=this.legaliseSplitPoint(a);
p=a+this.dragOffset;
this.lastPoint=p+this.screenToClientOffset;
},legaliseSplitPoint:function(a){
a+=this.sizingSplitter.position;
this.isDraggingLeft=(a>0)?true:false;
if(!this.activeSizing){
if(a<this.paneBefore.position+this.paneBefore.sizeMin){
a=this.paneBefore.position+this.paneBefore.sizeMin;
}
if(a>this.paneAfter.position+(this.paneAfter.sizeActual-(this.sizerWidth+this.paneAfter.sizeMin))){
a=this.paneAfter.position+(this.paneAfter.sizeActual-(this.sizerWidth+this.paneAfter.sizeMin));
}
}
a-=this.sizingSplitter.position;
this._checkSizes();
return a;
},_updateSize:function(){
var pos=this.lastPoint-this.dragOffset-this.originPos;
var _dc4=this.paneBefore.position;
var _dc5=this.paneAfter.position+this.paneAfter.sizeActual;
this.paneBefore.sizeActual=pos-_dc4;
this.paneAfter.position=pos+this.sizerWidth;
this.paneAfter.sizeActual=_dc5-this.paneAfter.position;
for(var i=0;i<this.children.length;i++){
this.children[i].sizeShare=this.children[i].sizeActual;
}
this._layoutPanels();
},_showSizingLine:function(){
this._moveSizingLine();
if(this.isHorizontal){
dojo.html.setMarginBox(this.virtualSizer,{width:this.sizerWidth,height:this.paneHeight});
}else{
dojo.html.setMarginBox(this.virtualSizer,{width:this.paneWidth,height:this.sizerWidth});
}
this.virtualSizer.style.display="block";
},_hideSizingLine:function(){
this.virtualSizer.style.display="none";
},_moveSizingLine:function(){
var pos=this.lastPoint-this.startPoint+this.sizingSplitter.position;
if(this.isHorizontal){
this.virtualSizer.style.left=pos+"px";
}else{
var pos=(this.lastPoint-this.startPoint)+this.sizingSplitter.position;
this.virtualSizer.style.top=pos+"px";
}
},_getCookieName:function(i){
return this.widgetId+"_"+i;
},_restoreState:function(){
for(var i=0;i<this.children.length;i++){
var _dca=this._getCookieName(i);
var _dcb=dojo.io.cookie.getCookie(_dca);
if(_dcb!=null){
var pos=parseInt(_dcb);
if(typeof pos=="number"){
this.children[i].sizeShare=pos;
}
}
}
},_saveState:function(){
for(var i=0;i<this.children.length;i++){
var _dce=this._getCookieName(i);
dojo.io.cookie.setCookie(_dce,this.children[i].sizeShare,null,null,null,null);
}
}});
dojo.lang.extend(dojo.widget.Widget,{sizeMin:10,sizeShare:10});
dojo.widget.defineWidget("dojo.widget.SplitContainerPanel",dojo.widget.ContentPane,{});
dojo.provide("dojo.widget.PopupContainer");
dojo.declare("dojo.widget.PopupContainerBase",null,function(){
this.queueOnAnimationFinish=[];
},{isShowingNow:false,currentSubpopup:null,beginZIndex:1000,parentPopup:null,parent:null,popupIndex:0,aroundBox:dojo.html.boxSizing.BORDER_BOX,openedForWindow:null,processKey:function(evt){
return false;
},applyPopupBasicStyle:function(){
with(this.domNode.style){
display="none";
position="absolute";
}
},aboutToShow:function(){
},open:function(x,y,_dd2,_dd3,_dd4,_dd5){
if(this.isShowingNow){
return;
}
if(this.animationInProgress){
this.queueOnAnimationFinish.push(this.open,arguments);
return;
}
this.aboutToShow();
var _dd6=false,node,_dd8;
if(typeof x=="object"){
node=x;
_dd8=_dd3;
_dd3=_dd2;
_dd2=y;
_dd6=true;
}
this.parent=_dd2;
dojo.body().appendChild(this.domNode);
_dd3=_dd3||_dd2["domNode"]||[];
var _dd9=null;
this.isTopLevel=true;
while(_dd2){
if(_dd2!==this&&(_dd2.setOpenedSubpopup!=undefined&&_dd2.applyPopupBasicStyle!=undefined)){
_dd9=_dd2;
this.isTopLevel=false;
_dd9.setOpenedSubpopup(this);
break;
}
_dd2=_dd2.parent;
}
this.parentPopup=_dd9;
this.popupIndex=_dd9?_dd9.popupIndex+1:1;
if(this.isTopLevel){
var _dda=dojo.html.isNode(_dd3)?_dd3:null;
dojo.widget.PopupManager.opened(this,_dda);
}
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(_dd3 instanceof Array){
_dd3={left:_dd3[0],top:_dd3[1],width:0,height:0};
}
with(this.domNode.style){
display="";
zIndex=this.beginZIndex+this.popupIndex;
}
if(_dd6){
this.move(node,_dd5,_dd8);
}else{
this.move(x,y,_dd5,_dd4);
}
this.domNode.style.display="none";
this.explodeSrc=_dd3;
this.show();
this.isShowingNow=true;
},move:function(x,y,_ddd,_dde){
var _ddf=(typeof x=="object");
if(_ddf){
var _de0=_ddd;
var node=x;
_ddd=y;
if(!_de0){
_de0={"BL":"TL","TL":"BL"};
}
dojo.html.placeOnScreenAroundElement(this.domNode,node,_ddd,this.aroundBox,_de0);
}else{
if(!_dde){
_dde="TL,TR,BL,BR";
}
dojo.html.placeOnScreen(this.domNode,x,y,_ddd,true,_dde);
}
},close:function(_de2){
if(_de2){
this.domNode.style.display="none";
}
if(this.animationInProgress){
this.queueOnAnimationFinish.push(this.close,[]);
return;
}
this.closeSubpopup(_de2);
this.hide();
if(this.bgIframe){
this.bgIframe.hide();
this.bgIframe.size({left:0,top:0,width:0,height:0});
}
if(this.isTopLevel){
dojo.widget.PopupManager.closed(this);
}
this.isShowingNow=false;
if(this.parent){
setTimeout(dojo.lang.hitch(this,function(){
try{
if(this.parent["focus"]){
this.parent.focus();
}else{
this.parent.domNode.focus();
}
}
catch(e){
dojo.debug("No idea how to focus to parent",e);
}
}),10);
}
if(this._bookmark&&dojo.withGlobal(this.openedForWindow||dojo.global(),dojo.html.selection.isCollapsed)){
if(this.openedForWindow){
this.openedForWindow.focus();
}
try{
dojo.withGlobal(this.openedForWindow||dojo.global(),"moveToBookmark",dojo.html.selection,[this._bookmark]);
}
catch(e){
}
}
this._bookmark=null;
},closeAll:function(_de3){
if(this.parentPopup){
this.parentPopup.closeAll(_de3);
}else{
this.close(_de3);
}
},setOpenedSubpopup:function(_de4){
this.currentSubpopup=_de4;
},closeSubpopup:function(_de5){
if(this.currentSubpopup==null){
return;
}
this.currentSubpopup.close(_de5);
this.currentSubpopup=null;
},onShow:function(){
dojo.widget.PopupContainer.superclass.onShow.apply(this,arguments);
this.openedSize={w:this.domNode.style.width,h:this.domNode.style.height};
if(dojo.render.html.ie){
if(!this.bgIframe){
this.bgIframe=new dojo.html.BackgroundIframe();
this.bgIframe.setZIndex(this.domNode);
}
this.bgIframe.size(this.domNode);
this.bgIframe.show();
}
this.processQueue();
},processQueue:function(){
if(!this.queueOnAnimationFinish.length){
return;
}
var func=this.queueOnAnimationFinish.shift();
var args=this.queueOnAnimationFinish.shift();
func.apply(this,args);
},onHide:function(){
dojo.widget.HtmlWidget.prototype.onHide.call(this);
if(this.openedSize){
with(this.domNode.style){
width=this.openedSize.w;
height=this.openedSize.h;
}
}
this.processQueue();
}});
dojo.widget.defineWidget("dojo.widget.PopupContainer",[dojo.widget.HtmlWidget,dojo.widget.PopupContainerBase],{isContainer:true,fillInTemplate:function(){
this.applyPopupBasicStyle();
dojo.widget.PopupContainer.superclass.fillInTemplate.apply(this,arguments);
}});
dojo.widget.PopupManager=new function(){
this.currentMenu=null;
this.currentButton=null;
this.currentFocusMenu=null;
this.focusNode=null;
this.registeredWindows=[];
this.registerWin=function(win){
if(!win.__PopupManagerRegistered){
dojo.event.connect(win.document,"onmousedown",this,"onClick");
dojo.event.connect(win,"onscroll",this,"onClick");
dojo.event.connect(win.document,"onkey",this,"onKey");
win.__PopupManagerRegistered=true;
this.registeredWindows.push(win);
}
};
this.registerAllWindows=function(_de9){
if(!_de9){
_de9=dojo.html.getDocumentWindow(window.top&&window.top.document||window.document);
}
this.registerWin(_de9);
for(var i=0;i<_de9.frames.length;i++){
try{
var win=dojo.html.getDocumentWindow(_de9.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,_df0){
if(menu==this.currentMenu){
return;
}
if(this.currentMenu){
this.currentMenu.close();
}
this.currentMenu=menu;
this.currentFocusMenu=menu;
this.currentButton=_df0;
};
this.setFocusedMenu=function(menu){
this.currentFocusMenu=menu;
};
this.onKey=function(e){
if(!e.key){
return;
}
if(!this.currentMenu||!this.currentMenu.isShowingNow){
return;
}
var m=this.currentFocusMenu;
while(m){
if(m.processKey(e)){
e.preventDefault();
e.stopPropagation();
break;
}
m=m.parentPopup||m.parentMenu;
}
},this.onClick=function(e){
if(!this.currentMenu){
return;
}
var _df5=dojo.html.getScroll().offset;
var m=this.currentMenu;
while(m){
if(dojo.html.overElement(m.domNode,e)||dojo.html.isDescendantOf(e.target,m.domNode)){
return;
}
m=m.currentSubpopup;
}
if(this.currentButton&&dojo.html.overElement(this.currentButton,e)){
return;
}
this.currentMenu.closeAll(true);
};
};
dojo.provide("dojo.widget.Menu2");
dojo.declare("dojo.widget.MenuBase",null,function(){
this.eventNames={open:""};
},{isContainer:true,isMenu:true,eventNaming:"default",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/Menu2.css"),submenuDelay:500,initialize:function(args,frag){
if(this.eventNaming=="default"){
for(var _df9 in this.eventNames){
this.eventNames[_df9]=this.widgetId+"/"+_df9;
}
}
},_moveToNext:function(evt){
this._highlightOption(1);
return true;
},_moveToPrevious:function(evt){
this._highlightOption(-1);
return true;
},_moveToParentMenu:function(evt){
if(this._highlighted_option&&this.parentMenu){
if(evt._menu2UpKeyProcessed){
return true;
}else{
this._highlighted_option.onUnhover();
this.closeSubmenu();
evt._menu2UpKeyProcessed=true;
}
}
return false;
},_moveToChildMenu:function(evt){
if(this._highlighted_option&&this._highlighted_option.submenuId){
this._highlighted_option._onClick(true);
return true;
}
return false;
},_selectCurrentItem:function(evt){
if(this._highlighted_option){
this._highlighted_option._onClick();
return true;
}
return false;
},processKey:function(evt){
if(evt.ctrlKey||evt.altKey||!evt.key){
return false;
}
var rval=false;
switch(evt.key){
case evt.KEY_DOWN_ARROW:
rval=this._moveToNext(evt);
break;
case evt.KEY_UP_ARROW:
rval=this._moveToPrevious(evt);
break;
case evt.KEY_RIGHT_ARROW:
rval=this._moveToChildMenu(evt);
break;
case evt.KEY_LEFT_ARROW:
rval=this._moveToParentMenu(evt);
break;
case " ":
case evt.KEY_ENTER:
if(rval=this._selectCurrentItem(evt)){
break;
}
case evt.KEY_ESCAPE:
case evt.KEY_TAB:
this.close(true);
rval=true;
break;
}
return rval;
},_findValidItem:function(dir,_e02){
if(_e02){
_e02=dir>0?_e02.getNextSibling():_e02.getPreviousSibling();
}
for(var i=0;i<this.children.length;++i){
if(!_e02){
_e02=dir>0?this.children[0]:this.children[this.children.length-1];
}
if(_e02.onHover&&_e02.isShowing()){
return _e02;
}
_e02=dir>0?_e02.getNextSibling():_e02.getPreviousSibling();
}
},_highlightOption:function(dir){
var item;
if((!this._highlighted_option)){
item=this._findValidItem(dir);
}else{
item=this._findValidItem(dir,this._highlighted_option);
}
if(item){
if(this._highlighted_option){
this._highlighted_option.onUnhover();
}
item.onHover();
dojo.html.scrollIntoView(item.domNode);
try{
var node=dojo.html.getElementsByClass("dojoMenuItem2Label",item.domNode)[0];
node.focus();
}
catch(e){
}
}
},onItemClick:function(item){
},closeSubmenu:function(_e08){
if(this.currentSubmenu==null){
return;
}
this.currentSubmenu.close(_e08);
this.currentSubmenu=null;
this.currentSubmenuTrigger.is_open=false;
this.currentSubmenuTrigger._closedSubmenu(_e08);
this.currentSubmenuTrigger=null;
}});
dojo.widget.defineWidget("dojo.widget.PopupMenu2",[dojo.widget.HtmlWidget,dojo.widget.PopupContainerBase,dojo.widget.MenuBase],function(){
this.targetNodeIds=[];
},{templateString:"<table class=\"dojoPopupMenu2\" border=0 cellspacing=0 cellpadding=0 style=\"display: none; position: absolute;\">"+"<tbody dojoAttachPoint=\"containerNode\"></tbody>"+"</table>",submenuOverlap:5,contextMenuForWindow:false,parentMenu:null,postCreate:function(){
if(this.contextMenuForWindow){
var doc=dojo.body();
this.bindDomNode(doc);
}else{
if(this.targetNodeIds.length>0){
dojo.lang.forEach(this.targetNodeIds,this.bindDomNode,this);
}
}
this._subscribeSubitemsOnOpen();
},_subscribeSubitemsOnOpen:function(){
var _e0a=this.getChildrenOfType(dojo.widget.MenuItem2);
for(var i=0;i<_e0a.length;i++){
dojo.event.topic.subscribe(this.eventNames.open,_e0a[i],"menuOpen");
}
},getTopOpenEvent:function(){
var menu=this;
while(menu.parentMenu){
menu=menu.parentMenu;
}
return menu.openEvent;
},bindDomNode:function(node){
node=dojo.byId(node);
var win=dojo.html.getElementWindow(node);
if(dojo.html.isTag(node,"iframe")=="iframe"){
win=dojo.html.iframeContentWindow(node);
node=dojo.withGlobal(win,dojo.body);
}
dojo.widget.Menu2.OperaAndKonqFixer.fixNode(node);
dojo.event.kwConnect({srcObj:node,srcFunc:"oncontextmenu",targetObj:this,targetFunc:"onOpen",once:true});
if(dojo.render.html.moz&&win.document.designMode.toLowerCase()=="on"){
dojo.event.browser.addListener(node,"contextmenu",dojo.lang.hitch(this,"onOpen"));
}
dojo.widget.PopupManager.registerWin(win);
},unBindDomNode:function(_e0f){
var node=dojo.byId(_e0f);
dojo.event.kwDisconnect({srcObj:node,srcFunc:"oncontextmenu",targetObj:this,targetFunc:"onOpen",once:true});
dojo.widget.Menu2.OperaAndKonqFixer.cleanNode(node);
},_openAsSubmenu:function(_e11,_e12,_e13){
if(this.isShowingNow){
return;
}
this.parentMenu=_e11;
this.open(_e12,_e11,_e12,_e13);
},close:function(_e14){
if(this.animationInProgress){
dojo.widget.PopupContainerBase.prototype.close.call(this,_e14);
return;
}
if(this._highlighted_option){
this._highlighted_option.onUnhover();
}
dojo.widget.PopupContainerBase.prototype.close.call(this,_e14);
this.parentMenu=null;
},closeAll:function(_e15){
if(this.parentMenu){
this.parentMenu.closeAll(_e15);
}else{
this.close(_e15);
}
},_openSubmenu:function(_e16,_e17){
_e16._openAsSubmenu(this,_e17.arrow,{"TR":"TL","TL":"TR"});
this.currentSubmenu=_e16;
this.currentSubmenuTrigger=_e17;
this.currentSubmenuTrigger.is_open=true;
},focus:function(){
if(this.currentSubmenuTrigger){
if(this.currentSubmenuTrigger.caption){
try{
this.currentSubmenuTrigger.caption.focus();
}
catch(e){
}
}else{
try{
this.currentSubmenuTrigger.domNode.focus();
}
catch(e){
}
}
}
},onOpen:function(e){
this.openEvent=e;
if(e["target"]){
this.openedForWindow=dojo.html.getElementWindow(e.target);
}else{
this.openedForWindow=null;
}
var x=e.pageX,y=e.pageY;
var win=dojo.html.getElementWindow(e.target);
var _e1c=win._frameElement||win.frameElement;
if(_e1c){
var cood=dojo.html.abs(_e1c,true);
x+=cood.x-dojo.withGlobal(win,dojo.html.getScroll).left;
y+=cood.y-dojo.withGlobal(win,dojo.html.getScroll).top;
}
this.open(x,y,null,[x,y]);
dojo.event.browser.stopEvent(e);
}});
dojo.widget.defineWidget("dojo.widget.MenuItem2",dojo.widget.HtmlWidget,function(){
this.eventNames={engage:""};
},{templateString:"<tr class=\"dojoMenuItem2\" dojoAttachEvent=\"onMouseOver: onHover; onMouseOut: onUnhover; onClick: _onClick; onKey:onKey;\">"+"<td><div class=\"${this.iconClass}\" style=\"${this.iconStyle}\"></div></td>"+"<td tabIndex=\"-1\" class=\"dojoMenuItem2Label\" dojoAttachPoint=\"caption\">${this.caption}</td>"+"<td class=\"dojoMenuItem2Accel\">${this.accelKey}</td>"+"<td><div class=\"dojoMenuItem2Submenu\" style=\"display:${this.arrowDisplay};\" dojoAttachPoint=\"arrow\"></div></td>"+"</tr>",is_hovering:false,hover_timer:null,is_open:false,topPosition:0,caption:"Untitled",accelKey:"",iconSrc:"",disabledClass:"dojoMenuItem2Disabled",iconClass:"dojoMenuItem2Icon",submenuId:"",eventNaming:"default",highlightClass:"dojoMenuItem2Hover",postMixInProperties:function(){
this.iconStyle="";
if(this.iconSrc){
if((this.iconSrc.toLowerCase().substring(this.iconSrc.length-4)==".png")&&(dojo.render.html.ie55||dojo.render.html.ie60)){
this.iconStyle="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.iconSrc+"', sizingMethod='image')";
}else{
this.iconStyle="background-image: url("+this.iconSrc+")";
}
}
this.arrowDisplay=this.submenuId?"block":"none";
dojo.widget.MenuItem2.superclass.postMixInProperties.apply(this,arguments);
},fillInTemplate:function(){
dojo.html.disableSelection(this.domNode);
if(this.disabled){
this.setDisabled(true);
}
if(this.eventNaming=="default"){
for(var _e1e in this.eventNames){
this.eventNames[_e1e]=this.widgetId+"/"+_e1e;
}
}
},onHover:function(){
this.onUnhover();
if(this.is_hovering){
return;
}
if(this.is_open){
return;
}
if(this.parent._highlighted_option){
this.parent._highlighted_option.onUnhover();
}
this.parent.closeSubmenu();
this.parent._highlighted_option=this;
dojo.widget.PopupManager.setFocusedMenu(this.parent);
this._highlightItem();
if(this.is_hovering){
this._stopSubmenuTimer();
}
this.is_hovering=true;
this._startSubmenuTimer();
},onUnhover:function(){
if(!this.is_open){
this._unhighlightItem();
}
this.is_hovering=false;
this.parent._highlighted_option=null;
if(this.parent.parentMenu){
dojo.widget.PopupManager.setFocusedMenu(this.parent.parentMenu);
}
this._stopSubmenuTimer();
},_onClick:function(_e1f){
var _e20=false;
if(this.disabled){
return false;
}
if(this.submenuId){
if(!this.is_open){
this._stopSubmenuTimer();
this._openSubmenu();
}
_e20=true;
}else{
this.onUnhover();
this.parent.closeAll(true);
}
this.onClick();
dojo.event.topic.publish(this.eventNames.engage,this);
if(_e20&&_e1f){
dojo.widget.getWidgetById(this.submenuId)._highlightOption(1);
}
return;
},onClick:function(){
this.parent.onItemClick(this);
},_highlightItem:function(){
dojo.html.addClass(this.domNode,this.highlightClass);
},_unhighlightItem:function(){
dojo.html.removeClass(this.domNode,this.highlightClass);
},_startSubmenuTimer:function(){
this._stopSubmenuTimer();
if(this.disabled){
return;
}
var self=this;
var _e22=function(){
return function(){
self._openSubmenu();
};
}();
this.hover_timer=dojo.lang.setTimeout(_e22,this.parent.submenuDelay);
},_stopSubmenuTimer:function(){
if(this.hover_timer){
dojo.lang.clearTimeout(this.hover_timer);
this.hover_timer=null;
}
},_openSubmenu:function(){
if(this.disabled){
return;
}
this.parent.closeSubmenu();
var _e23=dojo.widget.getWidgetById(this.submenuId);
if(_e23){
this.parent._openSubmenu(_e23,this);
}
},_closedSubmenu:function(){
this.onUnhover();
},setDisabled:function(_e24){
this.disabled=_e24;
if(this.disabled){
dojo.html.addClass(this.domNode,this.disabledClass);
}else{
dojo.html.removeClass(this.domNode,this.disabledClass);
}
},enable:function(){
this.setDisabled(false);
},disable:function(){
this.setDisabled(true);
},menuOpen:function(_e25){
}});
dojo.widget.defineWidget("dojo.widget.MenuSeparator2",dojo.widget.HtmlWidget,{templateString:"<tr class=\"dojoMenuSeparator2\"><td colspan=4>"+"<div class=\"dojoMenuSeparator2Top\"></div>"+"<div class=\"dojoMenuSeparator2Bottom\"></div>"+"</td></tr>",postCreate:function(){
dojo.html.disableSelection(this.domNode);
}});
dojo.widget.defineWidget("dojo.widget.MenuBar2",[dojo.widget.HtmlWidget,dojo.widget.MenuBase],{menuOverlap:2,templateString:"<div class=\"dojoMenuBar2\" dojoAttachPoint=\"containerNode\" tabIndex=\"0\"></div>",close:function(_e26){
if(this._highlighted_option){
this._highlighted_option.onUnhover();
}
this.closeSubmenu(_e26);
},closeAll:function(_e27){
this.close(_e27);
},processKey:function(evt){
if(evt.ctrlKey||evt.altKey){
return false;
}
var rval=false;
switch(evt.key){
case evt.KEY_DOWN_ARROW:
rval=this._moveToChildMenu(evt);
break;
case evt.KEY_UP_ARROW:
rval=this._moveToParentMenu(evt);
break;
case evt.KEY_RIGHT_ARROW:
rval=this._moveToNext(evt);
break;
case evt.KEY_LEFT_ARROW:
rval=this._moveToPrevious(evt);
break;
default:
rval=dojo.widget.MenuBar2.superclass.processKey.apply(this,arguments);
break;
}
return rval;
},postCreate:function(){
dojo.widget.MenuBar2.superclass.postCreate.apply(this,arguments);
this.isShowingNow=true;
},_openSubmenu:function(_e2a,_e2b){
_e2a._openAsSubmenu(this,_e2b.domNode,{"BL":"TL","TL":"BL"});
this.currentSubmenu=_e2a;
this.currentSubmenuTrigger=_e2b;
this.currentSubmenuTrigger.is_open=true;
}});
dojo.widget.defineWidget("dojo.widget.MenuBarItem2",dojo.widget.MenuItem2,{templateString:"<span class=\"dojoMenuItem2\" dojoAttachEvent=\"onMouseOver: onHover; onMouseOut: onUnhover; onClick: _onClick;\">${this.caption}</span>"});
dojo.widget.Menu2.OperaAndKonqFixer=new function(){
var _e2c=true;
var _e2d=false;
if(!dojo.lang.isFunction(dojo.doc().oncontextmenu)){
dojo.doc().oncontextmenu=function(){
_e2c=false;
_e2d=true;
};
}
if(dojo.doc().createEvent){
try{
var e=dojo.doc().createEvent("MouseEvents");
e.initMouseEvent("contextmenu",1,1,dojo.global(),1,0,0,0,0,0,0,0,0,0,null);
dojo.doc().dispatchEvent(e);
}
catch(e){
}
}else{
_e2c=false;
}
if(_e2d){
delete dojo.doc().oncontextmenu;
}
this.fixNode=function(node){
if(_e2c){
if(!dojo.lang.isFunction(node.oncontextmenu)){
node.oncontextmenu=function(e){
};
}
if(dojo.render.html.opera){
node._menufixer_opera=function(e){
if(e.ctrlKey){
this.oncontextmenu(e);
}
};
dojo.event.connect(node,"onclick",node,"_menufixer_opera");
}else{
node._menufixer_konq=function(e){
if(e.button==2){
e.preventDefault();
this.oncontextmenu(e);
}
};
dojo.event.connect(node,"onmousedown",node,"_menufixer_konq");
}
}
};
this.cleanNode=function(node){
if(_e2c){
if(node._menufixer_opera){
dojo.event.disconnect(node,"onclick",node,"_menufixer_opera");
delete node._menufixer_opera;
}else{
if(node._menufixer_konq){
dojo.event.disconnect(node,"onmousedown",node,"_menufixer_konq");
delete node._menufixer_konq;
}
}
if(node.oncontextmenu){
delete node.oncontextmenu;
}
}
};
};
dojo.provide("dojo.widget.Toolbar");
dojo.widget.defineWidget("dojo.widget.ToolbarContainer",dojo.widget.HtmlWidget,{isContainer:true,templateString:"<div class=\"toolbarContainer\" dojoAttachPoint=\"containerNode\"></div>",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/Toolbar.css"),getItem:function(name){
if(name instanceof dojo.widget.ToolbarItem){
return name;
}
for(var i=0;i<this.children.length;i++){
var _e36=this.children[i];
if(_e36 instanceof dojo.widget.Toolbar){
var item=_e36.getItem(name);
if(item){
return item;
}
}
}
return null;
},getItems:function(){
var _e38=[];
for(var i=0;i<this.children.length;i++){
var _e3a=this.children[i];
if(_e3a instanceof dojo.widget.Toolbar){
_e38=_e38.concat(_e3a.getItems());
}
}
return _e38;
},enable:function(){
for(var i=0;i<this.children.length;i++){
var _e3c=this.children[i];
if(_e3c instanceof dojo.widget.Toolbar){
_e3c.enable.apply(_e3c,arguments);
}
}
},disable:function(){
for(var i=0;i<this.children.length;i++){
var _e3e=this.children[i];
if(_e3e instanceof dojo.widget.Toolbar){
_e3e.disable.apply(_e3e,arguments);
}
}
},select:function(name){
for(var i=0;i<this.children.length;i++){
var _e41=this.children[i];
if(_e41 instanceof dojo.widget.Toolbar){
_e41.select(arguments);
}
}
},deselect:function(name){
for(var i=0;i<this.children.length;i++){
var _e44=this.children[i];
if(_e44 instanceof dojo.widget.Toolbar){
_e44.deselect(arguments);
}
}
},getItemsState:function(){
var _e45={};
for(var i=0;i<this.children.length;i++){
var _e47=this.children[i];
if(_e47 instanceof dojo.widget.Toolbar){
dojo.lang.mixin(_e45,_e47.getItemsState());
}
}
return _e45;
},getItemsActiveState:function(){
var _e48={};
for(var i=0;i<this.children.length;i++){
var _e4a=this.children[i];
if(_e4a instanceof dojo.widget.Toolbar){
dojo.lang.mixin(_e48,_e4a.getItemsActiveState());
}
}
return _e48;
},getItemsSelectedState:function(){
var _e4b={};
for(var i=0;i<this.children.length;i++){
var _e4d=this.children[i];
if(_e4d instanceof dojo.widget.Toolbar){
dojo.lang.mixin(_e4b,_e4d.getItemsSelectedState());
}
}
return _e4b;
}});
dojo.widget.defineWidget("dojo.widget.Toolbar",dojo.widget.HtmlWidget,{isContainer:true,templateString:"<div class=\"toolbar\" dojoAttachPoint=\"containerNode\" unselectable=\"on\" dojoOnMouseover=\"_onmouseover\" dojoOnMouseout=\"_onmouseout\" dojoOnClick=\"_onclick\" dojoOnMousedown=\"_onmousedown\" dojoOnMouseup=\"_onmouseup\"></div>",_getItem:function(node){
var _e4f=new Date();
var _e50=null;
while(node&&node!=this.domNode){
if(dojo.html.hasClass(node,"toolbarItem")){
var _e51=dojo.widget.manager.getWidgetsByFilter(function(w){
return w.domNode==node;
});
if(_e51.length==1){
_e50=_e51[0];
break;
}else{
if(_e51.length>1){
dojo.raise("Toolbar._getItem: More than one widget matches the node");
}
}
}
node=node.parentNode;
}
return _e50;
},_onmouseover:function(e){
var _e54=this._getItem(e.target);
if(_e54&&_e54._onmouseover){
_e54._onmouseover(e);
}
},_onmouseout:function(e){
var _e56=this._getItem(e.target);
if(_e56&&_e56._onmouseout){
_e56._onmouseout(e);
}
},_onclick:function(e){
var _e58=this._getItem(e.target);
if(_e58&&_e58._onclick){
_e58._onclick(e);
}
},_onmousedown:function(e){
var _e5a=this._getItem(e.target);
if(_e5a&&_e5a._onmousedown){
_e5a._onmousedown(e);
}
},_onmouseup:function(e){
var _e5c=this._getItem(e.target);
if(_e5c&&_e5c._onmouseup){
_e5c._onmouseup(e);
}
},addChild:function(item,pos,_e5f){
var _e60=dojo.widget.ToolbarItem.make(item,null,_e5f);
var ret=dojo.widget.Toolbar.superclass.addChild.call(this,_e60,null,pos,null);
return ret;
},push:function(){
for(var i=0;i<arguments.length;i++){
this.addChild(arguments[i]);
}
},getItem:function(name){
if(name instanceof dojo.widget.ToolbarItem){
return name;
}
for(var i=0;i<this.children.length;i++){
var _e65=this.children[i];
if(_e65 instanceof dojo.widget.ToolbarItem&&_e65._name==name){
return _e65;
}
}
return null;
},getItems:function(){
var _e66=[];
for(var i=0;i<this.children.length;i++){
var _e68=this.children[i];
if(_e68 instanceof dojo.widget.ToolbarItem){
_e66.push(_e68);
}
}
return _e66;
},getItemsState:function(){
var _e69={};
for(var i=0;i<this.children.length;i++){
var _e6b=this.children[i];
if(_e6b instanceof dojo.widget.ToolbarItem){
_e69[_e6b._name]={selected:_e6b._selected,enabled:!_e6b.disabled};
}
}
return _e69;
},getItemsActiveState:function(){
var _e6c=this.getItemsState();
for(var item in _e6c){
_e6c[item]=_e6c[item].enabled;
}
return _e6c;
},getItemsSelectedState:function(){
var _e6e=this.getItemsState();
for(var item in _e6e){
_e6e[item]=_e6e[item].selected;
}
return _e6e;
},enable:function(){
var _e70=arguments.length?arguments:this.children;
for(var i=0;i<_e70.length;i++){
var _e72=this.getItem(_e70[i]);
if(_e72 instanceof dojo.widget.ToolbarItem){
_e72.enable(false,true);
}
}
},disable:function(){
var _e73=arguments.length?arguments:this.children;
for(var i=0;i<_e73.length;i++){
var _e75=this.getItem(_e73[i]);
if(_e75 instanceof dojo.widget.ToolbarItem){
_e75.disable();
}
}
},select:function(){
for(var i=0;i<arguments.length;i++){
var name=arguments[i];
var item=this.getItem(name);
if(item){
item.select();
}
}
},deselect:function(){
for(var i=0;i<arguments.length;i++){
var name=arguments[i];
var item=this.getItem(name);
if(item){
item.disable();
}
}
},setValue:function(){
for(var i=0;i<arguments.length;i+=2){
var name=arguments[i],_e7e=arguments[i+1];
var item=this.getItem(name);
if(item){
if(item instanceof dojo.widget.ToolbarItem){
item.setValue(_e7e);
}
}
}
}});
dojo.widget.defineWidget("dojo.widget.ToolbarItem",dojo.widget.HtmlWidget,{templateString:"<span unselectable=\"on\" class=\"toolbarItem\"></span>",_name:null,getName:function(){
return this._name;
},setName:function(_e80){
return (this._name=_e80);
},getValue:function(){
return this.getName();
},setValue:function(_e81){
return this.setName(_e81);
},_selected:false,isSelected:function(){
return this._selected;
},setSelected:function(is,_e83,_e84){
if(!this._toggleItem&&!_e83){
return;
}
is=Boolean(is);
if(_e83||!this.disabled&&this._selected!=is){
this._selected=is;
this.update();
if(!_e84){
this._fireEvent(is?"onSelect":"onDeselect");
this._fireEvent("onChangeSelect");
}
}
},select:function(_e85,_e86){
return this.setSelected(true,_e85,_e86);
},deselect:function(_e87,_e88){
return this.setSelected(false,_e87,_e88);
},_toggleItem:false,isToggleItem:function(){
return this._toggleItem;
},setToggleItem:function(_e89){
this._toggleItem=Boolean(_e89);
},toggleSelected:function(_e8a){
return this.setSelected(!this._selected,_e8a);
},isEnabled:function(){
return !this.disabled;
},setEnabled:function(is,_e8c,_e8d){
is=Boolean(is);
if(_e8c||this.disabled==is){
this.disabled=!is;
this.update();
if(!_e8d){
this._fireEvent(this.disabled?"onDisable":"onEnable");
this._fireEvent("onChangeEnabled");
}
}
return !this.disabled;
},enable:function(_e8e,_e8f){
return this.setEnabled(true,_e8e,_e8f);
},disable:function(_e90,_e91){
return this.setEnabled(false,_e90,_e91);
},toggleEnabled:function(_e92,_e93){
return this.setEnabled(this.disabled,_e92,_e93);
},_icon:null,getIcon:function(){
return this._icon;
},setIcon:function(_e94){
var icon=dojo.widget.Icon.make(_e94);
if(this._icon){
this._icon.setIcon(icon);
}else{
this._icon=icon;
}
var _e96=this._icon.getNode();
if(_e96.parentNode!=this.domNode){
if(this.domNode.hasChildNodes()){
this.domNode.insertBefore(_e96,this.domNode.firstChild);
}else{
this.domNode.appendChild(_e96);
}
}
return this._icon;
},_label:"",getLabel:function(){
return this._label;
},setLabel:function(_e97){
var ret=(this._label=_e97);
if(!this.labelNode){
this.labelNode=document.createElement("span");
this.domNode.appendChild(this.labelNode);
}
this.labelNode.innerHTML="";
this.labelNode.appendChild(document.createTextNode(this._label));
this.update();
return ret;
},update:function(){
if(this.disabled){
this._selected=false;
dojo.html.addClass(this.domNode,"disabled");
dojo.html.removeClass(this.domNode,"down");
dojo.html.removeClass(this.domNode,"hover");
}else{
dojo.html.removeClass(this.domNode,"disabled");
if(this._selected){
dojo.html.addClass(this.domNode,"selected");
}else{
dojo.html.removeClass(this.domNode,"selected");
}
}
this._updateIcon();
},_updateIcon:function(){
if(this._icon){
if(this.disabled){
this._icon.disable();
}else{
if(this._cssHover){
this._icon.hover();
}else{
if(this._selected){
this._icon.select();
}else{
this._icon.enable();
}
}
}
}
},_fireEvent:function(evt){
if(typeof this[evt]=="function"){
var args=[this];
for(var i=1;i<arguments.length;i++){
args.push(arguments[i]);
}
this[evt].apply(this,args);
}
},_onmouseover:function(e){
if(this.disabled){
return;
}
dojo.html.addClass(this.domNode,"hover");
this._fireEvent("onMouseOver");
},_onmouseout:function(e){
dojo.html.removeClass(this.domNode,"hover");
dojo.html.removeClass(this.domNode,"down");
if(!this._selected){
dojo.html.removeClass(this.domNode,"selected");
}
this._fireEvent("onMouseOut");
},_onclick:function(e){
if(!this.disabled&&!this._toggleItem){
this._fireEvent("onClick");
}
},_onmousedown:function(e){
if(e.preventDefault){
e.preventDefault();
}
if(this.disabled){
return;
}
dojo.html.addClass(this.domNode,"down");
if(this._toggleItem){
if(this.parent.preventDeselect&&this._selected){
return;
}
this.toggleSelected();
}
this._fireEvent("onMouseDown");
},_onmouseup:function(e){
dojo.html.removeClass(this.domNode,"down");
this._fireEvent("onMouseUp");
},onClick:function(){
},onMouseOver:function(){
},onMouseOut:function(){
},onMouseDown:function(){
},onMouseUp:function(){
},fillInTemplate:function(args,frag){
if(args.name){
this._name=args.name;
}
if(args.selected){
this.select();
}
if(args.disabled){
this.disable();
}
if(args.label){
this.setLabel(args.label);
}
if(args.icon){
this.setIcon(args.icon);
}
if(args.toggleitem||args.toggleItem){
this.setToggleItem(true);
}
}});
dojo.widget.ToolbarItem.make=function(wh,_ea4,_ea5){
var item=null;
if(wh instanceof Array){
item=dojo.widget.createWidget("ToolbarButtonGroup",_ea5);
item.setName(wh[0]);
for(var i=1;i<wh.length;i++){
item.addChild(wh[i]);
}
}else{
if(wh instanceof dojo.widget.ToolbarItem){
item=wh;
}else{
if(wh instanceof dojo.uri.Uri){
item=dojo.widget.createWidget("ToolbarButton",dojo.lang.mixin(_ea5||{},{icon:new dojo.widget.Icon(wh.toString())}));
}else{
if(_ea4){
item=dojo.widget.createWidget(wh,_ea5);
}else{
if(typeof wh=="string"||wh instanceof String){
switch(wh.charAt(0)){
case "|":
case "-":
case "/":
item=dojo.widget.createWidget("ToolbarSeparator",_ea5);
break;
case " ":
if(wh.length==1){
item=dojo.widget.createWidget("ToolbarSpace",_ea5);
}else{
item=dojo.widget.createWidget("ToolbarFlexibleSpace",_ea5);
}
break;
default:
if(/\.(gif|jpg|jpeg|png)$/i.test(wh)){
item=dojo.widget.createWidget("ToolbarButton",dojo.lang.mixin(_ea5||{},{icon:new dojo.widget.Icon(wh.toString())}));
}else{
item=dojo.widget.createWidget("ToolbarButton",dojo.lang.mixin(_ea5||{},{label:wh.toString()}));
}
}
}else{
if(wh&&wh.tagName&&/^img$/i.test(wh.tagName)){
item=dojo.widget.createWidget("ToolbarButton",dojo.lang.mixin(_ea5||{},{icon:wh}));
}else{
item=dojo.widget.createWidget("ToolbarButton",dojo.lang.mixin(_ea5||{},{label:wh.toString()}));
}
}
}
}
}
}
return item;
};
dojo.widget.defineWidget("dojo.widget.ToolbarButtonGroup",dojo.widget.ToolbarItem,{isContainer:true,templateString:"<span unselectable=\"on\" class=\"toolbarButtonGroup\" dojoAttachPoint=\"containerNode\"></span>",defaultButton:"",postCreate:function(){
for(var i=0;i<this.children.length;i++){
this._injectChild(this.children[i]);
}
},addChild:function(item,pos,_eab){
var _eac=dojo.widget.ToolbarItem.make(item,null,dojo.lang.mixin(_eab||{},{toggleItem:true}));
var ret=dojo.widget.ToolbarButtonGroup.superclass.addChild.call(this,_eac,null,pos,null);
this._injectChild(_eac);
return ret;
},_injectChild:function(_eae){
dojo.event.connect(_eae,"onSelect",this,"onChildSelected");
dojo.event.connect(_eae,"onDeselect",this,"onChildDeSelected");
if(_eae._name==this.defaultButton||(typeof this.defaultButton=="number"&&this.children.length-1==this.defaultButton)){
_eae.select(false,true);
}
},getItem:function(name){
if(name instanceof dojo.widget.ToolbarItem){
return name;
}
for(var i=0;i<this.children.length;i++){
var _eb1=this.children[i];
if(_eb1 instanceof dojo.widget.ToolbarItem&&_eb1._name==name){
return _eb1;
}
}
return null;
},getItems:function(){
var _eb2=[];
for(var i=0;i<this.children.length;i++){
var _eb4=this.children[i];
if(_eb4 instanceof dojo.widget.ToolbarItem){
_eb2.push(_eb4);
}
}
return _eb2;
},onChildSelected:function(e){
this.select(e._name);
},onChildDeSelected:function(e){
this._fireEvent("onChangeSelect",this._value);
},enable:function(_eb7,_eb8){
for(var i=0;i<this.children.length;i++){
var _eba=this.children[i];
if(_eba instanceof dojo.widget.ToolbarItem){
_eba.enable(_eb7,_eb8);
if(_eba._name==this._value){
_eba.select(_eb7,_eb8);
}
}
}
},disable:function(_ebb,_ebc){
for(var i=0;i<this.children.length;i++){
var _ebe=this.children[i];
if(_ebe instanceof dojo.widget.ToolbarItem){
_ebe.disable(_ebb,_ebc);
}
}
},_value:"",getValue:function(){
return this._value;
},select:function(name,_ec0,_ec1){
for(var i=0;i<this.children.length;i++){
var _ec3=this.children[i];
if(_ec3 instanceof dojo.widget.ToolbarItem){
if(_ec3._name==name){
_ec3.select(_ec0,_ec1);
this._value=name;
}else{
_ec3.deselect(true,true);
}
}
}
if(!_ec1){
this._fireEvent("onSelect",this._value);
this._fireEvent("onChangeSelect",this._value);
}
},setValue:this.select,preventDeselect:false});
dojo.widget.defineWidget("dojo.widget.ToolbarButton",dojo.widget.ToolbarItem,{fillInTemplate:function(args,frag){
dojo.widget.ToolbarButton.superclass.fillInTemplate.call(this,args,frag);
dojo.html.addClass(this.domNode,"toolbarButton");
if(this._icon){
this.setIcon(this._icon);
}
if(this._label){
this.setLabel(this._label);
}
if(!this._name){
if(this._label){
this.setName(this._label);
}else{
if(this._icon){
var src=this._icon.getSrc("enabled").match(/[\/^]([^\.\/]+)\.(gif|jpg|jpeg|png)$/i);
if(src){
this.setName(src[1]);
}
}else{
this._name=this._widgetId;
}
}
}
}});
dojo.widget.defineWidget("dojo.widget.ToolbarDialog",dojo.widget.ToolbarButton,{fillInTemplate:function(args,frag){
dojo.widget.ToolbarDialog.superclass.fillInTemplate.call(this,args,frag);
dojo.event.connect(this,"onSelect",this,"showDialog");
dojo.event.connect(this,"onDeselect",this,"hideDialog");
},showDialog:function(e){
dojo.lang.setTimeout(dojo.event.connect,1,document,"onmousedown",this,"deselect");
},hideDialog:function(e){
dojo.event.disconnect(document,"onmousedown",this,"deselect");
}});
dojo.widget.defineWidget("dojo.widget.ToolbarMenu",dojo.widget.ToolbarDialog,{});
dojo.widget.ToolbarMenuItem=function(){
};
dojo.widget.defineWidget("dojo.widget.ToolbarSeparator",dojo.widget.ToolbarItem,{templateString:"<span unselectable=\"on\" class=\"toolbarItem toolbarSeparator\"></span>",defaultIconPath:new dojo.uri.moduleUri("dojo.widget","templates/buttons/sep.gif"),fillInTemplate:function(args,frag,skip){
dojo.widget.ToolbarSeparator.superclass.fillInTemplate.call(this,args,frag);
this._name=this.widgetId;
if(!skip){
if(!this._icon){
this.setIcon(this.defaultIconPath);
}
this.domNode.appendChild(this._icon.getNode());
}
},_onmouseover:null,_onmouseout:null,_onclick:null,_onmousedown:null,_onmouseup:null});
dojo.widget.defineWidget("dojo.widget.ToolbarSpace",dojo.widget.ToolbarSeparator,{fillInTemplate:function(args,frag,skip){
dojo.widget.ToolbarSpace.superclass.fillInTemplate.call(this,args,frag,true);
if(!skip){
dojo.html.addClass(this.domNode,"toolbarSpace");
}
}});
dojo.widget.defineWidget("dojo.widget.ToolbarSelect",dojo.widget.ToolbarItem,{templateString:"<span class=\"toolbarItem toolbarSelect\" unselectable=\"on\"><select dojoAttachPoint=\"selectBox\" dojoOnChange=\"changed\"></select></span>",fillInTemplate:function(args,frag){
dojo.widget.ToolbarSelect.superclass.fillInTemplate.call(this,args,frag,true);
var keys=args.values;
var i=0;
for(var val in keys){
var opt=document.createElement("option");
opt.setAttribute("value",keys[val]);
opt.innerHTML=val;
this.selectBox.appendChild(opt);
}
},changed:function(e){
this._fireEvent("onSetValue",this.selectBox.value);
},setEnabled:function(is,_ed9,_eda){
var ret=dojo.widget.ToolbarSelect.superclass.setEnabled.call(this,is,_ed9,_eda);
this.selectBox.disabled=this.disabled;
return ret;
},_onmouseover:null,_onmouseout:null,_onclick:null,_onmousedown:null,_onmouseup:null});
dojo.widget.Icon=function(_edc,_edd,_ede,_edf){
if(!arguments.length){
throw new Error("Icon must have at least an enabled state");
}
var _ee0=["enabled","disabled","hovered","selected"];
var _ee1="enabled";
var _ee2=document.createElement("img");
this.getState=function(){
return _ee1;
};
this.setState=function(_ee3){
if(dojo.lang.inArray(_ee0,_ee3)){
if(this[_ee3]){
_ee1=_ee3;
var img=this[_ee1];
if((dojo.render.html.ie55||dojo.render.html.ie60)&&img.src&&img.src.match(/[.]png$/i)){
_ee2.width=img.width||img.offsetWidth;
_ee2.height=img.height||img.offsetHeight;
_ee2.setAttribute("src",dojo.uri.moduleUri("dojo.widget","templates/images/blank.gif").uri);
_ee2.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img.src+"',sizingMethod='image')";
}else{
_ee2.setAttribute("src",img.src);
}
}
}else{
throw new Error("Invalid state set on Icon (state: "+_ee3+")");
}
};
this.setSrc=function(_ee5,_ee6){
if(/^img$/i.test(_ee6.tagName)){
this[_ee5]=_ee6;
}else{
if(typeof _ee6=="string"||_ee6 instanceof String||_ee6 instanceof dojo.uri.Uri){
this[_ee5]=new Image();
this[_ee5].src=_ee6.toString();
}
}
return this[_ee5];
};
this.setIcon=function(icon){
for(var i=0;i<_ee0.length;i++){
if(icon[_ee0[i]]){
this.setSrc(_ee0[i],icon[_ee0[i]]);
}
}
this.update();
};
this.enable=function(){
this.setState("enabled");
};
this.disable=function(){
this.setState("disabled");
};
this.hover=function(){
this.setState("hovered");
};
this.select=function(){
this.setState("selected");
};
this.getSize=function(){
return {width:_ee2.width||_ee2.offsetWidth,height:_ee2.height||_ee2.offsetHeight};
};
this.setSize=function(w,h){
_ee2.width=w;
_ee2.height=h;
return {width:w,height:h};
};
this.getNode=function(){
return _ee2;
};
this.getSrc=function(_eeb){
if(_eeb){
return this[_eeb].src;
}
return _ee2.src||"";
};
this.update=function(){
this.setState(_ee1);
};
for(var i=0;i<_ee0.length;i++){
var arg=arguments[i];
var _eee=_ee0[i];
this[_eee]=null;
if(!arg){
continue;
}
this.setSrc(_eee,arg);
}
this.enable();
};
dojo.widget.Icon.make=function(a,b,c,d){
for(var i=0;i<arguments.length;i++){
if(arguments[i] instanceof dojo.widget.Icon){
return arguments[i];
}
}
return new dojo.widget.Icon(a,b,c,d);
};
dojo.widget.defineWidget("dojo.widget.ToolbarColorDialog",dojo.widget.ToolbarDialog,{palette:"7x10",fillInTemplate:function(args,frag){
dojo.widget.ToolbarColorDialog.superclass.fillInTemplate.call(this,args,frag);
this.dialog=dojo.widget.createWidget("ColorPalette",{palette:this.palette});
this.dialog.domNode.style.position="absolute";
dojo.event.connect(this.dialog,"onColorSelect",this,"_setValue");
},_setValue:function(_ef6){
this._value=_ef6;
this._fireEvent("onSetValue",_ef6);
},showDialog:function(e){
dojo.widget.ToolbarColorDialog.superclass.showDialog.call(this,e);
var abs=dojo.html.getAbsolutePosition(this.domNode,true);
var y=abs.y+dojo.html.getBorderBox(this.domNode).height;
this.dialog.showAt(abs.x,y);
},hideDialog:function(e){
dojo.widget.ToolbarColorDialog.superclass.hideDialog.call(this,e);
this.dialog.hide();
}});
dojo.provide("dojo.widget.Tooltip");
dojo.widget.defineWidget("dojo.widget.Tooltip",[dojo.widget.ContentPane,dojo.widget.PopupContainerBase],{caption:"",showDelay:500,hideDelay:100,connectId:"",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/TooltipTemplate.css"),fillInTemplate:function(args,frag){
if(this.caption!=""){
this.domNode.appendChild(document.createTextNode(this.caption));
}
this._connectNode=dojo.byId(this.connectId);
dojo.widget.Tooltip.superclass.fillInTemplate.call(this,args,frag);
this.addOnLoad(this,"_loadedContent");
dojo.html.addClass(this.domNode,"dojoTooltip");
var _efd=this.getFragNodeRef(frag);
dojo.html.copyStyle(this.domNode,_efd);
this.applyPopupBasicStyle();
},postCreate:function(args,frag){
dojo.event.connect(this._connectNode,"onmouseover",this,"_onMouseOver");
dojo.widget.Tooltip.superclass.postCreate.call(this,args,frag);
},_onMouseOver:function(e){
this._mouse={x:e.pageX,y:e.pageY};
if(!this._tracking){
dojo.event.connect(document.documentElement,"onmousemove",this,"_onMouseMove");
this._tracking=true;
}
this._onHover(e);
},_onMouseMove:function(e){
this._mouse={x:e.pageX,y:e.pageY};
if(dojo.html.overElement(this._connectNode,e)||dojo.html.overElement(this.domNode,e)){
this._onHover(e);
}else{
this._onUnHover(e);
}
},_onHover:function(e){
if(this._hover){
return;
}
this._hover=true;
if(this._hideTimer){
clearTimeout(this._hideTimer);
delete this._hideTimer;
}
if(!this.isShowingNow&&!this._showTimer){
this._showTimer=setTimeout(dojo.lang.hitch(this,"open"),this.showDelay);
}
},_onUnHover:function(e){
if(!this._hover){
return;
}
this._hover=false;
if(this._showTimer){
clearTimeout(this._showTimer);
delete this._showTimer;
}
if(this.isShowingNow&&!this._hideTimer){
this._hideTimer=setTimeout(dojo.lang.hitch(this,"close"),this.hideDelay);
}
if(!this.isShowingNow){
dojo.event.disconnect(document.documentElement,"onmousemove",this,"_onMouseMove");
this._tracking=false;
}
},open:function(){
if(this.isShowingNow){
return;
}
dojo.widget.PopupContainerBase.prototype.open.call(this,this._mouse.x,this._mouse.y,null,[this._mouse.x,this._mouse.y],"TL,TR,BL,BR",[10,15]);
},close:function(){
if(this.isShowingNow){
if(this._showTimer){
clearTimeout(this._showTimer);
delete this._showTimer;
}
if(this._hideTimer){
clearTimeout(this._hideTimer);
delete this._hideTimer;
}
dojo.event.disconnect(document.documentElement,"onmousemove",this,"_onMouseMove");
this._tracking=false;
dojo.widget.PopupContainerBase.prototype.close.call(this);
}
},_position:function(){
this.move(this._mouse.x,this._mouse.y,[10,15],"TL,TR,BL,BR");
},_loadedContent:function(){
if(this.isShowingNow){
this._position();
}
},checkSize:function(){
},uninitialize:function(){
this.close();
dojo.event.disconnect(this._connectNode,"onmouseover",this,"_onMouseOver");
}});

