/*
	Copyright (c) 2004-2005, 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.
*/

var dj_global=this;
function dj_undef(_1,_2){
if(!_2){
_2=dj_global;
}
return (typeof _2[_1]=="undefined");
}
if(dj_undef("djConfig")){
var djConfig={};
}
if(dj_undef("dojo")){
var dojo={};
}
dojo.version={major:0,minor:2,patch:2,flag:"+",revision:Number("$Rev: 3458 $".match(/[0-9]+/)[0]),toString:function(){
with(dojo.version){
return major+"."+minor+"."+patch+flag+" ("+revision+")";
}
}};
dojo.evalProp=function(_3,_4,_5){
return (_4&&!dj_undef(_3,_4)?_4[_3]:(_5?(_4[_3]={}):undefined));
};
dojo.parseObjPath=function(_6,_7,_8){
var _9=(_7?_7:dj_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(_d,_e){
if(typeof _d!="string"){
return dj_global;
}
if(_d.indexOf(".")==-1){
return dojo.evalProp(_d,dj_global,_e);
}
with(dojo.parseObjPath(_d,dj_global,_e)){
return dojo.evalProp(prop,obj,_e);
}
};
dojo.errorToString=function(_f){
return ((!dj_undef("message",_f))?_f.message:(dj_undef("description",_f)?_f:_f.description));
};
dojo.raise=function(_10,_11){
if(_11){
_10=_10+": "+dojo.errorToString(_11);
}
var he=dojo.hostenv;
if((!dj_undef("hostenv",dojo))&&(!dj_undef("println",dojo.hostenv))){
dojo.hostenv.println("FATAL: "+_10);
}
throw Error(_10);
};
dj_throw=dj_rethrow=function(m,e){
dojo.deprecated("dj_throw and dj_rethrow deprecated, use dojo.raise instead");
dojo.raise(m,e);
};
dojo.debug=function(){
if(!djConfig.isDebug){
return;
}
var _15=arguments;
if(dj_undef("println",dojo.hostenv)){
dojo.raise("dojo.debug not available (yet?)");
}
var _16=dj_global["jum"]&&!dj_global["jum"].isBrowser;
var s=[(_16?"":"DEBUG: ")];
for(var i=0;i<_15.length;++i){
if(!false&&_15[i] instanceof Error){
var msg="["+_15[i].name+": "+dojo.errorToString(_15[i])+(_15[i].fileName?", file: "+_15[i].fileName:"")+(_15[i].lineNumber?", line: "+_15[i].lineNumber:"")+"]";
}else{
try{
var msg=String(_15[i]);
}
catch(e){
if(dojo.render.html.ie){
var msg="[ActiveXObject]";
}else{
var msg="[unknown]";
}
}
}
s.push(msg);
}
if(_16){
jum.debug(s.join(" "));
}else{
dojo.hostenv.println(s.join(" "));
}
};
dojo.debugShallow=function(obj){
if(!djConfig.isDebug){
return;
}
dojo.debug("------------------------------------------------------------");
dojo.debug("Object: "+obj);
var _1b=[];
for(var _1c in obj){
try{
_1b.push(_1c+": "+obj[_1c]);
}
catch(E){
_1b.push(_1c+": ERROR - "+E.message);
}
}
_1b.sort();
for(var i=0;i<_1b.length;i++){
dojo.debug(_1b[i]);
}
dojo.debug("------------------------------------------------------------");
};
var dj_debug=dojo.debug;
function dj_eval(s){
return dj_global.eval?dj_global.eval(s):eval(s);
}
dj_unimplemented=dojo.unimplemented=function(_1f,_20){
var _21="'"+_1f+"' not implemented";
if((!dj_undef(_20))&&(_20)){
_21+=" "+_20;
}
dojo.raise(_21);
};
dj_deprecated=dojo.deprecated=function(_22,_23,_24){
var _25="DEPRECATED: "+_22;
if(_23){
_25+=" "+_23;
}
if(_24){
_25+=" -- will be removed in version: "+_24;
}
dojo.debug(_25);
};
dojo.experimental=function(_26,_27){
var _28="EXPERIMENTAL: "+_26;
_28+=" -- Not yet ready for use.  APIs subject to change without notice.";
if(_27){
_28+=" "+_27;
}
dojo.debug(_28);
};
dojo.inherits=function(_29,_2a){
if(typeof _2a!="function"){
dojo.raise("superclass: "+_2a+" borken");
}
_29.prototype=new _2a();
_29.prototype.constructor=_29;
_29.superclass=_2a.prototype;
_29["super"]=_2a.prototype;
};
dj_inherits=function(_2b,_2c){
dojo.deprecated("dj_inherits deprecated, use dojo.inherits instead");
dojo.inherits(_2b,_2c);
};
dojo.render=(function(){
function vscaffold(_2d,_2e){
var tmp={capable:false,support:{builtin:false,plugin:false},prefixes:_2d};
for(var x in _2e){
tmp[x]=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 _31={isDebug:false,allowQueryConfig:false,baseScriptUri:"",baseRelativePath:"",libraryScriptUri:"",iePreventClobber:false,ieClobberMinimal:true,preventBackButtonFix:true,searchIds:[],parseWidgets:true};
if(typeof djConfig=="undefined"){
djConfig=_31;
}else{
for(var _32 in _31){
if(typeof djConfig[_32]=="undefined"){
djConfig[_32]=_31[_32];
}
}
}
var djc=djConfig;
function _def(obj,_35,def){
return (dj_undef(_35,obj)?def:obj[_35]);
}
return {name_:"(unset)",version_:"(unset)",pkgFileName:"__package__",loading_modules_:{},loaded_modules_:{},addedToLoadingCount:[],removedFromLoadingCount:[],inFlightCount:0,modulePrefixes_:{dojo:{name:"dojo",value:"src"}},setModulePrefix:function(_37,_38){
this.modulePrefixes_[_37]={name:_37,value:_38};
},getModulePrefix:function(_39){
var mp=this.modulePrefixes_;
if((mp[_39])&&(mp[_39]["name"])){
return mp[_39].value;
}
return _39;
},getTextStack:[],loadUriStack:[],loadedUris:[],post_load_:false,modulesLoadedListeners:[],getName:function(){
return this.name_;
},getVersion:function(){
return this.version_;
},getText:function(uri){
dojo.unimplemented("getText","uri="+uri);
},getLibraryScriptUri:function(){
dojo.unimplemented("getLibraryScriptUri","");
}};
})();
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 _3d=uri.lastIndexOf("/");
djConfig.baseScriptUri=djConfig.baseRelativePath;
return djConfig.baseScriptUri;
};
dojo.hostenv.setBaseScriptUri=function(uri){
djConfig.baseScriptUri=uri;
};
dojo.hostenv.loadPath=function(_3f,_40,cb){
if((_3f.charAt(0)=="/")||(_3f.match(/^\w+:/))){
dojo.raise("relpath '"+_3f+"'; must be relative");
}
var uri=this.getBaseScriptUri()+_3f;
if(djConfig.cacheBust&&dojo.render.html.capable){
uri+="?"+String(djConfig.cacheBust).replace(/\W+/g,"");
}
try{
return ((!_40)?this.loadUri(uri,cb):this.loadUriAndCheck(uri,_40,cb));
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.hostenv.loadUri=function(uri,cb){
if(this.loadedUris[uri]){
return;
}
var _45=this.getText(uri,null,true);
if(_45==null){
return 0;
}
this.loadedUris[uri]=true;
var _46=dj_eval(_45);
return 1;
};
dojo.hostenv.loadUriAndCheck=function(uri,_48,cb){
var ok=true;
try{
ok=this.loadUri(uri,cb);
}
catch(e){
dojo.debug("failed loading ",uri," with error: ",e);
}
return ((ok)&&(this.findModule(_48,false)))?true:false;
};
dojo.loaded=function(){
};
dojo.hostenv.loaded=function(){
this.post_load_=true;
var mll=this.modulesLoadedListeners;
for(var x=0;x<mll.length;x++){
mll[x]();
}
dojo.loaded();
};
dojo.addOnLoad=function(obj,_4e){
if(arguments.length==1){
dojo.hostenv.modulesLoadedListeners.push(obj);
}else{
if(arguments.length>1){
dojo.hostenv.modulesLoadedListeners.push(function(){
obj[_4e]();
});
}
}
};
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;
}
if(typeof setTimeout=="object"){
setTimeout("dojo.hostenv.loaded();",0);
}else{
dojo.hostenv.loaded();
}
}
};
dojo.hostenv.moduleLoaded=function(_4f){
var _50=dojo.evalObjPath((_4f.split(".").slice(0,-1)).join("."));
this.loaded_modules_[(new String(_4f)).toLowerCase()]=_50;
};
dojo.hostenv._global_omit_module_check=false;
dojo.hostenv.loadModule=function(_51,_52,_53){
if(!_51){
return;
}
_53=this._global_omit_module_check||_53;
var _54=this.findModule(_51,false);
if(_54){
return _54;
}
if(dj_undef(_51,this.loading_modules_)){
this.addedToLoadingCount.push(_51);
}
this.loading_modules_[_51]=1;
var _55=_51.replace(/\./g,"/")+".js";
var _56=_51.split(".");
var _57=_51.split(".");
for(var i=_56.length-1;i>0;i--){
var _59=_56.slice(0,i).join(".");
var _5a=this.getModulePrefix(_59);
if(_5a!=_59){
_56.splice(0,i,_5a);
break;
}
}
var _5b=_56[_56.length-1];
if(_5b=="*"){
_51=(_57.slice(0,-1)).join(".");
while(_56.length){
_56.pop();
_56.push(this.pkgFileName);
_55=_56.join("/")+".js";
if(_55.charAt(0)=="/"){
_55=_55.slice(1);
}
ok=this.loadPath(_55,((!_53)?_51:null));
if(ok){
break;
}
_56.pop();
}
}else{
_55=_56.join("/")+".js";
_51=_57.join(".");
var ok=this.loadPath(_55,((!_53)?_51:null));
if((!ok)&&(!_52)){
_56.pop();
while(_56.length){
_55=_56.join("/")+".js";
ok=this.loadPath(_55,((!_53)?_51:null));
if(ok){
break;
}
_56.pop();
_55=_56.join("/")+"/"+this.pkgFileName+".js";
if(_55.charAt(0)=="/"){
_55=_55.slice(1);
}
ok=this.loadPath(_55,((!_53)?_51:null));
if(ok){
break;
}
}
}
if((!ok)&&(!_53)){
dojo.raise("Could not load '"+_51+"'; last tried '"+_55+"'");
}
}
if(!_53){
_54=this.findModule(_51,false);
if(!_54){
dojo.raise("symbol '"+_51+"' is not defined after loading '"+_55+"'");
}
}
return _54;
};
dojo.hostenv.startPackage=function(_5d){
var _5e=_5d.split(/\./);
if(_5e[_5e.length-1]=="*"){
_5e.pop();
}
return dojo.evalObjPath(_5e.join("."),true);
};
dojo.hostenv.findModule=function(_5f,_60){
var lmn=(new String(_5f)).toLowerCase();
if(this.loaded_modules_[lmn]){
return this.loaded_modules_[lmn];
}
var _62=dojo.evalObjPath(_5f);
if((_5f)&&(typeof _62!="undefined")&&(_62)){
this.loaded_modules_[lmn]=_62;
return _62;
}
if(_60){
dojo.raise("no loaded module named '"+_5f+"'");
}
return null;
};
if(typeof window=="undefined"){
dojo.raise("no window object");
}
(function(){
if(djConfig.allowQueryConfig){
var _63=document.location.toString();
var _64=_63.split("?",2);
if(_64.length>1){
var _65=_64[1];
var _66=_65.split("&");
for(var x in _66){
var sp=_66[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 _6a=document.getElementsByTagName("script");
var _6b=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i;
for(var i=0;i<_6a.length;i++){
var src=_6a[i].getAttribute("src");
if(!src){
continue;
}
var m=src.match(_6b);
if(m){
root=src.substring(0,m.index);
if(src.indexOf("bootstrap1")>-1){
root+="../";
}
if(!this["djConfig"]){
djConfig={};
}
if(djConfig["baseScriptUri"]==""){
djConfig["baseScriptUri"]=root;
}
if(djConfig["baseRelativePath"]==""){
djConfig["baseRelativePath"]=root;
}
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 _76=dua.indexOf("Gecko");
drh.mozilla=drh.moz=(_76>=0)&&(!drh.khtml);
if(drh.mozilla){
drh.geckoVersion=dua.substring(_76+6,_76+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;
dr.vml.capable=drh.ie;
drs.capable=f;
drs.support.plugin=f;
drs.support.builtin=f;
drs.adobe=f;
if(document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("org.w3c.dom.svg","1.0")){
drs.capable=t;
drs.support.builtin=t;
drs.support.plugin=f;
drs.adobe=f;
}else{
if(navigator.mimeTypes&&navigator.mimeTypes.length>0){
var _77=navigator.mimeTypes["image/svg+xml"]||navigator.mimeTypes["image/svg"]||navigator.mimeTypes["image/svg-xml"];
if(_77){
drs.adobe=_77&&_77.enabledPlugin&&_77.enabledPlugin.description&&(_77.enabledPlugin.description.indexOf("Adobe")>-1);
if(drs.adobe){
drs.capable=t;
drs.support.plugin=t;
}
}
}else{
if(drh.ie&&dr.os.win){
var _77=f;
try{
var _78=new ActiveXObject("Adobe.SVGCtl");
_77=t;
}
catch(e){
}
if(_77){
drs.capable=t;
drs.support.plugin=t;
drs.adobe=t;
}
}else{
drs.capable=f;
drs.support.plugin=f;
drs.adobe=f;
}
}
}
})();
dojo.hostenv.startPackage("dojo.hostenv");
dojo.render.name=dojo.hostenv.name_="browser";
dojo.hostenv.searchIds=[];
var DJ_XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
dojo.hostenv.getXmlhttpObject=function(){
var _79=null;
var _7a=null;
try{
_79=new XMLHttpRequest();
}
catch(e){
}
if(!_79){
for(var i=0;i<3;++i){
var _7c=DJ_XMLHTTP_PROGIDS[i];
try{
_79=new ActiveXObject(_7c);
}
catch(e){
_7a=e;
}
if(_79){
DJ_XMLHTTP_PROGIDS=[_7c];
break;
}
}
}
if(!_79){
return dojo.raise("XMLHTTP not available",_7a);
}
return _79;
};
dojo.hostenv.getText=function(uri,_7e,_7f){
var _80=this.getXmlhttpObject();
if(_7e){
_80.onreadystatechange=function(){
if((4==_80.readyState)&&(_80["status"])){
if(_80.status==200){
_7e(_80.responseText);
}
}
};
}
_80.open("GET",uri,_7e?true:false);
try{
_80.send(null);
}
catch(e){
if(_7f&&!_7e){
return null;
}else{
throw e;
}
}
if(_7e){
return null;
}
return _80.responseText;
};
dojo.hostenv.defaultDebugContainerId="dojoDebug";
dojo.hostenv._println_buffer=[];
dojo.hostenv._println_safe=false;
dojo.hostenv.println=function(_81){
if(!dojo.hostenv._println_safe){
dojo.hostenv._println_buffer.push(_81);
}else{
try{
var _82=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId);
if(!_82){
_82=document.getElementsByTagName("body")[0]||document.body;
}
var div=document.createElement("div");
div.appendChild(document.createTextNode(_81));
_82.appendChild(div);
}
catch(e){
try{
document.write("<div>"+_81+"</div>");
}
catch(e2){
window.status=_81;
}
}
}
};
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(_84,_85,fp,_87){
var _88=_84["on"+_85]||function(){
};
_84["on"+_85]=function(){
fp.apply(_84,arguments);
_88.apply(_84,arguments);
};
return true;
}
dj_load_init=function(){
if(arguments.callee.initialized){
return;
}
arguments.callee.initialized=true;
if(dojo.render.html.ie){
dojo.hostenv.makeWidgets();
}
dojo.hostenv.modulesLoaded();
};
dj_addNodeEvtHdlr(window,"load",dj_load_init);
dojo.hostenv.makeWidgets=function(){
var _89=[];
if(djConfig.searchIds&&djConfig.searchIds.length>0){
_89=_89.concat(djConfig.searchIds);
}
if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){
_89=_89.concat(dojo.hostenv.searchIds);
}
if((djConfig.parseWidgets)||(_89.length>0)){
if(dojo.evalObjPath("dojo.widget.Parse")){
try{
var _8a=new dojo.xml.Parse();
if(_89.length>0){
for(var x=0;x<_89.length;x++){
var _8c=document.getElementById(_89[x]);
if(!_8c){
continue;
}
var _8d=_8a.parseElement(_8c,null,true);
dojo.widget.getParser().createComponents(_8d);
}
}else{
if(djConfig.parseWidgets){
var _8d=_8a.parseElement(document.getElementsByTagName("body")[0]||document.body,null,true);
dojo.widget.getParser().createComponents(_8d);
}
}
}
catch(e){
dojo.debug("auto-build-widgets error:",e);
}
}
}
};
dojo.hostenv.modulesLoadedListeners.push(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(){
};
dojo.hostenv.byId=dojo.byId=function(id,doc){
if(id&&(typeof id=="string"||id instanceof String)){
if(!doc){
doc=document;
}
return doc.getElementById(id);
}
return id;
};
dojo.hostenv.byIdArray=dojo.byIdArray=function(){
var ids=[];
for(var i=0;i<arguments.length;i++){
if((arguments[i] instanceof Array)||(typeof arguments[i]=="array")){
for(var j=0;j<arguments[i].length;j++){
ids=ids.concat(dojo.hostenv.byIdArray(arguments[i][j]));
}
}else{
ids.push(dojo.hostenv.byId(arguments[i]));
}
}
return ids;
};
dojo.hostenv.conditionalLoadModule=function(_93){
var _94=_93["common"]||[];
var _95=(_93[dojo.hostenv.name_])?_94.concat(_93[dojo.hostenv.name_]||[]):_94.concat(_93["default"]||[]);
for(var x=0;x<_95.length;x++){
var _97=_95[x];
if(_97.constructor==Array){
dojo.hostenv.loadModule.apply(dojo.hostenv,_97);
}else{
dojo.hostenv.loadModule(_97);
}
}
};
dojo.hostenv.require=dojo.hostenv.loadModule;
dojo.require=function(){
dojo.hostenv.loadModule.apply(dojo.hostenv,arguments);
};
dojo.requireAfter=dojo.require;
dojo.requireIf=function(){
if((arguments[0]===true)||(arguments[0]=="common")||(arguments[0]&&dojo.render[arguments[0]].capable)){
var _98=[];
for(var i=1;i<arguments.length;i++){
_98.push(arguments[i]);
}
dojo.require.apply(dojo,_98);
}
};
dojo.requireAfterIf=dojo.requireIf;
dojo.conditionalRequire=dojo.requireIf;
dojo.requireAll=function(){
for(var i=0;i<arguments.length;i++){
dojo.require(arguments[i]);
}
};
dojo.kwCompoundRequire=function(){
dojo.hostenv.conditionalLoadModule.apply(dojo.hostenv,arguments);
};
dojo.hostenv.provide=dojo.hostenv.startPackage;
dojo.provide=function(){
return dojo.hostenv.startPackage.apply(dojo.hostenv,arguments);
};
dojo.setModulePrefix=function(_9b,_9c){
return dojo.hostenv.setModulePrefix(_9b,_9c);
};
dojo.profile={start:function(){
},end:function(){
},stop:function(){
},dump:function(){
}};
dojo.exists=function(obj,_9e){
var p=_9e.split(".");
for(var i=0;i<p.length;i++){
if(!(obj[p[i]])){
return false;
}
obj=obj[p[i]];
}
return true;
};
dojo.provide("dojo.lang.common");
dojo.require("dojo.lang");
dojo.lang.mixin=function(obj,_a2){
var _a3={};
for(var x in _a2){
if(typeof _a3[x]=="undefined"||_a3[x]!=_a2[x]){
obj[x]=_a2[x];
}
}
if(dojo.render.html.ie&&dojo.lang.isFunction(_a2["toString"])&&_a2["toString"]!=obj["toString"]){
obj.toString=_a2.toString;
}
return obj;
};
dojo.lang.extend=function(_a5,_a6){
this.mixin(_a5.prototype,_a6);
};
dojo.lang.find=function(arr,val,_a9,_aa){
if(!dojo.lang.isArrayLike(arr)&&dojo.lang.isArrayLike(val)){
var a=arr;
arr=val;
val=a;
}
var _ac=dojo.lang.isString(arr);
if(_ac){
arr=arr.split("");
}
if(_aa){
var _ad=-1;
var i=arr.length-1;
var end=-1;
}else{
var _ad=1;
var i=0;
var end=arr.length;
}
if(_a9){
while(i!=end){
if(arr[i]===val){
return i;
}
i+=_ad;
}
}else{
while(i!=end){
if(arr[i]==val){
return i;
}
i+=_ad;
}
}
return -1;
};
dojo.lang.indexOf=dojo.lang.find;
dojo.lang.findLast=function(arr,val,_b2){
return dojo.lang.find(arr,val,_b2,true);
};
dojo.lang.lastIndexOf=dojo.lang.findLast;
dojo.lang.inArray=function(arr,val){
return dojo.lang.find(arr,val)>-1;
};
dojo.lang.isObject=function(wh){
return typeof wh=="object"||dojo.lang.isArray(wh)||dojo.lang.isFunction(wh);
};
dojo.lang.isArray=function(wh){
return (wh instanceof Array||typeof wh=="array");
};
dojo.lang.isArrayLike=function(wh){
if(dojo.lang.isString(wh)){
return false;
}
if(dojo.lang.isFunction(wh)){
return false;
}
if(dojo.lang.isArray(wh)){
return true;
}
if(typeof wh!="undefined"&&wh&&dojo.lang.isNumber(wh.length)&&isFinite(wh.length)){
return true;
}
return false;
};
dojo.lang.isFunction=function(wh){
return (wh instanceof Function||typeof wh=="function");
};
dojo.lang.isString=function(wh){
return (wh instanceof String||typeof wh=="string");
};
dojo.lang.isAlien=function(wh){
return !dojo.lang.isFunction()&&/\{\s*\[native code\]\s*\}/.test(String(wh));
};
dojo.lang.isBoolean=function(wh){
return (wh instanceof Boolean||typeof wh=="boolean");
};
dojo.lang.isNumber=function(wh){
return (wh instanceof Number||typeof wh=="number");
};
dojo.lang.isUndefined=function(wh){
return ((wh==undefined)&&(typeof wh=="undefined"));
};
dojo.provide("dojo.lang.array");
dojo.require("dojo.lang.common");
dojo.lang.has=function(obj,_bf){
try{
return (typeof obj[_bf]!="undefined");
}
catch(e){
return false;
}
};
dojo.lang.isEmpty=function(obj){
if(dojo.lang.isObject(obj)){
var tmp={};
var _c2=0;
for(var x in obj){
if(obj[x]&&(!tmp[x])){
_c2++;
break;
}
}
return (_c2==0);
}else{
if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){
return obj.length==0;
}
}
};
dojo.lang.map=function(arr,obj,_c6){
var _c7=dojo.lang.isString(arr);
if(_c7){
arr=arr.split("");
}
if(dojo.lang.isFunction(obj)&&(!_c6)){
_c6=obj;
obj=dj_global;
}else{
if(dojo.lang.isFunction(obj)&&_c6){
var _c8=obj;
obj=_c6;
_c6=_c8;
}
}
if(Array.map){
var _c9=Array.map(arr,_c6,obj);
}else{
var _c9=[];
for(var i=0;i<arr.length;++i){
_c9.push(_c6.call(obj,arr[i]));
}
}
if(_c7){
return _c9.join("");
}else{
return _c9;
}
};
dojo.lang.forEach=function(_cb,_cc,_cd){
if(dojo.lang.isString(_cb)){
_cb=_cb.split("");
}
if(Array.forEach){
Array.forEach(_cb,_cc,_cd);
}else{
if(!_cd){
_cd=dj_global;
}
for(var i=0,l=_cb.length;i<l;i++){
_cc.call(_cd,_cb[i],i,_cb);
}
}
};
dojo.lang._everyOrSome=function(_cf,arr,_d1,_d2){
if(dojo.lang.isString(arr)){
arr=arr.split("");
}
if(Array.every){
return Array[(_cf)?"every":"some"](arr,_d1,_d2);
}else{
if(!_d2){
_d2=dj_global;
}
for(var i=0,l=arr.length;i<l;i++){
var _d4=_d1.call(_d2,arr[i],i,arr);
if((_cf)&&(!_d4)){
return false;
}else{
if((!_cf)&&(_d4)){
return true;
}
}
}
return (_cf)?true:false;
}
};
dojo.lang.every=function(arr,_d6,_d7){
return this._everyOrSome(true,arr,_d6,_d7);
};
dojo.lang.some=function(arr,_d9,_da){
return this._everyOrSome(false,arr,_d9,_da);
};
dojo.lang.filter=function(arr,_dc,_dd){
var _de=dojo.lang.isString(arr);
if(_de){
arr=arr.split("");
}
if(Array.filter){
var _df=Array.filter(arr,_dc,_dd);
}else{
if(!_dd){
if(arguments.length>=3){
dojo.raise("thisObject doesn't exist!");
}
_dd=dj_global;
}
var _df=[];
for(var i=0;i<arr.length;i++){
if(_dc.call(_dd,arr[i],i,arr)){
_df.push(arr[i]);
}
}
}
if(_de){
return _df.join("");
}else{
return _df;
}
};
dojo.lang.unnest=function(){
var out=[];
for(var i=0;i<arguments.length;i++){
if(dojo.lang.isArrayLike(arguments[i])){
var add=dojo.lang.unnest.apply(this,arguments[i]);
out=out.concat(add);
}else{
out.push(arguments[i]);
}
}
return out;
};
dojo.lang.toArray=function(_e4,_e5){
var _e6=[];
for(var i=_e5||0;i<_e4.length;i++){
_e6.push(_e4[i]);
}
return _e6;
};
dojo.provide("dojo.dom");
dojo.require("dojo.lang.array");
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=="object"){
try{
return wh instanceof Element;
}
catch(E){
}
}else{
return wh&&!isNaN(wh.nodeType);
}
};
dojo.dom.getTagName=function(_e9){
dojo.deprecated("dojo.dom.getTagName","use node.tagName instead","0.4");
var _ea=_e9.tagName;
if(_ea.substr(0,5).toLowerCase()!="dojo:"){
if(_ea.substr(0,4).toLowerCase()=="dojo"){
return "dojo:"+_ea.substring(4).toLowerCase();
}
var djt=_e9.getAttribute("dojoType")||_e9.getAttribute("dojotype");
if(djt){
return "dojo:"+djt.toLowerCase();
}
if((_e9.getAttributeNS)&&(_e9.getAttributeNS(this.dojoml,"type"))){
return "dojo:"+_e9.getAttributeNS(this.dojoml,"type").toLowerCase();
}
try{
djt=_e9.getAttribute("dojo:type");
}
catch(e){
}
if(djt){
return "dojo:"+djt.toLowerCase();
}
if((!dj_global["djConfig"])||(!djConfig["ignoreClassNames"])){
var _ec=_e9.className||_e9.getAttribute("class");
if((_ec)&&(_ec.indexOf)&&(_ec.indexOf("dojo-")!=-1)){
var _ed=_ec.split(" ");
for(var x=0;x<_ed.length;x++){
if((_ed[x].length>5)&&(_ed[x].indexOf("dojo-")>=0)){
return "dojo:"+_ed[x].substr(5).toLowerCase();
}
}
}
}
}
return _ea.toLowerCase();
};
dojo.dom.getUniqueId=function(){
do{
var id="dj_unique_"+(++arguments.callee._idIncrement);
}while(document.getElementById(id));
return id;
};
dojo.dom.getUniqueId._idIncrement=0;
dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(_f0,_f1){
var _f2=_f0.firstChild;
while(_f2&&_f2.nodeType!=dojo.dom.ELEMENT_NODE){
_f2=_f2.nextSibling;
}
if(_f1&&_f2&&_f2.tagName&&_f2.tagName.toLowerCase()!=_f1.toLowerCase()){
_f2=dojo.dom.nextElement(_f2,_f1);
}
return _f2;
};
dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_f3,_f4){
var _f5=_f3.lastChild;
while(_f5&&_f5.nodeType!=dojo.dom.ELEMENT_NODE){
_f5=_f5.previousSibling;
}
if(_f4&&_f5&&_f5.tagName&&_f5.tagName.toLowerCase()!=_f4.toLowerCase()){
_f5=dojo.dom.prevElement(_f5,_f4);
}
return _f5;
};
dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(_f6,_f7){
if(!_f6){
return null;
}
do{
_f6=_f6.nextSibling;
}while(_f6&&_f6.nodeType!=dojo.dom.ELEMENT_NODE);
if(_f6&&_f7&&_f7.toLowerCase()!=_f6.tagName.toLowerCase()){
return dojo.dom.nextElement(_f6,_f7);
}
return _f6;
};
dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(_f8,_f9){
if(!_f8){
return null;
}
if(_f9){
_f9=_f9.toLowerCase();
}
do{
_f8=_f8.previousSibling;
}while(_f8&&_f8.nodeType!=dojo.dom.ELEMENT_NODE);
if(_f8&&_f9&&_f9.toLowerCase()!=_f8.tagName.toLowerCase()){
return dojo.dom.prevElement(_f8,_f9);
}
return _f8;
};
dojo.dom.moveChildren=function(_fa,_fb,_fc){
var _fd=0;
if(_fc){
while(_fa.hasChildNodes()&&_fa.firstChild.nodeType==dojo.dom.TEXT_NODE){
_fa.removeChild(_fa.firstChild);
}
while(_fa.hasChildNodes()&&_fa.lastChild.nodeType==dojo.dom.TEXT_NODE){
_fa.removeChild(_fa.lastChild);
}
}
while(_fa.hasChildNodes()){
_fb.appendChild(_fa.firstChild);
_fd++;
}
return _fd;
};
dojo.dom.copyChildren=function(_fe,_ff,trim){
var _101=_fe.cloneNode(true);
return this.moveChildren(_101,_ff,trim);
};
dojo.dom.removeChildren=function(node){
var _103=node.childNodes.length;
while(node.hasChildNodes()){
node.removeChild(node.firstChild);
}
return _103;
};
dojo.dom.replaceChildren=function(node,_105){
dojo.dom.removeChildren(node);
node.appendChild(_105);
};
dojo.dom.removeNode=function(node){
if(node&&node.parentNode){
return node.parentNode.removeChild(node);
}
};
dojo.dom.getAncestors=function(node,_108,_109){
var _10a=[];
var _10b=dojo.lang.isFunction(_108);
while(node){
if(!_10b||_108(node)){
_10a.push(node);
}
if(_109&&_10a.length>0){
return _10a[0];
}
node=node.parentNode;
}
if(_109){
return null;
}
return _10a;
};
dojo.dom.getAncestorsByTag=function(node,tag,_10e){
tag=tag.toLowerCase();
return dojo.dom.getAncestors(node,function(el){
return ((el.tagName)&&(el.tagName.toLowerCase()==tag));
},_10e);
};
dojo.dom.getFirstAncestorByTag=function(node,tag){
return dojo.dom.getAncestorsByTag(node,tag,true);
};
dojo.dom.isDescendantOf=function(node,_113,_114){
if(_114&&node){
node=node.parentNode;
}
while(node){
if(node==_113){
return true;
}
node=node.parentNode;
}
return false;
};
dojo.dom.innerXML=function(node){
if(node.innerXML){
return node.innerXML;
}else{
if(typeof XMLSerializer!="undefined"){
return (new XMLSerializer()).serializeToString(node);
}
}
};
dojo.dom.createDocumentFromText=function(str,_117){
if(!_117){
_117="text/xml";
}
if(typeof DOMParser!="undefined"){
var _118=new DOMParser();
return _118.parseFromString(str,_117);
}else{
if(typeof ActiveXObject!="undefined"){
var _119=new ActiveXObject("Microsoft.XMLDOM");
if(_119){
_119.async=false;
_119.loadXML(str);
return _119;
}else{
dojo.debug("toXml didn't work?");
}
}else{
if(document.createElement){
var tmp=document.createElement("xml");
tmp.innerHTML=str;
if(document.implementation&&document.implementation.createDocument){
var _11b=document.implementation.createDocument("foo","",null);
for(var i=0;i<tmp.childNodes.length;i++){
_11b.importNode(tmp.childNodes.item(i),true);
}
return _11b;
}
return tmp.document&&tmp.document.firstChild?tmp.document.firstChild:tmp;
}
}
}
return null;
};
dojo.dom.prependChild=function(node,_11e){
if(_11e.firstChild){
_11e.insertBefore(node,_11e.firstChild);
}else{
_11e.appendChild(node);
}
return true;
};
dojo.dom.insertBefore=function(node,ref,_121){
if(_121!=true&&(node===ref||node.nextSibling===ref)){
return false;
}
var _122=ref.parentNode;
_122.insertBefore(node,ref);
return true;
};
dojo.dom.insertAfter=function(node,ref,_125){
var pn=ref.parentNode;
if(ref==pn.lastChild){
if((_125!=true)&&(node===ref)){
return false;
}
pn.appendChild(node);
}else{
return this.insertBefore(node,ref.nextSibling,_125);
}
return true;
};
dojo.dom.insertAtPosition=function(node,ref,_129){
if((!node)||(!ref)||(!_129)){
return false;
}
switch(_129.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,_12b,_12c){
var _12d=_12b.childNodes;
if(!_12d.length){
_12b.appendChild(node);
return true;
}
var _12e=null;
for(var i=0;i<_12d.length;i++){
var _130=_12d.item(i)["getAttribute"]?parseInt(_12d.item(i).getAttribute("dojoinsertionindex")):-1;
if(_130<_12c){
_12e=_12d.item(i);
}
}
if(_12e){
return dojo.dom.insertAfter(node,_12e);
}else{
return dojo.dom.insertBefore(node,_12d.item(0));
}
};
dojo.dom.textContent=function(node,text){
if(text){
dojo.dom.replaceChildren(node,document.createTextNode(text));
return text;
}else{
var _133="";
if(node==null){
return _133;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
_133+=dojo.dom.textContent(node.childNodes[i]);
break;
case 3:
case 2:
case 4:
_133+=node.childNodes[i].nodeValue;
break;
default:
break;
}
}
return _133;
}
};
dojo.dom.collectionToArray=function(_135){
dojo.deprecated("dojo.dom.collectionToArray","use dojo.lang.toArray instead","0.4");
return dojo.lang.toArray(_135);
};
dojo.dom.hasParent=function(node){
return node&&node.parentNode&&dojo.dom.isNode(node.parentNode);
};
dojo.dom.isTag=function(node){
if(node&&node.tagName){
var arr=dojo.lang.toArray(arguments,1);
return arr[dojo.lang.find(node.tagName,arr)]||"";
}
return "";
};
dojo.provide("dojo.lang.func");
dojo.require("dojo.lang.common");
dojo.lang.hitch=function(_139,_13a){
if(dojo.lang.isString(_13a)){
var fcn=_139[_13a];
}else{
var fcn=_13a;
}
return function(){
return fcn.apply(_139,arguments);
};
};
dojo.lang.anonCtr=0;
dojo.lang.anon={};
dojo.lang.nameAnonFunc=function(_13c,_13d){
var nso=(_13d||dojo.lang.anon);
if((dj_global["djConfig"])&&(djConfig["slowAnonFuncLookups"]==true)){
for(var x in nso){
if(nso[x]===_13c){
return x;
}
}
}
var ret="__"+dojo.lang.anonCtr++;
while(typeof nso[ret]!="undefined"){
ret="__"+dojo.lang.anonCtr++;
}
nso[ret]=_13c;
return ret;
};
dojo.lang.forward=function(_141){
return function(){
return this[_141].apply(this,arguments);
};
};
dojo.lang.curry=function(ns,func){
var _144=[];
ns=ns||dj_global;
if(dojo.lang.isString(func)){
func=ns[func];
}
for(var x=2;x<arguments.length;x++){
_144.push(arguments[x]);
}
var _146=(func["__preJoinArity"]||func.length)-_144.length;
function gather(_147,_148,_149){
var _14a=_149;
var _14b=_148.slice(0);
for(var x=0;x<_147.length;x++){
_14b.push(_147[x]);
}
_149=_149-_147.length;
if(_149<=0){
var res=func.apply(ns,_14b);
_149=_14a;
return res;
}else{
return function(){
return gather(arguments,_14b,_149);
};
}
}
return gather([],_144,_146);
};
dojo.lang.curryArguments=function(ns,func,args,_151){
var _152=[];
var x=_151||0;
for(x=_151;x<args.length;x++){
_152.push(args[x]);
}
return dojo.lang.curry.apply(dojo.lang,[ns,func].concat(_152));
};
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,_158,_159){
if(!farr.length){
if(typeof _159=="function"){
_159();
}
return;
}
if((typeof _158=="undefined")&&(typeof cb=="number")){
_158=cb;
cb=function(){
};
}else{
if(!cb){
cb=function(){
};
if(!_158){
_158=0;
}
}
}
setTimeout(function(){
(farr.shift())();
cb();
dojo.lang.delayThese(farr,cb,_158,_159);
},_158);
};
dojo.provide("dojo.graphics.color");
dojo.require("dojo.lang.array");
dojo.graphics.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.graphics.color.extractRGB(r);
this.r=rgb[0];
this.g=rgb[1];
this.b=rgb[2];
this.a=g||1;
}else{
if(r instanceof dojo.graphics.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.graphics.color.Color.fromArray=function(arr){
return new dojo.graphics.color.Color(arr[0],arr[1],arr[2],arr[3]);
};
dojo.lang.extend(dojo.graphics.color.Color,{toRgb:function(_160){
if(_160){
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.graphics.color.rgb2hex(this.toRgb());
},toCss:function(){
return "rgb("+this.toRgb().join()+")";
},toString:function(){
return this.toHex();
},toHsv:function(){
return dojo.graphics.color.rgb2hsv(this.toRgb());
},toHsl:function(){
return dojo.graphics.color.rgb2hsl(this.toRgb());
},blend:function(_161,_162){
return dojo.graphics.color.blend(this.toRgb(),new Color(_161).toRgb(),_162);
}});
dojo.graphics.color.named={white:[255,255,255],black:[0,0,0],red:[255,0,0],green:[0,255,0],blue:[0,0,255],navy:[0,0,128],gray:[128,128,128],silver:[192,192,192]};
dojo.graphics.color.blend=function(a,b,_165){
if(typeof a=="string"){
return dojo.graphics.color.blendHex(a,b,_165);
}
if(!_165){
_165=0;
}else{
if(_165>1){
_165=1;
}else{
if(_165<-1){
_165=-1;
}
}
}
var c=new Array(3);
for(var i=0;i<3;i++){
var half=Math.abs(a[i]-b[i])/2;
c[i]=Math.floor(Math.min(a[i],b[i])+half+(half*_165));
}
return c;
};
dojo.graphics.color.blendHex=function(a,b,_16b){
return dojo.graphics.color.rgb2hex(dojo.graphics.color.blend(dojo.graphics.color.hex2rgb(a),dojo.graphics.color.hex2rgb(b),_16b));
};
dojo.graphics.color.extractRGB=function(_16c){
var hex="0123456789abcdef";
_16c=_16c.toLowerCase();
if(_16c.indexOf("rgb")==0){
var _16e=_16c.match(/rgba*\((\d+), *(\d+), *(\d+)/i);
var ret=_16e.splice(1,3);
return ret;
}else{
var _170=dojo.graphics.color.hex2rgb(_16c);
if(_170){
return _170;
}else{
return dojo.graphics.color.named[_16c]||[255,255,255];
}
}
};
dojo.graphics.color.hex2rgb=function(hex){
var _172="0123456789ABCDEF";
var rgb=new Array(3);
if(hex.indexOf("#")==0){
hex=hex.substring(1);
}
hex=hex.toUpperCase();
if(hex.replace(new RegExp("["+_172+"]","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]=_172.indexOf(rgb[i].charAt(0))*16+_172.indexOf(rgb[i].charAt(1));
}
return rgb;
};
dojo.graphics.color.rgb2hex=function(r,g,b){
if(dojo.lang.isArray(r)){
g=r[1]||0;
b=r[2]||0;
r=r[0]||0;
}
function pad(x){
while(x.length<2){
x="0"+x;
}
return x;
}
var ret=dojo.lang.map([r,g,b],function(x){
var s=x.toString(16);
while(s.length<2){
s="0"+s;
}
return s;
});
ret.unshift("#");
return ret.join("");
};
dojo.graphics.color.rgb2hsv=function(r,g,b){
if(dojo.lang.isArray(r)){
b=r[2]||0;
g=r[1]||0;
r=r[0]||0;
}
var h=null;
var s=null;
var v=null;
var min=Math.min(r,g,b);
v=Math.max(r,g,b);
var _183=v-min;
s=(v==0)?0:_183/v;
if(s==0){
h=0;
}else{
if(r==v){
h=60*(g-b)/_183;
}else{
if(g==v){
h=120+60*(b-r)/_183;
}else{
if(b==v){
h=240+60*(r-g)/_183;
}
}
}
if(h<0){
h+=360;
}
}
h=(h==0)?360:Math.ceil((h/360)*255);
s=Math.ceil(s*255);
return [h,s,v];
};
dojo.graphics.color.hsv2rgb=function(h,s,v){
if(dojo.lang.isArray(h)){
v=h[2]||0;
s=h[1]||0;
h=h[0]||0;
}
h=(h/255)*360;
if(h==360){
h=0;
}
s=s/255;
v=v/255;
var r=null;
var g=null;
var b=null;
if(s==0){
r=v;
g=v;
b=v;
}else{
var _18a=h/60;
var i=Math.floor(_18a);
var f=_18a-i;
var p=v*(1-s);
var q=v*(1-(s*f));
var t=v*(1-(s*(1-f)));
switch(i){
case 0:
r=v;
g=t;
b=p;
break;
case 1:
r=q;
g=v;
b=p;
break;
case 2:
r=p;
g=v;
b=t;
break;
case 3:
r=p;
g=q;
b=v;
break;
case 4:
r=t;
g=p;
b=v;
break;
case 5:
r=v;
g=p;
b=q;
break;
}
}
r=Math.ceil(r*255);
g=Math.ceil(g*255);
b=Math.ceil(b*255);
return [r,g,b];
};
dojo.graphics.color.rgb2hsl=function(r,g,b){
if(dojo.lang.isArray(r)){
b=r[2]||0;
g=r[1]||0;
r=r[0]||0;
}
r/=255;
g/=255;
b/=255;
var h=null;
var s=null;
var l=null;
var min=Math.min(r,g,b);
var max=Math.max(r,g,b);
var _198=max-min;
l=(min+max)/2;
s=0;
if((l>0)&&(l<1)){
s=_198/((l<0.5)?(2*l):(2-2*l));
}
h=0;
if(_198>0){
if((max==r)&&(max!=g)){
h+=(g-b)/_198;
}
if((max==g)&&(max!=b)){
h+=(2+(b-r)/_198);
}
if((max==b)&&(max!=r)){
h+=(4+(r-g)/_198);
}
h*=60;
}
h=(h==0)?360:Math.ceil((h/360)*255);
s=Math.ceil(s*255);
l=Math.ceil(l*255);
return [h,s,l];
};
dojo.graphics.color.hsl2rgb=function(h,s,l){
if(dojo.lang.isArray(h)){
l=h[2]||0;
s=h[1]||0;
h=h[0]||0;
}
h=(h/255)*360;
if(h==360){
h=0;
}
s=s/255;
l=l/255;
while(h<0){
h+=360;
}
while(h>360){
h-=360;
}
if(h<120){
r=(120-h)/60;
g=h/60;
b=0;
}else{
if(h<240){
r=0;
g=(240-h)/60;
b=(h-120)/60;
}else{
r=(h-240)/60;
g=0;
b=(360-h)/60;
}
}
r=Math.min(r,1);
g=Math.min(g,1);
b=Math.min(b,1);
r=2*s*r+(1-s);
g=2*s*g+(1-s);
b=2*s*b+(1-s);
if(l<0.5){
r=l*r;
g=l*g;
b=l*b;
}else{
r=(1-l)*r+2*l-1;
g=(1-l)*g+2*l-1;
b=(1-l)*b+2*l-1;
}
r=Math.ceil(r*255);
g=Math.ceil(g*255);
b=Math.ceil(b*255);
return [r,g,b];
};
dojo.graphics.color.hsl2hex=function(h,s,l){
var rgb=dojo.graphics.color.hsl2rgb(h,s,l);
return dojo.graphics.color.rgb2hex(rgb[0],rgb[1],rgb[2]);
};
dojo.graphics.color.hex2hsl=function(hex){
var rgb=dojo.graphics.color.hex2rgb(hex);
return dojo.graphics.color.rgb2hsl(rgb[0],rgb[1],rgb[2]);
};
dojo.provide("dojo.uri.Uri");
dojo.uri=new function(){
this.joinPath=function(){
var arr=[];
for(var i=0;i<arguments.length;i++){
arr.push(arguments[i]);
}
return arr.join("/").replace(/\/{2,}/g,"/").replace(/((https*|ftps*):)/i,"$1/");
};
this.dojoUri=function(uri){
return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(),uri);
};
this.Uri=function(){
var uri=arguments[0];
for(var i=1;i<arguments.length;i++){
if(!arguments[i]){
continue;
}
var _1a7=new dojo.uri.Uri(arguments[i].toString());
var _1a8=new dojo.uri.Uri(uri.toString());
if(_1a7.path==""&&_1a7.scheme==null&&_1a7.authority==null&&_1a7.query==null){
if(_1a7.fragment!=null){
_1a8.fragment=_1a7.fragment;
}
_1a7=_1a8;
}else{
if(_1a7.scheme==null){
_1a7.scheme=_1a8.scheme;
if(_1a7.authority==null){
_1a7.authority=_1a8.authority;
if(_1a7.path.charAt(0)!="/"){
var path=_1a8.path.substring(0,_1a8.path.lastIndexOf("/")+1)+_1a7.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;
}
}
}
}
_1a7.path=segs.join("/");
}
}
}
}
uri="";
if(_1a7.scheme!=null){
uri+=_1a7.scheme+":";
}
if(_1a7.authority!=null){
uri+="//"+_1a7.authority;
}
uri+=_1a7.path;
if(_1a7.query!=null){
uri+="?"+_1a7.query;
}
if(_1a7.fragment!=null){
uri+="#"+_1a7.fragment;
}
}
this.uri=uri.toString();
var _1ac="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";
var r=this.uri.match(new RegExp(_1ac));
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){
_1ac="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$";
r=this.authority.match(new RegExp(_1ac));
this.user=r[3]||null;
this.password=r[4]||null;
this.host=r[5];
this.port=r[7]||null;
}
this.toString=function(){
return this.uri;
};
};
};
dojo.provide("dojo.style");
dojo.require("dojo.graphics.color");
dojo.require("dojo.uri.Uri");
dojo.require("dojo.lang.common");
(function(){
var h=dojo.render.html;
var ds=dojo.style;
var db=document["body"]||document["documentElement"];
ds.boxSizing={marginBox:"margin-box",borderBox:"border-box",paddingBox:"padding-box",contentBox:"content-box"};
ds.getBoxSizing=function(node){
if((h.ie)||(h.opera)){
var cm=document["compatMode"];
if((cm=="BackCompat")||(cm=="QuirksMode")){
return ds.boxSizing.borderBox;
}else{
return ds.boxSizing.contentBox;
}
}else{
if(arguments.length==0){
node=document.documentElement;
}
var _1b3=ds.getStyle(node,"-moz-box-sizing");
if(!_1b3){
_1b3=ds.getStyle(node,"box-sizing");
}
return (_1b3?_1b3:ds.boxSizing.contentBox);
}
};
ds.isBorderBox=function(node){
return (ds.getBoxSizing(node)==ds.boxSizing.borderBox);
};
ds.getUnitValue=function(node,_1b6,_1b7){
var _1b8={value:0,units:"px"};
var s=ds.getComputedStyle(node,_1b6);
if(s==""||(s=="auto"&&_1b7)){
return _1b8;
}
if(dojo.lang.isUndefined(s)){
_1b8.value=NaN;
}else{
var _1ba=s.match(/(\-?[\d.]+)([a-z%]*)/i);
if(!_1ba){
_1b8.value=NaN;
}else{
_1b8.value=Number(_1ba[1]);
_1b8.units=_1ba[2].toLowerCase();
}
}
return _1b8;
};
ds.getPixelValue=function(node,_1bc,_1bd){
var _1be=ds.getUnitValue(node,_1bc,_1bd);
if(isNaN(_1be.value)){
return 0;
}
if((_1be.value)&&(_1be.units!="px")){
return NaN;
}
return _1be.value;
};
ds._sumPixelValues=function(node,_1c0,_1c1){
var _1c2=0;
for(x=0;x<_1c0.length;x++){
_1c2+=ds.getPixelValue(node,_1c0[x],_1c1);
}
return _1c2;
};
ds.getNumericStyle=ds.getPixelValue;
ds.isPositionAbsolute=function(node){
return (ds.getComputedStyle(node,"position")=="absolute");
};
ds.getMarginWidth=function(node){
return ds._sumPixelValues(node,["margin-left","margin-right"],ds.isPositionAbsolute(node));
};
ds.getBorderWidth=function(node){
var left=(ds.getStyle(node,"border-left-style")=="none"?0:ds.getPixelValue(node,"border-left-width"));
var _1c7=(ds.getStyle(node,"border-right-style")=="none"?0:ds.getPixelValue(node,"border-right-width"));
return left+_1c7;
};
ds.getPaddingWidth=function(node){
return ds._sumPixelValues(node,["padding-left","padding-right"],true);
};
ds.getContentWidth=function(node){
node=dojo.byId(node);
return node.offsetWidth-ds.getPaddingWidth(node)-ds.getBorderWidth(node);
};
ds.getInnerWidth=function(node){
node=dojo.byId(node);
return node.offsetWidth;
};
ds.getOuterWidth=function(node){
return ds.getInnerWidth(node)+ds.getMarginWidth(node);
};
ds.setOuterWidth=function(node,_1cd){
node=dojo.byId(node);
if(!ds.isBorderBox(node)){
_1cd-=ds.getPaddingWidth(node)+ds.getBorderWidth(node);
}
_1cd-=ds.getMarginWidth(node);
if(!isNaN(_1cd)&&_1cd>0){
node.style.width=_1cd+"px";
return true;
}else{
return false;
}
};
ds.getContentBoxWidth=ds.getContentWidth;
ds.getBorderBoxWidth=ds.getInnerWidth;
ds.getMarginBoxWidth=ds.getOuterWidth;
ds.setMarginBoxWidth=ds.setOuterWidth;
ds.getMarginHeight=function(node){
return ds._sumPixelValues(node,["margin-top","margin-bottom"],ds.isPositionAbsolute(node));
};
ds.getBorderHeight=function(node){
var top=(ds.getStyle(node,"border-top-style")=="none"?0:ds.getPixelValue(node,"border-top-width"));
var _1d1=(ds.getStyle(node,"border-bottom-style")=="none"?0:ds.getPixelValue(node,"border-bottom-width"));
return top+_1d1;
};
ds.getPaddingHeight=function(node){
return ds._sumPixelValues(node,["padding-top","padding-bottom"],true);
};
ds.getContentHeight=function(node){
node=dojo.byId(node);
return node.offsetHeight-ds.getPaddingHeight(node)-ds.getBorderHeight(node);
};
ds.getInnerHeight=function(node){
node=dojo.byId(node);
return node.offsetHeight;
};
ds.getOuterHeight=function(node){
return ds.getInnerHeight(node)+ds.getMarginHeight(node);
};
ds.setOuterHeight=function(node,_1d7){
node=dojo.byId(node);
if(!ds.isBorderBox(node)){
_1d7-=ds.getPaddingHeight(node)+ds.getBorderHeight(node);
}
_1d7-=ds.getMarginHeight(node);
if(!isNaN(_1d7)&&_1d7>0){
node.style.height=_1d7+"px";
return true;
}else{
return false;
}
};
ds.setContentWidth=function(node,_1d9){
node=dojo.byId(node);
if(ds.isBorderBox(node)){
_1d9+=ds.getPaddingWidth(node)+ds.getBorderWidth(node);
}
if(!isNaN(_1d9)&&_1d9>0){
node.style.width=_1d9+"px";
return true;
}else{
return false;
}
};
ds.setContentHeight=function(node,_1db){
node=dojo.byId(node);
if(ds.isBorderBox(node)){
_1db+=ds.getPaddingHeight(node)+ds.getBorderHeight(node);
}
if(!isNaN(_1db)&&_1db>0){
node.style.height=_1db+"px";
return true;
}else{
return false;
}
};
ds.getContentBoxHeight=ds.getContentHeight;
ds.getBorderBoxHeight=ds.getInnerHeight;
ds.getMarginBoxHeight=ds.getOuterHeight;
ds.setMarginBoxHeight=ds.setOuterHeight;
ds.getAbsolutePosition=ds.abs=function(node,_1dd){
var ret=[];
ret.x=ret.y=0;
var st=dojo.html.getScrollTop();
var sl=dojo.html.getScrollLeft();
if(h.ie){
with(node.getBoundingClientRect()){
ret.x=left-2+sl;
ret.y=top-2+st;
}
}else{
if(node["offsetParent"]){
var _1e1;
if((h.safari)&&(node.style.getPropertyValue("position")=="absolute")&&(node.parentNode==db)){
_1e1=db;
}else{
_1e1=db.parentNode;
}
if((_1dd)&&(node.parentNode!=db)){
ret.x-=ds.sumAncestorProperties(node,"scrollLeft");
ret.y-=ds.sumAncestorProperties(node,"scrollTop");
}
do{
var n=node["offsetLeft"];
ret.x+=isNaN(n)?0:n;
var m=node["offsetTop"];
ret.y+=isNaN(m)?0:m;
node=node.offsetParent;
}while((node!=_1e1)&&(node!=null));
}else{
if(node["x"]&&node["y"]){
ret.x+=isNaN(node.x)?0:node.x;
ret.y+=isNaN(node.y)?0:node.y;
}
}
}
if(_1dd){
ret.y+=st;
ret.x+=sl;
}
ret[0]=ret.x;
ret[1]=ret.y;
return ret;
};
ds.sumAncestorProperties=function(node,prop){
node=dojo.byId(node);
if(!node){
return 0;
}
var _1e6=0;
while(node){
var val=node[prop];
if(val){
_1e6+=val-0;
}
node=node.parentNode;
}
return _1e6;
};
ds.getTotalOffset=function(node,type,_1ea){
node=dojo.byId(node);
return ds.abs(node,_1ea)[(type=="top")?"y":"x"];
};
ds.getAbsoluteX=ds.totalOffsetLeft=function(node,_1ec){
return ds.getTotalOffset(node,"left",_1ec);
};
ds.getAbsoluteY=ds.totalOffsetTop=function(node,_1ee){
return ds.getTotalOffset(node,"top",_1ee);
};
ds.styleSheet=null;
ds.insertCssRule=function(_1ef,_1f0,_1f1){
if(!ds.styleSheet){
if(document.createStyleSheet){
ds.styleSheet=document.createStyleSheet();
}else{
if(document.styleSheets[0]){
ds.styleSheet=document.styleSheets[0];
}else{
return null;
}
}
}
if(arguments.length<3){
if(ds.styleSheet.cssRules){
_1f1=ds.styleSheet.cssRules.length;
}else{
if(ds.styleSheet.rules){
_1f1=ds.styleSheet.rules.length;
}else{
return null;
}
}
}
if(ds.styleSheet.insertRule){
var rule=_1ef+" { "+_1f0+" }";
return ds.styleSheet.insertRule(rule,_1f1);
}else{
if(ds.styleSheet.addRule){
return ds.styleSheet.addRule(_1ef,_1f0,_1f1);
}else{
return null;
}
}
};
ds.removeCssRule=function(_1f3){
if(!ds.styleSheet){
dojo.debug("no stylesheet defined for removing rules");
return false;
}
if(h.ie){
if(!_1f3){
_1f3=ds.styleSheet.rules.length;
ds.styleSheet.removeRule(_1f3);
}
}else{
if(document.styleSheets[0]){
if(!_1f3){
_1f3=ds.styleSheet.cssRules.length;
}
ds.styleSheet.deleteRule(_1f3);
}
}
return true;
};
ds.insertCssFile=function(URI,doc,_1f6){
if(!URI){
return;
}
if(!doc){
doc=document;
}
var _1f7=dojo.hostenv.getText(URI);
_1f7=ds.fixPathsInCssText(_1f7,URI);
if(_1f6){
var _1f8=doc.getElementsByTagName("style");
var _1f9="";
for(var i=0;i<_1f8.length;i++){
_1f9=(_1f8[i].styleSheet&&_1f8[i].styleSheet.cssText)?_1f8[i].styleSheet.cssText:_1f8[i].innerHTML;
if(_1f7==_1f9){
return;
}
}
}
var _1fb=ds.insertCssText(_1f7);
if(_1fb&&djConfig.isDebug){
_1fb.setAttribute("dbgHref",URI);
}
return _1fb;
};
ds.insertCssText=function(_1fc,doc,URI){
if(!_1fc){
return;
}
if(!doc){
doc=document;
}
if(URI){
_1fc=ds.fixPathsInCssText(_1fc,URI);
}
var _1ff=doc.createElement("style");
_1ff.setAttribute("type","text/css");
if(_1ff.styleSheet){
_1ff.styleSheet.cssText=_1fc;
}else{
var _200=doc.createTextNode(_1fc);
_1ff.appendChild(_200);
}
var head=doc.getElementsByTagName("head")[0];
if(head){
head.appendChild(_1ff);
}
return _1ff;
};
ds.fixPathsInCssText=function(_202,URI){
if(!_202||!URI){
return;
}
var pos=0;
var str="";
var url="";
while(pos!=-1){
pos=0;
url="";
pos=_202.indexOf("url(",pos);
if(pos<0){
break;
}
str+=_202.slice(0,pos+4);
_202=_202.substring(pos+4,_202.length);
url+=_202.match(/^[\t\s\w()\/.\\'"-:#=&?]*\)/)[0];
_202=_202.substring(url.length-1,_202.length);
url=url.replace(/^[\s\t]*(['"]?)([\w()\/.\\'"-:#=&?]*)\1[\s\t]*?\)/,"$2");
if(url.search(/(file|https?|ftps?):\/\//)==-1){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=url;
}
return str+_202;
};
ds.getBackgroundColor=function(node){
node=dojo.byId(node);
var _208;
do{
_208=ds.getStyle(node,"background-color");
if(_208.toLowerCase()=="rgba(0, 0, 0, 0)"){
_208="transparent";
}
if(node==document.getElementsByTagName("body")[0]){
node=null;
break;
}
node=node.parentNode;
}while(node&&dojo.lang.inArray(_208,["transparent",""]));
if(_208=="transparent"){
_208=[255,255,255,0];
}else{
_208=dojo.graphics.color.extractRGB(_208);
}
return _208;
};
ds.getComputedStyle=function(node,_20a,_20b){
node=dojo.byId(node);
var _20a=ds.toSelectorCase(_20a);
var _20c=ds.toCamelCase(_20a);
if(!node||!node.style){
return _20b;
}else{
if(document.defaultView){
try{
var cs=document.defaultView.getComputedStyle(node,"");
if(cs){
return cs.getPropertyValue(_20a);
}
}
catch(e){
if(node.style.getPropertyValue){
return node.style.getPropertyValue(_20a);
}else{
return _20b;
}
}
}else{
if(node.currentStyle){
return node.currentStyle[_20c];
}
}
}
if(node.style.getPropertyValue){
return node.style.getPropertyValue(_20a);
}else{
return _20b;
}
};
ds.getStyleProperty=function(node,_20f){
node=dojo.byId(node);
return (node&&node.style?node.style[ds.toCamelCase(_20f)]:undefined);
};
ds.getStyle=function(node,_211){
var _212=ds.getStyleProperty(node,_211);
return (_212?_212:ds.getComputedStyle(node,_211));
};
ds.setStyle=function(node,_214,_215){
node=dojo.byId(node);
if(node&&node.style){
var _216=ds.toCamelCase(_214);
node.style[_216]=_215;
}
};
ds.toCamelCase=function(_217){
var arr=_217.split("-"),cc=arr[0];
for(var i=1;i<arr.length;i++){
cc+=arr[i].charAt(0).toUpperCase()+arr[i].substring(1);
}
return cc;
};
ds.toSelectorCase=function(_21a){
return _21a.replace(/([A-Z])/g,"-$1").toLowerCase();
};
ds.setOpacity=function setOpacity(node,_21c,_21d){
node=dojo.byId(node);
if(!_21d){
if(_21c>=1){
if(h.ie){
ds.clearOpacity(node);
return;
}else{
_21c=0.999999;
}
}else{
if(_21c<0){
_21c=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="+_21c*100+")";
}
}
node.style.filter="Alpha(Opacity="+_21c*100+")";
}else{
if(h.moz){
node.style.opacity=_21c;
node.style.MozOpacity=_21c;
}else{
if(h.safari){
node.style.opacity=_21c;
node.style.KhtmlOpacity=_21c;
}else{
node.style.opacity=_21c;
}
}
}
};
ds.getOpacity=function getOpacity(node){
node=dojo.byId(node);
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);
};
ds.clearOpacity=function clearOpacity(node){
node=dojo.byId(node);
var ns=node.style;
if(h.ie){
if(node.filters&&node.filters.alpha){
ns.filter="";
}
}else{
if(h.moz){
ns.opacity=1;
ns.MozOpacity=1;
}else{
if(h.safari){
ns.opacity=1;
ns.KhtmlOpacity=1;
}else{
ns.opacity=1;
}
}
}
};
ds._toggle=function(node,_225,_226){
node=dojo.byId(node);
_226(node,!_225(node));
return _225(node);
};
ds.setShowing=function(node,_228){
ds.setStyle(node,"display",(_228?"":"none"));
};
ds.isShowing=function(node){
return (ds.getStyleProperty(node,"display")!="none");
};
ds.toggleShowing=function(node){
return ds._toggle(node,ds.isShowing,ds.setShowing);
};
ds.show=function(node){
ds.setShowing(node,true);
};
ds.hide=function(node){
ds.setShowing(node,false);
};
ds.displayMap={tr:"",td:"",th:"",img:"inline",span:"inline",input:"inline",button:"inline"};
ds.suggestDisplayByTagName=function(node){
node=dojo.byId(node);
if(node&&node.tagName){
var tag=node.tagName.toLowerCase();
return (tag in ds.displayMap?ds.displayMap[tag]:"block");
}
};
ds.setDisplay=function(node,_230){
ds.setStyle(node,"display",(dojo.lang.isString(_230)?_230:(_230?ds.suggestDisplayByTagName(node):"none")));
};
ds.isDisplayed=function(node){
return (ds.getComputedStyle(node,"display")!="none");
};
ds.toggleDisplay=function(node){
return ds._toggle(node,ds.isDisplayed,ds.setDisplay);
};
ds.setVisibility=function(node,_234){
ds.setStyle(node,"visibility",(dojo.lang.isString(_234)?_234:(_234?"visible":"hidden")));
};
ds.isVisible=function(node){
return (ds.getComputedStyle(node,"visibility")!="hidden");
};
ds.toggleVisibility=function(node){
return ds._toggle(node,ds.isVisible,ds.setVisibility);
};
ds.toCoordinateArray=function(_237,_238){
if(dojo.lang.isArray(_237)){
while(_237.length<4){
_237.push(0);
}
while(_237.length>4){
_237.pop();
}
var ret=_237;
}else{
var node=dojo.byId(_237);
var ret=[ds.getAbsoluteX(node,_238),ds.getAbsoluteY(node,_238),ds.getInnerWidth(node),ds.getInnerHeight(node)];
}
ret.x=ret[0];
ret.y=ret[1];
ret.w=ret[2];
ret.h=ret[3];
return ret;
};
})();
dojo.provide("dojo.string.common");
dojo.require("dojo.string");
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,_241,_242){
var out="";
for(var i=0;i<_241;i++){
out+=str;
if(_242&&i<_241-1){
out+=_242;
}
}
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.require("dojo.string.common");
dojo.provide("dojo.string.extras");
dojo.require("dojo.string.common");
dojo.require("dojo.lang");
dojo.string.paramString=function(str,_251,_252){
for(var name in _251){
var re=new RegExp("\\%\\{"+name+"\\}","g");
str=str.replace(re,_251[name]);
}
if(_252){
str=str.replace(/%\{([^\}\s]+)\}/g,"");
}
return str;
};
dojo.string.capitalize=function(str){
if(!dojo.lang.isString(str)){
return "";
}
if(arguments.length==0){
str=this;
}
var _256=str.split(" ");
var _257="";
var len=_256.length;
for(var i=0;i<len;i++){
var word=_256[i];
word=word.charAt(0).toUpperCase()+word.substring(1,word.length);
_257+=word;
if(i<len-1){
_257+=" ";
}
}
return new String(_257);
};
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 _25e=escape(str);
var _25f,re=/%u([0-9A-F]{4})/i;
while((_25f=_25e.match(re))){
var num=Number("0x"+_25f[1]);
var _261=escape("&#"+num+";");
ret+=_25e.substring(0,_25f.index)+_261;
_25e=_25e.substring(_25f.index+_25f[0].length);
}
ret+=_25e.replace(/\+/g,"%2B");
return ret;
};
dojo.string.escape=function(type,str){
var args=[];
for(var i=1;i<arguments.length;i++){
args.push(arguments[i]);
}
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,_267){
str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
if(!_267){
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;
}else{
return str.substring(0,len).replace(/\.+$/,"")+"...";
}
};
dojo.string.endsWith=function(str,end,_270){
if(_270){
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,_274,_275){
if(_275){
str=str.toLowerCase();
_274=_274.toLowerCase();
}
return str.indexOf(_274)==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,_27b){
if(_27b=="\n"){
text=text.replace(/\r\n/g,"\n");
text=text.replace(/\r/g,"\n");
}else{
if(_27b=="\r"){
text=text.replace(/\r\n/g,"\r");
text=text.replace(/\n/g,"\r");
}else{
text=text.replace(/([^\r])\n/g,"$1\r\n");
text=text.replace(/\r([^\n])/g,"\r\n$1");
}
}
return text;
};
dojo.string.splitEscaped=function(str,_27d){
var _27e=[];
for(var i=0,prevcomma=0;i<str.length;i++){
if(str.charAt(i)=="\\"){
i++;
continue;
}
if(str.charAt(i)==_27d){
_27e.push(str.substring(prevcomma,i));
prevcomma=i+1;
}
}
_27e.push(str.substr(prevcomma));
return _27e;
};
dojo.provide("dojo.html");
dojo.require("dojo.lang.func");
dojo.require("dojo.dom");
dojo.require("dojo.style");
dojo.require("dojo.string");
dojo.require("dojo.string.extras");
dojo.lang.mixin(dojo.html,dojo.dom);
dojo.lang.mixin(dojo.html,dojo.style);
dojo.html.clearSelection=function(){
try{
if(window["getSelection"]){
if(dojo.render.html.safari){
window.getSelection().collapse();
}else{
window.getSelection().removeAllRanges();
}
}else{
if(document.selection){
if(document.selection.empty){
document.selection.empty();
}else{
if(document.selection.clear){
document.selection.clear();
}
}
}
}
return true;
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.html.disableSelection=function(_280){
_280=dojo.byId(_280)||document.body;
var h=dojo.render.html;
if(h.mozilla){
_280.style.MozUserSelect="none";
}else{
if(h.safari){
_280.style.KhtmlUserSelect="none";
}else{
if(h.ie){
_280.unselectable="on";
}else{
return false;
}
}
}
return true;
};
dojo.html.enableSelection=function(_282){
_282=dojo.byId(_282)||document.body;
var h=dojo.render.html;
if(h.mozilla){
_282.style.MozUserSelect="";
}else{
if(h.safari){
_282.style.KhtmlUserSelect="";
}else{
if(h.ie){
_282.unselectable="off";
}else{
return false;
}
}
}
return true;
};
dojo.html.selectElement=function(_284){
_284=dojo.byId(_284);
if(document.selection&&document.body.createTextRange){
var _285=document.body.createTextRange();
_285.moveToElementText(_284);
_285.select();
}else{
if(window["getSelection"]){
var _286=window.getSelection();
if(_286["selectAllChildren"]){
_286.selectAllChildren(_284);
}
}
}
};
dojo.html.selectInputText=function(_287){
_287=dojo.byId(_287);
if(document.selection&&document.body.createTextRange){
var _288=_287.createTextRange();
_288.moveStart("character",0);
_288.moveEnd("character",_287.value.length);
_288.select();
}else{
if(window["getSelection"]){
var _289=window.getSelection();
_287.setSelectionRange(0,_287.value.length);
}
}
_287.focus();
};
dojo.html.isSelectionCollapsed=function(){
if(document["selection"]){
return document.selection.createRange().text=="";
}else{
if(window["getSelection"]){
var _28a=window.getSelection();
if(dojo.lang.isString(_28a)){
return _28a=="";
}else{
return _28a.isCollapsed;
}
}
}
};
dojo.html.getEventTarget=function(evt){
if(!evt){
evt=window.event||{};
}
if(evt.srcElement){
return evt.srcElement;
}else{
if(evt.target){
return evt.target;
}
}
return null;
};
dojo.html.getScrollTop=function(){
return document.documentElement.scrollTop||document.body.scrollTop||0;
};
dojo.html.getScrollLeft=function(){
return document.documentElement.scrollLeft||document.body.scrollLeft||0;
};
dojo.html.getDocumentWidth=function(){
dojo.deprecated("dojo.html.getDocument* has been deprecated in favor of dojo.html.getViewport*");
return dojo.html.getViewportWidth();
};
dojo.html.getDocumentHeight=function(){
dojo.deprecated("dojo.html.getDocument* has been deprecated in favor of dojo.html.getViewport*");
return dojo.html.getViewportHeight();
};
dojo.html.getDocumentSize=function(){
dojo.deprecated("dojo.html.getDocument* has been deprecated in favor of dojo.html.getViewport*");
return dojo.html.getViewportSize();
};
dojo.html.getViewportWidth=function(){
var w=0;
if(window.innerWidth){
w=window.innerWidth;
}
if(dojo.exists(document,"documentElement.clientWidth")){
var w2=document.documentElement.clientWidth;
if(!w||w2&&w2<w){
w=w2;
}
return w;
}
if(document.body){
return document.body.clientWidth;
}
return 0;
};
dojo.html.getViewportHeight=function(){
if(window.innerHeight){
return window.innerHeight;
}
if(dojo.exists(document,"documentElement.clientHeight")){
return document.documentElement.clientHeight;
}
if(document.body){
return document.body.clientHeight;
}
return 0;
};
dojo.html.getViewportSize=function(){
var ret=[dojo.html.getViewportWidth(),dojo.html.getViewportHeight()];
ret.w=ret[0];
ret.h=ret[1];
return ret;
};
dojo.html.getScrollOffset=function(){
var ret=[0,0];
if(window.pageXOffset||window.pageYOffset){
ret=[window.pageXOffset,window.pageYOffset];
}else{
if(dojo.exists(document,"documentElement.scrollTop")){
ret=[document.documentElement.scrollLeft,document.documentElement.scrollTop];
}else{
if(document.body){
ret=[document.body.scrollLeft,document.body.scrollTop];
}
}
}
ret.x=ret[0];
ret.y=ret[1];
return ret;
};
dojo.html.getParentOfType=function(node,type){
dojo.deprecated("dojo.html.getParentOfType has been deprecated in favor of dojo.html.getParentByType*");
return dojo.html.getParentByType(node,type);
};
dojo.html.getParentByType=function(node,type){
var _294=dojo.byId(node);
type=type.toLowerCase();
while((_294)&&(_294.nodeName.toLowerCase()!=type)){
if(_294==(document["body"]||document["documentElement"])){
return null;
}
_294=_294.parentNode;
}
return _294;
};
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){
node=dojo.byId(node);
return dojo.html.getAttribute(node,attr)?true:false;
};
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 dojo.string.trim(cs);
};
dojo.html.getClasses=function(node){
var c=dojo.html.getClass(node);
return (c=="")?[]:c.split(/\s+/g);
};
dojo.html.hasClass=function(node,_2a0){
return dojo.lang.inArray(dojo.html.getClasses(node),_2a0);
};
dojo.html.prependClass=function(node,_2a2){
_2a2+=" "+dojo.html.getClass(node);
return dojo.html.setClass(node,_2a2);
};
dojo.html.addClass=function(node,_2a4){
if(dojo.html.hasClass(node,_2a4)){
return false;
}
_2a4=dojo.string.trim(dojo.html.getClass(node)+" "+_2a4);
return dojo.html.setClass(node,_2a4);
};
dojo.html.setClass=function(node,_2a6){
node=dojo.byId(node);
var cs=new String(_2a6);
try{
if(typeof node.className=="string"){
node.className=cs;
}else{
if(node.setAttribute){
node.setAttribute("class",_2a6);
node.className=cs;
}else{
return false;
}
}
}
catch(e){
dojo.debug("dojo.html.setClass() failed",e);
}
return true;
};
dojo.html.removeClass=function(node,_2a9,_2aa){
var _2a9=dojo.string.trim(new String(_2a9));
try{
var cs=dojo.html.getClasses(node);
var nca=[];
if(_2aa){
for(var i=0;i<cs.length;i++){
if(cs[i].indexOf(_2a9)==-1){
nca.push(cs[i]);
}
}
}else{
for(var i=0;i<cs.length;i++){
if(cs[i]!=_2a9){
nca.push(cs[i]);
}
}
}
dojo.html.setClass(node,nca.join(" "));
}
catch(e){
dojo.debug("dojo.html.removeClass() failed",e);
}
return true;
};
dojo.html.replaceClass=function(node,_2af,_2b0){
dojo.html.removeClass(node,_2b0);
dojo.html.addClass(node,_2af);
};
dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2};
dojo.html.getElementsByClass=function(_2b1,_2b2,_2b3,_2b4){
_2b2=dojo.byId(_2b2)||document;
var _2b5=_2b1.split(/\s+/g);
var _2b6=[];
if(_2b4!=1&&_2b4!=2){
_2b4=0;
}
var _2b7=new RegExp("(\\s|^)(("+_2b5.join(")|(")+"))(\\s|$)");
if(!_2b3){
_2b3="*";
}
var _2b8=_2b2.getElementsByTagName(_2b3);
var node,i=0;
outer:
while(node=_2b8[i++]){
var _2ba=dojo.html.getClasses(node);
if(_2ba.length==0){
continue outer;
}
var _2bb=0;
for(var j=0;j<_2ba.length;j++){
if(_2b7.test(_2ba[j])){
if(_2b4==dojo.html.classMatchType.ContainsAny){
_2b6.push(node);
continue outer;
}else{
_2bb++;
}
}else{
if(_2b4==dojo.html.classMatchType.IsOnly){
continue outer;
}
}
}
if(_2bb==_2b5.length){
if(_2b4==dojo.html.classMatchType.IsOnly&&_2bb==_2ba.length){
_2b6.push(node);
}else{
if(_2b4==dojo.html.classMatchType.ContainsAll){
_2b6.push(node);
}
}
}
}
return _2b6;
};
dojo.html.getElementsByClassName=dojo.html.getElementsByClass;
dojo.html.getCursorPosition=function(e){
e=e||window.event;
var _2be={x:0,y:0};
if(e.pageX||e.pageY){
_2be.x=e.pageX;
_2be.y=e.pageY;
}else{
var de=document.documentElement;
var db=document.body;
_2be.x=e.clientX+((de||db)["scrollLeft"])-((de||db)["clientLeft"]);
_2be.y=e.clientY+((de||db)["scrollTop"])-((de||db)["clientTop"]);
}
return _2be;
};
dojo.html.gravity=function(node,e){
node=dojo.byId(node);
var _2c3=dojo.html.getCursorPosition(e);
with(dojo.html){
var _2c4=getAbsoluteX(node,true)+(getInnerWidth(node)/2);
var _2c5=getAbsoluteY(node,true)+(getInnerHeight(node)/2);
}
with(dojo.html.gravity){
return ((_2c3.x<_2c4?WEST:EAST)|(_2c3.y<_2c5?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(_2c6,e){
_2c6=dojo.byId(_2c6);
var _2c8=dojo.html.getCursorPosition(e);
with(dojo.html){
var top=getAbsoluteY(_2c6,true);
var _2ca=top+getInnerHeight(_2c6);
var left=getAbsoluteX(_2c6,true);
var _2cc=left+getInnerWidth(_2c6);
}
return (_2c8.x>=left&&_2c8.x<=_2cc&&_2c8.y>=top&&_2c8.y<=_2ca);
};
dojo.html.renderedTextContent=function(node){
node=dojo.byId(node);
var _2ce="";
if(node==null){
return _2ce;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
var _2d0="unknown";
try{
_2d0=dojo.style.getStyle(node.childNodes[i],"display");
}
catch(E){
}
switch(_2d0){
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":
_2ce+="\n";
_2ce+=dojo.html.renderedTextContent(node.childNodes[i]);
_2ce+="\n";
break;
case "none":
break;
default:
if(node.childNodes[i].tagName&&node.childNodes[i].tagName.toLowerCase()=="br"){
_2ce+="\n";
}else{
_2ce+=dojo.html.renderedTextContent(node.childNodes[i]);
}
break;
}
break;
case 3:
case 2:
case 4:
var text=node.childNodes[i].nodeValue;
var _2d2="unknown";
try{
_2d2=dojo.style.getStyle(node,"text-transform");
}
catch(E){
}
switch(_2d2){
case "capitalize":
text=dojo.string.capitalize(text);
break;
case "uppercase":
text=text.toUpperCase();
break;
case "lowercase":
text=text.toLowerCase();
break;
default:
break;
}
switch(_2d2){
case "nowrap":
break;
case "pre-wrap":
break;
case "pre-line":
break;
case "pre":
break;
default:
text=text.replace(/\s+/," ");
if(/\s$/.test(_2ce)){
text.replace(/^\s/,"");
}
break;
}
_2ce+=text;
break;
default:
break;
}
}
return _2ce;
};
dojo.html.setActiveStyleSheet=function(_2d3){
var i=0,a,els=document.getElementsByTagName("link");
while(a=els[i++]){
if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")){
a.disabled=true;
if(a.getAttribute("title")==_2d3){
a.disabled=false;
}
}
}
};
dojo.html.getActiveStyleSheet=function(){
var i=0,a,els=document.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=document.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.body=function(){
dojo.deprecated("dojo.html.body","use document.body instead");
return document.body||document.getElementsByTagName("body")[0];
};
dojo.html.createNodesFromText=function(txt,trim){
if(trim){
txt=dojo.string.trim(txt);
}
var tn=document.createElement("div");
tn.style.visibility="hidden";
document.body.appendChild(tn);
var _2da="none";
if((/^<t[dh][\s\r\n>]/i).test(dojo.string.trimStart(txt))){
txt="<table><tbody><tr>"+txt+"</tr></tbody></table>";
_2da="cell";
}else{
if((/^<tr[\s\r\n>]/i).test(dojo.string.trimStart(txt))){
txt="<table><tbody>"+txt+"</tbody></table>";
_2da="row";
}else{
if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(dojo.string.trimStart(txt))){
txt="<table>"+txt+"</table>";
_2da="section";
}
}
}
tn.innerHTML=txt;
tn.normalize();
var _2db=null;
switch(_2da){
case "cell":
_2db=tn.getElementsByTagName("tr")[0];
break;
case "row":
_2db=tn.getElementsByTagName("tbody")[0];
break;
case "section":
_2db=tn.getElementsByTagName("table")[0];
break;
default:
_2db=tn;
break;
}
var _2dc=[];
for(var x=0;x<_2db.childNodes.length;x++){
_2dc.push(_2db.childNodes[x].cloneNode(true));
}
tn.style.display="none";
document.body.removeChild(tn);
return _2dc;
};
dojo.html.isTag=function(node){
node=dojo.byId(node);
if(node&&node.tagName){
var arr=dojo.lang.map(dojo.lang.toArray(arguments,1),function(a){
return String(a).toLowerCase();
});
return arr[dojo.lang.find(node.tagName.toLowerCase(),arr)]||"";
}
return "";
};
dojo.html.placeOnScreen=function(node,_2e2,_2e3,_2e4,_2e5){
if(dojo.lang.isArray(_2e2)){
_2e5=_2e4;
_2e4=_2e3;
_2e3=_2e2[1];
_2e2=_2e2[0];
}
if(!isNaN(_2e4)){
_2e4=[Number(_2e4),Number(_2e4)];
}else{
if(!dojo.lang.isArray(_2e4)){
_2e4=[0,0];
}
}
var _2e6=dojo.html.getScrollOffset();
var view=dojo.html.getViewportSize();
node=dojo.byId(node);
var w=node.offsetWidth+_2e4[0];
var h=node.offsetHeight+_2e4[1];
if(_2e5){
_2e2-=_2e6.x;
_2e3-=_2e6.y;
}
var x=_2e2+w;
if(x>view.w){
x=view.w-w;
}else{
x=_2e2;
}
x=Math.max(_2e4[0],x)+_2e6.x;
var y=_2e3+h;
if(y>view.h){
y=view.h-h;
}else{
y=_2e3;
}
y=Math.max(_2e4[1],y)+_2e6.y;
node.style.left=x+"px";
node.style.top=y+"px";
var ret=[x,y];
ret.x=x;
ret.y=y;
return ret;
};
dojo.html.placeOnScreenPoint=function(node,_2ee,_2ef,_2f0,_2f1){
if(dojo.lang.isArray(_2ee)){
_2f1=_2f0;
_2f0=_2ef;
_2ef=_2ee[1];
_2ee=_2ee[0];
}
if(!isNaN(_2f0)){
_2f0=[Number(_2f0),Number(_2f0)];
}else{
if(!dojo.lang.isArray(_2f0)){
_2f0=[0,0];
}
}
var _2f2=dojo.html.getScrollOffset();
var view=dojo.html.getViewportSize();
node=dojo.byId(node);
var _2f4=node.style.display;
node.style.display="";
var w=dojo.style.getInnerWidth(node);
var h=dojo.style.getInnerHeight(node);
node.style.display=_2f4;
if(_2f1){
_2ee-=_2f2.x;
_2ef-=_2f2.y;
}
var x=-1,y=-1;
if((_2ee+_2f0[0])+w<=view.w&&(_2ef+_2f0[1])+h<=view.h){
x=(_2ee+_2f0[0]);
y=(_2ef+_2f0[1]);
}
if((x<0||y<0)&&(_2ee-_2f0[0])<=view.w&&(_2ef+_2f0[1])+h<=view.h){
x=(_2ee-_2f0[0])-w;
y=(_2ef+_2f0[1]);
}
if((x<0||y<0)&&(_2ee+_2f0[0])+w<=view.w&&(_2ef-_2f0[1])<=view.h){
x=(_2ee+_2f0[0]);
y=(_2ef-_2f0[1])-h;
}
if((x<0||y<0)&&(_2ee-_2f0[0])<=view.w&&(_2ef-_2f0[1])<=view.h){
x=(_2ee-_2f0[0])-w;
y=(_2ef-_2f0[1])-h;
}
if(x<0||y<0||(x+w>view.w)||(y+h>view.h)){
return dojo.html.placeOnScreen(node,_2ee,_2ef,_2f0,_2f1);
}
x+=_2f2.x;
y+=_2f2.y;
node.style.left=x+"px";
node.style.top=y+"px";
var ret=[x,y];
ret.x=x;
ret.y=y;
return ret;
};
dojo.html.BackgroundIframe=function(node){
if(dojo.render.html.ie){
var html="<iframe "+"style='position: absolute; left: 0px; top: 0px; width: 100%; height: 100%;"+"z-index: -1; filter:Alpha(Opacity=\"0\");' "+">";
this.iframe=document.createElement(html);
if(node){
node.appendChild(this.iframe);
this.domNode=node;
}else{
document.body.appendChild(this.iframe);
this.iframe.style.display="none";
}
}
};
dojo.lang.extend(dojo.html.BackgroundIframe,{iframe:null,onResized:function(){
if(this.iframe&&this.domNode){
var w=dojo.style.getOuterWidth(this.domNode);
var h=dojo.style.getOuterHeight(this.domNode);
if(w==0||h==0){
dojo.lang.setTimeout(this,this.onResized,50);
return;
}
var s=this.iframe.style;
s.width=w+"px";
s.height=h+"px";
}
},size:function(node){
if(!this.iframe){
return;
}
coords=dojo.style.toCoordinateArray(node,true);
var s=this.iframe.style;
s.width=coords.w+"px";
s.height=coords.h+"px";
s.left=coords.x+"px";
s.top=coords.y+"px";
},setZIndex:function(node){
if(!this.iframe){
return;
}
if(dojo.dom.isNode(node)){
this.iframe.style.zIndex=dojo.html.getStyle(node,"z-index")-1;
}else{
if(!isNaN(node)){
this.iframe.style.zIndex=node;
}
}
},show:function(){
if(!this.iframe){
return;
}
this.iframe.style.display="block";
},hide:function(){
if(!this.ie){
return;
}
var s=this.iframe.style;
s.display="none";
},remove:function(){
dojo.dom.removeNode(this.iframe);
}});
dojo.provide("dojo.xml.Parse");
dojo.require("dojo.dom");
dojo.xml.Parse=function(){
function getDojoTagName(node){
var _303=node.tagName;
if(_303.substr(0,5).toLowerCase()!="dojo:"){
if(_303.substr(0,4).toLowerCase()=="dojo"){
return "dojo:"+_303.substring(4).toLowerCase();
}
var djt=node.getAttribute("dojoType")||node.getAttribute("dojotype");
if(djt){
return "dojo:"+djt.toLowerCase();
}
if(node.getAttributeNS&&node.getAttributeNS(dojo.dom.dojoml,"type")){
return "dojo:"+node.getAttributeNS(dojo.dom.dojoml,"type").toLowerCase();
}
try{
djt=node.getAttribute("dojo:type");
}
catch(e){
}
if(djt){
return "dojo:"+djt.toLowerCase();
}
if(!dj_global["djConfig"]||!djConfig["ignoreClassNames"]){
var _305=node.className||node.getAttribute("class");
if(_305&&_305.indexOf&&_305.indexOf("dojo-")!=-1){
var _306=_305.split(" ");
for(var x=0;x<_306.length;x++){
if(_306[x].length>5&&_306[x].indexOf("dojo-")>=0){
return "dojo:"+_306[x].substr(5).toLowerCase();
}
}
}
}
}
return _303.toLowerCase();
}
this.parseFragment=function(_308){
var _309={};
var _30a=getDojoTagName(_308);
_309[_30a]=new Array(_308.tagName);
var _30b=this.parseAttributes(_308);
for(var attr in _30b){
if(!_309[attr]){
_309[attr]=[];
}
_309[attr][_309[attr].length]=_30b[attr];
}
var _30d=_308.childNodes;
for(var _30e in _30d){
switch(_30d[_30e].nodeType){
case dojo.dom.ELEMENT_NODE:
_309[_30a].push(this.parseElement(_30d[_30e]));
break;
case dojo.dom.TEXT_NODE:
if(_30d.length==1){
if(!_309[_308.tagName]){
_309[_30a]=[];
}
_309[_30a].push({value:_30d[0].nodeValue});
}
break;
}
}
return _309;
};
this.parseElement=function(node,_310,_311,_312){
var _313={};
var _314=getDojoTagName(node);
_313[_314]=[];
if((!_311)||(_314.substr(0,4).toLowerCase()=="dojo")){
var _315=this.parseAttributes(node);
for(var attr in _315){
if((!_313[_314][attr])||(typeof _313[_314][attr]!="array")){
_313[_314][attr]=[];
}
_313[_314][attr].push(_315[attr]);
}
_313[_314].nodeRef=node;
_313.tagName=_314;
_313.index=_312||0;
}
var _317=0;
for(var i=0;i<node.childNodes.length;i++){
var tcn=node.childNodes.item(i);
switch(tcn.nodeType){
case dojo.dom.ELEMENT_NODE:
_317++;
var ctn=getDojoTagName(tcn);
if(!_313[ctn]){
_313[ctn]=[];
}
_313[ctn].push(this.parseElement(tcn,true,_311,_317));
if((tcn.childNodes.length==1)&&(tcn.childNodes.item(0).nodeType==dojo.dom.TEXT_NODE)){
_313[ctn][_313[ctn].length-1].value=tcn.childNodes.item(0).nodeValue;
}
break;
case dojo.dom.TEXT_NODE:
if(node.childNodes.length==1){
_313[_314].push({value:node.childNodes.item(0).nodeValue});
}
break;
default:
break;
}
}
return _313;
};
this.parseAttributes=function(node){
var _31c={};
var atts=node.attributes;
for(var i=0;i<atts.length;i++){
var _31f=atts.item(i);
if((dojo.render.html.capable)&&(dojo.render.html.ie)){
if(!_31f){
continue;
}
if((typeof _31f=="object")&&(typeof _31f.nodeValue=="undefined")||(_31f.nodeValue==null)||(_31f.nodeValue=="")){
continue;
}
}
var nn=(_31f.nodeName.indexOf("dojo:")==-1)?_31f.nodeName:_31f.nodeName.split("dojo:")[1];
_31c[nn]={value:_31f.nodeValue};
}
return _31c;
};
};
dojo.provide("dojo.lang.extras");
dojo.require("dojo.lang.common");
dojo.lang.setTimeout=function(func,_322){
var _323=window,argsStart=2;
if(!dojo.lang.isFunction(func)){
_323=func;
func=_322;
_322=arguments[2];
argsStart++;
}
if(dojo.lang.isString(func)){
func=_323[func];
}
var args=[];
for(var i=argsStart;i<arguments.length;i++){
args.push(arguments[i]);
}
return setTimeout(function(){
func.apply(_323,args);
},_322);
};
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){
var ret={},key;
for(key in obj){
if(dojo.lang.isUndefined(ret[key])){
ret[key]=obj[key];
}
}
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(_32c,_32d,_32e){
with(dojo.parseObjPath(_32c,_32d,_32e)){
return dojo.evalProp(prop,obj,_32e);
}
};
dojo.lang.setObjPathValue=function(_32f,_330,_331,_332){
if(arguments.length<4){
_332=true;
}
with(dojo.parseObjPath(_32f,_331,_332)){
if(obj&&(_332||(prop in obj))){
obj[prop]=_330;
}
}
};
dojo.provide("dojo.event");
dojo.require("dojo.lang.array");
dojo.require("dojo.lang.extras");
dojo.require("dojo.lang.func");
dojo.event=new function(){
this.canTimeout=dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]);
function interpolateArgs(args){
var dl=dojo.lang;
var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(args.length>2)?args[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false};
switch(args.length){
case 0:
return;
case 1:
return;
case 2:
ao.srcFunc=args[0];
ao.adviceFunc=args[1];
break;
case 3:
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=args[0];
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
}else{
if((dl.isString(args[1]))&&(dl.isString(args[2]))){
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
}else{
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){
ao.adviceType="after";
ao.srcObj=args[0];
ao.srcFunc=args[1];
var _336=dojo.lang.nameAnonFunc(args[2],ao.adviceObj);
ao.adviceFunc=_336;
}else{
if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=dj_global;
var _336=dojo.lang.nameAnonFunc(args[0],ao.srcObj);
ao.srcFunc=_336;
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 _336=dojo.lang.nameAnonFunc(args[1],dj_global);
ao.srcFunc=_336;
ao.adviceObj=args[2];
ao.adviceFunc=args[3];
}else{
if(dl.isObject(args[1])){
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=dj_global;
ao.adviceFunc=args[3];
}else{
if(dl.isObject(args[2])){
ao.srcObj=dj_global;
ao.srcFunc=args[1];
ao.adviceObj=args[2];
ao.adviceFunc=args[3];
}else{
ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global;
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
ao.aroundFunc=args[3];
}
}
}
}
}
break;
case 6:
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=args[3];
ao.adviceFunc=args[4];
ao.aroundFunc=args[5];
ao.aroundObj=dj_global;
break;
default:
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=args[3];
ao.adviceFunc=args[4];
ao.aroundObj=args[5];
ao.aroundFunc=args[6];
ao.once=args[7];
ao.delay=args[8];
ao.rate=args[9];
ao.adviceMsg=args[10];
break;
}
if(dl.isFunction(ao.aroundFunc)){
var _336=dojo.lang.nameAnonFunc(ao.aroundFunc,ao.aroundObj);
ao.aroundFunc=_336;
}
if(!dl.isString(ao.srcFunc)){
ao.srcFunc=dojo.lang.getNameInObj(ao.srcObj,ao.srcFunc);
}
if(!dl.isString(ao.adviceFunc)){
ao.adviceFunc=dojo.lang.getNameInObj(ao.adviceObj,ao.adviceFunc);
}
if((ao.aroundObj)&&(!dl.isString(ao.aroundFunc))){
ao.aroundFunc=dojo.lang.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);
}
return ao;
}
this.connect=function(){
if(arguments.length==1){
var ao=arguments[0];
}else{
var ao=interpolateArgs(arguments);
}
if(dojo.lang.isArray(ao.srcObj)&&ao.srcObj!=""){
var _338={};
for(var x in ao){
_338[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);
}
_338.srcObj=src;
mjps.push(dojo.event.connect.call(dojo.event,_338));
});
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 _340;
if((arguments.length==1)&&(typeof a1=="object")){
_340=a1;
}else{
_340={srcObj:a1,srcFunc:a2};
}
_340.adviceFunc=function(){
var _341=[];
for(var x=0;x<arguments.length;x++){
_341.push(arguments[x]);
}
dojo.debug("("+_340.srcObj+")."+_340.srcFunc,":",_341.join(", "));
};
this.kwConnect(_340);
};
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);
ao.once=true;
return this.connect(ao);
};
this._kwConnectImpl=function(_348,_349){
var fn=(_349)?"disconnect":"connect";
if(typeof _348["srcFunc"]=="function"){
_348.srcObj=_348["srcObj"]||dj_global;
var _34b=dojo.lang.nameAnonFunc(_348.srcFunc,_348.srcObj);
_348.srcFunc=_34b;
}
if(typeof _348["adviceFunc"]=="function"){
_348.adviceObj=_348["adviceObj"]||dj_global;
var _34b=dojo.lang.nameAnonFunc(_348.adviceFunc,_348.adviceObj);
_348.adviceFunc=_34b;
}
return dojo.event[fn]((_348["type"]||_348["adviceType"]||"after"),_348["srcObj"]||dj_global,_348["srcFunc"],_348["adviceObj"]||_348["targetObj"]||dj_global,_348["adviceFunc"]||_348["targetFunc"],_348["aroundObj"],_348["aroundFunc"],_348["once"],_348["delay"],_348["rate"],_348["adviceMsg"]||false);
};
this.kwConnect=function(_34c){
return this._kwConnectImpl(_34c,false);
};
this.disconnect=function(){
var ao=interpolateArgs(arguments);
if(!ao.adviceFunc){
return;
}
var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc);
return mjp.removeAdvice(ao.adviceObj,ao.adviceFunc,ao.adviceType,ao.once);
};
this.kwDisconnect=function(_34f){
return this._kwConnectImpl(_34f,true);
};
};
dojo.event.MethodInvocation=function(_350,obj,args){
this.jp_=_350;
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,_358){
this.object=obj||dj_global;
this.methodname=_358;
this.methodfunc=this.object[_358];
this.before=[];
this.after=[];
this.around=[];
};
dojo.event.MethodJoinPoint.getForMethod=function(obj,_35a){
if(!obj){
obj=dj_global;
}
if(!obj[_35a]){
obj[_35a]=function(){
};
}else{
if((!dojo.lang.isFunction(obj[_35a]))&&(!dojo.lang.isAlien(obj[_35a]))){
return null;
}
}
var _35b=_35a+"$joinpoint";
var _35c=_35a+"$joinpoint$method";
var _35d=obj[_35b];
if(!_35d){
var _35e=false;
if(dojo.event["browser"]){
if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){
_35e=true;
dojo.event.browser.addClobberNodeAttrs(obj,[_35b,_35c,_35a]);
}
}
var _35f=obj[_35a].length;
obj[_35c]=obj[_35a];
_35d=obj[_35b]=new dojo.event.MethodJoinPoint(obj,_35c);
obj[_35a]=function(){
var args=[];
if((_35e)&&(!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{
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)&&(_35e)&&(dojo.event.browser.isEvent(arguments[x]))){
args.push(dojo.event.browser.fixEvent(arguments[x],this));
}else{
args.push(arguments[x]);
}
}
}
return _35d.run.apply(_35d,args);
};
obj[_35a].__preJoinArity=_35f;
}
return _35d;
};
dojo.lang.extend(dojo.event.MethodJoinPoint,{unintercept:function(){
this.object[this.methodname]=this.methodfunc;
},disconnect:dojo.lang.forward("unintercept"),run:function(){
var obj=this.object||dj_global;
var args=arguments;
var _365=[];
for(var x=0;x<args.length;x++){
_365[x]=args[x];
}
var _367=function(marr){
if(!marr){
dojo.debug("Null argument to unrollAdvice()");
return;
}
var _369=marr[0]||dj_global;
var _36a=marr[1];
if(!_369[_36a]){
dojo.raise("function \""+_36a+"\" does not exist on \""+_369+"\"");
}
var _36b=marr[2]||dj_global;
var _36c=marr[3];
var msg=marr[6];
var _36e;
var to={args:[],jp_:this,object:obj,proceed:function(){
return _369[_36a].apply(_369,to.args);
}};
to.args=_365;
var _370=parseInt(marr[4]);
var _371=((!isNaN(_370))&&(marr[4]!==null)&&(typeof marr[4]!="undefined"));
if(marr[5]){
var rate=parseInt(marr[5]);
var cur=new Date();
var _374=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;
_367(mcpy);
},tod);
}
return;
}else{
marr.last=cur;
}
}
if(_36c){
_36b[_36c].call(_36b,to);
}else{
if((_371)&&((dojo.render.html)||(dojo.render.svg))){
dj_global["setTimeout"](function(){
if(msg){
_369[_36a].call(_369,to);
}else{
_369[_36a].apply(_369,args);
}
},_370);
}else{
if(msg){
_369[_36a].call(_369,to);
}else{
_369[_36a].apply(_369,args);
}
}
}
};
if(this.before.length>0){
dojo.lang.forEach(this.before,_367);
}
var _377;
if(this.around.length>0){
var mi=new dojo.event.MethodInvocation(this,obj,args);
_377=mi.proceed();
}else{
if(this.methodfunc){
_377=this.object[this.methodname].apply(this.object,args);
}
}
if(this.after.length>0){
dojo.lang.forEach(this.after,_367);
}
return (this.methodfunc)?_377:null;
},getArr:function(kind){
var arr=this.after;
if((typeof kind=="string")&&(kind.indexOf("before")!=-1)){
arr=this.before;
}else{
if(kind=="around"){
arr=this.around;
}
}
return arr;
},kwAddAdvice:function(args){
this.addAdvice(args["adviceObj"],args["adviceFunc"],args["aroundObj"],args["aroundFunc"],args["adviceType"],args["precedence"],args["once"],args["delay"],args["rate"],args["adviceMsg"]);
},addAdvice:function(_37c,_37d,_37e,_37f,_380,_381,once,_383,rate,_385){
var arr=this.getArr(_380);
if(!arr){
dojo.raise("bad this: "+this);
}
var ao=[_37c,_37d,_37e,_37f,_383,rate,_385];
if(once){
if(this.hasAdvice(_37c,_37d,_380,arr)>=0){
return;
}
}
if(_381=="first"){
arr.unshift(ao);
}else{
arr.push(ao);
}
},hasAdvice:function(_388,_389,_38a,arr){
if(!arr){
arr=this.getArr(_38a);
}
var ind=-1;
for(var x=0;x<arr.length;x++){
if((arr[x][0]==_388)&&(arr[x][1]==_389)){
ind=x;
}
}
return ind;
},removeAdvice:function(_38e,_38f,_390,once){
var arr=this.getArr(_390);
var ind=this.hasAdvice(_38e,_38f,_390,arr);
if(ind==-1){
return false;
}
while(ind!=-1){
arr.splice(ind,1);
if(once){
break;
}
ind=this.hasAdvice(_38e,_38f,_390,arr);
}
return true;
}});
dojo.require("dojo.event");
dojo.provide("dojo.event.topic");
dojo.event.topic=new function(){
this.topics={};
this.getTopic=function(_394){
if(!this.topics[_394]){
this.topics[_394]=new this.TopicImpl(_394);
}
return this.topics[_394];
};
this.registerPublisher=function(_395,obj,_397){
var _395=this.getTopic(_395);
_395.registerPublisher(obj,_397);
};
this.subscribe=function(_398,obj,_39a){
var _398=this.getTopic(_398);
_398.subscribe(obj,_39a);
};
this.unsubscribe=function(_39b,obj,_39d){
var _39b=this.getTopic(_39b);
_39b.unsubscribe(obj,_39d);
};
this.publish=function(_39e,_39f){
var _39e=this.getTopic(_39e);
var args=[];
if(arguments.length==2&&(dojo.lang.isArray(_39f)||_39f.callee)){
args=_39f;
}else{
var args=[];
for(var x=1;x<arguments.length;x++){
args.push(arguments[x]);
}
}
_39e.sendMessage.apply(_39e,args);
};
};
dojo.event.topic.TopicImpl=function(_3a2){
this.topicName=_3a2;
var self=this;
self.subscribe=function(_3a4,_3a5){
var tf=_3a5||_3a4;
var to=(!_3a5)?dj_global:_3a4;
dojo.event.kwConnect({srcObj:self,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
};
self.unsubscribe=function(_3a8,_3a9){
var tf=(!_3a9)?_3a8:_3a9;
var to=(!_3a9)?null:_3a8;
dojo.event.kwDisconnect({srcObj:self,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
};
self.registerPublisher=function(_3ac,_3ad){
dojo.event.connect(_3ac,_3ad,self,"sendMessage");
};
self.sendMessage=function(_3ae){
};
};
dojo.provide("dojo.event.browser");
dojo.require("dojo.event");
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(_3b1){
var na;
var tna;
if(_3b1){
tna=_3b1.all||_3b1.getElementsByTagName("*");
na=[_3b1];
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 _3b5={};
for(var i=na.length-1;i>=0;i=i-1){
var el=na[i];
if(el["__clobberAttrs__"]){
for(var j=0;j<el.__clobberAttrs__.length;j++){
nukeProp(el,el.__clobberAttrs__[j]);
}
nukeProp(el,"__clobberAttrs__");
nukeProp(el,"__doClobber__");
}
}
na=null;
};
};
if(dojo.render.html.ie){
window.onunload=function(){
dojo_ie_clobber.clobber();
try{
if((dojo["widget"])&&(dojo.widget["manager"])){
dojo.widget.manager.destroyAll();
}
}
catch(e){
}
try{
window.onload=null;
}
catch(e){
}
try{
window.onunload=null;
}
catch(e){
}
dojo_ie_clobber.clobberNodes=[];
};
}
dojo.event.browser=new function(){
var _3b9=0;
this.clean=function(node){
if(dojo.render.html.ie){
dojo_ie_clobber.clobber(node);
}
};
this.addClobberNode=function(node){
if(!node["__doClobber__"]){
node.__doClobber__=true;
dojo_ie_clobber.clobberNodes.push(node);
node.__clobberAttrs__=[];
}
};
this.addClobberNodeAttrs=function(node,_3bd){
this.addClobberNode(node);
for(var x=0;x<_3bd.length;x++){
node.__clobberAttrs__.push(_3bd[x]);
}
};
this.removeListener=function(node,_3c0,fp,_3c2){
if(!_3c2){
var _3c2=false;
}
_3c0=_3c0.toLowerCase();
if(_3c0.substr(0,2)=="on"){
_3c0=_3c0.substr(2);
}
if(node.removeEventListener){
node.removeEventListener(_3c0,fp,_3c2);
}
};
this.addListener=function(node,_3c4,fp,_3c6,_3c7){
if(!node){
return;
}
if(!_3c6){
var _3c6=false;
}
_3c4=_3c4.toLowerCase();
if(_3c4.substr(0,2)!="on"){
_3c4="on"+_3c4;
}
if(!_3c7){
var _3c8=function(evt){
if(!evt){
evt=window.event;
}
var ret=fp(dojo.event.browser.fixEvent(evt,this));
if(_3c6){
dojo.event.browser.stopEvent(evt);
}
return ret;
};
}else{
_3c8=fp;
}
if(node.addEventListener){
node.addEventListener(_3c4.substr(2),_3c8,_3c6);
return _3c8;
}else{
if(typeof node[_3c4]=="function"){
var _3cb=node[_3c4];
node[_3c4]=function(e){
_3cb(e);
return _3c8(e);
};
}else{
node[_3c4]=_3c8;
}
if(dojo.render.html.ie){
this.addClobberNodeAttrs(node,[_3c4]);
}
return _3c8;
}
};
this.isEvent=function(obj){
return (typeof obj!="undefined")&&(typeof Event!="undefined")&&(obj.eventPhase);
};
this.currentEvent=null;
this.callListener=function(_3ce,_3cf){
if(typeof _3ce!="function"){
dojo.raise("listener not a function: "+_3ce);
}
dojo.event.browser.currentEvent.currentTarget=_3cf;
return _3ce.call(_3cf,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_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_LEFT_WINDOW:91,KEY_RIGHT_WINDOW:92,KEY_SELECT:93,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_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,_3d2){
if((!evt)&&(window["event"])){
var 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((dojo.render.html.ie)&&(evt["type"]=="keypress")){
evt.charCode=evt.keyCode;
}
}
if(dojo.render.html.ie){
if(!evt.target){
evt.target=evt.srcElement;
}
if(!evt.currentTarget){
evt.currentTarget=(_3d2?_3d2:evt.srcElement);
}
if(!evt.layerX){
evt.layerX=evt.offsetX;
}
if(!evt.layerY){
evt.layerY=evt.offsetY;
}
if(evt.fromElement){
evt.relatedTarget=evt.fromElement;
}
if(evt.toElement){
evt.relatedTarget=evt.toElement;
}
this.currentEvent=evt;
evt.callListener=this.callListener;
evt.stopPropagation=this.stopPropagation;
evt.preventDefault=this.preventDefault;
}
return evt;
};
this.stopEvent=function(ev){
if(window.event){
ev.returnValue=false;
ev.cancelBubble=true;
}else{
ev.preventDefault();
ev.stopPropagation();
}
};
};
dojo.hostenv.conditionalLoadModule({common:["dojo.event","dojo.event.topic"],browser:["dojo.event.browser"],dashboard:["dojo.event.browser"]});
dojo.hostenv.moduleLoaded("dojo.event.*");
dojo.provide("dojo.widget.Manager");
dojo.require("dojo.lang.array");
dojo.require("dojo.lang.func");
dojo.require("dojo.event.*");
dojo.widget.manager=new function(){
this.widgets=[];
this.widgetIds=[];
this.topWidgets={};
var _3d5={};
var _3d6=[];
this.getUniqueId=function(_3d7){
return _3d7+"_"+(_3d5[_3d7]!=undefined?++_3d5[_3d7]:_3d5[_3d7]=0);
};
this.add=function(_3d8){
dojo.profile.start("dojo.widget.manager.add");
this.widgets.push(_3d8);
if(!_3d8.extraArgs["id"]){
_3d8.extraArgs["id"]=_3d8.extraArgs["ID"];
}
if(_3d8.widgetId==""){
if(_3d8["id"]){
_3d8.widgetId=_3d8["id"];
}else{
if(_3d8.extraArgs["id"]){
_3d8.widgetId=_3d8.extraArgs["id"];
}else{
_3d8.widgetId=this.getUniqueId(_3d8.widgetType);
}
}
}
if(this.widgetIds[_3d8.widgetId]){
dojo.debug("widget ID collision on ID: "+_3d8.widgetId);
}
this.widgetIds[_3d8.widgetId]=_3d8;
dojo.profile.end("dojo.widget.manager.add");
};
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(_3da){
var tw=this.widgets[_3da].widgetId;
delete this.widgetIds[tw];
this.widgets.splice(_3da,1);
};
this.removeById=function(id){
for(var i=0;i<this.widgets.length;i++){
if(this.widgets[i].widgetId==id){
this.remove(i);
break;
}
}
};
this.getWidgetById=function(id){
return this.widgetIds[id];
};
this.getWidgetsByType=function(type){
var lt=type.toLowerCase();
var ret=[];
dojo.lang.forEach(this.widgets,function(x){
if(x.widgetType.toLowerCase()==lt){
ret.push(x);
}
});
return ret;
};
this.getWidgetsOfType=function(id){
dj_deprecated("getWidgetsOfType is depecrecated, use getWidgetsByType");
return dojo.widget.manager.getWidgetsByType(id);
};
this.getWidgetsByFilter=function(_3e4){
var ret=[];
dojo.lang.forEach(this.widgets,function(x){
if(_3e4(x)){
ret.push(x);
}
});
return ret;
};
this.getAllWidgets=function(){
return this.widgets.concat();
};
this.getWidgetByNode=function(node){
var w=this.getAllWidgets();
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 _3ea={};
var _3eb=["dojo.widget"];
for(var i=0;i<_3eb.length;i++){
_3eb[_3eb[i]]=true;
}
this.registerWidgetPackage=function(_3ed){
if(!_3eb[_3ed]){
_3eb[_3ed]=true;
_3eb.push(_3ed);
}
};
this.getWidgetPackageList=function(){
return dojo.lang.map(_3eb,function(elt){
return (elt!==true?elt:undefined);
});
};
this.getImplementation=function(_3ef,_3f0,_3f1){
var impl=this.getImplementationName(_3ef);
if(impl){
var ret=new impl(_3f0);
return ret;
}
};
this.getImplementationName=function(_3f4){
var _3f5=_3f4.toLowerCase();
var impl=_3ea[_3f5];
if(impl){
return impl;
}
if(!_3d6.length){
for(var _3f7 in dojo.render){
if(dojo.render[_3f7]["capable"]===true){
var _3f8=dojo.render[_3f7].prefixes;
for(var i=0;i<_3f8.length;i++){
_3d6.push(_3f8[i].toLowerCase());
}
}
}
_3d6.push("");
}
for(var i=0;i<_3eb.length;i++){
var _3fa=dojo.evalObjPath(_3eb[i]);
if(!_3fa){
continue;
}
for(var j=0;j<_3d6.length;j++){
if(!_3fa[_3d6[j]]){
continue;
}
for(var _3fc in _3fa[_3d6[j]]){
if(_3fc.toLowerCase()!=_3f5){
continue;
}
_3ea[_3f5]=_3fa[_3d6[j]][_3fc];
return _3ea[_3f5];
}
}
for(var j=0;j<_3d6.length;j++){
for(var _3fc in _3fa){
if(_3fc.toLowerCase()!=(_3d6[j]+_3f5)){
continue;
}
_3ea[_3f5]=_3fa[_3fc];
return _3ea[_3f5];
}
}
}
throw new Error("Could not locate \""+_3f4+"\" class");
};
this.resizing=false;
this.onResized=function(){
if(this.resizing){
return;
}
try{
this.resizing=true;
for(var id in this.topWidgets){
var _3fe=this.topWidgets[id];
if(_3fe.onResized){
_3fe.onResized();
}
}
}
catch(e){
}
finally{
this.resizing=false;
}
};
if(typeof window!="undefined"){
dojo.addOnLoad(this,"onResized");
dojo.event.connect(window,"onresize",this,"onResized");
}
};
(function(){
var dw=dojo.widget;
var dwm=dw.manager;
var h=dojo.lang.curry(dojo.lang,"hitch",dwm);
var g=function(_403,_404){
dw[(_404||_403)]=h(_403);
};
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 _406=dwm.getAllWidgets.apply(dwm,arguments);
if(arguments.length>0){
return _406[n];
}
return _406;
};
g("registerWidgetPackage");
g("getImplementation","getWidgetImplementation");
g("getImplementationName","getWidgetImplementationName");
dw.widgets=dwm.widgets;
dw.widgetIds=dwm.widgetIds;
dw.root=dwm.root;
})();
dojo.provide("dojo.widget.Widget");
dojo.provide("dojo.widget.tags");
dojo.require("dojo.lang.func");
dojo.require("dojo.lang.array");
dojo.require("dojo.widget.Manager");
dojo.require("dojo.event.*");
dojo.widget.Widget=function(){
this.children=[];
this.extraArgs={};
};
dojo.lang.extend(dojo.widget.Widget,{parent:null,isTopLevel:false,isModal:false,isEnabled:true,isHidden:false,isContainer:false,widgetId:"",widgetType:"Widget",toString:function(){
return "[Widget "+this.widgetType+", "+(this.widgetId||"NO ID")+"]";
},repr:function(){
return this.toString();
},enable:function(){
this.isEnabled=true;
},disable:function(){
this.isEnabled=false;
},hide:function(){
this.isHidden=true;
},show:function(){
this.isHidden=false;
},onResized:function(){
this.notifyChildrenOfResize();
},notifyChildrenOfResize:function(){
for(var i=0;i<this.children.length;i++){
var _408=this.children[i];
if(_408.onResized){
_408.onResized();
}
}
},create:function(args,_40a,_40b){
this.satisfyPropertySets(args,_40a,_40b);
this.mixInProperties(args,_40a,_40b);
this.postMixInProperties(args,_40a,_40b);
dojo.widget.manager.add(this);
this.buildRendering(args,_40a,_40b);
this.initialize(args,_40a,_40b);
this.postInitialize(args,_40a,_40b);
this.postCreate(args,_40a,_40b);
return this;
},destroy:function(_40c){
this.destroyChildren();
this.uninitialize();
this.destroyRendering(_40c);
dojo.widget.manager.removeById(this.widgetId);
},destroyChildren:function(){
while(this.children.length>0){
var tc=this.children[0];
this.removeChild(tc);
tc.destroy();
}
},getChildrenOfType:function(type,_40f){
var ret=[];
var _411=dojo.lang.isFunction(type);
if(!_411){
type=type.toLowerCase();
}
for(var x=0;x<this.children.length;x++){
if(_411){
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(_40f){
ret=ret.concat(this.children[x].getChildrenOfType(type,_40f));
}
}
return ret;
},getDescendants:function(){
var _413=[];
var _414=[this];
var elem;
while(elem=_414.pop()){
_413.push(elem);
dojo.lang.forEach(elem.children,function(elem){
_414.push(elem);
});
}
return _413;
},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 _41b;
var _41c=dojo.widget.lcArgsCache[this.widgetType];
if(_41c==null){
_41c={};
for(var y in this){
_41c[((new String(y)).toLowerCase())]=y;
}
dojo.widget.lcArgsCache[this.widgetType]=_41c;
}
var _41e={};
for(var x in args){
if(!this[x]){
var y=_41c[(new String(x)).toLowerCase()];
if(y){
args[y]=args[x];
x=y;
}
}
if(_41e[x]){
continue;
}
_41e[x]=true;
if((typeof this[x])!=(typeof _41b)){
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])){
var tn=dojo.lang.nameAnonFunc(new Function(args[x]),this);
dojo.event.connect(this,x,this,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"){
var _420=args[x].split(";");
for(var y=0;y<_420.length;y++){
var si=_420[y].indexOf(":");
if((si!=-1)&&(_420[y].length>si)){
this[x][_420[y].substr(0,si).replace(/^\s+|\s+$/g,"")]=_420[y].substr(si+1);
}
}
}else{
this[x]=args[x];
}
}
}
}
}
}
}
}
}else{
this.extraArgs[x.toLowerCase()]=args[x];
}
}
},postMixInProperties:function(){
},initialize:function(args,frag){
return false;
},postInitialize:function(args,frag){
return false;
},postCreate:function(args,frag){
return false;
},uninitialize:function(){
return false;
},buildRendering:function(){
dj_unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", ");
return false;
},destroyRendering:function(){
dj_unimplemented("dojo.widget.Widget.destroyRendering");
return false;
},cleanUp:function(){
dj_unimplemented("dojo.widget.Widget.cleanUp");
return false;
},addedTo:function(_428){
},addChild:function(_429){
dj_unimplemented("dojo.widget.Widget.addChild");
return false;
},removeChild:function(_42a){
for(var x=0;x<this.children.length;x++){
if(this.children[x]===_42a){
this.children.splice(x,1);
break;
}
}
return _42a;
},resize:function(_42c,_42d){
this.setWidth(_42c);
this.setHeight(_42d);
},setWidth:function(_42e){
if((typeof _42e=="string")&&(_42e.substr(-1)=="%")){
this.setPercentageWidth(_42e);
}else{
this.setNativeWidth(_42e);
}
},setHeight:function(_42f){
if((typeof _42f=="string")&&(_42f.substr(-1)=="%")){
this.setPercentageHeight(_42f);
}else{
this.setNativeHeight(_42f);
}
},setPercentageHeight:function(_430){
return false;
},setNativeHeight:function(_431){
return false;
},setPercentageWidth:function(_432){
return false;
},setNativeWidth:function(_433){
return false;
},getPreviousSibling:function(){
var idx=this.getParentIndex();
if(idx<=0){
return null;
}
return this.getSiblings()[idx-1];
},getSiblings:function(){
return this.parent.children;
},getParentIndex:function(){
return dojo.lang.indexOf(this.getSiblings(),this,true);
},getNextSibling:function(){
var idx=this.getParentIndex();
if(idx==this.getSiblings().length-1){
return null;
}
if(idx<0){
return null;
}
return this.getSiblings()[idx+1];
}});
dojo.widget.lcArgsCache={};
dojo.widget.tags={};
dojo.widget.tags.addParseTreeHandler=function(type){
var _437=type.toLowerCase();
this[_437]=function(_438,_439,_43a,_43b,_43c){
return dojo.widget.buildWidgetFromParseTree(_437,_438,_439,_43a,_43b,_43c);
};
};
dojo.widget.tags.addParseTreeHandler("dojo:widget");
dojo.widget.tags["dojo:propertyset"]=function(_43d,_43e,_43f){
var _440=_43e.parseProperties(_43d["dojo:propertyset"]);
};
dojo.widget.tags["dojo:connect"]=function(_441,_442,_443){
var _444=_442.parseProperties(_441["dojo:connect"]);
};
dojo.widget.buildWidgetFromParseTree=function(type,frag,_447,_448,_449,_44a){
var _44b=type.split(":");
_44b=(_44b.length==2)?_44b[1]:type;
var _44c=_44a||_447.parseProperties(frag["dojo:"+_44b]);
var _44d=dojo.widget.manager.getImplementation(_44b);
if(!_44d){
throw new Error("cannot find \""+_44b+"\" widget");
}else{
if(!_44d.create){
throw new Error("\""+_44b+"\" widget object does not appear to implement *Widget");
}
}
_44c["dojoinsertionindex"]=_449;
var ret=_44d.create(_44c,frag,_448);
return ret;
};
dojo.widget.defineWidget=function(_44f,_450,_451,_452,ctor){
if((!ctor)&&(_451["classConstructor"])){
ctor=_451.classConstructor;
}
if(!ctor){
ctor=function(){
};
}
var _454;
var _455;
var type;
if(_452){
var _457=_44f.split("."+_452+".");
_455=_457[0];
_454=dojo.evalObjPath(_455+"."+_452,true);
type=_457[1];
}else{
var _457=_44f.split(".");
type=_457.pop();
_455=_457.join(".");
_454=dojo.evalObjPath(_455,true);
}
if(!_451){
_451={};
}
_451.widgetType=type;
dojo.widget.tags.addParseTreeHandler("dojo:"+type.toLowerCase());
_454[type]=function(){
try{
_450.call(this);
}
catch(e){
dojo.debug("superclass construction failed: ",e);
}
try{
ctor.call(this);
}
catch(e){
dojo.debug("constructor failed: ",e);
}
};
dojo.inherits(_454[type],_450);
dojo.lang.extend(_454[type],_451);
};
dojo.provide("dojo.widget.Parse");
dojo.require("dojo.widget.Manager");
dojo.require("dojo.dom");
dojo.widget.Parse=function(_458){
this.propertySetsList=[];
this.fragment=_458;
this.createComponents=function(_459,_45a){
var _45b=dojo.widget.tags;
var _45c=[];
for(var item in _459){
var _45e=false;
try{
if(_459[item]&&(_459[item]["tagName"])&&(_459[item]!=_459["nodeRef"])){
var tn=new String(_459[item]["tagName"]);
var tna=tn.split(";");
for(var x=0;x<tna.length;x++){
var ltn=(tna[x].replace(/^\s+|\s+$/g,"")).toLowerCase();
if(_45b[ltn]){
_45e=true;
_459[item].tagName=ltn;
var ret=_45b[ltn](_459[item],this,_45a,_459[item]["index"]);
_45c.push(ret);
}else{
if((dojo.lang.isString(ltn))&&(ltn.substr(0,5)=="dojo:")){
dojo.debug("no tag handler registed for type: ",ltn);
}
}
}
}
}
catch(e){
dojo.debug("fragment creation error:",e);
}
if((!_45e)&&(typeof _459[item]=="object")&&(_459[item]!=_459.nodeRef)&&(_459[item]!=_459["tagName"])){
_45c.push(this.createComponents(_459[item],_45a));
}
}
return _45c;
};
this.parsePropertySets=function(_464){
return [];
var _465=[];
for(var item in _464){
if((_464[item]["tagName"]=="dojo:propertyset")){
_465.push(_464[item]);
}
}
this.propertySetsList.push(_465);
return _465;
};
this.parseProperties=function(_467){
var _468={};
for(var item in _467){
if((_467[item]==_467["tagName"])||(_467[item]==_467.nodeRef)){
}else{
if((_467[item]["tagName"])&&(dojo.widget.tags[_467[item].tagName.toLowerCase()])){
}else{
if((_467[item][0])&&(_467[item][0].value!="")&&(_467[item][0].value!=null)){
try{
if(item.toLowerCase()=="dataprovider"){
var _46a=this;
this.getDataProvider(_46a,_467[item][0].value);
_468.dataProvider=this.dataProvider;
}
_468[item]=_467[item][0].value;
var _46b=this.parseProperties(_467[item]);
for(var _46c in _46b){
_468[_46c]=_46b[_46c];
}
}
catch(e){
dojo.debug(e);
}
}
}
}
}
return _468;
};
this.getDataProvider=function(_46d,_46e){
dojo.io.bind({url:_46e,load:function(type,_470){
if(type=="load"){
_46d.dataProvider=_470;
}
},mimetype:"text/javascript",sync:true});
};
this.getPropertySetById=function(_471){
for(var x=0;x<this.propertySetsList.length;x++){
if(_471==this.propertySetsList[x]["id"][0].value){
return this.propertySetsList[x];
}
}
return "";
};
this.getPropertySetsByType=function(_473){
var _474=[];
for(var x=0;x<this.propertySetsList.length;x++){
var cpl=this.propertySetsList[x];
var cpcc=cpl["componentClass"]||cpl["componentType"]||null;
if((cpcc)&&(propertySetId==cpcc[0].value)){
_474.push(cpl);
}
}
return _474;
};
this.getPropertySets=function(_478){
var ppl="dojo:propertyproviderlist";
var _47a=[];
var _47b=_478["tagName"];
if(_478[ppl]){
var _47c=_478[ppl].value.split(" ");
for(propertySetId in _47c){
if((propertySetId.indexOf("..")==-1)&&(propertySetId.indexOf("://")==-1)){
var _47d=this.getPropertySetById(propertySetId);
if(_47d!=""){
_47a.push(_47d);
}
}else{
}
}
}
return (this.getPropertySetsByType(_47b)).concat(_47a);
};
this.createComponentFromScript=function(_47e,_47f,_480){
var ltn="dojo:"+_47f.toLowerCase();
if(dojo.widget.tags[ltn]){
_480.fastMixIn=true;
return [dojo.widget.tags[ltn](_480,this,null,null,_480)];
}else{
if(ltn.substr(0,5)=="dojo:"){
dojo.debug("no tag handler registed for type: ",ltn);
}
}
};
};
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,_484,_485,_486){
function fromScript(_487,name,_489){
var _48a=name.toLowerCase();
var _48b="dojo:"+_48a;
_489[_48b]={dojotype:[{value:_48a}],nodeRef:_487,fastMixIn:true};
return dojo.widget.getParser().createComponentFromScript(_487,name,_489,true);
}
if(typeof name!="string"&&typeof _484=="string"){
dojo.deprecated("dojo.widget.createWidget","argument order is now of the form "+"dojo.widget.createWidget(NAME, [PROPERTIES, [REFERENCENODE, [POSITION]]])");
return fromScript(name,_484,_485);
}
_484=_484||{};
var _48c=false;
var tn=null;
var h=dojo.render.html.capable;
if(h){
tn=document.createElement("span");
}
if(!_485){
_48c=true;
_485=tn;
if(h){
document.body.appendChild(_485);
}
}else{
if(_486){
dojo.dom.insertAtPosition(tn,_485,_486);
}else{
tn=_485;
}
}
var _48f=fromScript(tn,name,_484);
if(!_48f[0]||typeof _48f[0].widgetType=="undefined"){
throw new Error("createWidget: Creation of \""+name+"\" widget failed.");
}
if(_48c){
if(_48f[0].domNode.parentNode){
_48f[0].domNode.parentNode.removeChild(_48f[0].domNode);
}
}
return _48f[0];
};
dojo.widget.fromScript=function(name,_491,_492,_493){
dojo.deprecated("dojo.widget.fromScript"," use "+"dojo.widget.createWidget instead");
return dojo.widget.createWidget(name,_491,_492,_493);
};
dojo.hostenv.conditionalLoadModule({common:["dojo.uri.Uri",false,false]});
dojo.hostenv.moduleLoaded("dojo.uri.*");
dojo.provide("dojo.widget.DomWidget");
dojo.require("dojo.event.*");
dojo.require("dojo.widget.Widget");
dojo.require("dojo.dom");
dojo.require("dojo.xml.Parse");
dojo.require("dojo.uri.*");
dojo.require("dojo.lang.func");
dojo.widget._cssFiles={};
dojo.widget._templateCache={};
dojo.widget.defaultStrings={dojoRoot:dojo.hostenv.getBaseScriptUri(),baseScriptUri:dojo.hostenv.getBaseScriptUri()};
dojo.widget.buildFromTemplate=function(){
dojo.lang.forward("fillFromTemplateCache");
};
dojo.widget.fillFromTemplateCache=function(obj,_495,_496,_497,_498){
var _499=_495||obj.templatePath;
var _49a=_496||obj.templateCssPath;
if(_499&&!(_499 instanceof dojo.uri.Uri)){
_499=dojo.uri.dojoUri(_499);
dojo.deprecated("templatePath should be of type dojo.uri.Uri");
}
if(_49a&&!(_49a instanceof dojo.uri.Uri)){
_49a=dojo.uri.dojoUri(_49a);
dojo.deprecated("templateCssPath should be of type dojo.uri.Uri");
}
var _49b=dojo.widget._templateCache;
if(!obj["widgetType"]){
do{
var _49c="__dummyTemplate__"+dojo.widget._templateCache.dummyCount++;
}while(_49b[_49c]);
obj.widgetType=_49c;
}
var wt=obj.widgetType;
if((_49a)&&(!dojo.widget._cssFiles[_49a])){
dojo.style.insertCssFile(_49a);
obj.templateCssPath=null;
dojo.widget._cssFiles[_49a]=true;
}
var ts=_49b[wt];
if(!ts){
_49b[wt]={"string":null,"node":null};
if(_498){
ts={};
}else{
ts=_49b[wt];
}
}
if(!obj.templateString){
obj.templateString=_497||ts["string"];
}
if(!obj.templateNode){
obj.templateNode=ts["node"];
}
if((!obj.templateNode)&&(!obj.templateString)&&(_499)){
var _49f=dojo.hostenv.getText(_499);
if(_49f){
var _4a0=_49f.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_4a0){
_49f=_4a0[1];
}
}else{
_49f="";
}
obj.templateString=_49f;
if(!_498){
_49b[wt]["string"]=_49f;
}
}
if((!ts["string"])&&(!_498)){
ts.string=obj.templateString;
}
};
dojo.widget._templateCache.dummyCount=0;
dojo.widget.attachProperties=["dojoAttachPoint","id"];
dojo.widget.eventAttachProperty="dojoAttachEvent";
dojo.widget.onBuildProperty="dojoOnBuild";
dojo.widget.attachTemplateNodes=function(_4a1,_4a2,_4a3){
var _4a4=dojo.dom.ELEMENT_NODE;
function trim(str){
return str.replace(/^\s+|\s+$/g,"");
}
if(!_4a1){
_4a1=_4a2.domNode;
}
if(_4a1.nodeType!=_4a4){
return;
}
var _4a6=_4a1.all||_4a1.getElementsByTagName("*");
var _4a7=_4a2;
for(var x=-1;x<_4a6.length;x++){
var _4a9=(x==-1)?_4a1:_4a6[x];
var _4aa=[];
for(var y=0;y<this.attachProperties.length;y++){
var _4ac=_4a9.getAttribute(this.attachProperties[y]);
if(_4ac){
_4aa=_4ac.split(";");
for(var z=0;z<_4aa.length;z++){
if(dojo.lang.isArray(_4a2[_4aa[z]])){
_4a2[_4aa[z]].push(_4a9);
}else{
_4a2[_4aa[z]]=_4a9;
}
}
break;
}
}
var _4ae=_4a9.getAttribute(this.templateProperty);
if(_4ae){
_4a2[_4ae]=_4a9;
}
var _4af=_4a9.getAttribute(this.eventAttachProperty);
if(_4af){
var evts=_4af.split(";");
for(var y=0;y<evts.length;y++){
if((!evts[y])||(!evts[y].length)){
continue;
}
var _4b1=null;
var tevt=trim(evts[y]);
if(evts[y].indexOf(":")>=0){
var _4b3=tevt.split(":");
tevt=trim(_4b3[0]);
_4b1=trim(_4b3[1]);
}
if(!_4b1){
_4b1=tevt;
}
dojo.event.browser.addListener(_4a9,tevt,dojo.lang.hitch(_4a7,_4b1));
}
}
for(var y=0;y<_4a3.length;y++){
var _4b4=_4a9.getAttribute(_4a3[y]);
if((_4b4)&&(_4b4.length)){
var _4b1=null;
var _4b5=_4a3[y].substr(4);
_4b1=trim(_4b4);
var _4b6=[_4b1];
if(_4b1.indexOf(";")>=0){
_4b6=dojo.lang.map(_4b1.split(";"),trim);
}
for(var z=0;z<_4b6.length;z++){
if(!_4b6[z].length){
continue;
}
dojo.event.browser.addListener(_4a9,_4b5,dojo.lang.hitch(_4a7,_4b6[z]));
}
}
}
var _4b7=_4a9.getAttribute(this.onBuildProperty);
if(_4b7){
eval("var node = baseNode; var widget = targetObj; "+_4b7);
}
}
};
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].legth<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.widget.buildAndAttachTemplate=function(obj,_4c0,_4c1,_4c2,_4c3){
this.buildFromTemplate(obj,_4c0,_4c1,_4c2);
var node=dojo.dom.createNodesFromText(obj.templateString,true)[0];
this.attachTemplateNodes(node,_4c3||obj,dojo.widget.getDojoEventsFromStr(_4c2));
return node;
};
dojo.widget.DomWidget=function(){
dojo.widget.Widget.call(this);
if((arguments.length>0)&&(typeof arguments[0]=="object")){
this.create(arguments[0]);
}
};
dojo.inherits(dojo.widget.DomWidget,dojo.widget.Widget);
dojo.lang.extend(dojo.widget.DomWidget,{templateNode:null,templateString:null,preventClobber:false,domNode:null,containerNode:null,addChild:function(_4c5,_4c6,pos,ref,_4c9){
if(!this.isContainer){
dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget");
return null;
}else{
this.addWidgetAsDirectChild(_4c5,_4c6,pos,ref,_4c9);
this.registerChild(_4c5,_4c9);
}
return _4c5;
},addWidgetAsDirectChild:function(_4ca,_4cb,pos,ref,_4ce){
if((!this.containerNode)&&(!_4cb)){
this.containerNode=this.domNode;
}
var cn=(_4cb)?_4cb:this.containerNode;
if(!pos){
pos="after";
}
if(!ref){
ref=cn.lastChild;
}
if(!_4ce){
_4ce=0;
}
_4ca.domNode.setAttribute("dojoinsertionindex",_4ce);
if(!ref){
cn.appendChild(_4ca.domNode);
}else{
if(pos=="insertAtIndex"){
dojo.dom.insertAtIndex(_4ca.domNode,ref.parentNode,_4ce);
}else{
if((pos=="after")&&(ref===cn.lastChild)){
cn.appendChild(_4ca.domNode);
}else{
dojo.dom.insertAtPosition(_4ca.domNode,cn,pos);
}
}
}
},registerChild:function(_4d0,_4d1){
_4d0.dojoInsertionIndex=_4d1;
var idx=-1;
for(var i=0;i<this.children.length;i++){
if(this.children[i].dojoInsertionIndex<_4d1){
idx=i;
}
}
this.children.splice(idx+1,0,_4d0);
_4d0.parent=this;
_4d0.addedTo(this);
delete dojo.widget.manager.topWidgets[_4d0.widgetId];
},removeChild:function(_4d4){
dojo.dom.removeNode(_4d4.domNode);
return dojo.widget.DomWidget.superclass.removeChild.call(this,_4d4);
},getFragNodeRef:function(frag){
if(!frag||!frag["dojo:"+this.widgetType.toLowerCase()]){
dojo.raise("Error: no frag for widget type "+this.widgetType+", id "+this.widgetId+" (maybe a widget has set it's type incorrectly)");
}
return (frag?frag["dojo:"+this.widgetType.toLowerCase()]["nodeRef"]:null);
},postInitialize:function(args,frag,_4d8){
var _4d9=this.getFragNodeRef(frag);
if(_4d8&&(_4d8.snarfChildDomOutput||!_4d9)){
_4d8.addWidgetAsDirectChild(this,"","insertAtIndex","",args["dojoinsertionindex"],_4d9);
}else{
if(_4d9){
if(this.domNode&&(this.domNode!==_4d9)){
var _4da=_4d9.parentNode.replaceChild(this.domNode,_4d9);
}
}
}
if(_4d8){
_4d8.registerChild(this,args.dojoinsertionindex);
}else{
dojo.widget.manager.topWidgets[this.widgetId]=this;
}
if(this.isContainer){
var _4db=dojo.widget.getParser();
_4db.createComponents(frag,this);
}
},buildRendering:function(args,frag){
var ts=dojo.widget._templateCache[this.widgetType];
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 _4e1=false;
if(args["templatecsspath"]){
args["templateCssPath"]=args["templatecsspath"];
}
if(args["templatepath"]){
_4e1=true;
args["templatePath"]=args["templatepath"];
}
dojo.widget.fillFromTemplateCache(this,args["templatePath"],args["templateCssPath"],null,_4e1);
var ts=dojo.widget._templateCache[this.widgetType];
if((ts)&&(!_4e1)){
if(!this.templateString.length){
this.templateString=ts["string"];
}
if(!this.templateNode){
this.templateNode=ts["node"];
}
}
var _4e3=false;
var node=null;
var tstr=this.templateString;
if((!this.templateNode)&&(this.templateString)){
_4e3=this.templateString.match(/\$\{([^\}]+)\}/g);
if(_4e3){
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<_4e3.length;i++){
var key=_4e3[i];
key=key.substring(2,key.length-1);
var kval=(key.substring(0,5)=="this.")?this[key.substring(5)]:hash[key];
var _4ea;
if((kval)||(dojo.lang.isString(kval))){
_4ea=(dojo.lang.isFunction(kval))?kval.call(this,key,this.templateString):kval;
tstr=tstr.replace(_4e3[i],_4ea);
}
}
}else{
this.templateNode=this.createNodesFromText(this.templateString,true)[0];
ts.node=this.templateNode;
}
}
if((!this.templateNode)&&(!_4e3)){
dojo.debug("weren't able to create template!");
return false;
}else{
if(!_4e3){
node=this.templateNode.cloneNode(true);
if(!node){
return false;
}
}else{
node=this.createNodesFromText(tstr,true)[0];
}
}
this.domNode=node;
this.attachTemplateNodes(this.domNode,this);
if(this.isContainer&&this.containerNode){
var src=this.getFragNodeRef(frag);
if(src){
dojo.dom.moveChildren(src,this.containerNode);
}
}
},attachTemplateNodes:function(_4ec,_4ed){
if(!_4ed){
_4ed=this;
}
return dojo.widget.attachTemplateNodes(_4ec,_4ed,dojo.widget.getDojoEventsFromStr(this.templateString));
},fillInTemplate:function(){
},destroyRendering:function(){
try{
delete this.domNode;
}
catch(e){
}
},cleanUp:function(){
},getContainerHeight:function(){
dj_unimplemented("dojo.widget.DomWidget.getContainerHeight");
},getContainerWidth:function(){
dj_unimplemented("dojo.widget.DomWidget.getContainerWidth");
},createNodesFromText:function(){
dj_unimplemented("dojo.widget.DomWidget.createNodesFromText");
}});
dojo.provide("dojo.widget.HtmlWidget");
dojo.require("dojo.widget.DomWidget");
dojo.require("dojo.html");
dojo.require("dojo.lang.extras");
dojo.require("dojo.lang.func");
dojo.widget.HtmlWidget=function(args){
dojo.widget.DomWidget.call(this);
};
dojo.inherits(dojo.widget.HtmlWidget,dojo.widget.DomWidget);
dojo.lang.extend(dojo.widget.HtmlWidget,{widgetType:"HtmlWidget",templateCssPath:null,templatePath:null,toggle:"plain",toggleDuration:150,animationInProgress:false,bgIframe:null,initialize:function(args,frag){
},toggleObj:{show:function(node,_4f2,_4f3,_4f4){
dojo.style.show(node);
if(dojo.lang.isFunction(_4f4)){
_4f4();
}
},hide:function(node,_4f6,_4f7,_4f8){
dojo.style.hide(node);
if(dojo.lang.isFunction(_4f8)){
_4f8();
}
}},postMixInProperties:function(args,frag){
var _4fb=(dojo.fx&&dojo.fx.html&&dojo.fx.html.toggle[this.toggle.toLowerCase()]);
if(_4fb){
this.toggleObj=_4fb;
}
},getContainerHeight:function(){
dj_unimplemented("dojo.widget.HtmlWidget.getContainerHeight");
},getContainerWidth:function(){
return this.parent.domNode.offsetWidth;
},setNativeHeight:function(_4fc){
var ch=this.getContainerHeight();
},resizeSoon:function(){
if(this.isShowing()){
dojo.lang.setTimeout(this,this.onResized,0);
}
},resizeTo:function(w,h){
dojo.style.setOuterWidth(this.domNode,w);
dojo.style.setOuterHeight(this.domNode,h);
this.onResized();
},createNodesFromText:function(txt,wrap){
return dojo.html.createNodesFromText(txt,wrap);
},destroyRendering:function(_502){
try{
if(!_502){
dojo.event.browser.clean(this.domNode);
}
this.domNode.parentNode.removeChild(this.domNode);
delete this.domNode;
}
catch(e){
}
},isShowing:function(){
return dojo.style.isShowing(this.domNode);
},toggleShowing:function(){
dojo.style.toggleShowing(this.domNode);
},show:function(){
this.animationInProgress=true;
this.toggleObj.show(this.domNode,this.toggleDuration,this.explodeSrc,dojo.lang.hitch(this,this.onShow));
},onShow:function(){
this.animationInProgress=false;
},hide:function(){
this.animationInProgress=true;
this.toggleObj.hide(this.domNode,this.toggleDuration,this.explodeSrc,dojo.lang.hitch(this,this.onHide));
},onHide:function(){
this.animationInProgress=false;
},onResized:function(){
dojo.widget.HtmlWidget.superclass.onResized.call(this);
if(this.bgIframe){
this.bgIframe.onResized();
}
}});
dojo.hostenv.conditionalLoadModule({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"]});
dojo.hostenv.moduleLoaded("dojo.widget.*");
dojo.provide("dojo.io.IO");
dojo.require("dojo.string");
dojo.require("dojo.lang.extras");
dojo.io.transports=[];
dojo.io.hdlrFuncNames=["load","error","timeout"];
dojo.io.Request=function(url,_504,_505,_506){
if((arguments.length==1)&&(arguments[0].constructor==Object)){
this.fromKwArgs(arguments[0]);
}else{
this.url=url;
if(_504){
this.mimetype=_504;
}
if(_505){
this.transport=_505;
}
if(arguments.length>=4){
this.changeUrl=_506;
}
}
};
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,evt){
},error:function(type,_50b){
},timeout:function(type){
},handle:function(){
},timeoutSeconds:0,abort:function(){
},fromKwArgs:function(_50d){
if(_50d["url"]){
_50d.url=_50d.url.toString();
}
if(_50d["formNode"]){
_50d.formNode=dojo.byId(_50d.formNode);
}
if(!_50d["method"]&&_50d["formNode"]&&_50d["formNode"].method){
_50d.method=_50d["formNode"].method;
}
if(!_50d["handle"]&&_50d["handler"]){
_50d.handle=_50d.handler;
}
if(!_50d["load"]&&_50d["loaded"]){
_50d.load=_50d.loaded;
}
if(!_50d["changeUrl"]&&_50d["changeURL"]){
_50d.changeUrl=_50d.changeURL;
}
_50d.encoding=dojo.lang.firstValued(_50d["encoding"],djConfig["bindEncoding"],"");
_50d.sendTransport=dojo.lang.firstValued(_50d["sendTransport"],djConfig["ioSendTransport"],false);
var _50e=dojo.lang.isFunction;
for(var x=0;x<dojo.io.hdlrFuncNames.length;x++){
var fn=dojo.io.hdlrFuncNames[x];
if(_50e(_50d[fn])){
continue;
}
if(_50e(_50d["handle"])){
_50d[fn]=_50d.handle;
}
}
dojo.lang.mixin(this,_50d);
}});
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(_515){
if(!(_515 instanceof dojo.io.Request)){
try{
_515=new dojo.io.Request(_515);
}
catch(e){
dojo.debug(e);
}
}
var _516="";
if(_515["transport"]){
_516=_515["transport"];
if(!this[_516]){
return _515;
}
}else{
for(var x=0;x<dojo.io.transports.length;x++){
var tmp=dojo.io.transports[x];
if((this[tmp])&&(this[tmp].canHandle(_515))){
_516=tmp;
}
}
if(_516==""){
return _515;
}
}
this[_516].bind(_515);
_515.bindSuccess=true;
return _515;
};
dojo.io.queueBind=function(_519){
if(!(_519 instanceof dojo.io.Request)){
try{
_519=new dojo.io.Request(_519);
}
catch(e){
dojo.debug(e);
}
}
var _51a=_519.load;
_519.load=function(){
dojo.io._queueBindInFlight=false;
var ret=_51a.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
var _51c=_519.error;
_519.error=function(){
dojo.io._queueBindInFlight=false;
var ret=_51c.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
dojo.io._bindQueue.push(_519);
dojo.io._dispatchNextQueueBind();
return _519;
};
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,_51f){
var enc=/utf/i.test(_51f||"")?encodeURIComponent:dojo.string.encodeAscii;
var _521=[];
var _522=function(elt){
_521.push(enc(name)+"="+enc(elt));
};
var _524=new Object();
for(var name in map){
if(!_524[name]){
var _526=map[name];
if(dojo.lang.isArray(_526)){
dojo.lang.forEach(_526,_522);
}else{
_522(_526);
}
}
}
return _521.join("&");
};
dojo.io.setIFrameSrc=function(_527,src,_529){
try{
var r=dojo.render.html;
if(!_529){
if(r.safari){
_527.location=src;
}else{
frames[_527.name].location=src;
}
}else{
var idoc;
if(r.ie){
idoc=_527.contentWindow.document;
}else{
if(r.moz){
idoc=_527.contentWindow;
}else{
if(r.safari){
idoc=_527.document;
}
}
}
idoc.location.replace(src);
}
}
catch(e){
dojo.debug(e);
dojo.debug("setIFrameSrc: "+e);
}
};
dojo.provide("dojo.undo.browser");
dojo.require("dojo.io");
try{
if((!djConfig["preventBackButtonFix"])&&(!dojo.hostenv.post_load_)){
document.write("<iframe style='border: 0px; width: 1px; height: 1px; position: absolute; bottom: 0px; right: 0px; visibility: visible;' name='djhistory' id='djhistory' src='"+(dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"'></iframe>");
}
}
catch(e){
}
dojo.undo.browser={initialHref:window.location.href,initialHash:window.location.hash,moveForward:false,historyStack:[],forwardStack:[],historyIframe:null,bookmarkAnchor:null,locationTimer:null,setInitialState:function(args){
this.initialState={"url":this.initialHref,"kwArgs":args,"urlHash":this.initialHash};
},addToHistory:function(args){
var hash=null;
if(!this.historyIframe){
this.historyIframe=window.frames["djhistory"];
}
if(!this.bookmarkAnchor){
this.bookmarkAnchor=document.createElement("a");
(document.body||document.getElementsByTagName("body")[0]).appendChild(this.bookmarkAnchor);
this.bookmarkAnchor.style.display="none";
}
if((!args["changeUrl"])||(dojo.render.html.ie)){
var url=dojo.hostenv.getBaseScriptUri()+"iframe_history.html?"+(new Date()).getTime();
this.moveForward=true;
dojo.io.setIFrameSrc(this.historyIframe,url,false);
}
if(args["changeUrl"]){
this.changingUrl=true;
hash="#"+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());
setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;",1);
this.bookmarkAnchor.href=hash;
if(dojo.render.html.ie){
var _530=args["back"]||args["backButton"]||args["handle"];
var tcb=function(_532){
if(window.location.hash!=""){
setTimeout("window.location.href = '"+hash+"';",1);
}
_530.apply(this,[_532]);
};
if(args["back"]){
args.back=tcb;
}else{
if(args["backButton"]){
args.backButton=tcb;
}else{
if(args["handle"]){
args.handle=tcb;
}
}
}
this.forwardStack=[];
var _533=args["forward"]||args["forwardButton"]||args["handle"];
var tfw=function(_535){
if(window.location.hash!=""){
window.location.href=hash;
}
if(_533){
_533.apply(this,[_535]);
}
};
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);
}
}
}
}
this.historyStack.push({"url":url,"kwArgs":args,"urlHash":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,_538){
var _539=this._getUrlQuery(_538.href);
if(_539==null){
if(this.historyStack.length==1){
this.handleBackButton();
}
return;
}
if(this.moveForward){
this.moveForward=false;
return;
}
if(this.historyStack.length>=2&&_539==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){
this.handleBackButton();
}else{
if(this.forwardStack.length>0&&_539==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){
this.handleForwardButton();
}
}
},handleBackButton:function(){
var _53a=this.historyStack.pop();
if(!_53a){
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(_53a);
},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);
},_getUrlQuery:function(url){
var _53e=url.split("?");
if(_53e.length<2){
return null;
}else{
return _53e[1];
}
}};
dojo.provide("dojo.io.BrowserIO");
dojo.require("dojo.io");
dojo.require("dojo.lang.array");
dojo.require("dojo.lang.func");
dojo.require("dojo.string.extras");
dojo.require("dojo.dom");
dojo.require("dojo.undo.browser");
dojo.io.checkChildrenForFile=function(node){
var _540=false;
var _541=node.getElementsByTagName("input");
dojo.lang.forEach(_541,function(_542){
if(_540){
return;
}
if(_542.getAttribute("type")=="file"){
_540=true;
}
});
return _540;
};
dojo.io.formHasFile=function(_543){
return dojo.io.checkChildrenForFile(_543);
};
dojo.io.updateNode=function(node,_545){
node=dojo.byId(node);
var args=_545;
if(dojo.lang.isString(_545)){
args={url:_545};
}
args.mimetype="text/html";
args.load=function(t,d,e){
while(node.firstChild){
if(dojo["event"]){
try{
dojo.event.browser.clean(node.firstChild);
}
catch(e){
}
}
node.removeChild(node.firstChild);
}
node.innerHTML=d;
};
dojo.io.bind(args);
};
dojo.io.formFilter=function(node){
var type=(node.type||"").toLowerCase();
return !node.disabled&&node.name&&!dojo.lang.inArray(type,["file","submit","image","reset","button"]);
};
dojo.io.encodeForm=function(_54c,_54d,_54e){
if((!_54c)||(!_54c.tagName)||(!_54c.tagName.toLowerCase()=="form")){
dojo.raise("Attempted to encode a non-form element.");
}
if(!_54e){
_54e=dojo.io.formFilter;
}
var enc=/utf/i.test(_54d||"")?encodeURIComponent:dojo.string.encodeAscii;
var _550=[];
for(var i=0;i<_54c.elements.length;i++){
var elm=_54c.elements[i];
if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_54e(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){
_550.push(name+"="+enc(elm.options[j].value));
}
}
}else{
if(dojo.lang.inArray(type,["radio","checkbox"])){
if(elm.checked){
_550.push(name+"="+enc(elm.value));
}
}else{
_550.push(name+"="+enc(elm.value));
}
}
}
var _556=_54c.getElementsByTagName("input");
for(var i=0;i<_556.length;i++){
var _557=_556[i];
if(_557.type.toLowerCase()=="image"&&_557.form==_54c&&_54e(_557)){
var name=enc(_557.name);
_550.push(name+"="+enc(_557.value));
_550.push(name+".x=0");
_550.push(name+".y=0");
}
}
return _550.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(node.type.toLowerCase(),["submit","button"])){
this.connect(node,"onclick","click");
}
}
var _55d=form.getElementsByTagName("input");
for(var i=0;i<_55d.length;i++){
var _55e=_55d[i];
if(_55e.type.toLowerCase()=="image"&&_55e.form==form){
this.connect(_55e,"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 _565=false;
if(node.disabled||!node.name){
_565=false;
}else{
if(dojo.lang.inArray(type,["submit","button","image"])){
if(!this.clickedButton){
this.clickedButton=node;
}
_565=node==this.clickedButton;
}else{
_565=!dojo.lang.inArray(type,["file","submit","reset","button"]);
}
}
return _565;
},connect:function(_566,_567,_568){
if(dojo.evalObjPath("dojo.event.connect")){
dojo.event.connect(_566,_567,this,_568);
}else{
var fcn=dojo.lang.hitch(this,_568);
_566[_567]=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 _56b=this;
var _56c={};
this.useCache=false;
this.preventCache=false;
function getCacheKey(url,_56e,_56f){
return url+"|"+_56e+"|"+_56f.toLowerCase();
}
function addToCache(url,_571,_572,http){
_56c[getCacheKey(url,_571,_572)]=http;
}
function getFromCache(url,_575,_576){
return _56c[getCacheKey(url,_575,_576)];
}
this.clearCache=function(){
_56c={};
};
function doLoad(_577,http,url,_57a,_57b){
if((http.status==200)||(http.status==304)||(location.protocol=="file:"&&(http.status==0||http.status==undefined))||(location.protocol=="chrome:"&&(http.status==0||http.status==undefined))){
var ret;
if(_577.method.toLowerCase()=="head"){
var _57d=http.getAllResponseHeaders();
ret={};
ret.toString=function(){
return _57d;
};
var _57e=_57d.split(/[\r\n]+/g);
for(var i=0;i<_57e.length;i++){
var pair=_57e[i].match(/^([^:]+)\s*:\s*(.+)$/i);
if(pair){
ret[pair[1]]=pair[2];
}
}
}else{
if(_577.mimetype=="text/javascript"){
try{
ret=dj_eval(http.responseText);
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=null;
}
}else{
if(_577.mimetype=="text/json"){
try{
ret=dj_eval("("+http.responseText+")");
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=false;
}
}else{
if((_577.mimetype=="application/xml")||(_577.mimetype=="text/xml")){
ret=http.responseXML;
if(!ret||typeof ret=="string"){
ret=dojo.dom.createDocumentFromText(http.responseText);
}
}else{
ret=http.responseText;
}
}
}
}
if(_57b){
addToCache(url,_57a,_577.method,http);
}
_577[(typeof _577.load=="function")?"load":"handle"]("load",ret,http,_577);
}else{
var _581=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText);
_577[(typeof _577.error=="function")?"error":"handle"]("error",_581,http,_577);
}
}
function setHeaders(http,_583){
if(_583["headers"]){
for(var _584 in _583["headers"]){
if(_584.toLowerCase()=="content-type"&&!_583["contentType"]){
_583["contentType"]=_583["headers"][_584];
}else{
http.setRequestHeader(_584,_583["headers"][_584]);
}
}
}
}
this.inFlight=[];
this.inFlightTimer=null;
this.startWatchingInFlight=function(){
if(!this.inFlightTimer){
this.inFlightTimer=setInterval("dojo.io.XMLHTTPTransport.watchInFlight();",10);
}
};
this.watchInFlight=function(){
var now=null;
for(var x=this.inFlight.length-1;x>=0;x--){
var tif=this.inFlight[x];
if(!tif){
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);
}
}
}
}
if(this.inFlight.length==0){
clearInterval(this.inFlightTimer);
this.inFlightTimer=null;
}
};
var _588=dojo.hostenv.getXmlhttpObject()?true:false;
this.canHandle=function(_589){
return _588&&dojo.lang.inArray((_589["mimetype"].toLowerCase()||""),["text/plain","text/html","application/xml","text/xml","text/javascript","text/json"])&&dojo.lang.inArray(_589["method"].toLowerCase(),["post","get","head"])&&!(_589["formNode"]&&dojo.io.formHasFile(_589["formNode"]));
};
this.multipartBoundary="45309FFF-BD65-4d50-99C9-36986896A96F";
this.bind=function(_58a){
if(!_58a["url"]){
if(!_58a["formNode"]&&(_58a["backButton"]||_58a["back"]||_58a["changeUrl"]||_58a["watchForURL"])&&(!djConfig.preventBackButtonFix)){
dj_deprecated("Using dojo.io.XMLHTTPTransport.bind() to add to browser history without doing an IO request is deprecated. Use dojo.undo.browser.addToHistory() instead.");
dojo.undo.browser.addToHistory(_58a);
return true;
}
}
var url=_58a.url;
var _58c="";
if(_58a["formNode"]){
var ta=_58a.formNode.getAttribute("action");
if((ta)&&(!_58a["url"])){
url=ta;
}
var tp=_58a.formNode.getAttribute("method");
if((tp)&&(!_58a["method"])){
_58a.method=tp;
}
_58c+=dojo.io.encodeForm(_58a.formNode,_58a.encoding,_58a["formFilter"]);
}
if(url.indexOf("#")>-1){
dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url);
url=url.split("#")[0];
}
if(_58a["file"]){
_58a.method="post";
}
if(!_58a["method"]){
_58a.method="get";
}
if(_58a.method.toLowerCase()=="get"){
_58a.multipart=false;
}else{
if(_58a["file"]){
_58a.multipart=true;
}else{
if(!_58a["multipart"]){
_58a.multipart=false;
}
}
}
if(_58a["backButton"]||_58a["back"]||_58a["changeUrl"]){
dojo.undo.browser.addToHistory(_58a);
}
var _58f=_58a["content"]||{};
if(_58a.sendTransport){
_58f["dojo.transport"]="xmlhttp";
}
do{
if(_58a.postContent){
_58c=_58a.postContent;
break;
}
if(_58f){
_58c+=dojo.io.argsFromMap(_58f,_58a.encoding);
}
if(_58a.method.toLowerCase()=="get"||!_58a.multipart){
break;
}
var t=[];
if(_58c.length){
var q=_58c.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(_58a.file){
if(dojo.lang.isArray(_58a.file)){
for(var i=0;i<_58a.file.length;++i){
var o=_58a.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=_58a.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+"--","");
_58c=t.join("\r\n");
}
}while(false);
var _595=_58a["sync"]?false:true;
var _596=_58a["preventCache"]||(this.preventCache==true&&_58a["preventCache"]!=false);
var _597=_58a["useCache"]==true||(this.useCache==true&&_58a["useCache"]!=false);
if(!_596&&_597){
var _598=getFromCache(url,_58c,_58a.method);
if(_598){
doLoad(_58a,_598,url,_58c,false);
return;
}
}
var http=dojo.hostenv.getXmlhttpObject(_58a);
var _59a=false;
if(_595){
var _59b=this.inFlight.push({"req":_58a,"http":http,"url":url,"query":_58c,"useCache":_597,"startTime":_58a.timeoutSeconds?(new Date()).getTime():0});
this.startWatchingInFlight();
}
if(_58a.method.toLowerCase()=="post"){
http.open("POST",url,_595);
setHeaders(http,_58a);
http.setRequestHeader("Content-Type",_58a.multipart?("multipart/form-data; boundary="+this.multipartBoundary):(_58a.contentType||"application/x-www-form-urlencoded"));
try{
http.send(_58c);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_58a,{status:404},url,_58c,_597);
}
}else{
var _59c=url;
if(_58c!=""){
_59c+=(_59c.indexOf("?")>-1?"&":"?")+_58c;
}
if(_596){
_59c+=(dojo.string.endsWithAny(_59c,"?","&")?"":(_59c.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf();
}
http.open(_58a.method.toUpperCase(),_59c,_595);
setHeaders(http,_58a);
try{
http.send(null);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_58a,{status:404},url,_58c,_597);
}
}
if(!_595){
doLoad(_58a,http,url,_58c,_597);
}
_58a.abort=function(){
return http.abort();
};
return;
};
dojo.io.transports.addTransport("XMLHTTPTransport");
};
dojo.provide("dojo.io.cookie");
dojo.io.cookie.setCookie=function(name,_59e,days,path,_5a1,_5a2){
var _5a3=-1;
if(typeof days=="number"&&days>=0){
var d=new Date();
d.setTime(d.getTime()+(days*24*60*60*1000));
_5a3=d.toGMTString();
}
_59e=escape(_59e);
document.cookie=name+"="+_59e+";"+(_5a3!=-1?" expires="+_5a3+";":"")+(path?"path="+path:"")+(_5a1?"; domain="+_5a1:"")+(_5a2?"; 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;
}
value=document.cookie.substring(idx+name.length+1);
var end=value.indexOf(";");
if(end==-1){
end=value.length;
}
value=value.substring(0,end);
value=unescape(value);
return value;
};
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,_5ad,_5ae,_5af){
if(arguments.length==5){
_5af=_5ad;
_5ad=null;
_5ae=null;
}
var _5b0=[],cookie,value="";
if(!_5af){
cookie=dojo.io.cookie.getObjectCookie(name);
}
if(days>=0){
if(!cookie){
cookie={};
}
for(var prop in obj){
if(prop==null){
delete cookie[prop];
}else{
if(typeof obj[prop]=="string"||typeof obj[prop]=="number"){
cookie[prop]=obj[prop];
}
}
}
prop=null;
for(var prop in cookie){
_5b0.push(escape(prop)+"="+escape(cookie[prop]));
}
value=_5b0.join("&");
}
dojo.io.cookie.setCookie(name,value,days,path,_5ad,_5ae);
};
dojo.io.cookie.getObjectCookie=function(name){
var _5b3=null,cookie=dojo.io.cookie.getCookie(name);
if(cookie){
_5b3={};
var _5b4=cookie.split("&");
for(var i=0;i<_5b4.length;i++){
var pair=_5b4[i].split("=");
var _5b7=pair[1];
if(isNaN(_5b7)){
_5b7=unescape(pair[1]);
}
_5b3[unescape(pair[0])]=_5b7;
}
}
return _5b3;
};
dojo.io.cookie.isSupported=function(){
if(typeof navigator.cookieEnabled!="boolean"){
dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null);
var _5b8=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__");
navigator.cookieEnabled=(_5b8=="CookiesAllowed");
if(navigator.cookieEnabled){
this.deleteCookie("__TestingYourBrowserForCookieSupport__");
}
}
return navigator.cookieEnabled;
};
if(!dojo.io.cookies){
dojo.io.cookies=dojo.io.cookie;
}
dojo.hostenv.conditionalLoadModule({common:["dojo.io"],rhino:["dojo.io.RhinoIO"],browser:["dojo.io.BrowserIO","dojo.io.cookie"],dashboard:["dojo.io.BrowserIO","dojo.io.cookie"]});
dojo.hostenv.moduleLoaded("dojo.io.*");
dojo.provide("dojo.math.curves");
dojo.require("dojo.math");
dojo.math.curves={Line:function(_5b9,end){
this.start=_5b9;
this.end=end;
this.dimensions=_5b9.length;
for(var i=0;i<_5b9.length;i++){
_5b9[i]=Number(_5b9[i]);
}
for(var i=0;i<end.length;i++){
end[i]=Number(end[i]);
}
this.getValue=function(n){
var _5bd=new Array(this.dimensions);
for(var i=0;i<this.dimensions;i++){
_5bd[i]=((this.end[i]-this.start[i])*n)+this.start[i];
}
return _5bd;
};
return this;
},Bezier:function(pnts){
this.getValue=function(step){
if(step>=1){
return this.p[this.p.length-1];
}
if(step<=0){
return this.p[0];
}
var _5c1=new Array(this.p[0].length);
for(var k=0;j<this.p[0].length;k++){
_5c1[k]=0;
}
for(var j=0;j<this.p[0].length;j++){
var C=0;
var D=0;
for(var i=0;i<this.p.length;i++){
C+=this.p[i][j]*this.p[this.p.length-1][0]*dojo.math.bernstein(step,this.p.length,i);
}
for(var l=0;l<this.p.length;l++){
D+=this.p[this.p.length-1][0]*dojo.math.bernstein(step,this.p.length,l);
}
_5c1[j]=C/D;
}
return _5c1;
};
this.p=pnts;
return this;
},CatmullRom:function(pnts,c){
this.getValue=function(step){
var _5cb=step*(this.p.length-1);
var node=Math.floor(_5cb);
var _5cd=_5cb-node;
var i0=node-1;
if(i0<0){
i0=0;
}
var i=node;
var i1=node+1;
if(i1>=this.p.length){
i1=this.p.length-1;
}
var i2=node+2;
if(i2>=this.p.length){
i2=this.p.length-1;
}
var u=_5cd;
var u2=_5cd*_5cd;
var u3=_5cd*_5cd*_5cd;
var _5d5=new Array(this.p[0].length);
for(var k=0;k<this.p[0].length;k++){
var x1=(-this.c*this.p[i0][k])+((2-this.c)*this.p[i][k])+((this.c-2)*this.p[i1][k])+(this.c*this.p[i2][k]);
var x2=(2*this.c*this.p[i0][k])+((this.c-3)*this.p[i][k])+((3-2*this.c)*this.p[i1][k])+(-this.c*this.p[i2][k]);
var x3=(-this.c*this.p[i0][k])+(this.c*this.p[i1][k]);
var x4=this.p[i][k];
_5d5[k]=x1*u3+x2*u2+x3*u+x4;
}
return _5d5;
};
if(!c){
this.c=0.7;
}else{
this.c=c;
}
this.p=pnts;
return this;
},Arc:function(_5db,end,ccw){
var _5de=dojo.math.points.midpoint(_5db,end);
var _5df=dojo.math.points.translate(dojo.math.points.invert(_5de),_5db);
var rad=Math.sqrt(Math.pow(_5df[0],2)+Math.pow(_5df[1],2));
var _5e1=dojo.math.radToDeg(Math.atan(_5df[1]/_5df[0]));
if(_5df[0]<0){
_5e1-=90;
}else{
_5e1+=90;
}
dojo.math.curves.CenteredArc.call(this,_5de,rad,_5e1,_5e1+(ccw?-180:180));
},CenteredArc:function(_5e2,_5e3,_5e4,end){
this.center=_5e2;
this.radius=_5e3;
this.start=_5e4||0;
this.end=end;
this.getValue=function(n){
var _5e7=new Array(2);
var _5e8=dojo.math.degToRad(this.start+((this.end-this.start)*n));
_5e7[0]=this.center[0]+this.radius*Math.sin(_5e8);
_5e7[1]=this.center[1]-this.radius*Math.cos(_5e8);
return _5e7;
};
return this;
},Circle:function(_5e9,_5ea){
dojo.math.curves.CenteredArc.call(this,_5e9,_5ea,0,360);
return this;
},Path:function(){
var _5eb=[];
var _5ec=[];
var _5ed=[];
var _5ee=0;
this.add=function(_5ef,_5f0){
if(_5f0<0){
dojo.raise("dojo.math.curves.Path.add: weight cannot be less than 0");
}
_5eb.push(_5ef);
_5ec.push(_5f0);
_5ee+=_5f0;
computeRanges();
};
this.remove=function(_5f1){
for(var i=0;i<_5eb.length;i++){
if(_5eb[i]==_5f1){
_5eb.splice(i,1);
_5ee-=_5ec.splice(i,1)[0];
break;
}
}
computeRanges();
};
this.removeAll=function(){
_5eb=[];
_5ec=[];
_5ee=0;
};
this.getValue=function(n){
var _5f4=false,value=0;
for(var i=0;i<_5ed.length;i++){
var r=_5ed[i];
if(n>=r[0]&&n<r[1]){
var subN=(n-r[0])/r[2];
value=_5eb[i].getValue(subN);
_5f4=true;
break;
}
}
if(!_5f4){
value=_5eb[_5eb.length-1].getValue(1);
}
for(j=0;j<i;j++){
value=dojo.math.points.translate(value,_5eb[j].getValue(1));
}
return value;
};
function computeRanges(){
var _5f8=0;
for(var i=0;i<_5ec.length;i++){
var end=_5f8+_5ec[i]/_5ee;
var len=end-_5f8;
_5ed[i]=[_5f8,end,len];
_5f8=end;
}
}
return this;
}};
dojo.provide("dojo.animation.AnimationEvent");
dojo.require("dojo.lang");
dojo.animation.AnimationEvent=function(anim,type,_5fe,_5ff,_600,_601,dur,pct,fps){
this.type=type;
this.animation=anim;
this.coords=_5fe;
this.x=_5fe[0];
this.y=_5fe[1];
this.z=_5fe[2];
this.startTime=_5ff;
this.currentTime=_600;
this.endTime=_601;
this.duration=dur;
this.percent=pct;
this.fps=fps;
};
dojo.lang.extend(dojo.animation.AnimationEvent,{coordsAsInts:function(){
var _605=new Array(this.coords.length);
for(var i=0;i<this.coords.length;i++){
_605[i]=Math.round(this.coords[i]);
}
return _605;
}});
dojo.provide("dojo.animation.Animation");
dojo.require("dojo.animation.AnimationEvent");
dojo.require("dojo.lang.func");
dojo.require("dojo.math");
dojo.require("dojo.math.curves");
dojo.animation.Animation=function(_607,_608,_609,_60a,rate){
if(dojo.lang.isArray(_607)){
_607=new dojo.math.curves.Line(_607[0],_607[1]);
}
this.curve=_607;
this.duration=_608;
this.repeatCount=_60a||0;
this.rate=rate||25;
if(_609){
if(dojo.lang.isFunction(_609.getValue)){
this.accel=_609;
}else{
var i=0.35*_609+0.5;
this.accel=new dojo.math.curves.CatmullRom([[0],[i],[1]],0.45);
}
}
};
dojo.lang.extend(dojo.animation.Animation,{curve:null,duration:0,repeatCount:0,accel:null,onBegin:null,onAnimate:null,onEnd:null,onPlay:null,onPause:null,onStop:null,handler:null,_animSequence:null,_startTime:null,_endTime:null,_lastFrame:null,_timer:null,_percent:0,_active:false,_paused:false,_startRepeatCount:0,play:function(_60d){
if(_60d){
clearTimeout(this._timer);
this._active=false;
this._paused=false;
this._percent=0;
}else{
if(this._active&&!this._paused){
return;
}
}
this._startTime=new Date().valueOf();
if(this._paused){
this._startTime-=(this.duration*this._percent/100);
}
this._endTime=this._startTime+this.duration;
this._lastFrame=this._startTime;
var e=new dojo.animation.AnimationEvent(this,null,this.curve.getValue(this._percent),this._startTime,this._startTime,this._endTime,this.duration,this._percent,0);
this._active=true;
this._paused=false;
if(this._percent==0){
if(!this._startRepeatCount){
this._startRepeatCount=this.repeatCount;
}
e.type="begin";
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onBegin=="function"){
this.onBegin(e);
}
}
e.type="play";
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onPlay=="function"){
this.onPlay(e);
}
if(this._animSequence){
this._animSequence._setCurrent(this);
}
this._cycle();
},pause:function(){
clearTimeout(this._timer);
if(!this._active){
return;
}
this._paused=true;
var e=new dojo.animation.AnimationEvent(this,"pause",this.curve.getValue(this._percent),this._startTime,new Date().valueOf(),this._endTime,this.duration,this._percent,0);
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onPause=="function"){
this.onPause(e);
}
},playPause:function(){
if(!this._active||this._paused){
this.play();
}else{
this.pause();
}
},gotoPercent:function(pct,_611){
clearTimeout(this._timer);
this._active=true;
this._paused=true;
this._percent=pct;
if(_611){
this.play();
}
},stop:function(_612){
clearTimeout(this._timer);
var step=this._percent/100;
if(_612){
step=1;
}
var e=new dojo.animation.AnimationEvent(this,"stop",this.curve.getValue(step),this._startTime,new Date().valueOf(),this._endTime,this.duration,this._percent,Math.round(fps));
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onStop=="function"){
this.onStop(e);
}
this._active=false;
this._paused=false;
},status:function(){
if(this._active){
return this._paused?"paused":"playing";
}else{
return "stopped";
}
},_cycle:function(){
clearTimeout(this._timer);
if(this._active){
var curr=new Date().valueOf();
var step=(curr-this._startTime)/(this._endTime-this._startTime);
fps=1000/(curr-this._lastFrame);
this._lastFrame=curr;
if(step>=1){
step=1;
this._percent=100;
}else{
this._percent=step*100;
}
if(this.accel&&this.accel.getValue){
step=this.accel.getValue(step);
}
var e=new dojo.animation.AnimationEvent(this,"animate",this.curve.getValue(step),this._startTime,curr,this._endTime,this.duration,this._percent,Math.round(fps));
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onAnimate=="function"){
this.onAnimate(e);
}
if(step<1){
this._timer=setTimeout(dojo.lang.hitch(this,"_cycle"),this.rate);
}else{
e.type="end";
this._active=false;
if(typeof this.handler=="function"){
this.handler(e);
}
if(typeof this.onEnd=="function"){
this.onEnd(e);
}
if(this.repeatCount>0){
this.repeatCount--;
this.play(true);
}else{
if(this.repeatCount==-1){
this.play(true);
}else{
if(this._startRepeatCount){
this.repeatCount=this._startRepeatCount;
this._startRepeatCount=0;
}
if(this._animSequence){
this._animSequence._playNext();
}
}
}
}
}
}});
dojo.provide("dojo.animation");
dojo.require("dojo.animation.Animation");
dojo.provide("dojo.fx.html");
dojo.require("dojo.style");
dojo.require("dojo.math.curves");
dojo.require("dojo.lang.func");
dojo.require("dojo.animation");
dojo.require("dojo.event.*");
dojo.require("dojo.graphics.color");
dojo.fx.duration=300;
dojo.fx.html._makeFadeable=function(node){
if(dojo.render.html.ie){
if((node.style.zoom.length==0)&&(dojo.style.getStyle(node,"zoom")=="normal")){
node.style.zoom="1";
}
if((node.style.width.length==0)&&(dojo.style.getStyle(node,"width")=="auto")){
node.style.width="auto";
}
}
};
dojo.fx.html.fadeOut=function(node,_61a,_61b,_61c){
return dojo.fx.html.fade(node,_61a,dojo.style.getOpacity(node),0,_61b,_61c);
};
dojo.fx.html.fadeIn=function(node,_61e,_61f,_620){
return dojo.fx.html.fade(node,_61e,dojo.style.getOpacity(node),1,_61f,_620);
};
dojo.fx.html.fadeHide=function(node,_622,_623,_624){
node=dojo.byId(node);
if(!_622){
_622=150;
}
return dojo.fx.html.fadeOut(node,_622,function(node){
node.style.display="none";
if(typeof _623=="function"){
_623(node);
}
});
};
dojo.fx.html.fadeShow=function(node,_627,_628,_629){
node=dojo.byId(node);
if(!_627){
_627=150;
}
node.style.display="block";
return dojo.fx.html.fade(node,_627,0,1,_628,_629);
};
dojo.fx.html.fade=function(node,_62b,_62c,_62d,_62e,_62f){
node=dojo.byId(node);
dojo.fx.html._makeFadeable(node);
var anim=new dojo.animation.Animation(new dojo.math.curves.Line([_62c],[_62d]),_62b||dojo.fx.duration,0);
dojo.event.connect(anim,"onAnimate",function(e){
dojo.style.setOpacity(node,e.x);
});
if(_62e){
dojo.event.connect(anim,"onEnd",function(e){
_62e(node,anim);
});
}
if(!_62f){
anim.play(true);
}
return anim;
};
dojo.fx.html.slideTo=function(node,_634,_635,_636,_637){
if(!dojo.lang.isNumber(_634)){
var tmp=_634;
_634=_635;
_635=tmp;
}
node=dojo.byId(node);
var top=node.offsetTop;
var left=node.offsetLeft;
var pos=dojo.style.getComputedStyle(node,"position");
if(pos=="relative"||pos=="static"){
top=parseInt(dojo.style.getComputedStyle(node,"top"))||0;
left=parseInt(dojo.style.getComputedStyle(node,"left"))||0;
}
return dojo.fx.html.slide(node,_634,[left,top],_635,_636,_637);
};
dojo.fx.html.slideBy=function(node,_63d,_63e,_63f,_640){
if(!dojo.lang.isNumber(_63d)){
var tmp=_63d;
_63d=_63e;
_63e=tmp;
}
node=dojo.byId(node);
var top=node.offsetTop;
var left=node.offsetLeft;
var pos=dojo.style.getComputedStyle(node,"position");
if(pos=="relative"||pos=="static"){
top=parseInt(dojo.style.getComputedStyle(node,"top"))||0;
left=parseInt(dojo.style.getComputedStyle(node,"left"))||0;
}
return dojo.fx.html.slideTo(node,_63d,[left+_63e[0],top+_63e[1]],_63f,_640);
};
dojo.fx.html.slide=function(node,_646,_647,_648,_649,_64a){
if(!dojo.lang.isNumber(_646)){
var tmp=_646;
_646=_648;
_648=_647;
_647=tmp;
}
node=dojo.byId(node);
if(dojo.style.getComputedStyle(node,"position")=="static"){
node.style.position="relative";
}
var anim=new dojo.animation.Animation(new dojo.math.curves.Line(_647,_648),_646||dojo.fx.duration,0);
dojo.event.connect(anim,"onAnimate",function(e){
with(node.style){
left=e.x+"px";
top=e.y+"px";
}
});
if(_649){
dojo.event.connect(anim,"onEnd",function(e){
_649(node,anim);
});
}
if(!_64a){
anim.play(true);
}
return anim;
};
dojo.fx.html.colorFadeIn=function(node,_650,_651,_652,_653,_654){
if(!dojo.lang.isNumber(_650)){
var tmp=_650;
_650=_651;
_651=tmp;
}
node=dojo.byId(node);
var _656=dojo.style.getBackgroundColor(node);
var bg=dojo.style.getStyle(node,"background-color").toLowerCase();
var _658=bg=="transparent"||bg=="rgba(0, 0, 0, 0)";
while(_656.length>3){
_656.pop();
}
var rgb=new dojo.graphics.color.Color(_651).toRgb();
var anim=dojo.fx.html.colorFade(node,_650||dojo.fx.duration,_651,_656,_653,true);
dojo.event.connect(anim,"onEnd",function(e){
if(_658){
node.style.backgroundColor="transparent";
}
});
if(_652>0){
node.style.backgroundColor="rgb("+rgb.join(",")+")";
if(!_654){
setTimeout(function(){
anim.play(true);
},_652);
}
}else{
if(!_654){
anim.play(true);
}
}
return anim;
};
dojo.fx.html.highlight=dojo.fx.html.colorFadeIn;
dojo.fx.html.colorFadeFrom=dojo.fx.html.colorFadeIn;
dojo.fx.html.colorFadeOut=function(node,_65d,_65e,_65f,_660,_661){
if(!dojo.lang.isNumber(_65d)){
var tmp=_65d;
_65d=_65e;
_65e=tmp;
}
node=dojo.byId(node);
var _663=new dojo.graphics.color.Color(dojo.style.getBackgroundColor(node)).toRgb();
var rgb=new dojo.graphics.color.Color(_65e).toRgb();
var anim=dojo.fx.html.colorFade(node,_65d||dojo.fx.duration,_663,rgb,_660,_65f>0||_661);
if(_65f>0){
node.style.backgroundColor="rgb("+_663.join(",")+")";
if(!_661){
setTimeout(function(){
anim.play(true);
},_65f);
}
}
return anim;
};
dojo.fx.html.unhighlight=dojo.fx.html.colorFadeOut;
dojo.fx.html.colorFadeTo=dojo.fx.html.colorFadeOut;
dojo.fx.html.colorFade=function(node,_667,_668,_669,_66a,_66b){
if(!dojo.lang.isNumber(_667)){
var tmp=_667;
_667=_669;
_669=_668;
_668=tmp;
}
node=dojo.byId(node);
var _66d=new dojo.graphics.color.Color(_668).toRgb();
var _66e=new dojo.graphics.color.Color(_669).toRgb();
var anim=new dojo.animation.Animation(new dojo.math.curves.Line(_66d,_66e),_667||dojo.fx.duration,0);
dojo.event.connect(anim,"onAnimate",function(e){
node.style.backgroundColor="rgb("+e.coordsAsInts().join(",")+")";
});
if(_66a){
dojo.event.connect(anim,"onEnd",function(e){
_66a(node,anim);
});
}
if(!_66b){
anim.play(true);
}
return anim;
};
dojo.fx.html.wipeIn=function(node,_673,_674,_675){
node=dojo.byId(node);
var _676=dojo.style.getStyle(node,"overflow");
if(_676=="visible"){
node.style.overflow="hidden";
}
node.style.height=0;
dojo.style.show(node);
var anim=dojo.fx.html.wipe(node,_673,0,node.scrollHeight,null,true);
dojo.event.connect(anim,"onEnd",function(){
node.style.overflow=_676;
node.style.height="auto";
if(_674){
_674(node,anim);
}
});
if(!_675){
anim.play();
}
return anim;
};
dojo.fx.html.wipeOut=function(node,_679,_67a,_67b){
node=dojo.byId(node);
var _67c=dojo.style.getStyle(node,"overflow");
if(_67c=="visible"){
node.style.overflow="hidden";
}
var anim=dojo.fx.html.wipe(node,_679,node.offsetHeight,0,null,true);
dojo.event.connect(anim,"onEnd",function(){
dojo.style.hide(node);
node.style.overflow=_67c;
if(_67a){
_67a(node,anim);
}
});
if(!_67b){
anim.play();
}
return anim;
};
dojo.fx.html.wipe=function(node,_67f,_680,_681,_682,_683){
node=dojo.byId(node);
var anim=new dojo.animation.Animation([[_680],[_681]],_67f||dojo.fx.duration,0);
dojo.event.connect(anim,"onAnimate",function(e){
node.style.height=e.x+"px";
});
dojo.event.connect(anim,"onEnd",function(){
if(_682){
_682(node,anim);
}
});
if(!_683){
anim.play();
}
return anim;
};
dojo.fx.html.wiper=function(node,_687){
this.node=dojo.byId(node);
if(_687){
dojo.event.connect(dojo.byId(_687),"onclick",this,"toggle");
}
};
dojo.lang.extend(dojo.fx.html.wiper,{duration:dojo.fx.duration,_anim:null,toggle:function(){
if(!this._anim){
var type="wipe"+(dojo.style.isVisible(this.node)?"Hide":"Show");
this._anim=dojo.fx[type](this.node,this.duration,dojo.lang.hitch(this,"_callback"));
}
},_callback:function(){
this._anim=null;
}});
dojo.fx.html.explode=function(_689,_68a,_68b,_68c,_68d){
var _68e=dojo.style.toCoordinateArray(_689);
var _68f=document.createElement("div");
with(_68f.style){
position="absolute";
border="1px solid black";
display="none";
}
document.body.appendChild(_68f);
_68a=dojo.byId(_68a);
with(_68a.style){
visibility="hidden";
display="block";
}
var _690=dojo.style.toCoordinateArray(_68a);
with(_68a.style){
display="none";
visibility="visible";
}
var anim=new dojo.animation.Animation(new dojo.math.curves.Line(_68e,_690),_68b||dojo.fx.duration,0);
dojo.event.connect(anim,"onBegin",function(e){
_68f.style.display="block";
});
dojo.event.connect(anim,"onAnimate",function(e){
with(_68f.style){
left=e.x+"px";
top=e.y+"px";
width=e.coords[2]+"px";
height=e.coords[3]+"px";
}
});
dojo.event.connect(anim,"onEnd",function(){
_68a.style.display="block";
_68f.parentNode.removeChild(_68f);
if(_68c){
_68c(_68a,anim);
}
});
if(!_68d){
anim.play();
}
return anim;
};
dojo.fx.html.implode=function(_694,end,_696,_697,_698){
var _699=dojo.style.toCoordinateArray(_694);
var _69a=dojo.style.toCoordinateArray(end);
_694=dojo.byId(_694);
var _69b=document.createElement("div");
with(_69b.style){
position="absolute";
border="1px solid black";
display="none";
}
document.body.appendChild(_69b);
var anim=new dojo.animation.Animation(new dojo.math.curves.Line(_699,_69a),_696||dojo.fx.duration,0);
dojo.event.connect(anim,"onBegin",function(e){
_694.style.display="none";
_69b.style.display="block";
});
dojo.event.connect(anim,"onAnimate",function(e){
with(_69b.style){
left=e.x+"px";
top=e.y+"px";
width=e.coords[2]+"px";
height=e.coords[3]+"px";
}
});
dojo.event.connect(anim,"onEnd",function(){
_69b.parentNode.removeChild(_69b);
if(_697){
_697(_694,anim);
}
});
if(!_698){
anim.play();
}
return anim;
};
dojo.fx.html.Exploder=function(_69f,_6a0){
_69f=dojo.byId(_69f);
_6a0=dojo.byId(_6a0);
var _6a1=this;
this.waitToHide=500;
this.timeToShow=100;
this.waitToShow=200;
this.timeToHide=70;
this.autoShow=false;
this.autoHide=false;
var _6a2=null;
var _6a3=null;
var _6a4=null;
var _6a5=null;
var _6a6=null;
var _6a7=null;
this.showing=false;
this.onBeforeExplode=null;
this.onAfterExplode=null;
this.onBeforeImplode=null;
this.onAfterImplode=null;
this.onExploding=null;
this.onImploding=null;
this.timeShow=function(){
clearTimeout(_6a4);
_6a4=setTimeout(_6a1.show,_6a1.waitToShow);
};
this.show=function(){
clearTimeout(_6a4);
clearTimeout(_6a5);
if((_6a3&&_6a3.status()=="playing")||(_6a2&&_6a2.status()=="playing")||_6a1.showing){
return;
}
if(typeof _6a1.onBeforeExplode=="function"){
_6a1.onBeforeExplode(_69f,_6a0);
}
_6a2=dojo.fx.html.explode(_69f,_6a0,_6a1.timeToShow,function(e){
_6a1.showing=true;
if(typeof _6a1.onAfterExplode=="function"){
_6a1.onAfterExplode(_69f,_6a0);
}
});
if(typeof _6a1.onExploding=="function"){
dojo.event.connect(_6a2,"onAnimate",this,"onExploding");
}
};
this.timeHide=function(){
clearTimeout(_6a4);
clearTimeout(_6a5);
if(_6a1.showing){
_6a5=setTimeout(_6a1.hide,_6a1.waitToHide);
}
};
this.hide=function(){
clearTimeout(_6a4);
clearTimeout(_6a5);
if(_6a2&&_6a2.status()=="playing"){
return;
}
_6a1.showing=false;
if(typeof _6a1.onBeforeImplode=="function"){
_6a1.onBeforeImplode(_69f,_6a0);
}
_6a3=dojo.fx.html.implode(_6a0,_69f,_6a1.timeToHide,function(e){
if(typeof _6a1.onAfterImplode=="function"){
_6a1.onAfterImplode(_69f,_6a0);
}
});
if(typeof _6a1.onImploding=="function"){
dojo.event.connect(_6a3,"onAnimate",this,"onImploding");
}
};
dojo.event.connect(_69f,"onclick",function(e){
if(_6a1.showing){
_6a1.hide();
}else{
_6a1.show();
}
});
dojo.event.connect(_69f,"onmouseover",function(e){
if(_6a1.autoShow){
_6a1.timeShow();
}
});
dojo.event.connect(_69f,"onmouseout",function(e){
if(_6a1.autoHide){
_6a1.timeHide();
}
});
dojo.event.connect(_6a0,"onmouseover",function(e){
clearTimeout(_6a5);
});
dojo.event.connect(_6a0,"onmouseout",function(e){
if(_6a1.autoHide){
_6a1.timeHide();
}
});
dojo.event.connect(document.documentElement||document.body,"onclick",function(e){
function isDesc(node,_6b1){
while(node){
if(node==_6b1){
return true;
}
node=node.parentNode;
}
return false;
}
if(_6a1.autoHide&&_6a1.showing&&!isDesc(e.target,_6a0)&&!isDesc(e.target,_69f)){
_6a1.hide();
}
});
return this;
};
dojo.fx.html.toggle={};
dojo.fx.html.toggle.plain={show:function(node,_6b3,_6b4,_6b5){
dojo.style.show(node);
if(dojo.lang.isFunction(_6b5)){
_6b5();
}
},hide:function(node,_6b7,_6b8,_6b9){
dojo.style.hide(node);
if(dojo.lang.isFunction(_6b9)){
_6b9();
}
}};
dojo.fx.html.toggle.fade={show:function(node,_6bb,_6bc,_6bd){
dojo.fx.html.fadeShow(node,_6bb,_6bd);
},hide:function(node,_6bf,_6c0,_6c1){
dojo.fx.html.fadeHide(node,_6bf,_6c1);
}};
dojo.fx.html.toggle.wipe={show:function(node,_6c3,_6c4,_6c5){
dojo.fx.html.wipeIn(node,_6c3,_6c5);
},hide:function(node,_6c7,_6c8,_6c9){
dojo.fx.html.wipeOut(node,_6c7,_6c9);
}};
dojo.fx.html.toggle.explode={show:function(node,_6cb,_6cc,_6cd){
dojo.fx.html.explode(_6cc||[0,0,0,0],node,_6cb,_6cd);
},hide:function(node,_6cf,_6d0,_6d1){
dojo.fx.html.implode(node,_6d0||[0,0,0,0],_6cf,_6d1);
}};
dojo.lang.mixin(dojo.fx,dojo.fx.html);
dojo.hostenv.conditionalLoadModule({browser:["dojo.fx.html"],dashboard:["dojo.fx.html"]});
dojo.hostenv.moduleLoaded("dojo.fx.*");
dojo.provide("dojo.widget.ToolbarContainer");
dojo.provide("dojo.widget.html.ToolbarContainer");
dojo.provide("dojo.widget.Toolbar");
dojo.provide("dojo.widget.html.Toolbar");
dojo.provide("dojo.widget.ToolbarItem");
dojo.provide("dojo.widget.html.ToolbarButtonGroup");
dojo.provide("dojo.widget.html.ToolbarButton");
dojo.provide("dojo.widget.html.ToolbarDialog");
dojo.provide("dojo.widget.html.ToolbarMenu");
dojo.provide("dojo.widget.html.ToolbarSeparator");
dojo.provide("dojo.widget.html.ToolbarSpace");
dojo.provide("dojo.widget.Icon");
dojo.require("dojo.widget.*");
dojo.require("dojo.html");
dojo.widget.tags.addParseTreeHandler("dojo:toolbarContainer");
dojo.widget.html.ToolbarContainer=function(){
dojo.widget.HtmlWidget.call(this);
};
dojo.inherits(dojo.widget.html.ToolbarContainer,dojo.widget.HtmlWidget);
dojo.lang.extend(dojo.widget.html.ToolbarContainer,{widgetType:"ToolbarContainer",isContainer:true,templateString:"<div class=\"toolbarContainer\" dojoAttachPoint=\"containerNode\"></div>",templateCssPath:dojo.uri.dojoUri("src/widget/templates/HtmlToolbar.css"),getItem:function(name){
if(name instanceof dojo.widget.ToolbarItem){
return name;
}
for(var i=0;i<this.children.length;i++){
var _6d4=this.children[i];
if(_6d4 instanceof dojo.widget.html.Toolbar){
var item=_6d4.getItem(name);
if(item){
return item;
}
}
}
return null;
},getItems:function(){
var _6d6=[];
for(var i=0;i<this.children.length;i++){
var _6d8=this.children[i];
if(_6d8 instanceof dojo.widget.html.Toolbar){
_6d6=_6d6.concat(_6d8.getItems());
}
}
return _6d6;
},enable:function(){
for(var i=0;i<this.children.length;i++){
var _6da=this.children[i];
if(_6da instanceof dojo.widget.html.Toolbar){
_6da.enable.apply(_6da,arguments);
}
}
},disable:function(){
for(var i=0;i<this.children.length;i++){
var _6dc=this.children[i];
if(_6dc instanceof dojo.widget.html.Toolbar){
_6dc.disable.apply(_6dc,arguments);
}
}
},select:function(name){
for(var i=0;i<this.children.length;i++){
var _6df=this.children[i];
if(_6df instanceof dojo.widget.html.Toolbar){
_6df.select(arguments);
}
}
},deselect:function(name){
for(var i=0;i<this.children.length;i++){
var _6e2=this.children[i];
if(_6e2 instanceof dojo.widget.html.Toolbar){
_6e2.deselect(arguments);
}
}
},getItemsState:function(){
var _6e3={};
for(var i=0;i<this.children.length;i++){
var _6e5=this.children[i];
if(_6e5 instanceof dojo.widget.html.Toolbar){
dojo.lang.mixin(_6e3,_6e5.getItemsState());
}
}
return _6e3;
},getItemsActiveState:function(){
var _6e6={};
for(var i=0;i<this.children.length;i++){
var _6e8=this.children[i];
if(_6e8 instanceof dojo.widget.html.Toolbar){
dojo.lang.mixin(_6e6,_6e8.getItemsActiveState());
}
}
return _6e6;
},getItemsSelectedState:function(){
var _6e9={};
for(var i=0;i<this.children.length;i++){
var _6eb=this.children[i];
if(_6eb instanceof dojo.widget.html.Toolbar){
dojo.lang.mixin(_6e9,_6eb.getItemsSelectedState());
}
}
return _6e9;
}});
dojo.widget.tags.addParseTreeHandler("dojo:toolbar");
dojo.widget.html.Toolbar=function(){
dojo.widget.HtmlWidget.call(this);
};
dojo.inherits(dojo.widget.html.Toolbar,dojo.widget.HtmlWidget);
dojo.lang.extend(dojo.widget.html.Toolbar,{widgetType:"Toolbar",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 _6ed=new Date();
var _6ee=null;
while(node&&node!=this.domNode){
if(dojo.html.hasClass(node,"toolbarItem")){
var _6ef=dojo.widget.manager.getWidgetsByFilter(function(w){
return w.domNode==node;
});
if(_6ef.length==1){
_6ee=_6ef[0];
break;
}else{
if(_6ef.length>1){
dojo.raise("Toolbar._getItem: More than one widget matches the node");
}
}
}
node=node.parentNode;
}
return _6ee;
},_onmouseover:function(e){
var _6f2=this._getItem(e.target);
if(_6f2&&_6f2._onmouseover){
_6f2._onmouseover(e);
}
},_onmouseout:function(e){
var _6f4=this._getItem(e.target);
if(_6f4&&_6f4._onmouseout){
_6f4._onmouseout(e);
}
},_onclick:function(e){
var _6f6=this._getItem(e.target);
if(_6f6&&_6f6._onclick){
_6f6._onclick(e);
}
},_onmousedown:function(e){
var _6f8=this._getItem(e.target);
if(_6f8&&_6f8._onmousedown){
_6f8._onmousedown(e);
}
},_onmouseup:function(e){
var _6fa=this._getItem(e.target);
if(_6fa&&_6fa._onmouseup){
_6fa._onmouseup(e);
}
},addChild:function(item,pos,_6fd){
var _6fe=dojo.widget.ToolbarItem.make(item,null,_6fd);
var ret=dojo.widget.html.Toolbar.superclass.addChild.call(this,_6fe,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 _703=this.children[i];
if(_703 instanceof dojo.widget.ToolbarItem&&_703._name==name){
return _703;
}
}
return null;
},getItems:function(){
var _704=[];
for(var i=0;i<this.children.length;i++){
var _706=this.children[i];
if(_706 instanceof dojo.widget.ToolbarItem){
_704.push(_706);
}
}
return _704;
},getItemsState:function(){
var _707={};
for(var i=0;i<this.children.length;i++){
var _709=this.children[i];
if(_709 instanceof dojo.widget.ToolbarItem){
_707[_709._name]={selected:_709._selected,enabled:_709._enabled};
}
}
return _707;
},getItemsActiveState:function(){
var _70a=this.getItemsState();
for(var item in _70a){
_70a[item]=_70a[item].enabled;
}
return _70a;
},getItemsSelectedState:function(){
var _70c=this.getItemsState();
for(var item in _70c){
_70c[item]=_70c[item].selected;
}
return _70c;
},enable:function(){
var _70e=arguments.length?arguments:this.children;
for(var i=0;i<_70e.length;i++){
var _710=this.getItem(_70e[i]);
if(_710 instanceof dojo.widget.ToolbarItem){
_710.enable(false,true);
}
}
},disable:function(){
var _711=arguments.length?arguments:this.children;
for(var i=0;i<_711.length;i++){
var _713=this.getItem(_711[i]);
if(_713 instanceof dojo.widget.ToolbarItem){
_713.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],value=arguments[i+1];
var item=this.getItem(name);
if(item){
if(item instanceof dojo.widget.ToolbarItem){
item.setValue(value);
}
}
}
}});
dojo.widget.ToolbarItem=function(){
dojo.widget.HtmlWidget.call(this);
};
dojo.inherits(dojo.widget.ToolbarItem,dojo.widget.HtmlWidget);
dojo.lang.extend(dojo.widget.ToolbarItem,{templateString:"<span unselectable=\"on\" class=\"toolbarItem\"></span>",_name:null,getName:function(){
return this._name;
},setName:function(_71d){
return this._name=_71d;
},getValue:function(){
return this.getName();
},setValue:function(_71e){
return this.setName(_71e);
},_selected:false,isSelected:function(){
return this._selected;
},setSelected:function(is,_720,_721){
if(!this._toggleItem&&!_720){
return;
}
is=Boolean(is);
if(_720||this._enabled&&this._selected!=is){
this._selected=is;
this.update();
if(!_721){
this._fireEvent(is?"onSelect":"onDeselect");
this._fireEvent("onChangeSelect");
}
}
},select:function(_722,_723){
return this.setSelected(true,_722,_723);
},deselect:function(_724,_725){
return this.setSelected(false,_724,_725);
},_toggleItem:false,isToggleItem:function(){
return this._toggleItem;
},setToggleItem:function(_726){
this._toggleItem=Boolean(_726);
},toggleSelected:function(_727){
return this.setSelected(!this._selected,_727);
},_enabled:true,isEnabled:function(){
return this._enabled;
},setEnabled:function(is,_729,_72a){
is=Boolean(is);
if(_729||this._enabled!=is){
this._enabled=is;
this.update();
if(!_72a){
this._fireEvent(this._enabled?"onEnable":"onDisable");
this._fireEvent("onChangeEnabled");
}
}
return this._enabled;
},enable:function(_72b,_72c){
return this.setEnabled(true,_72b,_72c);
},disable:function(_72d,_72e){
return this.setEnabled(false,_72d,_72e);
},toggleEnabled:function(_72f,_730){
return this.setEnabled(!this._enabled,_72f,_730);
},_icon:null,getIcon:function(){
return this._icon;
},setIcon:function(_731){
var icon=dojo.widget.Icon.make(_731);
if(this._icon){
this._icon.setIcon(icon);
}else{
this._icon=icon;
}
var _733=this._icon.getNode();
if(_733.parentNode!=this.domNode){
if(this.domNode.hasChildNodes()){
this.domNode.insertBefore(_733,this.domNode.firstChild);
}else{
this.domNode.appendChild(_733);
}
}
return this._icon;
},_label:"",getLabel:function(){
return this._label;
},setLabel:function(_734){
var ret=this._label=_734;
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._enabled){
dojo.html.removeClass(this.domNode,"disabled");
if(this._selected){
dojo.html.addClass(this.domNode,"selected");
}else{
dojo.html.removeClass(this.domNode,"selected");
}
}else{
this._selected=false;
dojo.html.addClass(this.domNode,"disabled");
dojo.html.removeClass(this.domNode,"down");
dojo.html.removeClass(this.domNode,"hover");
}
this._updateIcon();
},_updateIcon:function(){
if(this._icon){
if(this._enabled){
if(this._cssHover){
this._icon.hover();
}else{
if(this._selected){
this._icon.select();
}else{
this._icon.enable();
}
}
}else{
this._icon.disable();
}
}
},_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._enabled){
return;
}
dojo.html.addClass(this.domNode,"hover");
},_onmouseout:function(e){
dojo.html.removeClass(this.domNode,"hover");
dojo.html.removeClass(this.domNode,"down");
if(!this._selected){
dojo.html.removeClass(this.domNode,"selected");
}
},_onclick:function(e){
if(this._enabled&&!this._toggleItem){
this._fireEvent("onClick");
}
},_onmousedown:function(e){
if(e.preventDefault){
e.preventDefault();
}
if(!this._enabled){
return;
}
dojo.html.addClass(this.domNode,"down");
if(this._toggleItem){
if(this.parent.preventDeselect&&this._selected){
return;
}
this.toggleSelected();
}
},_onmouseup:function(e){
dojo.html.removeClass(this.domNode,"down");
},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,_741,_742){
var item=null;
if(wh instanceof Array){
item=dojo.widget.createWidget("ToolbarButtonGroup",_742);
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(_742||{},{icon:new dojo.widget.Icon(wh.toString())}));
}else{
if(_741){
item=dojo.widget.createWidget(wh,_742);
}else{
if(typeof wh=="string"||wh instanceof String){
switch(wh.charAt(0)){
case "|":
case "-":
case "/":
item=dojo.widget.createWidget("ToolbarSeparator",_742);
break;
case " ":
if(wh.length==1){
item=dojo.widget.createWidget("ToolbarSpace",_742);
}else{
item=dojo.widget.createWidget("ToolbarFlexibleSpace",_742);
}
break;
default:
if(/\.(gif|jpg|jpeg|png)$/i.test(wh)){
item=dojo.widget.createWidget("ToolbarButton",dojo.lang.mixin(_742||{},{icon:new dojo.widget.Icon(wh.toString())}));
}else{
item=dojo.widget.createWidget("ToolbarButton",dojo.lang.mixin(_742||{},{label:wh.toString()}));
}
}
}else{
if(wh&&wh.tagName&&/^img$/i.test(wh.tagName)){
item=dojo.widget.createWidget("ToolbarButton",dojo.lang.mixin(_742||{},{icon:wh}));
}else{
item=dojo.widget.createWidget("ToolbarButton",dojo.lang.mixin(_742||{},{label:wh.toString()}));
}
}
}
}
}
}
return item;
};
dojo.widget.tags.addParseTreeHandler("dojo:toolbarButtonGroup");
dojo.widget.html.ToolbarButtonGroup=function(){
dojo.widget.ToolbarItem.call(this);
};
dojo.inherits(dojo.widget.html.ToolbarButtonGroup,dojo.widget.ToolbarItem);
dojo.lang.extend(dojo.widget.html.ToolbarButtonGroup,{widgetType:"ToolbarButtonGroup",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,_748){
var _749=dojo.widget.ToolbarItem.make(item,null,dojo.lang.mixin(_748||{},{toggleItem:true}));
var ret=dojo.widget.html.ToolbarButtonGroup.superclass.addChild.call(this,_749,null,pos,null);
this._injectChild(_749);
return ret;
},_injectChild:function(_74b){
dojo.event.connect(_74b,"onSelect",this,"onChildSelected");
dojo.event.connect(_74b,"onDeselect",this,"onChildDeSelected");
if(_74b._name==this.defaultButton||(typeof this.defaultButton=="number"&&this.children.length-1==this.defaultButton)){
_74b.select(false,true);
}
},getItem:function(name){
if(name instanceof dojo.widget.ToolbarItem){
return name;
}
for(var i=0;i<this.children.length;i++){
var _74e=this.children[i];
if(_74e instanceof dojo.widget.ToolbarItem&&_74e._name==name){
return _74e;
}
}
return null;
},getItems:function(){
var _74f=[];
for(var i=0;i<this.children.length;i++){
var _751=this.children[i];
if(_751 instanceof dojo.widget.ToolbarItem){
_74f.push(_751);
}
}
return _74f;
},onChildSelected:function(e){
this.select(e._name);
},onChildDeSelected:function(e){
this._fireEvent("onChangeSelect",this._value);
},enable:function(_754,_755){
for(var i=0;i<this.children.length;i++){
var _757=this.children[i];
if(_757 instanceof dojo.widget.ToolbarItem){
_757.enable(_754,_755);
if(_757._name==this._value){
_757.select(_754,_755);
}
}
}
},disable:function(_758,_759){
for(var i=0;i<this.children.length;i++){
var _75b=this.children[i];
if(_75b instanceof dojo.widget.ToolbarItem){
_75b.disable(_758,_759);
}
}
},_value:"",getValue:function(){
return this._value;
},select:function(name,_75d,_75e){
for(var i=0;i<this.children.length;i++){
var _760=this.children[i];
if(_760 instanceof dojo.widget.ToolbarItem){
if(_760._name==name){
_760.select(_75d,_75e);
this._value=name;
}else{
_760.deselect(true,true);
}
}
}
if(!_75e){
this._fireEvent("onSelect",this._value);
this._fireEvent("onChangeSelect",this._value);
}
},setValue:this.select,preventDeselect:false});
dojo.widget.tags.addParseTreeHandler("dojo:toolbarButton");
dojo.widget.html.ToolbarButton=function(){
dojo.widget.ToolbarItem.call(this);
};
dojo.inherits(dojo.widget.html.ToolbarButton,dojo.widget.ToolbarItem);
dojo.lang.extend(dojo.widget.html.ToolbarButton,{widgetType:"ToolbarButton",fillInTemplate:function(args,frag){
dojo.widget.html.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.tags.addParseTreeHandler("dojo:toolbarDialog");
dojo.widget.html.ToolbarDialog=function(){
dojo.widget.html.ToolbarButton.call(this);
};
dojo.inherits(dojo.widget.html.ToolbarDialog,dojo.widget.html.ToolbarButton);
dojo.lang.extend(dojo.widget.html.ToolbarDialog,{widgetType:"ToolbarDialog",fillInTemplate:function(args,frag){
dojo.widget.html.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.tags.addParseTreeHandler("dojo:toolbarMenu");
dojo.widget.html.ToolbarMenu=function(){
dojo.widget.html.ToolbarDialog.call(this);
this.widgetType="ToolbarMenu";
};
dojo.inherits(dojo.widget.html.ToolbarMenu,dojo.widget.html.ToolbarDialog);
dojo.widget.ToolbarMenuItem=function(){
};
dojo.widget.tags.addParseTreeHandler("dojo:toolbarSeparator");
dojo.widget.html.ToolbarSeparator=function(){
dojo.widget.ToolbarItem.call(this);
};
dojo.inherits(dojo.widget.html.ToolbarSeparator,dojo.widget.ToolbarItem);
dojo.lang.extend(dojo.widget.html.ToolbarSeparator,{widgetType:"ToolbarSeparator",templateString:"<span unselectable=\"on\" class=\"toolbarItem toolbarSeparator\"></span>",defaultIconPath:new dojo.uri.dojoUri("src/widget/templates/buttons/-.gif"),fillInTemplate:function(args,frag,skip){
dojo.widget.html.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.tags.addParseTreeHandler("dojo:toolbarSpace");
dojo.widget.html.ToolbarSpace=function(){
dojo.widget.html.ToolbarSeparator.call(this);
};
dojo.inherits(dojo.widget.html.ToolbarSpace,dojo.widget.html.ToolbarSeparator);
dojo.lang.extend(dojo.widget.html.ToolbarSpace,{widgetType:"ToolbarSpace",fillInTemplate:function(args,frag,skip){
dojo.widget.html.ToolbarSpace.superclass.fillInTemplate.call(this,args,frag,true);
if(!skip){
dojo.html.addClass(this.domNode,"toolbarSpace");
}
}});
dojo.widget.tags.addParseTreeHandler("dojo:toolbarSelect");
dojo.widget.html.ToolbarSelect=function(){
dojo.widget.ToolbarItem.call(this);
};
dojo.inherits(dojo.widget.html.ToolbarSelect,dojo.widget.ToolbarItem);
dojo.lang.extend(dojo.widget.html.ToolbarSelect,{widgetType:"ToolbarSelect",templateString:"<span class=\"toolbarItem toolbarSelect\" unselectable=\"on\"><select dojoAttachPoint=\"selectBox\" dojoOnChange=\"changed\"></select></span>",fillInTemplate:function(args,frag){
dojo.widget.html.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,_776,_777){
var ret=dojo.widget.html.ToolbarSelect.superclass.setEnabled.call(this,is,_776,_777);
this.selectBox.disabled=!this._enabled;
return ret;
},_onmouseover:null,_onmouseout:null,_onclick:null,_onmousedown:null,_onmouseup:null});
dojo.widget.Icon=function(_779,_77a,_77b,_77c){
if(arguments.length==0){
throw new Error("Icon must have at least an enabled state");
}
var _77d=["enabled","disabled","hover","selected"];
var _77e="enabled";
var _77f=document.createElement("img");
this.getState=function(){
return _77e;
};
this.setState=function(_780){
if(dojo.lang.inArray(_780,_77d)){
if(this[_780]){
_77e=_780;
_77f.setAttribute("src",this[_77e].src);
}
}else{
throw new Error("Invalid state set on Icon (state: "+_780+")");
}
};
this.setSrc=function(_781,_782){
if(/^img$/i.test(_782.tagName)){
this[_781]=_782;
}else{
if(typeof _782=="string"||_782 instanceof String||_782 instanceof dojo.uri.Uri){
this[_781]=new Image();
this[_781].src=_782.toString();
}
}
return this[_781];
};
this.setIcon=function(icon){
for(var i=0;i<_77d.length;i++){
if(icon[_77d[i]]){
this.setSrc(_77d[i],icon[_77d[i]]);
}
}
this.update();
};
this.enable=function(){
this.setState("enabled");
};
this.disable=function(){
this.setState("disabled");
};
this.hover=function(){
this.setState("hover");
};
this.select=function(){
this.setState("selected");
};
this.getSize=function(){
return {width:_77f.width||_77f.offsetWidth,height:_77f.height||_77f.offsetHeight};
};
this.setSize=function(w,h){
_77f.width=w;
_77f.height=h;
return {width:w,height:h};
};
this.getNode=function(){
return _77f;
};
this.getSrc=function(_787){
if(_787){
return this[_787].src;
}
return _77f.src||"";
};
this.update=function(){
this.setState(_77e);
};
for(var i=0;i<_77d.length;i++){
var arg=arguments[i];
var _78a=_77d[i];
this[_78a]=null;
if(!arg){
continue;
}
this.setSrc(_78a,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];
}else{
if(!arguments[i]){
nullArgs++;
}
}
}
return new dojo.widget.Icon(a,b,c,d);
};
dojo.provide("dojo.widget.RichText");
dojo.provide("dojo.widget.html.RichText");
dojo.require("dojo.widget.*");
dojo.require("dojo.dom");
dojo.require("dojo.html");
dojo.require("dojo.event.*");
dojo.require("dojo.style");
dojo.require("dojo.string");
try{
document.write("<textarea id=\"dojo.widget.RichText.savedContent\" "+"style=\"display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;\"></textarea>");
}
catch(e){
}
dojo.widget.defineWidget("dojo.widget.html.RichText",dojo.widget.HtmlWidget,{inheritWidth:false,focusOnLoad:true,saveName:"",_content:"",height:null,minHeight:"1em",isClosed:true,isLoaded:false,useActiveX:false,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",fillInTemplate:function(){
this.open();
var _790=["queryCommandEnabled","queryCommandState","queryCommandValue","execCommand"];
for(var i=0;i<_790.length;i++){
dojo.event.connect("around",this,_790[i],this,"_normalizeCommand");
}
dojo.event.connect(this,"onKeyPressed",this,"afterKeyPress");
dojo.event.connect(this,"onKeyPress",this,"keyPress");
dojo.event.connect(this,"onKeyDown",this,"keyDown");
dojo.event.connect(this,"onKeyUp",this,"keyUp");
var ctrl=this.KEY_CTRL;
var exec=function(cmd,arg){
return arguments.length==1?function(){
this.execCommand(cmd);
}:function(){
this.execCommand(cmd,arg);
};
};
this.addKeyHandler("b",ctrl,exec("bold"));
this.addKeyHandler("i",ctrl,exec("italic"));
this.addKeyHandler("u",ctrl,exec("underline"));
this.addKeyHandler("a",ctrl,exec("selectall"));
this.addKeyHandler("Z",ctrl,exec("redo"));
this.addKeyHandler("s",ctrl,function(){
this.save(true);
});
this.addKeyHandler("1",ctrl,exec("formatblock","h1"));
this.addKeyHandler("2",ctrl,exec("formatblock","h2"));
this.addKeyHandler("3",ctrl,exec("formatblock","h3"));
this.addKeyHandler("4",ctrl,exec("formatblock","h4"));
this.addKeyHandler("\\",ctrl,exec("insertunorderedlist"));
},open:function(_796){
dojo.event.topic.publish("dojo.widget.RichText::open",this);
if(!this.isClosed){
this.close();
}
this._content="";
if(arguments.length==1){
this.domNode=_796;
}
if(this.domNode.nodeName.toLowerCase()=="textarea"){
this.textarea=this.domNode;
var html=dojo.string.trim(this.textarea.value);
if(html==""){
html="&nbsp;";
}
this.domNode=document.createElement("div");
with(this.textarea.style){
display="block";
position="absolute";
width="1px";
height="1px";
border=margin=padding="0px";
visiblity="hidden";
if(dojo.render.html.ie){
overflow="hidden";
}
}
dojo.dom.insertBefore(this.domNode,this.textarea);
if(this.textarea.form){
dojo.event.connect(this.textarea.form,"onsubmit",dojo.lang.hitch(this,function(){
this.textarea.value=this.getEditorContent();
}));
}
var _798=this;
dojo.event.connect(this,"postCreate",function(){
dojo.dom.insertAfter(_798.textarea,_798.domNode);
});
}else{
var html=dojo.string.trim(this.domNode.innerHTML);
if(html==""){
html="&nbsp;";
}
}
this._oldHeight=dojo.style.getContentHeight(this.domNode);
this._oldWidth=dojo.style.getContentWidth(this.domNode);
this._firstChildContributingMargin=this._getContributingMargin(this.domNode,"top");
this._lastChildContributingMargin=this._getContributingMargin(this.domNode,"bottom");
this.savedContent=document.createElement("div");
while(this.domNode.hasChildNodes()){
this.savedContent.appendChild(this.domNode.firstChild);
}
if(this.domNode.nodeName=="LI"){
this.domNode.innerHTML=" <br>";
}
if(this.saveName!=""){
var _799=document.getElementById("dojo.widget.RichText.savedContent");
if(_799.value!=""){
var _79a=_799.value.split(this._SEPARATOR);
for(var i=0;i<_79a.length;i++){
var data=_79a[i].split(":");
if(data[0]==this.saveName){
html=data[1];
_79a.splice(i,1);
break;
}
}
}
dojo.event.connect("before",window,"onunload",this,"_saveContent");
}
if(this.useActiveX&&dojo.render.html.ie){
this._drawObject(html);
}else{
if(dojo.render.html.ie){
this.editNode=document.createElement("div");
with(this.editNode){
innerHTML=html;
contentEditable=true;
style.height=this.height?this.height:this.minHeight;
}
if(this.height){
this.editNode.style.overflowY="scroll";
}
this.domNode.appendChild(this.editNode);
var _79d=["onBlur","onFocus","onKeyPress","onKeyDown","onKeyUp","onClick"];
for(var i=0;i<_79d.length;i++){
this.connect(this.editNode,_79d[i].toLowerCase(),_79d[i]);
}
this.window=window;
this.document=document;
this.onLoad();
}else{
this._drawIframe(html);
}
}
if(this.domNode.nodeName=="LI"){
this.domNode.lastChild.style.marginTop="-1.2em";
}
dojo.html.addClass(this.domNode,"RichTextEditable");
this.isClosed=false;
},_hasCollapseableMargin:function(_79e,side){
if(dojo.style.getPixelValue(_79e,"border-"+side+"-width",false)){
return false;
}else{
if(dojo.style.getPixelValue(_79e,"padding-"+side,false)){
return false;
}else{
return true;
}
}
},_getContributingMargin:function(_7a0,_7a1){
if(_7a1=="top"){
var _7a2="previousSibling";
var _7a3="nextSibling";
var _7a4="firstChild";
var _7a5="margin-top";
var _7a6="margin-bottom";
}else{
var _7a2="nextSibling";
var _7a3="previousSibling";
var _7a4="lastChild";
var _7a5="margin-bottom";
var _7a6="margin-top";
}
var _7a7=dojo.style.getPixelValue(_7a0,_7a5,false);
function isSignificantNode(_7a8){
return !(_7a8.nodeType==3&&dojo.string.isBlank(_7a8.data))&&dojo.style.getStyle(_7a8,"display")!="none"&&!dojo.style.isPositionAbsolute(_7a8);
}
var _7a9=0;
var _7aa=_7a0[_7a4];
while(_7aa){
while((!isSignificantNode(_7aa))&&_7aa[_7a3]){
_7aa=_7aa[_7a3];
}
_7a9=Math.max(_7a9,dojo.style.getPixelValue(_7aa,_7a5,false));
if(!this._hasCollapseableMargin(_7aa,_7a1)){
break;
}
_7aa=_7aa[_7a4];
}
if(!this._hasCollapseableMargin(_7a0,_7a1)){
return parseInt(_7a9);
}
var _7ab=0;
var _7ac=_7a0[_7a2];
while(_7ac){
if(isSignificantNode(_7ac)){
_7ab=dojo.style.getPixelValue(_7ac,_7a6,false);
break;
}
_7ac=_7ac[_7a2];
}
if(!_7ac){
_7ab=dojo.style.getPixelValue(_7a0.parentNode,_7a5,false);
}
if(_7a9>_7a7){
return parseInt(Math.max((_7a9-_7a7)-_7ab,0));
}else{
return 0;
}
},_drawIframe:function(html){
var _7ae=Boolean(dojo.render.html.moz&&(typeof window.XML=="undefined"));
if(!this.iframe){
var _7af=(new dojo.uri.Uri(document.location)).host;
this.iframe=document.createElement("iframe");
with(this.iframe){
scrolling=this.height?"auto":"no";
style.border="none";
style.lineHeight="0";
style.verticalAlign="bottom";
}
}
this.iframe.src=dojo.uri.dojoUri("src/widget/templates/richtextframe.html")+"#"+((document.domain!=_7af)?document.domain:"");
this.iframe.width=this.inheritWidth?this._oldWidth:"100%";
if(this.height){
this.iframe.style.height=this.height;
}else{
var _7b0=this._oldHeight;
if(this._hasCollapseableMargin(this.domNode,"top")){
_7b0+=this._firstChildContributingMargin;
}
if(this._hasCollapseableMargin(this.domNode,"bottom")){
_7b0+=this._lastChildContributingMargin;
}
this.iframe.height=_7b0;
}
var _7b1=document.createElement("div");
_7b1.style.position="absolute";
_7b1.innerHTML=html;
if(_7b1.firstChild&&_7b1.firstChild.style){
_7b1.firstChild.style.marginTop=this._firstChildContributingMargin+"px";
_7b1.lastChild.style.marginBottom=this._lastChildContributingMargin+"px";
}
this.domNode.appendChild(_7b1);
this.domNode.appendChild(this.iframe);
var _7b2=false;
var _7b3=dojo.lang.hitch(this,function(){
if(!_7b2){
_7b2=true;
}else{
return;
}
if(!this.editNode){
if(this.iframe.contentWindow){
this.window=this.iframe.contentWindow;
}else{
this.window=this.iframe.contentDocument.window;
}
this.document=this.iframe.contentDocument;
var _7b4=(function(_7b5){
return function(_7b6){
return dojo.style.getStyle(_7b5,_7b6);
};
})(this.domNode);
var font=_7b4("font-weight")+" "+_7b4("font-size")+" "+_7b4("font-family");
var _7b8="1.0";
var _7b9=dojo.style.getUnitValue(this.domNode,"line-height");
if(_7b9.value&&_7b9.units==""){
_7b8=_7b9.value;
}
dojo.style.insertCssText("    body,html { background: transparent; padding: 0; margin: 0; }\n"+"    body { top: 0; left: 0; right: 0;"+(this.height?"":" position: fixed; ")+"        font: "+font+";\n"+"        min-height: "+this.minHeight+"; \n"+"        line-height: "+_7b8+"} \n"+"    p { margin: 1em 0 !important; }\n"+"    body > *:first-child { padding-top: 0 !important; margin-top: "+this._firstChildContributingMargin+"px !important; }\n"+"    body > *:last-child { padding-bottom: 0 !important; margin-bottom: "+this._lastChildContributingMargin+"px !important; }\n"+"    li > ul:-moz-first-node, li > ol:-moz-first-node { padding-top: 1.2em; }\n"+"    li { min-height: 1.2em; }\n"+"",this.document);
_7b1.parentNode.removeChild(_7b1);
this.document.body.innerHTML=html;
this.onLoad();
}else{
_7b1.parentNode.removeChild(_7b1);
this.editNode.innerHTML=html;
this.onDisplayChanged();
}
});
if(this.editNode){
_7b3();
}else{
if(_7ae){
this.iframe.onload=function(){
setTimeout(_7b3,250);
};
}else{
this.iframe.onload=_7b3;
}
}
},_drawObject:function(html){
this.object=document.createElement("object");
with(this.object){
classid="clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A";
width=this.inheritWidth?this._oldWidth:"100%";
style.height=this.height?this.height:(this._oldHeight+"px");
Scrollbars=this.height?true:false;
Appearance=this._activeX.appearance.flat;
}
this.domNode.appendChild(this.object);
this.object.attachEvent("DocumentComplete",dojo.lang.hitch(this,"onLoad"));
this.object.attachEvent("DisplayChanged",dojo.lang.hitch(this,"_updateHeight"));
this.object.attachEvent("DisplayChanged",dojo.lang.hitch(this,"onDisplayChanged"));
this.object.DocumentHTML="<!doctype HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">"+"<title></title>"+"<style type=\"text/css\">"+"    body,html { padding: 0; margin: 0; }"+(this.height?"":"    body { overflow: hidden; }")+"</style>"+"<body><div id=\"bodywrapper\">"+html+"</div></body>";
},onLoad:function(e){
this.isLoaded=true;
if(this.object){
this.document=this.object.DOM;
this.editNode=this.document.body.firstChild;
}else{
if(this.iframe){
this.editNode=this.document.body;
this.connect(this,"onDisplayChanged","_updateHeight");
try{
this.document.execCommand("useCSS",false,true);
this.document.execCommand("styleWithCSS",false,false);
}
catch(e2){
}
if(dojo.render.html.safari){
this.connect(this.editNode,"onblur","onBlur");
this.connect(this.editNode,"onfocus","onFocus");
this.interval=setInterval(dojo.lang.hitch(this,"onDisplayChanged"),750);
}else{
if(dojo.render.html.mozilla||dojo.render.html.opera){
var doc=this.document;
var _7bd=dojo.event.browser.addListener(this.document,"blur",dojo.lang.hitch(this,"onBlur"));
var _7be={unBlur:function(e){
dojo.event.browser.removeListener(doc,"blur",_7bd);
}};
dojo.event.connect("before",this,"close",_7be,"unBlur");
dojo.event.browser.addListener(this.document,"focus",dojo.lang.hitch(this,"onFocus"));
var _7c0=dojo.event.browser.addListener;
_7c0(this.document,"keypress",dojo.lang.hitch(this,"onKeyPress"));
_7c0(this.document,"keydown",dojo.lang.hitch(this,"onKeyDown"));
_7c0(this.document,"keyup",dojo.lang.hitch(this,"onKeyUp"));
_7c0(this.document,"click",dojo.lang.hitch(this,"onClick"));
}
}
}
}
if(this.focusOnLoad){
this.focus();
}
this.onDisplayChanged(e);
},onKeyDown:function(e){
},onKeyUp:function(e){
},KEY_CTRL:1,onKeyPress:function(e){
var _7c4=e.charCode>0?String.fromCharCode(e.charCode):null;
var code=e.keyCode;
var _7c6=e.ctrlKey?this.KEY_CTRL:0;
if(this._keyHandlers[_7c4]){
var _7c7=this._keyHandlers[_7c4],i=0,handler;
while(handler=_7c7[i++]){
if(_7c6==handler.modifiers){
handler.handler.call(this);
e.preventDefault();
break;
}
}
}
dojo.lang.setTimeout(this,this.onKeyPressed,1,e);
},addKeyHandler:function(key,_7c9,_7ca){
if(!(this._keyHandlers[key] instanceof Array)){
this._keyHandlers[key]=[];
}
this._keyHandlers[key].push({modifiers:_7c9||0,handler:_7ca});
},onKeyPressed:function(e){
this.onDisplayChanged();
},onClick:function(e){
this.onDisplayChanged(e);
},onBlur:function(e){
},_initialFocus:true,onFocus:function(e){
if((dojo.render.html.mozilla)&&(this._initialFocus)){
this._initialFocus=false;
if(dojo.string.trim(this.editNode.innerHTML)=="&nbsp;"){
this.execCommand("selectall");
this.window.getSelection().collapseToStart();
}
}
},blur:function(){
if(this.iframe){
this.window.blur();
}else{
if(this.editNode){
this.editNode.blur();
}
}
},focus:function(){
if(this.iframe){
this.window.focus();
}else{
if(this.editNode){
this.editNode.focus();
}
}
},onDisplayChanged:function(e){
},_activeX:{command:{bold:5000,italic:5023,underline:5048,justifycenter:5024,justifyleft:5025,justifyright:5026,cut:5003,copy:5002,paste:5032,"delete":5004,undo:5049,redo:5033,removeformat:5034,selectall:5035,unlink:5050,indent:5018,outdent:5031,insertorderedlist:5030,insertunorderedlist:5051,inserttable:5022,insertcell:5019,insertcol:5020,insertrow:5021,deletecells:5005,deletecols:5006,deleterows:5007,mergecells:5029,splitcell:5047,setblockformat:5043,getblockformat:5011,getblockformatnames:5012,setfontname:5044,getfontname:5013,setfontsize:5045,getfontsize:5014,setbackcolor:5042,getbackcolor:5010,setforecolor:5046,getforecolor:5015,findtext:5008,font:5009,hyperlink:5016,image:5017,lockelement:5027,makeabsolute:5028,sendbackward:5036,bringforward:5037,sendbelowtext:5038,bringabovetext:5039,sendtoback:5040,bringtofront:5041,properties:5052},ui:{"default":0,prompt:1,noprompt:2},status:{notsupported:0,disabled:1,enabled:3,latched:7,ninched:11},appearance:{flat:0,inset:1},state:{unchecked:0,checked:1,gray:2}},_normalizeCommand:function(_7d0){
var drh=dojo.render.html;
var _7d2=_7d0.args[0].toLowerCase();
if(_7d2=="formatblock"){
if(drh.safari){
_7d2="heading";
}
if(drh.ie){
_7d0.args[1]="<"+_7d0.args[1]+">";
}
}
if(_7d2=="hilitecolor"&&!drh.mozilla){
_7d2="backcolor";
}
_7d0.args[0]=_7d2;
if(_7d0.args.length>1){
var _7d3=_7d0.args[1];
if(_7d2=="heading"){
throw new Error("unimplemented");
}
_7d0.args[1]=_7d3;
}
return _7d0.proceed();
},queryCommandAvailable:function(_7d4){
var ie=1;
var _7d6=1<<1;
var _7d7=1<<2;
var _7d8=1<<3;
function isSupportedBy(_7d9){
return {ie:Boolean(_7d9&ie),mozilla:Boolean(_7d9&_7d6),safari:Boolean(_7d9&_7d7),opera:Boolean(_7d9&_7d8)};
}
var _7da=null;
switch(_7d4.toLowerCase()){
case "bold":
case "italic":
case "underline":
case "subscript":
case "superscript":
case "fontname":
case "fontsize":
case "forecolor":
case "hilitecolor":
case "justifycenter":
case "justifyfull":
case "justifyleft":
case "justifyright":
case "delete":
case "undo":
case "redo":
_7da=isSupportedBy(_7d6|ie|_7d7|_7d8);
break;
case "createlink":
case "unlink":
case "removeformat":
case "inserthorizontalrule":
case "insertimage":
case "insertorderedlist":
case "insertunorderedlist":
case "indent":
case "outdent":
case "formatblock":
case "strikethrough":
case "inserthtml":
_7da=isSupportedBy(_7d6|ie|_7d8);
break;
case "blockdirltr":
case "blockdirrtl":
case "dirltr":
case "dirrtl":
case "inlinedirltr":
case "inlinedirrtl":
case "cut":
case "copy":
case "paste":
_7da=isSupportedBy(ie);
break;
case "inserttable":
_7da=isSupportedBy(_7d6|(this.object?ie:0));
break;
case "insertcell":
case "insertcol":
case "insertrow":
case "deletecells":
case "deletecols":
case "deleterows":
case "mergecells":
case "splitcell":
_7da=isSupportedBy(this.object?ie:0);
break;
default:
return false;
}
return (dojo.render.html.ie&&_7da.ie)||(dojo.render.html.mozilla&&_7da.mozilla)||(dojo.render.html.safari&&_7da.safari)||(dojo.render.html.opera&&_7da.opera);
},execCommand:function(_7db,_7dc){
var _7dd;
if(this.object){
if(_7db=="forecolor"){
_7db="setforecolor";
}else{
if(_7db=="backcolor"){
_7db="setbackcolor";
}
}
if(_7db=="inserttable"){
var _7de=this.constructor._tableInfo;
if(!_7de){
_7de=document.createElement("object");
_7de.classid="clsid:47B0DFC7-B7A3-11D1-ADC5-006008A5848C";
document.body.appendChild(_7de);
this.constructor._table=_7de;
}
_7de.NumRows=_7dc.rows;
_7de.NumCols=_7dc.cols;
_7de.TableAttrs=_7dc["TableAttrs"];
_7de.CellAttrs=arr["CellAttrs"];
_7de.Caption=arr["Caption"];
}
if(arguments.length==1){
return this.object.ExecCommand(this._activeX.command[_7db],this._activeX.ui.noprompt);
}else{
return this.object.ExecCommand(this._activeX.command[_7db],this._activeX.ui.noprompt,_7dc);
}
}else{
if(_7db=="inserthtml"){
if(dojo.render.html.ie){
var _7df=this.document.selection.createRange();
_7df.collapse(true);
this.window.clipboardData.setData("Text",_7dc);
this.document.execCommand("paste");
return true;
}else{
return this.document.execCommand(_7db,false,_7dc);
}
}else{
if(_7db=="unlink"&&this.queryCommandEnabled("unlink")&&dojo.render.html.mozilla){
var _7e0=this.window.getSelection();
var _7e1=_7e0.getRangeAt(0);
var _7e2=_7e1.startContainer;
var _7e3=_7e1.startOffset;
var _7e4=_7e1.endContainer;
var _7e5=_7e1.endOffset;
var _7e6=document.createRange();
var a=this.getSelectedNode();
while(a.nodeName!="A"){
a=a.parentNode;
}
_7e6.selectNode(a);
_7e0.removeAllRanges();
_7e0.addRange(_7e6);
_7dd=this.document.execCommand("unlink",false,null);
var _7e1=document.createRange();
_7e1.setStart(_7e2,_7e3);
_7e1.setEnd(_7e4,_7e5);
_7e0.removeAllRanges();
_7e0.addRange(_7e1);
return _7dd;
}else{
if(_7db=="inserttable"&&dojo.render.html.mozilla){
var cols="<tr>";
for(var i=0;i<_7dc.cols;i++){
cols+="<td></td>";
}
cols+="</tr>";
var _7ea="<table><tbody>";
for(var i=0;i<_7dc.rows;i++){
_7ea+=cols;
}
_7ea+="</tbody></table>";
_7dd=this.document.execCommand("inserthtml",false,_7ea);
}else{
if(_7db=="hilitecolor"&&dojo.render.html.mozilla){
this.document.execCommand("useCSS",false,false);
_7dd=this.document.execCommand(_7db,false,_7dc);
this.document.execCommand("useCSS",false,true);
}else{
_7dc=arguments.length>1?_7dc:null;
_7dd=this.document.execCommand(_7db,false,_7dc);
}
}
}
}
}
this.onDisplayChanged();
return _7dd;
},queryCommandEnabled:function(_7eb,_7ec){
if(this.object){
if(_7eb=="forecolor"){
_7eb="setforecolor";
}else{
if(_7eb=="backcolor"){
_7eb="setbackcolor";
}
}
if(typeof this._activeX.command[_7eb]=="undefined"){
return false;
}
var _7ed=this.object.QueryStatus(this._activeX.command[_7eb]);
return (_7ed!=this.activeX.status.notsupported&&_7ed!=this.activeX.status.diabled);
}else{
if(_7eb=="unlink"&&dojo.render.html.mozilla){
var node=this.getSelectedNode();
while(node.parentNode&&node.nodeName!="A"){
node=node.parentNode;
}
return node.nodeName=="A";
}else{
if(_7eb=="inserttable"&&dojo.render.html.mozilla){
return true;
}
}
var elem=(dojo.render.html.ie)?this.document.selection.createRange():this.document;
return elem.queryCommandEnabled(_7eb);
}
},queryCommandState:function(_7f0,_7f1){
if(this.object){
if(_7f0=="forecolor"){
_7f0="setforecolor";
}else{
if(_7f0=="backcolor"){
_7f0="setbackcolor";
}
}
if(typeof this._activeX.command[_7f0]=="undefined"){
return null;
}
var _7f2=this.object.QueryStatus(this._activeX.command[_7f0]);
return (_7f2==this._activeX.status.enabled||_7f2==this._activeX.status.ninched);
}else{
return this.document.queryCommandState(_7f0);
}
},queryCommandValue:function(_7f3,_7f4){
if(this.object){
switch(_7f3){
case "forecolor":
case "backcolor":
case "fontsize":
case "fontname":
case "blockformat":
_7f3="get"+_7f3;
return this.object.execCommand(this._activeX.command[_7f3],this._activeX.ui.noprompt);
}
}else{
return this.document.queryCommandValue(_7f3);
}
},getSelectedNode:function(){
if(!this.isLoaded){
return;
}
if(this.document.selection){
return this.document.selection.createRange().parentElement();
}else{
if(dojo.render.html.mozilla){
return this.window.getSelection().getRangeAt(0).commonAncestorContainer;
}
}
return this.editNode;
},placeCursorAtStart:function(){
if(!this.isLoaded){
dojo.event.connect(this,"onLoad",this,"placeCursorAtEnd");
return;
}
dojo.event.disconnect(this,"onLoad",this,"placeCursorAtEnd");
if(this.window.getSelection){
var _7f5=this.window.getSelection;
if(_7f5.removeAllRanges){
var _7f6=this.document.createRange();
_7f6.selectNode(this.editNode.firstChild);
_7f6.collapse(true);
var _7f5=this.window.getSelection();
_7f5.removeAllRanges();
_7f5.addRange(_7f6);
}else{
}
}else{
if(this.document.selection){
var _7f6=this.document.body.createTextRange();
_7f6.moveToElementText(this.editNode);
_7f6.collapse(true);
_7f6.select();
}
}
},placeCursorAtEnd:function(){
if(!this.isLoaded){
dojo.event.connect(this,"onLoad",this,"placeCursorAtEnd");
return;
}
dojo.event.disconnect(this,"onLoad",this,"placeCursorAtEnd");
if(this.window.getSelection){
var _7f7=this.window.getSelection;
if(_7f7.removeAllRanges){
var _7f8=this.document.createRange();
_7f8.selectNode(this.editNode.lastChild);
_7f8.collapse(false);
var _7f7=this.window.getSelection();
_7f7.removeAllRanges();
_7f7.addRange(_7f8);
}else{
}
}else{
if(this.document.selection){
var _7f8=this.document.body.createTextRange();
_7f8.moveToElementText(this.editNode);
_7f8.collapse(true);
_7f8.select();
}
}
},_lastHeight:0,_updateHeight:function(){
if(this.height){
return;
}
if(this.iframe){
var _7f9=["margin-top","margin-bottom","padding-bottom","padding-top","border-width-bottom","border-width-top"];
for(var i=0,chromeheight=0;i<_7f9.length;i++){
var _7fb=dojo.style.getStyle(this.iframe,_7f9[i]);
if(_7fb){
chromeheight+=Number(_7fb.replace(/[^0-9]/g,""));
}
}
if(this.document.body["offsetHeight"]){
this._lastHeight=Math.max(this.document.body.scrollHeight,this.document.body.offsetHeight)+chromeheight;
this.iframe.height=this._lastHeight+"px";
this.window.scrollTo(0,0);
}
}else{
if(this.object){
this.object.height=dojo.style.getInnerHeight(this.editNode);
}
}
},_saveContent:function(e){
var _7fd=document.getElementById("dojo.widget.RichText.savedContent");
_7fd.value+=this._SEPARATOR+this.saveName+":"+this.getEditorContent();
},getEditorContent:function(){
var ec="";
try{
ec=(this._content.length>0)?this._content:this.editNode.innerHTML;
if(dojo.string.trim(ec)=="&nbsp;"){
ec="";
}
}
catch(e){
}
dojo.lang.forEach(this.contentFilters,function(ef){
ec=ef(ec);
});
return ec;
},close:function(save,_801){
if(this.isClosed){
return false;
}
if(arguments.length==0){
save=true;
}
this._content=this.editNode.innerHTML;
var _802=(this.savedContent.innerHTML!=this._content);
if(this.interval){
clearInterval(this.interval);
}
if(dojo.render.html.ie&&!this.object){
dojo.event.browser.clean(this.editNode);
}
if(this.iframe){
delete this.iframe;
}
this.domNode.innerHTML="";
if(save){
dojo.event.browser.clean(this.savedContent);
if(dojo.render.html.moz){
var nc=document.createElement("span");
this.domNode.appendChild(nc);
nc.innerHTML=this.editNode.innerHTML;
}else{
this.domNode.innerHTML=this._content;
}
}else{
while(this.savedContent.hasChildNodes()){
this.domNode.appendChild(this.savedContent.firstChild);
}
}
delete this.savedContent;
dojo.html.removeClass(this.domNode,"RichTextEditable");
this.isClosed=true;
this.isLoaded=false;
return _802;
},destroyRendering:function(){
},destroy:function(){
this.destroyRendering();
if(!this.isClosed){
this.close(false);
}
while(this._connected.length){
this.disconnect(this._connected[0],this._connected[1],this._connected[2]);
}
},_connected:[],connect:function(_804,_805,_806){
dojo.event.connect(_804,_805,this,_806);
},disconnect:function(_807,_808,_809){
for(var i=0;i<this._connected.length;i++){
if(this._connected[0]==_807&&this._connected[1]==_808&&this._connected[2]==_809){
dojo.event.disconnect(_807,_808,this,_809);
this._connected.splice(i,1);
break;
}
}
},disconnectAllWithRoot:function(_80b){
for(var i=0;i<this._connected.length;i++){
if(this._connected[0]==_80b){
dojo.event.disconnect(_80b,this._connected[1],this,this._connected[2]);
this._connected.splice(i,1);
}
}
}},"html",function(){
this.contentFilters=[];
this._keyHandlers={};
});
dojo.provide("dojo.widget.ColorPalette");
dojo.provide("dojo.widget.html.ColorPalette");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.Toolbar");
dojo.require("dojo.html");
dojo.widget.tags.addParseTreeHandler("dojo:ToolbarColorDialog");
dojo.widget.html.ToolbarColorDialog=function(){
dojo.widget.html.ToolbarDialog.call(this);
};
dojo.inherits(dojo.widget.html.ToolbarColorDialog,dojo.widget.html.ToolbarDialog);
dojo.lang.extend(dojo.widget.html.ToolbarColorDialog,{widgetType:"ToolbarColorDialog",palette:"7x10",fillInTemplate:function(args,frag){
dojo.widget.html.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(_80f){
this._value=_80f;
this._fireEvent("onSetValue",_80f);
},showDialog:function(e){
dojo.widget.html.ToolbarColorDialog.superclass.showDialog.call(this,e);
var x=dojo.html.getAbsoluteX(this.domNode);
var y=dojo.html.getAbsoluteY(this.domNode)+dojo.html.getInnerHeight(this.domNode);
this.dialog.showAt(x,y);
},hideDialog:function(e){
dojo.widget.html.ToolbarColorDialog.superclass.hideDialog.call(this,e);
this.dialog.hide();
}});
dojo.widget.tags.addParseTreeHandler("dojo:colorpalette");
dojo.widget.html.ColorPalette=function(){
dojo.widget.HtmlWidget.call(this);
};
dojo.inherits(dojo.widget.html.ColorPalette,dojo.widget.HtmlWidget);
dojo.lang.extend(dojo.widget.html.ColorPalette,{widgetType:"colorpalette",palette:"7x10",bgIframe:null,palettes:{"7x10":[["fff","fcc","fc9","ff9","ffc","9f9","9ff","cff","ccf","fcf"],["ccc","f66","f96","ff6","ff3","6f9","3ff","6ff","99f","f9f"],["c0c0c0","f00","f90","fc6","ff0","3f3","6cc","3cf","66c","c6c"],["999","c00","f60","fc3","fc0","3c0","0cc","36f","63f","c3c"],["666","900","c60","c93","990","090","399","33f","60c","939"],["333","600","930","963","660","060","366","009","339","636"],["000","300","630","633","330","030","033","006","309","303"]],"3x4":[["ffffff","00ff00","008000","0000ff"],["c0c0c0","ffff00","ff00ff","000080"],["808080","ff0000","800080","000000"]]},buildRendering:function(){
this.domNode=document.createElement("table");
dojo.html.disableSelection(this.domNode);
dojo.event.connect(this.domNode,"onmousedown",function(e){
e.preventDefault();
});
with(this.domNode){
cellPadding="0";
cellSpacing="1";
border="1";
style.backgroundColor="white";
}
var _815=document.createElement("tbody");
this.domNode.appendChild(_815);
var _816=this.palettes[this.palette];
for(var i=0;i<_816.length;i++){
var tr=document.createElement("tr");
for(var j=0;j<_816[i].length;j++){
if(_816[i][j].length==3){
_816[i][j]=_816[i][j].replace(/(.)(.)(.)/,"$1$1$2$2$3$3");
}
var td=document.createElement("td");
with(td.style){
backgroundColor="#"+_816[i][j];
border="1px solid gray";
width=height="15px";
fontSize="1px";
}
td.color="#"+_816[i][j];
td.onmouseover=function(e){
this.style.borderColor="white";
};
td.onmouseout=function(e){
this.style.borderColor="gray";
};
dojo.event.connect(td,"onmousedown",this,"click");
td.innerHTML="&nbsp;";
tr.appendChild(td);
}
_815.appendChild(tr);
}
if(dojo.render.html.ie){
this.bgIframe=document.createElement("<iframe frameborder='0' src='javascript:void(0);'>");
with(this.bgIframe.style){
position="absolute";
left=top="0px";
display="none";
}
document.body.appendChild(this.bgIframe);
dojo.style.setOpacity(this.bgIframe,0);
}
},click:function(e){
this.onColorSelect(e.currentTarget.color);
e.currentTarget.style.borderColor="gray";
},onColorSelect:function(_81e){
},hide:function(){
this.domNode.parentNode.removeChild(this.domNode);
if(this.bgIframe){
this.bgIframe.style.display="none";
}
},showAt:function(x,y){
with(this.domNode.style){
top=y+"px";
left=x+"px";
zIndex=999;
}
document.body.appendChild(this.domNode);
if(this.bgIframe){
with(this.bgIframe.style){
display="block";
top=y+"px";
left=x+"px";
zIndex=998;
width=dojo.html.getOuterWidth(this.domNode)+"px";
height=dojo.html.getOuterHeight(this.domNode)+"px";
}
}
}});
dojo.provide("dojo.widget.Editor");
dojo.provide("dojo.widget.html.Editor");
dojo.require("dojo.io.*");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.Toolbar");
dojo.require("dojo.widget.RichText");
dojo.require("dojo.widget.ColorPalette");
dojo.require("dojo.string.extras");
dojo.widget.tags.addParseTreeHandler("dojo:Editor");
dojo.widget.html.Editor=function(){
dojo.widget.HtmlWidget.call(this);
this.contentFilters=[];
this._toolbars=[];
};
dojo.inherits(dojo.widget.html.Editor,dojo.widget.HtmlWidget);
dojo.widget.html.Editor.itemGroups={textGroup:["bold","italic","underline","strikethrough"],blockGroup:["formatBlock","fontName","fontSize"],justifyGroup:["justifyleft","justifycenter","justifyright"],commandGroup:["save","cancel"],colorGroup:["forecolor","hilitecolor"],listGroup:["insertorderedlist","insertunorderedlist"],indentGroup:["outdent","indent"],linkGroup:["createlink","insertimage","inserthorizontalrule"]};
dojo.widget.html.Editor.formatBlockValues={"Normal":"p","Main heading":"h2","Sub heading":"h3","Sub sub heading":"h4","Preformatted":"pre"};
dojo.widget.html.Editor.fontNameValues={"Arial":"Arial, Helvetica, sans-serif","Verdana":"Verdana, sans-serif","Times New Roman":"Times New Roman, serif","Courier":"Courier New, monospace"};
dojo.widget.html.Editor.fontSizeValues={"1 (8 pt)":"1","2 (10 pt)":"2","3 (12 pt)":"3","4 (14 pt)":"4","5 (18 pt)":"5","6 (24 pt)":"6","7 (36 pt)":"7"};
dojo.widget.html.Editor.defaultItems=["commandGroup","|","blockGroup","|","textGroup","|","colorGroup","|","justifyGroup","|","listGroup","indentGroup","|","linkGroup"];
dojo.widget.html.Editor.supportedCommands=["save","cancel","|","-","/"," "];
dojo.lang.extend(dojo.widget.html.Editor,{widgetType:"Editor",saveUrl:"",saveMethod:"post",saveArgName:"editorContent",closeOnSave:false,items:dojo.widget.html.Editor.defaultItems,formatBlockItems:dojo.lang.shallowCopy(dojo.widget.html.Editor.formatBlockValues),fontNameItems:dojo.lang.shallowCopy(dojo.widget.html.Editor.fontNameValues),fontSizeItems:dojo.lang.shallowCopy(dojo.widget.html.Editor.fontSizeValues),getItemProperties:function(name){
var _822={};
switch(name.toLowerCase()){
case "bold":
case "italic":
case "underline":
case "strikethrough":
_822.toggleItem=true;
break;
case "justifygroup":
_822.defaultButton="justifyleft";
_822.preventDeselect=true;
_822.buttonGroup=true;
break;
case "listgroup":
_822.buttonGroup=true;
break;
case "save":
case "cancel":
_822.label=dojo.string.capitalize(name);
break;
case "forecolor":
case "hilitecolor":
_822.name=name;
_822.toggleItem=true;
_822.icon=this.getCommandImage(name);
break;
case "formatblock":
_822.name="formatBlock";
_822.values=this.formatBlockItems;
break;
case "fontname":
_822.name="fontName";
_822.values=this.fontNameItems;
case "fontsize":
_822.name="fontSize";
_822.values=this.fontSizeItems;
}
return _822;
},validateItems:true,focusOnLoad:true,minHeight:"1em",_richText:null,_richTextType:"RichText",_toolbarContainer:null,_toolbarContainerType:"ToolbarContainer",_toolbars:[],_toolbarType:"Toolbar",_toolbarItemType:"ToolbarItem",buildRendering:function(args,frag){
var node=frag["dojo:"+this.widgetType.toLowerCase()]["nodeRef"];
var trt=dojo.widget.createWidget(this._richTextType,{focusOnLoad:this.focusOnLoad,minHeight:this.minHeight},node);
var _827=this;
setTimeout(function(){
_827.setRichText(trt);
_827.initToolbar();
_827.fillInTemplate(args,frag);
},0);
},setRichText:function(_828){
if(this._richText&&this._richText==_828){
dojo.debug("Already set the richText to this richText!");
return;
}
if(this._richText&&!this._richText.isClosed){
dojo.debug("You are switching richTexts yet you haven't closed the current one. Losing reference!");
}
this._richText=_828;
dojo.event.connect(this._richText,"close",this,"onClose");
dojo.event.connect(this._richText,"onLoad",this,"onLoad");
dojo.event.connect(this._richText,"onDisplayChanged",this,"updateToolbar");
if(this._toolbarContainer){
this._toolbarContainer.enable();
this.updateToolbar(true);
}
},initToolbar:function(){
if(this._toolbarContainer){
return;
}
this._toolbarContainer=dojo.widget.createWidget(this._toolbarContainerType);
var tb=this.addToolbar();
var last=true;
for(var i=0;i<this.items.length;i++){
if(this.items[i]=="\n"){
tb=this.addToolbar();
}else{
if((this.items[i]=="|")&&(!last)){
last=true;
}else{
last=this.addItem(this.items[i],tb);
}
}
}
this.insertToolbar(this._toolbarContainer.domNode,this._richText.domNode);
},insertToolbar:function(_82c,_82d){
dojo.html.insertBefore(_82c,_82d);
},addToolbar:function(_82e){
this.initToolbar();
if(!(_82e instanceof dojo.widget.html.Toolbar)){
_82e=dojo.widget.createWidget(this._toolbarType);
}
this._toolbarContainer.addChild(_82e);
this._toolbars.push(_82e);
return _82e;
},addItem:function(item,tb,_831){
if(!tb){
tb=this._toolbars[0];
}
var cmd=((item)&&(!dojo.lang.isUndefined(item["getValue"])))?cmd=item["getValue"]():item;
var _833=dojo.widget.html.Editor.itemGroups;
if(item instanceof dojo.widget.ToolbarItem){
tb.addChild(item);
}else{
if(_833[cmd]){
var _834=_833[cmd];
var _835=true;
if(cmd=="justifyGroup"||cmd=="listGroup"){
var _836=[cmd];
for(var i=0;i<_834.length;i++){
if(_831||this.isSupportedCommand(_834[i])){
_836.push(this.getCommandImage(_834[i]));
}else{
_835=false;
}
}
if(_836.length){
var btn=tb.addChild(_836,null,this.getItemProperties(cmd));
dojo.event.connect(btn,"onClick",this,"_action");
dojo.event.connect(btn,"onChangeSelect",this,"_action");
}
return _835;
}else{
for(var i=0;i<_834.length;i++){
if(!this.addItem(_834[i],tb)){
_835=false;
}
}
return _835;
}
}else{
if((!_831)&&(!this.isSupportedCommand(cmd))){
return false;
}
if(_831||this.isSupportedCommand(cmd)){
cmd=cmd.toLowerCase();
if(cmd=="formatblock"){
var _839=dojo.widget.createWidget("ToolbarSelect",{name:"formatBlock",values:this.formatBlockItems});
tb.addChild(_839);
var _83a=this;
dojo.event.connect(_839,"onSetValue",function(item,_83c){
_83a.onAction("formatBlock",_83c);
});
}else{
if(cmd=="fontname"){
var _839=dojo.widget.createWidget("ToolbarSelect",{name:"fontName",values:this.fontNameItems});
tb.addChild(_839);
dojo.event.connect(_839,"onSetValue",dojo.lang.hitch(this,function(item,_83e){
this.onAction("fontName",_83e);
}));
}else{
if(cmd=="fontsize"){
var _839=dojo.widget.createWidget("ToolbarSelect",{name:"fontSize",values:this.fontSizeItems});
tb.addChild(_839);
dojo.event.connect(_839,"onSetValue",dojo.lang.hitch(this,function(item,_840){
this.onAction("fontSize",_840);
}));
}else{
if(dojo.lang.inArray(cmd,["forecolor","hilitecolor"])){
var btn=tb.addChild(dojo.widget.createWidget("ToolbarColorDialog",this.getItemProperties(cmd)));
dojo.event.connect(btn,"onSetValue",this,"_setValue");
}else{
var btn=tb.addChild(this.getCommandImage(cmd),null,this.getItemProperties(cmd));
if(cmd=="save"){
dojo.event.connect(btn,"onClick",this,"_save");
}else{
if(cmd=="cancel"){
dojo.event.connect(btn,"onClick",this,"_close");
}else{
dojo.event.connect(btn,"onClick",this,"_action");
dojo.event.connect(btn,"onChangeSelect",this,"_action");
}
}
}
}
}
}
}
}
}
return true;
},enableToolbar:function(){
if(this._toolbarContainer){
this._toolbarContainer.domNode.style.display="";
this._toolbarContainer.enable();
}
},disableToolbar:function(hide){
if(hide){
if(this._toolbarContainer){
this._toolbarContainer.domNode.style.display="none";
}
}else{
if(this._toolbarContainer){
this._toolbarContainer.disable();
}
}
},_updateToolbarLastRan:null,_updateToolbarTimer:null,_updateToolbarFrequency:500,updateToolbar:function(_842){
if(!this._toolbarContainer){
return;
}
var diff=new Date()-this._updateToolbarLastRan;
if(!_842&&this._updateToolbarLastRan&&(diff<this._updateToolbarFrequency)){
clearTimeout(this._updateToolbarTimer);
var _844=this;
this._updateToolbarTimer=setTimeout(function(){
_844.updateToolbar();
},this._updateToolbarFrequency/2);
return;
}else{
this._updateToolbarLastRan=new Date();
}
var _845=this._toolbarContainer.getItems();
for(var i=0;i<_845.length;i++){
var item=_845[i];
if(item instanceof dojo.widget.html.ToolbarSeparator){
continue;
}
var cmd=item._name;
if(cmd=="save"||cmd=="cancel"){
continue;
}else{
if(cmd=="justifyGroup"){
try{
if(!this._richText.queryCommandEnabled("justifyleft")){
item.disable(false,true);
}else{
item.enable(false,true);
var _849=item.getItems();
for(var j=0;j<_849.length;j++){
var name=_849[j]._name;
var _84c=this._richText.queryCommandValue(name);
if(typeof _84c=="boolean"&&_84c){
_84c=name;
break;
}else{
if(typeof _84c=="string"){
_84c="justify"+_84c;
}else{
_84c=null;
}
}
}
if(!_84c){
_84c="justifyleft";
}
item.setValue(_84c,false,true);
}
}
catch(err){
}
}else{
if(cmd=="listGroup"){
var _84d=item.getItems();
for(var j=0;j<_84d.length;j++){
this.updateItem(_84d[j]);
}
}else{
this.updateItem(item);
}
}
}
}
},updateItem:function(item){
try{
var cmd=item._name;
var _850=this._richText.queryCommandEnabled(cmd);
item.setEnabled(_850,false,true);
var _851=this._richText.queryCommandState(cmd);
if(_851&&cmd=="underline"){
_851=!this._richText.queryCommandEnabled("unlink");
}
item.setSelected(_851,false,true);
return true;
}
catch(err){
return false;
}
},supportedCommands:dojo.widget.html.Editor.supportedCommands.concat(),isSupportedCommand:function(cmd){
var yes=dojo.lang.inArray(cmd,this.supportedCommands);
if(!yes){
try{
var _854=this._richText||dojo.widget.HtmlRichText.prototype;
yes=_854.queryCommandAvailable(cmd);
}
catch(E){
}
}
return yes;
},getCommandImage:function(cmd){
if(cmd=="|"){
return cmd;
}else{
return dojo.uri.dojoUri("src/widget/templates/buttons/"+cmd+".gif");
}
},_action:function(e){
this._fire("onAction",e.getValue());
},_setValue:function(a,b){
this._fire("onAction",a.getValue(),b);
},_save:function(e){
if(!this._richText.isClosed){
if(this.saveUrl.length){
var _85a={};
_85a[this.saveArgName]=this.getHtml();
dojo.io.bind({method:this.saveMethod,url:this.saveUrl,content:_85a});
}else{
dojo.debug("please set a saveUrl for the editor");
}
if(this.closeOnSave){
this._richText.close(e.getName().toLowerCase()=="save");
}
}
},_close:function(e){
if(!this._richText.isClosed){
this._richText.close(e.getName().toLowerCase()=="save");
}
},onAction:function(cmd,_85d){
switch(cmd){
case "createlink":
if(!(_85d=prompt("Please enter the URL of the link:","http://"))){
return;
}
break;
case "insertimage":
if(!(_85d=prompt("Please enter the URL of the image:","http://"))){
return;
}
break;
}
this._richText.execCommand(cmd,_85d);
},fillInTemplate:function(args,frag){
},_fire:function(_860){
if(dojo.lang.isFunction(this[_860])){
var args=[];
if(arguments.length==1){
args.push(this);
}else{
for(var i=1;i<arguments.length;i++){
args.push(arguments[i]);
}
}
this[_860].apply(this,args);
}
},getHtml:function(){
this._richText.contentFilters=this._richText.contentFilters.concat(this.contentFilters);
return this._richText.getEditorContent();
},getEditorContent:function(){
return this.getHtml();
},onClose:function(save,hide){
this.disableToolbar(hide);
if(save){
this._fire("onSave");
}else{
this._fire("onCancel");
}
},onLoad:function(){
},onSave:function(){
},onCancel:function(){
}});
dojo.provide("dojo.string.Builder");
dojo.require("dojo.string");
dojo.string.Builder=function(str){
this.arrConcat=(dojo.render.html.capable&&dojo.render.html["ie"]);
var a=[];
var b=str||"";
var _868=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(s){
if(this.arrConcat){
a.push(s);
}else{
b+=s;
}
_868+=s.length;
this.length=_868;
return this;
};
this.clear=function(){
a=[];
b="";
_868=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);
_868=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);
_868=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("");
}
_868=this.length=b.length;
if(this.arrConcat){
a.push(b);
b="";
}
return this;
};
};
dojo.hostenv.conditionalLoadModule({common:["dojo.string","dojo.string.common","dojo.string.extras","dojo.string.Builder"]});
dojo.hostenv.moduleLoaded("dojo.string.*");
dojo.provide("dojo.flash");
dojo.require("dojo.string.*");
dojo.require("dojo.uri.*");
dojo.flash={flash6_version:null,flash8_version:null,ready:false,_visible:true,_loadedListeners:new Array(),_installingListeners:new Array(),setSwf:function(_872){
if(_872==null||dojo.lang.isUndefined(_872)){
return;
}
if(_872.flash6!=null&&!dojo.lang.isUndefined(_872.flash6)){
this.flash6_version=_872.flash6;
}
if(_872.flash8!=null&&!dojo.lang.isUndefined(_872.flash8)){
this.flash8_version=_872.flash8;
}
if(!dojo.lang.isUndefined(_872.visible)){
this._visible=_872.visible;
}
this._initialize();
},useFlash6:function(){
if(this.flash6_version==null){
return false;
}else{
if(this.flash6_version!=null&&dojo.flash.info.commVersion==6){
return true;
}else{
return false;
}
}
},useFlash8:function(){
if(this.flash8_version==null){
return false;
}else{
if(this.flash8_version!=null&&dojo.flash.info.commVersion==8){
return true;
}else{
return false;
}
}
},addLoadedListener:function(_873){
this._loadedListeners.push(_873);
},addInstallingListener:function(_874){
this._installingListeners.push(_874);
},loaded:function(){
dojo.flash.ready=true;
if(dojo.flash._loadedListeners.length>0){
for(var i=0;i<dojo.flash._loadedListeners.length;i++){
dojo.flash._loadedListeners[i].call(null);
}
}
},installing:function(){
if(dojo.flash._installingListeners.length>0){
for(var i=0;i<dojo.flash._installingListeners.length;i++){
dojo.flash._installingListeners[i].call(null);
}
}
},_initialize:function(){
var _877=new dojo.flash.Install();
dojo.flash.installer=_877;
if(_877.needed()==true){
_877.install();
}else{
dojo.flash.obj=new dojo.flash.Embed(this._visible);
dojo.flash.obj.write(dojo.flash.info.commVersion);
dojo.flash.comm=new dojo.flash.Communicator();
}
}};
dojo.flash.Info=function(){
if(dojo.render.html.ie){
document.writeln("<script language=\"VBScript\" type=\"text/vbscript\">");
document.writeln("Function VBGetSwfVer(i)");
document.writeln("  on error resume next");
document.writeln("  Dim swControl, swVersion");
document.writeln("  swVersion = 0");
document.writeln("  set swControl = CreateObject(\"ShockwaveFlash.ShockwaveFlash.\" + CStr(i))");
document.writeln("  if (IsObject(swControl)) then");
document.writeln("    swVersion = swControl.GetVariable(\"$version\")");
document.writeln("  end if");
document.writeln("  VBGetSwfVer = swVersion");
document.writeln("End Function");
document.writeln("</script>");
}
this._detectVersion();
this._detectCommunicationVersion();
};
dojo.flash.Info.prototype={version:-1,versionMajor:-1,versionMinor:-1,versionRevision:-1,capable:false,commVersion:6,installing:false,isVersionOrAbove:function(_878,_879,_87a){
_87a=parseFloat("."+_87a);
if(this.versionMajor>=_878&&this.versionMinor>=_879&&this.versionRevision>=_87a){
return true;
}else{
return false;
}
},_detectVersion:function(){
var _87b;
for(var _87c=25;_87c>0;_87c--){
if(dojo.render.html.ie){
_87b=VBGetSwfVer(_87c);
}else{
_87b=this._JSFlashInfo(_87c);
}
if(_87b==-1){
this.capable=false;
return;
}else{
if(_87b!=0){
var _87d;
if(dojo.render.html.ie){
var _87e=_87b.split(" ");
var _87f=_87e[1];
_87d=_87f.split(",");
}else{
_87d=_87b.split(".");
}
this.versionMajor=_87d[0];
this.versionMinor=_87d[1];
this.versionRevision=_87d[2];
versionString=this.versionMajor+"."+this.versionRevision;
this.version=parseFloat(versionString);
this.capable=true;
break;
}
}
}
},_JSFlashInfo:function(_880){
if(navigator.plugins!=null&&navigator.plugins.length>0){
if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){
var _881=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";
var _882=navigator.plugins["Shockwave Flash"+_881].description;
var _883=_882.split(" ");
var _884=_883[2].split(".");
var _885=_884[0];
var _886=_884[1];
if(_883[3]!=""){
tempArrayMinor=_883[3].split("r");
}else{
tempArrayMinor=_883[4].split("r");
}
var _887=tempArrayMinor[1]>0?tempArrayMinor[1]:0;
var _888=_885+"."+_886+"."+_887;
return _888;
}
}
return -1;
},_detectCommunicationVersion:function(){
if(this.capable==false){
this.commVersion=null;
return;
}
if(typeof djConfig["forceFlashComm"]!="undefined"&&typeof djConfig["forceFlashComm"]!=null){
this.commVersion=djConfig["forceFlashComm"];
return;
}
if(dojo.render.html.safari==true||dojo.render.html.opera==true){
this.commVersion=8;
}else{
this.commVersion=6;
}
}};
dojo.flash.Embed=function(_889){
this._visible=_889;
};
dojo.flash.Embed.prototype={width:215,height:138,id:"flashObject",_visible:true,write:function(_88a,_88b){
if(dojo.lang.isUndefined(_88b)){
_88b=false;
}
var _88c=new dojo.string.Builder();
_88c.append("width: "+this.width+"px; ");
_88c.append("height: "+this.height+"px; ");
if(this._visible==false){
_88c.append("position: absolute; ");
_88c.append("z-index: 10000; ");
_88c.append("top: -1000px; ");
_88c.append("left: -1000px; ");
}
_88c=_88c.toString();
var _88d;
var _88e;
if(_88a==6){
_88e=dojo.flash.flash6_version;
var _88f=djConfig.baseRelativePath;
_88e=_88e+"?baseRelativePath="+escape(_88f);
_88d="<embed id=\""+this.id+"\" src=\""+_88e+"\" "+"    quality=\"high\" bgcolor=\"#ffffff\" "+"    width=\""+this.width+"\" height=\""+this.height+"\" "+"    name=\""+this.id+"\" "+"    align=\"middle\" allowScriptAccess=\"sameDomain\" "+"    type=\"application/x-shockwave-flash\" swLiveConnect=\"true\" "+"    pluginspage=\"http://www.macromedia.com/go/getflashplayer\">";
}else{
_88e=dojo.flash.flash8_version;
var _890=_88e,swflocEmbed=_88e;
if(_88b){
var _891=escape(window.location);
document.title=document.title.slice(0,47)+" - Flash Player Installation";
var _892=escape(document.title);
_890+="?MMredirectURL="+_891+"&MMplayerType=ActiveX"+"&MMdoctitle="+_892;
swflocEmbed+="?MMredirectURL="+_891+"&MMplayerType=PlugIn";
}
_88d="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" "+"codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" "+"width=\""+this.width+"\" "+"height=\""+this.height+"\" "+"id=\""+this.id+"\" "+"align=\"middle\"> "+"<param name=\"allowScriptAccess\" value=\"sameDomain\" /> "+"<param name=\"movie\" value=\""+_890+"\" /> "+"<param name=\"quality\" value=\"high\" /> "+"<param name=\"bgcolor\" value=\"#ffffff\" /> "+"<embed src=\""+swflocEmbed+"\" "+"quality=\"high\" "+"bgcolor=\"#ffffff\" "+"width=\""+this.width+"\" "+"height=\""+this.height+"\" "+"id=\""+this.id+"\" "+"name=\""+this.id+"\" "+"swLiveConnect=\"true\" "+"align=\"middle\" "+"allowScriptAccess=\"sameDomain\" "+"type=\"application/x-shockwave-flash\" "+"pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />"+"</object>";
}
_88d="<div id=\""+this.id+"Container\" style=\""+_88c+"\"> "+_88d+"</div>";
document.writeln(_88d);
},get:function(){
return document.getElementById(this.id);
},setVisible:function(_893){
var _894=dojo.byId(this.id+"Container");
if(_893==true){
_894.style.visibility="visible";
}else{
_894.style.position="absolute";
_894.style.x="-1000px";
_894.style.y="-1000px";
_894.style.visibility="hidden";
}
},center:function(){
var _895=this.width;
var _896=this.height;
var _897=document.body.clientWidth;
var _898=document.body.clientHeight;
if(!dojo.render.html.ie&&document.compatMode=="CSS1Compat"){
_897=document.body.parentNode.clientWidth;
_898=document.body.parentNode.clientHeight;
}else{
if(dojo.render.html.ie&&document.compatMode=="CSS1Compat"){
_897=document.documentElement.clientWidth;
_898=document.documentElement.clientHeight;
}else{
if(dojo.render.html.safari){
_898=self.innerHeight;
}
}
}
var _899=window.scrollX;
var _89a=window.scrollY;
if(typeof _899=="undefined"){
if(document.compatMode=="CSS1Compat"){
_899=document.documentElement.scrollLeft;
_89a=document.documentElement.scrollTop;
}else{
_899=document.body.scrollLeft;
_89a=document.body.scrollTop;
}
}
var x=_899+(_897-_895)/2;
var y=_89a+(_898-_896)/2;
var _89d=dojo.byId(this.id+"Container");
_89d.style.top=y+"px";
_89d.style.left=x+"px";
}};
dojo.flash.Communicator=function(){
if(dojo.flash.useFlash6()){
this._writeFlash6();
}else{
if(dojo.flash.useFlash8()){
this._writeFlash8();
}
}
};
dojo.flash.Communicator.prototype={_writeFlash6:function(){
var id=dojo.flash.obj.id;
document.writeln("<script language=\"JavaScript\">");
document.writeln("  function "+id+"_DoFSCommand(command, args){ ");
document.writeln("    dojo.flash.comm._handleFSCommand(command, args); ");
document.writeln("}");
document.writeln("</script>");
if(dojo.render.html.ie){
document.writeln("<SCRIPT LANGUAGE=VBScript> ");
document.writeln("on error resume next ");
document.writeln("Sub "+id+"_FSCommand(ByVal command, ByVal args)");
document.writeln(" call "+id+"_DoFSCommand(command, args)");
document.writeln("end sub");
document.writeln("</SCRIPT> ");
}
},_writeFlash8:function(){
},_handleFSCommand:function(_89f,args){
if(_89f!=null&&!dojo.lang.isUndefined(_89f)&&/^FSCommand:(.*)/.test(_89f)==true){
_89f=_89f.match(/^FSCommand:(.*)/)[1];
}
if(_89f=="addCallback"){
this._fscommandAddCallback(_89f,args);
}else{
if(_89f=="call"){
this._fscommandCall(_89f,args);
}else{
if(_89f=="fscommandReady"){
this._fscommandReady();
}
}
}
},_fscommandAddCallback:function(_8a1,args){
var _8a3=args;
var _8a4=function(){
return dojo.flash.comm._call(_8a3,arguments);
};
dojo.flash.comm[_8a3]=_8a4;
dojo.flash.obj.get().SetVariable("_succeeded",true);
},_fscommandCall:function(_8a5,args){
var _8a7=dojo.flash.obj.get();
var _8a8=args;
var _8a9=parseInt(_8a7.GetVariable("_numArgs"));
var _8aa=new Array();
for(var i=0;i<_8a9;i++){
var _8ac=_8a7.GetVariable("_"+i);
_8aa.push(_8ac);
}
var _8ad;
if(_8a8.indexOf(".")==-1){
_8ad=window[_8a8];
}else{
_8ad=eval(_8a8);
}
var _8ae=null;
if(!dojo.lang.isUndefined(_8ad)&&_8ad!=null){
_8ae=_8ad.apply(null,_8aa);
}
_8a7.SetVariable("_returnResult",_8ae);
},_fscommandReady:function(){
var _8af=dojo.flash.obj.get();
_8af.SetVariable("fscommandReady","true");
},_call:function(_8b0,args){
var _8b2=dojo.flash.obj.get();
_8b2.SetVariable("_functionName",_8b0);
_8b2.SetVariable("_numArgs",args.length);
for(var i=0;i<args.length;i++){
var _8b4=args[i];
_8b4=_8b4.replace(/\0/g,"\\0");
_8b2.SetVariable("_"+i,_8b4);
}
_8b2.TCallLabel("/_flashRunner","execute");
var _8b5=_8b2.GetVariable("_returnResult");
_8b5=_8b5.replace(/\\0/g,"\x00");
return _8b5;
},_addExternalInterfaceCallback:function(_8b6){
var _8b7=function(){
var _8b8=new Array(arguments.length);
for(var i=0;i<arguments.length;i++){
_8b8[i]=arguments[i];
}
return dojo.flash.comm._execFlash(_8b6,_8b8);
};
dojo.flash.comm[_8b6]=_8b7;
},_encodeData:function(data){
var _8bb=/\&([^;]*)\;/g;
data=data.replace(_8bb,"&amp;$1;");
data=data.replace(/</g,"&lt;");
data=data.replace(/>/g,"&gt;");
data=data.replace("\\","&custom_backslash;&custom_backslash;");
data=data.replace(/\n/g,"\\n");
data=data.replace(/\r/g,"\\r");
data=data.replace(/\f/g,"\\f");
data=data.replace(/\0/g,"\\0");
data=data.replace(/\'/g,"\\'");
data=data.replace(/\"/g,"\\\"");
return data;
},_decodeData:function(data){
if(data==null||typeof data=="undefined"){
return data;
}
data=data.replace(/\&custom_lt\;/g,"<");
data=data.replace(/\&custom_gt\;/g,">");
data=eval("\""+data+"\"");
return data;
},_chunkArgumentData:function(_8bd,_8be){
var _8bf=dojo.flash.obj.get();
var _8c0=Math.ceil(_8bd.length/1024);
for(var i=0;i<_8c0;i++){
var _8c2=i*1024;
var _8c3=i*1024+1024;
if(i==(_8c0-1)){
_8c3=i*1024+_8bd.length;
}
var _8c4=_8bd.substring(_8c2,_8c3);
_8c4=this._encodeData(_8c4);
_8bf.CallFunction("<invoke name=\"chunkArgumentData\" "+"returntype=\"javascript\">"+"<arguments>"+"<string>"+_8c4+"</string>"+"<number>"+_8be+"</number>"+"</arguments>"+"</invoke>");
}
},_chunkReturnData:function(){
var _8c5=dojo.flash.obj.get();
var _8c6=_8c5.getReturnLength();
var _8c7=new Array();
for(var i=0;i<_8c6;i++){
var _8c9=_8c5.CallFunction("<invoke name=\"chunkReturnData\" "+"returntype=\"javascript\">"+"<arguments>"+"<number>"+i+"</number>"+"</arguments>"+"</invoke>");
if(_8c9=="\"\""||_8c9=="''"){
_8c9="";
}else{
_8c9=_8c9.substring(1,_8c9.length-1);
}
_8c7.push(_8c9);
}
var _8ca=_8c7.join("");
return _8ca;
},_execFlash:function(_8cb,_8cc){
var _8cd=dojo.flash.obj.get();
_8cd.startExec();
_8cd.setNumberArguments(_8cc.length);
for(var i=0;i<_8cc.length;i++){
this._chunkArgumentData(_8cc[i],i);
}
_8cd.exec(_8cb);
var _8cf=this._chunkReturnData();
_8cf=this._decodeData(_8cf);
_8cd.endExec();
return _8cf;
}};
dojo.flash.Install=function(){
};
dojo.flash.Install.prototype={needed:function(){
if(dojo.flash.info.capable==false){
return true;
}
if(dojo.render.os.mac==true&&!dojo.flash.info.isVersionOrAbove(8,0,0)){
return true;
}
if(!dojo.flash.info.isVersionOrAbove(6,0,0)){
return true;
}
return false;
},install:function(){
dojo.flash.info.installing=true;
dojo.flash.installing();
if(dojo.flash.info.capable==false){
var _8d0=new dojo.flash.Embed(false);
_8d0.write(8);
}else{
if(dojo.flash.info.isVersionOrAbove(6,0,65)){
var _8d0=new dojo.flash.Embed(false);
_8d0.write(8,true);
_8d0.setVisible(true);
_8d0.center();
}else{
alert("This content requires a more recent version of the Macromedia "+" Flash Player.");
window.location.href="http://www.macromedia.com/go/getflashplayer";
}
}
},_onInstallStatus:function(msg){
if(msg=="Download.Complete"){
dojo.flash._initialize();
}else{
if(msg=="Download.Cancelled"){
alert("This content requires a more recent version of the Macromedia "+" Flash Player.");
window.location.href="http://www.macromedia.com/go/getflashplayer";
}else{
if(msg=="Download.Failed"){
alert("There was an error downloading the Flash Player update. "+"Please try again later, or visit macromedia.com to download "+"the latest version of the Flash plugin.");
}
}
}
}};
dojo.flash.info=new dojo.flash.Info();
dojo.provide("dojo.lang.type");
dojo.require("dojo.lang.common");
dojo.lang.whatAmI=function(wh){
try{
if(dojo.lang.isArray(wh)){
return "array";
}
if(dojo.lang.isFunction(wh)){
return "function";
}
if(dojo.lang.isString(wh)){
return "string";
}
if(dojo.lang.isNumber(wh)){
return "number";
}
if(dojo.lang.isBoolean(wh)){
return "boolean";
}
if(dojo.lang.isAlien(wh)){
return "alien";
}
if(dojo.lang.isUndefined(wh)){
return "undefined";
}
for(var name in dojo.lang.whatAmI.custom){
if(dojo.lang.whatAmI.custom[name](wh)){
return name;
}
}
if(dojo.lang.isObject(wh)){
return "object";
}
}
catch(E){
}
return "unknown";
};
dojo.lang.whatAmI.custom={};
dojo.lang.isNumeric=function(wh){
return (!isNaN(wh)&&isFinite(wh)&&(wh!=null)&&!dojo.lang.isBoolean(wh)&&!dojo.lang.isArray(wh));
};
dojo.lang.isBuiltIn=function(wh){
return (dojo.lang.isArray(wh)||dojo.lang.isFunction(wh)||dojo.lang.isString(wh)||dojo.lang.isNumber(wh)||dojo.lang.isBoolean(wh)||(wh==null)||(wh instanceof Error)||(typeof wh=="error"));
};
dojo.lang.isPureObject=function(wh){
return ((wh!=null)&&dojo.lang.isObject(wh)&&wh.constructor==Object);
};
dojo.lang.isOfType=function(_8d7,type){
if(dojo.lang.isArray(type)){
var _8d9=type;
for(var i in _8d9){
var _8db=_8d9[i];
if(dojo.lang.isOfType(_8d7,_8db)){
return true;
}
}
return false;
}else{
if(dojo.lang.isString(type)){
type=type.toLowerCase();
}
switch(type){
case Array:
case "array":
return dojo.lang.isArray(_8d7);
break;
case Function:
case "function":
return dojo.lang.isFunction(_8d7);
break;
case String:
case "string":
return dojo.lang.isString(_8d7);
break;
case Number:
case "number":
return dojo.lang.isNumber(_8d7);
break;
case "numeric":
return dojo.lang.isNumeric(_8d7);
break;
case Boolean:
case "boolean":
return dojo.lang.isBoolean(_8d7);
break;
case Object:
case "object":
return dojo.lang.isObject(_8d7);
break;
case "pureobject":
return dojo.lang.isPureObject(_8d7);
break;
case "builtin":
return dojo.lang.isBuiltIn(_8d7);
break;
case "alien":
return dojo.lang.isAlien(_8d7);
break;
case "undefined":
return dojo.lang.isUndefined(_8d7);
break;
case null:
case "null":
return (_8d7===null);
break;
case "optional":
return ((_8d7===null)||dojo.lang.isUndefined(_8d7));
break;
default:
if(dojo.lang.isFunction(type)){
return (_8d7 instanceof type);
}else{
dojo.raise("dojo.lang.isOfType() was passed an invalid type");
}
break;
}
}
dojo.raise("If we get here, it means a bug was introduced above.");
};
dojo.lang.getObject=function(str){
var _8dd=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_8dd[i++]];
}while(i<_8dd.length&&obj);
return (obj!=dj_global)?obj:null;
};
dojo.lang.doesObjectExist=function(str){
var _8df=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_8df[i++]];
}while(i<_8df.length&&obj);
return (obj&&obj!=dj_global);
};
dojo.provide("dojo.lang.assert");
dojo.require("dojo.lang.common");
dojo.require("dojo.lang.array");
dojo.require("dojo.lang.type");
dojo.lang.assert=function(_8e0,_8e1){
if(!_8e0){
var _8e2="An assert statement failed.\n"+"The method dojo.lang.assert() was called with a 'false' value.\n";
if(_8e1){
_8e2+="Here's the assert message:\n"+_8e1+"\n";
}
throw new Error(_8e2);
}
};
dojo.lang.assertType=function(_8e3,type,_8e5){
if(!dojo.lang.isOfType(_8e3,type)){
if(!_8e5){
if(!dojo.lang.assertType._errorMessage){
dojo.lang.assertType._errorMessage="Type mismatch: dojo.lang.assertType() failed.";
}
_8e5=dojo.lang.assertType._errorMessage;
}
dojo.lang.assert(false,_8e5);
}
};
dojo.lang.assertValidKeywords=function(_8e6,_8e7,_8e8){
var key;
if(!_8e8){
if(!dojo.lang.assertValidKeywords._errorMessage){
dojo.lang.assertValidKeywords._errorMessage="In dojo.lang.assertValidKeywords(), found invalid keyword:";
}
_8e8=dojo.lang.assertValidKeywords._errorMessage;
}
if(dojo.lang.isArray(_8e7)){
for(key in _8e6){
if(!dojo.lang.inArray(_8e7,key)){
dojo.lang.assert(false,_8e8+" "+key);
}
}
}else{
for(key in _8e6){
if(!(key in _8e7)){
dojo.lang.assert(false,_8e8+" "+key);
}
}
}
};
dojo.provide("dojo.AdapterRegistry");
dojo.require("dojo.lang.func");
dojo.AdapterRegistry=function(){
this.pairs=[];
};
dojo.lang.extend(dojo.AdapterRegistry,{register:function(name,_8eb,wrap,_8ed){
if(_8ed){
this.pairs.unshift([name,_8eb,wrap]);
}else{
this.pairs.push([name,_8eb,wrap]);
}
},match:function(){
for(var i=0;i<this.pairs.length;i++){
var pair=this.pairs[i];
if(pair[1].apply(this,arguments)){
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.require("dojo.lang.common");
dojo.require("dojo.AdapterRegistry");
dojo.require("dojo.string.extras");
dojo.lang.reprRegistry=new dojo.AdapterRegistry();
dojo.lang.registerRepr=function(name,_8f4,wrap,_8f6){
dojo.lang.reprRegistry.register(name,_8f4,wrap,_8f6);
};
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 o.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){
}
};
dojo.lang.reprString=function(str){
dojo.deprecated("dojo.lang.reprNumber","use `String(num)` instead","0.4");
return dojo.string.escapeString(str);
};
dojo.lang.reprNumber=function(num){
dojo.deprecated("dojo.lang.reprNumber","use `String(num)` instead","0.4");
return num+"";
};
(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.hostenv.conditionalLoadModule({common:["dojo.lang","dojo.lang.common","dojo.lang.assert","dojo.lang.array","dojo.lang.type","dojo.lang.func","dojo.lang.extras","dojo.lang.repr"]});
dojo.hostenv.moduleLoaded("dojo.lang.*");
dojo.provide("dojo.storage");
dojo.provide("dojo.storage.StorageProvider");
dojo.require("dojo.lang.*");
dojo.require("dojo.event.*");
dojo.storage=function(){
};
dojo.lang.extend(dojo.storage,{SUCCESS:"success",FAILED:"failed",PENDING:"pending",SIZE_NOT_AVAILABLE:"Size not available",SIZE_NO_LIMIT:"No size limit",namespace:"dojoStorage",onHideSettingsUI:null,initialize:function(){
dojo.unimplemented("dojo.storage.initialize");
},isAvailable:function(){
dojo.unimplemented("dojo.storage.isAvailable");
},put:function(key,_8ff,_900){
dojo.unimplemented("dojo.storage.put");
},get:function(key){
dojo.unimplemented("dojo.storage.get");
},hasKey:function(key){
if(this.get(key)!=null){
return true;
}else{
return false;
}
},getKeys:function(){
dojo.unimplemented("dojo.storage.getKeys");
},clear:function(){
dojo.unimplemented("dojo.storage.clear");
},remove:function(key){
dojo.unimplemented("dojo.storage.remove");
},isPermanent:function(){
dojo.unimplemented("dojo.storage.isPermanent");
},getMaximumSize:function(){
dojo.unimplemented("dojo.storage.getMaximumSize");
},hasSettingsUI:function(){
return false;
},showSettingsUI:function(){
dojo.unimplemented("dojo.storage.showSettingsUI");
},hideSettingsUI:function(){
dojo.unimplemented("dojo.storage.hideSettingsUI");
},getType:function(){
dojo.unimplemented("dojo.storage.getType");
},isValidKey:function(_904){
if(_904==null||typeof _904=="undefined"){
return false;
}
return /^[0-9A-Za-z_]*$/.test(_904);
}});
dojo.storage.manager=new function(){
this.currentProvider=null;
this.available=false;
this.initialized=false;
this.providers=new Array();
this.namespace="dojo.storage";
this.initialize=function(){
this.autodetect();
};
this.register=function(name,_906){
this.providers[this.providers.length]=_906;
this.providers[name]=_906;
};
this.setProvider=function(_907){
};
this.autodetect=function(){
if(this.initialized==true){
return;
}
var _908=null;
for(var i=0;i<this.providers.length;i++){
_908=this.providers[i];
if(_908.isAvailable()){
break;
}
}
if(_908==null){
this.initialized=true;
this.available=false;
this.currentProvider=null;
dojo.raise("No storage provider found for this platform");
}
this.currentProvider=_908;
for(var i in _908){
dojo.storage[i]=_908[i];
}
dojo.storage.manager=this;
dojo.storage.initialize();
this.initialized=true;
this.available=true;
};
this.isAvailable=function(){
return this.available;
};
this.isInitialized=function(){
if(dojo.flash.ready==false){
return false;
}else{
return this.initialized;
}
};
this.supportsProvider=function(_90a){
try{
var _90b=eval("new "+_90a+"()");
var _90c=_90b.isAvailable();
if(_90c==null||typeof _90c=="undefined"){
return false;
}
return _90c;
}
catch(exception){
dojo.debug("exception="+exception);
return false;
}
};
this.getProvider=function(){
return this.currentProvider;
};
this.loaded=function(){
};
};
dojo.provide("dojo.json");
dojo.require("dojo.lang.func");
dojo.require("dojo.string.extras");
dojo.require("dojo.AdapterRegistry");
dojo.json={jsonRegistry:new dojo.AdapterRegistry(),register:function(name,_90e,wrap,_910){
dojo.json.jsonRegistry.register(name,_90e,wrap,_910);
},evalJson:function(json){
try{
return eval("("+json+")");
}
catch(e){
dojo.debug(e);
return json;
}
},evalJSON:function(json){
dojo.deprecated("dojo.json.evalJSON","use dojo.json.evalJson","0.4");
return this.evalJson(json);
},serialize:function(o){
var _914=typeof (o);
if(_914=="undefined"){
return "undefined";
}else{
if((_914=="number")||(_914=="boolean")){
return o+"";
}else{
if(o===null){
return "null";
}
}
}
if(_914=="string"){
return dojo.string.escapeString(o);
}
var me=arguments.callee;
var _916;
if(typeof (o.__json__)=="function"){
_916=o.__json__();
if(o!==_916){
return me(_916);
}
}
if(typeof (o.json)=="function"){
_916=o.json();
if(o!==_916){
return me(_916);
}
}
if(_914!="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;
_916=dojo.json.jsonRegistry.match(o);
return me(_916);
}
catch(e){
}
if(_914=="function"){
return null;
}
res=[];
for(var k in o){
var _91b;
if(typeof (k)=="number"){
_91b="\""+k+"\"";
}else{
if(typeof (k)=="string"){
_91b=dojo.string.escapeString(k);
}else{
continue;
}
}
val=me(o[k]);
if(typeof (val)!="string"){
continue;
}
res.push(_91b+":"+val);
}
return "{"+res.join(",")+"}";
}};
dojo.provide("dojo.storage.browser");
dojo.provide("dojo.storage.browser.FlashStorageProvider");
dojo.require("dojo.storage");
dojo.require("dojo.flash");
dojo.require("dojo.json");
dojo.require("dojo.uri.*");
dojo.storage.browser.FlashStorageProvider=function(){
};
dojo.inherits(dojo.storage.browser.FlashStorageProvider,dojo.storage);
dojo.lang.extend(dojo.storage.browser.FlashStorageProvider,{namespace:"default",initialized:false,_available:null,_statusHandler:null,initialize:function(){
var _91c=function(){
dojo.storage._flashLoaded();
};
dojo.flash.addLoadedListener(_91c);
var _91d=dojo.uri.dojoUri("Storage_version6.swf").toString();
var _91e=dojo.uri.dojoUri("Storage_version8.swf").toString();
dojo.flash.setSwf({flash6:_91d,flash8:_91e,visible:false});
},isAvailable:function(){
if(djConfig["disableFlashStorage"]==true){
this._available=false;
}
return this._available;
},setNamespace:function(_91f){
this.namespace=_91f;
},put:function(key,_921,_922){
if(this.isValidKey(key)==false){
dojo.raise("Invalid key given: "+key);
}
this._statusHandler=_922;
if(dojo.lang.isString(_921)){
_921="string:"+_921;
}else{
_921=dojo.json.serialize(_921);
}
dojo.flash.comm.put(key,_921,this.namespace);
},get:function(key){
if(this.isValidKey(key)==false){
dojo.raise("Invalid key given: "+key);
}
var _924=dojo.flash.comm.get(key,this.namespace);
if(_924==""){
return null;
}
if(!dojo.lang.isUndefined(_924)&&_924!=null&&/^string:/.test(_924)){
_924=_924.substring("string:".length);
}else{
_924=dojo.json.evalJson(_924);
}
return _924;
},getKeys:function(){
var _925=dojo.flash.comm.getKeys(this.namespace);
if(_925==""){
return new Array();
}
_925=_925.split(",");
return _925;
},clear:function(){
dojo.flash.comm.clear(this.namespace);
},remove:function(key){
},isPermanent:function(){
return true;
},getMaximumSize:function(){
return dojo.storage.SIZE_NO_LIMIT;
},hasSettingsUI:function(){
return true;
},showSettingsUI:function(){
dojo.flash.comm.showSettings();
dojo.flash.obj.setVisible(true);
dojo.flash.obj.center();
},hideSettingsUI:function(){
dojo.flash.obj.setVisible(false);
if(dojo.storage.onHideSettingsUI!=null&&!dojo.lang.isUndefined(dojo.storage.onHideSettingsUI)){
dojo.storage.onHideSettingsUI.call(null);
}
},getType:function(){
return "dojo.storage.FlashStorageProvider";
},_flashLoaded:function(){
this.initialized=true;
dojo.storage.manager.loaded();
},_onStatus:function(_927,key){
if(_927==dojo.storage.PENDING){
dojo.flash.obj.center();
dojo.flash.obj.setVisible(true);
}else{
dojo.flash.obj.setVisible(false);
}
if(!dojo.lang.isUndefined(dojo.storage._statusHandler)&&dojo.storage._statusHandler!=null){
dojo.storage._statusHandler.call(null,_927,key);
}
}});
dojo.storage.manager.register("dojo.storage.browser.FlashStorageProvider",new dojo.storage.browser.FlashStorageProvider());
dojo.storage.manager.initialize();
dojo.hostenv.conditionalLoadModule({common:["dojo.storage"],browser:["dojo.storage.browser"],dashboard:["dojo.storage.dashboard"]});
dojo.hostenv.moduleLoaded("dojo.storage.*");

