/*
	Copyright (c) 2004-2006, The TurboAjax Group
	All Rights Reserved.

	TurboWidgets are free free to use for noncommercial web pages and 
	applications. A commercial license is required to use TurboWidgets 
	in a commercial web page or application. The TurboWidgest commercial 
	license is per developer and requires no royalty fees.

	http://turboajax.com/turbowidgets/license.html
*/

/*
	This compiled TurboWidgets file contains a build of the Dojo Toolkit.
*/

/*
	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={};
}
var dojo;
if(dj_undef("dojo")){
dojo={};
}
dojo.version={major:0,minor:2,patch:2,flag:"+",revision:Number("$Rev: 2889 $".match(/[0-9]+/)[0]),toString:function(){
with(dojo.version){
return major+"."+minor+"."+patch+flag+" ("+revision+")";
}
}};
dojo.evalObjPath=function(_3,_4){
if(typeof _3!="string"){
return dj_global;
}
if(_3.indexOf(".")==-1){
if((dj_undef(_3,dj_global))&&(_4)){
dj_global[_3]={};
}
return dj_global[_3];
}
var _5=_3.split(/\./);
var _6=dj_global;
for(var i=0;i<_5.length;++i){
if(!_4){
_6=_6[_5[i]];
if((typeof _6=="undefined")||(!_6)){
return _6;
}
}else{
if(dj_undef(_5[i],_6)){
_6[_5[i]]={};
}
_6=_6[_5[i]];
}
}
return _6;
};
dojo.errorToString=function(_8){
return ((!dj_undef("message",_8))?_8.message:(dj_undef("description",_8)?_8:_8.description));
};
dojo.raise=function(_9,_a){
if(_a){
_9=_9+": "+dojo.errorToString(_a);
}
var he=dojo.hostenv;
if((!dj_undef("hostenv",dojo))&&(!dj_undef("println",dojo.hostenv))){
dojo.hostenv.println("FATAL: "+_9);
}
throw Error(_9);
};
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 _e=arguments;
if(dj_undef("println",dojo.hostenv)){
dojo.raise("dojo.debug not available (yet?)");
}
var _f=dj_global["jum"]&&!dj_global["jum"].isBrowser;
var s=[(_f?"":"DEBUG: ")];
for(var i=0;i<_e.length;++i){
if(!false&&_e[i] instanceof Error){
var msg="["+_e[i].name+": "+dojo.errorToString(_e[i])+(_e[i].fileName?", file: "+_e[i].fileName:"")+(_e[i].lineNumber?", line: "+_e[i].lineNumber:"")+"]";
}else{
try{
var msg=String(_e[i]);
}
catch(e){
if(dojo.render.html.ie){
var msg="[ActiveXObject]";
}else{
var msg="[unknown]";
}
}
}
s.push(msg);
}
if(_f){
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 _14=[];
for(var _15 in obj){
try{
_14.push(_15+": "+obj[_15]);
}
catch(E){
_14.push(_15+": ERROR - "+E.message);
}
}
_14.sort();
for(var i=0;i<_14.length;i++){
dojo.debug(_14[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(_18,_19){
var _1a="'"+_18+"' not implemented";
if((!dj_undef(_19))&&(_19)){
_1a+=" "+_19;
}
dojo.raise(_1a);
};
dj_deprecated=dojo.deprecated=function(_1b,_1c,_1d){
var _1e="DEPRECATED: "+_1b;
if(_1c){
_1e+=" "+_1c;
}
if(_1d){
_1e+=" -- will be removed in version: "+_1d;
}
dojo.debug(_1e);
};
dojo.inherits=function(_1f,_20){
if(typeof _20!="function"){
dojo.raise("superclass: "+_20+" borken");
}
_1f.prototype=new _20();
_1f.prototype.constructor=_1f;
_1f.superclass=_20.prototype;
_1f["super"]=_20.prototype;
};
dj_inherits=function(_21,_22){
dojo.deprecated("dj_inherits deprecated, use dojo.inherits instead");
dojo.inherits(_21,_22);
};
dojo.render=(function(){
function vscaffold(_23,_24){
var tmp={capable:false,support:{builtin:false,plugin:false},prefixes:_23};
for(var x in _24){
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 _27={isDebug:false,allowQueryConfig:false,baseScriptUri:"",baseRelativePath:"",libraryScriptUri:"",iePreventClobber:false,ieClobberMinimal:true,preventBackButtonFix:true,searchIds:[],parseWidgets:true};
if(typeof djConfig=="undefined"){
djConfig=_27;
}else{
for(var _28 in _27){
if(typeof djConfig[_28]=="undefined"){
djConfig[_28]=_27[_28];
}
}
}
var djc=djConfig;
function _def(obj,_2b,def){
return (dj_undef(_2b,obj)?def:obj[_2b]);
}
return {name_:"(unset)",version_:"(unset)",pkgFileName:"__package__",loading_modules_:{},loaded_modules_:{},addedToLoadingCount:[],removedFromLoadingCount:[],inFlightCount:0,modulePrefixes_:{dojo:{name:"dojo",value:"src"}},setModulePrefix:function(_2d,_2e){
this.modulePrefixes_[_2d]={name:_2d,value:_2e};
},getModulePrefix:function(_2f){
var mp=this.modulePrefixes_;
if((mp[_2f])&&(mp[_2f]["name"])){
return mp[_2f].value;
}
return _2f;
},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 _33=uri.lastIndexOf("/");
djConfig.baseScriptUri=djConfig.baseRelativePath;
return djConfig.baseScriptUri;
};
dojo.hostenv.setBaseScriptUri=function(uri){
djConfig.baseScriptUri=uri;
};
dojo.hostenv.loadPath=function(_35,_36,cb){
if((_35.charAt(0)=="/")||(_35.match(/^\w+:/))){
dojo.raise("relpath '"+_35+"'; must be relative");
}
var uri=this.getBaseScriptUri()+_35;
if(djConfig.cacheBust&&dojo.render.html.capable){
uri+="?"+String(djConfig.cacheBust).replace(/\W+/g,"");
}
try{
return ((!_36)?this.loadUri(uri,cb):this.loadUriAndCheck(uri,_36,cb));
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.hostenv.loadUri=function(uri,cb){
if(this.loadedUris[uri]){
return;
}
var _3b=this.getText(uri,null,true);
if(_3b==null){
return 0;
}
this.loadedUris[uri]=true;
var _3c=dj_eval(_3b);
return 1;
};
dojo.hostenv.loadUriAndCheck=function(uri,_3e,cb){
var ok=true;
try{
ok=this.loadUri(uri,cb);
}
catch(e){
dojo.debug("failed loading ",uri," with error: ",e);
}
return ((ok)&&(this.findModule(_3e,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,_44){
if(arguments.length==1){
dojo.hostenv.modulesLoadedListeners.push(obj);
}else{
if(arguments.length>1){
dojo.hostenv.modulesLoadedListeners.push(function(){
obj[_44]();
});
}
}
};
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(_45){
var _46=dojo.evalObjPath((_45.split(".").slice(0,-1)).join("."));
this.loaded_modules_[(new String(_45)).toLowerCase()]=_46;
};
dojo.hostenv._global_omit_module_check=false;
dojo.hostenv.loadModule=function(_47,_48,_49){
if(!_47){
return;
}
_49=this._global_omit_module_check||_49;
var _4a=this.findModule(_47,false);
if(_4a){
return _4a;
}
if(dj_undef(_47,this.loading_modules_)){
this.addedToLoadingCount.push(_47);
}
this.loading_modules_[_47]=1;
var _4b=_47.replace(/\./g,"/")+".js";
var _4c=_47.split(".");
var _4d=_47.split(".");
for(var i=_4c.length-1;i>0;i--){
var _4f=_4c.slice(0,i).join(".");
var _50=this.getModulePrefix(_4f);
if(_50!=_4f){
_4c.splice(0,i,_50);
break;
}
}
var _51=_4c[_4c.length-1];
if(_51=="*"){
_47=(_4d.slice(0,-1)).join(".");
while(_4c.length){
_4c.pop();
_4c.push(this.pkgFileName);
_4b=_4c.join("/")+".js";
if(_4b.charAt(0)=="/"){
_4b=_4b.slice(1);
}
ok=this.loadPath(_4b,((!_49)?_47:null));
if(ok){
break;
}
_4c.pop();
}
}else{
_4b=_4c.join("/")+".js";
_47=_4d.join(".");
var ok=this.loadPath(_4b,((!_49)?_47:null));
if((!ok)&&(!_48)){
_4c.pop();
while(_4c.length){
_4b=_4c.join("/")+".js";
ok=this.loadPath(_4b,((!_49)?_47:null));
if(ok){
break;
}
_4c.pop();
_4b=_4c.join("/")+"/"+this.pkgFileName+".js";
if(_4b.charAt(0)=="/"){
_4b=_4b.slice(1);
}
ok=this.loadPath(_4b,((!_49)?_47:null));
if(ok){
break;
}
}
}
if((!ok)&&(!_49)){
dojo.raise("Could not load '"+_47+"'; last tried '"+_4b+"'");
}
}
if(!_49){
_4a=this.findModule(_47,false);
if(!_4a){
dojo.raise("symbol '"+_47+"' is not defined after loading '"+_4b+"'");
}
}
return _4a;
};
dojo.hostenv.startPackage=function(_53){
var _54=_53.split(/\./);
if(_54[_54.length-1]=="*"){
_54.pop();
}
return dojo.evalObjPath(_54.join("."),true);
};
dojo.hostenv.findModule=function(_55,_56){
var lmn=(new String(_55)).toLowerCase();
if(this.loaded_modules_[lmn]){
return this.loaded_modules_[lmn];
}
var _58=dojo.evalObjPath(_55);
if((_55)&&(typeof _58!="undefined")&&(_58)){
this.loaded_modules_[lmn]=_58;
return _58;
}
if(_56){
dojo.raise("no loaded module named '"+_55+"'");
}
return null;
};
if(typeof window=="undefined"){
dojo.raise("no window object");
}
(function(){
if(djConfig.allowQueryConfig){
var _59=document.location.toString();
var _5a=_59.split("?",2);
if(_5a.length>1){
var _5b=_5a[1];
var _5c=_5b.split("&");
for(var x in _5c){
var sp=_5c[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 _60=document.getElementsByTagName("script");
var _61=/(__package__|turbo|bootstrap1)\.js([\?\.]|$)/i;
for(var i=0;i<_60.length;i++){
var src=_60[i].getAttribute("src");
if(!src){
continue;
}
var m=src.match(_61);
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 _6c=dua.indexOf("Gecko");
drh.mozilla=drh.moz=(_6c>=0)&&(!drh.khtml);
if(drh.mozilla){
drh.geckoVersion=dua.substring(_6c+6,_6c+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 _6d=navigator.mimeTypes["image/svg+xml"]||navigator.mimeTypes["image/svg"]||navigator.mimeTypes["image/svg-xml"];
if(_6d){
drs.adobe=_6d&&_6d.enabledPlugin&&_6d.enabledPlugin.description&&(_6d.enabledPlugin.description.indexOf("Adobe")>-1);
if(drs.adobe){
drs.capable=t;
drs.support.plugin=t;
}
}
}else{
if(drh.ie&&dr.os.win){
var _6d=f;
try{
var _6e=new ActiveXObject("Adobe.SVGCtl");
_6d=t;
}
catch(e){
}
if(_6d){
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.hostenv.name_="browser";
dojo.hostenv.searchIds=[];
var DJ_XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
dojo.hostenv.getXmlhttpObject=function(){
var _6f=null;
var _70=null;
try{
_6f=new XMLHttpRequest();
}
catch(e){
}
if(!_6f){
for(var i=0;i<3;++i){
var _72=DJ_XMLHTTP_PROGIDS[i];
try{
_6f=new ActiveXObject(_72);
}
catch(e){
_70=e;
}
if(_6f){
DJ_XMLHTTP_PROGIDS=[_72];
break;
}
}
}
if(!_6f){
return dojo.raise("XMLHTTP not available",_70);
}
return _6f;
};
dojo.hostenv.getText=function(uri,_74,_75){
var _76=this.getXmlhttpObject();
if(_74){
_76.onreadystatechange=function(){
if((4==_76.readyState)&&(_76["status"])){
if(_76.status==200){
_74(_76.responseText);
}
}
};
}
_76.open("GET",uri,_74?true:false);
try{
_76.send(null);
}
catch(e){
if(_75&&!_74){
return null;
}else{
throw e;
}
}
if(_74){
return null;
}
return _76.responseText;
};
dojo.hostenv.defaultDebugContainerId="dojoDebug";
dojo.hostenv._println_buffer=[];
dojo.hostenv._println_safe=false;
dojo.hostenv.println=function(_77){
if(!dojo.hostenv._println_safe){
dojo.hostenv._println_buffer.push(_77);
}else{
try{
var _78=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId);
if(!_78){
_78=document.getElementsByTagName("body")[0]||document.body;
}
var div=document.createElement("div");
div.appendChild(document.createTextNode(_77));
_78.appendChild(div);
}
catch(e){
try{
document.write("<div>"+_77+"</div>");
}
catch(e2){
window.status=_77;
}
}
}
};
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(_7a,_7b,fp,_7d){
var _7e=_7a["on"+_7b]||function(){
};
_7a["on"+_7b]=function(){
fp.apply(_7a,arguments);
_7e.apply(_7a,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 _7f=[];
if(djConfig.searchIds&&djConfig.searchIds.length>0){
_7f=_7f.concat(djConfig.searchIds);
}
if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){
_7f=_7f.concat(dojo.hostenv.searchIds);
}
if((djConfig.parseWidgets)||(_7f.length>0)){
if(dojo.evalObjPath("dojo.widget.Parse")){
try{
var _80=new dojo.xml.Parse();
if(_7f.length>0){
for(var x=0;x<_7f.length;x++){
var _82=document.getElementById(_7f[x]);
if(!_82){
continue;
}
var _83=_80.parseElement(_82,null,true);
dojo.widget.getParser().createComponents(_83);
}
}else{
if(djConfig.parseWidgets){
var _83=_80.parseElement(document.getElementsByTagName("body")[0]||document.body,null,true);
dojo.widget.getParser().createComponents(_83);
}
}
}
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.write("<style>v:*{ behavior:url(#default#VML); }</style>");
document.write("<xml:namespace ns=\"urn:schemas-microsoft-com:vml\" prefix=\"v\"/>");
}
}
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(_89){
var _8a=_89["common"]||[];
var _8b=(_89[dojo.hostenv.name_])?_8a.concat(_89[dojo.hostenv.name_]||[]):_8a.concat(_89["default"]||[]);
for(var x=0;x<_8b.length;x++){
var _8d=_8b[x];
if(_8d.constructor==Array){
dojo.hostenv.loadModule.apply(dojo.hostenv,_8d);
}else{
dojo.hostenv.loadModule(_8d);
}
}
};
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")||(dojo.render[arguments[0]].capable)){
var _8e=[];
for(var i=1;i<arguments.length;i++){
_8e.push(arguments[i]);
}
dojo.require.apply(dojo,_8e);
}
};
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(_91,_92){
return dojo.hostenv.setModulePrefix(_91,_92);
};
dojo.profile={start:function(){
},end:function(){
},stop:function(){
},dump:function(){
}};
dojo.exists=function(obj,_94){
var p=_94.split(".");
for(var i=0;i<p.length;i++){
if(!(obj[p[i]])){
return false;
}
obj=obj[p[i]];
}
return true;
};
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,_9d,_9e){
var out="";
for(var i=0;i<_9d;i++){
out+=str;
if(_9e&&i<_9d-1){
out+=_9e;
}
}
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.lang.common");
dojo.require("dojo.lang");
dojo.lang.mixin=function(obj,_ad){
var _ae={};
for(var x in _ad){
if(typeof _ae[x]=="undefined"||_ae[x]!=_ad[x]){
obj[x]=_ad[x];
}
}
if(dojo.render.html.ie&&dojo.lang.isFunction(_ad["toString"])&&_ad["toString"]!=obj["toString"]){
obj.toString=_ad.toString;
}
return obj;
};
dojo.lang.extend=function(_b0,_b1){
this.mixin(_b0.prototype,_b1);
};
dojo.lang.find=function(arr,val,_b4,_b5){
if(!dojo.lang.isArrayLike(arr)&&dojo.lang.isArrayLike(val)){
var a=arr;
arr=val;
val=a;
}
var _b7=dojo.lang.isString(arr);
if(_b7){
arr=arr.split("");
}
if(_b5){
var _b8=-1;
var i=arr.length-1;
var end=-1;
}else{
var _b8=1;
var i=0;
var end=arr.length;
}
if(_b4){
while(i!=end){
if(arr[i]===val){
return i;
}
i+=_b8;
}
}else{
while(i!=end){
if(arr[i]==val){
return i;
}
i+=_b8;
}
}
return -1;
};
dojo.lang.indexOf=dojo.lang.find;
dojo.lang.findLast=function(arr,val,_bd){
return dojo.lang.find(arr,val,_bd,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.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 _ca in dojo.lang.whatAmI.custom){
if(dojo.lang.whatAmI.custom[_ca](wh)){
return _ca;
}
}
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(_ce,_cf){
if(dojo.lang.isArray(_cf)){
var _d0=_cf;
for(var i in _d0){
var _d2=_d0[i];
if(dojo.lang.isOfType(_ce,_d2)){
return true;
}
}
return false;
}else{
if(dojo.lang.isString(_cf)){
_cf=_cf.toLowerCase();
}
switch(_cf){
case Array:
case "array":
return dojo.lang.isArray(_ce);
break;
case Function:
case "function":
return dojo.lang.isFunction(_ce);
break;
case String:
case "string":
return dojo.lang.isString(_ce);
break;
case Number:
case "number":
return dojo.lang.isNumber(_ce);
break;
case "numeric":
return dojo.lang.isNumeric(_ce);
break;
case Boolean:
case "boolean":
return dojo.lang.isBoolean(_ce);
break;
case Object:
case "object":
return dojo.lang.isObject(_ce);
break;
case "pureobject":
return dojo.lang.isPureObject(_ce);
break;
case "builtin":
return dojo.lang.isBuiltIn(_ce);
break;
case "alien":
return dojo.lang.isAlien(_ce);
break;
case "undefined":
return dojo.lang.isUndefined(_ce);
break;
case null:
case "null":
return (_ce===null);
break;
case "optional":
return ((_ce===null)||dojo.lang.isUndefined(_ce));
break;
default:
if(dojo.lang.isFunction(_cf)){
return (_ce instanceof _cf);
}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.provide("dojo.lang.extras");
dojo.require("dojo.lang.common");
dojo.require("dojo.lang.type");
dojo.lang.setTimeout=function(_d3,_d4){
var _d5=window,argsStart=2;
if(!dojo.lang.isFunction(_d3)){
_d5=_d3;
_d3=_d4;
_d4=arguments[2];
argsStart++;
}
if(dojo.lang.isString(_d3)){
_d3=_d5[_d3];
}
var _d6=[];
for(var i=argsStart;i<arguments.length;i++){
_d6.push(arguments[i]);
}
return setTimeout(function(){
_d3.apply(_d5,_d6);
},_d4);
};
dojo.lang.getNameInObj=function(ns,_d9){
if(!ns){
ns=dj_global;
}
for(var x in ns){
if(ns[x]===_d9){
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.provide("dojo.io.IO");
dojo.require("dojo.string");
dojo.require("dojo.lang.extras");
dojo.io.transports=[];
dojo.io.hdlrFuncNames=["load","error"];
dojo.io.Request=function(url,_df,_e0,_e1){
if((arguments.length==1)&&(arguments[0].constructor==Object)){
this.fromKwArgs(arguments[0]);
}else{
this.url=url;
if(_df){
this.mimetype=_df;
}
if(_e0){
this.transport=_e0;
}
if(arguments.length>=4){
this.changeUrl=_e1;
}
}
};
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(_e2,_e3,evt){
},error:function(_e5,_e6){
},handle:function(){
},abort:function(){
},fromKwArgs:function(_e7){
if(_e7["url"]){
_e7.url=_e7.url.toString();
}
if(_e7["formNode"]){
_e7.formNode=dojo.byId(_e7.formNode);
}
if(!_e7["method"]&&_e7["formNode"]&&_e7["formNode"].method){
_e7.method=_e7["formNode"].method;
}
if(!_e7["handle"]&&_e7["handler"]){
_e7.handle=_e7.handler;
}
if(!_e7["load"]&&_e7["loaded"]){
_e7.load=_e7.loaded;
}
if(!_e7["changeUrl"]&&_e7["changeURL"]){
_e7.changeUrl=_e7.changeURL;
}
_e7.encoding=dojo.lang.firstValued(_e7["encoding"],djConfig["bindEncoding"],"");
_e7.sendTransport=dojo.lang.firstValued(_e7["sendTransport"],djConfig["ioSendTransport"],false);
var _e8=dojo.lang.isFunction;
for(var x=0;x<dojo.io.hdlrFuncNames.length;x++){
var fn=dojo.io.hdlrFuncNames[x];
if(_e8(_e7[fn])){
continue;
}
if(_e8(_e7["handle"])){
_e7[fn]=_e7.handle;
}
}
dojo.lang.mixin(this,_e7);
}});
dojo.io.Error=function(msg,_ec,num){
this.message=msg;
this.type=_ec||"unknown";
this.number=num||0;
};
dojo.io.transports.addTransport=function(_ee){
this.push(_ee);
this[_ee]=dojo.io[_ee];
};
dojo.io.bind=function(_ef){
if(!(_ef instanceof dojo.io.Request)){
try{
_ef=new dojo.io.Request(_ef);
}
catch(e){
dojo.debug(e);
}
}
var _f0="";
if(_ef["transport"]){
_f0=_ef["transport"];
if(!this[_f0]){
return _ef;
}
}else{
for(var x=0;x<dojo.io.transports.length;x++){
var tmp=dojo.io.transports[x];
if((this[tmp])&&(this[tmp].canHandle(_ef))){
_f0=tmp;
}
}
if(_f0==""){
return _ef;
}
}
this[_f0].bind(_ef);
_ef.bindSuccess=true;
return _ef;
};
dojo.io.queueBind=function(_f3){
if(!(_f3 instanceof dojo.io.Request)){
try{
_f3=new dojo.io.Request(_f3);
}
catch(e){
dojo.debug(e);
}
}
var _f4=_f3.load;
_f3.load=function(){
dojo.io._queueBindInFlight=false;
var ret=_f4.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
var _f6=_f3.error;
_f3.error=function(){
dojo.io._queueBindInFlight=false;
var ret=_f6.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
dojo.io._bindQueue.push(_f3);
dojo.io._dispatchNextQueueBind();
return _f3;
};
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,_f9){
var _fa=new Object();
var _fb="";
var enc=/utf/i.test(_f9||"")?encodeURIComponent:dojo.string.encodeAscii;
for(var x in map){
if(!_fa[x]){
_fb+=enc(x)+"="+enc(map[x])+"&";
}
}
return _fb;
};
dojo.provide("dojo.lang.array");
dojo.require("dojo.lang.common");
dojo.lang.has=function(obj,_ff){
return (typeof obj[_ff]!=="undefined");
};
dojo.lang.isEmpty=function(obj){
if(dojo.lang.isObject(obj)){
var tmp={};
var _102=0;
for(var x in obj){
if(obj[x]&&(!tmp[x])){
_102++;
break;
}
}
return (_102==0);
}else{
if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){
return obj.length==0;
}
}
};
dojo.lang.forEach=function(arr,_105,_106){
var _107=dojo.lang.isString(arr);
if(_107){
arr=arr.split("");
}
var il=arr.length;
for(var i=0;i<((_106)?il:arr.length);i++){
if(_105(arr[i],i,arr)=="break"){
break;
}
}
};
dojo.lang.map=function(arr,obj,_10c){
var _10d=dojo.lang.isString(arr);
if(_10d){
arr=arr.split("");
}
if(dojo.lang.isFunction(obj)&&(!_10c)){
_10c=obj;
obj=dj_global;
}else{
if(dojo.lang.isFunction(obj)&&_10c){
var _10e=obj;
obj=_10c;
_10c=_10e;
}
}
if(Array.map){
var _10f=Array.map(arr,_10c,obj);
}else{
var _10f=[];
for(var i=0;i<arr.length;++i){
_10f.push(_10c.call(obj,arr[i]));
}
}
if(_10d){
return _10f.join("");
}else{
return _10f;
}
};
dojo.lang.every=function(arr,_112,_113){
var _114=dojo.lang.isString(arr);
if(_114){
arr=arr.split("");
}
if(Array.every){
return Array.every(arr,_112,_113);
}else{
if(!_113){
if(arguments.length>=3){
dojo.raise("thisObject doesn't exist!");
}
_113=dj_global;
}
for(var i=0;i<arr.length;i++){
if(!_112.call(_113,arr[i],i,arr)){
return false;
}
}
return true;
}
};
dojo.lang.some=function(arr,_117,_118){
var _119=dojo.lang.isString(arr);
if(_119){
arr=arr.split("");
}
if(Array.some){
return Array.some(arr,_117,_118);
}else{
if(!_118){
if(arguments.length>=3){
dojo.raise("thisObject doesn't exist!");
}
_118=dj_global;
}
for(var i=0;i<arr.length;i++){
if(_117.call(_118,arr[i],i,arr)){
return true;
}
}
return false;
}
};
dojo.lang.filter=function(arr,_11c,_11d){
var _11e=dojo.lang.isString(arr);
if(_11e){
arr=arr.split("");
}
if(Array.filter){
var _11f=Array.filter(arr,_11c,_11d);
}else{
if(!_11d){
if(arguments.length>=3){
dojo.raise("thisObject doesn't exist!");
}
_11d=dj_global;
}
var _11f=[];
for(var i=0;i<arr.length;i++){
if(_11c.call(_11d,arr[i],i,arr)){
_11f.push(arr[i]);
}
}
}
if(_11e){
return _11f.join("");
}else{
return _11f;
}
};
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(_124,_125){
var _126=[];
for(var i=_125||0;i<_124.length;i++){
_126.push(_124[i]);
}
return _126;
};
dojo.provide("dojo.lang.func");
dojo.require("dojo.lang.common");
dojo.require("dojo.lang.type");
dojo.lang.hitch=function(_128,_129){
if(dojo.lang.isString(_129)){
var fcn=_128[_129];
}else{
var fcn=_129;
}
return function(){
return fcn.apply(_128,arguments);
};
};
dojo.lang.anonCtr=0;
dojo.lang.anon={};
dojo.lang.nameAnonFunc=function(_12b,_12c){
var nso=(_12c||dojo.lang.anon);
if((dj_global["djConfig"])&&(djConfig["slowAnonFuncLookups"]==true)){
for(var x in nso){
if(nso[x]===_12b){
return x;
}
}
}
var ret="__"+dojo.lang.anonCtr++;
while(typeof nso[ret]!="undefined"){
ret="__"+dojo.lang.anonCtr++;
}
nso[ret]=_12b;
return ret;
};
dojo.lang.forward=function(_130){
return function(){
return this[_130].apply(this,arguments);
};
};
dojo.lang.curry=function(ns,func){
var _133=[];
ns=ns||dj_global;
if(dojo.lang.isString(func)){
func=ns[func];
}
for(var x=2;x<arguments.length;x++){
_133.push(arguments[x]);
}
var _135=func.length-_133.length;
function gather(_136,_137,_138){
var _139=_138;
var _13a=_137.slice(0);
for(var x=0;x<_136.length;x++){
_13a.push(_136[x]);
}
_138=_138-_136.length;
if(_138<=0){
var res=func.apply(ns,_13a);
_138=_139;
return res;
}else{
return function(){
return gather(arguments,_13a,_138);
};
}
}
return gather([],_133,_135);
};
dojo.lang.curryArguments=function(ns,func,args,_140){
var _141=[];
var x=_140||0;
for(x=_140;x<args.length;x++){
_141.push(args[x]);
}
return dojo.lang.curry.apply(dojo.lang,[ns,func].concat(_141));
};
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,_147,_148){
if(!farr.length){
if(typeof _148=="function"){
_148();
}
return;
}
if((typeof _147=="undefined")&&(typeof cb=="number")){
_147=cb;
cb=function(){
};
}else{
if(!cb){
cb=function(){
};
if(!_147){
_147=0;
}
}
}
setTimeout(function(){
(farr.shift())();
cb();
dojo.lang.delayThese(farr,cb,_147,_148);
},_147);
};
dojo.provide("dojo.string.extras");
dojo.require("dojo.string.common");
dojo.require("dojo.lang");
dojo.string.paramString=function(str,_14a,_14b){
for(var name in _14a){
var re=new RegExp("\\%\\{"+name+"\\}","g");
str=str.replace(re,_14a[name]);
}
if(_14b){
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 _14f=str.split(" ");
var _150="";
var len=_14f.length;
for(var i=0;i<len;i++){
var word=_14f[i];
word=word.charAt(0).toUpperCase()+word.substring(1,word.length);
_150+=word;
if(i<len-1){
_150+=" ";
}
}
return new String(_150);
};
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 _157=escape(str);
var _158,re=/%u([0-9A-F]{4})/i;
while((_158=_157.match(re))){
var num=Number("0x"+_158[1]);
var _15a=escape("&#"+num+";");
ret+=_157.substring(0,_158.index)+_15a;
_157=_157.substring(_158.index+_158[0].length);
}
ret+=_157.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,_160){
str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
if(!_160){
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.summary=function(str,len){
if(!len||str.length<=len){
return str;
}else{
return str.substring(0,len).replace(/\.+$/,"")+"...";
}
};
dojo.string.endsWith=function(str,end,_168){
if(_168){
str=str.toLowerCase();
end=end.toLowerCase();
}
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,_16c,_16d){
if(_16d){
str=str.toLowerCase();
_16c=_16c.toLowerCase();
}
return str.indexOf(_16c)==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,_173){
if(_173=="\n"){
text=text.replace(/\r\n/g,"\n");
text=text.replace(/\r/g,"\n");
}else{
if(_173=="\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,_175){
var _176=[];
for(var i=0,prevcomma=0;i<str.length;i++){
if(str.charAt(i)=="\\"){
i++;
continue;
}
if(str.charAt(i)==_175){
_176.push(str.substring(prevcomma,i));
prevcomma=i+1;
}
}
_176.push(str.substr(prevcomma));
return _176;
};
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(node){
var _17a=node.tagName;
if(_17a.substr(0,5).toLowerCase()!="dojo:"){
if(_17a.substr(0,4).toLowerCase()=="dojo"){
return "dojo:"+_17a.substring(4).toLowerCase();
}
var djt=node.getAttribute("dojoType")||node.getAttribute("dojotype");
if(djt){
return "dojo:"+djt.toLowerCase();
}
if((node.getAttributeNS)&&(node.getAttributeNS(this.dojoml,"type"))){
return "dojo:"+node.getAttributeNS(this.dojoml,"type").toLowerCase();
}
try{
djt=node.getAttribute("dojo:type");
}
catch(e){
}
if(djt){
return "dojo:"+djt.toLowerCase();
}
if((!dj_global["djConfig"])||(!djConfig["ignoreClassNames"])){
var _17c=node.className||node.getAttribute("class");
if((_17c)&&(_17c.indexOf)&&(_17c.indexOf("dojo-")!=-1)){
var _17d=_17c.split(" ");
for(var x=0;x<_17d.length;x++){
if((_17d[x].length>5)&&(_17d[x].indexOf("dojo-")>=0)){
return "dojo:"+_17d[x].substr(5).toLowerCase();
}
}
}
}
}
return _17a.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(_180,_181){
var node=_180.firstChild;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.nextSibling;
}
if(_181&&node&&node.tagName&&node.tagName.toLowerCase()!=_181.toLowerCase()){
node=dojo.dom.nextElement(node,_181);
}
return node;
};
dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_183,_184){
var node=_183.lastChild;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.previousSibling;
}
if(_184&&node&&node.tagName&&node.tagName.toLowerCase()!=_184.toLowerCase()){
node=dojo.dom.prevElement(node,_184);
}
return node;
};
dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(node,_187){
if(!node){
return null;
}
do{
node=node.nextSibling;
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
if(node&&_187&&_187.toLowerCase()!=node.tagName.toLowerCase()){
return dojo.dom.nextElement(node,_187);
}
return node;
};
dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(node,_189){
if(!node){
return null;
}
if(_189){
_189=_189.toLowerCase();
}
do{
node=node.previousSibling;
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
if(node&&_189&&_189.toLowerCase()!=node.tagName.toLowerCase()){
return dojo.dom.prevElement(node,_189);
}
return node;
};
dojo.dom.moveChildren=function(_18a,_18b,trim){
var _18d=0;
if(trim){
while(_18a.hasChildNodes()&&_18a.firstChild.nodeType==dojo.dom.TEXT_NODE){
_18a.removeChild(_18a.firstChild);
}
while(_18a.hasChildNodes()&&_18a.lastChild.nodeType==dojo.dom.TEXT_NODE){
_18a.removeChild(_18a.lastChild);
}
}
while(_18a.hasChildNodes()){
_18b.appendChild(_18a.firstChild);
_18d++;
}
return _18d;
};
dojo.dom.copyChildren=function(_18e,_18f,trim){
var _191=_18e.cloneNode(true);
return this.moveChildren(_191,_18f,trim);
};
dojo.dom.removeChildren=function(node){
var _193=node.childNodes.length;
while(node.hasChildNodes()){
node.removeChild(node.firstChild);
}
return _193;
};
dojo.dom.replaceChildren=function(node,_195){
dojo.dom.removeChildren(node);
node.appendChild(_195);
};
dojo.dom.removeNode=function(node){
if(node&&node.parentNode){
return node.parentNode.removeChild(node);
}
};
dojo.dom.getAncestors=function(node,_198,_199){
var _19a=[];
var _19b=dojo.lang.isFunction(_198);
while(node){
if(!_19b||_198(node)){
_19a.push(node);
}
if(_199&&_19a.length>0){
return _19a[0];
}
node=node.parentNode;
}
if(_199){
return null;
}
return _19a;
};
dojo.dom.getAncestorsByTag=function(node,tag,_19e){
tag=tag.toLowerCase();
return dojo.dom.getAncestors(node,function(el){
return ((el.tagName)&&(el.tagName.toLowerCase()==tag));
},_19e);
};
dojo.dom.getFirstAncestorByTag=function(node,tag){
return dojo.dom.getAncestorsByTag(node,tag,true);
};
dojo.dom.isDescendantOf=function(node,_1a3,_1a4){
if(_1a4&&node){
node=node.parentNode;
}
while(node){
if(node==_1a3){
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,_1a7){
if(!_1a7){
_1a7="text/xml";
}
if(typeof DOMParser!="undefined"){
var _1a8=new DOMParser();
return _1a8.parseFromString(str,_1a7);
}else{
if(typeof ActiveXObject!="undefined"){
var _1a9=new ActiveXObject("Microsoft.XMLDOM");
if(_1a9){
_1a9.async=false;
_1a9.loadXML(str);
return _1a9;
}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 _1ab=document.implementation.createDocument("foo","",null);
for(var i=0;i<tmp.childNodes.length;i++){
_1ab.importNode(tmp.childNodes.item(i),true);
}
return _1ab;
}
return tmp.document&&tmp.document.firstChild?tmp.document.firstChild:tmp;
}
}
}
return null;
};
dojo.dom.prependChild=function(node,_1ae){
if(_1ae.firstChild){
_1ae.insertBefore(node,_1ae.firstChild);
}else{
_1ae.appendChild(node);
}
return true;
};
dojo.dom.insertBefore=function(node,ref,_1b1){
if(_1b1!=true&&(node===ref||node.nextSibling===ref)){
return false;
}
var _1b2=ref.parentNode;
_1b2.insertBefore(node,ref);
return true;
};
dojo.dom.insertAfter=function(node,ref,_1b5){
var pn=ref.parentNode;
if(ref==pn.lastChild){
if((_1b5!=true)&&(node===ref)){
return false;
}
pn.appendChild(node);
}else{
return this.insertBefore(node,ref.nextSibling,_1b5);
}
return true;
};
dojo.dom.insertAtPosition=function(node,ref,_1b9){
if((!node)||(!ref)||(!_1b9)){
return false;
}
switch(_1b9.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,_1bb,_1bc){
var _1bd=_1bb.childNodes;
if(!_1bd.length){
_1bb.appendChild(node);
return true;
}
var _1be=null;
for(var i=0;i<_1bd.length;i++){
var _1c0=_1bd.item(i)["getAttribute"]?parseInt(_1bd.item(i).getAttribute("dojoinsertionindex")):-1;
if(_1c0<_1bc){
_1be=_1bd.item(i);
}
}
if(_1be){
return dojo.dom.insertAfter(node,_1be);
}else{
return dojo.dom.insertBefore(node,_1bd.item(0));
}
};
dojo.dom.textContent=function(node,text){
if(text){
dojo.dom.replaceChildren(node,document.createTextNode(text));
return text;
}else{
var _1c3="";
if(node==null){
return _1c3;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
_1c3+=dojo.dom.textContent(node.childNodes[i]);
break;
case 3:
case 2:
case 4:
_1c3+=node.childNodes[i].nodeValue;
break;
default:
break;
}
}
return _1c3;
}
};
dojo.dom.collectionToArray=function(_1c5){
dojo.deprecated("dojo.dom.collectionToArray","use dojo.lang.toArray instead");
return dojo.lang.toArray(_1c5);
};
dojo.dom.hasParent=function(node){
if(!node||!node.parentNode||(node.parentNode&&!node.parentNode.tagName)){
return false;
}
return true;
};
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.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");
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.io.checkChildrenForFile=function(node){
var _1ca=false;
var _1cb=node.getElementsByTagName("input");
dojo.lang.forEach(_1cb,function(_1cc){
if(_1ca){
return;
}
if(_1cc.getAttribute("type")=="file"){
_1ca=true;
}
});
return _1ca;
};
dojo.io.formHasFile=function(_1cd){
return dojo.io.checkChildrenForFile(_1cd);
};
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(_1d0,_1d1,_1d2){
if((!_1d0)||(!_1d0.tagName)||(!_1d0.tagName.toLowerCase()=="form")){
dojo.raise("Attempted to encode a non-form element.");
}
if(!_1d2){
_1d2=dojo.io.formFilter;
}
var enc=/utf/i.test(_1d1||"")?encodeURIComponent:dojo.string.encodeAscii;
var _1d4=[];
for(var i=0;i<_1d0.elements.length;i++){
var elm=_1d0.elements[i];
if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_1d2(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){
_1d4.push(name+"="+enc(elm.options[j].value));
}
}
}else{
if(dojo.lang.inArray(type,["radio","checkbox"])){
if(elm.checked){
_1d4.push(name+"="+enc(elm.value));
}
}else{
_1d4.push(name+"="+enc(elm.value));
}
}
}
var _1da=_1d0.getElementsByTagName("input");
for(var i=0;i<_1da.length;i++){
var _1db=_1da[i];
if(_1db.type.toLowerCase()=="image"&&_1db.form==_1d0&&_1d2(_1db)){
var name=enc(_1db.name);
_1d4.push(name+"="+enc(_1db.value));
_1d4.push(name+".x=0");
_1d4.push(name+".y=0");
}
}
return _1d4.join("&")+"&";
};
dojo.io.setIFrameSrc=function(_1dc,src,_1de){
try{
var r=dojo.render.html;
if(!_1de){
if(r.safari){
_1dc.location=src;
}else{
frames[_1dc.name].location=src;
}
}else{
var idoc;
if(r.ie){
idoc=_1dc.contentWindow.document;
}else{
if(r.moz){
idoc=_1dc.contentWindow;
}else{
if(r.safari){
idoc=_1dc.document;
}
}
}
idoc.location.replace(src);
}
}
catch(e){
dojo.debug(e);
dojo.debug("setIFrameSrc: "+e);
}
};
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 _1e6=form.getElementsByTagName("input");
for(var i=0;i<_1e6.length;i++){
var _1e7=_1e6[i];
if(_1e7.type.toLowerCase()=="image"&&_1e7.form==form){
this.connect(_1e7,"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 _1ee=false;
if(node.disabled||!node.name){
_1ee=false;
}else{
if(dojo.lang.inArray(type,["submit","button","image"])){
if(!this.clickedButton){
this.clickedButton=node;
}
_1ee=node==this.clickedButton;
}else{
_1ee=!dojo.lang.inArray(type,["file","submit","reset","button"]);
}
}
return _1ee;
},connect:function(_1ef,_1f0,_1f1){
if(dojo.evalObjPath("dojo.event.connect")){
dojo.event.connect(_1ef,_1f0,this,_1f1);
}else{
var fcn=dojo.lang.hitch(this,_1f1);
_1ef[_1f0]=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 _1f4=this;
this.initialHref=window.location.href;
this.initialHash=window.location.hash;
this.moveForward=false;
var _1f5={};
this.useCache=false;
this.preventCache=false;
this.historyStack=[];
this.forwardStack=[];
this.historyIframe=null;
this.bookmarkAnchor=null;
this.locationTimer=null;
function getCacheKey(url,_1f7,_1f8){
return url+"|"+_1f7+"|"+_1f8.toLowerCase();
}
function addToCache(url,_1fa,_1fb,http){
_1f5[getCacheKey(url,_1fa,_1fb)]=http;
}
function getFromCache(url,_1fe,_1ff){
return _1f5[getCacheKey(url,_1fe,_1ff)];
}
this.clearCache=function(){
_1f5={};
};
function doLoad(_200,http,url,_203,_204){
if((http.status==200)||(http.status==304)||(location.protocol=="file:"&&(http.status==0||http.status==undefined))){
var ret;
if(_200.method.toLowerCase()=="head"){
var _206=http.getAllResponseHeaders();
ret={};
ret.toString=function(){
return _206;
};
var _207=_206.split(/[\r\n]+/g);
for(var i=0;i<_207.length;i++){
var pair=_207[i].match(/^([^:]+)\s*:\s*(.+)$/i);
if(pair){
ret[pair[1]]=pair[2];
}
}
}else{
if(_200.mimetype=="text/javascript"){
try{
ret=dj_eval(http.responseText);
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=null;
}
}else{
if(_200.mimetype=="text/json"){
try{
ret=dj_eval("("+http.responseText+")");
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=false;
}
}else{
if((_200.mimetype=="application/xml")||(_200.mimetype=="text/xml")){
ret=http.responseXML;
if(!ret||typeof ret=="string"){
ret=dojo.dom.createDocumentFromText(http.responseText);
}
}else{
ret=http.responseText;
}
}
}
}
if(_204){
addToCache(url,_203,_200.method,http);
}
_200[(typeof _200.load=="function")?"load":"handle"]("load",ret,http);
}else{
var _20a=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText);
_200[(typeof _200.error=="function")?"error":"handle"]("error",_20a,http);
}
}
function setHeaders(http,_20c){
if(_20c["headers"]){
for(var _20d in _20c["headers"]){
if(_20d.toLowerCase()=="content-type"&&!_20c["contentType"]){
_20c["contentType"]=_20c["headers"][_20d];
}else{
http.setRequestHeader(_20d,_20c["headers"][_20d]);
}
}
}
}
this.addToHistory=function(args){
var _20f=args["back"]||args["backButton"]||args["handle"];
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"]){
hash="#"+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());
setTimeout("window.location.href = '"+hash+"';",1);
this.bookmarkAnchor.href=hash;
if(dojo.render.html.ie){
var _212=_20f;
var lh=null;
var hsl=this.historyStack.length-1;
if(hsl>=0){
while(!this.historyStack[hsl]["urlHash"]){
hsl--;
}
lh=this.historyStack[hsl]["urlHash"];
}
if(lh){
_20f=function(){
if(window.location.hash!=""){
setTimeout("window.location.href = '"+lh+"';",1);
}
_212();
};
}
this.forwardStack=[];
var _215=args["forward"]||args["forwardButton"];
var tfw=function(){
if(window.location.hash!=""){
window.location.href=hash;
}
if(_215){
_215();
}
};
if(args["forward"]){
args.forward=tfw;
}else{
if(args["forwardButton"]){
args.forwardButton=tfw;
}
}
}else{
if(dojo.render.html.moz){
if(!this.locationTimer){
this.locationTimer=setInterval("dojo.io.XMLHTTPTransport.checkLocation();",200);
}
}
}
}
this.historyStack.push({"url":url,"callback":_20f,"kwArgs":args,"urlHash":hash});
};
this.checkLocation=function(){
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;
}
}
};
this.iframeLoaded=function(evt,_219){
var isp=_219.href.split("?");
if(isp.length<2){
if(this.historyStack.length==1){
this.handleBackButton();
}
return;
}
var _21b=isp[1];
if(this.moveForward){
this.moveForward=false;
return;
}
var last=this.historyStack.pop();
if(!last){
if(this.forwardStack.length>0){
var next=this.forwardStack[this.forwardStack.length-1];
if(_21b==next.url.split("?")[1]){
this.handleForwardButton();
}
}
return;
}
this.historyStack.push(last);
if(this.historyStack.length>=2){
if(isp[1]==this.historyStack[this.historyStack.length-2].url.split("?")[1]){
this.handleBackButton();
}
}else{
this.handleBackButton();
}
};
this.handleBackButton=function(){
var last=this.historyStack.pop();
if(!last){
return;
}
if(last["callback"]){
last.callback();
}else{
if(last.kwArgs["backButton"]){
last.kwArgs["backButton"]();
}else{
if(last.kwArgs["back"]){
last.kwArgs["back"]();
}else{
if(last.kwArgs["handle"]){
last.kwArgs.handle("back");
}
}
}
}
this.forwardStack.push(last);
};
this.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);
};
this.inFlight=[];
this.inFlightTimer=null;
this.startWatchingInFlight=function(){
if(!this.inFlightTimer){
this.inFlightTimer=setInterval("dojo.io.XMLHTTPTransport.watchInFlight();",10);
}
};
this.watchInFlight=function(){
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);
if(this.inFlight.length==0){
clearInterval(this.inFlightTimer);
this.inFlightTimer=null;
}
}
}
};
var _222=dojo.hostenv.getXmlhttpObject()?true:false;
this.canHandle=function(_223){
return _222&&dojo.lang.inArray((_223["mimetype"].toLowerCase()||""),["text/plain","text/html","application/xml","text/xml","text/javascript","text/json"])&&dojo.lang.inArray(_223["method"].toLowerCase(),["post","get","head"])&&!(_223["formNode"]&&dojo.io.formHasFile(_223["formNode"]));
};
this.multipartBoundary="45309FFF-BD65-4d50-99C9-36986896A96F";
this.bind=function(_224){
if(!_224["url"]){
if(!_224["formNode"]&&(_224["backButton"]||_224["back"]||_224["changeUrl"]||_224["watchForURL"])&&(!djConfig.preventBackButtonFix)){
this.addToHistory(_224);
return true;
}
}
var url=_224.url;
var _226="";
if(_224["formNode"]){
var ta=_224.formNode.getAttribute("action");
if((ta)&&(!_224["url"])){
url=ta;
}
var tp=_224.formNode.getAttribute("method");
if((tp)&&(!_224["method"])){
_224.method=tp;
}
_226+=dojo.io.encodeForm(_224.formNode,_224.encoding,_224["formFilter"]);
}
if(url.indexOf("#")>-1){
dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url);
url=url.split("#")[0];
}
if(_224["file"]){
_224.method="post";
}
if(!_224["method"]){
_224.method="get";
}
if(_224.method.toLowerCase()=="get"){
_224.multipart=false;
}else{
if(_224["file"]){
_224.multipart=true;
}else{
if(!_224["multipart"]){
_224.multipart=false;
}
}
}
if(_224["backButton"]||_224["back"]||_224["changeUrl"]){
this.addToHistory(_224);
}
var _229=_224["content"]||{};
if(_224.sendTransport){
_229["dojo.transport"]="xmlhttp";
}
do{
if(_224.postContent){
_226=_224.postContent;
break;
}
if(_229){
_226+=dojo.io.argsFromMap(_229,_224.encoding);
}
if(_224.method.toLowerCase()=="get"||!_224.multipart){
break;
}
var t=[];
if(_226.length){
var q=_226.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(_224.file){
if(dojo.lang.isArray(_224.file)){
for(var i=0;i<_224.file.length;++i){
var o=_224.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=_224.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+"--","");
_226=t.join("\r\n");
}
}while(false);
var _22f=_224["sync"]?false:true;
var _230=_224["preventCache"]||(this.preventCache==true&&_224["preventCache"]!=false);
var _231=_224["useCache"]==true||(this.useCache==true&&_224["useCache"]!=false);
if(!_230&&_231){
var _232=getFromCache(url,_226,_224.method);
if(_232){
doLoad(_224,_232,url,_226,false);
return;
}
}
var http=dojo.hostenv.getXmlhttpObject(_224);
var _234=false;
if(_22f){
this.inFlight.push({"req":_224,"http":http,"url":url,"query":_226,"useCache":_231});
this.startWatchingInFlight();
}
if(_224.method.toLowerCase()=="post"){
http.open("POST",url,_22f);
setHeaders(http,_224);
http.setRequestHeader("Content-Type",_224.multipart?("multipart/form-data; boundary="+this.multipartBoundary):(_224.contentType||"application/x-www-form-urlencoded"));
http.send(_226);
}else{
var _235=url;
if(_226!=""){
_235+=(_235.indexOf("?")>-1?"&":"?")+_226;
}
if(_230){
_235+=(dojo.string.endsWithAny(_235,"?","&")?"":(_235.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf();
}
http.open(_224.method.toUpperCase(),_235,_22f);
setHeaders(http,_224);
http.send(null);
}
if(!_22f){
doLoad(_224,http,url,_226,_231);
}
_224.abort=function(){
return http.abort();
};
return;
};
dojo.io.transports.addTransport("XMLHTTPTransport");
};
dojo.provide("dojo.io.cookie");
dojo.io.cookie.setCookie=function(name,_237,days,path,_23a,_23b){
var _23c=-1;
if(typeof days=="number"&&days>=0){
var d=new Date();
d.setTime(d.getTime()+(days*24*60*60*1000));
_23c=d.toGMTString();
}
_237=escape(_237);
document.cookie=name+"="+_237+";"+(_23c!=-1?" expires="+_23c+";":"")+(path?"path="+path:"")+(_23a?"; domain="+_23a:"")+(_23b?"; secure":"");
};
dojo.io.cookie.set=dojo.io.cookie.setCookie;
dojo.io.cookie.getCookie=function(name){
var idx=document.cookie.indexOf(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,_246,_247,_248){
if(arguments.length==5){
_248=_246;
_246=null;
_247=null;
}
var _249=[],cookie,value="";
if(!_248){
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){
_249.push(escape(prop)+"="+escape(cookie[prop]));
}
value=_249.join("&");
}
dojo.io.cookie.setCookie(name,value,days,path,_246,_247);
};
dojo.io.cookie.getObjectCookie=function(name){
var _24c=null,cookie=dojo.io.cookie.getCookie(name);
if(cookie){
_24c={};
var _24d=cookie.split("&");
for(var i=0;i<_24d.length;i++){
var pair=_24d[i].split("=");
var _250=pair[1];
if(isNaN(_250)){
_250=unescape(pair[1]);
}
_24c[unescape(pair[0])]=_250;
}
}
return _24c;
};
dojo.io.cookie.isSupported=function(){
if(typeof navigator.cookieEnabled!="boolean"){
dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null);
var _251=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__");
navigator.cookieEnabled=(_251=="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.AdapterRegistry");
dojo.require("dojo.lang.func");
dojo.require("dojo.lang.type");
dojo.AdapterRegistry=function(){
this.pairs=[];
};
dojo.lang.extend(dojo.AdapterRegistry,{register:function(name,_253,wrap,_255){
if(_255){
this.pairs.unshift([name,_253,wrap]);
}else{
this.pairs.push([name,_253,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.lang.reprRegistry=new dojo.AdapterRegistry();
dojo.lang.registerRepr=function(name,_25c,wrap,_25e){
dojo.lang.reprRegistry.register(name,_25c,wrap,_25e);
};
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){
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.lang.reprNumber=function(num){
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.provide("dojo.json");
dojo.require("dojo.lang.func");
dojo.require("dojo.lang.repr");
dojo.require("dojo.AdapterRegistry");
dojo.json={jsonRegistry:new dojo.AdapterRegistry(),register:function(name,_267,wrap,_269){
dojo.json.jsonRegistry.register(name,_267,wrap,_269);
},evalJson:function(json){
try{
return eval("("+json+")");
}
catch(e){
dojo.debug(e);
return json;
}
},evalJSON:dojo.lang.forward("evalJson"),serialize:function(o){
var _26c=typeof (o);
if(_26c=="undefined"){
return "undefined";
}else{
if((_26c=="number")||(_26c=="boolean")){
return o+"";
}else{
if(o===null){
return "null";
}
}
}
var m=dojo.lang;
if(_26c=="string"){
return m.reprString(o);
}
var me=arguments.callee;
var _26f;
if(typeof (o.__json__)=="function"){
_26f=o.__json__();
if(o!==_26f){
return me(_26f);
}
}
if(typeof (o.json)=="function"){
_26f=o.json();
if(o!==_26f){
return me(_26f);
}
}
if(_26c!="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;
_26f=dojo.json.jsonRegistry.match(o);
return me(_26f);
}
catch(e){
}
if(_26c=="function"){
return null;
}
res=[];
for(var k in o){
var _274;
if(typeof (k)=="number"){
_274="\""+k+"\"";
}else{
if(typeof (k)=="string"){
_274=m.reprString(k);
}else{
continue;
}
}
val=me(o[k]);
if(typeof (val)!="string"){
continue;
}
res.push(_274+":"+val);
}
return "{"+res.join(",")+"}";
}};
dojo.provide("dojo.rpc.Deferred");
dojo.require("dojo.lang.func");
dojo.rpc.Deferred=function(_275){
this.chain=[];
this.id=this._nextId();
this.fired=-1;
this.paused=0;
this.results=[null,null];
this.canceller=_275;
this.silentlyCancelled=false;
};
dojo.lang.extend(dojo.rpc.Deferred,{getFunctionFromArgs:function(){
var a=arguments;
if((a[0])&&(!a[1])){
if(dojo.lang.isFunction(a[0])){
return a[0];
}else{
if(dojo.lang.isString(a[0])){
return dj_global[a[0]];
}
}
}else{
if((a[0])&&(a[1])){
return dojo.lang.hitch(a[0],a[1]);
}
}
return null;
},repr:function(){
var _277;
if(this.fired==-1){
_277="unfired";
}else{
if(this.fired==0){
_277="success";
}else{
_277="error";
}
}
return "Deferred("+this.id+", "+_277+")";
},toString:dojo.lang.forward("repr"),_nextId:(function(){
var n=1;
return function(){
return n++;
};
})(),cancel:function(){
if(this.fired==-1){
if(this.canceller){
this.canceller(this);
}else{
this.silentlyCancelled=true;
}
if(this.fired==-1){
this.errback(new Error(this.repr()));
}
}else{
if((this.fired==0)&&(this.results[0] instanceof dojo.rpc.Deferred)){
this.results[0].cancel();
}
}
},_pause:function(){
this.paused++;
},_unpause:function(){
this.paused--;
if((this.paused==0)&&(this.fired>=0)){
this._fire();
}
},_continue:function(res){
this._resback(res);
this._unpause();
},_resback:function(res){
this.fired=((res instanceof Error)?1:0);
this.results[this.fired]=res;
this._fire();
},_check:function(){
if(this.fired!=-1){
if(!this.silentlyCancelled){
dojo.raise("already called!");
}
this.silentlyCancelled=false;
return;
}
},callback:function(res){
this._check();
this._resback(res);
},errback:function(res){
this._check();
if(!(res instanceof Error)){
res=new Error(res);
}
this._resback(res);
},addBoth:function(cb,cbfn){
var _27f=this.getFunctionFromArgs(cb,cbfn);
if(arguments.length>2){
_27f=dojo.lang.curryArguments(null,_27f,arguments,2);
}
return this.addCallbacks(_27f,_27f);
},addCallback:function(cb,cbfn){
var _282=this.getFunctionFromArgs(cb,cbfn);
if(arguments.length>2){
_282=dojo.lang.curryArguments(null,_282,arguments,2);
}
return this.addCallbacks(_282,null);
},addErrback:function(cb,cbfn){
var _285=this.getFunctionFromArgs(cb,cbfn);
if(arguments.length>2){
_285=dojo.lang.curryArguments(null,_285,arguments,2);
}
return this.addCallbacks(null,_285);
return this.addCallbacks(null,fn);
},addCallbacks:function(cb,eb){
this.chain.push([cb,eb]);
if(this.fired>=0){
this._fire();
}
return this;
},_fire:function(){
var _288=this.chain;
var _289=this.fired;
var res=this.results[_289];
var self=this;
var cb=null;
while(_288.length>0&&this.paused==0){
var pair=_288.shift();
var f=pair[_289];
if(f==null){
continue;
}
try{
res=f(res);
_289=((res instanceof Error)?1:0);
if(res instanceof dojo.rpc.Deferred){
cb=function(res){
self._continue(res);
};
this._pause();
}
}
catch(err){
_289=1;
res=err;
}
}
this.fired=_289;
this.results[_289]=res;
if((cb)&&(this.paused)){
res.addBoth(cb);
}
}});
dojo.provide("dojo.rpc.RpcService");
dojo.require("dojo.io.*");
dojo.require("dojo.json");
dojo.require("dojo.lang.func");
dojo.require("dojo.rpc.Deferred");
dojo.rpc.RpcService=function(url){
if(url){
this.connect(url);
}
};
dojo.lang.extend(dojo.rpc.RpcService,{strictArgChecks:true,serviceUrl:"",parseResults:function(obj){
return obj;
},errorCallback:function(_292){
return function(type,obj,e){
_292.errback(e);
};
},resultCallback:function(_296){
var tf=dojo.lang.hitch(this,function(type,obj,e){
var _29b=this.parseResults(obj);
_296.callback(_29b);
});
return tf;
},generateMethod:function(_29c,_29d){
var _29e=this;
return function(){
var _29f=new dojo.rpc.Deferred();
if((!_29e.strictArgChecks)||((_29d!=null)&&(arguments.length!=_29d.length))){
dojo.raise("Invalid number of parameters for remote method.");
}else{
_29e.bind(_29c,arguments,_29f);
}
return _29f;
};
},processSmd:function(_2a0){
dojo.debug("RpcService: Processing returned SMD.");
for(var n=0;n<_2a0.methods.length;n++){
dojo.debug("RpcService: Creating Method: this.",_2a0.methods[n].name,"()");
this[_2a0.methods[n].name]=this.generateMethod(_2a0.methods[n].name,_2a0.methods[n].parameters);
if(dojo.lang.isFunction(this[_2a0.methods[n].name])){
dojo.debug("RpcService: Successfully created",_2a0.methods[n].name,"()");
}else{
dojo.debug("RpcService: Failed to create",_2a0.methods[n].name,"()");
}
}
this.serviceUrl=_2a0.serviceUrl||_2a0.serviceURL;
dojo.debug("RpcService: Dojo RpcService is ready for use.");
},connect:function(_2a2){
dojo.debug("RpcService: Attempting to load SMD document from:",_2a2);
dojo.io.bind({url:_2a2,mimetype:"text/json",load:dojo.lang.hitch(this,function(type,_2a4,e){
return this.processSmd(_2a4);
}),sync:true});
}});
dojo.provide("dojo.rpc.JsonService");
dojo.require("dojo.rpc.RpcService");
dojo.require("dojo.io.*");
dojo.require("dojo.json");
dojo.require("dojo.lang");
dojo.rpc.JsonService=function(args){
if(args){
if(dojo.lang.isString(args)){
this.connect(args);
}else{
if(args["smdUrl"]){
this.connect(args.smdUrl);
}
if(args["smdStr"]){
this.processSmd(dj_eval("("+args.smdStr+")"));
}
if(args["smdObj"]){
this.processSmd(args.smdObj);
}
if(args["serviceUrl"]){
this.serviceUrl=args.serviceUrl;
}
if(args["strictArgChecks"]){
this.strictArgChecks=args.strictArgChecks;
}
}
}
};
dojo.inherits(dojo.rpc.JsonService,dojo.rpc.RpcService);
dojo.lang.extend(dojo.rpc.JsonService,{bustCache:false,lastSubmissionId:0,callRemote:function(_2a7,_2a8){
var _2a9=new dojo.rpc.Deferred();
this.bind(_2a7,_2a8,_2a9);
return _2a9;
},bind:function(_2aa,_2ab,_2ac){
dojo.io.bind({url:this.serviceUrl,postContent:this.createRequest(_2aa,_2ab),method:"POST",mimetype:"text/json",load:this.resultCallback(_2ac),preventCache:this.bustCache});
},createRequest:function(_2ad,_2ae){
var req={"params":_2ae,"method":_2ad,"id":this.lastSubmissionId++};
var data=dojo.json.serialize(req);
dojo.debug("JsonService: JSON-RPC Request: "+data);
return data;
},parseResults:function(obj){
if(obj["result"]){
return obj["result"];
}else{
return obj;
}
}});
dojo.provide("dojo.math");
dojo.math.degToRad=function(x){
return (x*Math.PI)/180;
};
dojo.math.radToDeg=function(x){
return (x*180)/Math.PI;
};
dojo.math.factorial=function(n){
if(n<1){
return 0;
}
var _2b5=1;
for(var i=1;i<=n;i++){
_2b5*=i;
}
return _2b5;
};
dojo.math.permutations=function(n,k){
if(n==0||k==0){
return 1;
}
return (dojo.math.factorial(n)/dojo.math.factorial(n-k));
};
dojo.math.combinations=function(n,r){
if(n==0||r==0){
return 1;
}
return (dojo.math.factorial(n)/(dojo.math.factorial(n-r)*dojo.math.factorial(r)));
};
dojo.math.bernstein=function(t,n,i){
return (dojo.math.combinations(n,i)*Math.pow(t,i)*Math.pow(1-t,n-i));
};
dojo.math.gaussianRandom=function(){
var k=2;
do{
var i=2*Math.random()-1;
var j=2*Math.random()-1;
k=i*i+j*j;
}while(k>=1);
k=Math.sqrt((-2*Math.log(k))/k);
return i*k;
};
dojo.math.mean=function(){
var _2c1=dojo.lang.isArray(arguments[0])?arguments[0]:arguments;
var mean=0;
for(var i=0;i<_2c1.length;i++){
mean+=_2c1[i];
}
return mean/_2c1.length;
};
dojo.math.round=function(_2c4,_2c5){
if(!_2c5){
var _2c6=1;
}else{
var _2c6=Math.pow(10,_2c5);
}
return Math.round(_2c4*_2c6)/_2c6;
};
dojo.math.sd=function(){
var _2c7=dojo.lang.isArray(arguments[0])?arguments[0]:arguments;
return Math.sqrt(dojo.math.variance(_2c7));
};
dojo.math.variance=function(){
var _2c8=dojo.lang.isArray(arguments[0])?arguments[0]:arguments;
var mean=0,squares=0;
for(var i=0;i<_2c8.length;i++){
mean+=_2c8[i];
squares+=Math.pow(_2c8[i],2);
}
return (squares/_2c8.length)-Math.pow(mean/_2c8.length,2);
};
dojo.math.range=function(a,b,step){
if(arguments.length<2){
b=a;
a=0;
}
if(arguments.length<3){
step=1;
}
var _2ce=[];
if(step>0){
for(var i=a;i<b;i+=step){
_2ce.push(i);
}
}else{
if(step<0){
for(var i=a;i>b;i+=step){
_2ce.push(i);
}
}else{
throw new Error("dojo.math.range: step must be non-zero");
}
}
return _2ce;
};
dojo.provide("dojo.graphics.color");
dojo.require("dojo.lang.array");
dojo.require("dojo.math");
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(_2d6){
if(_2d6){
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(_2d7,_2d8){
return dojo.graphics.color.blend(this.toRgb(),new Color(_2d7).toRgb(),_2d8);
}});
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,_2db){
if(typeof a=="string"){
return dojo.graphics.color.blendHex(a,b,_2db);
}
if(!_2db){
_2db=0;
}else{
if(_2db>1){
_2db=1;
}else{
if(_2db<-1){
_2db=-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*_2db));
}
return c;
};
dojo.graphics.color.blendHex=function(a,b,_2e1){
return dojo.graphics.color.rgb2hex(dojo.graphics.color.blend(dojo.graphics.color.hex2rgb(a),dojo.graphics.color.hex2rgb(b),_2e1));
};
dojo.graphics.color.extractRGB=function(_2e2){
var hex="0123456789abcdef";
_2e2=_2e2.toLowerCase();
if(_2e2.indexOf("rgb")==0){
var _2e4=_2e2.match(/rgba*\((\d+), *(\d+), *(\d+)/i);
var ret=_2e4.splice(1,3);
return ret;
}else{
var _2e6=dojo.graphics.color.hex2rgb(_2e2);
if(_2e6){
return _2e6;
}else{
return dojo.graphics.color.named[_2e2]||[255,255,255];
}
}
};
dojo.graphics.color.hex2rgb=function(hex){
var _2e8="0123456789ABCDEF";
var rgb=new Array(3);
if(hex.indexOf("#")==0){
hex=hex.substring(1);
}
hex=hex.toUpperCase();
if(hex.replace(new RegExp("["+_2e8+"]","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]=_2e8.indexOf(rgb[i].charAt(0))*16+_2e8.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 _2f9=v-min;
s=(v==0)?0:_2f9/v;
if(s==0){
h=0;
}else{
if(r==v){
h=60*(g-b)/_2f9;
}else{
if(g==v){
h=120+60*(b-r)/_2f9;
}else{
if(b==v){
h=240+60*(r-g)/_2f9;
}
}
}
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 _300=h/60;
var i=Math.floor(_300);
var f=_300-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 _30e=max-min;
l=(min+max)/2;
s=0;
if((l>0)&&(l<1)){
s=_30e/((l<0.5)?(2*l):(2-2*l));
}
h=0;
if(_30e>0){
if((max==r)&&(max!=g)){
h+=(g-b)/_30e;
}
if((max==g)&&(max!=b)){
h+=(2+(b-r)/_30e);
}
if((max==b)&&(max!=r)){
h+=(4+(r-g)/_30e);
}
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.style");
dojo.require("dojo.graphics.color");
dojo.style.boxSizing={marginBox:"margin-box",borderBox:"border-box",paddingBox:"padding-box",contentBox:"content-box"};
dojo.style.getBoxSizing=function(node){
node=dojo.byId(node);
if(dojo.render.html.ie||dojo.render.html.opera){
var cm=document["compatMode"];
if(cm=="BackCompat"||cm=="QuirksMode"){
return dojo.style.boxSizing.borderBox;
}else{
return dojo.style.boxSizing.contentBox;
}
}else{
if(arguments.length==0){
node=document.documentElement;
}
var _31a=dojo.style.getStyle(node,"-moz-box-sizing");
if(!_31a){
_31a=dojo.style.getStyle(node,"box-sizing");
}
return (_31a?_31a:dojo.style.boxSizing.contentBox);
}
};
dojo.style.isBorderBox=function(node){
return (dojo.style.getBoxSizing(node)==dojo.style.boxSizing.borderBox);
};
dojo.style.getUnitValue=function(node,_31d,_31e){
node=dojo.byId(node);
var _31f={value:0,units:"px"};
var s=dojo.style.getComputedStyle(node,_31d);
if(s==null||s==""||(s=="auto"&&_31e)){
return _31f;
}
if(dojo.lang.isUndefined(s)){
_31f.value=NaN;
}else{
var _321=s.match(/(\-?[\d.]+)([a-z%]*)/i);
if(!_321){
_31f.value=NaN;
}else{
_31f.value=Number(_321[1]);
_31f.units=_321[2].toLowerCase();
}
}
return _31f;
};
dojo.style.getPixelValue=function(node,_323,_324){
node=dojo.byId(node);
var _325=dojo.style.getUnitValue(node,_323,_324);
if(isNaN(_325.value)){
return 0;
}
if((_325.value)&&(_325.units!="px")){
return NaN;
}
return _325.value;
};
dojo.style.getNumericStyle=dojo.style.getPixelValue;
dojo.style.isPositionAbsolute=function(node){
node=dojo.byId(node);
return (dojo.style.getComputedStyle(node,"position")=="absolute");
};
dojo.style.getMarginWidth=function(node){
node=dojo.byId(node);
var _328=dojo.style.isPositionAbsolute(node);
var left=dojo.style.getPixelValue(node,"margin-left",_328);
var _32a=dojo.style.getPixelValue(node,"margin-right",_328);
return left+_32a;
};
dojo.style.getBorderWidth=function(node){
node=dojo.byId(node);
var left=(dojo.style.getStyle(node,"border-left-style")=="none"?0:dojo.style.getPixelValue(node,"border-left-width"));
var _32d=(dojo.style.getStyle(node,"border-right-style")=="none"?0:dojo.style.getPixelValue(node,"border-right-width"));
return left+_32d;
};
dojo.style.getPaddingWidth=function(node){
node=dojo.byId(node);
var left=dojo.style.getPixelValue(node,"padding-left",true);
var _330=dojo.style.getPixelValue(node,"padding-right",true);
return left+_330;
};
dojo.style.getContentWidth=function(node){
node=dojo.byId(node);
return node.offsetWidth-dojo.style.getPaddingWidth(node)-dojo.style.getBorderWidth(node);
};
dojo.style.getInnerWidth=function(node){
node=dojo.byId(node);
return node.offsetWidth;
};
dojo.style.getOuterWidth=function(node){
node=dojo.byId(node);
return dojo.style.getInnerWidth(node)+dojo.style.getMarginWidth(node);
};
dojo.style.setOuterWidth=function(node,_335){
node=dojo.byId(node);
if(!dojo.style.isBorderBox(node)){
_335-=dojo.style.getPaddingWidth(node)+dojo.style.getBorderWidth(node);
}
_335-=dojo.style.getMarginWidth(node);
if(!isNaN(_335)&&_335>0){
node.style.width=_335+"px";
return true;
}else{
return false;
}
};
dojo.style.getContentBoxWidth=dojo.style.getContentWidth;
dojo.style.getBorderBoxWidth=dojo.style.getInnerWidth;
dojo.style.getMarginBoxWidth=dojo.style.getOuterWidth;
dojo.style.setMarginBoxWidth=dojo.style.setOuterWidth;
dojo.style.getMarginHeight=function(node){
node=dojo.byId(node);
var _337=dojo.style.isPositionAbsolute(node);
var top=dojo.style.getPixelValue(node,"margin-top",_337);
var _339=dojo.style.getPixelValue(node,"margin-bottom",_337);
return top+_339;
};
dojo.style.getBorderHeight=function(node){
node=dojo.byId(node);
var top=(dojo.style.getStyle(node,"border-top-style")=="none"?0:dojo.style.getPixelValue(node,"border-top-width"));
var _33c=(dojo.style.getStyle(node,"border-bottom-style")=="none"?0:dojo.style.getPixelValue(node,"border-bottom-width"));
return top+_33c;
};
dojo.style.getPaddingHeight=function(node){
node=dojo.byId(node);
var top=dojo.style.getPixelValue(node,"padding-top",true);
var _33f=dojo.style.getPixelValue(node,"padding-bottom",true);
return top+_33f;
};
dojo.style.getContentHeight=function(node){
node=dojo.byId(node);
return node.offsetHeight-dojo.style.getPaddingHeight(node)-dojo.style.getBorderHeight(node);
};
dojo.style.getInnerHeight=function(node){
node=dojo.byId(node);
return node.offsetHeight;
};
dojo.style.getOuterHeight=function(node){
node=dojo.byId(node);
return dojo.style.getInnerHeight(node)+dojo.style.getMarginHeight(node);
};
dojo.style.setOuterHeight=function(node,_344){
node=dojo.byId(node);
if(!dojo.style.isBorderBox(node)){
_344-=dojo.style.getPaddingHeight(node)+dojo.style.getBorderHeight(node);
}
_344-=dojo.style.getMarginHeight(node);
if(!isNaN(_344)&&_344>0){
node.style.height=_344+"px";
return true;
}else{
return false;
}
};
dojo.style.setContentWidth=function(node,_346){
node=dojo.byId(node);
if(dojo.style.isBorderBox(node)){
_346+=dojo.style.getPaddingWidth(node)+dojo.style.getBorderWidth(node);
}
if(!isNaN(_346)&&_346>0){
node.style.width=_346+"px";
return true;
}else{
return false;
}
};
dojo.style.setContentHeight=function(node,_348){
node=dojo.byId(node);
if(dojo.style.isBorderBox(node)){
_348+=dojo.style.getPaddingHeight(node)+dojo.style.getBorderHeight(node);
}
if(!isNaN(_348)&&_348>0){
node.style.height=_348+"px";
return true;
}else{
return false;
}
};
dojo.style.getContentBoxHeight=dojo.style.getContentHeight;
dojo.style.getBorderBoxHeight=dojo.style.getInnerHeight;
dojo.style.getMarginBoxHeight=dojo.style.getOuterHeight;
dojo.style.setMarginBoxHeight=dojo.style.setOuterHeight;
dojo.style.getTotalOffset=function(node,type,_34b){
node=dojo.byId(node);
var _34c=(type=="top")?"offsetTop":"offsetLeft";
var _34d=(type=="top")?"scrollTop":"scrollLeft";
var _34e=(type=="top")?"y":"x";
var _34f=0;
if(node["offsetParent"]){
if(dojo.render.html.safari&&node.style.getPropertyValue("position")=="absolute"&&node.parentNode==document.body){
var _350=document.body;
}else{
var _350=document.body.parentNode;
}
if(_34b&&node.parentNode!=document.body){
_34f-=dojo.style.sumAncestorProperties(node,_34d);
}
do{
var n=node[_34c];
_34f+=isNaN(n)?0:n;
node=node.offsetParent;
}while(node!=_350&&node!=null);
}else{
if(node[_34e]){
var n=node[_34e];
_34f+=isNaN(n)?0:n;
}
}
return _34f;
};
dojo.style.sumAncestorProperties=function(node,prop){
node=dojo.byId(node);
if(!node){
return 0;
}
var _354=0;
while(node){
var val=node[prop];
if(val){
_354+=val-0;
}
node=node.parentNode;
}
return _354;
};
dojo.style.totalOffsetLeft=function(node,_357){
node=dojo.byId(node);
return dojo.style.getTotalOffset(node,"left",_357);
};
dojo.style.getAbsoluteX=dojo.style.totalOffsetLeft;
dojo.style.totalOffsetTop=function(node,_359){
node=dojo.byId(node);
return dojo.style.getTotalOffset(node,"top",_359);
};
dojo.style.getAbsoluteY=dojo.style.totalOffsetTop;
dojo.style.getAbsolutePosition=function(node,_35b){
node=dojo.byId(node);
var _35c=[dojo.style.getAbsoluteX(node,_35b),dojo.style.getAbsoluteY(node,_35b)];
_35c.x=_35c[0];
_35c.y=_35c[1];
return _35c;
};
dojo.style.styleSheet=null;
dojo.style.insertCssRule=function(_35d,_35e,_35f){
if(!dojo.style.styleSheet){
if(document.createStyleSheet){
dojo.style.styleSheet=document.createStyleSheet();
}else{
if(document.styleSheets[0]){
dojo.style.styleSheet=document.styleSheets[0];
}else{
return null;
}
}
}
if(arguments.length<3){
if(dojo.style.styleSheet.cssRules){
_35f=dojo.style.styleSheet.cssRules.length;
}else{
if(dojo.style.styleSheet.rules){
_35f=dojo.style.styleSheet.rules.length;
}else{
return null;
}
}
}
if(dojo.style.styleSheet.insertRule){
var rule=_35d+" { "+_35e+" }";
return dojo.style.styleSheet.insertRule(rule,_35f);
}else{
if(dojo.style.styleSheet.addRule){
return dojo.style.styleSheet.addRule(_35d,_35e,_35f);
}else{
return null;
}
}
};
dojo.style.removeCssRule=function(_361){
if(!dojo.style.styleSheet){
dojo.debug("no stylesheet defined for removing rules");
return false;
}
if(dojo.render.html.ie){
if(!_361){
_361=dojo.style.styleSheet.rules.length;
dojo.style.styleSheet.removeRule(_361);
}
}else{
if(document.styleSheets[0]){
if(!_361){
_361=dojo.style.styleSheet.cssRules.length;
}
dojo.style.styleSheet.deleteRule(_361);
}
}
return true;
};
dojo.style.getBackgroundColor=function(node){
node=dojo.byId(node);
var _363;
do{
_363=dojo.style.getStyle(node,"background-color");
if(_363.toLowerCase()=="rgba(0, 0, 0, 0)"){
_363="transparent";
}
if(node==document.getElementsByTagName("body")[0]){
node=null;
break;
}
node=node.parentNode;
}while(node&&dojo.lang.inArray(_363,["transparent",""]));
if(_363=="transparent"){
_363=[255,255,255,0];
}else{
_363=dojo.graphics.color.extractRGB(_363);
}
return _363;
};
dojo.style.getComputedStyle=function(node,_365,_366){
node=dojo.byId(node);
var _367=_366;
if(node.style.getPropertyValue){
_367=node.style.getPropertyValue(_365);
}
if(!_367){
if(document.defaultView){
var cs=document.defaultView.getComputedStyle(node,"");
if(cs){
_367=cs.getPropertyValue(_365);
}
}else{
if(node.currentStyle){
_367=node.currentStyle[dojo.style.toCamelCase(_365)];
}
}
}
return _367;
};
dojo.style.getStyle=function(node,_36a){
node=dojo.byId(node);
var _36b=dojo.style.toCamelCase(_36a);
var _36c=node.style[_36b];
return (_36c?_36c:dojo.style.getComputedStyle(node,_36a,_36c));
};
dojo.style.toCamelCase=function(_36d){
var arr=_36d.split("-"),cc=arr[0];
for(var i=1;i<arr.length;i++){
cc+=arr[i].charAt(0).toUpperCase()+arr[i].substring(1);
}
return cc;
};
dojo.style.toSelectorCase=function(_370){
return _370.replace(/([A-Z])/g,"-$1").toLowerCase();
};
dojo.style.setOpacity=function setOpacity(node,_372,_373){
node=dojo.byId(node);
var h=dojo.render.html;
if(!_373){
if(_372>=1){
if(h.ie){
dojo.style.clearOpacity(node);
return;
}else{
_372=0.999999;
}
}else{
if(_372<0){
_372=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="+_372*100+")";
}
}
node.style.filter="Alpha(Opacity="+_372*100+")";
}else{
if(h.moz){
node.style.opacity=_372;
node.style.MozOpacity=_372;
}else{
if(h.safari){
node.style.opacity=_372;
node.style.KhtmlOpacity=_372;
}else{
node.style.opacity=_372;
}
}
}
};
dojo.style.getOpacity=function getOpacity(node){
node=dojo.byId(node);
if(dojo.render.html.ie){
var opac=(node.filters&&node.filters.alpha&&typeof node.filters.alpha.opacity=="number"?node.filters.alpha.opacity:100)/100;
}else{
var opac=node.style.opacity||node.style.MozOpacity||node.style.KhtmlOpacity||1;
}
return opac>=0.999999?1:Number(opac);
};
dojo.style.clearOpacity=function clearOpacity(node){
node=dojo.byId(node);
var h=dojo.render.html;
if(h.ie){
if(node.filters&&node.filters.alpha){
node.style.filter="";
}
}else{
if(h.moz){
node.style.opacity=1;
node.style.MozOpacity=1;
}else{
if(h.safari){
node.style.opacity=1;
node.style.KhtmlOpacity=1;
}else{
node.style.opacity=1;
}
}
}
};
dojo.style.isVisible=function(node){
node=dojo.byId(node);
return dojo.style.getComputedStyle(node||this.domNode,"display")!="none";
};
dojo.style.show=function(node){
node=dojo.byId(node);
if(node.style){
node.style.display=dojo.lang.inArray(["tr","td","th"],node.tagName.toLowerCase())?"":"block";
}
};
dojo.style.hide=function(node){
node=dojo.byId(node);
if(node.style){
node.style.display="none";
}
};
dojo.style.toggleVisible=function(node){
if(dojo.style.isVisible(node)){
dojo.style.hide(node);
return false;
}else{
dojo.style.show(node);
return true;
}
};
dojo.style.toCoordinateArray=function(_37f,_380){
if(dojo.lang.isArray(_37f)){
while(_37f.length<4){
_37f.push(0);
}
while(_37f.length>4){
_37f.pop();
}
var ret=_37f;
}else{
var node=dojo.byId(_37f);
var ret=[dojo.style.getAbsoluteX(node,_380),dojo.style.getAbsoluteY(node,_380),dojo.style.getInnerWidth(node),dojo.style.getInnerHeight(node)];
}
ret.x=ret[0];
ret.y=ret[1];
ret.w=ret[2];
ret.h=ret[3];
return ret;
};
if(this["dojo"]){
dojo.provide("turbo.turbo");
dojo.require("dojo.dom");
dojo.require("dojo.style");
try{
dojo.require("dojo.string.extras");
}
catch(e){
dojo.require("dojo.string");
}
dojo.setModulePrefix("turbo","../turbo");
}else{
turbo={};
dojo={provide:function(){
},require:function(){
}};
}
turbo.global=this;
turbo.bind=function(_383,_384){
if(_384){
if(dojo.lang.isString(_384)){
_384=_383[_384];
}
return function(){
return _384.apply(_383,arguments);
};
}else{
dojo.debug("turbo.bind called with null method");
return function(){
};
}
};
turbo.cloneArguments=function(_385,_386){
var l=_385.length;
var s=(_386?_386:0);
var _389=new Array(l-s);
for(var i=s,j=0;i<l;i++,j++){
_389[j]=_385[i];
}
return _389;
};
turbo.bindArgs=function(_38b,_38c){
if(!_38c){
dojo.debug("turbo.bindArgs called with null method");
return function(){
};
}
if(dojo.lang.isString(_38c)){
_38c=_38b[_38c];
}
var _38d=turbo.cloneArguments(arguments,2);
return function(){
var args=_38d.slice(0);
for(var i=0;i<arguments.length;i++){
args.push(arguments[i]);
}
return _38c.apply(_38b,args);
};
};
turbo.$=function(_390,_391){
return (!_390?null:(!dojo.lang.isString(_390)?_390:(_391?_391:document).getElementById(_390)));
};
turbo.getTagName=function(_392){
var node=turbo.$(_392);
return (node&&node.tagName?node.tagName.lowerCase():"");
};
turbo.getSelectValue=function(_394){
var s=turbo.$(_394);
if(!s){
return "";
}
with(s.options[s.selectedIndex]){
return (value?value:innerHTML);
}
};
turbo.defer=function(_396,_397){
window.setTimeout(_396,_397);
};
turbo.marshall=function(){
var id="";
var _399=dj_global;
for(var i=0;i<arguments.length;i++){
id=arguments[i];
if(i==0&&!dojo.lang.isString(i)){
_399=id;
}else{
if(!_399[id]){
_399[id]=turbo.$(id);
}
}
}
return dj_global[id];
};
turbo.cat=function(){
turbo.cloneArguments(arguments).join("");
};
turbo.stringOf=function(_39b,_39c){
if(_39b<=0){
return "";
}
var _39d=new Array(_39b);
for(var i=0;i<_39b;i++){
_39d[i]=_39c;
}
return _39d.join("");
};
turbo.getCellIndex=function(inTd){
if(inTd.cellIndex){
return inTd.cellIndex;
}
var _3a0=inTd.parentNode.cells;
var l=_3a0.length;
for(var i=0;i<l;i++){
if(inTd==_3a0[i]){
return i;
}
}
return -1;
};
turbo.getRowIndex=function(inTr){
if(inTr.rowIndex&&inTr.rowIndex>=0){
return inTr.rowIndex;
}
var rows=inTr.parentNode.childNodes;
for(var i=0,l=rows.length;i<l;i++){
if(inTr==rows[i]){
return i;
}
}
return -1;
};
turbo.getTableRow=function(_3a6,_3a7){
if(_3a6.rows.length>0){
return _3a6.rows[_3a7];
}else{
if(_3a6.childNodes.length>_3a7){
return _3a6.childNodes[_3a7];
}else{
return null;
}
}
};
turbo.filter=function(_3a8,_3a9,_3aa){
if(!_3aa){
_3aa=dj_global;
}
var _3ab=[];
for(var i=0,elt;i<_3a8.length;i++){
elt=_3a9.call(_3aa,_3a8[i]);
if(elt!==undefined){
_3ab.push(elt);
}
}
return _3ab;
};
turbo.getWindowSize=function(){
if(window.innerWidth){
return {w:window.innerWidth,h:window.innerHeight};
}else{
return {w:document.documentElement.clientWidth,h:document.documentElement.clientHeight};
}
};
turbo.getContentSize=function(_3ad){
if(_3ad&&_3ad!=document.body){
return {w:dojo.style.getContentBoxWidth(_3ad),h:dojo.style.getContentBoxHeight(_3ad)};
}else{
return turbo.getWindowSize();
}
};
turbo.getInnerSize=function(_3ae){
if(_3ae&&_3ae!=document.body){
return {w:dojo.style.getBorderBoxWidth(_3ae),h:dojo.style.getBorderBoxHeight(_3ae)};
}else{
return turbo.getWindowSize();
}
};
turbo.getOuterSize=function(_3af){
if(_3af&&_3af!=document.body){
return {w:dojo.style.getMarginBoxWidth(_3af),h:dojo.style.getMarginBoxHeight(_3af)};
}else{
return turbo.getWindowSize();
}
};
turbo.setContentSize=function(_3b0,inW,inH){
var siz=turbo.getContentSize(_3b0);
if(inW>0&&inW!=siz.w){
_3b0.style.width=inW+"px";
}
if(inH>0&&inH!=siz.h){
_3b0.style.height=inH+"px";
}
};
turbo.setOuterSize=function(_3b4,inW,inH){
dojo.style.setMarginBoxWidth(_3b4,inW);
dojo.style.setMarginBoxHeight(_3b4,inH);
};
turbo.setBounds=function(_3b7,inL,inT,inW,inH){
if(_3b7){
with(_3b7.style){
if(inL>=0){
left=inL+"px";
}
if(inT>=0){
top=inT+"px";
}
}
turbo.setOuterSize(_3b7,inW,inH);
}
};
turbo.setStyle=function(_3bc,_3bd,_3be){
if(_3bc&&_3bc.style[_3bd]!=_3be){
_3bc.style[_3bd]=_3be;
}
};
turbo.setStyleLeftPx=function(_3bf,_3c0){
turbo.setStyle(_3bf,"left",_3c0+"px");
};
turbo.setStyleTopPx=function(_3c1,_3c2){
turbo.setStyle(_3c1,"top",_3c2+"px");
};
turbo.setStyleWidthPx=function(_3c3,_3c4){
if(_3c4>=0){
turbo.setStyle(_3c3,"width",_3c4+"px");
}
};
turbo.setStyleHeightPx=function(_3c5,_3c6){
if(_3c6>=0){
turbo.setStyle(_3c5,"height",_3c6+"px");
}
};
turbo.setStyleSizePx=function(_3c7,_3c8,_3c9){
turbo.setStyleWidthPx(_3c7,_3c8);
turbo.setStyleHeightPx(_3c7,_3c9);
};
turbo.setStyleBoundsPx=function(_3ca,_3cb,_3cc,_3cd,_3ce){
turbo.setVisibility(_3ca,false);
turbo.setStyleLeftPx(_3ca,_3cb);
turbo.setStyleTopPx(_3ca,_3cc);
turbo.setStyleWidthPx(_3ca,_3cd);
turbo.setStyleHeightPx(_3ca,_3ce);
turbo.setVisibility(_3ca,true);
};
turbo.setOuterStyleWidthPx=function(_3cf,_3d0){
if(_3cf){
dojo.style.setMarginBoxWidth(_3cf,_3d0);
}
};
turbo.setOuterStyleHeightPx=function(_3d1,_3d2){
if(_3d1){
dojo.style.setMarginBoxHeight(_3d1,_3d2);
}
};
turbo.capture=function(_3d3){
if(_3d3.setCapture){
_3d3.setCapture();
}else{
document.addEventListener("mousemove",_3d3.onmousemove,true);
document.addEventListener("mouseup",_3d3.onmouseup,true);
}
};
turbo.release=function(_3d4){
if(_3d4.releaseCapture){
_3d4.releaseCapture();
}else{
document.removeEventListener("mousemove",_3d4.onmousemove,true);
document.removeEventListener("mouseup",_3d4.onmouseup,true);
}
};
turbo.time=function(){
return new Date().getTime();
};
turbo.profile=function(_3d5,_3d6){
var t=turbo.time();
if(_3d6){
_3d5.call(_3d6);
}else{
_3d5();
}
return turbo.time()-t;
};
turbo.profiles={};
turbo.profileStart=function(_3d8){
turbo.profiles[_3d8]=turbo.time();
};
turbo.profileEnd=function(_3d9){
t=turbo.time()-turbo.profiles[_3d9];
turbo.debug(_3d9+": "+t+"ms");
};
turbo.array_swap=function(_3da,inI,inJ){
var _3dd=_3da[inI];
_3da[inI]=_3da[inJ];
_3da[inJ]=_3dd;
};
turbo._swiss=function(_3de,_3df){
for(var i in _3de){
_3df[i]=_3de[i];
}
return _3df;
};
turbo.swiss=function(_3e1,_3e2){
if(!_3e1||!_3e2){
return;
}
if(!dojo.lang.isArray(_3e1)){
turbo._swiss(_3e1,_3e2);
}else{
for(var i=0,l=_3e1.length;i<l;i++){
turbo._swiss(_3e1[i],_3e2);
}
}
return _3e2;
};
turbo.supplant=function(s,o){
var i,j;
for(;;){
i=s.lastIndexOf("{");
if(i<0){
break;
}
j=s.indexOf("}",i);
if(i+1>=j){
break;
}
s=s.substring(0,i)+o[s.substring(i+1,j)]+s.substring(j+1);
}
return s;
};
turbo.printf=function(s){
for(var a=1,i=0,r;a<arguments.length;){
i=s.indexOf("%",i)+1;
if(i==0){
break;
}
if(s.charAt(i)=="%"){
r="%";
}else{
r=arguments[a++];
}
s=s.substring(0,i-1)+r+s.substring(i+1);
}
return s;
};
turbo.debugOut=function(_3e9){
dojo.debug(_3e9);
};
turbo.debugTop=function(_3ea){
for(var name in _3ea){
var obj=_3ea[name];
s=name;
if(obj!=null&&typeof (obj)=="object"){
turbo.debugOut(s+" = ("+(obj instanceof Array?"array":"object")+")");
}else{
turbo.debugOut(s+" = "+obj);
}
}
};
turbo.debugArray=function(_3ed){
for(var i=0,l=_3ed.length;i<l;i++){
if(_3ed[i]){
turbo.debug(i+":",_3ed[i]);
}
}
};
turbo.debugObject=function(_3ef,_3f0){
if(_3f0==undefined){
_3f0="";
}
if(_3f0.length>6*5){
turbo.debugOut(_3f0+"too deep");
}
for(var name in _3ef){
var obj=_3ef[name];
s=_3f0+"| "+name;
if(obj!=null&&typeof (obj)=="object"){
turbo.debugOut(s+" = ("+(obj instanceof Array?"array":"object")+")");
turbo.debugObject(obj,_3f0+"......");
}else{
turbo.debugOut(s+" = "+obj);
}
}
};
turbo.debug=function(){
var c=arguments.length;
for(var i=0;i<c;i++){
if(dojo.lang.isArray(arguments[i])){
turbo.debugArray(arguments[i]);
}else{
if(dojo.lang.isObject(arguments[i])){
turbo.debugObject(arguments[i]);
}else{
turbo.debugOut(arguments[i]);
}
}
}
};
turbo.escapeText=function(_3f5){
return dojo.string.escapeXml(String(_3f5)).replace(/\n/g,"<br />");
};
turbo.stringReplace=function(_3f6,_3f7,_3f8){
if(!dojo.render.html.safari){
return _3f6.replace(_3f7,_3f8);
}
var str=_3f6;
var _3fa=_3f8;
var reg=_3f7;
var _3fc=[];
var _3fd=reg.lastIndex;
var re;
while((re=reg.exec(str))!=null){
var idx=re.index;
var args=re.concat(idx,str);
_3fc.push(str.slice(_3fd,idx),_3fa.apply(null,args).toString());
if(!reg.global){
_3fd+=(RegExp.lastMatch?RegExp.lastMatch.length:0);
break;
}else{
_3fd=reg.lastIndex;
}
}
_3fc.push(str.slice(_3fd));
return _3fc.join("");
};
turbo.getScrollbarWidth=function(){
if(turbo["_scrollBarWidth"]){
return turbo._scrollBarWidth;
}
turbo._scrollBarWidth=18;
try{
var e=document.createElement("div");
with(e.style){
top="0px";
left="0px";
width="100px";
height="100px";
overflow="scroll";
position="absolute";
visibility="hidden";
}
document.body.appendChild(e);
turbo._scrollBarWidth=e.offsetWidth-e.clientWidth;
document.body.removeChild(e);
delete e;
}
catch(ex){
}
return turbo._scrollBarWidth;
};
turbo.preloads=[];
turbo.preloadImage=function(_402){
var i=new Image();
i.src=_402;
turbo.preloads.push(i);
};
turbo.setCursor=function(_404){
document.body.style.cursor=_404;
};
turbo.setBusyCursor=function(){
turbo.setCursor("wait");
};
turbo.setDefaultCursor=function(){
turbo.setCursor("default");
};
turbo.addBodyNode=function(_405){
document.body.appendChild(_405);
};
turbo.addHeadNode=function(_406){
document.getElementsByTagName("head").item(0).appendChild(_406);
};
turbo.remove=function(_407){
if(dojo.lang.isString(_407)){
_407=turbo.$(_407);
}
if(_407&&_407.parentNode){
_407.parentNode.removeChild(_407);
}
};
turbo.setShowing=function(_408,_409){
if(dojo.lang.isString(_408)){
_408=turbo.$(_408);
}
if(_408&&_408.style){
_408.style.display=(_409?"":"none");
}
};
turbo.showHide=function(){
var l=arguments.length-1;
var show=arguments[l];
if(show!==true&&show!==false){
show=true;
l++;
}
for(var i=0;i<l;i++){
turbo.setShowing(arguments[i],show);
}
};
turbo.show=turbo.showHide;
turbo.hide=function(){
var l=arguments.length;
for(var i=0;i<l;i++){
turbo.setShowing(arguments[i],false);
}
};
turbo.showing=function(_40f){
if(!_40f||(_40f["style"]&&dojo.style.getComputedStyle(_40f,"display")=="none")){
return false;
}else{
if(_40f["parentNode"]&&_40f.parentNode&&_40f.parentNode!=document.body){
return turbo.showing(_40f.parentNode);
}else{
return true;
}
}
};
turbo.setVisibility=function(_410,_411){
if(dojo.lang.isString(_410)){
_410=turbo.$(_410);
}
if(_410&&_410.style){
_410.style.visibility=(_411?"":"hidden");
}
};
turbo.pathpop=function(_412,_413){
var _414=_412.lastIndexOf((_413==undefined?"/":_413));
return (_414>=0?_412.substring(0,_414):"");
};
turbo.clean=function(_415){
if(!_415){
return;
}
var _416=function(inW){
return inW.domNode&&dojo.dom.isDescendantOf(inW.domNode,_415,true);
};
var ws=dojo.widget.byFilter(_416);
for(var i=0;i<ws.length;i++){
var w=ws[i];
if(dojo.widget.widgetIds[w.widgetId]==w){
w.destroy();
}
}
dojo.event.browser.clean(_415);
};
turbo.scripts=[];
turbo.loadScript=function(_41b){
if(turbo.scripts[_41b]){
return;
}
turbo.scripts[_41b]=true;
var _41c=document.createElement("script");
_41c.type="text/javascript";
_41c.language="JavaScript";
turbo.addHeadNode(_41c);
_41c.src=_41b;
};
turbo.getFunction=function(_41d){
var obj=turbo.global;
var _41f=_41d.split(".");
var func=_41f.pop();
while(_41f.length&&obj){
obj=obj[_41f.shift()];
}
return (obj?obj[func]:null);
};
dojo.provide("turbo.lib.align");
dojo.require("turbo.turbo");
turbo.aligner=new function(){
this.enabled=false;
this.targets=[];
this.getAlignment=function(_421){
return _421.getAttribute("turboAlign")||_421.getAttribute("turboalign");
};
this.visible=function(_422){
return (dojo.style.getComputedStyle(_422,"display")!="none");
};
this.listChildrenByAlignment=function(_423,_424){
var _425=[];
var node=_423.firstChild;
while(node){
if(node.nodeType==1&&this.getAlignment(node)==_424&&this.visible(node)){
_425.push(node);
}
node=node.nextSibling;
}
return _425;
};
this.listAlignedChildren=function(_427){
var _428={none:[],top:[],left:[],client:[],right:[],bottom:[]};
var node=_427.firstChild;
while(node){
if(node.nodeType==1&&this.visible(node)){
var _42a=this.getAlignment(node);
if(_42a){
if(_428[_42a]){
_428[_42a].push(node);
}else{
_428[_42a]=[node];
}
}
}
node=node.nextSibling;
}
return _428;
};
this.normalizeAlignedElement=function(_42b){
if(_42b.style.position!="absolute"){
_42b.style.position="absolute";
}
};
this.alignElement=function(_42c,inL,inT,inW,inH){
this.normalizeAlignedElement(_42c);
turbo.setBounds(_42c,inL,inT,inW,inH);
this.alignChildren(_42c);
};
this.alignChildren=function(_431){
var _432=this.listAlignedChildren(_431);
var siz=turbo.getContentSize(_431);
var top=dojo.style.getPixelValue(_431,"padding-top",true);
var left=dojo.style.getPixelValue(_431,"padding-left",true);
var l,r,t,b,w,h,c,aligns;
aligns=_432.top;
t=top;
for(var i=0;i<aligns.length;i++){
this.alignElement(aligns[i],left,t,siz.w);
t+=aligns[i].offsetHeight;
}
aligns=_432.bottom;
b=siz.h+top;
c=aligns.length;
for(var i=c-1;i>=0;i--){
b-=aligns[i].offsetHeight;
this.alignElement(aligns[i],left,b,siz.w);
}
h=b-t;
aligns=_432.left;
l=left;
for(var i=0;i<aligns.length;i++){
this.alignElement(aligns[i],l,t,-1,h);
l+=aligns[i].offsetWidth;
}
aligns=_432.right;
r=siz.w+left;
c=aligns.length;
for(var i=c-1;i>=0;i--){
r-=aligns[i].offsetWidth;
this.alignElement(aligns[i],r,t,-1,h);
}
w=r-l;
aligns=_432.client;
for(var i=0;i<aligns.length;i++){
this.alignElement(aligns[i],l,t,w,h);
break;
}
aligns=_432.none;
for(var i=0;i<aligns.length;i++){
this.alignChildren(aligns[i]);
}
};
this.alignTargets=function(){
for(var i=0,l=turbo.aligner.targets.length;i<l;i++){
turbo.aligner.alignChildren(turbo.aligner.targets[i]);
}
};
this.alignFrom=function(_439){
turbo.aligner.alignChildren(_439);
};
this.alignNow=function(){
turbo.aligner.alignFrom(document.body);
turbo.aligner.alignTargets();
};
this.lastAlign=0;
this.align=function(){
if(!turbo.aligner.enabled){
return;
}
turbo.aligner.alignNow();
};
this.alignLater=function(_43a){
turbo.defer(turbo.aligner.align,(_43a?_43a:200));
};
this.enable=function(_43b){
turbo.aligner.enabled=(_43b!==false);
};
this.start=function(){
turbo.aligner.enable();
turbo.aligner.alignLater(500);
};
this.addTarget=function(_43c){
var e=(dojo.lang.isString(_43c)?turbo.$(_43c):_43c);
e.style.position="relative";
turbo.aligner.targets.push(e);
};
};
dojo.provide("dojo.event");
dojo.require("dojo.lang.array");
dojo.require("dojo.lang.extras");
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 _441=dojo.lang.nameAnonFunc(args[2],ao.adviceObj);
ao.adviceFunc=_441;
}else{
if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=dj_global;
var _441=dojo.lang.nameAnonFunc(args[0],ao.srcObj);
ao.srcFunc=_441;
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 _441=dojo.lang.nameAnonFunc(args[1],dj_global);
ao.srcFunc=_441;
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((typeof ao.srcFunc).toLowerCase()!="string"){
ao.srcFunc=dojo.lang.getNameInObj(ao.srcObj,ao.srcFunc);
}
if((typeof ao.adviceFunc).toLowerCase()!="string"){
ao.adviceFunc=dojo.lang.getNameInObj(ao.adviceObj,ao.adviceFunc);
}
if((ao.aroundObj)&&((typeof ao.aroundFunc).toLowerCase()!="string")){
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(){
var ao=interpolateArgs(arguments);
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.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._kwConnectImpl=function(_449,_44a){
var fn=(_44a)?"disconnect":"connect";
if(typeof _449["srcFunc"]=="function"){
_449.srcObj=_449["srcObj"]||dj_global;
var _44c=dojo.lang.nameAnonFunc(_449.srcFunc,_449.srcObj);
_449.srcFunc=_44c;
}
if(typeof _449["adviceFunc"]=="function"){
_449.adviceObj=_449["adviceObj"]||dj_global;
var _44c=dojo.lang.nameAnonFunc(_449.adviceFunc,_449.adviceObj);
_449.adviceFunc=_44c;
}
return dojo.event[fn]((_449["type"]||_449["adviceType"]||"after"),_449["srcObj"]||dj_global,_449["srcFunc"],_449["adviceObj"]||_449["targetObj"]||dj_global,_449["adviceFunc"]||_449["targetFunc"],_449["aroundObj"],_449["aroundFunc"],_449["once"],_449["delay"],_449["rate"],_449["adviceMsg"]||false);
};
this.kwConnect=function(_44d){
return this._kwConnectImpl(_44d,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(_450){
return this._kwConnectImpl(_450,true);
};
};
dojo.event.MethodInvocation=function(_451,obj,args){
this.jp_=_451;
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,_459){
this.object=obj||dj_global;
this.methodname=_459;
this.methodfunc=this.object[_459];
this.before=[];
this.after=[];
this.around=[];
};
dojo.event.MethodJoinPoint.getForMethod=function(obj,_45b){
if(!obj){
obj=dj_global;
}
if(!obj[_45b]){
obj[_45b]=function(){
};
}else{
if((!dojo.lang.isFunction(obj[_45b]))&&(!dojo.lang.isAlien(obj[_45b]))){
return null;
}
}
var _45c=_45b+"$joinpoint";
var _45d=_45b+"$joinpoint$method";
var _45e=obj[_45c];
if(!_45e){
var _45f=false;
if(dojo.event["browser"]){
if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){
_45f=true;
dojo.event.browser.addClobberNodeAttrs(obj,[_45c,_45d,_45b]);
}
}
obj[_45d]=obj[_45b];
_45e=obj[_45c]=new dojo.event.MethodJoinPoint(obj,_45d);
obj[_45b]=function(){
var args=[];
if((_45f)&&(!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));
}
}else{
for(var x=0;x<arguments.length;x++){
if((x==0)&&(_45f)&&(dojo.event.browser.isEvent(arguments[x]))){
args.push(dojo.event.browser.fixEvent(arguments[x]));
}else{
args.push(arguments[x]);
}
}
}
return _45e.run.apply(_45e,args);
};
}
return _45e;
};
dojo.lang.extend(dojo.event.MethodJoinPoint,{unintercept:function(){
this.object[this.methodname]=this.methodfunc;
},run:function(){
var obj=this.object||dj_global;
var args=arguments;
var _465=[];
for(var x=0;x<args.length;x++){
_465[x]=args[x];
}
var _467=function(marr){
if(!marr){
dojo.debug("Null argument to unrollAdvice()");
return;
}
var _469=marr[0]||dj_global;
var _46a=marr[1];
if(!_469[_46a]){
dojo.raise("function \""+_46a+"\" does not exist on \""+_469+"\"");
}
var _46b=marr[2]||dj_global;
var _46c=marr[3];
var msg=marr[6];
var _46e;
var to={args:[],jp_:this,object:obj,proceed:function(){
return _469[_46a].apply(_469,to.args);
}};
to.args=_465;
var _470=parseInt(marr[4]);
var _471=((!isNaN(_470))&&(marr[4]!==null)&&(typeof marr[4]!="undefined"));
if(marr[5]){
var rate=parseInt(marr[5]);
var cur=new Date();
var _474=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;
_467(mcpy);
},tod);
}
return;
}else{
marr.last=cur;
}
}
if(_46c){
_46b[_46c].call(_46b,to);
}else{
if((_471)&&((dojo.render.html)||(dojo.render.svg))){
dj_global["setTimeout"](function(){
if(msg){
_469[_46a].call(_469,to);
}else{
_469[_46a].apply(_469,args);
}
},_470);
}else{
if(msg){
_469[_46a].call(_469,to);
}else{
_469[_46a].apply(_469,args);
}
}
}
};
if(this.before.length>0){
dojo.lang.forEach(this.before,_467,true);
}
var _477;
if(this.around.length>0){
var mi=new dojo.event.MethodInvocation(this,obj,args);
_477=mi.proceed();
}else{
if(this.methodfunc){
_477=this.object[this.methodname].apply(this.object,args);
}
}
if(this.after.length>0){
dojo.lang.forEach(this.after,_467,true);
}
return (this.methodfunc)?_477: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(_47c,_47d,_47e,_47f,_480,_481,once,_483,rate,_485){
var arr=this.getArr(_480);
if(!arr){
dojo.raise("bad this: "+this);
}
var ao=[_47c,_47d,_47e,_47f,_483,rate,_485];
if(once){
if(this.hasAdvice(_47c,_47d,_480,arr)>=0){
return;
}
}
if(_481=="first"){
arr.unshift(ao);
}else{
arr.push(ao);
}
},hasAdvice:function(_488,_489,_48a,arr){
if(!arr){
arr=this.getArr(_48a);
}
var ind=-1;
for(var x=0;x<arr.length;x++){
if((arr[x][0]==_488)&&(arr[x][1]==_489)){
ind=x;
}
}
return ind;
},removeAdvice:function(_48e,_48f,_490,once){
var arr=this.getArr(_490);
var ind=this.hasAdvice(_48e,_48f,_490,arr);
if(ind==-1){
return false;
}
while(ind!=-1){
arr.splice(ind,1);
if(once){
break;
}
ind=this.hasAdvice(_48e,_48f,_490,arr);
}
return true;
}});
dojo.require("dojo.event");
dojo.provide("dojo.event.topic");
dojo.event.topic=new function(){
this.topics={};
this.getTopic=function(_494){
if(!this.topics[_494]){
this.topics[_494]=new this.TopicImpl(_494);
}
return this.topics[_494];
};
this.registerPublisher=function(_495,obj,_497){
var _495=this.getTopic(_495);
_495.registerPublisher(obj,_497);
};
this.subscribe=function(_498,obj,_49a){
var _498=this.getTopic(_498);
_498.subscribe(obj,_49a);
};
this.unsubscribe=function(_49b,obj,_49d){
var _49b=this.getTopic(_49b);
_49b.unsubscribe(obj,_49d);
};
this.publish=function(_49e,_49f){
var _49e=this.getTopic(_49e);
var args=[];
if(arguments.length==2&&(dojo.lang.isArray(_49f)||_49f.callee)){
args=_49f;
}else{
var args=[];
for(var x=1;x<arguments.length;x++){
args.push(arguments[x]);
}
}
_49e.sendMessage.apply(_49e,args);
};
};
dojo.event.topic.TopicImpl=function(_4a2){
this.topicName=_4a2;
var self=this;
self.subscribe=function(_4a4,_4a5){
var tf=_4a5||_4a4;
var to=(!_4a5)?dj_global:_4a4;
dojo.event.kwConnect({srcObj:self,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
};
self.unsubscribe=function(_4a8,_4a9){
var tf=(!_4a9)?_4a8:_4a9;
var to=(!_4a9)?null:_4a8;
dojo.event.kwDisconnect({srcObj:self,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
};
self.registerPublisher=function(_4ac,_4ad){
dojo.event.connect(_4ac,_4ad,self,"sendMessage");
};
self.sendMessage=function(_4ae){
};
};
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(_4b1){
var na;
var tna;
if(_4b1){
tna=_4b1.getElementsByTagName("*");
na=[_4b1];
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 _4b5={};
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 _4b9=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,_4bd){
this.addClobberNode(node);
for(var x=0;x<_4bd.length;x++){
node.__clobberAttrs__.push(_4bd[x]);
}
};
this.removeListener=function(node,_4c0,fp,_4c2){
if(!_4c2){
var _4c2=false;
}
_4c0=_4c0.toLowerCase();
if(_4c0.substr(0,2)=="on"){
_4c0=_4c0.substr(2);
}
if(node.removeEventListener){
node.removeEventListener(_4c0,fp,_4c2);
}
};
this.addListener=function(node,_4c4,fp,_4c6,_4c7){
if(!node){
return;
}
if(!_4c6){
var _4c6=false;
}
_4c4=_4c4.toLowerCase();
if(_4c4.substr(0,2)!="on"){
_4c4="on"+_4c4;
}
if(!_4c7){
var _4c8=function(evt){
if(!evt){
evt=window.event;
}
var ret=fp(dojo.event.browser.fixEvent(evt));
if(_4c6){
dojo.event.browser.stopEvent(evt);
}
return ret;
};
}else{
_4c8=fp;
}
if(node.addEventListener){
node.addEventListener(_4c4.substr(2),_4c8,_4c6);
return _4c8;
}else{
if(typeof node[_4c4]=="function"){
var _4cb=node[_4c4];
node[_4c4]=function(e){
_4cb(e);
return _4c8(e);
};
}else{
node[_4c4]=_4c8;
}
if(dojo.render.html.ie){
this.addClobberNodeAttrs(node,[_4c4]);
}
return _4c8;
}
};
this.isEvent=function(obj){
return (typeof obj!="undefined")&&(typeof Event!="undefined")&&(obj.eventPhase);
};
this.currentEvent=null;
this.callListener=function(_4ce,_4cf){
if(typeof _4ce!="function"){
dojo.raise("listener not a function: "+_4ce);
}
dojo.event.browser.currentEvent.currentTarget=_4cf;
return _4ce.call(_4cf,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){
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=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("turbo.lib.app");
dojo.require("turbo.lib.align");
dojo.require("dojo.event.*");
turbo.app={marshall:function(){
var id="";
var _4d5=dj_global;
for(var i=0;i<arguments.length;i++){
id=arguments[i];
if(!_4d5[id]){
_4d5[id]=turbo.$(id);
}
}
return _4d5[id];
},onresize:function(){
},alignerAlign:function(){
this.onresize();
},resize:function(){
turbo.aligner.align();
},_windowResize:function(){
turbo.app.resize();
turbo.app.resizePending=null;
},windowResize:function(){
if(this.resizePending){
return;
}
this.resizePending=turbo.defer(turbo.app._windowResize,250);
},display:function(){
turbo.aligner.enable();
this._windowResize();
turbo.defer(turbo.app.windowResize,500);
turbo.remove("turboCurtain");
},encurtain:function(){
var d=document.createElement("div");
d.innerHTML=turbo.app.curtainHtml;
d.id="turboCurtain";
with(d.style){
position="absolute";
zIndex=9999;
width="9000px";
height="9000px";
backgroundColor="white";
padding="16px";
}
document.body.insertBefore(d,document.body.firstChild);
document.body.style.display="block";
},init:function(){
},initialize:function(){
this.encurtain();
try{
this.init();
}
catch(e){
dojo.debug("turbo.app.init failed: "+e);
turbo.debug(e);
}
turbo.defer(turbo.bind(this,this.display),100);
dojo.event.connect(turbo.aligner,"align",this,"alignerAlign");
dojo.event.connect(window,"onresize",this,"windowResize");
}};
turbo.app.curtainHtml="";
dojo.addOnLoad(turbo.app,"initialize");
if(false){
dojo.addOnLoad(function(){
showHideGrids=function(_4d8){
var _4d9=dojo.widget.getWidgetsByType("TurboGrid");
for(var i=0;i<_4d9.length;i++){
turbo.showHide(_4d9[i].domNode,_4d8);
}
};
hideGrids=function(){
showHideGrids(false);
};
showGrids=function(){
showHideGrids(true);
};
dojo.event.connect("before",turbo.aligner,"align","hideGrids");
dojo.event.connect("after",turbo.aligner,"align","showGrids");
});
}
dojo.event.topic.registerPublisher("turboresize",turbo.app,"onresize");
dojo.provide("dojo.xml.Parse");
dojo.require("dojo.dom");
dojo.xml.Parse=function(){
this.parseFragment=function(_4db){
var _4dc={};
var _4dd=dojo.dom.getTagName(_4db);
_4dc[_4dd]=new Array(_4db.tagName);
var _4de=this.parseAttributes(_4db);
for(var attr in _4de){
if(!_4dc[attr]){
_4dc[attr]=[];
}
_4dc[attr][_4dc[attr].length]=_4de[attr];
}
var _4e0=_4db.childNodes;
for(var _4e1 in _4e0){
switch(_4e0[_4e1].nodeType){
case dojo.dom.ELEMENT_NODE:
_4dc[_4dd].push(this.parseElement(_4e0[_4e1]));
break;
case dojo.dom.TEXT_NODE:
if(_4e0.length==1){
if(!_4dc[_4db.tagName]){
_4dc[_4dd]=[];
}
_4dc[_4dd].push({value:_4e0[0].nodeValue});
}
break;
}
}
return _4dc;
};
this.parseElement=function(node,_4e3,_4e4,_4e5){
var _4e6={};
var _4e7=dojo.dom.getTagName(node);
_4e6[_4e7]=[];
if((!_4e4)||(_4e7.substr(0,4).toLowerCase()=="dojo")){
var _4e8=this.parseAttributes(node);
for(var attr in _4e8){
if((!_4e6[_4e7][attr])||(typeof _4e6[_4e7][attr]!="array")){
_4e6[_4e7][attr]=[];
}
_4e6[_4e7][attr].push(_4e8[attr]);
}
_4e6[_4e7].nodeRef=node;
_4e6.tagName=_4e7;
_4e6.index=_4e5||0;
}
var _4ea=0;
for(var i=0;i<node.childNodes.length;i++){
var tcn=node.childNodes.item(i);
switch(tcn.nodeType){
case dojo.dom.ELEMENT_NODE:
_4ea++;
var ctn=dojo.dom.getTagName(tcn);
if(!_4e6[ctn]){
_4e6[ctn]=[];
}
_4e6[ctn].push(this.parseElement(tcn,true,_4e4,_4ea));
if((tcn.childNodes.length==1)&&(tcn.childNodes.item(0).nodeType==dojo.dom.TEXT_NODE)){
_4e6[ctn][_4e6[ctn].length-1].value=tcn.childNodes.item(0).nodeValue;
}
break;
case dojo.dom.TEXT_NODE:
if(node.childNodes.length==1){
_4e6[_4e7].push({value:node.childNodes.item(0).nodeValue});
}
break;
default:
break;
}
}
return _4e6;
};
this.parseAttributes=function(node){
var _4ef={};
var atts=node.attributes;
for(var i=0;i<atts.length;i++){
var _4f2=atts.item(i);
if((dojo.render.html.capable)&&(dojo.render.html.ie)){
if(!_4f2){
continue;
}
if((typeof _4f2=="object")&&(typeof _4f2.nodeValue=="undefined")||(_4f2.nodeValue==null)||(_4f2.nodeValue=="")){
continue;
}
}
var nn=(_4f2.nodeName.indexOf("dojo:")==-1)?_4f2.nodeName:_4f2.nodeName.split("dojo:")[1];
_4ef[nn]={value:_4f2.nodeValue};
}
return _4ef;
};
};
dojo.provide("dojo.widget.Manager");
dojo.require("dojo.lang.array");
dojo.require("dojo.event.*");
dojo.widget.manager=new function(){
this.widgets=[];
this.widgetIds=[];
this.topWidgets={};
var _4f4={};
var _4f5=[];
this.getUniqueId=function(_4f6){
return _4f6+"_"+(_4f4[_4f6]!=undefined?++_4f4[_4f6]:_4f4[_4f6]=0);
};
this.add=function(_4f7){
dojo.profile.start("dojo.widget.manager.add");
this.widgets.push(_4f7);
if(_4f7.widgetId==""){
if(_4f7["id"]){
_4f7.widgetId=_4f7["id"];
}else{
if(_4f7.extraArgs["id"]){
_4f7.widgetId=_4f7.extraArgs["id"];
}else{
_4f7.widgetId=this.getUniqueId(_4f7.widgetType);
}
}
}
if(this.widgetIds[_4f7.widgetId]){
dojo.debug("widget ID collision on ID: "+_4f7.widgetId);
}
this.widgetIds[_4f7.widgetId]=_4f7;
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(_4f9){
var tw=this.widgets[_4f9].widgetId;
delete this.widgetIds[tw];
this.widgets.splice(_4f9,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(_503){
var ret=[];
dojo.lang.forEach(this.widgets,function(x){
if(_503(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 _509={};
var _50a=["dojo.widget"];
for(var i=0;i<_50a.length;i++){
_50a[_50a[i]]=true;
}
this.registerWidgetPackage=function(_50c){
if(!_50a[_50c]){
_50a[_50c]=true;
_50a.push(_50c);
}
};
this.getWidgetPackageList=function(){
return dojo.lang.map(_50a,function(elt){
return (elt!==true?elt:undefined);
});
};
this.getImplementation=function(_50e,_50f,_510){
var impl=this.getImplementationName(_50e);
if(impl){
var ret=new impl(_50f);
return ret;
}
};
this.getImplementationName=function(_513){
var _514=_513.toLowerCase();
var impl=_509[_514];
if(impl){
return impl;
}
if(!_4f5.length){
for(var _516 in dojo.render){
if(dojo.render[_516]["capable"]===true){
var _517=dojo.render[_516].prefixes;
for(var i=0;i<_517.length;i++){
_4f5.push(_517[i].toLowerCase());
}
}
}
_4f5.push("");
}
for(var i=0;i<_50a.length;i++){
var _519=dojo.evalObjPath(_50a[i]);
if(!_519){
continue;
}
for(var j=0;j<_4f5.length;j++){
if(!_519[_4f5[j]]){
continue;
}
for(var _51b in _519[_4f5[j]]){
if(_51b.toLowerCase()!=_514){
continue;
}
_509[_514]=_519[_4f5[j]][_51b];
return _509[_514];
}
}
for(var j=0;j<_4f5.length;j++){
for(var _51b in _519){
if(_51b.toLowerCase()!=(_4f5[j]+_514)){
continue;
}
_509[_514]=_519[_51b];
return _509[_514];
}
}
}
throw new Error("Could not locate \""+_513+"\" class");
};
this.resizing=false;
this.onResized=function(){
if(this.resizing){
return;
}
try{
this.resizing=true;
for(var id in this.topWidgets){
var _51d=this.topWidgets[id];
if(_51d.onResized){
_51d.onResized();
}
}
}
finally{
this.resizing=false;
}
};
if(typeof window!="undefined"){
dojo.addOnLoad(this,"onResized");
dojo.event.connect(window,"onresize",this,"onResized");
}
};
dojo.widget.getUniqueId=function(){
return dojo.widget.manager.getUniqueId.apply(dojo.widget.manager,arguments);
};
dojo.widget.addWidget=function(){
return dojo.widget.manager.add.apply(dojo.widget.manager,arguments);
};
dojo.widget.destroyAllWidgets=function(){
return dojo.widget.manager.destroyAll.apply(dojo.widget.manager,arguments);
};
dojo.widget.removeWidget=function(){
return dojo.widget.manager.remove.apply(dojo.widget.manager,arguments);
};
dojo.widget.removeWidgetById=function(){
return dojo.widget.manager.removeById.apply(dojo.widget.manager,arguments);
};
dojo.widget.getWidgetById=function(){
return dojo.widget.manager.getWidgetById.apply(dojo.widget.manager,arguments);
};
dojo.widget.getWidgetsByType=function(){
return dojo.widget.manager.getWidgetsByType.apply(dojo.widget.manager,arguments);
};
dojo.widget.getWidgetsByFilter=function(){
return dojo.widget.manager.getWidgetsByFilter.apply(dojo.widget.manager,arguments);
};
dojo.widget.byId=function(){
return dojo.widget.manager.getWidgetById.apply(dojo.widget.manager,arguments);
};
dojo.widget.byType=function(){
return dojo.widget.manager.getWidgetsByType.apply(dojo.widget.manager,arguments);
};
dojo.widget.byFilter=function(){
return dojo.widget.manager.getWidgetsByFilter.apply(dojo.widget.manager,arguments);
};
dojo.widget.byNode=function(){
return dojo.widget.manager.getWidgetByNode.apply(dojo.widget.manager,arguments);
};
dojo.widget.all=function(n){
var _51f=dojo.widget.manager.getAllWidgets.apply(dojo.widget.manager,arguments);
if(arguments.length>0){
return _51f[n];
}
return _51f;
};
dojo.widget.registerWidgetPackage=function(){
return dojo.widget.manager.registerWidgetPackage.apply(dojo.widget.manager,arguments);
};
dojo.widget.getWidgetImplementation=function(){
return dojo.widget.manager.getImplementation.apply(dojo.widget.manager,arguments);
};
dojo.widget.getWidgetImplementationName=function(){
return dojo.widget.manager.getImplementationName.apply(dojo.widget.manager,arguments);
};
dojo.widget.widgets=dojo.widget.manager.widgets;
dojo.widget.widgetIds=dojo.widget.manager.widgetIds;
dojo.widget.root=dojo.widget.manager.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 _521=this.children[i];
if(_521.onResized){
_521.onResized();
}
}
},create:function(args,_523,_524){
this.satisfyPropertySets(args,_523,_524);
this.mixInProperties(args,_523,_524);
this.postMixInProperties(args,_523,_524);
dojo.widget.manager.add(this);
this.buildRendering(args,_523,_524);
this.initialize(args,_523,_524);
this.postInitialize(args,_523,_524);
this.postCreate(args,_523,_524);
return this;
},destroy:function(_525){
this.destroyChildren();
this.uninitialize();
this.destroyRendering(_525);
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,_528){
var ret=[];
var _52a=dojo.lang.isFunction(type);
if(!_52a){
type=type.toLowerCase();
}
for(var x=0;x<this.children.length;x++){
if(_52a){
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(_528){
ret=ret.concat(this.children[x].getChildrenOfType(type,_528));
}
}
return ret;
},getDescendants:function(){
var _52c=[];
var _52d=[this];
var elem;
while(elem=_52d.pop()){
_52c.push(elem);
dojo.lang.forEach(elem.children,function(elem){
_52d.push(elem);
});
}
return _52c;
},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 _534;
var _535=dojo.widget.lcArgsCache[this.widgetType];
if(_535==null){
_535={};
for(var y in this){
_535[((new String(y)).toLowerCase())]=y;
}
dojo.widget.lcArgsCache[this.widgetType]=_535;
}
var _537={};
for(var x in args){
if(!this[x]){
var y=_535[(new String(x)).toLowerCase()];
if(y){
args[y]=args[x];
x=y;
}
}
if(_537[x]){
continue;
}
_537[x]=true;
if((typeof this[x])!=(typeof _534)){
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 _539=args[x].split(";");
for(var y=0;y<_539.length;y++){
var si=_539[y].indexOf(":");
if((si!=-1)&&(_539[y].length>si)){
this[x][_539[y].substr(0,si).replace(/^\s+|\s+$/g,"")]=_539[y].substr(si+1);
}
}
}else{
this[x]=args[x];
}
}
}
}
}
}
}
}
}else{
this.extraArgs[x]=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(_541){
},addChild:function(_542){
dj_unimplemented("dojo.widget.Widget.addChild");
return false;
},removeChild:function(_543){
for(var x=0;x<this.children.length;x++){
if(this.children[x]===_543){
this.children.splice(x,1);
break;
}
}
return _543;
},resize:function(_545,_546){
this.setWidth(_545);
this.setHeight(_546);
},setWidth:function(_547){
if((typeof _547=="string")&&(_547.substr(-1)=="%")){
this.setPercentageWidth(_547);
}else{
this.setNativeWidth(_547);
}
},setHeight:function(_548){
if((typeof _548=="string")&&(_548.substr(-1)=="%")){
this.setPercentageHeight(_548);
}else{
this.setNativeHeight(_548);
}
},setPercentageHeight:function(_549){
return false;
},setNativeHeight:function(_54a){
return false;
},setPercentageWidth:function(_54b){
return false;
},setNativeWidth:function(_54c){
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 _550=type.toLowerCase();
this[_550]=function(_551,_552,_553,_554,_555){
return dojo.widget.buildWidgetFromParseTree(_550,_551,_552,_553,_554,_555);
};
};
dojo.widget.tags.addParseTreeHandler("dojo:widget");
dojo.widget.tags["dojo:propertyset"]=function(_556,_557,_558){
var _559=_557.parseProperties(_556["dojo:propertyset"]);
};
dojo.widget.tags["dojo:connect"]=function(_55a,_55b,_55c){
var _55d=_55b.parseProperties(_55a["dojo:connect"]);
};
dojo.widget.buildWidgetFromParseTree=function(type,frag,_560,_561,_562,_563){
var _564=type.split(":");
_564=(_564.length==2)?_564[1]:type;
var _565=_563||_560.parseProperties(frag["dojo:"+_564]);
var _566=dojo.widget.manager.getImplementation(_564);
if(!_566){
throw new Error("cannot find \""+_564+"\" widget");
}else{
if(!_566.create){
throw new Error("\""+_564+"\" widget object does not appear to implement *Widget");
}
}
_565["dojoinsertionindex"]=_562;
var ret=_566.create(_565,frag,_561);
return ret;
};
dojo.provide("dojo.widget.Parse");
dojo.require("dojo.widget.Manager");
dojo.require("dojo.dom");
dojo.widget.Parse=function(_568){
this.propertySetsList=[];
this.fragment=_568;
this.createComponents=function(_569,_56a){
var _56b=dojo.widget.tags;
var _56c=[];
for(var item in _569){
var _56e=false;
try{
if(_569[item]&&(_569[item]["tagName"])&&(_569[item]!=_569["nodeRef"])){
var tn=new String(_569[item]["tagName"]);
var tna=tn.split(";");
for(var x=0;x<tna.length;x++){
var ltn=(tna[x].replace(/^\s+|\s+$/g,"")).toLowerCase();
if(_56b[ltn]){
_56e=true;
_569[item].tagName=ltn;
var ret=_56b[ltn](_569[item],this,_56a,_569[item]["index"]);
_56c.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((!_56e)&&(typeof _569[item]=="object")&&(_569[item]!=_569.nodeRef)&&(_569[item]!=_569["tagName"])){
_56c.push(this.createComponents(_569[item],_56a));
}
}
return _56c;
};
this.parsePropertySets=function(_574){
return [];
var _575=[];
for(var item in _574){
if((_574[item]["tagName"]=="dojo:propertyset")){
_575.push(_574[item]);
}
}
this.propertySetsList.push(_575);
return _575;
};
this.parseProperties=function(_577){
var _578={};
for(var item in _577){
if((_577[item]==_577["tagName"])||(_577[item]==_577.nodeRef)){
}else{
if((_577[item]["tagName"])&&(dojo.widget.tags[_577[item].tagName.toLowerCase()])){
}else{
if((_577[item][0])&&(_577[item][0].value!="")&&(_577[item][0].value!=null)){
try{
if(item.toLowerCase()=="dataprovider"){
var _57a=this;
this.getDataProvider(_57a,_577[item][0].value);
_578.dataProvider=this.dataProvider;
}
_578[item]=_577[item][0].value;
var _57b=this.parseProperties(_577[item]);
for(var _57c in _57b){
_578[_57c]=_57b[_57c];
}
}
catch(e){
dojo.debug(e);
}
}
}
}
}
return _578;
};
this.getDataProvider=function(_57d,_57e){
dojo.io.bind({url:_57e,load:function(type,_580){
if(type=="load"){
_57d.dataProvider=_580;
}
},mimetype:"text/javascript",sync:true});
};
this.getPropertySetById=function(_581){
for(var x=0;x<this.propertySetsList.length;x++){
if(_581==this.propertySetsList[x]["id"][0].value){
return this.propertySetsList[x];
}
}
return "";
};
this.getPropertySetsByType=function(_583){
var _584=[];
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)){
_584.push(cpl);
}
}
return _584;
};
this.getPropertySets=function(_588){
var ppl="dojo:propertyproviderlist";
var _58a=[];
var _58b=_588["tagName"];
if(_588[ppl]){
var _58c=_588[ppl].value.split(" ");
for(propertySetId in _58c){
if((propertySetId.indexOf("..")==-1)&&(propertySetId.indexOf("://")==-1)){
var _58d=this.getPropertySetById(propertySetId);
if(_58d!=""){
_58a.push(_58d);
}
}else{
}
}
}
return (this.getPropertySetsByType(_58b)).concat(_58a);
};
this.createComponentFromScript=function(_58e,_58f,_590){
var ltn="dojo:"+_58f.toLowerCase();
if(dojo.widget.tags[ltn]){
_590.fastMixIn=true;
return [dojo.widget.tags[ltn](_590,this,null,null,_590)];
}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,_594,_595,_596){
function fromScript(_597,name,_599){
var _59a=name.toLowerCase();
var _59b="dojo:"+_59a;
_599[_59b]={dojotype:[{value:_59a}],nodeRef:_597,fastMixIn:true};
return dojo.widget.getParser().createComponentFromScript(_597,name,_599,true);
}
if(typeof name!="string"&&typeof _594=="string"){
dojo.deprecated("dojo.widget.createWidget","argument order is now of the form "+"dojo.widget.createWidget(NAME, [PROPERTIES, [REFERENCENODE, [POSITION]]])");
return fromScript(name,_594,_595);
}
_594=_594||{};
var _59c=false;
var tn=null;
var h=dojo.render.html.capable;
if(h){
tn=document.createElement("span");
}
if(!_595){
_59c=true;
_595=tn;
if(h){
document.body.appendChild(_595);
}
}else{
if(_596){
dojo.dom.insertAtPosition(tn,_595,_596);
}else{
tn=_595;
}
}
var _59f=fromScript(tn,name,_594);
if(!_59f[0]||typeof _59f[0].widgetType=="undefined"){
throw new Error("createWidget: Creation of \""+name+"\" widget failed.");
}
if(_59c){
if(_59f[0].domNode.parentNode){
_59f[0].domNode.parentNode.removeChild(_59f[0].domNode);
}
}
return _59f[0];
};
dojo.widget.fromScript=function(name,_5a1,_5a2,_5a3){
dojo.deprecated("dojo.widget.fromScript"," use "+"dojo.widget.createWidget instead");
return dojo.widget.createWidget(name,_5a1,_5a2,_5a3);
};
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 _5a9=new dojo.uri.Uri(arguments[i].toString());
var _5aa=new dojo.uri.Uri(uri.toString());
if(_5a9.path==""&&_5a9.scheme==null&&_5a9.authority==null&&_5a9.query==null){
if(_5a9.fragment!=null){
_5aa.fragment=_5a9.fragment;
}
_5a9=_5aa;
}else{
if(_5a9.scheme==null){
_5a9.scheme=_5aa.scheme;
if(_5a9.authority==null){
_5a9.authority=_5aa.authority;
if(_5a9.path.charAt(0)!="/"){
var path=_5aa.path.substring(0,_5aa.path.lastIndexOf("/")+1)+_5a9.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;
}
}
}
}
_5a9.path=segs.join("/");
}
}
}
}
uri="";
if(_5a9.scheme!=null){
uri+=_5a9.scheme+":";
}
if(_5a9.authority!=null){
uri+="//"+_5a9.authority;
}
uri+=_5a9.path;
if(_5a9.query!=null){
uri+="?"+_5a9.query;
}
if(_5a9.fragment!=null){
uri+="#"+_5a9.fragment;
}
}
this.uri=uri.toString();
var _5ae="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";
var r=this.uri.match(new RegExp(_5ae));
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){
_5ae="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$";
r=this.authority.match(new RegExp(_5ae));
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.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,_5b1,_5b2,_5b3,_5b4){
var _5b5=_5b1||obj.templatePath;
var _5b6=_5b2||obj.templateCssPath;
if(_5b5&&!(_5b5 instanceof dojo.uri.Uri)){
_5b5=dojo.uri.dojoUri(_5b5);
dojo.deprecated("templatePath should be of type dojo.uri.Uri");
}
if(_5b6&&!(_5b6 instanceof dojo.uri.Uri)){
_5b6=dojo.uri.dojoUri(_5b6);
dojo.deprecated("templateCssPath should be of type dojo.uri.Uri");
}
var _5b7=dojo.widget._templateCache;
if(!obj["widgetType"]){
do{
var _5b8="__dummyTemplate__"+dojo.widget._templateCache.dummyCount++;
}while(_5b7[_5b8]);
obj.widgetType=_5b8;
}
var wt=obj.widgetType;
if((_5b6)&&(!dojo.widget._cssFiles[_5b6])){
dojo.style.insertCssFile(_5b6);
obj.templateCssPath=null;
dojo.widget._cssFiles[_5b6]=true;
}
var ts=_5b7[wt];
if(!ts){
_5b7[wt]={"string":null,"node":null};
if(_5b4){
ts={};
}else{
ts=_5b7[wt];
}
}
if(!obj.templateString){
obj.templateString=_5b3||ts["string"];
}
if(!obj.templateNode){
obj.templateNode=ts["node"];
}
if((!obj.templateNode)&&(!obj.templateString)&&(_5b5)){
var _5bb=dojo.hostenv.getText(_5b5);
if(_5bb){
var _5bc=_5bb.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_5bc){
_5bb=_5bc[1];
}
}else{
_5bb="";
}
obj.templateString=_5bb;
if(!_5b4){
_5b7[wt]["string"]=_5bb;
}
}
if((!ts["string"])&&(!_5b4)){
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(_5bd,_5be,_5bf){
var _5c0=dojo.dom.ELEMENT_NODE;
function trim(str){
return str.replace(/^\s+|\s+$/g,"");
}
if(!_5bd){
_5bd=_5be.domNode;
}
if(_5bd.nodeType!=_5c0){
return;
}
var _5c2=_5bd.getElementsByTagName("*");
var _5c3=_5be;
for(var x=-1;x<_5c2.length;x++){
var _5c5=(x==-1)?_5bd:_5c2[x];
var _5c6=[];
for(var y=0;y<this.attachProperties.length;y++){
var _5c8=_5c5.getAttribute(this.attachProperties[y]);
if(_5c8){
_5c6=_5c8.split(";");
for(var z=0;z<this.attachProperties.length;z++){
if((_5be[_5c6[z]])&&(dojo.lang.isArray(_5be[_5c6[z]]))){
_5be[_5c6[z]].push(_5c5);
}else{
_5be[_5c6[z]]=_5c5;
}
}
break;
}
}
var _5ca=_5c5.getAttribute(this.templateProperty);
if(_5ca){
_5be[_5ca]=_5c5;
}
var _5cb=_5c5.getAttribute(this.eventAttachProperty);
if(_5cb){
var evts=_5cb.split(";");
for(var y=0;y<evts.length;y++){
if((!evts[y])||(!evts[y].length)){
continue;
}
var _5cd=null;
var tevt=trim(evts[y]);
if(evts[y].indexOf(":")>=0){
var _5cf=tevt.split(":");
tevt=trim(_5cf[0]);
_5cd=trim(_5cf[1]);
}
if(!_5cd){
_5cd=tevt;
}
var tf=function(){
var ntf=new String(_5cd);
return function(evt){
if(_5c3[ntf]){
_5c3[ntf](dojo.event.browser.fixEvent(evt));
}
};
}();
dojo.event.browser.addListener(_5c5,tevt,tf,false,true);
}
}
for(var y=0;y<_5bf.length;y++){
var _5d3=_5c5.getAttribute(_5bf[y]);
if((_5d3)&&(_5d3.length)){
var _5cd=null;
var _5d4=_5bf[y].substr(4);
_5cd=trim(_5d3);
var tf=function(){
var ntf=new String(_5cd);
return function(evt){
if(_5c3[ntf]){
_5c3[ntf](dojo.event.browser.fixEvent(evt));
}
};
}();
dojo.event.browser.addListener(_5c5,_5d4,tf,false,true);
}
}
var _5d7=_5c5.getAttribute(this.onBuildProperty);
if(_5d7){
eval("var node = baseNode; var widget = targetObj; "+_5d7);
}
_5c5.id="";
}
};
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,_5e0,_5e1,_5e2,_5e3){
this.buildFromTemplate(obj,_5e0,_5e1,_5e2);
var node=dojo.dom.createNodesFromText(obj.templateString,true)[0];
this.attachTemplateNodes(node,_5e3||obj,dojo.widget.getDojoEventsFromStr(_5e2));
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(_5e5,_5e6,pos,ref,_5e9){
if(!this.isContainer){
dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget");
return null;
}else{
this.addWidgetAsDirectChild(_5e5,_5e6,pos,ref,_5e9);
this.registerChild(_5e5,_5e9);
}
return _5e5;
},addWidgetAsDirectChild:function(_5ea,_5eb,pos,ref,_5ee){
if((!this.containerNode)&&(!_5eb)){
this.containerNode=this.domNode;
}
var cn=(_5eb)?_5eb:this.containerNode;
if(!pos){
pos="after";
}
if(!ref){
ref=cn.lastChild;
}
if(!_5ee){
_5ee=0;
}
_5ea.domNode.setAttribute("dojoinsertionindex",_5ee);
if(!ref){
cn.appendChild(_5ea.domNode);
}else{
if(pos=="insertAtIndex"){
dojo.dom.insertAtIndex(_5ea.domNode,ref.parentNode,_5ee);
}else{
if((pos=="after")&&(ref===cn.lastChild)){
cn.appendChild(_5ea.domNode);
}else{
dojo.dom.insertAtPosition(_5ea.domNode,cn,pos);
}
}
}
},registerChild:function(_5f0,_5f1){
_5f0.dojoInsertionIndex=_5f1;
var idx=-1;
for(var i=0;i<this.children.length;i++){
if(this.children[i].dojoInsertionIndex<_5f1){
idx=i;
}
}
this.children.splice(idx+1,0,_5f0);
_5f0.parent=this;
_5f0.addedTo(this);
delete dojo.widget.manager.topWidgets[_5f0.widgetId];
},removeChild:function(_5f4){
dojo.dom.removeNode(_5f4.domNode);
return dojo.widget.DomWidget.superclass.removeChild.call(this,_5f4);
},getFragNodeRef:function(frag){
if(!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,_5f8){
var _5f9=this.getFragNodeRef(frag);
if(_5f8&&(_5f8.snarfChildDomOutput||!_5f9)){
_5f8.addWidgetAsDirectChild(this,"","insertAtIndex","",args["dojoinsertionindex"],_5f9);
}else{
if(_5f9){
if(this.domNode&&(this.domNode!==_5f9)){
var _5fa=_5f9.parentNode.replaceChild(this.domNode,_5f9);
}
}
}
if(_5f8){
_5f8.registerChild(this,args.dojoinsertionindex);
}else{
dojo.widget.manager.topWidgets[this.widgetId]=this;
}
if(this.isContainer){
var _5fb=dojo.widget.getParser();
_5fb.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 _601=false;
if(args["templatecsspath"]){
args["templateCssPath"]=args["templatecsspath"];
}
if(args["templatepath"]){
_601=true;
args["templatePath"]=args["templatepath"];
}
dojo.widget.fillFromTemplateCache(this,args["templatePath"],args["templateCssPath"],null,_601);
var ts=dojo.widget._templateCache[this.widgetType];
if((ts)&&(!_601)){
if(!this.templateString.length){
this.templateString=ts["string"];
}
if(!this.templateNode){
this.templateNode=ts["node"];
}
}
var _603=false;
var node=null;
var tstr=this.templateString;
if((!this.templateNode)&&(this.templateString)){
_603=this.templateString.match(/\$\{([^\}]+)\}/g);
if(_603){
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<_603.length;i++){
var key=_603[i];
key=key.substring(2,key.length-1);
var kval=(key.substring(0,5)=="this.")?this[key.substring(5)]:hash[key];
var _60a;
if((kval)||(dojo.lang.isString(kval))){
_60a=(dojo.lang.isFunction(kval))?kval.call(this,key,this.templateString):kval;
tstr=tstr.replace(_603[i],_60a);
}
}
}else{
this.templateNode=this.createNodesFromText(this.templateString,true)[0];
ts.node=this.templateNode;
}
}
if((!this.templateNode)&&(!_603)){
dojo.debug("weren't able to create template!");
return false;
}else{
if(!_603){
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(_60c,_60d){
if(!_60d){
_60d=this;
}
return dojo.widget.attachTemplateNodes(_60c,_60d,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.html");
dojo.require("dojo.lang.func");
dojo.require("dojo.dom");
dojo.require("dojo.style");
dojo.require("dojo.string");
dojo.require("dojo.string.extras");
dojo.require("dojo.uri.Uri");
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(_60e){
_60e=dojo.byId(_60e)||document.body;
var h=dojo.render.html;
if(h.mozilla){
_60e.style.MozUserSelect="none";
}else{
if(h.safari){
_60e.style.KhtmlUserSelect="none";
}else{
if(h.ie){
_60e.unselectable="on";
}else{
return false;
}
}
}
return true;
};
dojo.html.enableSelection=function(_610){
_610=dojo.byId(_610)||document.body;
var h=dojo.render.html;
if(h.mozilla){
_610.style.MozUserSelect="";
}else{
if(h.safari){
_610.style.KhtmlUserSelect="";
}else{
if(h.ie){
_610.unselectable="off";
}else{
return false;
}
}
}
return true;
};
dojo.html.selectElement=function(_612){
_612=dojo.byId(_612);
if(document.selection&&document.body.createTextRange){
var _613=document.body.createTextRange();
_613.moveToElementText(_612);
_613.select();
}else{
if(window["getSelection"]){
var _614=window.getSelection();
if(_614["selectAllChildren"]){
_614.selectAllChildren(_612);
}
}
}
};
dojo.html.isSelectionCollapsed=function(){
if(document["selection"]){
return document.selection.createRange().text=="";
}else{
if(window["getSelection"]){
var _615=window.getSelection();
if(dojo.lang.isString(_615)){
return _615=="";
}else{
return _615.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.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 _61f=dojo.byId(node);
type=type.toLowerCase();
while((_61f)&&(_61f.nodeName.toLowerCase()!=type)){
if(_61f==(document["body"]||document["documentElement"])){
return null;
}
_61f=_61f.parentNode;
}
return _61f;
};
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){
node=dojo.byId(node);
var c=dojo.html.getClass(node);
return (c=="")?[]:c.split(/\s+/g);
};
dojo.html.hasClass=function(node,_62b){
node=dojo.byId(node);
return dojo.lang.inArray(dojo.html.getClasses(node),_62b);
};
dojo.html.prependClass=function(node,_62d){
node=dojo.byId(node);
if(!node){
return false;
}
_62d+=" "+dojo.html.getClass(node);
return dojo.html.setClass(node,_62d);
};
dojo.html.addClass=function(node,_62f){
node=dojo.byId(node);
if(!node){
return false;
}
if(dojo.html.hasClass(node,_62f)){
return false;
}
_62f=dojo.string.trim(dojo.html.getClass(node)+" "+_62f);
return dojo.html.setClass(node,_62f);
};
dojo.html.setClass=function(node,_631){
node=dojo.byId(node);
if(!node){
return false;
}
var cs=new String(_631);
try{
if(typeof node.className=="string"){
node.className=cs;
}else{
if(node.setAttribute){
node.setAttribute("class",_631);
node.className=cs;
}else{
return false;
}
}
}
catch(e){
dojo.debug("dojo.html.setClass() failed",e);
}
return true;
};
dojo.html.removeClass=function(node,_634,_635){
node=dojo.byId(node);
if(!node){
return false;
}
var _634=dojo.string.trim(new String(_634));
try{
var cs=dojo.html.getClasses(node);
var nca=[];
if(_635){
for(var i=0;i<cs.length;i++){
if(cs[i].indexOf(_634)==-1){
nca.push(cs[i]);
}
}
}else{
for(var i=0;i<cs.length;i++){
if(cs[i]!=_634){
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,_63a,_63b){
node=dojo.byId(node);
dojo.html.removeClass(node,_63b);
dojo.html.addClass(node,_63a);
};
dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2};
dojo.html.getElementsByClass=function(_63c,_63d,_63e,_63f){
_63d=dojo.byId(_63d);
if(!_63d){
_63d=document;
}
var _640=_63c.split(/\s+/g);
var _641=[];
if(_63f!=1&&_63f!=2){
_63f=0;
}
var _642=new RegExp("(\\s|^)(("+_640.join(")|(")+"))(\\s|$)");
if(!_63e){
_63e="*";
}
var _643=_63d.getElementsByTagName(_63e);
outer:
for(var i=0;i<_643.length;i++){
var node=_643[i];
var _646=dojo.html.getClasses(node);
if(_646.length==0){
continue outer;
}
var _647=0;
for(var j=0;j<_646.length;j++){
if(_642.test(_646[j])){
if(_63f==dojo.html.classMatchType.ContainsAny){
_641.push(node);
continue outer;
}else{
_647++;
}
}else{
if(_63f==dojo.html.classMatchType.IsOnly){
continue outer;
}
}
}
if(_647==_640.length){
if(_63f==dojo.html.classMatchType.IsOnly&&_647==_646.length){
_641.push(node);
}else{
if(_63f==dojo.html.classMatchType.ContainsAll){
_641.push(node);
}
}
}
}
return _641;
};
dojo.html.getElementsByClassName=dojo.html.getElementsByClass;
dojo.html.gravity=function(node,e){
node=dojo.byId(node);
var _64b=e.pageX||e.clientX+document.body.scrollLeft;
var _64c=e.pageY||e.clientY+document.body.scrollTop;
with(dojo.html){
var _64d=getAbsoluteX(node)+(getInnerWidth(node)/2);
var _64e=getAbsoluteY(node)+(getInnerHeight(node)/2);
}
with(dojo.html.gravity){
return ((_64b<_64d?WEST:EAST)|(_64c<_64e?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(_64f,e){
_64f=dojo.byId(_64f);
var _651=e.pageX||e.clientX+document.body.scrollLeft;
var _652=e.pageY||e.clientY+document.body.scrollTop;
with(dojo.html){
var top=getAbsoluteY(_64f);
var _654=top+getInnerHeight(_64f);
var left=getAbsoluteX(_64f);
var _656=left+getInnerWidth(_64f);
}
return (_651>=left&&_651<=_656&&_652>=top&&_652<=_654);
};
dojo.html.renderedTextContent=function(node){
node=dojo.byId(node);
var _658="";
if(node==null){
return _658;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
var _65a="unknown";
try{
_65a=dojo.style.getStyle(node.childNodes[i],"display");
}
catch(E){
}
switch(_65a){
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":
_658+="\n";
_658+=dojo.html.renderedTextContent(node.childNodes[i]);
_658+="\n";
break;
case "none":
break;
default:
if(node.childNodes[i].tagName&&node.childNodes[i].tagName.toLowerCase()=="br"){
_658+="\n";
}else{
_658+=dojo.html.renderedTextContent(node.childNodes[i]);
}
break;
}
break;
case 3:
case 2:
case 4:
var text=node.childNodes[i].nodeValue;
var _65c="unknown";
try{
_65c=dojo.style.getStyle(node,"text-transform");
}
catch(E){
}
switch(_65c){
case "capitalize":
text=dojo.string.capitalize(text);
break;
case "uppercase":
text=text.toUpperCase();
break;
case "lowercase":
text=text.toLowerCase();
break;
default:
break;
}
switch(_65c){
case "nowrap":
break;
case "pre-wrap":
break;
case "pre-line":
break;
case "pre":
break;
default:
text=text.replace(/\s+/," ");
if(/\s$/.test(_658)){
text.replace(/^\s/,"");
}
break;
}
_658+=text;
break;
default:
break;
}
}
return _658;
};
dojo.html.setActiveStyleSheet=function(_65d){
var i,a,main;
for(i=0;(a=document.getElementsByTagName("link")[i]);i++){
if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")){
a.disabled=true;
if(a.getAttribute("title")==_65d){
a.disabled=false;
}
}
}
};
dojo.html.getActiveStyleSheet=function(){
var i,a;
for(i=0;(a=document.getElementsByTagName("link")[i]);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,a;
for(i=0;(a=document.getElementsByTagName("link")[i]);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 _664="none";
if((/^<t[dh][\s\r\n>]/i).test(dojo.string.trimStart(txt))){
txt="<table><tbody><tr>"+txt+"</tr></tbody></table>";
_664="cell";
}else{
if((/^<tr[\s\r\n>]/i).test(dojo.string.trimStart(txt))){
txt="<table><tbody>"+txt+"</tbody></table>";
_664="row";
}else{
if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(dojo.string.trimStart(txt))){
txt="<table>"+txt+"</table>";
_664="section";
}
}
}
tn.innerHTML=txt;
tn.normalize();
var _665=null;
switch(_664){
case "cell":
_665=tn.getElementsByTagName("tr")[0];
break;
case "row":
_665=tn.getElementsByTagName("tbody")[0];
break;
case "section":
_665=tn.getElementsByTagName("table")[0];
break;
default:
_665=tn;
break;
}
var _666=[];
for(var x=0;x<_665.childNodes.length;x++){
_666.push(_665.childNodes[x].cloneNode(true));
}
tn.style.display="none";
document.body.removeChild(tn);
return _666;
};
if(!dojo.evalObjPath("dojo.dom.createNodesFromText")){
dojo.dom.createNodesFromText=function(){
dojo.deprecated("dojo.dom.createNodesFromText","use dojo.html.createNodesFromText instead");
return dojo.html.createNodesFromText.apply(dojo.html,arguments);
};
}
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,_66c,_66d,_66e,_66f){
if(dojo.lang.isArray(_66c)){
_66f=_66e;
_66e=_66d;
_66d=_66c[1];
_66c=_66c[0];
}
if(!isNaN(_66e)){
_66e=[Number(_66e),Number(_66e)];
}else{
if(!dojo.lang.isArray(_66e)){
_66e=[0,0];
}
}
var _670=dojo.html.getScrollOffset();
var view=dojo.html.getViewportSize();
node=dojo.byId(node);
var w=node.offsetWidth+_66e[0];
var h=node.offsetHeight+_66e[1];
if(_66f){
_66c-=_670.x;
_66d-=_670.y;
}
var x=_66c+w;
if(x>view.w){
x=view.w-w;
}else{
x=_66c;
}
x=Math.max(_66e[0],x)+_670.x;
var y=_66d+h;
if(y>view.h){
y=view.h-h;
}else{
y=_66d;
}
y=Math.max(_66e[1],y)+_670.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,_678,_679,_67a,_67b){
if(dojo.lang.isArray(_678)){
_67b=_67a;
_67a=_679;
_679=_678[1];
_678=_678[0];
}
if(!isNaN(_67a)){
_67a=[Number(_67a),Number(_67a)];
}else{
if(!dojo.lang.isArray(_67a)){
_67a=[0,0];
}
}
var _67c=dojo.html.getScrollOffset();
var view=dojo.html.getViewportSize();
node=dojo.byId(node);
var _67e=node.style.display;
node.style.display="";
var w=dojo.style.getInnerWidth(node);
var h=dojo.style.getInnerHeight(node);
node.style.display=_67e;
if(_67b){
_678-=_67c.x;
_679-=_67c.y;
}
var x=-1,y=-1;
if((_678+_67a[0])+w<=view.w&&(_679+_67a[1])+h<=view.h){
x=(_678+_67a[0]);
y=(_679+_67a[1]);
}
if((x<0||y<0)&&(_678-_67a[0])<=view.w&&(_679+_67a[1])+h<=view.h){
x=(_678-_67a[0])-w;
y=(_679+_67a[1]);
}
if((x<0||y<0)&&(_678+_67a[0])+w<=view.w&&(_679-_67a[1])<=view.h){
x=(_678+_67a[0]);
y=(_679-_67a[1])-h;
}
if((x<0||y<0)&&(_678-_67a[0])<=view.w&&(_679-_67a[1])<=view.h){
x=(_678-_67a[0])-w;
y=(_679-_67a[1])-h;
}
if(x<0||y<0||(x+w>view.w)||(y+h>view.h)){
return dojo.html.placeOnScreen(node,_678,_679,_67a,_67b);
}
x+=_67c.x;
y+=_67c.y;
node.style.left=x+"px";
node.style.top=y+"px";
var ret=[x,y];
ret.x=x;
ret.y=y;
return ret;
};
dojo.style.insertCssFile=function(URI,doc,_685){
if(!URI){
return;
}
if(!doc){
doc=document;
}
if(doc.baseURI){
URI=new dojo.uri.Uri(doc.baseURI,URI);
}
if(_685&&doc.styleSheets){
var loc=location.href.split("#")[0].substring(0,location.href.indexOf(location.pathname));
for(var i=0;i<doc.styleSheets.length;i++){
if(doc.styleSheets[i].href&&URI.toString()==new dojo.uri.Uri(doc.styleSheets[i].href.toString())){
return;
}
}
}
var file=doc.createElement("link");
file.setAttribute("type","text/css");
file.setAttribute("rel","stylesheet");
file.setAttribute("href",URI);
var head=doc.getElementsByTagName("head")[0];
if(head){
head.appendChild(file);
}
};
dojo.html.BackgroundIframe=function(){
if(this.ie){
this.iframe=document.createElement("<iframe frameborder='0' src='about:blank'>");
var s=this.iframe.style;
s.position="absolute";
s.left=s.top="0px";
s.zIndex=2;
s.display="none";
dojo.style.setOpacity(this.iframe,0);
document.body.appendChild(this.iframe);
}else{
this.enabled=false;
}
};
dojo.lang.extend(dojo.html.BackgroundIframe,{ie:dojo.render.html.ie,enabled:true,visibile:false,iframe:null,sizeNode:null,sizeCoords:null,size:function(node){
if(!this.ie||!this.enabled){
return;
}
if(dojo.dom.isNode(node)){
this.sizeNode=node;
}else{
if(arguments.length>0){
this.sizeNode=null;
this.sizeCoords=node;
}
}
this.update();
},update:function(){
if(!this.ie||!this.enabled){
return;
}
if(this.sizeNode){
this.sizeCoords=dojo.html.toCoordinateArray(this.sizeNode,true);
}else{
if(this.sizeCoords){
this.sizeCoords=dojo.html.toCoordinateArray(this.sizeCoords,true);
}else{
return;
}
}
var s=this.iframe.style;
var dims=this.sizeCoords;
s.width=dims.w+"px";
s.height=dims.h+"px";
s.left=dims.x+"px";
s.top=dims.y+"px";
},setZIndex:function(node){
if(!this.ie||!this.enabled){
return;
}
if(dojo.dom.isNode(node)){
this.iframe.zIndex=dojo.html.getStyle(node,"z-index")-1;
}else{
if(!isNaN(node)){
this.iframe.zIndex=node;
}
}
},show:function(node){
if(!this.ie||!this.enabled){
return;
}
this.size(node);
this.iframe.style.display="block";
},hide:function(){
if(!this.ie){
return;
}
var s=this.iframe.style;
s.display="none";
s.width=s.height="1px";
},remove:function(){
dojo.dom.removeNode(this.iframe);
}});
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,initialize:function(args,frag){
},toggleObj:{show:function(node,_695,_696,_697){
dojo.style.show(node);
if(dojo.lang.isFunction(_697)){
_697();
}
},hide:function(node,_699,_69a,_69b){
dojo.style.hide(node);
if(dojo.lang.isFunction(_69b)){
_69b();
}
}},postMixInProperties:function(args,frag){
var _69e=(dojo.fx&&dojo.fx.html&&dojo.fx.html.toggle[this.toggle.toLowerCase()]);
if(_69e){
this.toggleObj=_69e;
}
},getContainerHeight:function(){
dj_unimplemented("dojo.widget.HtmlWidget.getContainerHeight");
},getContainerWidth:function(){
return this.parent.domNode.offsetWidth;
},setNativeHeight:function(_69f){
var ch=this.getContainerHeight();
},resizeSoon:function(){
if(this.isVisible()){
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(_6a5){
try{
if(!_6a5){
dojo.event.browser.clean(this.domNode);
}
this.domNode.parentNode.removeChild(this.domNode);
delete this.domNode;
}
catch(e){
}
},isVisible:function(){
return dojo.style.isVisible(this.domNode);
},doToggle:function(){
this.isVisible()?this.hide():this.show();
},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;
}});
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("turbo.lib.theme");
dojo.require("dojo.io.*");
dojo.require("dojo.html");
dojo.require("turbo.turbo");
turbo.stylesheet={cssFiles:[],links:[],rules:0,loadCost:0,processCost:0,dummy:0};
turbo.stylesheet.create=function(_6a6){
var l=document.createElement("link");
l.setAttribute("rel","stylesheet");
l.setAttribute("type","text/css");
l.setAttribute("href",_6a6+"/base.css");
return l;
};
turbo.stylesheet.getLink=function(_6a8){
var l=turbo.stylesheet.links[_6a8];
if(!l){
l=turbo.stylesheet.create(_6a8);
turbo.addHeadNode(l);
turbo.stylesheet.links[_6a8]=l;
}
return l;
};
turbo.stylesheet.getLinkSheet=function(_6aa){
var s=null;
if(!_6aa.addRule){
turbo.debug("stylesheet has no addRule method");
if(_6aa.styleSheet){
s=_6aa.styleSheet;
}else{
turbo.debug("turbo.stylesheet.getLinkSheet: link has no .styleSheet property");
}
}
return s;
};
turbo.stylesheet.loaded=function(_6ac){
if(!_6ac||turbo.stylesheet.cssFiles[_6ac]){
return true;
}
turbo.stylesheet.cssFiles[_6ac]=true;
return false;
};
turbo.stylesheet.append=function(_6ad){
if(turbo.stylesheet.loaded(_6ad)){
return;
}
var t=turbo.time();
dojo.io.bind({url:_6ad,sync:true,load:function(_6af,_6b0){
turbo.stylesheet._append(_6ad,_6b0);
},error:function(e,m){
turbo.debug(m.message+": "+_6ad);
}});
};
turbo.stylesheet._append=function(_6b3,_6b4){
var s=turbo.stylesheet.getLink(turbo.pathpop(_6b3)).styleSheet;
if(!s||!s.addRule){
return;
}
var _6b6=/(\/\*[\s\S]*?\*\/)/g;
_6b4=_6b4.replace(_6b6,"");
var _6b6=/[\s]*([^{]*)({[^}]*})/g;
while((result=_6b6.exec(_6b4))!=null){
var rule=result[2];
var _6b8=result[1].split(",");
for(var i in _6b8){
s.addRule(_6b8[i],rule);
}
}
};
turbo.stylesheet.importStyleSheet=function(_6ba){
if(turbo.stylesheet.loaded(_6ba)){
return;
}
dojo.style.insertCssFile(_6ba);
};
turbo.stylesheet.importThemeFile=function(_6bb){
if(djConfig["turbo_hand_css"]){
return;
}
if(djConfig["turbo_fine_css"]){
if(dojo.render.html.ie){
turbo.stylesheet.append(_6bb);
}else{
turbo.stylesheet.importStyleSheet(_6bb);
}
}else{
turbo.stylesheet.importStyleSheet(turbo.pathpop(_6bb)+"/theme.css");
}
};
turbo.themes=new function(){
this.theme="";
this.themeable=[];
this.addThemeable=function(_6bc){
this.themeable.push(_6bc);
};
this.setTheme=function(_6bd){
this.theme=(_6bd?_6bd:"default");
for(var i in this.themeable){
this.themeable[i].setTheme(this.theme);
}
if(turbo["aligner"]){
turbo.defer(turbo.aligner.align,250);
turbo.defer(turbo.aligner.align,1000);
}
};
};
dojo.provide("turbo.widgets.TurboWidget");
dojo.require("dojo.widget.*");
dojo.require("turbo.turbo");
dojo.require("turbo.lib.theme");
dojo.require("turbo.lib.align");
turbo.widgetRoot="../turbo/widgets/";
turbo.templateRoot=turbo.widgetRoot+"templates/";
turbo.themeRoot=turbo.widgetRoot+"themes/";
turbo.themePath=dojo.hostenv.getBaseScriptUri()+turbo.themeRoot;
turbo.loadJs=function(_6bf){
turbo.loadScript(dojo.hostenv.getBaseScriptUri()+_6bf);
};
turbo.loadCss=function(_6c0){
turbo.stylesheet.importThemeFile(dojo.hostenv.getBaseScriptUri()+_6c0);
};
turbo.setWidgetType=function(_6c1,_6c2){
if(_6c1.widgetType=="HtmlWidget"){
_6c1.widgetType=_6c2;
}
};
dojo.widget.HtmlTurboWidget=function(){
dojo.widget.HtmlWidget.call(this);
this.themeRoot=turbo.themeRoot;
this.templateRoot=turbo.templateRoot;
this.templatePath=dojo.uri.dojoUri(this.templateRoot+this.widgetType+".html");
this.styleRoot=this.widgetType;
this.isContainer=false;
this.debuggable=true;
this.style="";
this.theme="";
this.themeable=true;
this.turboalign="";
this.themeJs=false;
this.onCreate=function(){
};
this.initialize=function(){
if(this.widgetId.substr(-2,1)!="_"&&this.widgetId.substr(-3,1)!="_"){
dj_global[this.widgetId]=this;
}
if(this.extraArgs["turboAlign"]){
this.turboalign=this.extraArgs.turboAlign;
}
if(this.turboalign){
this.domNode.setAttribute("turboalign",this.turboalign);
}
if(this.extraArgs["class"]){
this.domNode.className=this.extraArgs["class"];
}
this.domNode.id=this.widgetId;
if(this.themeable){
turbo.themes.addThemeable(this);
if(!this.theme){
this.theme=turbo.themes.theme;
}
this.setTheme(this.theme);
}
};
this.bindArgEvent=function(_6c3,_6c4){
if(_6c4[_6c3]){
this[_6c3]=turbo.getFunction(_6c4[_6c3]);
}
};
this.bindArgEvents=function(_6c5){
var _6c6=[];
for(var arg in _6c5){
if(!_6c6[arg]&&dojo.lang.isFunction(this[arg])){
_6c6[arg]=true;
var _6c8=_6c5[arg];
if(_6c8.search(/[^\w\.]+/i)==-1){
var func=turbo.getFunction(_6c8);
if(func){
this[arg]=func;
}else{
this.debug("bindArgEvents","could not bind \""+arg+"\" to \""+_6c8+"\"");
}
}
}
}
};
this.getWidgetFragment=function(_6ca){
return _6ca["dojo:"+this.widgetType.toLowerCase()]["nodeRef"];
};
this.parseContent=function(_6cb){
var frag=this.getWidgetFragment(_6cb);
return dojo.widget.getParser().createComponents(frag);
};
this.installChildren=function(_6cd,_6ce){
var _6cf=(_6ce?_6ce:this.domNode);
dojo.dom.moveChildren(this.getWidgetFragment(_6cd),_6cf);
var frag=new dojo.xml.Parse().parseElement(_6cf);
dojo.widget.getParser().createComponents(frag);
};
this.getStylePath=function(_6d1){
return this.themeRoot+(_6d1?_6d1:"default")+"/"+this.styleRoot+_6d1;
};
this.loadStyle=function(_6d2){
var p=this.getStylePath(_6d2);
turbo.loadCss(p+".css");
if(this.themeJs){
turbo.loadJs(p+"Theme.js");
}
};
this.setStyle=function(_6d4){
this.style=(_6d4=="default"?"":_6d4);
this.loadStyle(this.style);
this.styleChanged();
};
this.setTheme=function(_6d5){
this.loadStyle("");
if(!this.themeable){
return;
}
if(_6d5&&(_6d5.charAt(0)=="+")){
this.themeable=false;
_6d5=_6d5.substring(1);
}
this.setStyle(_6d5);
};
this.styleChanged=function(){
};
this.setStyledClass=function(_6d6,_6d7){
if(!_6d7){
_6d7="";
}
_6d6.className=this.classTag+_6d7+(this.style?" "+this.classTag+this.style+_6d7:"");
};
this.setClassName=this.setStyledClass;
this.debug=function(_6d8,_6d9){
if(this.debuggable){
turbo.debug(this.widgetId+" ["+this.widgetType+"]: "+_6d8+": "+_6d9);
}
};
this.showHide=function(_6da){
if(_6da){
this.show();
}else{
this.hide();
}
};
};
dojo.widget.HtmlTurboValueWidget=function(){
dojo.widget.HtmlTurboWidget.call(this);
this.defaultValue=null;
this.value="";
this.fillInTemplate=function(){
if(this.value){
eval("this.defaultValue = "+this.value);
}
if(this.setValue){
this.setValue(this.defaultValue);
}
};
};
dojo.widget.HtmlTurboNotifier=function(){
dojo.widget.HtmlWidget.call(this);
this.widgetType="TurboNotifier";
this.templateString="<div dojoAttachPoint=\"div\" style=\"display:none;\"></div>";
this.notify="";
this.div=null;
this.fillInTemplate=function(){
if(this.notify){
eval(this.notify+"(this);");
}
};
};
dojo.inherits(dojo.widget.HtmlTurboNotifier,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turbonotifier");
dojo.provide("turbo.widgets.TurboButton");
dojo.provide("turbo.widgets.HtmlTurboButton");
dojo.require("turbo.widgets.TurboWidget");
turbo.button=new function(){
this.groups=[];
this.states={normal:0,down:1,disabled:2,over:3,selected:1};
this.resetGroup=function(_6db){
var g=turbo.button.groups[_6db];
for(var i in g){
if(g[i].state!=this.states.disabled){
g[i].setState(this.states.normal);
}
}
};
};
dojo.widget.TurboButtonBase=function(){
dojo.widget.HtmlTurboWidget.call(this);
this.states=turbo.button.states;
this.state="normal";
this.group="";
this.toggle="";
this.value="";
this.width="";
this.event=null;
this.type="button";
this.btn=null;
this.onClick=function(_6de){
};
this.initButton=function(_6df){
this.bindArgEvents(_6df);
if(this.state){
if(parseInt(this.state)){
this.state=parseInt(this.state);
}else{
this.state=this.states[this.state];
}
}
if(this.btn&&this.width){
this.btn.style.width=this.width+"px";
}
if(this.btn){
this.btn.setAttribute("autocomplete","off");
}
this.setGroup(this.group);
};
this.styleChanged=function(){
this.updateButton();
};
this.updateButton=function(_6e0){
dojo.debug("abstract function TurboButtonBase.updateButton invoked.");
};
this.setGroup=function(_6e1){
if(_6e1){
this.group=_6e1;
this.toggle=true;
if(!turbo.button.groups[this.group]){
turbo.button.groups[this.group]=[this];
}else{
turbo.button.groups[this.group].push(this);
}
}
};
this.show=function(){
turbo.show(this.domNode);
};
this.hide=function(){
turbo.hide(this.domNode);
};
this.blur=function(){
if(this.btn){
this.btn.blur();
}
};
this.setState=function(_6e2){
if(dojo.lang.isString(_6e2)){
_6e2=(_6e2?this.states[_6e2]:this.states.normal);
}
if(this.group&&_6e2==this.states.down){
turbo.button.resetGroup(this.group);
}
this.state=_6e2;
this.delayedState=this.state;
this.updateButton();
};
this.delayedSetState=function(){
if(this.state!=this.delayedState){
this.setState(this.delayedState);
}
this.delayedState=this.state;
};
this.onMouseOver=function(){
if((!this.toggle&&this.state!=this.states.disabled)||(this.state!=this.states.down)){
this.setState(this.states.over);
}
};
this.onMouseOut=function(){
if((!this.toggle&&this.state!=this.states.disabled)||(this.state!=this.states.down)){
this.delayedState=this.states.normal;
window.setTimeout(turbo.bind(this,this.delayedSetState),1);
}
};
this.onMouseDown=function(_6e3){
if(!this.toggle&&this.state!=this.states.disabled){
this.setState(this.states.down);
}
var btn=this.btn;
this.clicked=true;
if(_6e3){
dojo.event.browser.stopEvent(_6e3);
}
};
this.onMouseUp=function(){
if(!this.toggle&&this.state!=this.states.disabled){
this.setState(this.states.normal);
}
};
this.onMouseClick=function(_6e5){
if(!this.clicked){
this.onMouseDown(null);
window.setTimeout(turbo.bind(this,this.onMouseUp),100);
}else{
this.blur();
this.clicked=false;
}
if(this.toggle&&(!this.group||this.state!=this.states.down)){
this.setState(this.state!=this.states.down?this.states.down:this.states.normal);
}
this.event=_6e5;
this.onClick(_6e5);
};
};
dojo.widget.HtmlTurboButton=function(){
turbo.setWidgetType(this,"TurboButton");
dojo.widget.TurboButtonBase.call(this);
this.templatePath=null;
this.templateString="<div></div>";
this.classTag="turbo-button";
this.hideLeft="";
this.hideRight="";
this.themeJs=true;
this.btn=null;
this.btnLeft=null;
this.btnRight=null;
this.fillInTemplate=function(_6e6,_6e7){
this.createButtons();
this.initButton(_6e6);
if(this.hideLeft){
this.btnLeft.style.display="none";
}
if(this.hideRight){
this.btnRight.style.display="none";
}
if(!this.value){
var node=this.getWidgetFragment(_6e7);
if(node.innerHTML){
this.value=node.innerHTML;
}
}
if(this.value){
this.setCaption(this.value);
}
};
this.createButtons=function(){
var html="<button disabled=\"disabled\">&#160;</button><button type=\""+this.type+"\">Caption</button><button disabled=\"disabled\">&#160;</button>";
this.domNode.innerHTML=html;
this.setStyledClass(this.domNode,"");
this.btnLeft=this.domNode.childNodes[0];
this.btn=this.domNode.childNodes[1];
this.btnRight=this.domNode.childNodes[2];
dojo.event.connect(this.btn,"onmouseover",this,"onMouseOver");
dojo.event.connect(this.btn,"onmouseout",this,"onMouseOut");
dojo.event.connect(this.btn,"onmousedown",this,"onMouseDown");
dojo.event.connect(this.btn,"onmouseup",this,"onMouseUp");
dojo.event.connect(this.btn,"onclick",this,"onMouseClick");
};
this.getButtonClass=function(){
return ["","-down","","-over"][this.state];
};
this.setButtonClasses=function(){
var cn=this.getButtonClass();
this.btnLeft.className=this.classTag+"-left"+cn;
this.btn.className=this.classTag+"-mid"+cn;
this.btnRight.className=this.classTag+"-right"+cn;
};
this.updateButton=function(){
this.setStyledClass(this.domNode,"");
this.btn.disabled=(this.state==this.states.disabled?"disabled":"");
this.setButtonClasses();
};
this.setCaption=function(_6eb){
this.btn.innerHTML=_6eb;
};
this.set=function(_6ec,_6ed){
var h=_6ec;
if(_6ed){
h="<img src=\""+_6ed+"\" align=\"absmiddle\">&#160;"+h;
}
this.btn.innerHTML=h;
};
};
dojo.inherits(dojo.widget.HtmlTurboButton,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turboButton");
dojo.widget.HtmlTurboTab=function(){
this.widgetType="TurboTab";
dojo.widget.HtmlTurboButton.call(this);
this.classTag="turbo-tab";
this.themeJs=true;
this.getButtonClass=function(){
return ["","-down","","-over"][this.state];
};
};
dojo.inherits(dojo.widget.HtmlTurboTab,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turboTab");
dojo.widget.HtmlTurboToolbtn=function(){
this.widgetType="TurboToolbtn";
dojo.widget.TurboButtonBase.call(this);
this.templatePath=null;
this.templateString="<button dojoAttachPoint=\"btn\" dojoAttachEvent=\"onMouseDown; onMouseOver; onMouseOut; onclick: onMouseClick;\"><div dojoAttachPoint=\"div\"><img dojoAttachPoint=\"img\"></div></button>";
this.classTag="turbo_toolbtn";
this.glyph="";
this.image="";
this.caption="";
this.btn=null;
this.span=null;
this.div=null;
this.img=null;
this.fillInTemplate=function(_6ef){
this.initButton(_6ef);
this.setCaption(this.caption?this.caption:this.value);
this.setGlyph(this.image?this.image:this.glyph);
if(!dojo.render.html.ie&&!dojo.render.html.moz){
this.btn.style.paddingLeft="2px";
this.btn.style.paddingRight="2px";
}
};
this.updateButton=function(){
this.btn.disabled=(this.state==this.states.disabled?"disabled":"");
this.setStyledClass(this.btn,["","_down","","_over"][this.state]);
};
this.setCaption=function(_6f0){
if(!_6f0){
return;
}
if(!this.span){
this.span=document.createElement("span");
this.btn.appendChild(this.span);
}
this.span.innerHTML=_6f0;
};
this.setGlyph=function(_6f1){
if(_6f1){
this.img.src=_6f1;
}else{
this.img.style.display="none";
}
};
this.set=function(_6f2,_6f3){
this.setCaption(_6f2);
this.setGlyph(_6f3);
};
};
dojo.inherits(dojo.widget.HtmlTurboToolbtn,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turbotoolbtn");
dojo.widget.HtmlTurboSimpleButton=function(){
this.widgetType="TurboSimpleButton";
dojo.widget.TurboButtonBase.call(this);
this.classTag="turbo_sbtn";
this.btn=null;
this.fillInTemplate=function(_6f4){
this.initButton(_6f4);
if(this.value){
this.btn.innerHTML=this.value;
}
};
this.updateButton=function(){
this.btn.disabled=(this.state==this.states.disabled?"disabled":"");
var a=["","Down","","Over"];
this.btn.className=this.classTag+[this.state];
};
};
dojo.inherits(dojo.widget.HtmlTurboSimpleButton,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turbosimplebutton");
dojo.widget.HtmlTurboCheckbox=function(){
turbo.setWidgetType(this,"TurboCheckbox");
dojo.widget.TurboButtonBase.call(this);
this.templatePath=null;
this.templateString="<div></div>";
this.classTag="turbo_cbox";
this.btn=null;
this.span=null;
this.fillInTemplate=function(_6f6){
this.toggle=true;
this.createButtons();
this.initButton(_6f6);
if(this.value){
this.span.innerHTML=this.value;
}
};
this.blur=function(){
};
this.createButtons=function(){
var html="<button type=\""+this.type+"\"><span>Checkbox</span></button>";
this.domNode.innerHTML=html;
this.setStyledClass(this.domNode,"");
this.btn=this.domNode.childNodes[0];
this.span=this.btn.childNodes[0];
dojo.event.connect(this.btn,"onmouseover",this,"onMouseOver");
dojo.event.connect(this.btn,"onmouseout",this,"onMouseOut");
dojo.event.connect(this.btn,"onclick",this,"onMouseClick");
};
this.updateButton=function(){
this.setClassName(this.domNode,"");
var a=["Off","Down","Off","Over"];
this.setClassName(this.btn,a[this.state]);
this.btn.disabled=(this.state==this.states.disabled?"disabled":"");
this.setClassName(this.span,"Span"+a[this.state]);
};
};
dojo.inherits(dojo.widget.HtmlTurboCheckbox,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turbocheckbox");
dojo.widget.HtmlTurboRadio=function(){
this.widgetType="TurboRadio";
dojo.widget.HtmlTurboCheckbox.call(this);
this.classTag="turbo_radio";
};
dojo.inherits(dojo.widget.HtmlTurboRadio,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turboradio");
dojo.provide("turbo.widgets.TurboTableBox");
dojo.provide("turbo.widgets.HtmlTurboTableBox");
dojo.require("turbo.widgets.TurboWidget");
dojo.widget.HtmlTurboTableBox=function(){
this.widgetType="TurboTableBox";
dojo.widget.HtmlTurboWidget.call(this);
this.boxTable=null;
this.boxCaption=null;
this.boxContent=null;
this.classTag="turbo_box";
this.width="";
this.color="Yellow";
this.imageRoot=dojo.uri.dojoUri(this.themeRoot+"default/tablebox/");
this.makeContainer=function(_6f9,_6fa){
dojo.dom.moveChildren(this.getWidgetFragment(_6f9),_6fa);
var frag=new dojo.xml.Parse().parseElement(_6fa);
dojo.widget.getParser().createComponents(frag);
};
this.fillInTemplate=function(_6fc,_6fd){
if(this.width){
this.boxTable.style.width=this.width+"px";
}
this.setColor(this.color);
this.makeContainer(_6fd,this.boxContent);
this.boxCaption.appendChild(this.boxContent.removeChild(this.boxContent.firstChild));
this.boxTable.rows[0].cells[0].height="33";
this.boxTable.rows[0].cells[1].height="33";
this.boxTable.rows[0].cells[2].height="33";
};
this.setBg=function(_6fe,_6ff){
_6fe.style.backgroundImage="url("+this.imageRoot+"box"+this.color+"_0"+_6ff+".gif)";
};
this.setColor=function(_700){
this.color=_700;
var r=this.boxTable.rows[0];
this.setBg(r.cells[0],1);
this.setBg(r.cells[1],2);
this.setBg(r.cells[2],3);
r=this.boxTable.rows[1];
this.setBg(r.cells[0],4);
this.setBg(r.cells[2],6);
r=this.boxTable.rows[2];
this.setBg(r.cells[0],7);
this.setBg(r.cells[1],8);
this.setBg(r.cells[2],9);
};
};
dojo.inherits(dojo.widget.HtmlTurboTableBox,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turbotablebox");
dojo.provide("turbo.widgets.TurboToolbar");
dojo.provide("turbo.widgets.HtmlTurboToolbar");
dojo.require("turbo.widgets.TurboWidget");
dojo.require("turbo.widgets.TurboButton");
dojo.widget.HtmlTurboToolbar=function(){
turbo.setWidgetType(this,"TurboToolbar");
dojo.widget.HtmlTurboWidget.call(this);
this.templatePath=null;
this.list=false;
this.classTag="turbo-toolbar";
this.fillInTemplate=function(_702,_703){
var frag=new dojo.xml.Parse().parseElement(this.domNode);
dojo.widget.getParser().createComponents(frag);
};
this.styleChanged=function(){
this.setStyledClass(this.domNode,(this.list?"-list":""));
};
};
dojo.inherits(dojo.widget.HtmlTurboToolbar,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turbotoolbar");
dojo.provide("turbo.widgets.TurboTabbar");
dojo.provide("turbo.widgets.HtmlTurboTabbar");
dojo.require("turbo.widgets.TurboWidget");
dojo.require("turbo.widgets.TurboButton");
dojo.widget.HtmlTurboTabbar=function(){
turbo.setWidgetType(this,"TurboTabbar");
dojo.widget.HtmlTurboWidget.call(this);
this.isContainer=true;
this.templatePath=null;
this.templateString="<div dojoAttachPoint=\"containerNode\"></div>";
this.containerNode=null;
this.classTag="turbo_tabbar";
this.tabIndex=0;
this.lastIndex=-1;
this.canSelectTab=function(_705){
};
this.onSelectTab=function(){
};
this.fillInTemplate=function(_706){
this.bindArgEvents(_706);
};
this.styleChanged=function(){
this.setStyledClass(this.domNode,"");
for(var i in this.children){
this.children[i].setTheme(this.style);
}
};
this.inheritedRegisterChild=this.registerChild;
this.registerChild=function(_708,_709){
_708.tabIndex=this.children.length;
_708.onClick=this._tabClick;
_708.setGroup(this.widgetId);
_708.setTheme(this.style);
return this.inheritedRegisterChild(_708,_709);
};
var self=this;
this._tabClick=function(){
self.tabClick(this);
};
this.getTab=function(_70b){
return this.children[_70b];
};
this.tabClick=function(_70c){
if(this.canSelectTab(_70c.inTabIndex)===false){
return this.selectTab(this.tabIndex);
}
this.lastIndex=this.tabIndex;
this.tabIndex=_70c.tabIndex;
this.onSelectTab();
};
this.selectTab=function(_70d){
this.tabIndex=_70d;
this.getTab(this.tabIndex).setState("down");
};
};
dojo.inherits(dojo.widget.HtmlTurboTabbar,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turbotabbar");
dojo.provide("turbo.widgets.TurboModule");
dojo.provide("turbo.widgets.HtmlTurboModule");
dojo.require("turbo.widgets.TurboWidget");
dojo.require("dojo.io.*");
turbo.onloads=[];
turbo.doOnLoad=function(){
for(var i=0;i<turbo.onloads.length;i++){
turbo.onloads[i]();
}
turbo.onloads=[];
};
dojo.addOnLoad(function(){
dojo.addOnLoad=function(_70f){
turbo.onloads.push(_70f);
};
});
dojo.widget.HtmlTurboModule=function(){
this.widgetType="TurboModule";
dojo.widget.HtmlTurboWidget.call(this);
this.templatePath=null;
this.classTag="turbo-module";
this.form="";
this.src="";
this.loaded=false;
this.sync=true;
this.delayed=false;
this.themeable=false;
this.manageIds=false;
this.prefix="";
this._counter=0;
this.fillInTemplate=function(){
dojo.html.prependClass(this.domNode,this.classTag);
if(!this.delayed){
this.request();
}
};
this.setSrc=function(_710){
this.loaded=false;
this.src=_710;
if(!this.delayed){
this.request();
}
};
this.clear=function(){
turbo.clean(this.domNode);
dojo.dom.removeChildren(this.domNode);
};
this.load=function(_711){
if(!_711){
this.request();
}else{
this.delayed=false;
this.setSrc(_711);
}
};
this.request=function(){
if(this.loaded||!this.src){
return;
}
var _712={url:this.src,formNode:(dojo.lang.isString(this.form)?turbo.$(this.form):this.form),sync:this.sync,load:turbo.bind(this,this.receive),error:turbo.bind(this,this.error)};
turbo.setBusyCursor();
try{
if(dojo.io.bind(_712)===false){
this.status="unspecified bind error";
turbo.debug(this.status);
}
}
catch(e){
this.status=e;
turbo.debug(e);
}
finally{
turbo.setDefaultCursor();
}
};
this.error=function(type,_714){
turbo.debug(_714);
};
this.receive=function(type,data,evt){
this.loaded=true;
turbo.clean(this.domNode);
if(this.manageIds){
data=this.uniquifyIds(data);
}
this.domNode.innerHTML=this.extractScript(data);
if(dojo.render.html.ie&&this.turboalign){
turbo.setStyleSizePx(this.domNode,1,1);
}
this.executeScript();
this.parseWidgets();
turbo.aligner.alignFrom(this.domNode.parentNode);
turbo.doOnLoad();
};
this.getIdPrefix=function(){
return (!this.manageIds?"":(this.prefix?this.prefix:this.widgetId)+"_"+this._counter+".");
};
this.byId=function(inId){
return turbo.$(this.getIdPrefix()+inId);
};
this.$=this.byId;
this.uniquifyIds=function(_719){
this._counter++;
var idp=this.getIdPrefix();
return turbo.stringReplace(_719,/(<[^>]*id=")([^"]*)/ig,function(w,pre,id){
return pre+idp+id;
});
};
this.extractScript=function(_71e){
var _71f=[];
var xml=turbo.stringReplace(_71e,/<script[^>]*src="([^"]*)"[^>]*>[\s\S]*?<\/script>/ig,function(w,_722){
_71f.push(_722);
return "";
});
this.sources=_71f;
var _723=[];
var id=this.widgetId;
var xml=turbo.stringReplace(_71e,/<script[^>]*>([\s\S]*?)<\/script>/ig,function(w,_726){
_726=turbo.stringReplace(_726,/%%module%%/ig,id);
_723.push(_726);
return "";
});
this.scripts=_723;
return xml;
};
this.executeScript=function(){
for(var i=0;i<this.sources.length;i++){
turbo.loadScript(this.sources[i]);
}
for(var i=0;i<this.scripts.length;i++){
var _728="with (turbo.global) { "+this.scripts[i]+" }";
try{
eval(_728);
}
catch(e){
turbo.debug("TurboModule: exception evaluating module script");
turbo.debug("message = "+e.message,"fileName = "+e.fileName,"lineNumber = "+e.lineNumber);
dojo.debug("script = ["+_728+"]");
}
}
};
this.parseWidgets=function(){
var frag=new dojo.xml.Parse().parseElement(this.domNode);
dojo.widget.getParser().createComponents(frag);
};
};
dojo.inherits(dojo.widget.HtmlTurboModule,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turbomodule");
dojo.provide("turbo.widgets.TurboNotebook");
dojo.provide("turbo.widgets.HtmlTurboNotebook");
dojo.require("turbo.widgets.TurboWidget");
dojo.require("dojo.io.*");
dojo.widget.HtmlTurboNotebook=function(){
this.widgetType="TurboNotebook";
dojo.widget.HtmlTurboWidget.call(this);
this.templatePath=null;
this.templateString="<div turboalign=\"client\"></div>";
this.themeable=false;
this.src="";
this.sync=true;
this.delayed=false;
this.classTag="turbo_notebook";
this.count=0;
this.pages=[];
this.modules=[];
this.selected=-1;
this.fillInTemplate=function(_72a,_72b){
var _72c=this.getWidgetFragment(_72b);
var i=0;
while(i<_72c.childNodes.length){
var n=_72c.childNodes[i];
if(n.tagName&&n.tagName.toLowerCase()=="div"){
this.addPage(n,true);
}else{
i++;
}
}
this.count=this.pages.length;
this._selectPage(0);
};
this.addPage=function(_72f,_730){
var _731=null;
if(_730){
var _732=document.createElement("div");
_732.appendChild(_72f);
var frag=new dojo.xml.Parse().parseElement(_732);
var _734=dojo.widget.getParser().createComponents(frag);
if(_734&&_734.length>1&&_734[1]&&_734[1].length>0&&_734[1][0].widgetType=="TurboModule"){
_731=_734[1][0];
}
_72f=_732.firstChild;
}
this.modules.push(_731);
this.pages.push(_72f);
if(this.pages.length>1){
turbo.hide(_72f);
}else{
this.selected=0;
}
this.domNode.appendChild(_72f);
};
this.goodPage=function(_735){
return (_735>=0&&_735<this.pages.length);
};
this.requestModule=function(_736){
if(_736&&_736.delayed){
_736.request();
}
};
this.hidePage=function(_737){
if(this.goodPage(_737)){
turbo.hide(this.pages[_737]);
}
};
this.showPage=function(_738){
if(!this.goodPage(_738)){
return;
}
this.requestModule(this.modules[_738]);
turbo.show(this.pages[_738]);
};
this.showHidePage=function(_739,_73a){
if(_73a){
this.showPage(_739);
}else{
this.hidePage(_739);
}
};
this._selectPage=function(_73b){
this.showPage(_73b);
if(this.selected!=_73b){
this.hidePage(this.selected);
}
this.selected=_73b;
};
this.selectPage=function(_73c){
var page=this.pages[_73c];
if(!page["turboNotebookShown"]){
turbo.setVisibility(page,false);
}
this._selectPage(_73c);
var _73e=function(){
turbo.aligner.align();
turbo.setVisibility(page,true);
page.turboNotebookShown=true;
};
turbo.defer(_73e,200);
};
};
dojo.inherits(dojo.widget.HtmlTurboNotebook,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turbonotebook");
dojo.provide("turbo.widgets.TurboPagebar");
dojo.provide("turbo.widgets.HtmlTurboPagebar");
dojo.require("turbo.widgets.TurboWidget");
dojo.require("turbo.widgets.TurboButton");
dojo.require("turbo.widgets.TurboTabbar");
dojo.require("turbo.widgets.TurboNotebook");
dojo.widget.HtmlTurboPagebar=function(){
this.widgetType="TurboPagebar";
dojo.widget.HtmlTurboTabbar.call(this);
this.templateString="<div turboalign=\"client\"><div dojoAttachPoint=\"containerNode\" turboalign=\"top\" class=\"turbo-pagebar-tabs\"></div><div dojoAttachPoint=\"pages\" turboAlign=\"client\" class=\"turbo-pagebar-pages\"></div></div>";
this.pages=null;
this.classTag="turbo-pagebar";
this.contentId="";
this.inheritedFillInTemplate=this.fillInTemplate;
this.fillInTemplate=function(_73f,_740){
this.inheritedFillInTemplate(_73f,_740);
turbo.defer(turbo.bind(this,this.installPages),100);
};
this.installPages=function(){
if(this.contentId){
this.content=turbo.$(this.contentId);
}
if(!this.content){
this.content=this.domNode.nextSibling;
}
if(this.content){
this.content.parentNode.removeChild(this.content);
this.pages.appendChild(this.content);
}else{
this.debug("installPages","BAD content - contentId: ("+this.contentId+")");
}
};
};
dojo.inherits(dojo.widget.HtmlTurboPagebar,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turbopagebar");
dojo.provide("turbo.widgets.TurboPageButtons");
dojo.provide("turbo.widgets.HtmlTurboPageButtons");
dojo.require("turbo.widgets.TurboWidget");
dojo.widget.HtmlTurboPageButtons=function(){
this.widgetType="TurboPageButtons";
dojo.widget.HtmlTurboWidget.call(this);
this.templatePath=null;
this.pagesNode=null;
this.classTag="turbo-page-buttons";
this.className="";
this.buttonClass=this.classTag+"-button";
this.buttonHighlightClass=this.buttonClass+" "+this.classTag+"-highlight";
this.buttonSelectedClass=this.buttonClass+" "+this.classTag+"-selected";
this.buttonDisabledClass=this.buttonClass+" "+this.classTag+"-disabled";
this.buttonSeparatorClass=this.classTag+"-separator";
this.numPages=1;
this.numButtons=3;
this.onPageChange=function(){
};
this.buttonWidth=30;
this.buttonHeight=20;
this.buttonMargin=6;
this._x=0;
this._i=0;
this.lastValue=1;
this.buttonList="prevN, prev, innerFirst, pages, innerLast, next, nextN";
this.buttonLabels={first:"|&lt;",prevN:"&lt;&lt;",prev:"&lt;",next:"&gt;",nextN:"&gt;&gt;",last:"&gt;|",sep:"..."};
this.page=1;
this.installChildren=function(_741){
dojo.dom.moveChildren(this.getWidgetFragment(_741),this.domNode);
var frag=new dojo.xml.Parse().parseElement(this.domNode);
dojo.widget.getParser().createComponents(frag);
};
this.fillInTemplate=function(_743,_744){
this.bindArgEvents(_743);
dojo.html.disableSelection(this.domNode);
dojo.event.connect(this.domNode,"onclick",this,"pageClick");
dojo.event.connect(this.domNode,"onmouseover",this,"pageOver");
dojo.event.connect(this.domNode,"onmouseout",this,"pageOut");
dojo.event.topic.subscribe("turboresize",this,"turboresize");
this.setButtonList(this.buttonList);
this.createPagesNode();
this.initBuild();
};
this.styleChanged=function(){
this.setStyledClass(this.domNode);
};
this.turboresize=function(){
if(turbo.showing(this.domNode)){
this.build();
}
};
this.build=function(){
this.createPages();
};
this.setNumPages=function(_745){
if(_745!=undefined){
this.numPages=Number(_745);
}
this.numPages=(this.numPages<1)?1:this.numPages;
this.build();
};
this.setButtonList=function(_746){
this.buttonList={};
var list=_746.replace(/ /g,"").split(",");
for(var i in list){
if(!Array.prototype[i]){
this.buttonList[list[i]]=true;
}
}
};
this.initBuild=function(_749,_74a){
window.setTimeout(turbo.bindArgs(this,this._initBuild,_749,_74a),10);
};
this._initBuild=function(_74b,_74c){
if(_74b!=undefined){
this.numPages=Number(_74b);
}
this.setPage(_74c!=undefined?_74c:1);
};
this.getNumPages=function(){
return this.numPages;
};
this.getPage=function(){
return this.page;
};
this.setPage=function(_74d){
_74d=Number(_74d);
if(!_74d||_74d<1||_74d>this.numPages){
return;
}
this.lastValue=this.page;
this.page=_74d;
this.build();
};
this.doResize=function(){
this.build();
};
this.pageClick=function(_74e){
var node=_74e.target;
if(node.disabled||!node.page){
return;
}
this.setPage(node.page);
this.onPageChange(this.page);
};
this.pageOver=function(_750){
var node=_750.target;
if(node==this.domNode||node.disabled||!node.page||node.page==this.page){
return;
}
node.className=this.buttonHighlightClass;
};
this.pageOut=function(_752){
var node=_752.target;
if(node==this.domNode||node.disabled||!node.page){
return;
}
node.className=this.getDefaultButtonClass(node);
};
this.getDefaultButtonClass=function(_754){
return (_754.disabled?this.buttonDisabledClass:(_754.page==this.page&&!isNaN(_754.innerHTML)?this.buttonSelectedClass:this.buttonClass));
};
this.getPageRange=function(_755){
var _755=(_755!=undefined?_755:this.numButtons);
if(this.numPages<=_755){
return {start:1,end:Math.max(1,this.numPages)};
}
var rp=Math.floor(Number(_755)/2);
var _757={};
_757.start=Math.max(1,Number(this.page)-rp);
if(this.numPages-_757.start<_755){
_757.start=this.numPages-(_755-1);
}
_757.end=_757.start+_755-1;
return _757;
};
this.inPageRange=function(_758,_759){
var _75a=this.getPageRange(_759);
return (_758>=_75a.start&&_758<=_75a.end);
};
this.numFixedButtons=function(_75b){
var w=0;
for(var i in _75b){
if(i!="pages"&&i!="innerFirst"&&i!="innerLast"){
w++;
}
}
return w;
};
this.calcFixedButtonsWidth=function(_75e){
var w=0;
for(var i in _75e){
w+=(i!="pages"&&i!="innerFirst"&&i!="innerLast")?this.buttonWidth+this.buttonMargin:0;
}
return w;
};
this.calcNumButtons=function(_761){
var s=turbo.getContentSize(this.domNode);
var w=this.calcFixedButtonsWidth(_761);
var bs=this.buttonWidth+this.buttonMargin;
var _765=function(){
return Math.floor((s.w-w)/bs);
};
var _766=_761["innerFirst"];
var _767=(_766==true)&&this.inPageRange(1,_765());
if(_766&&!_767){
w+=bs+bs;
}
if(_761["innerLast"]&&!this.inPageRange(this.numPages,_765())){
w+=bs+bs;
}
if(_767&&!this.inPageRange(1,_765())){
w+=bs+bs;
}
return _765(_761);
};
this.attachButton=function(_768){
this.pagesNode.appendChild(_768);
};
this.createPageButton=function(_769,_76a,_76b,_76c){
var node=(this._i<this.oldNumButtons)?this.pagesNode.childNodes[this._i]:document.createElement("div");
node.page=_769;
node.disabled=(_76b?true:false);
node.innerHTML=(_76a?_76a:_769);
node.className=this.getDefaultButtonClass(node);
var w=(_76c!=undefined?_76c:this.buttonWidth);
node.style.lineHeight=this.buttonHeight+"px";
turbo.setStyleBoundsPx(node,this._x,0,w,this.buttonHeight);
this._x+=w+this.buttonMargin;
this._i++;
if(this._i>=this.oldNumButtons){
this.attachButton(node);
}
};
this.createSep=function(){
var sep=(this._i<this.oldNumButtons)?this.pagesNode.childNodes[this._i]:document.createElement("div");
sep.page=undefined;
sep.disabled=undefined;
sep.className=this.buttonSeparatorClass;
sep.innerHTML=this.buttonLabels.sep;
turbo.setStyleBoundsPx(sep,this._x,0,this.buttonWidth,this.buttonHeight);
this._x+=this.buttonWidth+this.buttonMargin;
this._i++;
if(this._i>=this.oldNumButtons){
this.attachButton(sep);
}
};
this.create_first=function(){
this.createPageButton(1,this.buttonLabels.first,(this.page==1));
};
this.create_last=function(){
this.createPageButton(this.numPages,this.buttonLabels.last,(this.page==this.numPages));
};
this.create_pages=function(){
var _770=this.getPageRange();
for(var i=_770.start;i<=_770.end;i++){
this.createPageButton(i);
}
};
this.create_prev=function(){
var _772=Math.max(1,Number(this.page)-1);
this.createPageButton(_772,this.buttonLabels.prev,(this.page==1));
};
this.create_next=function(){
var _773=Math.min(this.numPages,Number(this.page)+1);
this.createPageButton(_773,this.buttonLabels.next,(this.page==this.numPages));
};
this.create_prevN=function(){
var _774=Math.max(1,Number(this.page)-this.numButtons);
this.createPageButton(_774,this.buttonLabels.prevN,(this.page==1));
};
this.create_nextN=function(){
var _775=Math.min(this.numPages,Number(this.page)+this.numButtons);
this.createPageButton(_775,this.buttonLabels.nextN,(this.page==this.numPages));
};
this.create_innerFirst=function(){
if(!this.inPageRange(1)){
this.createPageButton(1,"1");
this.createSep();
}
};
this.create_innerLast=function(){
if(!this.inPageRange(this.numPages)){
this.createSep();
this.createPageButton(this.numPages,this.numPages);
}
};
this.getButtonList=function(){
var x=0;
for(var i in this.buttonList){
x++;
}
var t=this.calcNumButtons(this.buttonList)+this.numFixedButtons(this.buttonList);
var _779={prev:true,pages:true,next:true};
return (t<x)?_779:this.buttonList;
};
this.createPages=function(){
this._x=0;
this._i=0;
this.oldNumButtons=this.pagesNode.childNodes.length;
var _77a=this.getButtonList();
this.numButtons=this.calcNumButtons(_77a);
for(var i in _77a){
this["create_"+i]();
}
turbo.setStyleSizePx(this.pagesNode,this._x,this.buttonHeight+this.buttonMargin);
this.removeExcessPages();
};
this.removeExcessPages=function(){
for(var i=this._i;i<this.oldNumButtons;i++){
this.pagesNode.removeChild(this.pagesNode.childNodes[this._i]);
}
};
this.createPagesNode=function(){
this.pagesNode=document.createElement("div");
this.pagesNode.style.position="relative";
this.pagesNode.style.top="0";
this.domNode.appendChild(this.pagesNode);
};
};
dojo.inherits(dojo.widget.HtmlTurboPageButtons,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:TurboPageButtons");
dojo.provide("turbo.widgets.TurboSlider");
dojo.provide("turbo.widgets.HtmlTurboSlider");
dojo.require("turbo.widgets.TurboWidget");
turbo.rangemap=function(){
this.minimum=0;
this.maximum=100;
this.getRange=function(){
return (this.maximum-this.minimum);
};
this.getExtentOverRange=function(){
return this.getExtent()/this.getRange();
};
this.setMinMax=function(_77d,_77e){
this.minimum=_77d;
this.maximum=_77e;
};
this.changePosition=function(inDx){
var p=this.getPosition();
var n=p+inDx;
return (this.setPosition(p+inDx)-p)-inDx;
};
this.setValue=function(_782){
this.setPosition(Math.round((_782-this.minimum)*this.getExtentOverRange()));
};
this.getValue=function(){
var eor=this.getExtentOverRange();
return (eor?Math.round(this.getPosition()/eor):0)+this.minimum;
};
};
dojo.widget.HtmlTurboRangebar=function(){
turbo.setWidgetType(this,"TurboRangeBar");
dojo.widget.HtmlTurboWidget.call(this);
turbo.rangemap.call(this);
this.templateString="<div dojoAttachPoint=\"LeftBar\" tabindex=\"1\"><div dojoAttachPoint=\"RightBar\"></div></div>";
this.templatePath=null;
this.LeftBar=null;
this.RightBar=null;
this.classTag="turbo_rangebar";
this.margin=1;
this.fillInTemplate=function(_784,_785){
if(this.extraArgs["value"]){
window.setTimeout(turbo.bindArgs(this,this.setValue,this.extraArgs["value"]),400);
}
};
this.styleChanged=function(){
this.setClassName(this.LeftBar,"Left");
this.setClassName(this.RightBar,"Right");
};
this.getWindow=function(){
return this.margin;
};
this.getExtent=function(){
return this.LeftBar.offsetWidth-this.getWindow();
};
this.getPosition=function(){
return this.RightBar.offsetLeft;
};
this.setPosition=function(_786){
var _787=this.getWindow();
var _788=this.getExtent();
var p=(_786>_788?_788:(_786<this.margin?this.margin:_786));
this.RightBar.style.marginLeft=(p&&p>0?p+"px":0);
var _78a=this.LeftBar.offsetWidth;
return p;
};
};
dojo.inherits(dojo.widget.HtmlTurboRangebar,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turborangebar");
dojo.widget.HtmlTurboSlider=function(){
this.widgetType="TurboSlider";
dojo.widget.HtmlTurboRangebar.call(this);
this.templateString="<div dojoAttachPoint=\"LeftBar\" tabindex=\"1\"><div dojoAttachPoint=\"RightBar\"><div dojoAttachPoint=\"Thumb\"><div></div></div></div>";
this.snap=false;
this.Thumb=null;
this.classTag="turbo_slider";
this.mouseDown=false;
this.mouseX=0;
this.changing=function(_78b){
};
this.change=function(_78c){
};
this.inheritedFillInTemplate=this.fillInTemplate;
this.fillInTemplate=function(_78d,_78e){
this.inheritedFillInTemplate(_78d,_78e);
dojo.event.connect(this.Thumb,"onmousedown",this,"down");
dojo.event.connect(this.Thumb,"onmouseup",this,"up");
dojo.event.connect(this.Thumb,"onmousemove",this,"move");
dojo.event.connect(this.LeftBar,"onmousewheel",this,"wheel");
};
this.inheritedStyleChanged=this.styleChanged;
this.styleChanged=function(){
this.inheritedStyleChanged();
this.setClassName(this.Thumb,"Thumb");
};
this.getWindow=function(){
return this.Thumb.offsetWidth;
};
this.down=function(_78f){
this.lastValue=this.getValue();
if(this.LeftBar.focus){
this.LeftBar.focus();
}
this.mouseDown=true;
this.mouseX=_78f.screenX;
turbo.capture(this.Thumb);
};
this.up=function(_790){
if(this.mouseDown){
this.mouseDown=false;
turbo.release(this.Thumb);
if(this.snap){
this.setValue(this.getValue());
}
this.change(this);
}
};
this.move=function(_791){
if(this.mouseDown){
var dx=_791.screenX-this.mouseX;
this.mouseX=_791.screenX+this.changePosition(dx);
if(dojo.render.html.safari&&window.getSelection){
window.getSelection().collapse();
}
this.changing(this);
}
};
this.wheel=function(_793){
var v=this.getValue()+Math.round(_793.wheelDelta/120);
this.setValue(this.getValue()+Math.round(_793.wheelDelta/120));
this.changing(this);
};
};
dojo.inherits(dojo.widget.HtmlTurboSlider,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turboslider");
dojo.provide("turbo.widgets.TurboRollover");
dojo.provide("turbo.widgets.HtmlTurboRollover");
dojo.require("turbo.widgets.TurboWidget");
dojo.widget.HtmlTurboRollover=function(){
this.widgetType="TurboRollover";
dojo.widget.HtmlTurboWidget.call(this);
this.templatePath=null;
this.classTag="turbo-rollover";
this.mouseover=function(_795){
dojo.debug("over");
};
this.mouseout=function(_796){
dojo.debug("out");
};
this.click=function(_797){
dojo.debug("click");
};
this.themeable=false;
this.fillInTemplate=function(_798,_799){
this.bindArgEvents(_798);
dojo.event.connect(this.domNode,"onmouseover",this,"mouseover");
dojo.event.connect(this.domNode,"onmouseout",this,"mouseout");
dojo.event.connect(this.domNode,"onclick",this,"click");
};
};
dojo.inherits(dojo.widget.HtmlTurboRollover,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turborollover");
dojo.provide("turbo.widgets.TurboSplitter");
dojo.provide("turbo.widgets.HtmlTurboSplitter");
dojo.require("turbo.turbo");
dojo.require("turbo.lib.align");
dojo.require("turbo.widgets.TurboWidget");
dojo.widget.HtmlTurboSplitter=function(){
this.widgetType="TurboSplitter";
dojo.widget.HtmlTurboWidget.call(this);
this.templatePath=null;
this.classTag="turbo-splitter";
this.mouseDown=false;
this.mouseX=0;
this.changing=function(){
};
this.change=function(){
};
this.fillInTemplate=function(_79a,_79b){
switch(this.turboalign){
case "left":
case "right":
break;
case "top":
case "bottom":
this.vertical=true;
break;
default:
this.turboalign="left";
this.domNode.setAttribute("turboalign","left");
break;
}
dojo.event.connect(this.domNode,"onmousedown",this,"down");
dojo.event.connect(this.domNode,"onmouseup",this,"up");
dojo.event.connect(this.domNode,"onmousemove",this,"move");
dojo.event.connect(this.domNode,"onmouseover",this,"killCapturedEvent");
dojo.event.connect(this.domNode,"onmouseout",this,"killCapturedEvent");
};
this.styleChanged=function(){
this.domNode.style.cursor=(this.vertical?"n-resize":"e-resize");
this.setStyledClass(this.domNode,(this.vertical?"-v":"-h"));
};
this.getPosition=function(){
return {top:dojo.style.getNumericStyle(this.domNode,"top"),left:dojo.style.getNumericStyle(this.domNode,"left")};
};
this.getSizeNode=function(inDx){
switch(this.turboalign){
case "left":
case "top":
var node=this.domNode.previousSibling;
while(node&&node.nodeType!=1){
node=node.previousSibling;
}
break;
case "right":
case "bottom":
var node=this.domNode.nextSibling;
while(node&&node.nodeType!=1){
node=node.nextSibling;
}
break;
}
return node;
};
this.adjustSize=function(inDx,inDy){
turbo.setOuterSize(this.sizeNode,this.size.w+(this.turboalign=="right"?-inDx:inDx),this.size.h+(this.turboalign=="bottom"?-inDy:inDy));
turbo.aligner.align();
};
this.killCapturedEvent=function(_7a0){
if(this.mouseDown&&_7a0){
dojo.event.browser.stopEvent(_7a0);
}
};
this.down=function(_7a1){
this.sizeNode=this.getSizeNode();
if(!this.sizeNode){
return;
}
this.size=turbo.getOuterSize(this.sizeNode);
this.initialPosition=this.getPosition();
this.position=this.getPosition();
this.mouseDown=true;
this.mouseX=_7a1.screenX;
this.mouseY=_7a1.screenY;
turbo.capture(this.domNode);
document.body.style.cursor=this.domNode.style.cursor;
};
this.up=function(_7a2){
if(this.mouseDown){
this.mouseDown=false;
turbo.release(this.domNode);
this.adjustSize(this.position.left-this.initialPosition.left,this.position.top-this.initialPosition.top);
this.change();
document.body.style.cursor="";
}
};
this.move=function(_7a3){
if(this.mouseDown){
this.killCapturedEvent(_7a3);
if(this.vertical){
this.moveY(_7a3.screenY-this.mouseY);
}else{
this.moveX(_7a3.screenX-this.mouseX);
}
this.mouseX=_7a3.screenX;
this.mouseY=_7a3.screenY;
this.changing();
}
};
this.moveX=function(inDx){
this.position.left+=inDx;
this.domNode.style.left=this.position.left+"px";
};
this.moveY=function(inDy){
this.position.top+=inDy;
this.domNode.style.top=this.position.top+"px";
};
this.resizeX=function(inDx){
this.adjustSize(inDx,0);
};
this.resizeY=function(inDy){
this.adjustSize(0,inDy);
};
};
dojo.inherits(dojo.widget.HtmlTurboSplitter,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turbosplitter");
dojo.provide("turbo.widgets.TurboTree");
dojo.provide("turbo.widgets.HtmlTurboTree");
dojo.require("turbo.widgets.TurboWidget");
turbo.objectToArray=function(_7a8){
if(turbo.isArray(_7a8)){
return _7a8;
}
var _7a9=[];
for(var i in _7a8){
_7a9.push(new Array(i,turbo.objectToArray(_7a8[i])));
}
return _7a9;
};
dojo.widget.HtmlTurboTree=function(){
this.widgetType="TurboTree";
dojo.widget.HtmlTurboWidget.call(this);
this.templatePath=null;
this.templateString="<div dojoattachpoint=\"mainDiv\"><div dojoattachpoint=\"treeDiv\" class=\"turbo-tree-scroller\"></div></div>";
this.classTag="turbo-tree";
this.imageRoot=dojo.uri.dojoUri(this.themeRoot+"default/images/");
this.mainDiv=null;
this.treeDiv=null;
this.nodes=null;
this.selected=null;
this.onCanUnselect=function(_7ab){
};
this.onCanSelect=function(_7ac){
};
this.onNodeSelected=function(_7ad){
};
this.fillInTemplate=function(_7ae){
this.bindArgEvents(_7ae);
this.domNode.style.overflow="auto";
if(this.nodes){
this.buildNodes(this.nodes);
}
dojo.event.connect(this.mainDiv,"onclick",this,"divClick");
};
this.styleChanged=function(){
this.mainDiv.className=this.classTag+(this.style?" "+this.classTag+"_"+this.style:"");
};
this.buildLeaf=function(_7af,_7b0,_7b1,_7b2){
var img=document.createElement("img");
var leaf=this.imageRoot+(_7af?"tree_root.gif":(_7b1?"tree_last_leaf.gif":"tree_leaf.gif"));
if(_7b0){
img.src=this.imageRoot+(_7b2?"tree_closed":"tree_open")+".gif";
img.style.backgroundImage="url("+leaf+")";
}else{
img.src=leaf;
}
return img;
};
this.buildNode=function(_7b5,_7b6,_7b7,_7b8){
if(dojo.lang.isObject(_7b7)){
var _7b9=(_7b7.children)&&(_7b7.children.length>0);
var _7ba=(_7b7.content?_7b7.content:_7b7.name);
}else{
var _7b9=false;
var _7ba=_7b7;
}
var row=document.createElement("div");
row.setAttribute("turboTreeNode","true");
if(_7b7.data){
for(var i in _7b7.data){
row.setAttribute(i,_7b7.data[i]);
}
}
if(_7b6){
row.appendChild(_7b6.cloneNode(true));
}else{
row.appendChild(document.createTextNode(""));
}
row.appendChild(this.buildLeaf((_7b6==null),_7b9,_7b8,_7b7.closed));
var node=document.createElement("span");
node.innerHTML=_7ba;
node.className=this.classTag+"-content";
node.style.cursor="default";
row.appendChild(node);
if(_7b9){
var pre=(_7b6?_7b6:document.createElement("span"));
var img=document.createElement("img");
img.src=this.imageRoot+(_7b8?"tree_blank.gif":"tree_bar.gif");
pre.appendChild(img);
var _7c0=document.createElement("div");
this.buildChildren(_7c0,pre,_7b7.children);
row.appendChild(_7c0);
pre.removeChild(img);
if(_7b7.closed){
_7c0.style.display="none";
}
}
_7b5.appendChild(row);
};
this.buildChildren=function(_7c1,_7c2,_7c3){
var l=_7c3.length;
for(var i=0;i<l;i++){
this.buildNode(_7c1,_7c2,_7c3[i],(i==l-1));
}
};
this.buildNodes=function(_7c6){
this.treeDiv.innerHTML="";
if(dojo.lang.isArray(_7c6)){
this.buildChildren(this.treeDiv,null,_7c6);
}else{
this.buildNode(this.treeDiv,null,_7c6,true);
}
};
this.getToggleElement=function(_7c7){
return _7c7.childNodes[1];
};
this.getContentElement=function(_7c8){
return _7c8.childNodes[2];
};
this.getChildrenElement=function(_7c9){
return _7c9.childNodes[3];
};
this.setSelected=function(_7ca,_7cb){
if(_7ca){
with(this.getContentElement(_7ca)){
style.backgroundColor=(_7cb?"blue":"");
style.color=(_7cb?"white":"");
}
}
};
this.getContent=function(_7cc){
return this.getContentElement(_7cc).innerHTML;
};
this.selectNode=function(_7cd){
if(this.onCanUnselect(this.selected)===false||this.onCanSelect(_7cd)===false){
return;
}
this.setSelected(this.selected,false);
this.selected=_7cd;
this.setSelected(this.selected,true);
this.onNodeSelected(this.selected);
};
this.toggleNode=function(_7ce){
var n=this.getChildrenElement(_7ce);
if(n){
n.style.display=(n.style.display=="none"?"":"none");
this.getToggleElement(_7ce).src=this.imageRoot+(n.style.display=="none"?"tree_closed":"tree_open")+".gif";
}
};
this.isTreeNode=function(_7d0){
return _7d0&&_7d0.getAttribute&&_7d0.getAttribute("turboTreeNode");
};
this.divClick=function(_7d1){
var t=_7d1.target;
while(t&&!this.isTreeNode(t)){
t=t.parentNode;
}
if(t){
if(_7d1.target==this.getToggleElement(t)){
this.toggleNode(t);
}else{
this.selectNode(t);
}
}
};
this._firstTreeNode=function(_7d3){
if(_7d3&&!this.isTreeNode(_7d3)){
_7d3=_7d3.nextSibling;
}
return _7d3;
};
this.nextNode=function(_7d4){
return (_7d4?this._firstTreeNode(_7d4.nextSibling):null);
};
this.childNode=function(_7d5){
if(!_7d5||!this.isTreeNode(_7d5)){
return null;
}
var _7d6=this.getChildrenElement(_7d5);
if(!_7d6){
return null;
}
return this._firstTreeNode(_7d6.firstChild);
};
this.rootNode=function(){
return this._firstTreeNode(this.treeDiv.firstChild);
};
this.isLeaf=function(_7d7){
return (!this.getChildrenElement(_7d7));
};
};
dojo.inherits(dojo.widget.HtmlTurboTree,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turbotree");
dojo.provide("turbo.widgets.TurboTree2");
dojo.provide("turbo.widgets.HtmlTurboTree2");
dojo.require("turbo.widgets.TurboWidget");
turbo.TreeNode=function(_7d8){
this.tree=_7d8;
this.id=this.tree.makeNodeId();
this.childCount=0;
this.domNode=null;
this.elements={gutter:0,connector:1,button:1,content:2,children:3};
this.hasChildren=false;
this.childrenInited=false;
this.parent=null;
this.getNodeElement=function(_7d9){
return (this.domNode?this.domNode.childNodes[_7d9]:null);
};
this.getImg=function(_7da){
var i=document.createElement("img");
i.src=this.tree.imageRoot+_7da;
return i;
};
this.getBar=function(){
return this.getImg("tree_bar.gif");
};
this.getBlank=function(){
return this.getImg("tree_blank.gif");
};
this.buildGutter=function(_7dc){
if(_7dc){
var g=_7dc.getNodeElement(this.elements.gutter).cloneNode(true);
g.appendChild((!g.hasChildNodes()||_7dc.isLastChildNode())?this.getBlank():this.getBar());
return g;
}else{
return document.createElement("span");
}
};
this.buildContent=function(){
var s=document.createElement("span");
s.innerHTML="Node";
s.className=this.tree.classTag+"-content";
s.style.cursor="default";
return s;
};
this.buildDomNode=function(_7df){
node=document.createElement("div");
node.appendChild(this.buildGutter(_7df));
node.appendChild(document.createElement("img"));
node.appendChild(this.buildContent());
node.appendChild(document.createElement("div"));
node.setAttribute("turboTreeNode","true");
node.id=this.id;
this.domNode=node;
return node;
};
this.setConnector=function(_7e0,_7e1){
var i=this.getNodeElement(this.elements.connector);
i.style.backgroundImage="url("+this.tree.imageRoot+(_7e0?"tree_root":(_7e1?"tree_last_leaf":"tree_leaf"))+".gif"+")";
};
this.isRootNode=function(){
return (this.domNode.parentNode==this.tree.treeDiv);
};
this.isLastChildNode=function(){
return (this.domNode.parentNode&&this.domNode.parentNode.lastChild==this.domNode);
};
this.selectConnector=function(){
this.setConnector(this.isRootNode(),this.isLastChildNode());
};
this.getButton=function(){
return this.getNodeElement(this.elements.button);
};
this.setButton=function(_7e3,_7e4){
this.getButton().src=this.tree.imageRoot+(!_7e3?"tree_blank":(_7e4?"tree_open":"tree_closed"))+".gif";
};
this.selectButton=function(){
this.setButton(this.hasChildren,this.getOpen());
};
this.getOpen=function(){
var n=this.getNodeElement(this.elements.children);
return (n?n.style.display=="":undefined);
};
this.setOpen=function(_7e6){
var n=this.getNodeElement(this.elements.children);
if(n){
n.style.display=(_7e6?"":"none");
}
if(this.getOpen()&&this.hasChildren&&!this.childrenInited){
this.tree.initChildren(this);
}
this.selectButton();
};
this.toggleNode=function(){
this.setOpen(!this.getOpen());
};
this.setContent=function(_7e8){
this.getNodeElement(this.elements.content).innerHTML=_7e8;
};
this.appendTo=function(_7e9){
this.parent=_7e9;
var p=(_7e9?_7e9.getNodeElement(this.elements.children):this.tree.treeDiv);
this.index=p.childNodes.length;
p.appendChild(this.domNode);
var n=this.tree.nodeFromDomNode(this.domNode.previousSibling);
if(n){
n.selectConnector();
}
this.selectConnector();
};
this.setSelected=function(_7ec){
if(_7ec===undefined){
_7ec=true;
}
var c=this.tree.classTag+"-content";
var _7ee=this.getNodeElement(this.elements.content);
if(_7ee){
_7ee.className=c+(_7ec?" "+c+"-selected":"");
}
};
};
dojo.widget.HtmlTurboTree2=function(){
this.widgetType="TurboTree2";
dojo.widget.HtmlTurboWidget.call(this);
this.templatePath=null;
this.templateString="<div><div dojoattachpoint=\"treeDiv\" class=\"turbo-tree-scroller\"></div></div>";
this.styleRoot="TurboTree";
this.classTag="turbo-tree";
this.imageRoot=dojo.uri.dojoUri(this.themeRoot+"default/images/");
this.treeDiv=null;
this.nodeId=0;
this.nodes=[];
this.selected=null;
this.onInitNode=function(){
};
this.onInitChildren=function(){
};
this.onCanUnselect=function(_7ef){
};
this.onCanSelect=function(_7f0){
};
this.onSelect=function(_7f1){
};
this.fillInTemplate=function(_7f2,_7f3){
this.bindArgEvents(_7f2);
this.setTheme("");
dojo.event.connect(this.domNode,"onclick",this,"domClick");
};
this.styleChanged=function(){
this.setStyledClass(this.domNode,"");
};
this.makeNodeId=function(){
return this.widgetId+":"+this.nodeId++;
};
this.nodeFromDomNode=function(_7f4){
return (_7f4&&_7f4.id?this.nodes[_7f4.id]:null);
};
this.clear=function(){
this.nodeId=0;
this.nodes=[];
this.treeDiv.innerHTML="";
};
this.setRootCount=function(_7f5){
this.clear();
for(var i=0;i<_7f5;i++){
this.newNode(null);
}
};
this.newTreeNode=function(_7f7){
var n=new turbo.TreeNode(this);
this.nodes[n.id]=n;
n.buildDomNode(_7f7);
return n;
};
this.newNode=function(_7f9){
var n=this.newTreeNode(_7f9);
n.appendTo(_7f9);
n.setOpen(false);
this.onInitNode(n);
n.selectButton();
return n;
};
this.initChildren=function(_7fb){
this.onInitChildren(_7fb);
var c=_7fb.childCount;
for(var i=0;i<c;i++){
this.newNode(_7fb);
}
_7fb.childrenInited=true;
_7fb.hasChildren=(c>0);
};
this.selectNode=function(_7fe){
if(_7fe&&this.onCanSelect(_7fe)===false){
return;
}
if(this.selected){
if(this.onCanUnselect(this.selected)===false){
return;
}
this.selected.setSelected(false);
}
this.selected=_7fe;
if(this.selected){
this.selected.setSelected(true);
}
this.onSelect(this.selected);
};
this.forEach=function(_7ff){
for(var i in this.nodes){
if(_7ff(this.nodes[i])===true){
return this.nodes[i];
}
}
return null;
};
this.isTreeNode=function(_801){
return _801&&_801.getAttribute&&_801.getAttribute("turboTreeNode");
};
this.nodeClick=function(_802,_803){
if(_802){
if(_802.getButton()==_803.target){
_802.toggleNode();
}else{
this.selectNode(_802);
}
}
};
this.domClick=function(_804){
var n=_804.target;
while(n&&!this.isTreeNode(n)){
n=n.parentNode;
}
this.nodeClick((n?this.nodeFromDomNode(n):null),_804);
};
};
dojo.inherits(dojo.widget.HtmlTurboTree2,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turbotree2");
dojo.provide("turbo.widgets.TurboRepeater");
dojo.provide("turbo.widgets.HtmlTurboRepeater");
dojo.require("turbo.widgets.TurboWidget");
dojo.widget.HtmlTurboRepeater=function(){
this.widgetType="TurboRepeater";
dojo.widget.HtmlTurboWidget.call(this);
this.isContainer=false;
this.templatePath=null;
this.containerNode=null;
this.classTag="turbo_repeater";
this.data={};
this.openMacro="{%";
this.closeMacro="}";
this.count=100;
this.clear=function(){
dojo.event.browser.clean(this.domNode);
this.domNode.innerHTML="";
};
this.fillInTemplate=function(_806,_807){
this.domNode.style.display="";
this.nodes=this.domNode.cloneNode(true);
this.clear();
};
this.getDatum=function(inId){
try{
return this.data[inId];
}
catch(e){
return "huh?";
}
};
this.interpolate=function(_809){
for(var i in this.data){
_809=_809.replace(RegExp(this.openMacro+i+this.closeMacro,"gi"),this.data[i]);
}
return _809;
};
this.iterate=function(_80b,_80c){
return false;
};
this.afterBuild=function(){
return false;
};
this.build=function(){
this.clear();
for(var i=0;i<this.count;i++){
this.index=i;
if(this.iterate(this,this.index)===false){
break;
}
var iter=this.nodes.cloneNode(true);
iter.innerHTML=this.interpolate(iter.innerHTML);
var frag=new dojo.xml.Parse().parseElement(iter);
dojo.widget.getParser().createComponents(frag);
this.domNode.appendChild(iter);
}
if(this.afterBuild){
this.afterBuild();
}
};
this.xbuild=function(){
this.clear();
var self=this;
var _811=function(){
if(self.index>=self.count||self.iterate(self,self.index)===false){
return;
}
var iter=self.nodes.cloneNode(true);
iter.innerHTML=self.interpolate(iter.innerHTML);
self.domNode.appendChild(iter);
self.index++;
window.setTimeout(_811,0);
};
this.index=0;
_811();
};
};
dojo.inherits(dojo.widget.HtmlTurboRepeater,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turborepeater");
dojo.provide("turbo.widgets.TurboGrid");
dojo.provide("turbo.widgets.HtmlTurboGrid");
dojo.require("turbo.widgets.TurboWidget");
dojo.widget.HtmlTurboGrid=function(){
this.widgetType="TurboGrid";
dojo.widget.HtmlTurboWidget.call(this);
this.autobuild=true;
this.autosize=true;
this.autosizing=false;
this.controller={};
this.classTag="turbo-grid";
this.cols=0;
this.colWidth=96;
this.colWidths=[];
this.fixedColWidth=40;
this.multiSelect=true;
this.rows=0;
this.scrollLeft=0;
this.selectedRow=-1;
this.selectCount=0;
this.sortInfo={column:-1,desc:false};
this.selected=[];
this.rowMarkerClass=[];
this.readyImage="";
this.busyImage="";
this.templatePath=null;
this.templateString="<table dojoAttachPoint=\"GrdTbl\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><div dojoAttachPoint=\"Corner\" class=\"turbo-grid-corner\">&#160;</div><div dojoAttachPoint=\"ColDiv\" class=\"turbo-grid-col\"></div></td><td><div dojoAttachPoint=\"HdrDiv\" class=\"turbo-grid-hdr\"></div><div dojoAttachPoint=\"DtaDiv\" class=\"turbo-grid-dta\"></div></td></tr><tr><td dojoAttachPoint=\"Status\" colspan=\"2\" class=\"turbo-grid-status\">Empty</td></tr></table>";
this.Corner=null;
this.ColDiv=null;
this.HdrDiv=null;
this.DtaDiv=null;
this.Status=null;
this.GrdTbl=null;
this.DtaTbl=null;
this.HdrTbl=null;
this.ColTbl=null;
var _813=false;
var _814=null;
this.getCell=function(_815,_816){
return (this.controller.getCell?this.controller.getCell(this,_815,_816):_815+", "+_816);
};
this.getHeaderAlign=function(_817){
return (this.controller.getHeaderAlign?this.controller.getHeaderAlign(this,_817):"left");
};
this.getColumnTitle=function(_818){
return (this.controller.getColumnTitle?this.controller.getColumnTitle(this,_818):undefined);
};
this.getColumnWidth=function(_819){
var w=(this.controller.getColumnWidth?this.controller.getColumnWidth(this,_819):-1);
return (w>=0?w:this.colWidth);
};
this.getSortInfo=function(){
this.sortInfo=(this.controller.getSortInfo?this.controller.getSortInfo(this):this.sortInfo);
return this.sortInfo;
};
this.onInit=function(){
};
this.onSelectionChange=function(){
};
this.onSelectRow=function(_81b){
if(this.controller.onSelectRow){
this.controller.onSelectRow(this,_81b);
}
};
this.onUnselectRow=function(_81c){
if(this.controller.onUnselectRow){
this.controller.onUnselectRow(this,_81c);
}
};
this.onUpdateRow=function(_81d){
if(this.controller.onUpdateRow){
this.controller.onUpdateRow(this,_81d);
}
};
this.onEditDone=function(_81e){
if(this.controller.onEditDone){
this.controller.onEditDone(this);
}
};
this.onEditRowStart=function(_81f){
if(this.controller.onEditRowStart){
this.controller.onEditRowStart(this,_81f);
}
};
this.onEditRowDone=function(){
if(this.controller.onEditRowDone){
this.controller.onEditRowDone(this);
}
};
this.onKeyDown=function(_820){
if(this.controller.onKeyDown){
this.controller.onKeyDown(this,_820);
}
};
this.onDataClick=function(_821,_822){
if(this.controller.onDataClick){
this.controller.onDataClick(this,_821,_822);
}
};
this.onDataDblClick=function(_823,_824){
if(this.controller.onDataDblClick){
this.controller.onDataDblClick(this,_823,_824);
}
};
this.onHeaderClick=null;
this.fillInTemplate=function(_825){
this.bindArgEvents(_825);
this.bindArgEvent("onHeaderClick",_825);
this.setTheme(this.theme);
this.DtaDiv.onscroll=turbo.bind(this,this.doScroll);
this.onInit();
if(this.rows&&this.cols&&this.autobuild){
this.build();
}else{
this.deferResize();
}
dojo.event.connect(this.DtaDiv,"onkeydown",this,"dataKeyDown");
dojo.event.topic.subscribe("turboresize",this,"turboResize");
};
this.uninitialize=function(){
dojo.event.topic.unsubscribe("turboresize",this,"turboResize");
};
this.turboResize=function(){
if(turbo.showing(this.domNode.parentNode)){
this.resize();
}
};
this.enableAutoResize=function(){
if(!this.autosizing){
dojo.event.connect(window,"onresize",this,"doResize");
}
this.autosizing=true;
};
this.setElementClass=function(_826,_827){
_827=(_827?this.classTag+"-"+_827:"");
if(_826.className!=_827){
_826.className=_827;
}
};
this.setStyledClass=function(_828,_829){
if(!_829){
_829="";
}
_828.className=this.classTag+_829+(this.style?" "+this.classTag+"-"+this.style+_829:"");
};
this.styleChanged=function(){
this.setStyledClass(this.GrdTbl);
};
this.setStatus=function(_82a,_82b){
var h=(_82b?"<img src=\"images/"+_82b+"\" align=\"absmiddle\"/>":"");
this.Status.innerHTML=h+_82a;
};
this.setReadyStatus=function(){
document.body.style.cursor="default";
this.setStatus("Ready.",this.readyImage);
};
this.setBusyStatus=function(){
this.setStatus("Busy.",this.busyImage);
document.body.style.cursor="wait";
};
this.setSize=function(_82d,_82e){
this.cols=_82d;
this.rows=_82e;
};
this.deferResize=function(inMs){
turbo.defer(turbo.bind(this,this.resize),(inMs?inMs:200));
};
this.clearGrid=function(){
this.scrollLeft=0;
this.selected=[];
this.selectCount=0;
this.selectedRow=-1;
this.rowMarkerClass=[];
this.sortInfo={};
this.onSelectionChange();
};
this.teardownRows=function(){
this.clearGrid();
dojo.event.browser.clean(this.DtaDiv);
this.DtaDiv.innerHTML="";
dojo.event.browser.clean(this.ColDiv);
this.ColDiv.innerHTML="";
this.DtaTbl=null;
this.ColTbl=null;
};
this.teardown=function(){
this.teardownRows();
dojo.event.browser.clean(this.HdrDiv);
this.HdrDiv.innerHTML="";
this.HdrTbl=null;
};
this.build=function(){
this.cacheColWidths();
this.buildTable();
this.buildFixedColumn();
this.buildHeader();
this.setScrollLeft();
this.setReadyStatus();
this.deferResize();
};
this.refresh=function(){
if(!dojo.render.html.ie){
this.build();
return;
}
this.cacheColWidths();
this.refreshHeader();
this.refreshData();
this.updateRowSizes();
};
this.getCellPos=function(_830){
return {col:turbo.getCellIndex(_830),row:turbo.getRowIndex(_830.parentNode)};
};
this.sameCell=function(inA,inB){
return inA&&inB&&(inA.col==inB.col)&&(inA.row==inB.row);
};
this.goodCell=function(_833){
return (_833.col>=0&&_833.col<this.cols&&_833.row>=0&&_833.row<this.rows);
};
this.getDomCell=function(_834){
return turbo.getTableRow(this.DtaTbl,_834.row).cells[_834.col];
};
this.refreshCell=function(_835){
var _836=this.getDomCell(_835);
dojo.event.browser.clean(_836);
_836.innerHTML=this.getCell(_835.col,_835.row);
};
this.setSortInfo=function(_837,_838){
if(this.sortInfo.column==_837&&_838===undefined){
_838=!this.sortInfo.desc;
}
this.sortInfo={column:_837,desc:_838};
};
this.setSortColumn=this.setSortInfo;
this.cacheColWidths=function(){
for(var i=0;i<this.cols;i++){
this.colWidths[i]=this.getColumnWidth(i);
}
};
this.calcColsWidth=function(){
var sum=0;
for(var i=0;i<this.cols;i++){
sum+=this.colWidths[i];
}
return sum;
};
this.calcTableWidth=function(){
return this.calcColsWidth()+this.cols*(1+2+6)+1;
};
this.getRowClass=function(_83c){
var _83d=(this.controller.getRowClass?this.controller.getRowClass(_83c):"");
if(_83d){
return _83d;
}
if(this.selected[_83c]){
_83d=this.classTag+"-selected";
}
return this.classTag+"-row-"+(_83c&1)+(_83d?" "+_83d:"");
};
this.getRowHeight=function(_83e){
var row=turbo.getTableRow(this.DtaTbl,_83e);
return (row?row.offsetHeight-(dojo.render.html.ie?5:0):0);
};
this.getTable=function(){
return "<table width=\""+this.calcTableWidth()+"\" cellspacing=\"0\">";
};
this.createTable=function(){
var _840=document.createElement("table");
_840.cellPadding=0;
_840.cellSpacing=0;
_840.width=this.calcTableWidth();
return _840;
};
this.getHeaderCell=function(_841){
var h=this.getColumnTitle(_841);
if(h===undefined){
var a=Math.floor(_841/26);
var b=_841%26;
var _845=function(c){
return String.fromCharCode("A".charCodeAt(0)+c);
};
h=(a>0?_845(a-1):"")+_845(b);
}
return h;
};
this.getHeaderSortClass=function(_847){
return " class=\""+this.classTag+"-sort-"+(this.sortInfo.column!=_847?"none":(this.sortInfo.desc?"down":"up"))+"\"";
};
this.getHeaderCellHtml=function(inW,_849){
return "<div style=\"width:"+inW+"px;\""+this.getHeaderSortClass(_849)+">"+"<div style=\"text-align:"+this.getHeaderAlign(_849)+";\">"+this.getHeaderCell(_849)+"</div></div>";
};
this.buildHeader=function(){
this.getSortInfo();
var c="",w;
var sep="<td class=\"turbo-separator\"></td>";
for(var i=0;i<this.cols;i++){
w=this.colWidths[i];
c+="<th width=\""+w+"\">"+this.getHeaderCellHtml(w,i)+"</th>";
c+=sep;
}
c+="<th></th>";
var h="<tr>"+c+"</tr>";
c="";
var bv="<th class=\""+this.classTag+"-bevel\" width=\"";
for(var i=0;i<this.cols;i++){
c+=bv+this.colWidths[i]+"\"></th>"+"<td class=\"turbo-separator\"></td>";
}
c+="<th></th>";
h+="<tr>"+c+"</tr>";
h=this.getTable()+h+"</table>";
this.HdrDiv.innerHTML=h;
this.HdrTbl=this.HdrDiv.firstChild;
this.HdrHeight=this.HdrDiv.clientHeight;
dojo.event.connect(this.HdrTbl,"onmousedown",this,"headerDown");
dojo.event.connect(this.HdrTbl,"onmousemove",this,"headerMove");
dojo.event.connect(this.HdrTbl,"onmouseup",this,"headerUp");
dojo.event.connect(this.HdrTbl,"onmouseover",this,"headerOver");
dojo.event.connect(this.HdrTbl,"onmouseout",this,"headerOut");
dojo.event.connect(this.HdrTbl,"onclick",this,"headerClick");
};
this.refreshHeader=function(){
this.getSortInfo();
var row=turbo.getTableRow(this.HdrTbl,0);
for(var i=0;i<this.cols;i++){
var cell=row.cells[i*2];
var w=this.getColumnWidth(i);
cell.width=w;
cell.innerHTML=this.getHeaderCellHtml(w,i);
}
};
this.getBevel=function(_853){
var _854=_853.parentNode.parentNode;
if(!_854.rows){
_854=_854.parentNode;
}
var row=turbo.getTableRow(_854,1);
return row.cells[turbo.getCellIndex(_853)];
};
this.findEventCell=function(_856,_857){
while(_856.tagName.toLowerCase()!="td"&&_856.parentNode&&_856.parentNode!=this.GrdTbl){
_856=_856.parentNode;
}
return (_856&&dojo.dom.isDescendantOf(_856,_857)?_856:null);
};
this.findEventHeaderCell=function(_858,_859){
while(_858.tagName.toLowerCase()!="th"&&_858.parentNode&&_858.parentNode!=this.GrdTbl){
_858=_858.parentNode;
}
return (_858&&dojo.dom.isDescendantOf(_858,_859)?_858:null);
};
this.getHeaderCellIndex=function(_85a){
return turbo.getCellIndex(_85a)>>1;
};
this.isValidHeaderCell=function(_85b){
return (this.getHeaderCellIndex(_85b)<this.cols);
};
this.headerDown=function(_85c){
var _85d=this.findEventCell(_85c.target,this.HdrTbl);
if(_85d&&this.isValidHeaderCell(_85d)){
_813=true;
_814=_85d;
turbo.capture(_814);
_85c.preventDefault();
_85c.stopPropagation();
}
};
this.headerMove=function(_85e){
if(_813){
window.status=_85e.clientX+", "+_85e.clientY;
_85e.preventDefault();
_85e.stopPropagation();
}
};
this.headerUp=function(_85f){
if(_813){
_813=false;
turbo.release(_814);
}
};
this.headerOver=function(_860){
var _861=this.findEventHeaderCell(_860.target,this.HdrTbl);
if(_861&&this.isValidHeaderCell(_861)){
this.setElementClass(_861,"over");
this.setElementClass(this.getBevel(_861),"bevel-over");
}
};
this.headerOut=function(_862){
var _863=this.findEventHeaderCell(_862.target,this.HdrTbl);
if(_863&&this.isValidHeaderCell(_863)){
this.setElementClass(_863,"");
this.setElementClass(this.getBevel(_863),"bevel");
}
};
this.delayedHeaderClick=function(_864){
var idx=turbo.getCellIndex(_864)>>1;
if(this.onHeaderClick){
this.onHeaderClick(idx);
}else{
if(this.controller.onHeaderClick){
this.controller.onHeaderClick(this,idx);
}
}
};
this.headerClick=function(_866){
if(!this.onHeaderClick&&!this.controller.onHeaderClick){
return;
}
var _867=this.findEventHeaderCell(_866.target,this.HdrTbl);
if(_867&&this.isValidHeaderCell(_867)){
this.setElementClass(_867,"down");
this.setElementClass(this.getBevel(_867),"bevel-over");
this.getScrollLeft();
turbo.defer(turbo.bindArgs(this,this.delayedHeaderClick,_867),1);
}
};
this.getFixedColClass=function(_868){
return (this.selected[_868]?this.classTag+"-fixed-select":"");
};
this.formatFixedCol=function(_869){
return (this.controller.formatFixedCol?this.controller.formatFixedCol(this,_869):Number(_869)+1);
};
this.buildFixedColumn=function(){
this.Corner.style.width=this.fixedColWidth+"px";
this.ColDiv.style.width=this.fixedColWidth+"px";
var tbl=new Array(this.rows+2);
tbl[0]="<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">";
for(var c,j=0,k=1;j<this.rows;j++,k++){
c=this.getFixedColClass(j);
c=(c?" class=\""+c+"\"":"");
tbl[k]="<tr height=\""+this.getRowHeight(j)+"\"><td"+c+">"+this.formatFixedCol(j)+"</td></tr>";
}
tbl[k]="<tr><td height=\"64\" style=\"border: none; background-image: none;\"></td></tr></table>";
this.ColDiv.innerHTML=tbl.join("");
this.ColTbl=this.ColDiv.firstChild;
dojo.event.connect(this.ColTbl,"onclick",this,"fixedTableClick");
};
this.updateFixedColumnRow=function(_86c){
var row=turbo.getTableRow(this.ColTbl,_86c);
var cell=row.cells[0];
cell.className=this.getFixedColClass(_86c);
cell.innerHTML=this.formatFixedCol(_86c);
};
this.fixedTableClick=function(_86f){
};
this.buildCells=function(){
var _870=new Array(this.cols);
for(var i=0;i<this.cols;i++){
var w=this.getColumnWidth(i);
_870[i]="<td width=\""+w+"\"><div style=\"width:"+w+"px;\">";
}
return _870;
};
this.buildTable=function(){
var _873=this.buildCells();
var tbl=new Array(this.rows);
for(var j=0;j<this.rows;j++){
var row=new Array(this.cols);
for(var i=0;i<this.cols;i++){
row[i]=_873[i]+this.getCell(i,j)+"</div></td>";
}
tbl[j]="<tr class=\""+this.getRowClass(j)+"\">"+row.join("")+"<td>&#160;</td></tr>";
}
var h=tbl.join("");
this.DtaDiv.innerHTML=this.getTable()+h+"</table>";
this.DtaTbl=this.DtaDiv.firstChild;
dojo.event.connect(this.DtaTbl,"onmouseover",this,"tableOver");
dojo.event.connect(this.DtaTbl,"onmouseout",this,"tableOut");
dojo.event.connect(this.DtaTbl,"onclick",this,"tableClick");
dojo.event.connect(this.DtaTbl,"ondblclick",this,"tableDblClick");
};
this.buildCols=function(_879){
var cell;
var j=turbo.getRowIndex(_879);
for(var i=0;i<this.cols;i++){
var w=this.getColumnWidth(i);
cell=_879.insertCell(i);
cell.width=w;
var h="<div style=\"width:"+w+"px;\">"+this.getCell(i,j)+"</div>";
cell.innerHTML=h;
}
cell=_879.insertCell(this.cols);
cell.innerHTML="&#160;";
};
this.buildRow=function(_87f){
_87f.onmouseover=turbo.bindArgs(this,this.dataOver,_87f);
_87f.onmouseout=turbo.bindArgs(this,this.dataOut,_87f);
_87f.className=this.getRowClass(turbo.getRowIndex(_87f));
this.buildCols(_87f);
};
this.refreshData=function(){
for(var j=0;j<this.rows;j++){
var row=turbo.getTableRow(this.DtaTbl,j);
for(var i=0;i<this.cols;i++){
row.style.height="0px";
row.cells[i].innerHTML="<div style=\"width:"+this.colWidths[i]+"px;\">"+this.getCell(i,j)+"</div>";
}
}
};
this.dataOver=function(_883){
if(!this.selected[turbo.getRowIndex(_883)]){
this.setElementClass(_883,"row-over");
}
};
this.dataOut=function(_884){
_884.className=this.getRowClass(turbo.getRowIndex(_884));
};
this.dataClick=function(_885,_886){
this.onDataClick(_885,_886);
};
this.dataDblClick=function(_887,_888){
this.onDataDblClick(_887,_888);
};
this.dataKeyDown=function(_889){
this.onKeyDown(_889);
};
this.tableOver=function(_88a){
var _88b=this.findEventCell(_88a.target,this.DtaTbl);
if(_88b){
this.dataOver(_88b.parentNode);
}
};
this.tableOut=function(_88c){
var _88d=this.findEventCell(_88c.target,this.DtaTbl);
if(_88d){
this.dataOut(_88d.parentNode);
}
};
this.tableClick=function(_88e){
var _88f=this.findEventCell(_88e.target,this.DtaTbl);
if(_88f){
this.dataClick(_88f,_88e);
}
};
this.tableDblClick=function(_890){
var _891=this.findEventCell(_890.target,this.DtaTbl);
if(_891){
this.dataDblClick(_891,_890);
}
};
this.getFirstSelectedRow=function(){
for(var i=0;i<this.rows;i++){
if(this.selected[i]){
return Number(i);
}
}
return -1;
};
this.getNextSelectedRow=function(_893){
for(var i=_893+1;i<this.rows;i++){
if(this.selected[i]){
return i;
}
}
return -1;
};
this.hasSelection=function(){
return (this.getFirstSelectedRow()>-1);
};
this.getSelectedRows=function(){
var _895=[];
for(var i=0;i<this.rows;i++){
if(this.selected[i]){
_895.push(i);
}
}
return _895;
};
this.clearSelection=function(){
this.selected=[];
this.selectedRow=-1;
this.selectCount=0;
this.updateRowClasses();
this.buildFixedColumn();
this.onSelectionChange();
};
this.setRowSelected=function(_897,_898){
if(_897<0){
return;
}
if(_898===undefined){
_898=true;
}
if(this.selected[_897]!=_898){
this.selected[_897]=_898;
this.selectedRow=(_898?_897:-1);
this.selectCount+=(_898?1:-1);
if(_898){
this.onSelectRow(_897);
}else{
this.onUnselectRow(_897);
}
}
this.selectedRow=(_898?_897:-1);
this.updateFixedColumnRow(_897);
turbo.getTableRow(this.DtaTbl,_897).className=this.getRowClass(_897);
};
this.selectRow=function(_899){
if(!this.selected[_899]){
this.setRowSelected(_899,true);
this.updateRowSizes();
}
};
this.deselectRow=function(_89a){
if(this.selected[_89a]){
this.setRowSelected(_89a,false);
this.updateRowSizes();
}
};
this.toggleSelectRow=function(_89b){
if(this.selected[_89b]){
this.setRowSelected(_89b,false);
}else{
this.setRowSelected(_89b,true);
}
};
this.unselectRows=function(_89c){
for(var i in this.selected){
if(i!=_89c&&this.selected[i]){
this.setRowSelected(i,false);
}
}
};
this.clickSelect=function(_89e,_89f,_8a0){
if(!this.multiSelect||(!_89f&&!_8a0)){
this.unselectRows(_89e);
}
if(!_8a0||!this.multiSelect){
if(_89f){
this.toggleSelectRow(_89e);
}else{
this.setRowSelected(_89e,true);
}
this.updateRowClasses();
}else{
var r=(this.selectedRow<0?0:this.selectedRow);
var s=r;
var e=_89e;
if(s>_89e){
e=s;
s=_89e;
}
for(var i=s;i<=e;i++){
this.setRowSelected(i,true);
}
this.updateRowClass(r);
}
window.setTimeout(turbo.bind(this,this.updateRowSizes),100);
this.onSelectionChange();
};
this.offsetMarkers=function(_8a5,_8a6){
var _8a7=[];
for(var i in this.rowMarkerClass){
if(this.rowMarkerClass[i]){
if(i>=_8a5){
_8a7[Number(i)+_8a6]=this.rowMarkerClass[i];
}else{
_8a7[i]=this.rowMarkerClass[i];
}
}
}
this.rowMarkerClass=_8a7;
};
this.setMarker=function(_8a9,_8aa){
this.rowMarkerClass[_8a9]=_8aa;
this.updateRowClass(_8a9);
};
this.clearMarkers=function(){
this.rowMarkerClass=[];
};
this.addRow=function(_8ab){
this.clearSelection();
this.buildRow(this.DtaTbl.insertRow(_8ab));
this.offsetMarkers(_8ab,1);
this.rows++;
this.buildFixedColumn();
this.updateRowSizes();
this.setRowSelected(_8ab,true);
};
this.removeRow=function(_8ac){
this.rowMarkerClass[_8ac]=null;
this.offsetMarkers(_8ac,-1);
this.rows--;
this.DtaTbl.deleteRow(_8ac);
this.clearSelection();
};
this.updateRow=function(_8ad){
this.DtaTbl.deleteRow(_8ad);
this.buildRow(this.DtaTbl.insertRow(_8ad));
};
this.swapRows=function(_8ae,_8af){
turbo.array_swap(this.rowMarkerClass,_8ae,_8af);
this.updateRow(_8ae);
this.updateRow(_8af);
this.updateRowSizes();
};
this.replaceRow=function(_8b0){
this.updateRow(_8b0);
this.updateRowSizes();
};
this.updateRowSizes=function(){
if(!this.ColTbl){
return;
}
for(var j=0;j<this.rows;j++){
turbo.setStyleHeightPx(turbo.getTableRow(this.ColTbl,j),this.getRowHeight(j));
}
};
this.updateRowClass=function(_8b2){
turbo.getTableRow(this.DtaTbl,_8b2).className=this.getRowClass(_8b2);
};
this.updateRowClasses=function(){
for(var j=0;j<this.rows;j++){
turbo.getTableRow(this.DtaTbl,j).className=this.getRowClass(j);
}
};
this.getScrollLeft=function(){
this.scrollLeft=this.DtaDiv.scrollLeft;
};
this.setScrollLeft=function(){
this.HdrDiv.scrollLeft=this.scrollLeft;
this.DtaDiv.scrollLeft=this.scrollLeft;
};
this.doScroll=function(){
this.HdrDiv.scrollLeft=this.DtaDiv.scrollLeft;
this.ColDiv.scrollTop=this.DtaDiv.scrollTop;
};
this.getContentSize=function(){
var siz=turbo.getContentSize(this.GrdTbl.parentNode);
siz.w-=dojo.style.getPaddingWidth(this.GrdTbl)+dojo.style.getBorderWidth(this.GrdTbl);
siz.h-=dojo.style.getPaddingWidth(this.GrdTbl)+dojo.style.getBorderHeight(this.GrdTbl);
siz.w=siz.w-this.fixedColWidth-1;
return siz;
};
this._resize=function(){
turbo.setStyleWidthPx(this.HdrDiv,1);
turbo.setStyleWidthPx(this.DtaDiv,1);
var siz=this.getContentSize();
turbo.setStyleWidthPx(this.HdrDiv,siz.w);
turbo.setStyleWidthPx(this.DtaDiv,siz.w);
this.DataWidth=this.calcTableWidth();
siz.w=(siz.w<this.DataWidth?this.DataWidth:siz.w-turbo.getScrollbarWidth());
var _8b6=function(_8b7,_8b8){
if(_8b7&&_8b8>0){
_8b7.width=_8b8;
}
};
_8b6(this.HdrTbl,siz.w+128+64);
_8b6(this.DtaTbl,siz.w);
hh=this.HdrDiv.clientHeight;
turbo.setStyleHeightPx(this.Corner,hh-1);
hh=siz.h-hh-this.Status.clientHeight-1;
turbo.setStyleHeightPx(this.DtaDiv,hh);
if(this.fixedColWidth>0){
hh=siz.h-this.Corner.clientHeight-this.Status.clientHeight-1;
}
turbo.setStyleHeightPx(this.ColDiv,hh);
this.doScroll();
this.updateRowSizes();
};
this.earliestResize=0;
this.doResize=function(){
if(this.GrdTbl&&this.GrdTbl.parentNode&&this.earliestResize<turbo.time()){
this._resize();
this.earliestResize=turbo.time()+100;
}
};
this.resize=this.doResize;
};
dojo.inherits(dojo.widget.HtmlTurboGrid,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turbogrid");
dojo.provide("turbo.widgets.TurboModal");
dojo.provide("turbo.widgets.HtmlTurboModal");
dojo.require("turbo.widgets.TurboWidget");
turbo.modals=[];
dojo.widget.HtmlTurboModal=function(){
this.widgetType="TurboModal";
dojo.widget.HtmlTurboWidget.call(this);
this.templatePath=null;
this.templateString="";
this.classTag="turbo-modal";
this.modalWidth=200;
this.modalHeight=100;
this.bgName="";
this.modalParent="";
this.modalParentNode=null;
this.autoHeight=false;
this.bgOpacity=0.8;
this._showing=false;
this.onShow=function(){
};
this.onHide=function(){
};
this.onBeforeShow=function(){
};
this.onBeforeHide=function(){
};
this.className="";
this.installChildren=function(_8b9){
dojo.dom.moveChildren(this.getWidgetFragment(_8b9),this.modalNode);
var frag=new dojo.xml.Parse().parseElement(this.modalNode);
dojo.widget.getParser().createComponents(frag);
};
this.fillInTemplate=function(_8bb,_8bc){
this.bindArgEvents(_8bb);
dojo.event.topic.subscribe("turboresize",this,"doResize");
this.initNodes();
this.installChildren(_8bc);
};
this.styleChanged=function(){
this.setStyledClass(this.modalNode,"");
this.modalNode.className=this.modalNode.className+" "+this.domNode.className;
this.setBgStyleChanged();
};
this.setBgStyleChanged=function(){
if(this.bgNode){
this.setStyledClass(this.bgNode,"-bg");
}
};
this.initNodes=function(){
if(!this.bgName){
this.bgName=this.widgetId+"_bg";
}
this.modalNode=document.createElement("div");
this.modalNode.setAttribute("isModal",true);
this._hide();
this.attachModalNode();
this.styleChanged();
};
this.getBgNode=function(){
var _8bd=this.getActiveModal();
if(_8bd&&_8bd.modalParent==this.modalParent){
return _8bd.bgNode;
}
var node=document.createElement("iframe");
var n=this.bgName;
node.setAttribute("id",n);
node.setAttribute("name",n);
node.setAttribute("frameBorder",0);
node.setAttribute("scrolling","no");
node.setAttribute("isModalBg",true);
this.attachBgNode(node);
return node;
};
this.setParentNode=function(){
if(this.modalParent){
try{
this.modalParentNode=dojo.widget.byId(this.modalParent).modalNode;
}
catch(e){
this.modalParentNode=document.getElementById(this.modalParent);
}
}
if(!this.modalParentNode){
this.modalParentNode=document.body;
}
};
this.attachModalNode=function(){
this.setParentNode();
if(this.modalParentNode.firstChild){
this.modalParentNode.insertBefore(this.modalNode,this.modalParentNode.firstChild);
}else{
this.modalParentNode.appendChild(this.modalNode);
}
};
this.attachBgNode=function(_8c0){
this.modalParentNode.insertBefore(_8c0,this.modalNode);
};
this.setBgZ=function(_8c1){
_8c1=(_8c1?_8c1:this.modalNode);
this.bgNode.style.zIndex=parseInt(dojo.html.getStyle(_8c1,"z-index"))-1;
};
this.setZIndexes=function(){
var _8c2=this.getActiveModal();
if(_8c2&&_8c2.parentModal==this.parentModal){
this.modalNode.style.zIndex=parseInt(dojo.html.getStyle(_8c2.modalNode,"z-index"))+2;
}
this.setBgZ();
};
this.finishShow=function(){
this.setZIndexes();
this.setActiveModal();
};
this.setActiveModal=function(){
if(this.getActiveModal()!=this){
turbo.modals.push(this);
}
};
this.getActiveModal=function(){
if(!turbo.modals.length){
return false;
}
for(var i=turbo.modals.length-1;i>=0;i--){
if(turbo.modals[i].modalParentNode==this.modalParentNode){
return turbo.modals[i];
}
}
return false;
};
this.removeActiveModal=function(){
for(var i=0;i<turbo.modals.length;i++){
if(turbo.modals[i]==this){
turbo.modals.splice(i,1);
return;
}
}
};
this.show=function(){
if(this.onBeforeShow){
this.onBeforeShow();
}
this._show(turbo.bind(this,"onShow"));
};
this._show=function(_8c5){
this._showing=true;
this.bgNode=this.getBgNode();
dojo.style.setOpacity(this.bgNode,this.bgOpacity);
this.setBgStyleChanged();
turbo.show(this.bgNode);
turbo.show(this.modalNode);
turbo.defer(turbo.bind(this,this.finishShow),100);
this.doResize(_8c5);
};
this.hide=function(){
if(this.onBeforeHide){
this.onBeforeHide();
}
this._hide();
if(this.onHide){
turbo.defer(turbo.bind(this,this.onHide),10);
}
};
this._hide=function(){
this.hideBg();
turbo.hide(this.modalNode);
this._showing=false;
};
this.hideBg=function(){
this.removeActiveModal();
var _8c6=this.getActiveModal();
if(_8c6){
_8c6.acceptBg();
}else{
turbo.hide(this.bgNode);
}
};
this.acceptBg=function(){
dojo.style.setOpacity(this.bgNode,this.bgOpacity);
this.setBgStyleChanged();
this.setBgZ();
};
this.showHide=function(){
if(this._showing){
this.hide();
}else{
this.show();
}
};
this.resizeBg=function(){
var siz=turbo.getInnerSize(this.modalParentNode?this.modalParentNode:null);
var _8c8=(this.modalParentNode&&this.modalParentNode==document.body?2000:0);
turbo.setBounds(this.bgNode,0,0,siz.w+_8c8,siz.h+_8c8);
};
this.hasContent=function(){
return (this.modalNode.innerHTML);
};
this.getAutoHeight=function(){
turbo.setOuterSize(this.modalNode,this.modalWidth,this.modalHeight);
var _8c9=0;
for(var i=0;i<this.modalNode.childNodes.length;i++){
try{
var n=this.modalNode.childNodes[i];
if(n.style.display==""&&n.style.visibility!="hidden"&&!(n.getAttribute("isModal")||n.getAttribute("isModalBg"))){
_8c9+=turbo.getOuterSize(n).h;
}
}
catch(e){
}
}
var _8cc=dojo.style.getPixelValue(this.modalNode,"padding-top",true)+dojo.style.getPixelValue(this.modalNode,"padding-bottom",true);
var _8cd=dojo.style.getBorderHeight(this.modalNode);
return _8c9+_8cc+_8cd;
};
this.resizeModal=function(){
var siz=turbo.getInnerSize(this.modalParentNode?this.modalParentNode:null);
var _8cf=this.hasContent();
var _8d0=10000;
var w=(_8cf)?this.modalWidth:0;
var h=(_8cf)?this.modalHeight:0;
if(this.autoHeight){
h=this.getAutoHeight(w);
}
var l=(_8cf)?Math.round((siz.w-w)/2):siz.w+_8d0;
var t=(_8cf)?Math.round((siz.h-h)/2):siz.h+_8d0;
turbo.setBounds(this.modalNode,l,t,w,h);
};
this.doResize=function(_8d5){
if(!this._showing){
return;
}
this.resizeBg();
this.resizeModal();
this.alignModal(_8d5);
};
this.alignModal=function(_8d6){
turbo.defer(turbo.bindArgs(this,"_alignModal",_8d6),10);
};
this._alignModal=function(_8d7){
turbo.aligner.alignFrom(this.modalNode);
if(_8d7){
turbo.defer(_8d7,10);
}
};
};
dojo.inherits(dojo.widget.HtmlTurboModal,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:TurboModal");
dojo.provide("turbo.widgets.TurboTags");
dojo.provide("turbo.widgets.HtmlTurboTags");
dojo.require("turbo.widgets.TurboWidget");
dojo.widget.HtmlTurboTags=function(){
this.widgetType="TurboTags";
dojo.widget.HtmlTurboWidget.call(this);
this.templateString="<div dojoAttachPoint=\"containerNode\"></div>";
this.containerNode=null;
this.tagNode=null;
this.classTag="turbo_tags";
this.maxFontSize=20;
this.minFontSize=10;
this.maxTags=-1;
this.className="";
this.highlightClass="tagHighlight";
this.tags=[];
this.mostItems=0;
this.leastItems=0;
this.fillInTemplate=function(_8d8,_8d9){
this.setStyle(this.style);
dojo.dom.moveChildren(this.getWidgetFragment(_8d9),this.containerNode);
var frag=new dojo.xml.Parse().parseElement(this.containerNode);
dojo.widget.getParser().createComponents(frag);
this.tagNode=document.createElement("div");
this.containerNode.appendChild(this.tagNode);
this.build();
};
this.build=function(_8db){
this.setTags(_8db);
this.tagNode.innerHTML="";
this.shuffleTags();
this.buildTagsNode(this.tags,this.tagNode);
};
this.buildTagsNode=function(_8dc,_8dd,_8de){
for(var i=0;i<_8dc.length;i++){
_8dd.appendChild(this.buildTag(_8dc[i],_8de));
if(i<_8dc.length-1){
var sep=_8de==undefined?document.createTextNode("  "):document.createTextNode(", ");
_8dd.appendChild(sep);
}
}
};
this.buildTag=function(_8e1,_8e2){
var node=document.createElement("span");
var self=this;
node.onmouseover=function(){
this.className=self.highlightClass;
};
node.onmouseout=function(){
this.className="";
};
node.onclick=function(){
_8e1.action(_8e1.name);
};
if(_8e2==undefined){
if(_8e1.amount==undefined){
_8e1.amount=0;
}
var _8e5=Number(_8e1.amount);
var _8e6=Math.max(0,(_8e5-this.leastItems)/(this.mostItems-this.leastItems));
var _8e7=Math.max(this.minFontSize,Math.round(_8e6*this.maxFontSize));
node.style.fontSize=_8e7+"px";
}
node.style.padding="0px 2px 0px 2px";
node.style.cursor="pointer";
node.innerHTML=_8e1.name;
return node;
};
this.setTags=function(_8e8){
if(_8e8!=undefined){
this.tags=_8e8;
}
this.tags.length=this.maxTags>0?Math.min(this.maxTags,this.tags.length):this.tags.length;
this.setMostItems();
this.setLeastItems();
};
this.setMostItems=function(){
this.mostItems=0;
for(var i in this.tags){
if(Number(this.tags[i].amount)>Number(this.mostItems)){
this.mostItems=this.tags[i].amount;
}
}
};
this.setLeastItems=function(){
this.leastItems=null;
for(var i in this.tags){
if(this.tags[i].amount<this.leastItems||this.leastItems==null){
this.leastItems=this.tags[i].amount;
}
}
};
this.shuffleTags=function(){
for(var i in this.tags){
var a=Math.round(Math.random()*(this.tags.length-1));
var b=Math.round(Math.random()*(this.tags.length-1));
var _8ee=this.tags[a];
this.tags[a]=this.tags[b];
this.tags[b]=_8ee;
}
};
};
dojo.inherits(dojo.widget.HtmlTurboTags,dojo.widget.HtmlWidget);
dojo.widget.tags.addParseTreeHandler("dojo:turbotags");
dojo.provide("turbo.data.stores");
turbo.data.index=function(){
this.defaultValue={};
this.values=[];
this.count=function(){
return this.values.length;
};
this.clear=function(){
this.values=[];
};
this.get=function(_8ef){
var _8f0=this.values[_8ef];
if(!_8f0){
_8f0=turbo.swiss(this.defaultValue,{});
this.values[_8ef]=_8f0;
}
return _8f0;
};
this._set=function(_8f1,_8f2){
var v=this.get(_8f1);
for(var i=1;i<arguments.length;i++){
turbo.swiss(arguments[i],v);
}
this.values[_8f1]=v;
};
this.set=function(){
if(arguments.length<1){
return;
}
var a=arguments[0];
if(!dojo.lang.isArray(a)){
this._set.apply(this,arguments);
}else{
for(i=0,l=a.length;i<l;i++){
this._set(i,a[i]);
}
}
};
this.insert=function(_8f6,_8f7){
if(_8f6>=this.values.length){
this.values[_8f6]=_8f7;
}else{
this.values.splice(_8f6,0,_8f7);
}
};
this.remove=function(_8f8){
this.values.splice(_8f8,1);
};
this.swap=function(_8f9,_8fa){
turbo.array_swap(this.values,_8f9,_8fa);
};
};
turbo.data.fields=function(_8fb){
turbo.data.index.call(this);
var _8fc=(_8fb?_8fb:Object);
this.defaultValue=new _8fc();
this.setDefault=function(_8fd){
if(typeof (_8fd)!="object"){
alert("tubo.data.fields.setDefaultField (stores.js): bad input field object. Are your field definitions included?");
}
turbo.swiss(_8fd,this.defaultValue);
};
};
turbo.data.comparator=function(_8fe){
return function(a,b){
return (a[_8fe]>b[_8fe]?1:(a[_8fe]==b[_8fe]?0:-1));
};
};
turbo.data.field=function(_901){
this.name=_901;
this.comparator=turbo.data.comparator;
this.getComparator=function(_902,_903){
var _904=this.comparator(_902);
if(!_903){
return _904;
}else{
return function(a,b){
return -_904(a,b);
};
}
};
};
turbo.data.table=function(_907){
this.fields=new turbo.data.fields(turbo.data.field);
this.fields.set(_907);
this.rowinfo=new turbo.data.index();
this.sortIndex=-1;
this.sortField="";
this.sortDesc=false;
this.autoSort=false;
this.getFieldNameArray=function(){
var f=this.fields.values;
var a=new Array(f.length);
for(var i=0,l=f.length;i<l;i++){
a[i]=f[i].name;
}
return a;
};
this.getFieldNameIndex=function(_90b){
var f=this.fields.values;
for(var i=0,l=f.length;i<l;i++){
if(f[i].name==_90b){
return i;
}
}
return false;
};
this.getColCount=function(){
return this.fields.count();
};
this.hasData=function(){
return (this.fields.count()>0);
};
this.deleteRows=function(_90e,inOk,_910){
_910("turbo.data.table.deleteRows: no default implementation for delete");
};
this._setSortField=function(_911,_912){
if(_912){
this.sortDesc=_912;
}else{
if(this.sortField==_911){
this.sortDesc=!this.sortDesc;
}else{
this.sortDesc=false;
}
}
this.sortField=_911;
};
this.setSortIndex=function(_913,_914){
if(_913<0){
this.sortField="";
}else{
this._setSortField(this.fields.get(_913).name,_914);
}
this.sortIndex=_913;
};
this.setSortField=function(_915,_916){
if(_915==""){
this.setSortIndex(-1);
}else{
this._setSortField(_915,_916);
this.sortIndex=this.getFieldNameIndex(this.sortField);
}
};
this.hasEdits=function(){
var v=this.rowinfo.values;
for(var i in v){
if(!v.constructor.prototype[i]&&v[i].edit){
return true;
}
}
return false;
};
this.startEdit=function(_919){
this.cacheRow(_919);
this.rowinfo.set(_919,{edit:true});
};
this.cancelEdit=function(_91a){
this.restoreRow(_91a);
with(this.rowinfo.get(_91a)){
delete edit;
}
};
this.applyEdit=function(_91b,inOk,_91d){
if(this.rowChanged(_91b)||this.rowinfo.get(_91b).error){
this._applyEdit(_91b,inOk,_91d);
}else{
this.cancelEdit(_91b);
}
};
this._applyEdit=function(_91e,inOk,_920){
this.rowinfo.get(_91e).inflight=true;
var self=this;
var _922=function(){
with(self.rowinfo.get(_91e)){
delete cache;
delete edit;
delete insert;
delete inflight;
delete error;
}
inOk.apply(this,arguments);
};
var _923=function(_924){
var i=self.rowinfo.get(_91e);
delete i.inflight;
if(_924){
i.error=_924;
}
_920.apply(this,arguments);
};
this.commitRow(_91e,_922,_923);
};
this.commitRow=function(_926,inOk,_928){
inOk();
};
};
turbo.data.store=function(_929,_92a){
turbo.data.table.call(this);
this.data=[];
this.hasData=function(){
return (this.data&&this.data.length>0);
};
this.setData=function(_92b,_92c){
this.data=(_92b?_92b:[]);
this.fields.set(_92c);
};
this.sort=function(){
if(this.sortIndex>=0&&this.hasData()){
this.data.sort(this.fields.get(this.sortIndex).getComparator(this.sortIndex,this.sortDesc));
}
};
this.getColCount=function(){
var _92d=this.fields.count();
var _92e=(this.data&&this.data.length?this.data[0].length:0);
return Math.max(_92d,_92e);
};
this.getRowCount=function(){
return (this.data&&this.data.length?this.data.length:0);
};
this.getDatum=function(_92f,_930){
if(djConfig.isDebug&&(_930<0||_930>=this.data.length)){
turbo.debug("turbo.data.arrayStore.getDatum: bad row: "+_930);
return null;
}
return this.data[_930][_92f];
};
this.setDatum=function(_931,_932,_933){
this.data[_932][_931]=_933;
};
this.getRow=function(_934){
return this.data[_934];
};
this.copyRow=function(_935){
return this.data[_935].slice(0);
};
this.compareRow=function(_936,_937){
var c=this.getColCount();
if(!_937||_937.length!=c){
return false;
}
var row=this.getRow(_936);
for(var i=0;i<c;i++){
if(_937[i]!==row[i]){
return false;
}
}
return true;
};
this.removeRow=function(_93b){
this.data.splice(_93b,1);
this.rowinfo.remove(_93b);
};
this.replaceRow=function(_93c,_93d){
this.data[_93c]=_93d;
};
this.swapRows=function(_93e,_93f){
turbo.array_swap(this.data,_93e,_93f);
this.rowinfo.swap(_93e,_93f);
};
this.getRowCache=function(_940){
return this.rowinfo.get(_940).cache;
};
this.getRowBacking=function(_941){
var c=this.getRowCache(_941);
return (c?c:this.getRow(_941));
};
this.cacheRow=function(_943){
if(!this.getRowCache(_943)){
this.rowinfo.set(_943,{cache:this.copyRow(_943)});
}
};
this.rowChanged=function(_944){
var c=this.getRowCache(_944);
return (!c?true:!this.compareRow(_944,c));
};
this.restoreRow=function(_946){
var c=this.getRowCache(_946);
if(c){
this.replaceRow(_946,c);
}
};
this.addRow=function(_948,_949){
var c=this.getColCount();
if(!_949){
_949=[];
}
for(var i=0;i<c;i++){
if(dojo.lang.isUndefined(_949[i])){
_949[i]=this.fields.get(i).defaultValue;
}
}
if(this.data.length>0){
this.data.splice(_948,0,_949);
}else{
this.data=[_949];
}
this.rowinfo.insert(_948,{edit:true,insert:true});
};
this.setData(_929,_92a);
};
turbo.data.paged=function(_94c){
turbo.data.store.call(this,null,_94c);
this.totalRows=0;
this.rowsPerPage=50;
this.pageCount=0;
this.pages=[];
this.page=-1;
this.invalidPage=-1;
this.requestPage=function(_94d){
};
this.clear=function(){
this.setTotalRows(0);
this.page=-1;
this.pages=[];
this.setSortIndex(-1);
};
this.setTotalRows=function(_94e){
var _94f=this.pageCount;
var _950=this.page;
this.totalRows=_94e;
this.pageCount=Math.ceil(this.totalRows/this.rowsPerPage);
if(this.page>=this.pageCount){
this.page=this.pageCount-1;
}
return (_94f!=this.pageCount||_950!=this.page);
};
this.getPageLength=function(_951){
var page=(_951==this.page?this.data:this.pages[_951]);
return (page?page.length:this.rowsPerPage);
};
this.fetchRowCount=function(){
return this.totalRows;
};
this.repaginate=function(){
var rows=this.fetchRowCount();
this.pages=[];
if(this.page>=0){
this.pages[this.page]=this.data;
}
return this.setTotalRows(rows);
};
this.getTopRow=function(_954){
var page=(_954===undefined?this.page:_954);
return page*this.rowsPerPage;
};
this.getBottomRow=function(_956){
var row=this.getTopRow(_956)+this.getPageLength(_956)-1;
return Math.min(row,this.totalRows-1);
};
this.fillPage=function(_958,_959){
this.pages[_958]=_959;
};
this.selectPage=function(_95a){
this.page=_95a;
if(!this.pages[_95a]){
this.requestPage(_95a);
}
this.rowinfo.clear();
if(this.pages[_95a]){
this.invalidPage=-1;
this.data=this.pages[_95a];
}else{
this.invalidPage=_95a;
this.data=[];
}
};
this.invalidatePage=function(){
this.pages[this.page]=null;
};
this.pageIsValid=function(_95b){
return (this.pages[_95b]?true:false);
};
this.reloadPage=function(){
this.pages[this.page]=null;
this.selectPage(this.page);
};
this.reloadPages=function(){
this.pages=[];
this.selectPage(this.page);
};
this.fillNextPage=function(){
for(var i=0;i<this.pageCount;i++){
if(!this.pages[i]){
break;
}
}
if(i==this.pageCount){
return false;
}
turbo.debug("turbo.data.pages: fillNextPage: "+i);
this.requestPageAsync(i);
return true;
};
this.sort=function(){
this.reloadPages();
};
};
dojo.provide("turbo.grid.columns");
turbo.grid.format={};
turbo.grid.format.noformat=function(_95d,_95e){
return _95d;
};
turbo.grid.edit={};
turbo.grid.edit.noedit={edit:function(_95f,_960,_961){
return false;
},getValue:function(){
return null;
}};
turbo.grid.column=function(_962){
this.name=(_962?_962:"");
this.width=96;
this.readonly=false;
this.editor=null;
this.formatter=turbo.grid.format.text;
this.format=function(_963,_964){
if(!this.formatter){
dojo.debug("turbo.grid.column: illegal formatter for column ["+this.name+"]");
this.formatter=turbo.grid.format.text;
}
var _965=(this.readonly||_964||!this.editor);
return this.formatter.call(this,_963,_965);
};
this.getEditor=function(){
if(!this.editor||this.readonly){
return turbo.grid.edit.noedit;
}else{
this.editor.column=this;
return this.editor;
}
};
};
turbo.grid.format.text=function(_966,_967){
var s="width:"+this.width+"px;";
if(_966==null){
s+=" color: #CCBBB3;";
_966="~";
}else{
if(typeof (_966)=="string"&&_966.length>255){
_966="(text: "+_966.length+" chars)";
}else{
_966=turbo.escapeText(_966);
}
}
if(this.align){
s+=" text-align: "+this.align+";";
}
return "<div style=\""+s+"\">"+_966+"</div>";
};
turbo.grid.format.line=turbo.grid.format.text;
turbo.grid.edit.line=new function(){
this.createInput=function(_969,_96a){
var i=document.createElement("input");
i.setAttribute("autocomplete","OFF");
i.value=(_96a===undefined?"":String(_96a));
i.style.width=_969.clientWidth-10+"px";
_969.innerHTML="";
_969.appendChild(i);
if(i.clientHeight<_969.clientHeight-4){
i.style.height=_969.clientHeight-4+"px";
}
turbo.defer(function(){
i.select();
i.focus();
},10);
return i;
};
this.edit=function(_96c,_96d){
this.input=this.createInput(_96c,_96d);
};
this.getValue=function(){
return (this.input.value=="null"?null:(this.input.value=="undefined"?undefined:this.input.value));
};
};
turbo.grid.edit.multiLine=new function(){
this.createInput=function(_96e,_96f){
var i=document.createElement("textarea");
i.value=String(_96f);
i.rows=2;
i.style.width=_96e.clientWidth-8+"px";
_96e.innerHTML="";
_96e.appendChild(i);
if(i.clientHeight<_96e.clientHeight-4){
i.style.height=_96e.clientHeight-4+"px";
}
i.select();
i.focus();
return i;
};
this.edit=function(_971,_972){
this.input=this.createInput(_971,_972);
};
this.getValue=function(){
return (this.input.value=="null"?null:this.input.value);
};
};
turbo.grid.format.bool=function(_973,_974){
_973=(_973?parseInt(_973)!=0:false);
var s=" text-align: "+(this.align?this.align:"center")+";";
return "<div style=\"width:"+this.width+"px; "+s+"\">"+"<input type=\"checkbox\""+(_974?" disabled=\"disabled\"":"")+(_973?" checked=\"checked\"":"")+"/>"+"</div>";
};
turbo.grid.edit.bool=new function(){
this.edit=function(_976,_977,_978){
while(_976.tagName!="INPUT"){
_976=_976.childNodes[0];
}
this.input=_976;
this.input.focus();
if(this.column.onclick){
this.input.onclick=turbo.bindArgs(this,this.column.onclick,_978);
this.input.onclick();
}
};
this.getValue=function(){
return (this.input.checked?1:0);
};
};
turbo.grid.isIntChar=function(_979){
return (_979.search(/[-+\0\t\n\r\d]/)!=-1);
};
turbo.grid.format.integer=function(_97a,_97b){
var s=" width:"+this.width+"px; text-align: "+(this.align?this.align:"right")+";";
var f="~";
if(_97a==null){
s+=" color: #CCBBB3;";
}else{
f=parseInt(_97a)+(this.units?this.units:"");
}
return "<div style=\""+s+"\">"+f+"</div>";
};
turbo.grid.edit.integer=new function(){
this.limitToInteger=function(_97e){
if(!turbo.grid.isIntChar(String.fromCharCode(_97e.charCode))){
_97e.preventDefault();
}
};
this.createInput=turbo.grid.edit.line.createInput;
this.edit=function(_97f,_980){
this.input=this.createInput(_97f,_980);
dojo.event.connect(this.input,"onkeypress",turbo.bind(this,"limitToInteger"));
};
this.getValue=turbo.grid.edit.line.getValue;
};
turbo.grid.format.decimal=function(_981,_982){
var s="text-align: "+(this.align?this.align:"right")+";";
var f="~";
if(_981==null){
s+=" color: #CCBBB3;";
}else{
f=parseFloat(_981);
f=(this.decimals?f.toFixed(this.decimals):f)+(this.units?this.units:"");
}
return "<div style=\""+s+"\">"+f+"</div>";
};
turbo.grid.decimalIsOk=function(_985,_986){
return (_986=="."&&!/[\.]/.test(_985));
};
turbo.grid.edit.decimal=new function(){
this.limitToDecimal=function(_987){
var s=String.fromCharCode(_987.charCode);
if(!turbo.grid.isIntChar(s)&&!turbo.grid.decimalIsOk(this.input.value,s)){
_987.preventDefault();
}
};
this.createInput=turbo.grid.edit.line.createInput;
this.edit=function(_989,_98a){
this.input=this.createInput(_989,_98a);
dojo.event.connect(this.input,"onkeypress",turbo.bind(this,"limitToDecimal"));
};
this.getValue=turbo.grid.edit.line.getValue;
};
turbo.grid.format.money=function(_98b,_98c){
var f=parseFloat(_98b);
var s=(f<0?-1:1);
f=Math.abs(f);
var i=Math.floor(f).toString();
var l=i.length+(s<0?1:0);
f=(s<0?"&#45;":"")+f.toFixed(2);
l=(this.digits?this.digits:5)-l;
var k="$"+turbo.stringOf(l,"&#160;")+f;
return "<div style=\"width:"+this.width+"px;\" class=\"turbo-grid-money"+(s<0?" turbo-grid-money-neg":"")+"\">"+k+"</div>";
};
turbo.grid.format.enumerated=function(_992,_993){
var opts="";
if(this.options){
for(var i=0,v,s;i<this.options.length;i++){
if(this.values&&this.values[i]){
v=" value=\""+this.values[i]+"\"";
s=(this.values[i]==_992);
}else{
v="";
s=(this.options[i]==_992);
}
s=(s?" selected":"");
opts+="<option"+v+s+">"+this.options[i]+"</option>";
}
}else{
opts="<option>"+_992+"</option>";
}
return "<div>"+"<select"+(_993?" disabled=\"disabled\"":"")+">"+opts+"</select>"+"</div>";
};
turbo.grid.edit.enumerated=new function(){
this.edit=function(_996,_997){
while(_996.tagName!="SELECT"){
_996=_996.childNodes[0];
}
this.input=_996;
};
this.getValue=function(){
return turbo.getSelectValue(this.input);
};
};
turbo.grid.format.autoInc=function(_998){
var s="";
s+="width:"+(this.width-4)+"px;";
s+=" text-align: "+(this.align?this.align:"right")+";";
if(_998===undefined){
s+=" color: #CCBBB3;";
_998="auto";
}
return "<div style=\""+s+"\">"+_998+"</div>";
};
turbo.grid.columns={};
turbo.grid.columns.basic={width:128,formatter:turbo.grid.format.line,editor:turbo.grid.edit.line};
turbo.grid.columns.integer={width:64,align:"right",formatter:turbo.grid.format.integer,editor:turbo.grid.edit.integer};
turbo.grid.columns.decimal={width:80,align:"right",decimals:3,formatter:turbo.grid.format.decimal,editor:turbo.grid.edit.decimal};
turbo.grid.columns.bool={width:48,align:"center",formatter:turbo.grid.format.bool,editor:turbo.grid.edit.bool};
turbo.grid.columns.enumerated={width:96,formatter:turbo.grid.format.enumerated,editor:turbo.grid.edit.enumerated};
turbo.grid.columns.money={width:96,align:"right",digits:5,formatter:turbo.grid.format.money,editor:turbo.grid.edit.decimal};
turbo.grid.columns.autoInc={align:"right",formatter:turbo.grid.format.autoInc};
dojo.provide("turbo.grid.controllers");
dojo.require("turbo.grid.columns");
turbo.grid.controller=function(_99a,_99b,_99c){
if(_99a){
this.readonly=false;
this.columns=new turbo.data.fields(turbo.grid.column);
this.columns.set(_99c);
this.grid=(dojo.lang.isString(_99a)?dojo.widget.getWidgetById(_99a):_99a);
this.grid.controller=this;
this.setModel(_99b);
}
};
dojo.lang.extend(turbo.grid.controller,{canSort:function(_99d){
},showMessage:function(_99e){
},rowsChanged:function(){
}});
dojo.lang.extend(turbo.grid.controller,{clear:function(){
this.editingCell=null;
this.editingRow=-1;
},build:function(){
this.clear();
this.grid.setSize(this.getColCount(),this.model.getRowCount());
this.grid.build();
},setReadonly:function(_99f){
if(_99f!=this.readonly){
this.readonly=_99f;
this.build();
}
},setModel:function(_9a0){
this.model=_9a0;
if(this.model){
this.build();
}
},getColCount:function(){
var _9a1=this.columns.count();
return (_9a1?_9a1:this.model.getColCount());
},getColumnWidth:function(_9a2,_9a3){
return this.columns.get(_9a3).width;
},getDatum:function(_9a4,_9a5){
return this.model.getDatum(_9a4,_9a5);
},getCell:function(_9a6,_9a7,_9a8){
return this.columns.get(_9a7).format(this.getDatum(_9a7,_9a8),this.readonly,_9a8);
},getHeaderAlign:function(_9a9,_9aa){
var a=this.columns.get(_9aa)["align"];
return (a?a:"left");
},getColumnTitle:function(_9ac,_9ad){
var t=this.columns.get(_9ad).name;
return (t?t:this.model.fields.get(_9ad).name);
},getSortInfo:function(_9af){
return {column:this.model.sortIndex,desc:this.model.sortDesc};
},onHeaderClick:function(_9b0,_9b1){
if(this.canSort(_9b1)===false){
return;
}
this.applyEdit();
this.model.setSortIndex(_9b1);
this.model.sort();
this.grid.clearMarkers();
this.grid.refresh();
},getClientRowClass:function(_9b2){
},getRowClass:function(_9b3){
var _9b4="";
if(this.grid.selected[_9b3]&&this.grid.selectCount>1){
_9b4="selected";
}else{
_9b4=this.getClientRowClass(_9b3);
if(_9b4){
return _9b4;
}
}
if(!_9b4){
var i=this.model.rowinfo.get(_9b3);
if(i.inflight){
_9b4="inflight";
}else{
if(i.error){
_9b4="error";
}else{
if(this.grid.selected[_9b3]&&!_9b4){
_9b4=(i.edit?"editing":"selected");
}
}
}
}
return this.grid.classTag+"-row-"+(_9b3&1)+(_9b4?" "+this.grid.classTag+"-"+_9b4:"");
}});
dojo.lang.extend(turbo.grid.controller,{setRow:function(_9b6,_9b7){
this.model.replaceRow(_9b6,_9b7);
this.grid.updateRow(_9b6);
},addRow:function(_9b8,_9b9){
var row=(_9b8!=undefined&&_9b8>=0?_9b8:this.grid.getFirstSelectedRow()+1);
this.applyEdit();
this.model.addRow(row,_9b9);
this.grid.addRow(row);
this.editingRow=row;
this.grid.setRowSelected(row);
this.grid.onSelectionChange();
this.rowsChanged();
},newRow:this.addRow,appendRow:function(_9bb){
this.addRow(Math.max(this.grid.rows,0),_9bb);
},removeRow:function(_9bc){
this.model.removeRow(_9bc);
this.grid.removeRow(_9bc);
},removeSelectedRows:function(){
var rows=this.grid.getSelectedRows();
for(var i=0;i<rows.length;i++){
this.removeRow(rows[i]-i);
}
},swapRows:function(inI,inJ){
this.finishGridEdit();
this.model.swapRows(inI,inJ);
this.grid.swapRows(inI,inJ);
},canMoveRow:function(_9c1){
var src=this.grid.selectedRow;
var dst=src+_9c1;
return (src>=0&&dst>=0&&dst<this.grid.rows);
},moveRow:function(_9c4){
if(!this.canMoveRow(_9c4)){
return;
}
this.finishGridEdit();
var src=this.grid.selectedRow;
var dst=src+_9c4;
this.swapRows(src,src+_9c4);
this.grid.setRowSelected(src,false);
this.grid.setRowSelected(dst,true);
this.grid.onSelectionChange();
},moveRowUp:function(){
this.moveRow(-1);
},moveRowDown:function(){
this.moveRow(1);
}});
dojo.lang.extend(turbo.grid.controller,{onBeginEdit:function(_9c7){
},onEditRowStart:function(_9c8){
},onEditRowDone:function(){
},editingCell:null,editingRow:-1,editCellDone:function(){
this.editingCell=null;
},cancelEditCell:function(){
if(this.editingCell){
this.grid.refreshCell(this.editingCell);
this.editCellDone();
}
},updateEditCell:function(){
if(this.editingCell&&this.editor){
this.updateCell(this.editingCell,this.editor);
this.grid.refreshCell(this.editingCell);
}
},finishEditCell:function(){
this.updateEditCell();
if(this.editingCell){
this.grid.updateRowClass(this.editingCell.row);
}
this.editCellDone();
},editRowStart:function(_9c9){
if(this.editingRow!=_9c9){
this.editingRow=_9c9;
this.model.startEdit(_9c9);
this.onEditRowStart(_9c9);
}
},editRowDone:function(){
this.editingRow=-1;
this.onEditRowDone();
},cancelEditRow:function(){
if(this.editingRow>=0){
var row=this.editingRow;
this.editingRow=-1;
this.grid.updateRowClass(row);
this.editRowDone();
}
},finishEditRow:function(){
if(this.editingRow>=0){
var row=this.editingRow;
this.updateRow(row);
this.editingRow=-1;
this.grid.updateRowClass(row);
this.editRowDone();
}
},cancelGridEdit:function(){
this.cancelEditCell();
this.cancelEditRow();
},finishGridEdit:function(){
this.finishEditCell();
this.finishEditRow();
},editCell:function(_9cc,_9cd,_9ce){
if(!_9cc){
return;
}
var cell=this.grid.getCellPos(_9cc);
if(this.grid.sameCell(this.editingCell,cell)||(!this.grid.goodCell(cell)&&cell.row==this.editingRow)){
return;
}
this.finishEditCell();
if(!this.grid.goodCell(cell)||_9cd||_9ce){
this.finishEditRow();
this.grid.clickSelect(cell.row,_9cd,_9ce);
dojo.html.clearSelection();
}else{
this.grid.unselectRows(cell.row);
if(_9cc.parentNode==null){
return;
}
cell=this.grid.getCellPos(_9cc);
this.editor=this.getEditor(cell);
if(this.editor){
this.editingCell=cell;
this.editRowStart(cell.row);
window.setTimeout(turbo.bind(this.grid,this.grid.updateRowSizes),10);
this.onBeginEdit(cell);
}
this.grid.setRowSelected(cell.row,true);
this.grid.onSelectionChange();
}
},onDataClick:function(_9d0,_9d1,_9d2){
this.editCell(_9d1,_9d2.ctrlKey,_9d2.shiftKey);
}});
dojo.lang.extend(turbo.grid.controller,{getEditor:function(_9d3){
var _9d4=(this.readonly?null:this.columns.get(_9d3.col).getEditor());
if(_9d4&&_9d4.edit(this.grid.getDomCell(_9d3),this.getDatum(_9d3.col,_9d3.row),_9d3)===false){
_9d4=null;
}
return _9d4;
},updateCell:function(_9d5,_9d6){
this.model.setDatum(_9d5.col,_9d5.row,_9d6.getValue());
}});
dojo.lang.extend(turbo.grid.controller,{onUnselectRow:function(_9d7,_9d8){
if(_9d8==this.editingRow){
this.applyEdit();
}
},applyEdit:function(_9d9){
if(this.editingRow>=0){
this.model.rowinfo.get(this.editingRow).sync=Boolean(_9d9);
this.finishGridEdit();
}
},applyEditSync:function(){
this.applyEdit(true);
},cancelEdit:function(){
if(this.editingRow>=0){
var row=this.editingRow;
this.cancelGridEdit();
if(this.model.rowinfo.get(row).insert){
this.removeRow(row);
}else{
this.model.cancelEdit(row);
this.grid.updateRow(row);
}
}
}});
dojo.lang.extend(turbo.grid.controller,{_commitError:function(_9db,_9dc){
this.grid.updateRow(_9db);
var e=(_9dc?_9dc:this.model.rowinfo.get(_9db).error);
turbo.debug("turbo.grid.controller._commitError: "+e);
this.showMessage("A server commit error occured: ["+e+"]",true);
},_commitOk:function(_9de){
this.grid.updateRow(_9de);
this.rowsChanged();
},updateRow:function(_9df){
var ok=turbo.bindArgs(this,"_commitOk",_9df);
var _9e1=turbo.bindArgs(this,"_commitError",_9df);
this.model.applyEdit(_9df,ok,_9e1);
}});
dojo.lang.extend(turbo.grid.controller,{_deleteError:function(){
},_deleteOk:function(_9e2,_9e3){
var c=_9e3;
turbo.debug("turbo.grid.controller._deleteOk: deleted "+c+" row(s)");
var self=this;
var _9e6=0;
var each=function(_9e8){
if(_9e6>=c){
return "break";
}
self.removeRow(_9e8-_9e6++);
};
dojo.lang.forEach(_9e2,each);
if(this.model.repaginate()){
turbo.debug("turbo.grid.controller._deleteOk: repaginate signalled page change, reloading");
this.reloadPage();
}else{
this.model.invalidatePage();
}
this.rowsChanged();
},_deleteRows:function(){
var rows=this.grid.getSelectedRows();
var _9ea=rows.length;
if(!confirm("Ok to delete "+(_9ea!=1?_9ea+" rows":"one row")+" from table \""+this.model.table+"\""+"?")){
return;
}
this.cancelGridEdit();
var _9eb=0;
var _9ec=function(_9ed){
var row=_9ed-_9eb;
var e=this.model.rowinfo.get(row);
if(!e.insert){
return row;
}else{
_9eb++;
turbo.debug("turbo.grid.controller._deleteRows: removing non-committed row "+row);
this.removeRow(row);
return undefined;
}
};
rows=turbo.filter(rows,_9ec,this);
turbo.debug("turbo.grid.controller._deleteRows: deleting "+rows.length+" row(s)");
this.model.deleteRows(rows,turbo.bind(this,this._deleteOk),turbo.bind(this,this._deleteError));
},deleteRows:function(){
this.grid.setBusyStatus();
try{
this._deleteRows();
}
finally{
this.grid.setReadyStatus();
}
}});
dojo.lang.extend(turbo.grid.controller,{prevEdit:function(){
if(this.editingCell){
var cell={col:this.editingCell.col,row:this.editingCell.row};
if(--cell.col>=0){
this.editCell(this.grid.getDomCell(cell));
}else{
if(--cell.row>=0){
this.editCell(this.grid.getDomCell({col:this.grid.cols-1,row:cell.row}));
}
}
}
},nextEdit:function(){
if(this.editingCell){
var cell={col:this.editingCell.col,row:this.editingCell.row};
if(++cell.col<this.grid.cols){
this.editCell(this.grid.getDomCell(cell));
}else{
if(++cell.row<this.grid.rows){
this.editCell(this.grid.getDomCell({col:0,row:cell.row}));
}
}
}
},onKeyDown:function(_9f2,_9f3){
if(_9f3.altKey||_9f3.ctrlKey||_9f3.metaKey){
return;
}
switch(_9f3.keyCode){
case _9f3.KEY_ESCAPE:
this.cancelEditCell();
break;
case _9f3.KEY_ENTER:
if(!_9f3.shiftKey){
this.finishEditCell();
}
break;
case _9f3.KEY_TAB:
if(this.editingCell){
dojo.event.browser.stopEvent(_9f3);
if(_9f3.shiftKey){
this.prevEdit();
}else{
this.nextEdit();
}
}
break;
}
}});
turbo.grid.controllers.paged=function(_9f4,_9f5,_9f6){
turbo.grid.controller.call(this,_9f4,_9f5,_9f6);
};
dojo.inherits(turbo.grid.controllers.paged,turbo.grid.controller);
dojo.lang.extend(turbo.grid.controllers.paged,{setModel:function(_9f7){
this.model=_9f7;
if(this.model){
this.model.repaginate();
this.model.selectPage(0);
this.build();
}
},_selectPage:function(_9f8,_9f9){
this.model.selectPage(_9f8);
this.build();
this.grid.setReadyStatus();
if(_9f9){
_9f9();
}
},selectPage:function(_9fa,_9fb){
this.grid.setBusyStatus();
this.grid.teardownRows();
turbo.defer(turbo.bindArgs(this,this._selectPage,_9fa,_9fb),20);
},reloadPage:function(){
this.model.reloadPage();
this.build();
},formatFixedCol:function(_9fc,_9fd){
return Number(_9fd)+1+this.model.getTopRow();
}});
dojo.provide("turbo.grid.extensions");
turbo.grid.extensions.edit={extend:function(_9fe){
dojo.lang.mixin(_9fe,this);
},getEditor:function(_9ff){
},updateCell:function(_a00,_a01){
},updateRow:function(_a02){
},cacheEditRow:function(_a03){
},onEditRowStart:function(){
},onEditRowDone:function(){
},editingCell:null,editingRow:-1,editClear:function(){
this.editingCell=null;
this.editingRow=-1;
},editCellDone:function(){
this.editingCell=null;
},cancelEditCell:function(){
if(this.editingCell){
this.refreshCell(this.editingCell);
this.editCellDone();
}
},updateEditCell:function(){
if(this.editingCell&&this.editor){
this.updateCell(this.editingCell,this.editor);
this.refreshCell(this.editingCell);
}
},finishEditCell:function(){
this.updateEditCell();
if(this.editingCell){
this.updateRowClass(this.editingCell.row);
}
this.editCellDone();
},editRowStart:function(_a04){
if(this.editingRow!=_a04){
this.editingRow=_a04;
this.cacheEditRow(_a04);
this.onEditRowStart(_a04);
}
},editRowDone:function(){
this.editingRow=-1;
this.onEditRowDone();
},cancelEditRow:function(){
if(this.editingRow>=0){
var row=this.editingRow;
this.editingRow=-1;
this.updateRowClass(row);
this.editRowDone();
}
},finishEditRow:function(){
if(this.editingRow>=0){
var row=this.editingRow;
this.updateRow(row);
this.editingRow=-1;
this.updateRowClass(row);
this.editRowDone();
}
},cancelGridEdit:function(){
this.cancelEditCell();
this.cancelEditRow();
},finishGridEdit:function(){
this.finishEditCell();
this.finishEditRow();
},editCell:function(_a07,_a08,_a09){
if(!_a07){
return;
}
var cell=this.getCellPos(_a07);
if(!this.goodCell(cell)||this.sameCell(this.editingCell,cell)){
return;
}
this.finishEditCell();
if(_a08||_a09){
this.finishEditRow();
this.clickSelect(cell.row,_a08,_a09);
dojo.html.clearSelection();
}else{
this.unselectRows(cell.row);
if(_a07.parentNode==null){
return;
}
cell=this.getCellPos(_a07);
this.editor=this.getEditor(cell,_a07);
if(this.editor){
this.editingCell=cell;
this.editRowStart(cell.row);
window.setTimeout(turbo.bind(this,this.updateRowSizes),10);
}
this.setRowSelected(cell.row,true);
this.onSelectionChange();
}
},editClick:function(_a0b,_a0c,_a0d){
this.editCell(_a0b,_a0c,_a0d);
},prevEdit:function(){
if(this.editingCell){
var cell={col:this.editingCell.col,row:this.editingCell.row};
if(--cell.col>=0){
this.editCell(this.getDomCell(cell));
}else{
if(--cell.row>=0){
this.editCell(this.getDomCell({col:this.cols-1,row:cell.row}));
}
}
}
},nextEdit:function(){
if(this.editingCell){
var cell={col:this.editingCell.col,row:this.editingCell.row};
if(++cell.col<this.cols){
this.editCell(this.getDomCell(cell));
}else{
if(++cell.row<this.rows){
this.editCell(this.getDomCell({col:0,row:cell.row}));
}
}
}
},editKeyDown:function(_a10){
if(_a10.altKey||_a10.ctrlKey||_a10.metaKey){
return;
}
switch(_a10.keyCode){
case _a10.KEY_ESCAPE:
this.cancelEditCell();
break;
case _a10.KEY_ENTER:
if(!_a10.shiftKey){
this.finishEditCell();
}
break;
case _a10.KEY_TAB:
if(this.editingCell){
dojo.event.browser.stopEvent(_a10);
if(_a10.shiftKey){
this.prevEdit();
}else{
this.nextEdit();
}
}
break;
}
},getRowClass:function(_a11){
var _a12=this.rowMarkerClass[_a11];
if(this.selected[_a11]&&(!_a12||this.selectCount>1)){
_a12=(this.editingRow==_a11?"editing":"selected");
}
return this.classTag+"-row-"+(_a11&1)+(_a12?" "+this.classTag+"-"+_a12:"");
},dataClick:function(_a13,_a14){
this.editClick(_a13,_a14.ctrlKey,_a14.shiftKey);
},dataKeyDown:function(_a15){
this.editKeyDown(_a15);
}};


