/*
	Copyright (c) 2004-2006, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/community/licensing.shtml
*/

/*
	This is a compiled version of Dojo, built for deployment and not for
	development. To get an editable version, please visit:

		http://dojotoolkit.org

	for documentation and information on getting the source.
*/

if(typeof dojo=="undefined"){
var dj_global=this;
var dj_currentContext=this;
function dj_undef(_1,_2){
return (typeof (_2||dj_currentContext)[_1]=="undefined");
}
if(dj_undef("djConfig",this)){
var djConfig={};
}
if(dj_undef("dojo",this)){
var dojo={};
}
dojo.global=function(){
return dj_currentContext;
};
dojo.locale=djConfig.locale;
dojo.version={major:1,minor:0,patch:0,flag:"",revision:Number("$Rev: 7460 $".match(/[0-9]+/)[0]),toString:function(){
with(dojo.version){
return major+"."+minor+"."+patch+flag+" ("+revision+")";
}
}};
dojo.getObject=function(_3,_4,_5,_6){
var _7,_8;
if(typeof _3!="string"){
return undefined;
}
_7=_5;
if(!_7){
_7=dojo.global();
}
var _9=_3.split("."),i=0,_b,_c,_d;
do{
_b=_7;
_d=_9[i];
_c=_7[_9[i]];
if((_4)&&(!_c)){
_c=_7[_9[i]]={};
}
_7=_c;
i++;
}while(i<_9.length&&_7);
_8=_7;
_7=_b;
return (_6)?{obj:_7,prop:_d}:_8;
};
dojo.exists=function(_e,_f){
if(typeof _f=="string"){
dojo.deprecated("dojo.exists(obj, name)","use dojo.exists(name, obj, /*optional*/create)","0.6");
var tmp=_e;
_e=_f;
_f=tmp;
}
return (!!dojo.getObject(_e,false,_f));
};
dojo.evalProp=function(_11,_12,_13){
dojo.deprecated("dojo.evalProp","just use hash syntax. Sheesh.","0.6");
return _12[_11]||(_13?(_12[_11]={}):undefined);
};
dojo.parseObjPath=function(_14,_15,_16){
dojo.deprecated("dojo.parseObjPath","use dojo.getObject(path, create, context, true)","0.6");
return dojo.getObject(_14,_16,_15,true);
};
dojo.evalObjPath=function(_17,_18){
dojo.deprecated("dojo.evalObjPath","use dojo.getObject(path, create)","0.6");
return dojo.getObject(_17,_18);
};
dojo.errorToString=function(_19){
return (_19["message"]||_19["description"]||_19);
};
dojo.raise=function(_1a,_1b){
if(_1b){
_1a=_1a+": "+dojo.errorToString(_1b);
}else{
_1a=dojo.errorToString(_1a);
}
try{
if(djConfig.isDebug){
dojo.hostenv.println("FATAL exception raised: "+_1a);
}
}
catch(e){
}
throw _1b||Error(_1a);
};
dojo.debug=function(){
};
dojo.debugShallow=function(obj){
};
dojo.profile={start:function(){
},end:function(){
},stop:function(){
},dump:function(){
}};
function dj_eval(_1d){
return dj_global.eval?dj_global.eval(_1d):eval(_1d);
}
dojo.unimplemented=function(_1e,_1f){
var _20="'"+_1e+"' not implemented";
if(_1f!=null){
_20+=" "+_1f;
}
dojo.raise(_20);
};
dojo.deprecated=function(_21,_22,_23){
var _24="DEPRECATED: "+_21;
if(_22){
_24+=" "+_22;
}
if(_23){
_24+=" -- will be removed in version: "+_23;
}
dojo.debug(_24);
};
dojo.render=(function(){
function vscaffold(_25,_26){
var tmp={capable:false,support:{builtin:false,plugin:false},prefixes:_25};
for(var i=0;i<_26.length;i++){
tmp[_26[i]]=false;
}
return tmp;
}
return {name:"",ver:dojo.version,os:{win:false,linux:false,osx:false},html:vscaffold(["html"],["ie","opera","khtml","safari","moz"]),svg:vscaffold(["svg"],["corel","adobe","batik"]),vml:vscaffold(["vml"],["ie"]),swf:vscaffold(["Swf","Flash","Mm"],["mm"]),swt:vscaffold(["Swt"],["ibm"])};
})();
dojo.hostenv=(function(){
var _29={isDebug:false,allowQueryConfig:false,baseScriptUri:"",baseRelativePath:"",libraryScriptUri:"",iePreventClobber:false,ieClobberMinimal:true,preventBackButtonFix:true,delayMozLoadingFix:false,searchIds:[],parseWidgets:true};
if(typeof djConfig=="undefined"){
djConfig=_29;
}else{
for(var _2a in _29){
if(typeof djConfig[_2a]=="undefined"){
djConfig[_2a]=_29[_2a];
}
}
}
return {name_:"(unset)",version_:"(unset)",getName:function(){
return this.name_;
},getVersion:function(){
return this.version_;
},getText:function(uri){
dojo.unimplemented("getText","uri="+uri);
}};
})();
dojo.hostenv.getBaseScriptUri=function(){
if(djConfig.baseScriptUri.length){
return djConfig.baseScriptUri;
}
var uri=new String(djConfig.libraryScriptUri||djConfig.baseRelativePath);
if(!uri){
dojo.raise("Nothing returned by getLibraryScriptUri(): "+uri);
}
djConfig.baseScriptUri=djConfig.baseRelativePath;
return djConfig.baseScriptUri;
};
(function(){
var _2d={pkgFileName:"__package__",loading_modules_:{},loaded_modules_:{},addedToLoadingCount:[],removedFromLoadingCount:[],inFlightCount:0,modulePrefixes_:{dojo:{name:"dojo",value:"src"}},registerModulePath:function(_2e,_2f){
this.modulePrefixes_[_2e]={name:_2e,value:_2f};
},moduleHasPrefix:function(_30){
var mp=this.modulePrefixes_;
return Boolean(mp[_30]&&mp[_30].value);
},getModulePrefix:function(_32){
if(this.moduleHasPrefix(_32)){
return this.modulePrefixes_[_32].value;
}
return _32;
},getTextStack:[],loadUriStack:[],loadedUris:[],post_load_:false,modulesLoadedListeners:[],unloadListeners:[],loadNotifying:false};
for(var _33 in _2d){
dojo.hostenv[_33]=_2d[_33];
}
})();
dojo.hostenv.loadPath=function(_34,_35,cb){
var uri;
if(_34.charAt(0)=="/"||_34.match(/^\w+:/)){
uri=_34;
}else{
uri=this.getBaseScriptUri()+_34;
}
if(djConfig.cacheBust&&dojo.render.html.capable){
uri+="?"+String(djConfig.cacheBust).replace(/\W+/g,"");
}
try{
return !_35?this.loadUri(uri,cb):this.loadUriAndCheck(uri,_35,cb);
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.hostenv.loadUri=function(uri,cb){
if(this.loadedUris[uri]){
return true;
}
var _3a=this.getText(uri,null,true);
if(!_3a){
return false;
}
this.loadedUris[uri]=true;
if(cb){
_3a="("+_3a+")";
}
var _3b=dj_eval(_3a);
if(cb){
cb(_3b);
}
return true;
};
dojo.hostenv.loadUriAndCheck=function(uri,_3d,cb){
var ok=true;
try{
ok=this.loadUri(uri,cb);
}
catch(e){
dojo.debug("failed loading ",uri," with error: ",e);
}
return Boolean(ok&&this.findModule(_3d,false));
};
dojo.loaded=function(){
};
dojo.unloaded=function(){
};
dojo.hostenv.loaded=function(){
this.loadNotifying=true;
this.post_load_=true;
var mll=this.modulesLoadedListeners;
for(var x=0;x<mll.length;x++){
mll[x]();
}
this.modulesLoadedListeners=[];
this.loadNotifying=false;
dojo.loaded();
};
dojo.hostenv.unloaded=function(){
var mll=this.unloadListeners;
while(mll.length){
(mll.pop())();
}
dojo.unloaded();
};
dojo.addOnLoad=function(obj,_44){
var dh=dojo.hostenv;
if(arguments.length==1){
dh.modulesLoadedListeners.push(obj);
}else{
if(arguments.length>1){
dh.modulesLoadedListeners.push(function(){
obj[_44]();
});
}
}
if(dh.post_load_&&dh.inFlightCount==0&&!dh.loadNotifying){
dh.callLoaded();
}
};
dojo.addOnUnload=function(obj,_47){
var dh=dojo.hostenv;
if(arguments.length==1){
dh.unloadListeners.push(obj);
}else{
if(arguments.length>1){
dh.unloadListeners.push(function(){
obj[_47]();
});
}
}
};
dojo.hostenv.modulesLoaded=function(){
if(this.post_load_){
return;
}
if(this.loadUriStack.length==0&&this.getTextStack.length==0){
if(this.inFlightCount>0){
dojo.debug("files still in flight!");
return;
}
dojo.hostenv.callLoaded();
}
};
dojo.hostenv.callLoaded=function(){
if(typeof setTimeout=="object"||(djConfig["useXDomain"]&&dojo.render.html.opera)){
setTimeout("dojo.hostenv.loaded();",0);
}else{
dojo.hostenv.loaded();
}
};
dojo.hostenv.getModuleSymbols=function(_49){
var _4a=_49.split(".");
for(var i=_4a.length;i>0;i--){
var _4c=_4a.slice(0,i).join(".");
if((i==1)&&!this.moduleHasPrefix(_4c)){
_4a[0]="../"+_4a[0];
}else{
var _4d=this.getModulePrefix(_4c);
if(_4d!=_4c){
_4a.splice(0,i,_4d);
break;
}
}
}
return _4a;
};
dojo.hostenv._global_omit_module_check=false;
dojo.hostenv.loadModule=function(_4e,_4f,_50){
if(!_4e){
return;
}
_50=this._global_omit_module_check||_50;
var _51=this.findModule(_4e,false);
if(_51){
return _51;
}
if(dj_undef(_4e,this.loading_modules_)){
this.addedToLoadingCount.push(_4e);
}
this.loading_modules_[_4e]=1;
var _52=_4e.replace(/\./g,"/")+".js";
var _53=_4e.split(".");
var _54=this.getModuleSymbols(_4e);
var _55=((_54[0].charAt(0)!="/")&&!_54[0].match(/^\w+:/));
var _56=_54[_54.length-1];
var ok;
if(_56=="*"){
_4e=_53.slice(0,-1).join(".");
while(_54.length){
_54.pop();
_54.push(this.pkgFileName);
_52=_54.join("/")+".js";
if(_55&&_52.charAt(0)=="/"){
_52=_52.slice(1);
}
ok=this.loadPath(_52,!_50?_4e:null);
if(ok){
break;
}
_54.pop();
}
}else{
_52=_54.join("/")+".js";
_4e=_53.join(".");
var _58=!_50?_4e:null;
ok=this.loadPath(_52,_58);
if(!ok&&!_4f){
_54.pop();
while(_54.length){
_52=_54.join("/")+".js";
ok=this.loadPath(_52,_58);
if(ok){
break;
}
_54.pop();
_52=_54.join("/")+"/"+this.pkgFileName+".js";
if(_55&&_52.charAt(0)=="/"){
_52=_52.slice(1);
}
ok=this.loadPath(_52,_58);
if(ok){
break;
}
}
}
if(!ok&&!_50){
dojo.raise("Could not load '"+_4e+"'; last tried '"+_52+"'");
}
}
if(!_50&&!this["isXDomain"]){
_51=this.findModule(_4e,false);
if(!_51){
dojo.raise("symbol '"+_4e+"' is not defined after loading '"+_52+"'");
}
}
return _51;
};
dojo.hostenv.startPackage=function(_59){
var _5a=String(_59);
var _5b=_5a;
var _5c=_59.split(/\./);
if(_5c[_5c.length-1]=="*"){
_5c.pop();
_5b=_5c.join(".");
}
var _5d=dojo.getObject(_5b,true);
this.loaded_modules_[_5a]=_5d;
this.loaded_modules_[_5b]=_5d;
return _5d;
};
dojo.hostenv.findModule=function(_5e,_5f){
var lmn=String(_5e);
if(this.loaded_modules_[lmn]){
return this.loaded_modules_[lmn];
}
if(_5f){
dojo.raise("no loaded module named '"+_5e+"'");
}
return null;
};
dojo.kwCompoundRequire=function(_61){
var _62=_61["common"]||[];
var _63=_62.concat(_61[dojo.hostenv.name_]||_61["default"]||[]);
for(var x=0;x<_63.length;x++){
var _65=_63[x];
if(_65.constructor==Array){
dojo.hostenv.loadModule.apply(dojo.hostenv,_65);
}else{
dojo.hostenv.loadModule(_65);
}
}
};
dojo.require=function(_66){
dojo.hostenv.loadModule.apply(dojo.hostenv,arguments);
};
dojo.requireIf=function(_67,_68){
var _69=arguments[0];
if((_69===true)||(_69=="common")||(_69&&dojo.render[_69].capable)){
var _6a=[];
for(var i=1;i<arguments.length;i++){
_6a.push(arguments[i]);
}
dojo.require.apply(dojo,_6a);
}
};
dojo.requireAfterIf=dojo.requireIf;
dojo.provide=function(_6c){
return dojo.hostenv.startPackage.apply(dojo.hostenv,arguments);
};
dojo.registerModulePath=function(_6d,_6e){
return dojo.hostenv.registerModulePath(_6d,_6e);
};
if(djConfig["modulePaths"]){
for(var param in djConfig["modulePaths"]){
dojo.registerModulePath(param,djConfig["modulePaths"][param]);
}
}
dojo.requireLocalization=function(_6f,_70,_71,_72){
dojo.require("dojo.i18n.loader");
dojo.i18n._requireLocalization.apply(dojo.hostenv,arguments);
};
}
if(typeof window!="undefined"){
(function(){
if(djConfig.allowQueryConfig){
var _73=document.location.toString();
var _74=_73.split("?",2);
if(_74.length>1){
var _75=_74[1];
var _76=_75.split("&");
for(var x in _76){
var sp=_76[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 _7a=document.getElementsByTagName("script");
var _7b=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i;
for(var i=0;i<_7a.length;i++){
var src=_7a[i].getAttribute("src");
if(!src){
continue;
}
var m=src.match(_7b);
if(m){
var _7f=src.substring(0,m.index);
if(src.indexOf("bootstrap1")>-1){
_7f+="../";
}
if(!this["djConfig"]){
djConfig={};
}
if(djConfig["baseScriptUri"]==""){
djConfig["baseScriptUri"]=_7f;
}
if(djConfig["baseRelativePath"]==""){
djConfig["baseRelativePath"]=_7f;
}
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 _87=dua.indexOf("Gecko");
drh.mozilla=drh.moz=(_87>=0)&&(!drh.khtml);
if(drh.mozilla){
drh.geckoVersion=dua.substring(_87+6,_87+14);
}
drh.ie=(document.all)&&(!drh.opera);
drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0;
drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0;
drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0;
drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0;
var cm=document["compatMode"];
drh.quirks=(cm=="BackCompat")||(cm=="QuirksMode")||drh.ie55||drh.ie50;
dojo.locale=dojo.locale||(drh.ie?navigator.userLanguage:navigator.language).toLowerCase();
dr.vml.capable=drh.ie;
drs.capable=f;
drs.support.plugin=f;
drs.support.builtin=f;
var _89=window["document"];
var tdi=_89["implementation"];
if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0"))){
drs.capable=t;
drs.support.builtin=t;
drs.support.plugin=f;
}
if(drh.safari){
var tmp=dua.split("AppleWebKit/")[1];
var ver=parseFloat(tmp.split(" ")[0]);
if(ver>=420){
drs.capable=t;
drs.support.builtin=t;
drs.support.plugin=f;
}
}else{
}
})();
dojo.hostenv.startPackage("dojo.hostenv");
dojo.render.name=dojo.hostenv.name_="browser";
dojo.hostenv.searchIds=[];
dojo.hostenv._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];
dojo.hostenv.getXmlhttpObject=function(){
var _8d=null;
var _8e=null;
try{
_8d=new XMLHttpRequest();
}
catch(e){
}
if(!_8d){
for(var i=0;i<3;++i){
var _90=dojo.hostenv._XMLHTTP_PROGIDS[i];
try{
_8d=new ActiveXObject(_90);
}
catch(e){
_8e=e;
}
if(_8d){
dojo.hostenv._XMLHTTP_PROGIDS=[_90];
break;
}
}
}
if(!_8d){
return dojo.raise("XMLHTTP not available",_8e);
}
return _8d;
};
dojo.hostenv._blockAsync=false;
dojo.hostenv.getText=function(uri,_92,_93){
if(!_92){
this._blockAsync=true;
}
var _94=this.getXmlhttpObject();
function isDocumentOk(_95){
var _96=_95["status"];
return Boolean((!_96)||((200<=_96)&&(300>_96))||(_96==304));
}
if(_92){
var _97=this,_98=null,gbl=dojo.global();
var xhr=dojo.getObject("dojo.io.XMLHTTPTransport");
_94.onreadystatechange=function(){
if(_98){
gbl.clearTimeout(_98);
_98=null;
}
if(_97._blockAsync||(xhr&&xhr._blockAsync)){
_98=gbl.setTimeout(function(){
_94.onreadystatechange.apply(this);
},10);
}else{
if(4==_94.readyState){
if(isDocumentOk(_94)){
_92(_94.responseText);
}
}
}
};
}
_94.open("GET",uri,_92?true:false);
try{
_94.send(null);
if(_92){
return null;
}
if(!isDocumentOk(_94)){
var err=Error("Unable to load "+uri+" status:"+_94.status);
err.status=_94.status;
err.responseText=_94.responseText;
throw err;
}
}
catch(e){
this._blockAsync=false;
if((_93)&&(!_92)){
return null;
}else{
throw e;
}
}
this._blockAsync=false;
return _94.responseText;
};
dojo.hostenv.defaultDebugContainerId="dojoDebug";
dojo.hostenv._println_buffer=[];
dojo.hostenv._println_safe=false;
dojo.hostenv.println=function(_9c){
if(!dojo.hostenv._println_safe){
dojo.hostenv._println_buffer.push(_9c);
}else{
try{
var _9d=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId);
if(!_9d){
_9d=dojo.body();
}
var div=document.createElement("div");
div.appendChild(document.createTextNode(_9c));
_9d.appendChild(div);
}
catch(e){
try{
document.write("<div>"+_9c+"</div>");
}
catch(e2){
window.status=_9c;
}
}
}
};
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(_9f,_a0,fp){
var _a2=_9f["on"+_a0]||function(){
};
_9f["on"+_a0]=function(){
fp.apply(_9f,arguments);
_a2.apply(_9f,arguments);
};
return true;
}
function dj_load_init(e){
var _a4=(e&&e.type)?e.type.toLowerCase():"load";
if(arguments.callee.initialized||(_a4!="domcontentloaded"&&_a4!="load")){
return;
}
arguments.callee.initialized=true;
if(typeof (_timer)!="undefined"){
clearInterval(_timer);
delete _timer;
}
var _a5=function(){
if(dojo.render.html.ie){
dojo.hostenv.makeWidgets();
}
};
if(dojo.hostenv.inFlightCount==0){
_a5();
dojo.hostenv.modulesLoaded();
}else{
dojo.hostenv.modulesLoadedListeners.unshift(_a5);
}
}
if(document.addEventListener){
if(dojo.render.html.opera||(dojo.render.html.moz&&(djConfig["enableMozDomContentLoaded"]===true))){
document.addEventListener("DOMContentLoaded",dj_load_init,null);
}
window.addEventListener("load",dj_load_init,null);
}
if(dojo.render.html.ie&&dojo.render.os.win){
document.write("<scr"+"ipt defer src=\"//:\" "+"onreadystatechange=\"if(this.readyState=='complete'){dj_load_init();}\">"+"</scr"+"ipt>");
}
if(/(WebKit|khtml)/i.test(navigator.userAgent)){
var _timer=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
dj_load_init();
}
},10);
}
if(dojo.render.html.ie){
dj_addNodeEvtHdlr(window,"beforeunload",function(){
dojo.hostenv._unloading=true;
window.setTimeout(function(){
dojo.hostenv._unloading=false;
},0);
});
}
dj_addNodeEvtHdlr(window,"unload",function(){
if((!dojo.render.html.ie)||(dojo.render.html.ie&&dojo.hostenv._unloading)){
dojo.hostenv.unloaded();
}
});
dojo.hostenv.makeWidgets=function(){
var _a6=[];
if(djConfig.searchIds&&djConfig.searchIds.length>0){
_a6=_a6.concat(djConfig.searchIds);
}
if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){
_a6=_a6.concat(dojo.hostenv.searchIds);
}
if((djConfig.parseWidgets)||(_a6.length>0)){
if(dojo.getObject("dojo.widget.Parse")){
var _a7=new dojo.xml.Parse();
if(_a6.length>0){
for(var x=0;x<_a6.length;x++){
var _a9=document.getElementById(_a6[x]);
if(!_a9){
continue;
}
var _aa=_a7.parseElement(_a9,null,true);
dojo.widget.getParser().createComponents(_aa);
}
}else{
if(djConfig.parseWidgets){
var _aa=_a7.parseElement(dojo.body(),null,true);
dojo.widget.getParser().createComponents(_aa);
}
}
}
}
};
dojo.addOnLoad(function(){
if(!dojo.render.html.ie){
dojo.hostenv.makeWidgets();
}
});
try{
if(dojo.render.html.ie){
document.namespaces.add("v","urn:schemas-microsoft-com:vml");
document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)");
}
}
catch(e){
}
dojo.hostenv.writeIncludes=function(){
};
if(!dj_undef("document",this)){
dj_currentDocument=this.document;
}
dojo.doc=function(){
return dj_currentDocument;
};
dojo.body=function(){
return dojo.doc().body||dojo.doc().getElementsByTagName("body")[0];
};
dojo.byId=function(id,doc){
if((id)&&((typeof id=="string")||(id instanceof String))){
if(!doc){
doc=dj_currentDocument;
}
var ele=doc.getElementById(id);
if(ele&&(ele.id!=id)&&doc.all){
ele=null;
eles=doc.all[id];
if(eles){
if(eles.length){
for(var i=0;i<eles.length;i++){
if(eles[i].id==id){
ele=eles[i];
break;
}
}
}else{
ele=eles;
}
}
}
return ele;
}
return id;
};
dojo.setContext=function(_af,_b0){
dj_currentContext=_af;
dj_currentDocument=_b0;
};
dojo._fireCallback=function(_b1,_b2,_b3){
if((_b2)&&((typeof _b1=="string")||(_b1 instanceof String))){
_b1=_b2[_b1];
}
return (_b2?_b1.apply(_b2,_b3||[]):_b1());
};
dojo.withGlobal=function(_b4,_b5,_b6,_b7){
var _b8;
var _b9=dj_currentContext;
var _ba=dj_currentDocument;
try{
dojo.setContext(_b4,_b4.document);
_b8=dojo._fireCallback(_b5,_b6,_b7);
}
finally{
dojo.setContext(_b9,_ba);
}
return _b8;
};
dojo.withDoc=function(_bb,_bc,_bd,_be){
var _bf;
var _c0=dj_currentDocument;
try{
dj_currentDocument=_bb;
_bf=dojo._fireCallback(_bc,_bd,_be);
}
finally{
dj_currentDocument=_c0;
}
return _bf;
};
}
dojo.requireIf((djConfig["isDebug"]||djConfig["debugAtAllCosts"]),"dojo.debug");
dojo.requireIf(djConfig["debugAtAllCosts"]&&!window.widget&&!djConfig["useXDomain"],"dojo.browser_debug");
dojo.requireIf(djConfig["debugAtAllCosts"]&&!window.widget&&djConfig["useXDomain"],"dojo.browser_debug_xd");
dojo.provide("dojo.lang.common");
dojo.lang.inherits=function(_c1,_c2){
if(!dojo.lang.isFunction(_c2)){
dojo.raise("dojo.inherits: superclass argument ["+_c2+"] must be a function (subclass: ["+_c1+"']");
}
_c1.prototype=new _c2();
_c1.prototype.constructor=_c1;
_c1.superclass=_c2.prototype;
_c1["super"]=_c2.prototype;
};
dojo.lang._mixin=function(obj,_c4){
var _c5={};
for(var x in _c4){
if((typeof _c5[x]=="undefined")||(_c5[x]!=_c4[x])){
obj[x]=_c4[x];
}
}
if(dojo.render.html.ie&&(typeof (_c4["toString"])=="function")&&(_c4["toString"]!=obj["toString"])&&(_c4["toString"]!=_c5["toString"])){
obj.toString=_c4.toString;
}
return obj;
};
dojo.lang.mixin=function(obj,_c8){
for(var i=1,l=arguments.length;i<l;i++){
dojo.lang._mixin(obj,arguments[i]);
}
return obj;
};
dojo.lang.extend=function(_cb,_cc){
for(var i=1,l=arguments.length;i<l;i++){
dojo.lang._mixin(_cb.prototype,arguments[i]);
}
return _cb;
};
dojo.lang._delegate=function(obj,_d0){
function TMP(){
}
TMP.prototype=obj;
var tmp=new TMP();
if(_d0){
dojo.lang.mixin(tmp,_d0);
}
return tmp;
};
dojo.inherits=dojo.lang.inherits;
dojo.mixin=dojo.lang.mixin;
dojo.extend=dojo.lang.extend;
dojo.lang.find=function(_d2,_d3,_d4,_d5){
var _d6=dojo.lang.isString(_d2);
if(_d6){
_d2=_d2.split("");
}
if(_d5){
var _d7=-1;
var i=_d2.length-1;
var end=-1;
}else{
var _d7=1;
var i=0;
var end=_d2.length;
}
if(_d4){
while(i!=end){
if(_d2[i]===_d3){
return i;
}
i+=_d7;
}
}else{
while(i!=end){
if(_d2[i]==_d3){
return i;
}
i+=_d7;
}
}
return -1;
};
dojo.lang.indexOf=dojo.lang.find;
dojo.lang.findLast=function(_da,_db,_dc){
return dojo.lang.find(_da,_db,_dc,true);
};
dojo.lang.lastIndexOf=dojo.lang.findLast;
dojo.lang.inArray=function(_dd,_de){
return dojo.lang.find(_dd,_de)>-1;
};
dojo.lang.isObject=function(it){
if(typeof it=="undefined"){
return false;
}
return (typeof it=="object"||it===null||dojo.lang.isArray(it)||dojo.lang.isFunction(it));
};
dojo.lang.isArray=function(it){
return (it&&it instanceof Array||typeof it=="array");
};
dojo.lang.isArrayLike=function(it){
if((!it)||(dojo.lang.isUndefined(it))){
return false;
}
if(dojo.lang.isString(it)){
return false;
}
if(dojo.lang.isFunction(it)){
return false;
}
if(dojo.lang.isArray(it)){
return true;
}
if((it.tagName)&&(it.tagName.toLowerCase()=="form")){
return false;
}
if(dojo.lang.isNumber(it.length)&&isFinite(it.length)){
return true;
}
return false;
};
dojo.lang.isFunction=function(it){
return (it instanceof Function||typeof it=="function");
};
(function(){
if((dojo.render.html.capable)&&(dojo.render.html["safari"])){
dojo.lang.isFunction=function(it){
if((typeof (it)=="function")&&(it=="[object NodeList]")){
return false;
}
return (it instanceof Function||typeof it=="function");
};
}
})();
dojo.lang.isString=function(it){
return (typeof it=="string"||it instanceof String);
};
dojo.lang.isAlien=function(it){
if(!it){
return false;
}
return !dojo.lang.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));
};
dojo.lang.isBoolean=function(it){
return (it instanceof Boolean||typeof it=="boolean");
};
dojo.lang.isNumber=function(it){
return (it instanceof Number||typeof it=="number");
};
dojo.lang.isUndefined=function(it){
return ((typeof (it)=="undefined")&&(it==undefined));
};
dojo.provide("dojo.lang.array");
dojo.lang.mixin(dojo.lang,{has:function(obj,_ea){
try{
return typeof obj[_ea]!="undefined";
}
catch(e){
return false;
}
},isEmpty:function(obj){
if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){
return obj.length===0;
}else{
if(dojo.lang.isObject(obj)){
var tmp={};
for(var x in obj){
if(obj[x]&&(!tmp[x])){
return false;
}
}
return true;
}
}
},map:function(arr,obj,_f0){
var _f1=dojo.lang.isString(arr);
if(_f1){
arr=arr.split("");
}
if(dojo.lang.isFunction(obj)&&(!_f0)){
_f0=obj;
obj=dj_global;
}else{
if(dojo.lang.isFunction(obj)&&_f0){
var _f2=obj;
obj=_f0;
_f0=_f2;
}
}
if(Array.map){
var _f3=Array.map(arr,_f0,obj);
}else{
var _f3=[];
for(var i=0;i<arr.length;++i){
_f3.push(_f0.call(obj,arr[i]));
}
}
if(_f1){
return _f3.join("");
}else{
return _f3;
}
},reduce:function(arr,_f6,_f7,_f8){
var _f9=_f7;
if(arguments.length==2){
_f9=arr[0];
arr=arr.slice(1);
}
var ob=_f8||dj_global;
dojo.lang.map(arr,function(val){
_f9=_f6.call(ob,_f9,val);
});
return _f9;
},forEach:function(_fc,_fd,_fe){
if(dojo.lang.isString(_fc)){
_fc=_fc.split("");
}
if(Array.forEach){
Array.forEach(_fc,_fd,_fe);
}else{
if(!_fe){
_fe=dj_global;
}
for(var i=0,l=_fc.length;i<l;i++){
_fd.call(_fe,_fc[i],i,_fc);
}
}
},_everyOrSome:function(_101,arr,_103,_104){
if(dojo.lang.isString(arr)){
arr=arr.split("");
}
if(Array.every){
return Array[_101?"every":"some"](arr,_103,_104);
}else{
if(!_104){
_104=dj_global;
}
for(var i=0,l=arr.length;i<l;i++){
var _107=_103.call(_104,arr[i],i,arr);
if(_101&&!_107){
return false;
}else{
if((!_101)&&(_107)){
return true;
}
}
}
return Boolean(_101);
}
},every:function(arr,_109,_10a){
return this._everyOrSome(true,arr,_109,_10a);
},some:function(arr,_10c,_10d){
return this._everyOrSome(false,arr,_10c,_10d);
},filter:function(arr,_10f,_110){
var _111=dojo.lang.isString(arr);
if(_111){
arr=arr.split("");
}
var _112;
if(Array.filter){
_112=Array.filter(arr,_10f,_110);
}else{
if(!_110){
if(arguments.length>=3){
dojo.raise("thisObject doesn't exist!");
}
_110=dj_global;
}
_112=[];
for(var i=0;i<arr.length;i++){
if(_10f.call(_110,arr[i],i,arr)){
_112.push(arr[i]);
}
}
}
if(_111){
return _112.join("");
}else{
return _112;
}
},unnest:function(){
var out=[];
for(var i=0;i<arguments.length;i++){
if(dojo.lang.isArrayLike(arguments[i])){
var add=dojo.lang.unnest.apply(this,arguments[i]);
out=out.concat(add);
}else{
out.push(arguments[i]);
}
}
return out;
},toArray:function(_117,_118){
var _119=[];
for(var i=_118||0;i<_117.length;i++){
_119.push(_117[i]);
}
return _119;
}});
dojo.provide("dojo.lang.type");
dojo.lang.whatAmI={};
dojo.lang.whatAmI.custom={};
dojo.lang.getType=function(_11b){
try{
if(dojo.lang.isArray(_11b)){
return "array";
}
if(dojo.lang.isFunction(_11b)){
return "function";
}
if(dojo.lang.isString(_11b)){
return "string";
}
if(dojo.lang.isNumber(_11b)){
return "number";
}
if(dojo.lang.isBoolean(_11b)){
return "boolean";
}
if(dojo.lang.isAlien(_11b)){
return "alien";
}
if(dojo.lang.isUndefined(_11b)){
return "undefined";
}
for(var name in dojo.lang.whatAmI.custom){
if(dojo.lang.whatAmI.custom[name](_11b)){
return name;
}
}
if(dojo.lang.isObject(_11b)){
return "object";
}
}
catch(e){
}
return "unknown";
};
dojo.lang.isNumeric=function(_11d){
return (!isNaN(_11d)&&isFinite(_11d)&&(_11d!=null)&&!dojo.lang.isBoolean(_11d)&&!dojo.lang.isArray(_11d)&&!/^\s*$/.test(_11d));
};
dojo.lang.isBuiltIn=function(_11e){
return (dojo.lang.isArray(_11e)||dojo.lang.isFunction(_11e)||dojo.lang.isString(_11e)||dojo.lang.isNumber(_11e)||dojo.lang.isBoolean(_11e)||(_11e==null)||(_11e instanceof Error)||(typeof _11e=="error"));
};
dojo.lang.isPureObject=function(_11f){
return ((_11f!=null)&&dojo.lang.isObject(_11f)&&_11f.constructor==Object);
};
dojo.lang.isOfType=function(_120,type,_122){
var _123=false;
if(_122){
_123=_122["optional"];
}
if(_123&&((_120===null)||dojo.lang.isUndefined(_120))){
return true;
}
if(dojo.lang.isArray(type)){
var _124=type;
for(var i in _124){
var _126=_124[i];
if(dojo.lang.isOfType(_120,_126)){
return true;
}
}
return false;
}else{
if(dojo.lang.isString(type)){
type=type.toLowerCase();
}
switch(type){
case Array:
case "array":
return dojo.lang.isArray(_120);
case Function:
case "function":
return dojo.lang.isFunction(_120);
case String:
case "string":
return dojo.lang.isString(_120);
case Number:
case "number":
return dojo.lang.isNumber(_120);
case "numeric":
return dojo.lang.isNumeric(_120);
case Boolean:
case "boolean":
return dojo.lang.isBoolean(_120);
case Object:
case "object":
return dojo.lang.isObject(_120);
case "pureobject":
return dojo.lang.isPureObject(_120);
case "builtin":
return dojo.lang.isBuiltIn(_120);
case "alien":
return dojo.lang.isAlien(_120);
case "undefined":
return dojo.lang.isUndefined(_120);
case null:
case "null":
return (_120===null);
default:
if(dojo.lang.isFunction(type)){
return (_120 instanceof type);
}else{
dojo.raise("dojo.lang.isOfType() was passed an invalid type");
}
}
}
dojo.raise("If we get here, it means a bug was introduced above.");
};
dojo.lang.getObject=function(str){
dojo.deprecated("dojo.lang.getObject","use dojo.getObject","0.6");
var _128=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_128[i++]];
}while(i<_128.length&&obj);
return (obj!=dj_global)?obj:null;
};
dojo.lang.doesObjectExist=function(str){
dojo.deprecated("dojo.lang.doesObjectExist","use dojo.exists","0.6");
var _12c=str.split("."),i=0,obj=dj_global;
do{
obj=obj[_12c[i++]];
}while(i<_12c.length&&obj);
return (obj&&obj!=dj_global);
};
dojo.provide("dojo.lang.assert");
dojo.lang.assert=function(_12f,_130){
if(!_12f){
var _131="An assert statement failed.\n"+"The method dojo.lang.assert() was called with a 'false' value.\n";
if(_130){
_131+="Here's the assert message:\n"+_130+"\n";
}
throw new Error(_131);
}
};
dojo.lang.assertType=function(_132,type,_134){
if(!dojo.lang.isOfType(_132,type,_134)){
if(!dojo.lang.assertType._errorMessage){
dojo.lang.assertType._errorMessage="Type mismatch: dojo.lang.assertType() failed.";
}
dojo.lang.assert(false,dojo.lang.assertType._errorMessage);
}
};
dojo.lang.assertValidKeywords=function(_135,_136,_137){
var key;
if(!_137){
if(!dojo.lang.assertValidKeywords._errorMessage){
dojo.lang.assertValidKeywords._errorMessage="In dojo.lang.assertValidKeywords(), found invalid keyword:";
}
_137=dojo.lang.assertValidKeywords._errorMessage;
}
if(dojo.lang.isArray(_136)){
for(key in _135){
if(!dojo.lang.inArray(_136,key)){
dojo.lang.assert(false,_137+" "+key);
}
}
}else{
for(key in _135){
if(!(key in _136)){
dojo.lang.assert(false,_137+" "+key);
}
}
}
};
dojo.provide("dojo.lang.func");
dojo.lang.hitch=function(_139,_13a){
var args=[];
for(var x=2;x<arguments.length;x++){
args.push(arguments[x]);
}
var fcn=(dojo.lang.isString(_13a)?_139[_13a]:_13a)||function(){
};
return function(){
var ta=args.concat([]);
for(var x=0;x<arguments.length;x++){
ta.push(arguments[x]);
}
return fcn.apply(_139,ta);
};
};
dojo.lang.anonCtr=0;
dojo.lang.anon={};
dojo.lang.nameAnonFunc=function(_140,_141,_142){
var isIE=(dojo.render.html.capable&&dojo.render.html["ie"]);
var jpn="$joinpoint";
var nso=(_141||dojo.lang.anon);
if(isIE){
var cn=_140["__dojoNameCache"];
if(cn&&nso[cn]===_140){
return _140["__dojoNameCache"];
}else{
if(cn){
var _147=cn.indexOf(jpn);
if(_147!=-1){
return cn.substring(0,_147);
}
}
}
}
if((_142)||((dj_global["djConfig"])&&(djConfig["slowAnonFuncLookups"]==true))){
for(var x in nso){
try{
if(nso[x]===_140){
if(isIE){
_140["__dojoNameCache"]=x;
var _147=x.indexOf(jpn);
if(_147!=-1){
x=x.substring(0,_147);
}
}
return x;
}
}
catch(e){
}
}
}
var ret="__"+dojo.lang.anonCtr++;
while(typeof nso[ret]!="undefined"){
ret="__"+dojo.lang.anonCtr++;
}
nso[ret]=_140;
return ret;
};
dojo.lang.forward=function(_14a){
return function(){
return this[_14a].apply(this,arguments);
};
};
dojo.lang.curry=function(_14b,func){
var _14d=[];
_14b=_14b||dj_global;
if(dojo.lang.isString(func)){
func=_14b[func];
}
for(var x=2;x<arguments.length;x++){
_14d.push(arguments[x]);
}
var _14f=(func["__preJoinArity"]||func.length)-_14d.length;
function gather(_150,_151,_152){
var _153=_152;
var _154=_151.slice(0);
for(var x=0;x<_150.length;x++){
_154.push(_150[x]);
}
_152=_152-_150.length;
if(_152<=0){
var res=func.apply(_14b,_154);
_152=_153;
return res;
}else{
return function(){
return gather(arguments,_154,_152);
};
}
}
return gather([],_14d,_14f);
};
dojo.lang.curryArguments=function(_157,func,args,_15a){
var _15b=[];
var x=_15a||0;
for(x=_15a;x<args.length;x++){
_15b.push(args[x]);
}
return dojo.lang.curry.apply(dojo.lang,[_157,func].concat(_15b));
};
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,_161,_162){
if(!farr.length){
if(typeof _162=="function"){
_162();
}
return;
}
if((typeof _161=="undefined")&&(typeof cb=="number")){
_161=cb;
cb=function(){
};
}else{
if(!cb){
cb=function(){
};
if(!_161){
_161=0;
}
}
}
setTimeout(function(){
(farr.shift())();
cb();
dojo.lang.delayThese(farr,cb,_161,_162);
},_161);
};
dojo.provide("dojo.lang.extras");
dojo.lang.setTimeout=function(func,_164){
var _165=window,_166=2;
if(!dojo.lang.isFunction(func)){
_165=func;
func=_164;
_164=arguments[2];
_166++;
}
if(dojo.lang.isString(func)){
func=_165[func];
}
var args=[];
for(var i=_166;i<arguments.length;i++){
args.push(arguments[i]);
}
return dojo.global().setTimeout(function(){
func.apply(_165,args);
},_164);
};
dojo.lang.clearTimeout=function(_169){
dojo.global().clearTimeout(_169);
};
dojo.lang.getNameInObj=function(ns,item){
if(!ns){
ns=dj_global;
}
for(var x in ns){
if(ns[x]===item){
return new String(x);
}
}
return null;
};
dojo.lang.shallowCopy=function(obj,deep){
var i,ret;
if(obj===null){
return null;
}
if(dojo.lang.isObject(obj)){
ret=new obj.constructor();
for(i in obj){
if(dojo.lang.isUndefined(ret[i])){
ret[i]=deep?dojo.lang.shallowCopy(obj[i],deep):obj[i];
}
}
}else{
if(dojo.lang.isArray(obj)){
ret=[];
for(i=0;i<obj.length;i++){
ret[i]=deep?dojo.lang.shallowCopy(obj[i],deep):obj[i];
}
}else{
ret=obj;
}
}
return ret;
};
dojo.lang.firstValued=function(){
for(var i=0;i<arguments.length;i++){
if(typeof arguments[i]!="undefined"){
return arguments[i];
}
}
return undefined;
};
dojo.lang.getObjPathValue=function(_172,_173,_174){
dojo.deprecated("dojo.lang.getObjPathValue","use dojo.getObject","0.6");
with(dojo.parseObjPath(_172,_173,_174)){
return dojo.evalProp(prop,obj,_174);
}
};
dojo.lang.setObjPathValue=function(_175,_176,_177,_178){
dojo.deprecated("dojo.lang.setObjPathValue","use dojo.parseObjPath and the '=' operator","0.6");
if(arguments.length<4){
_178=true;
}
with(dojo.parseObjPath(_175,_177,_178)){
if(obj&&(_178||(prop in obj))){
obj[prop]=_176;
}
}
};
dojo.provide("dojo.AdapterRegistry");
dojo.AdapterRegistry=function(_179){
this.pairs=[];
this.returnWrappers=_179||false;
};
dojo.lang.extend(dojo.AdapterRegistry,{register:function(name,_17b,wrap,_17d,_17e){
var type=(_17e)?"unshift":"push";
this.pairs[type]([name,_17b,wrap,_17d]);
},match:function(){
for(var i=0;i<this.pairs.length;i++){
var pair=this.pairs[i];
if(pair[1].apply(this,arguments)){
if((pair[3])||(this.returnWrappers)){
return pair[2];
}else{
return pair[2].apply(this,arguments);
}
}
}
throw new Error("No match found");
},unregister:function(name){
for(var i=0;i<this.pairs.length;i++){
var pair=this.pairs[i];
if(pair[0]==name){
this.pairs.splice(i,1);
return true;
}
}
return false;
}});
dojo.provide("dojo.string.common");
dojo.string.trim=function(str,wh){
if(!str.replace){
return str;
}
if(!str.length){
return str;
}
var re=(wh>0)?(/^\s+/):(wh<0)?(/\s+$/):(/^\s+|\s+$/g);
return str.replace(re,"");
};
dojo.string.trimStart=function(str){
return dojo.string.trim(str,1);
};
dojo.string.trimEnd=function(str){
return dojo.string.trim(str,-1);
};
dojo.string.repeat=function(str,_18b,_18c){
var out="";
for(var i=0;i<_18b;i++){
out+=str;
if(_18c&&i<_18b-1){
out+=_18c;
}
}
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.extras");
dojo.string.substitute=function(_19a,map,_19c,_19d){
return _19a.replace(/\$\{([^\s\:\}]+)(?:\:(\S+))?\}/g,function(_19e,key,_1a0){
var _1a1=dojo.getObject(key,false,map).toString();
if(_1a0){
_1a1=dojo.getObject(_1a0,false,_19d)(_1a1);
}
if(_19c){
_1a1=_19c(_1a1);
}
return _1a1;
});
};
dojo.string.capitalize=function(str){
if(!dojo.lang.isString(str)){
return "";
}
return str.replace(/[^\s]+/g,function(word){
return word.substring(0,1).toUpperCase()+word.substring(1);
});
};
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 _1a7=escape(str);
var _1a8,re=/%u([0-9A-F]{4})/i;
while((_1a8=_1a7.match(re))){
var num=Number("0x"+_1a8[1]);
var _1ab=escape("&#"+num+";");
ret+=_1a7.substring(0,_1a8.index)+_1ab;
_1a7=_1a7.substring(_1a8.index+_1a8[0].length);
}
ret+=_1a7.replace(/\+/g,"%2B");
return ret;
};
dojo.string.escape=function(type,str){
var args=dojo.lang.toArray(arguments,1);
switch(type.toLowerCase()){
case "xml":
case "html":
case "xhtml":
return dojo.string.escapeXml.apply(this,args);
case "sql":
return dojo.string.escapeSql.apply(this,args);
case "regexp":
case "regex":
return dojo.string.escapeRegExp.apply(this,args);
case "javascript":
case "jscript":
case "js":
return dojo.string.escapeJavaScript.apply(this,args);
case "ascii":
return dojo.string.encodeAscii.apply(this,args);
default:
return str;
}
};
dojo.string.escapeXml=function(str,_1b0){
str=str.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
if(!_1b0){
str=str.replace(/'/gm,"&#39;");
}
return str;
};
dojo.string.escapeSql=function(str){
return str.replace(/'/gm,"''");
};
dojo.string.escapeRegExp=function(str,_1b3){
return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g,function(ch){
if(_1b3&&_1b3.indexOf(ch)!=-1){
return ch;
}
return "\\"+ch;
});
};
dojo.string.escapeJavaScript=function(str){
return str.replace(/(["'\f\b\n\t\r])/gm,"\\$1");
};
dojo.string.escapeString=function(str){
return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");
};
dojo.string.summary=function(str,len){
if(!len||str.length<=len){
return str;
}
return str.substring(0,len).replace(/\.+$/,"")+"...";
};
dojo.string.endsWith=function(str,end,_1bb){
if(_1bb){
str=str.toLowerCase();
end=end.toLowerCase();
}
if((str.length-end.length)<0){
return false;
}
return str.lastIndexOf(end)==str.length-end.length;
};
dojo.string.endsWithAny=function(str){
for(var i=1;i<arguments.length;i++){
if(dojo.string.endsWith(str,arguments[i])){
return true;
}
}
return false;
};
dojo.string.startsWith=function(str,_1bf,_1c0){
if(_1c0){
str=str.toLowerCase();
_1bf=_1bf.toLowerCase();
}
return str.indexOf(_1bf)==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,_1c6){
if(_1c6=="\n"){
text=text.replace(/\r\n/g,"\n");
text=text.replace(/\r/g,"\n");
}else{
if(_1c6=="\r"){
text=text.replace(/\r\n/g,"\r");
text=text.replace(/\n/g,"\r");
}else{
text=text.replace(/([^\r])\n/g,"$1\r\n").replace(/\r([^\n])/g,"\r\n$1");
}
}
return text;
};
dojo.string.splitEscaped=function(str,_1c8){
var _1c9=[];
for(var i=0,_1cb=0;i<str.length;i++){
if(str.charAt(i)=="\\"){
i++;
continue;
}
if(str.charAt(i)==_1c8){
_1c9.push(str.substring(_1cb,i));
_1cb=i+1;
}
}
_1c9.push(str.substr(_1cb));
return _1c9;
};
dojo.provide("dojo.lang.repr");
dojo.lang.reprRegistry=new dojo.AdapterRegistry();
dojo.lang.registerRepr=function(name,_1cd,wrap,_1cf){
dojo.lang.reprRegistry.register(name,_1cd,wrap,_1cf);
};
dojo.lang.repr=function(obj){
if(typeof (obj)=="undefined"){
return "undefined";
}else{
if(obj===null){
return "null";
}
}
try{
if(typeof (obj["__repr__"])=="function"){
return obj["__repr__"]();
}else{
if((typeof (obj["repr"])=="function")&&(obj.repr!=arguments.callee)){
return obj["repr"]();
}
}
return dojo.lang.reprRegistry.match(obj);
}
catch(e){
if(typeof (obj.NAME)=="string"&&(obj.toString==Function.prototype.toString||obj.toString==Object.prototype.toString)){
return obj.NAME;
}
}
if(typeof (obj)=="function"){
obj=(obj+"").replace(/^\s+/,"");
var idx=obj.indexOf("{");
if(idx!=-1){
obj=obj.substr(0,idx)+"{...}";
}
}
return obj+"";
};
dojo.lang.reprArrayLike=function(arr){
try{
var na=dojo.lang.map(arr,dojo.lang.repr);
return "["+na.join(", ")+"]";
}
catch(e){
}
};
(function(){
var m=dojo.lang;
m.registerRepr("arrayLike",m.isArrayLike,m.reprArrayLike);
m.registerRepr("string",m.isString,m.reprString);
m.registerRepr("numbers",m.isNumber,m.reprNumber);
m.registerRepr("boolean",m.isBoolean,m.reprNumber);
})();
dojo.provide("dojo.lang.declare");
dojo.lang.declare=function(_1d5,_1d6,init,_1d8){
if((dojo.lang.isFunction(_1d8))||((!_1d8)&&(!dojo.lang.isFunction(init)))){
if(dojo.lang.isFunction(_1d8)){
dojo.deprecated("dojo.lang.declare("+_1d5+"...):","use class, superclass, initializer, properties argument order","0.6");
}
var temp=_1d8;
_1d8=init;
init=temp;
}
if(_1d8&&_1d8.initializer){
dojo.deprecated("dojo.lang.declare("+_1d5+"...):","specify initializer as third argument, not as an element in properties","0.6");
}
var _1da=[];
if(dojo.lang.isArray(_1d6)){
_1da=_1d6;
_1d6=_1da.shift();
}
if(!init){
init=dojo.getObject(_1d5,false);
if((init)&&(!dojo.lang.isFunction(init))){
init=null;
}
}
var ctor=dojo.lang.declare._makeConstructor();
var scp=(_1d6?_1d6.prototype:null);
if(scp){
scp.prototyping=true;
ctor.prototype=new _1d6();
scp.prototyping=false;
}
ctor.superclass=scp;
ctor.mixins=_1da;
for(var i=0,l=_1da.length;i<l;i++){
dojo.lang.extend(ctor,_1da[i].prototype);
}
ctor.prototype.initializer=null;
ctor.prototype.declaredClass=_1d5;
if(dojo.lang.isArray(_1d8)){
dojo.lang.extend.apply(dojo.lang,[ctor].concat(_1d8));
}else{
dojo.lang.extend(ctor,(_1d8)||{});
}
dojo.lang.extend(ctor,dojo.lang.declare._common);
ctor.prototype.constructor=ctor;
ctor.prototype.initializer=(ctor.prototype.initializer)||(init)||(function(){
});
var _1df=dojo.getObject(_1d5,true,null,true);
_1df.obj[_1df.prop]=ctor;
return ctor;
};
dojo.lang.declare._makeConstructor=function(){
return function(){
var self=this._getPropContext();
var s=self.constructor.superclass;
if((s)&&(s.constructor)){
if(s.constructor==arguments.callee){
this._inherited("constructor",arguments);
}else{
this._contextMethod(s,"constructor",arguments);
}
}
var ms=(self.constructor.mixins)||([]);
for(var i=0,m;(m=ms[i]);i++){
(((m.prototype)&&(m.prototype.initializer))||(m)).apply(this,arguments);
}
if((!this.prototyping)&&(self.initializer)){
self.initializer.apply(this,arguments);
}
};
};
dojo.lang.declare._common={_getPropContext:function(){
return (this.___proto||this);
},_contextMethod:function(_1e5,_1e6,args){
var _1e8,_1e9=this.___proto;
this.___proto=_1e5;
try{
_1e8=_1e5[_1e6].apply(this,(args||[]));
}
catch(e){
throw e;
}
finally{
this.___proto=_1e9;
}
return _1e8;
},_inherited:function(prop,args){
var p=this._getPropContext();
do{
if((!p.constructor)||(!p.constructor.superclass)){
return;
}
p=p.constructor.superclass;
}while(!(prop in p));
return (dojo.lang.isFunction(p[prop])?this._contextMethod(p,prop,args):p[prop]);
}};
dojo.declare=dojo.lang.declare;
dojo.kwCompoundRequire({common:["dojo.lang.common","dojo.lang.assert","dojo.lang.array","dojo.lang.type","dojo.lang.func","dojo.lang.extras","dojo.lang.repr","dojo.lang.declare"]});
dojo.provide("dojo.lang.*");
dojo.provide("dojo.dom");
dojo.dom.ELEMENT_NODE=1;
dojo.dom.ATTRIBUTE_NODE=2;
dojo.dom.TEXT_NODE=3;
dojo.dom.CDATA_SECTION_NODE=4;
dojo.dom.ENTITY_REFERENCE_NODE=5;
dojo.dom.ENTITY_NODE=6;
dojo.dom.PROCESSING_INSTRUCTION_NODE=7;
dojo.dom.COMMENT_NODE=8;
dojo.dom.DOCUMENT_NODE=9;
dojo.dom.DOCUMENT_TYPE_NODE=10;
dojo.dom.DOCUMENT_FRAGMENT_NODE=11;
dojo.dom.NOTATION_NODE=12;
dojo.dom.dojoml="http://www.dojotoolkit.org/2004/dojoml";
dojo.dom.xmlns={svg:"http://www.w3.org/2000/svg",smil:"http://www.w3.org/2001/SMIL20/",mml:"http://www.w3.org/1998/Math/MathML",cml:"http://www.xml-cml.org",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml",xul:"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",xbl:"http://www.mozilla.org/xbl",fo:"http://www.w3.org/1999/XSL/Format",xsl:"http://www.w3.org/1999/XSL/Transform",xslt:"http://www.w3.org/1999/XSL/Transform",xi:"http://www.w3.org/2001/XInclude",xforms:"http://www.w3.org/2002/01/xforms",saxon:"http://icl.com/saxon",xalan:"http://xml.apache.org/xslt",xsd:"http://www.w3.org/2001/XMLSchema",dt:"http://www.w3.org/2001/XMLSchema-datatypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",dc:"http://purl.org/dc/elements/1.1/",dcq:"http://purl.org/dc/qualifiers/1.0","soap-env":"http://schemas.xmlsoap.org/soap/envelope/",wsdl:"http://schemas.xmlsoap.org/wsdl/",AdobeExtensions:"http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"};
dojo.dom.isNode=function(wh){
if(typeof Element=="function"){
try{
return wh instanceof Element;
}
catch(e){
}
}else{
return wh&&!isNaN(wh.nodeType);
}
};
dojo.dom.getUniqueId=function(){
var _1ee=dojo.doc();
do{
var id="dj_unique_"+(++arguments.callee._idIncrement);
}while(_1ee.getElementById(id));
return id;
};
dojo.dom.getUniqueId._idIncrement=0;
dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(_1f0,_1f1){
var node=_1f0.firstChild;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.nextSibling;
}
if(_1f1&&node&&node.tagName&&node.tagName.toLowerCase()!=_1f1.toLowerCase()){
node=dojo.dom.nextElement(node,_1f1);
}
return node;
};
dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_1f3,_1f4){
var node=_1f3.lastChild;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.previousSibling;
}
if(_1f4&&node&&node.tagName&&node.tagName.toLowerCase()!=_1f4.toLowerCase()){
node=dojo.dom.prevElement(node,_1f4);
}
return node;
};
dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(node,_1f7){
if(!node){
return null;
}
do{
node=node.nextSibling;
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
if(node&&_1f7&&_1f7.toLowerCase()!=node.tagName.toLowerCase()){
return dojo.dom.nextElement(node,_1f7);
}
return node;
};
dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(node,_1f9){
if(!node){
return null;
}
if(_1f9){
_1f9=_1f9.toLowerCase();
}
do{
node=node.previousSibling;
}while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE);
if(node&&_1f9&&_1f9.toLowerCase()!=node.tagName.toLowerCase()){
return dojo.dom.prevElement(node,_1f9);
}
return node;
};
dojo.dom.moveChildren=function(_1fa,_1fb,trim){
var _1fd=0;
if(trim){
while(_1fa.hasChildNodes()&&_1fa.firstChild.nodeType==dojo.dom.TEXT_NODE){
_1fa.removeChild(_1fa.firstChild);
}
while(_1fa.hasChildNodes()&&_1fa.lastChild.nodeType==dojo.dom.TEXT_NODE){
_1fa.removeChild(_1fa.lastChild);
}
}
while(_1fa.hasChildNodes()){
_1fb.appendChild(_1fa.firstChild);
_1fd++;
}
return _1fd;
};
dojo.dom.copyChildren=function(_1fe,_1ff,trim){
var _201=_1fe.cloneNode(true);
return this.moveChildren(_201,_1ff,trim);
};
dojo.dom.replaceChildren=function(node,_203){
var _204=[];
if(dojo.render.html.ie){
for(var i=0;i<node.childNodes.length;i++){
_204.push(node.childNodes[i]);
}
}
dojo.dom.removeChildren(node);
node.appendChild(_203);
for(var i=0;i<_204.length;i++){
dojo.dom.destroyNode(_204[i]);
}
};
dojo.dom.removeChildren=function(node){
var _207=node.childNodes.length;
while(node.hasChildNodes()){
dojo.dom.removeNode(node.firstChild);
}
return _207;
};
dojo.dom.replaceNode=function(node,_209){
return node.parentNode.replaceChild(_209,node);
};
dojo.dom.destroyNode=function(node){
if(node.parentNode){
node=dojo.dom.removeNode(node);
}
if(node.nodeType!=3){
if(dojo.exists("dojo.event.browser.clean")){
dojo.event.browser.clean(node);
}
if(dojo.render.html.ie){
node.outerHTML="";
}
}
};
dojo.dom.removeNode=function(node){
if(node&&node.parentNode){
return node.parentNode.removeChild(node);
}
};
dojo.dom.getAncestors=function(node,_20d,_20e){
var _20f=[];
var _210=(_20d&&(_20d instanceof Function||typeof _20d=="function"));
while(node){
if(!_210||_20d(node)){
_20f.push(node);
}
if(_20e&&_20f.length>0){
return _20f[0];
}
node=node.parentNode;
}
if(_20e){
return null;
}
return _20f;
};
dojo.dom.getAncestorsByTag=function(node,tag,_213){
tag=tag.toLowerCase();
return dojo.dom.getAncestors(node,function(el){
return ((el.tagName)&&(el.tagName.toLowerCase()==tag));
},_213);
};
dojo.dom.getFirstAncestorByTag=function(node,tag){
return dojo.dom.getAncestorsByTag(node,tag,true);
};
dojo.dom.isDescendantOf=function(node,_218,_219){
if(_219&&node){
node=node.parentNode;
}
while(node){
if(node==_218){
return true;
}
node=node.parentNode;
}
return false;
};
dojo.dom.innerXML=function(node){
if(node.innerXML){
return node.innerXML;
}else{
if(node.xml){
return node.xml;
}else{
if(typeof XMLSerializer!="undefined"){
return (new XMLSerializer()).serializeToString(node);
}
}
}
};
dojo.dom.createDocument=function(){
var doc=null;
var _21c=dojo.doc();
if(!dj_undef("ActiveXObject")){
var _21d=["MSXML2","Microsoft","MSXML","MSXML3"];
for(var i=0;i<_21d.length;i++){
try{
doc=new ActiveXObject(_21d[i]+".XMLDOM");
}
catch(e){
}
if(doc){
break;
}
}
}else{
if((_21c.implementation)&&(_21c.implementation.createDocument)){
doc=_21c.implementation.createDocument("","",null);
}
}
return doc;
};
dojo.dom.createDocumentFromText=function(str,_220){
if(!_220){
_220="text/xml";
}
if(!dj_undef("DOMParser")){
var _221=new DOMParser();
return _221.parseFromString(str,_220);
}else{
if(!dj_undef("ActiveXObject")){
var _222=dojo.dom.createDocument();
if(_222){
_222.async=false;
_222.loadXML(str);
return _222;
}else{
dojo.debug("toXml didn't work?");
}
}else{
var _223=dojo.doc();
if(_223.createElement){
var tmp=_223.createElement("xml");
tmp.innerHTML=str;
if(_223.implementation&&_223.implementation.createDocument){
var _225=_223.implementation.createDocument("foo","",null);
for(var i=0;i<tmp.childNodes.length;i++){
_225.importNode(tmp.childNodes.item(i),true);
}
return _225;
}
return ((tmp.document)&&(tmp.document.firstChild?tmp.document.firstChild:tmp));
}
}
}
return null;
};
dojo.dom.prependChild=function(node,_228){
if(_228.firstChild){
_228.insertBefore(node,_228.firstChild);
}else{
_228.appendChild(node);
}
return true;
};
dojo.dom.insertBefore=function(node,ref,_22b){
if((_22b!=true)&&(node===ref||node.nextSibling===ref)){
return false;
}
var _22c=ref.parentNode;
_22c.insertBefore(node,ref);
return true;
};
dojo.dom.insertAfter=function(node,ref,_22f){
var pn=ref.parentNode;
if(ref==pn.lastChild){
if((_22f!=true)&&(node===ref)){
return false;
}
pn.appendChild(node);
}else{
return this.insertBefore(node,ref.nextSibling,_22f);
}
return true;
};
dojo.dom.insertAtPosition=function(node,ref,_233){
if((!node)||(!ref)||(!_233)){
return false;
}
switch(_233.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,_235,_236){
var _237=_235.childNodes;
if(!_237.length||_237.length==_236){
_235.appendChild(node);
return true;
}
if(_236==0){
return dojo.dom.prependChild(node,_235);
}
return dojo.dom.insertAfter(node,_237[_236-1]);
};
dojo.dom.textContent=function(node,text){
if(arguments.length>1){
var _23a=dojo.doc();
dojo.dom.replaceChildren(node,_23a.createTextNode(text));
return text;
}else{
if(node["textContent"]!=undefined){
return node.textContent;
}
var _23b="";
if(node==null){
return _23b;
}
var i=0,n;
while(n=node.childNodes[i++]){
switch(n.nodeType){
case 1:
case 5:
_23b+=dojo.dom.textContent(n);
break;
case 3:
case 2:
case 4:
_23b+=n.nodeValue;
break;
default:
break;
}
}
return _23b;
}
};
dojo.dom.hasParent=function(node){
return Boolean(node&&node.parentNode&&dojo.dom.isNode(node.parentNode));
};
dojo.dom.isTag=function(node){
if(node&&node.tagName){
for(var i=1;i<arguments.length;i++){
if(node.tagName==String(arguments[i])){
return String(arguments[i]);
}
}
}
return "";
};
dojo.dom.setAttributeNS=function(elem,_242,_243,_244){
if(elem==null||((elem==undefined)&&(typeof elem=="undefined"))){
dojo.raise("No element given to dojo.dom.setAttributeNS");
}
if(!((elem.setAttributeNS==undefined)&&(typeof elem.setAttributeNS=="undefined"))){
elem.setAttributeNS(_242,_243,_244);
}else{
var _245=elem.ownerDocument;
var _246=_245.createNode(2,_243,_242);
_246.nodeValue=_244;
elem.setAttributeNode(_246);
}
};
dojo.provide("dojo.xml.Parse");
dojo.xml.Parse=function(){
var isIE=((dojo.render.html.capable)&&(dojo.render.html.ie));
function getTagName(node){
try{
return node.tagName.toLowerCase();
}
catch(e){
return "";
}
}
function getDojoTagName(node){
var _24a=getTagName(node);
if(!_24a){
return "";
}
if((dojo.widget)&&(dojo.widget.tags[_24a])){
return _24a;
}
var p=_24a.indexOf(":");
if(p>=0){
return _24a;
}
if(_24a.substr(0,5)=="dojo:"){
return _24a;
}
if(dojo.render.html.capable&&dojo.render.html.ie&&node.scopeName&&node.scopeName!="HTML"){
return node.scopeName.toLowerCase()+":"+_24a;
}
if(_24a.substr(0,4)=="dojo"){
return "dojo:"+_24a.substring(4);
}
var djt=node.getAttribute("dojoType")||node.getAttribute("dojotype");
if(djt){
if(djt.indexOf(":")<0){
djt="dojo:"+djt;
}
return djt.toLowerCase();
}
djt=node.getAttributeNS&&node.getAttributeNS(dojo.dom.dojoml,"type");
if(djt){
return "dojo:"+djt.toLowerCase();
}
try{
djt=node.getAttribute("dojo:type");
}
catch(e){
}
if(djt){
return "dojo:"+djt.toLowerCase();
}
if((dj_global["djConfig"])&&(!djConfig["ignoreClassNames"])){
var _24d=node.className||node.getAttribute("class");
if((_24d)&&(_24d.indexOf)&&(_24d.indexOf("dojo-")!=-1)){
var _24e=_24d.split(" ");
for(var x=0,c=_24e.length;x<c;x++){
if(_24e[x].slice(0,5)=="dojo-"){
return "dojo:"+_24e[x].substr(5).toLowerCase();
}
}
}
}
return "";
}
this.parseElement=function(node,_252,_253,_254){
var _255=getTagName(node);
if(isIE&&_255.indexOf("/")==0){
return null;
}
try{
var attr=node.getAttribute("parseWidgets");
if(attr&&attr.toLowerCase()=="false"){
return {};
}
}
catch(e){
}
var _257=true;
if(_253){
var _258=getDojoTagName(node);
_255=_258||_255;
_257=Boolean(_258);
}
var _259={};
_259[_255]=[];
var pos=_255.indexOf(":");
if(pos>0){
var ns=_255.substring(0,pos);
_259["ns"]=ns;
if((dojo.ns)&&(!dojo.ns.allow(ns))){
_257=false;
}
}
if(_257){
var _25c=this.parseAttributes(node);
for(var attr in _25c){
if((!_259[_255][attr])||(typeof _259[_255][attr]!="array")){
_259[_255][attr]=[];
}
_259[_255][attr].push(_25c[attr]);
}
_259[_255].nodeRef=node;
_259.tagName=_255;
_259.index=_254||0;
}
var _25d=0;
for(var i=0;i<node.childNodes.length;i++){
var tcn=node.childNodes.item(i);
switch(tcn.nodeType){
case dojo.dom.ELEMENT_NODE:
var ctn=getDojoTagName(tcn)||getTagName(tcn);
if(!_259[ctn]){
_259[ctn]=[];
}
_259[ctn].push(this.parseElement(tcn,true,_253,_25d));
if((tcn.childNodes.length==1)&&(tcn.childNodes.item(0).nodeType==dojo.dom.TEXT_NODE)){
_259[ctn][_259[ctn].length-1].value=tcn.childNodes.item(0).nodeValue;
}
_25d++;
break;
case dojo.dom.TEXT_NODE:
if(node.childNodes.length==1){
_259[_255].push({value:node.childNodes.item(0).nodeValue});
}
break;
default:
break;
}
}
return _259;
};
this.parseAttributes=function(node){
var _262={};
var atts=node.attributes;
var _264,i=0;
while((_264=atts[i++])){
if(isIE){
if(!_264){
continue;
}
if((typeof _264=="object")&&(typeof _264.nodeValue=="undefined")||(_264.nodeValue==null)||(_264.nodeValue=="")){
continue;
}
}
var nn=_264.nodeName.split(":");
nn=(nn.length==2)?nn[1]:_264.nodeName;
_262[nn]={value:_264.nodeValue};
}
return _262;
};
};
dojo.provide("dojo.ns");
dojo.ns={namespaces:{},failed:{},loading:{},loaded:{},register:function(name,_268,_269,_26a){
if(!_26a||!this.namespaces[name]){
this.namespaces[name]=new dojo.ns.Ns(name,_268,_269);
}
},allow:function(name){
if(this.failed[name]){
return false;
}
if((djConfig.excludeNamespace)&&(dojo.lang.inArray(djConfig.excludeNamespace,name))){
return false;
}
return ((name==this.dojo)||(!djConfig.includeNamespace)||(dojo.lang.inArray(djConfig.includeNamespace,name)));
},get:function(name){
return this.namespaces[name];
},require:function(name){
var ns=this.namespaces[name];
if((ns)&&(this.loaded[name])){
return ns;
}
if(!this.allow(name)){
return false;
}
if(this.loading[name]){
dojo.debug("dojo.namespace.require: re-entrant request to load namespace \""+name+"\" must fail.");
return false;
}
var req=dojo.require;
this.loading[name]=true;
try{
if(name=="dojo"){
req("dojo.namespaces.dojo");
}else{
if(!dojo.hostenv.moduleHasPrefix(name)){
dojo.registerModulePath(name,"../"+name);
}
req([name,"manifest"].join("."),false,true);
}
if(!this.namespaces[name]){
this.failed[name]=true;
}
}
finally{
this.loading[name]=false;
}
return this.namespaces[name];
}};
dojo.ns.Ns=function(name,_271,_272){
this.name=name;
this.module=_271;
this.resolver=_272;
this._loaded=[];
this._failed=[];
};
dojo.ns.Ns.prototype.resolve=function(name,_274,_275){
if(!this.resolver||djConfig["skipAutoRequire"]){
return false;
}
var _276=this.resolver(name,_274);
if((_276)&&(!this._loaded[_276])&&(!this._failed[_276])){
var req=dojo.require;
req(_276,false,true);
if(dojo.hostenv.findModule(_276,false)){
this._loaded[_276]=true;
}else{
if(!_275){
dojo.raise("dojo.ns.Ns.resolve: module '"+_276+"' not found after loading via namespace '"+this.name+"'");
}
this._failed[_276]=true;
}
}
return Boolean(this._loaded[_276]);
};
dojo.registerNamespace=function(name,_279,_27a){
dojo.ns.register.apply(dojo.ns,arguments);
};
dojo.registerNamespaceResolver=function(name,_27c){
var n=dojo.ns.namespaces[name];
if(n){
n.resolver=_27c;
}
};
dojo.registerNamespaceManifest=function(_27e,path,name,_281,_282){
dojo.registerModulePath(name,path);
dojo.registerNamespace(name,_281,_282);
};
dojo.registerNamespace("dojo","dojo.widget");
dojo.provide("dojo.event.common");
dojo.event=new function(){
this._canTimeout=dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]);
function interpolateArgs(args,_284){
var dl=dojo.lang;
var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(args.length>2)?args[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false,maxCalls:-1};
switch(args.length){
case 0:
return;
case 1:
return;
case 2:
ao.srcFunc=args[0];
ao.adviceFunc=args[1];
break;
case 3:
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=args[0];
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
}else{
if((dl.isString(args[1]))&&(dl.isString(args[2]))){
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
}else{
if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){
ao.adviceType="after";
ao.srcObj=args[0];
ao.srcFunc=args[1];
var _287=dl.nameAnonFunc(args[2],ao.adviceObj,_284);
ao.adviceFunc=_287;
}else{
if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){
ao.adviceType="after";
ao.srcObj=dj_global;
var _287=dl.nameAnonFunc(args[0],ao.srcObj,_284);
ao.srcFunc=_287;
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 _287=dl.nameAnonFunc(args[1],dj_global,_284);
ao.srcFunc=_287;
ao.adviceObj=args[2];
ao.adviceFunc=args[3];
}else{
if((dl.isString(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))&&(dl.isFunction(args[3]))){
ao.srcObj=args[1];
ao.srcFunc=args[2];
var _287=dl.nameAnonFunc(args[3],dj_global,_284);
ao.adviceObj=dj_global;
ao.adviceFunc=_287;
}else{
if(dl.isObject(args[1])){
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=dj_global;
ao.adviceFunc=args[3];
}else{
if(dl.isObject(args[2])){
ao.srcObj=dj_global;
ao.srcFunc=args[1];
ao.adviceObj=args[2];
ao.adviceFunc=args[3];
}else{
ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global;
ao.srcFunc=args[1];
ao.adviceFunc=args[2];
ao.aroundFunc=args[3];
}
}
}
}
}
}
break;
case 6:
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=args[3];
ao.adviceFunc=args[4];
ao.aroundFunc=args[5];
ao.aroundObj=dj_global;
break;
default:
ao.srcObj=args[1];
ao.srcFunc=args[2];
ao.adviceObj=args[3];
ao.adviceFunc=args[4];
ao.aroundObj=args[5];
ao.aroundFunc=args[6];
ao.once=args[7];
ao.delay=args[8];
ao.rate=args[9];
ao.adviceMsg=args[10];
ao.maxCalls=(!isNaN(parseInt(args[11])))?args[11]:-1;
break;
}
if(dl.isFunction(ao.aroundFunc)){
var _287=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,_284);
ao.aroundFunc=_287;
}
if(dl.isFunction(ao.srcFunc)){
ao.srcFunc=dl.getNameInObj(ao.srcObj,ao.srcFunc);
}
if(dl.isFunction(ao.adviceFunc)){
ao.adviceFunc=dl.getNameInObj(ao.adviceObj,ao.adviceFunc);
}
if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){
ao.aroundFunc=dl.getNameInObj(ao.aroundObj,ao.aroundFunc);
}
if(!ao.srcObj){
dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc);
}
if(!ao.adviceObj){
dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc);
}
if(!ao.adviceFunc){
dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc);
dojo.debugShallow(ao);
}
return ao;
}
this.connect=function(){
if(arguments.length==1){
var ao=arguments[0];
}else{
var ao=interpolateArgs(arguments,true);
}
if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){
if(dojo.render.html.ie){
ao.srcFunc="onkeydown";
this.connect(ao);
}
ao.srcFunc="onkeypress";
}
if(dojo.lang.isArray(ao.srcObj)&&ao.srcObj!=""){
var _289={};
for(var x in ao){
_289[x]=ao[x];
}
var mjps=[];
dojo.lang.forEach(ao.srcObj,function(src){
if((dojo.render.html.capable)&&(dojo.lang.isString(src))){
src=dojo.byId(src);
}
_289.srcObj=src;
mjps.push(dojo.event.connect.call(dojo.event,_289));
});
return mjps;
}
var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc);
if(ao.adviceFunc){
var mjp2=dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj,ao.adviceFunc);
}
mjp.kwAddAdvice(ao);
return mjp;
};
this.log=function(a1,a2){
var _291;
if((arguments.length==1)&&(typeof a1=="object")){
_291=a1;
}else{
_291={srcObj:a1,srcFunc:a2};
}
_291.adviceFunc=function(){
var _292=[];
for(var x=0;x<arguments.length;x++){
_292.push(arguments[x]);
}
dojo.debug("("+_291.srcObj+")."+_291.srcFunc,":",_292.join(", "));
};
this.kwConnect(_291);
};
this.connectBefore=function(){
var args=["before"];
for(var i=0;i<arguments.length;i++){
args.push(arguments[i]);
}
return this.connect.apply(this,args);
};
this.connectAround=function(){
var args=["around"];
for(var i=0;i<arguments.length;i++){
args.push(arguments[i]);
}
return this.connect.apply(this,args);
};
this.connectOnce=function(){
var ao=interpolateArgs(arguments,true);
ao.once=true;
return this.connect(ao);
};
this.connectRunOnce=function(){
var ao=interpolateArgs(arguments,true);
ao.maxCalls=1;
return this.connect(ao);
};
this._kwConnectImpl=function(_29a,_29b){
var fn=(_29b)?"disconnect":"connect";
if(typeof _29a["srcFunc"]=="function"){
_29a.srcObj=_29a["srcObj"]||dj_global;
var _29d=dojo.lang.nameAnonFunc(_29a.srcFunc,_29a.srcObj,true);
_29a.srcFunc=_29d;
}
if(typeof _29a["adviceFunc"]=="function"){
_29a.adviceObj=_29a["adviceObj"]||dj_global;
var _29d=dojo.lang.nameAnonFunc(_29a.adviceFunc,_29a.adviceObj,true);
_29a.adviceFunc=_29d;
}
_29a.srcObj=_29a["srcObj"]||dj_global;
_29a.adviceObj=_29a["adviceObj"]||_29a["targetObj"]||dj_global;
_29a.adviceFunc=_29a["adviceFunc"]||_29a["targetFunc"];
return dojo.event[fn](_29a);
};
this.kwConnect=function(_29e){
return this._kwConnectImpl(_29e,false);
};
this.disconnect=function(){
if(arguments.length==1){
var ao=arguments[0];
}else{
var ao=interpolateArgs(arguments,true);
}
if(!ao.adviceFunc){
return;
}
if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){
if(dojo.render.html.ie){
ao.srcFunc="onkeydown";
this.disconnect(ao);
}
ao.srcFunc="onkeypress";
}
if(!ao.srcObj[ao.srcFunc]){
return null;
}
var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc,true);
mjp.removeAdvice(ao.adviceObj,ao.adviceFunc,ao.adviceType,ao.once);
return mjp;
};
this.kwDisconnect=function(_2a1){
return this._kwConnectImpl(_2a1,true);
};
};
dojo.event.MethodInvocation=function(_2a2,obj,args){
this.jp_=_2a2;
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,_2aa){
this.object=obj||dj_global;
this.methodname=_2aa;
this.methodfunc=this.object[_2aa];
};
dojo.event.MethodJoinPoint.getForMethod=function(obj,_2ac){
if(!obj){
obj=dj_global;
}
var ofn=obj[_2ac];
if(!ofn){
ofn=obj[_2ac]=function(){
};
if(!obj[_2ac]){
dojo.raise("Cannot set do-nothing method on that object "+_2ac);
}
}else{
if((typeof ofn!="function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){
return null;
}
}
var _2ae=_2ac+"$joinpoint";
var _2af=_2ac+"$joinpoint$method";
var _2b0=obj[_2ae];
if(!_2b0){
var _2b1=false;
if(dojo.event["browser"]){
if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){
_2b1=true;
dojo.event.browser.addClobberNodeAttrs(obj,[_2ae,_2af,_2ac]);
}
}
var _2b2=ofn.length;
obj[_2af]=ofn;
_2b0=obj[_2ae]=new dojo.event.MethodJoinPoint(obj,_2af);
if(!_2b1){
obj[_2ac]=function(){
return _2b0.run.apply(_2b0,arguments);
};
}else{
obj[_2ac]=function(){
var args=[];
if(!arguments.length){
var evt=null;
try{
if(obj.ownerDocument){
evt=obj.ownerDocument.parentWindow.event;
}else{
if(obj.documentElement){
evt=obj.documentElement.ownerDocument.parentWindow.event;
}else{
if(obj.event){
evt=obj.event;
}else{
evt=window.event;
}
}
}
}
catch(e){
evt=window.event;
}
if(evt){
args.push(dojo.event.browser.fixEvent(evt,this));
}
}else{
for(var x=0;x<arguments.length;x++){
if((x==0)&&(dojo.event.browser.isEvent(arguments[x]))){
args.push(dojo.event.browser.fixEvent(arguments[x],this));
}else{
args.push(arguments[x]);
}
}
}
return _2b0.run.apply(_2b0,args);
};
}
obj[_2ac].__preJoinArity=_2b2;
}
return _2b0;
};
dojo.lang.extend(dojo.event.MethodJoinPoint,{squelch:false,unintercept:function(){
this.object[this.methodname]=this.methodfunc;
this.before=[];
this.after=[];
this.around=[];
},disconnect:dojo.lang.forward("unintercept"),run:function(){
var obj=this.object||dj_global;
var args=arguments;
var _2b8=[];
for(var x=0;x<args.length;x++){
_2b8[x]=args[x];
}
var _2ba=function(marr){
if(!marr){
dojo.debug("Null argument to unrollAdvice()");
return;
}
var _2bc=marr[0]||dj_global;
var _2bd=marr[1];
if(!_2bc[_2bd]){
dojo.raise("function \""+_2bd+"\" does not exist on \""+_2bc+"\"");
}
var _2be=marr[2]||dj_global;
var _2bf=marr[3];
var msg=marr[6];
var _2c1=marr[7];
if(_2c1>-1){
if(_2c1==0){
return;
}
marr[7]--;
}
var _2c2;
var to={args:[],jp_:this,object:obj,proceed:function(){
return _2bc[_2bd].apply(_2bc,to.args);
}};
to.args=_2b8;
var _2c4=parseInt(marr[4]);
var _2c5=((!isNaN(_2c4))&&(marr[4]!==null)&&(typeof marr[4]!="undefined"));
if(marr[5]){
var rate=parseInt(marr[5]);
var cur=new Date();
var _2c8=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;
_2ba(mcpy);
},tod);
}
return;
}else{
marr.last=cur;
}
}
if(_2bf){
_2be[_2bf].call(_2be,to);
}else{
if((_2c5)&&((dojo.render.html)||(dojo.render.svg))){
dj_global["setTimeout"](function(){
if(msg){
_2bc[_2bd].call(_2bc,to);
}else{
_2bc[_2bd].apply(_2bc,args);
}
},_2c4);
}else{
if(msg){
_2bc[_2bd].call(_2bc,to);
}else{
_2bc[_2bd].apply(_2bc,args);
}
}
}
};
var _2cb=function(){
if(this.squelch){
try{
return _2ba.apply(this,arguments);
}
catch(e){
dojo.debug(e);
}
}else{
return _2ba.apply(this,arguments);
}
};
if((this["before"])&&(this.before.length>0)){
dojo.lang.forEach(this.before.concat(new Array()),_2cb);
}
var _2cc;
try{
if((this["around"])&&(this.around.length>0)){
var mi=new dojo.event.MethodInvocation(this,obj,args);
_2cc=mi.proceed();
}else{
if(this.methodfunc){
_2cc=this.object[this.methodname].apply(this.object,args);
}
}
}
catch(e){
if(!this.squelch){
dojo.debug(e,"when calling",this.methodname,"on",this.object,"with arguments",args);
dojo.raise(e);
}
}
if((this["after"])&&(this.after.length>0)){
dojo.lang.forEach(this.after.concat(new Array()),_2cb);
}
return (this.methodfunc)?_2cc:null;
},getArr:function(kind){
var type="after";
if((typeof kind=="string")&&(kind.indexOf("before")!=-1)){
type="before";
}else{
if(kind=="around"){
type="around";
}
}
if(!this[type]){
this[type]=[];
}
return this[type];
},kwAddAdvice:function(args){
this.addAdvice(args["adviceObj"],args["adviceFunc"],args["aroundObj"],args["aroundFunc"],args["adviceType"],args["precedence"],args["once"],args["delay"],args["rate"],args["adviceMsg"],args["maxCalls"]);
},addAdvice:function(_2d1,_2d2,_2d3,_2d4,_2d5,_2d6,once,_2d8,rate,_2da,_2db){
var arr=this.getArr(_2d5);
if(!arr){
dojo.raise("bad this: "+this);
}
var ao=[_2d1,_2d2,_2d3,_2d4,_2d8,rate,_2da,_2db];
if(once){
if(this.hasAdvice(_2d1,_2d2,_2d5,arr)>=0){
return;
}
}
if(_2d6=="first"){
arr.unshift(ao);
}else{
arr.push(ao);
}
},hasAdvice:function(_2de,_2df,_2e0,arr){
if(!arr){
arr=this.getArr(_2e0);
}
var ind=-1;
for(var x=0;x<arr.length;x++){
var aao=(typeof _2df=="object")?(new String(_2df)).toString():_2df;
var a1o=(typeof arr[x][1]=="object")?(new String(arr[x][1])).toString():arr[x][1];
if((arr[x][0]==_2de)&&(a1o==aao)){
ind=x;
}
}
return ind;
},removeAdvice:function(_2e6,_2e7,_2e8,once){
var arr=this.getArr(_2e8);
var ind=this.hasAdvice(_2e6,_2e7,_2e8,arr);
if(ind==-1){
return false;
}
while(ind!=-1){
arr.splice(ind,1);
if(once){
break;
}
ind=this.hasAdvice(_2e6,_2e7,_2e8,arr);
}
return true;
}});
dojo.provide("dojo.event.topic");
dojo.event.topic=new function(){
this.topics={};
this.getTopic=function(_2ec){
if(!this.topics[_2ec]){
this.topics[_2ec]=new this.TopicImpl(_2ec);
}
return this.topics[_2ec];
};
this.registerPublisher=function(_2ed,obj,_2ef){
var _2ed=this.getTopic(_2ed);
_2ed.registerPublisher(obj,_2ef);
};
this.subscribe=function(_2f0,obj,_2f2){
var _2f0=this.getTopic(_2f0);
_2f0.subscribe(obj,_2f2);
};
this.unsubscribe=function(_2f3,obj,_2f5){
var _2f3=this.getTopic(_2f3);
_2f3.unsubscribe(obj,_2f5);
};
this.destroy=function(_2f6){
this.getTopic(_2f6).destroy();
delete this.topics[_2f6];
};
this.publishApply=function(_2f7,args){
var _2f7=this.getTopic(_2f7);
_2f7.sendMessage.apply(_2f7,args);
};
this.publish=function(_2f9,_2fa){
var _2f9=this.getTopic(_2f9);
var args=[];
for(var x=1;x<arguments.length;x++){
args.push(arguments[x]);
}
_2f9.sendMessage.apply(_2f9,args);
};
};
dojo.event.topic.TopicImpl=function(_2fd){
this.topicName=_2fd;
this.subscribe=function(_2fe,_2ff){
var tf=_2ff||_2fe;
var to=(!_2ff)?dj_global:_2fe;
return dojo.event.kwConnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
};
this.unsubscribe=function(_302,_303){
var tf=(!_303)?_302:_303;
var to=(!_303)?null:_302;
return dojo.event.kwDisconnect({srcObj:this,srcFunc:"sendMessage",adviceObj:to,adviceFunc:tf});
};
this._getJoinPoint=function(){
return dojo.event.MethodJoinPoint.getForMethod(this,"sendMessage");
};
this.setSquelch=function(_306){
this._getJoinPoint().squelch=_306;
};
this.destroy=function(){
this._getJoinPoint().disconnect();
};
this.registerPublisher=function(_307,_308){
dojo.event.connect(_307,_308,this,"sendMessage");
};
this.sendMessage=function(_309){
};
};
dojo.provide("dojo.event.browser");
dojo._ie_clobber=new function(){
this.clobberNodes=[];
function nukeProp(node,prop){
try{
node[prop]=null;
}
catch(e){
}
try{
delete node[prop];
}
catch(e){
}
try{
node.removeAttribute(prop);
}
catch(e){
}
}
this.clobber=function(_30c){
var na;
var tna;
if(_30c){
tna=_30c.all||_30c.getElementsByTagName("*");
na=[_30c];
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 _310={};
for(var i=na.length-1;i>=0;i=i-1){
var el=na[i];
try{
if(el&&el["__clobberAttrs__"]){
for(var j=0;j<el.__clobberAttrs__.length;j++){
nukeProp(el,el.__clobberAttrs__[j]);
}
nukeProp(el,"__clobberAttrs__");
nukeProp(el,"__doClobber__");
}
}
catch(e){
}
}
na=null;
};
};
if(dojo.render.html.ie){
dojo.addOnUnload(function(){
dojo._ie_clobber.clobber();
try{
if((dojo["widget"])&&(dojo.widget["manager"])){
dojo.widget.manager.destroyAll();
}
}
catch(e){
}
if(dojo.widget){
for(var name in dojo.widget._templateCache){
if(dojo.widget._templateCache[name].node){
dojo.dom.destroyNode(dojo.widget._templateCache[name].node);
dojo.widget._templateCache[name].node=null;
delete dojo.widget._templateCache[name].node;
}
}
}
try{
window.onload=null;
}
catch(e){
}
try{
window.onunload=null;
}
catch(e){
}
dojo._ie_clobber.clobberNodes=[];
});
}
dojo.event.browser=new function(){
var _315=0;
this.normalizedEventName=function(_316){
switch(_316){
case "CheckboxStateChange":
case "DOMAttrModified":
case "DOMMenuItemActive":
case "DOMMenuItemInactive":
case "DOMMouseScroll":
case "DOMNodeInserted":
case "DOMNodeRemoved":
case "RadioStateChange":
return _316;
break;
default:
var lcn=_316.toLowerCase();
return (lcn.indexOf("on")==0)?lcn.substr(2):lcn;
break;
}
};
this.clean=function(node){
if(dojo.render.html.ie){
dojo._ie_clobber.clobber(node);
}
};
this.addClobberNode=function(node){
if(!dojo.render.html.ie){
return;
}
if(!node["__doClobber__"]){
node.__doClobber__=true;
dojo._ie_clobber.clobberNodes.push(node);
node.__clobberAttrs__=[];
}
};
this.addClobberNodeAttrs=function(node,_31b){
if(!dojo.render.html.ie){
return;
}
this.addClobberNode(node);
for(var x=0;x<_31b.length;x++){
node.__clobberAttrs__.push(_31b[x]);
}
};
this.removeListener=function(node,_31e,fp,_320){
if(!_320){
var _320=false;
}
_31e=dojo.event.browser.normalizedEventName(_31e);
if(_31e=="key"){
if(dojo.render.html.ie){
this.removeListener(node,"onkeydown",fp,_320);
}
_31e="keypress";
}
if(node.removeEventListener){
node.removeEventListener(_31e,fp,_320);
}
};
this.addListener=function(node,_322,fp,_324,_325){
if(!node){
return;
}
if(!_324){
var _324=false;
}
_322=dojo.event.browser.normalizedEventName(_322);
if(_322=="key"){
if(dojo.render.html.ie){
this.addListener(node,"onkeydown",fp,_324,_325);
}
_322="keypress";
}
if(!_325){
var _326=function(evt){
if(!evt){
evt=window.event;
}
var ret=fp(dojo.event.browser.fixEvent(evt,this));
if(_324){
dojo.event.browser.stopEvent(evt);
}
return ret;
};
}else{
_326=fp;
}
if(node.addEventListener){
node.addEventListener(_322,_326,_324);
return _326;
}else{
_322="on"+_322;
if(typeof node[_322]=="function"){
var _329=node[_322];
node[_322]=function(e){
_329(e);
return _326(e);
};
}else{
node[_322]=_326;
}
if(dojo.render.html.ie){
this.addClobberNodeAttrs(node,[_322]);
}
return _326;
}
};
this.isEvent=function(obj){
return (typeof obj!="undefined")&&(obj)&&(typeof Event!="undefined")&&(obj.eventPhase);
};
this.currentEvent=null;
this.callListener=function(_32c,_32d){
if(typeof _32c!="function"){
dojo.raise("listener not a function: "+_32c);
}
dojo.event.browser.currentEvent.currentTarget=_32d;
return _32c.call(_32d,dojo.event.browser.currentEvent);
};
this._stopPropagation=function(){
dojo.event.browser.currentEvent.cancelBubble=true;
};
this._preventDefault=function(){
dojo.event.browser.currentEvent.returnValue=false;
};
this.keys={KEY_BACKSPACE:8,KEY_TAB:9,KEY_CLEAR:12,KEY_ENTER:13,KEY_SHIFT:16,KEY_CTRL:17,KEY_ALT:18,KEY_PAUSE:19,KEY_CAPS_LOCK:20,KEY_ESCAPE:27,KEY_SPACE:32,KEY_PAGE_UP:33,KEY_PAGE_DOWN:34,KEY_END:35,KEY_HOME:36,KEY_LEFT_ARROW:37,KEY_UP_ARROW:38,KEY_RIGHT_ARROW:39,KEY_DOWN_ARROW:40,KEY_INSERT:45,KEY_DELETE:46,KEY_HELP:47,KEY_LEFT_WINDOW:91,KEY_RIGHT_WINDOW:92,KEY_SELECT:93,KEY_NUMPAD_0:96,KEY_NUMPAD_1:97,KEY_NUMPAD_2:98,KEY_NUMPAD_3:99,KEY_NUMPAD_4:100,KEY_NUMPAD_5:101,KEY_NUMPAD_6:102,KEY_NUMPAD_7:103,KEY_NUMPAD_8:104,KEY_NUMPAD_9:105,KEY_NUMPAD_MULTIPLY:106,KEY_NUMPAD_PLUS:107,KEY_NUMPAD_ENTER:108,KEY_NUMPAD_MINUS:109,KEY_NUMPAD_PERIOD:110,KEY_NUMPAD_DIVIDE:111,KEY_F1:112,KEY_F2:113,KEY_F3:114,KEY_F4:115,KEY_F5:116,KEY_F6:117,KEY_F7:118,KEY_F8:119,KEY_F9:120,KEY_F10:121,KEY_F11:122,KEY_F12:123,KEY_F13:124,KEY_F14:125,KEY_F15:126,KEY_NUM_LOCK:144,KEY_SCROLL_LOCK:145};
this.revKeys=[];
for(var key in this.keys){
this.revKeys[this.keys[key]]=key;
}
this.fixEvent=function(evt,_330){
if(!evt){
if(window["event"]){
evt=window.event;
}
}
if((evt["type"])&&(evt["type"].indexOf("key")==0)){
evt.keys=this.revKeys;
for(var key in this.keys){
evt[key]=this.keys[key];
}
if(evt["type"]=="keydown"&&dojo.render.html.ie){
switch(evt.keyCode){
case evt.KEY_SHIFT:
case evt.KEY_CTRL:
case evt.KEY_ALT:
case evt.KEY_CAPS_LOCK:
case evt.KEY_LEFT_WINDOW:
case evt.KEY_RIGHT_WINDOW:
case evt.KEY_SELECT:
case evt.KEY_NUM_LOCK:
case evt.KEY_SCROLL_LOCK:
case evt.KEY_NUMPAD_0:
case evt.KEY_NUMPAD_1:
case evt.KEY_NUMPAD_2:
case evt.KEY_NUMPAD_3:
case evt.KEY_NUMPAD_4:
case evt.KEY_NUMPAD_5:
case evt.KEY_NUMPAD_6:
case evt.KEY_NUMPAD_7:
case evt.KEY_NUMPAD_8:
case evt.KEY_NUMPAD_9:
case evt.KEY_NUMPAD_PERIOD:
break;
case evt.KEY_NUMPAD_MULTIPLY:
case evt.KEY_NUMPAD_PLUS:
case evt.KEY_NUMPAD_ENTER:
case evt.KEY_NUMPAD_MINUS:
case evt.KEY_NUMPAD_DIVIDE:
break;
case evt.KEY_PAUSE:
case evt.KEY_TAB:
case evt.KEY_BACKSPACE:
case evt.KEY_ENTER:
case evt.KEY_ESCAPE:
case evt.KEY_PAGE_UP:
case evt.KEY_PAGE_DOWN:
case evt.KEY_END:
case evt.KEY_HOME:
case evt.KEY_LEFT_ARROW:
case evt.KEY_UP_ARROW:
case evt.KEY_RIGHT_ARROW:
case evt.KEY_DOWN_ARROW:
case evt.KEY_INSERT:
case evt.KEY_DELETE:
case evt.KEY_F1:
case evt.KEY_F2:
case evt.KEY_F3:
case evt.KEY_F4:
case evt.KEY_F5:
case evt.KEY_F6:
case evt.KEY_F7:
case evt.KEY_F8:
case evt.KEY_F9:
case evt.KEY_F10:
case evt.KEY_F11:
case evt.KEY_F12:
case evt.KEY_F12:
case evt.KEY_F13:
case evt.KEY_F14:
case evt.KEY_F15:
case evt.KEY_CLEAR:
case evt.KEY_HELP:
evt.key=evt.keyCode;
break;
default:
if(evt.ctrlKey||evt.altKey){
var _332=evt.keyCode;
if(_332>=65&&_332<=90&&evt.shiftKey==false){
_332+=32;
}
if(_332>=1&&_332<=26&&evt.ctrlKey){
_332+=96;
}
evt.key=String.fromCharCode(_332);
}
}
}else{
if(evt["type"]=="keypress"){
if(dojo.render.html.opera){
if(evt.which==0){
evt.key=evt.keyCode;
}else{
if(evt.which>0){
switch(evt.which){
case evt.KEY_SHIFT:
case evt.KEY_CTRL:
case evt.KEY_ALT:
case evt.KEY_CAPS_LOCK:
case evt.KEY_NUM_LOCK:
case evt.KEY_SCROLL_LOCK:
break;
case evt.KEY_PAUSE:
case evt.KEY_TAB:
case evt.KEY_BACKSPACE:
case evt.KEY_ENTER:
case evt.KEY_ESCAPE:
evt.key=evt.which;
break;
default:
var _332=evt.which;
if((evt.ctrlKey||evt.altKey||evt.metaKey)&&(evt.which>=65&&evt.which<=90&&evt.shiftKey==false)){
_332+=32;
}
evt.key=String.fromCharCode(_332);
}
}
}
}else{
if(dojo.render.html.ie){
if(!evt.ctrlKey&&!evt.altKey&&evt.keyCode>=evt.KEY_SPACE){
evt.key=String.fromCharCode(evt.keyCode);
}
}else{
if(dojo.render.html.safari){
switch(evt.keyCode){
case 25:
evt.key=evt.KEY_TAB;
evt.shift=true;
break;
case 63232:
evt.key=evt.KEY_UP_ARROW;
break;
case 63233:
evt.key=evt.KEY_DOWN_ARROW;
break;
case 63234:
evt.key=evt.KEY_LEFT_ARROW;
break;
case 63235:
evt.key=evt.KEY_RIGHT_ARROW;
break;
case 63236:
evt.key=evt.KEY_F1;
break;
case 63237:
evt.key=evt.KEY_F2;
break;
case 63238:
evt.key=evt.KEY_F3;
break;
case 63239:
evt.key=evt.KEY_F4;
break;
case 63240:
evt.key=evt.KEY_F5;
break;
case 63241:
evt.key=evt.KEY_F6;
break;
case 63242:
evt.key=evt.KEY_F7;
break;
case 63243:
evt.key=evt.KEY_F8;
break;
case 63244:
evt.key=evt.KEY_F9;
break;
case 63245:
evt.key=evt.KEY_F10;
break;
case 63246:
evt.key=evt.KEY_F11;
break;
case 63247:
evt.key=evt.KEY_F12;
break;
case 63250:
evt.key=evt.KEY_PAUSE;
break;
case 63272:
evt.key=evt.KEY_DELETE;
break;
case 63273:
evt.key=evt.KEY_HOME;
break;
case 63275:
evt.key=evt.KEY_END;
break;
case 63276:
evt.key=evt.KEY_PAGE_UP;
break;
case 63277:
evt.key=evt.KEY_PAGE_DOWN;
break;
case 63302:
evt.key=evt.KEY_INSERT;
break;
case 63248:
case 63249:
case 63289:
break;
default:
evt.key=evt.charCode>=evt.KEY_SPACE?String.fromCharCode(evt.charCode):evt.keyCode;
}
}else{
evt.key=evt.charCode>0?String.fromCharCode(evt.charCode):evt.keyCode;
}
}
}
}
}
}
if(dojo.render.html.ie){
if(!evt.target){
evt.target=evt.srcElement;
}
if(!evt.currentTarget){
evt.currentTarget=(_330?_330:evt.srcElement);
}
if(!evt.layerX){
evt.layerX=evt.offsetX;
}
if(!evt.layerY){
evt.layerY=evt.offsetY;
}
var doc=(evt.srcElement&&evt.srcElement.ownerDocument)?evt.srcElement.ownerDocument:document;
var _334=((dojo.render.html.ie55)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;
if(!evt.pageX){
evt.pageX=evt.clientX+(_334.scrollLeft||0);
}
if(!evt.pageY){
evt.pageY=evt.clientY+(_334.scrollTop||0);
}
if(evt.type=="mouseover"){
evt.relatedTarget=evt.fromElement;
}
if(evt.type=="mouseout"){
evt.relatedTarget=evt.toElement;
}
this.currentEvent=evt;
evt.callListener=this.callListener;
evt.stopPropagation=this._stopPropagation;
evt.preventDefault=this._preventDefault;
}
return evt;
};
this.stopEvent=function(evt){
if(window.event){
evt.cancelBubble=true;
evt.returnValue=false;
}else{
evt.preventDefault();
evt.stopPropagation();
}
};
};
dojo.kwCompoundRequire({common:["dojo.event.common","dojo.event.topic"],browser:["dojo.event.browser"],dashboard:["dojo.event.browser"]});
dojo.provide("dojo.event.*");
dojo.provide("dojo.widget.Manager");
dojo.widget.manager=new function(){
this.widgets=[];
this.widgetIds=[];
this.topWidgets={};
var _336={};
var _337=[];
this.getUniqueId=function(_338){
var _339;
do{
_339=_338+"_"+(_336[_338]!=undefined?++_336[_338]:_336[_338]=0);
}while(this.getWidgetById(_339));
return _339;
};
this.add=function(_33a){
this.widgets.push(_33a);
if(!_33a.extraArgs["id"]){
_33a.extraArgs["id"]=_33a.extraArgs["ID"];
}
if(_33a.widgetId==""){
if(_33a["id"]){
_33a.widgetId=_33a["id"];
}else{
if(_33a.extraArgs["id"]){
_33a.widgetId=_33a.extraArgs["id"];
}else{
_33a.widgetId=this.getUniqueId(_33a.ns+"_"+_33a.widgetType);
}
}
}
if(this.widgetIds[_33a.widgetId]){
dojo.debug("widget ID collision on ID: "+_33a.widgetId);
}
this.widgetIds[_33a.widgetId]=_33a;
};
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(_33c){
if(dojo.lang.isNumber(_33c)){
var tw=this.widgets[_33c].widgetId;
delete this.topWidgets[tw];
delete this.widgetIds[tw];
this.widgets.splice(_33c,1);
}else{
this.removeById(_33c);
}
};
this.removeById=function(id){
if(!dojo.lang.isString(id)){
id=id["widgetId"];
if(!id){
dojo.debug("invalid widget or id passed to removeById");
return;
}
}
for(var i=0;i<this.widgets.length;i++){
if(this.widgets[i].widgetId==id){
this.remove(i);
break;
}
}
};
this.getWidgetById=function(id){
if(dojo.lang.isString(id)){
return this.widgetIds[id];
}
return id;
};
this.getWidgetsByType=function(type){
var lt=type.toLowerCase();
var _343=(type.indexOf(":")<0?function(x){
return x.widgetType.toLowerCase();
}:function(x){
return x.getNamespacedType();
});
var ret=[];
dojo.lang.forEach(this.widgets,function(x){
if(_343(x)==lt){
ret.push(x);
}
});
return ret;
};
this.getWidgetsByFilter=function(_348,_349){
var ret=[];
dojo.lang.every(this.widgets,function(x){
if(_348(x)){
ret.push(x);
if(_349){
return false;
}
}
return true;
});
return (_349?ret[0]:ret);
};
this.getAllWidgets=function(){
return this.widgets.concat();
};
this.getWidgetByNode=function(node){
var w=this.getAllWidgets();
node=dojo.byId(node);
for(var i=0;i<w.length;i++){
if(w[i].domNode==node){
return w[i];
}
}
return null;
};
this.byId=this.getWidgetById;
this.byType=this.getWidgetsByType;
this.byFilter=this.getWidgetsByFilter;
this.byNode=this.getWidgetByNode;
var _34f={};
var _350=["dojo.widget"];
for(var i=0;i<_350.length;i++){
_350[_350[i]]=true;
}
this.registerWidgetPackage=function(_352){
if(!_350[_352]){
_350[_352]=true;
_350.push(_352);
}
};
this.getWidgetPackageList=function(){
return dojo.lang.map(_350,function(elt){
return (elt!==true?elt:undefined);
});
};
this.getImplementation=function(_354,_355,_356,ns){
var impl=this.getImplementationName(_354,ns);
if(impl){
var ret=_355?new impl(_355):new impl();
return ret;
}
};
function buildPrefixCache(){
for(var _35a in dojo.render){
if(dojo.render[_35a]["capable"]===true){
var _35b=dojo.render[_35a].prefixes;
for(var i=0;i<_35b.length;i++){
_337.push(_35b[i].toLowerCase());
}
}
}
}
var _35d=function(_35e,_35f){
if(!_35f){
return null;
}
for(var i=0,l=_337.length,_362;i<=l;i++){
_362=(i<l?_35f[_337[i]]:_35f);
if(!_362){
continue;
}
for(var name in _362){
if(name.toLowerCase()==_35e){
return _362[name];
}
}
}
return null;
};
var _364=function(_365,_366){
var _367=dojo.getObject(_366,false);
return (_367?_35d(_365,_367):null);
};
this.getImplementationName=function(_368,ns){
var _36a=_368.toLowerCase();
ns=ns||"dojo";
var imps=_34f[ns]||(_34f[ns]={});
var impl=imps[_36a];
if(impl){
return impl;
}
if(!_337.length){
buildPrefixCache();
}
var _36d=dojo.ns.get(ns);
if(!_36d){
dojo.ns.register(ns,ns+".widget");
_36d=dojo.ns.get(ns);
}
if(_36d){
_36d.resolve(_368);
}
impl=_364(_36a,_36d.module);
if(impl){
return (imps[_36a]=impl);
}
_36d=dojo.ns.require(ns);
if((_36d)&&(_36d.resolver)){
_36d.resolve(_368);
impl=_364(_36a,_36d.module);
if(impl){
return (imps[_36a]=impl);
}
}
throw new Error("Could not locate widget implementation for \""+_368+"\" in \""+_36d.module+"\" registered to namespace \""+_36d.name+"\"");
};
this.resizing=false;
this.onWindowResized=function(){
if(this.resizing){
return;
}
try{
this.resizing=true;
for(var id in this.topWidgets){
var _36f=this.topWidgets[id];
if(_36f.checkSize){
_36f.checkSize();
}
}
}
catch(e){
}
finally{
this.resizing=false;
}
};
if(typeof window!="undefined"){
dojo.addOnLoad(this,"onWindowResized");
dojo.event.connect(window,"onresize",this,"onWindowResized");
}
};
(function(){
var dw=dojo.widget;
var dwm=dw.manager;
var h=dojo.lang.curry(dojo.lang,"hitch",dwm);
var g=function(_374,_375){
dw[(_375||_374)]=h(_374);
};
g("add","addWidget");
g("destroyAll","destroyAllWidgets");
g("remove","removeWidget");
g("removeById","removeWidgetById");
g("getWidgetById");
g("getWidgetById","byId");
g("getWidgetsByType");
g("getWidgetsByFilter");
g("getWidgetsByType","byType");
g("getWidgetsByFilter","byFilter");
g("getWidgetByNode","byNode");
dw.all=function(n){
var _377=dwm.getAllWidgets.apply(dwm,arguments);
if(arguments.length>0){
return _377[n];
}
return _377;
};
g("registerWidgetPackage");
g("getImplementation","getWidgetImplementation");
g("getImplementationName","getWidgetImplementationName");
dw.widgets=dwm.widgets;
dw.widgetIds=dwm.widgetIds;
dw.root=dwm.root;
})();
dojo.provide("dojo.uri.Uri");
dojo.uri=new function(){
this.dojoUri=function(uri){
return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(),uri);
};
this.moduleUri=function(_379,uri){
var loc=dojo.hostenv.getModuleSymbols(_379).join("/");
if(!loc){
return null;
}
if(loc.lastIndexOf("/")!=loc.length-1){
loc+="/";
}
var _37c=loc.indexOf(":");
var _37d=loc.indexOf("/");
if(loc.charAt(0)!="/"&&(_37c==-1||_37c>_37d)){
loc=dojo.hostenv.getBaseScriptUri()+loc;
}
return new dojo.uri.Uri(loc,uri);
};
this.Uri=function(){
var uri=arguments[0];
for(var i=1;i<arguments.length;i++){
if(!arguments[i]){
continue;
}
var _380=new dojo.uri.Uri(arguments[i].toString());
var _381=new dojo.uri.Uri(uri.toString());
if((_380.path=="")&&(_380.scheme==null)&&(_380.authority==null)&&(_380.query==null)){
if(_380.fragment!=null){
_381.fragment=_380.fragment;
}
_380=_381;
}else{
if(_380.scheme==null){
_380.scheme=_381.scheme;
if(_380.authority==null){
_380.authority=_381.authority;
if(_380.path.charAt(0)!="/"){
var path=_381.path.substring(0,_381.path.lastIndexOf("/")+1)+_380.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;
}
}
}
}
_380.path=segs.join("/");
}
}
}
}
uri="";
if(_380.scheme!=null){
uri+=_380.scheme+":";
}
if(_380.authority!=null){
uri+="//"+_380.authority;
}
uri+=_380.path;
if(_380.query!=null){
uri+="?"+_380.query;
}
if(_380.fragment!=null){
uri+="#"+_380.fragment;
}
}
this.uri=uri.toString();
var _385="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";
var r=this.uri.match(new RegExp(_385));
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){
_385="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$";
r=this.authority.match(new RegExp(_385));
this.user=r[3]||null;
this.password=r[4]||null;
this.host=r[5];
this.port=r[7]||null;
}
this.toString=function(){
return this.uri;
};
};
};
dojo.kwCompoundRequire({common:[["dojo.uri.Uri",false,false]]});
dojo.provide("dojo.uri.*");
dojo.provide("dojo.html.common");
dojo.lang.mixin(dojo.html,dojo.dom);
dojo.html.getEventTarget=function(evt){
if(!evt){
evt=dojo.global().event||{};
}
var t=(evt.srcElement?evt.srcElement:(evt.target?evt.target:null));
while((t)&&(t.nodeType!=1)){
t=t.parentNode;
}
return t;
};
dojo.html.getViewport=function(){
var _389=dojo.global();
var _38a=dojo.doc();
var w=0;
var h=0;
if(dojo.render.html.mozilla){
w=_38a.documentElement.clientWidth;
h=_389.innerHeight;
}else{
if(!dojo.render.html.opera&&_389.innerWidth){
w=_389.innerWidth;
h=_389.innerHeight;
}else{
if(!dojo.render.html.opera&&dojo.exists("documentElement.clientWidth",_38a)){
var w2=_38a.documentElement.clientWidth;
if(!w||w2&&w2<w){
w=w2;
}
h=_38a.documentElement.clientHeight;
}else{
if(dojo.body().clientWidth){
w=dojo.body().clientWidth;
h=dojo.body().clientHeight;
}
}
}
}
return {width:w,height:h};
};
dojo.html.getScroll=function(){
var _38e=dojo.global();
var _38f=dojo.doc();
var top=_38e.pageYOffset||_38f.documentElement.scrollTop||dojo.body().scrollTop||0;
var left=_38e.pageXOffset||_38f.documentElement.scrollLeft||dojo.body().scrollLeft||0;
return {top:top,left:left,offset:{x:left,y:top}};
};
dojo.html.getParentByType=function(node,type){
var _394=dojo.doc();
var _395=dojo.byId(node);
type=type.toLowerCase();
while((_395)&&(_395.nodeName.toLowerCase()!=type)){
if(_395==(_394["body"]||_394["documentElement"])){
return null;
}
_395=_395.parentNode;
}
return _395;
};
dojo.html.getAttribute=function(node,attr){
node=dojo.byId(node);
if((!node)||(!node.getAttribute)){
return null;
}
var ta=typeof attr=="string"?attr:new String(attr);
var v=node.getAttribute(ta.toUpperCase());
if((v)&&(typeof v=="string")&&(v!="")){
return v;
}
if(v&&v.value){
return v.value;
}
if((node.getAttributeNode)&&(node.getAttributeNode(ta))){
return (node.getAttributeNode(ta)).value;
}else{
if(node.getAttribute(ta)){
return node.getAttribute(ta);
}else{
if(node.getAttribute(ta.toLowerCase())){
return node.getAttribute(ta.toLowerCase());
}
}
}
return null;
};
dojo.html.hasAttribute=function(node,attr){
return dojo.html.getAttribute(dojo.byId(node),attr)?true:false;
};
dojo.html.getCursorPosition=function(e){
e=e||dojo.global().event;
var _39d={x:0,y:0};
if(e.pageX||e.pageY){
_39d.x=e.pageX;
_39d.y=e.pageY;
}else{
var de=dojo.doc().documentElement;
var db=dojo.body();
_39d.x=e.clientX+((de||db)["scrollLeft"])-((de||db)["clientLeft"]);
_39d.y=e.clientY+((de||db)["scrollTop"])-((de||db)["clientTop"]);
}
return _39d;
};
dojo.html.isTag=function(node){
node=dojo.byId(node);
if(node&&node.tagName){
for(var i=1;i<arguments.length;i++){
if(node.tagName.toLowerCase()==String(arguments[i]).toLowerCase()){
return String(arguments[i]).toLowerCase();
}
}
}
return "";
};
if(dojo.render.html.ie&&!dojo.render.html.ie70){
if(window.location.href.substr(0,6).toLowerCase()!="https:"){
(function(){
var _3a2=dojo.doc().createElement("script");
_3a2.src="javascript:'dojo.html.createExternalElement=function(doc, tag){ return doc.createElement(tag); }'";
dojo.doc().getElementsByTagName("head")[0].appendChild(_3a2);
})();
}
}else{
dojo.html.createExternalElement=function(doc,tag){
return doc.createElement(tag);
};
}
dojo.provide("dojo.a11y");
dojo.a11y={imgPath:dojo.uri.moduleUri("dojo.widget","templates/images"),doAccessibleCheck:true,accessible:null,checkAccessible:function(){
if(this.accessible===null){
this.accessible=false;
if(this.doAccessibleCheck==true){
this.accessible=this.testAccessible();
}
}
return this.accessible;
},testAccessible:function(){
this.accessible=false;
if(dojo.render.html.ie||dojo.render.html.mozilla){
var div=document.createElement("div");
div.style.backgroundImage="url(\""+this.imgPath+"/tab_close.gif\")";
dojo.body().appendChild(div);
var _3a6=null;
if(window.getComputedStyle){
var _3a7=getComputedStyle(div,"");
_3a6=_3a7.getPropertyValue("background-image");
}else{
_3a6=div.currentStyle.backgroundImage;
}
var _3a8=false;
if(_3a6!=null&&(_3a6=="none"||_3a6=="url(invalid-url:)")){
this.accessible=true;
}
dojo.body().removeChild(div);
}
return this.accessible;
},setAccessible:function(_3a9){
this.accessible=_3a9;
},setCheckAccessible:function(_3aa){
this.doAccessibleCheck=_3aa;
},setAccessibleMode:function(){
if(this.accessible===null){
if(this.checkAccessible()){
dojo.render.html.prefixes.unshift("a11y");
}
}
return this.accessible;
}};
dojo.provide("dojo.widget.Widget");
dojo.declare("dojo.widget.Widget",null,function(){
this.children=[];
this.extraArgs={};
},{parent:null,isTopLevel:false,disabled:false,isContainer:false,widgetId:"",widgetType:"Widget",ns:"dojo",getNamespacedType:function(){
return (this.ns?this.ns+":"+this.widgetType:this.widgetType).toLowerCase();
},toString:function(){
return "[Widget "+this.getNamespacedType()+", "+(this.widgetId||"NO ID")+"]";
},repr:function(){
return this.toString();
},enable:function(){
this.disabled=false;
},disable:function(){
this.disabled=true;
},onResized:function(){
this.notifyChildrenOfResize();
},notifyChildrenOfResize:function(){
for(var i=0;i<this.children.length;i++){
var _3ac=this.children[i];
if(_3ac.onResized){
_3ac.onResized();
}
}
},create:function(args,_3ae,_3af,ns){
if(ns){
this.ns=ns;
}
this.satisfyPropertySets(args,_3ae,_3af);
this.mixInProperties(args,_3ae,_3af);
this.postMixInProperties(args,_3ae,_3af);
dojo.widget.manager.add(this);
this.buildRendering(args,_3ae,_3af);
this.initialize(args,_3ae,_3af);
this.postInitialize(args,_3ae,_3af);
this.postCreate(args,_3ae,_3af);
return this;
},destroy:function(_3b1){
if(this.parent){
this.parent.removeChild(this);
}
this.destroyChildren();
this.uninitialize();
this.destroyRendering(_3b1);
dojo.widget.manager.removeById(this.widgetId);
},destroyChildren:function(){
var _3b2;
var i=0;
while(this.children.length>i){
_3b2=this.children[i];
if(_3b2 instanceof dojo.widget.Widget){
this.removeChild(_3b2);
_3b2.destroy();
continue;
}
i++;
}
},getChildrenOfType:function(type,_3b5){
var ret=[];
var _3b7=dojo.lang.isFunction(type);
if(!_3b7){
type=type.toLowerCase();
}
for(var x=0;x<this.children.length;x++){
if(_3b7){
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(_3b5){
ret=ret.concat(this.children[x].getChildrenOfType(type,_3b5));
}
}
return ret;
},getDescendants:function(){
var _3b9=[];
var _3ba=[this];
var elem;
while((elem=_3ba.pop())){
_3b9.push(elem);
if(elem.children){
dojo.lang.forEach(elem.children,function(elem){
_3ba.push(elem);
});
}
}
return _3b9;
},isFirstChild:function(){
return this===this.parent.children[0];
},isLastChild:function(){
return this===this.parent.children[this.parent.children.length-1];
},satisfyPropertySets:function(args){
return args;
},mixInProperties:function(args,frag){
if((args["fastMixIn"])||(frag["fastMixIn"])){
for(var x in args){
this[x]=args[x];
}
return;
}
var _3c1;
var _3c2=dojo.widget.lcArgsCache[this.widgetType];
if(_3c2==null){
_3c2={};
for(var y in this){
_3c2[((new String(y)).toLowerCase())]=y;
}
dojo.widget.lcArgsCache[this.widgetType]=_3c2;
}
var _3c4={};
for(var x in args){
if(!this[x]){
var y=_3c2[(new String(x)).toLowerCase()];
if(y){
args[y]=args[x];
x=y;
}
}
if(_3c4[x]){
continue;
}
_3c4[x]=true;
if((typeof this[x])!=(typeof _3c1)){
if(typeof args[x]!="string"){
this[x]=args[x];
}else{
if(dojo.lang.isString(this[x])){
this[x]=args[x];
}else{
if(dojo.lang.isNumber(this[x])){
this[x]=new Number(args[x]);
}else{
if(dojo.lang.isBoolean(this[x])){
this[x]=(args[x].toLowerCase()=="false")?false:true;
}else{
if(dojo.lang.isFunction(this[x])){
if(args[x].search(/[^\w\.]+/i)==-1){
this[x]=dojo.getObject(args[x],false);
}else{
var tn=dojo.lang.nameAnonFunc(new Function(args[x]),this);
dojo.event.kwConnect({srcObj:this,srcFunc:x,adviceObj:this,adviceFunc:tn});
}
}else{
if(dojo.lang.isArray(this[x])){
this[x]=args[x].split(";");
}else{
if(this[x] instanceof Date){
this[x]=new Date(Number(args[x]));
}else{
if(typeof this[x]=="object"){
if(this[x] instanceof dojo.uri.Uri){
this[x]=dojo.uri.dojoUri(args[x]);
}else{
var _3c6=args[x].split(";");
for(var y=0;y<_3c6.length;y++){
var si=_3c6[y].indexOf(":");
if((si!=-1)&&(_3c6[y].length>si)){
this[x][_3c6[y].substr(0,si).replace(/^\s+|\s+$/g,"")]=_3c6[y].substr(si+1);
}
}
}
}else{
this[x]=args[x];
}
}
}
}
}
}
}
}
}else{
this.extraArgs[x.toLowerCase()]=args[x];
}
}
},postMixInProperties:function(args,frag,_3ca){
},initialize:function(args,frag,_3cd){
return false;
},postInitialize:function(args,frag,_3d0){
return false;
},postCreate:function(args,frag,_3d3){
return false;
},uninitialize:function(){
return false;
},buildRendering:function(args,frag,_3d6){
dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", ");
return false;
},destroyRendering:function(){
dojo.unimplemented("dojo.widget.Widget.destroyRendering");
return false;
},addedTo:function(_3d7){
},addChild:function(_3d8){
dojo.unimplemented("dojo.widget.Widget.addChild");
return false;
},removeChild:function(_3d9){
for(var x=0;x<this.children.length;x++){
if(this.children[x]===_3d9){
this.children.splice(x,1);
_3d9.parent=null;
break;
}
}
return _3d9;
},getPreviousSibling:function(){
var idx=this.getParentIndex();
if(idx<=0){
return null;
}
return this.parent.children[idx-1];
},getSiblings:function(){
return this.parent.children;
},getParentIndex:function(){
return dojo.lang.indexOf(this.parent.children,this,true);
},getNextSibling:function(){
var idx=this.getParentIndex();
if(idx==this.parent.children.length-1){
return null;
}
if(idx<0){
return null;
}
return this.parent.children[idx+1];
}});
dojo.widget.lcArgsCache={};
dojo.widget.tags={};
dojo.widget.tags["dojo:propertyset"]=function(_3dd,_3de,_3df){
var _3e0=_3de.parseProperties(_3dd["dojo:propertyset"]);
};
dojo.widget.tags["dojo:connect"]=function(_3e1,_3e2,_3e3){
var _3e4=_3e2.parseProperties(_3e1["dojo:connect"]);
};
dojo.widget.buildWidgetFromParseTree=function(type,frag,_3e7,_3e8,_3e9,_3ea){
dojo.a11y.setAccessibleMode();
var _3eb=type.split(":");
_3eb=(_3eb.length==2)?_3eb[1]:type;
var _3ec=_3ea||_3e7.parseProperties(frag[frag["ns"]+":"+_3eb]);
var _3ed=dojo.widget.manager.getImplementation(_3eb,null,null,frag["ns"]);
if(!_3ed){
throw new Error("cannot find \""+type+"\" widget");
}else{
if(!_3ed.create){
throw new Error("\""+type+"\" widget object has no \"create\" method and does not appear to implement *Widget");
}
}
_3ec["dojoinsertionindex"]=_3e9;
var ret=_3ed.create(_3ec,frag,_3e8,frag["ns"]);
return ret;
};
dojo.widget.defineWidget=function(_3ef,_3f0,_3f1,init,_3f3){
if(dojo.lang.isString(arguments[3])){
dojo.widget._defineWidget(arguments[0],arguments[3],arguments[1],arguments[4],arguments[2]);
}else{
var args=[arguments[0]],p=3;
if(dojo.lang.isString(arguments[1])){
args.push(arguments[1],arguments[2]);
}else{
args.push("",arguments[1]);
p=2;
}
if(dojo.lang.isFunction(arguments[p])){
args.push(arguments[p],arguments[p+1]);
}else{
args.push(null,arguments[p]);
}
dojo.widget._defineWidget.apply(this,args);
}
};
dojo.widget.defineWidget.renderers="html|svg|vml";
dojo.widget._defineWidget=function(_3f6,_3f7,_3f8,init,_3fa){
var _3fb=_3f6.split(".");
var type=_3fb.pop();
var regx="\\.("+(_3f7?_3f7+"|":"")+dojo.widget.defineWidget.renderers+")\\.";
var r=_3f6.search(new RegExp(regx));
_3fb=(r<0?_3fb.join("."):_3f6.substr(0,r));
dojo.widget.manager.registerWidgetPackage(_3fb);
var pos=_3fb.indexOf(".");
var _400=(pos>-1)?_3fb.substring(0,pos):_3fb;
_3fa=(_3fa)||{};
_3fa.widgetType=type;
if((!init)&&(_3fa["classConstructor"])){
init=_3fa.classConstructor;
delete _3fa.classConstructor;
}
dojo.declare(_3f6,_3f8,init,_3fa);
};
dojo.provide("dojo.widget.Parse");
dojo.widget.Parse=function(_401){
this.propertySetsList=[];
this.fragment=_401;
this.createComponents=function(frag,_403){
var _404=[];
var _405=false;
try{
if(frag&&frag.tagName&&(frag!=frag.nodeRef)){
var _406=dojo.widget.tags;
var tna=String(frag.tagName).split(";");
for(var x=0;x<tna.length;x++){
var ltn=tna[x].replace(/^\s+|\s+$/g,"").toLowerCase();
frag.tagName=ltn;
var ret;
if(_406[ltn]){
_405=true;
ret=_406[ltn](frag,this,_403,frag.index);
_404.push(ret);
}else{
if(ltn.indexOf(":")==-1){
ltn="dojo:"+ltn;
}
ret=dojo.widget.buildWidgetFromParseTree(ltn,frag,this,_403,frag.index);
if(ret){
_405=true;
_404.push(ret);
}
}
}
}
}
catch(e){
dojo.debug("dojo.widget.Parse: error:",e);
}
if(!_405){
_404=_404.concat(this.createSubComponents(frag,_403));
}
return _404;
};
this.createSubComponents=function(_40b,_40c){
var frag,_40e=[];
for(var item in _40b){
frag=_40b[item];
if(frag&&typeof frag=="object"&&(frag!=_40b.nodeRef)&&(frag!=_40b.tagName)&&(item.indexOf("$")==-1)){
_40e=_40e.concat(this.createComponents(frag,_40c));
}
}
return _40e;
};
this.parsePropertySets=function(_410){
return [];
};
this.parseProperties=function(_411){
var _412={};
for(var item in _411){
if((_411[item]==_411.tagName)||(_411[item]==_411.nodeRef)){
}else{
var frag=_411[item];
if(frag.tagName&&dojo.widget.tags[frag.tagName.toLowerCase()]){
}else{
if(frag[0]&&frag[0].value!=""&&frag[0].value!=null){
try{
if(item.toLowerCase()=="dataprovider"){
var _415=this;
this.getDataProvider(_415,frag[0].value);
_412.dataProvider=this.dataProvider;
}
_412[item]=frag[0].value;
var _416=this.parseProperties(frag);
for(var _417 in _416){
_412[_417]=_416[_417];
}
}
catch(e){
dojo.debug(e);
}
}
}
switch(item.toLowerCase()){
case "checked":
case "disabled":
if(typeof _412[item]!="boolean"){
_412[item]=true;
}
break;
}
}
}
return _412;
};
this.getDataProvider=function(_418,_419){
dojo.io.bind({url:_419,load:function(type,_41b){
if(type=="load"){
_418.dataProvider=_41b;
}
},mimetype:"text/javascript",sync:true});
};
this.getPropertySetById=function(_41c){
for(var x=0;x<this.propertySetsList.length;x++){
if(_41c==this.propertySetsList[x]["id"][0].value){
return this.propertySetsList[x];
}
}
return "";
};
this.getPropertySetsByType=function(_41e){
var _41f=[];
for(var x=0;x<this.propertySetsList.length;x++){
var cpl=this.propertySetsList[x];
var cpcc=cpl.componentClass||cpl.componentType||null;
var _423=this.propertySetsList[x]["id"][0].value;
if(cpcc&&(_423==cpcc[0].value)){
_41f.push(cpl);
}
}
return _41f;
};
this.getPropertySets=function(_424){
var ppl="dojo:propertyproviderlist";
var _426=[];
var _427=_424.tagName;
if(_424[ppl]){
var _428=_424[ppl].value.split(" ");
for(var _429 in _428){
if((_429.indexOf("..")==-1)&&(_429.indexOf("://")==-1)){
var _42a=this.getPropertySetById(_429);
if(_42a!=""){
_426.push(_42a);
}
}else{
}
}
}
return this.getPropertySetsByType(_427).concat(_426);
};
this.createComponentFromScript=function(_42b,_42c,_42d,ns){
_42d.fastMixIn=true;
var ltn=(ns||"dojo")+":"+_42c.toLowerCase();
if(dojo.widget.tags[ltn]){
return [dojo.widget.tags[ltn](_42d,this,null,null,_42d)];
}
return [dojo.widget.buildWidgetFromParseTree(ltn,_42d,this,null,null,_42d)];
};
};
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,_432,_433,_434){
var _435=false;
var _436=(typeof name=="string");
if(_436){
var pos=name.indexOf(":");
var ns=(pos>-1)?name.substring(0,pos):"dojo";
if(pos>-1){
name=name.substring(pos+1);
}
var _439=name.toLowerCase();
var _43a=ns+":"+_439;
_435=(dojo.byId(name)&&!dojo.widget.tags[_43a]);
}
if((arguments.length==1)&&(_435||!_436)){
var xp=new dojo.xml.Parse();
var tn=_435?dojo.byId(name):name;
return dojo.widget.getParser().createComponents(xp.parseElement(tn,null,true))[0];
}
function fromScript(_43d,name,_43f,ns){
_43f[_43a]={dojotype:[{value:_439}],nodeRef:_43d,fastMixIn:true};
_43f.ns=ns;
return dojo.widget.getParser().createComponentFromScript(_43d,name,_43f,ns);
}
_432=_432||{};
var _441=false;
var tn=null;
var h=dojo.render.html.capable;
if(h){
tn=document.createElement("span");
}
if(!_433){
_441=true;
_433=tn;
if(h){
dojo.body().appendChild(_433);
}
}else{
if(_434){
dojo.dom.insertAtPosition(tn,_433,_434);
}else{
tn=_433;
}
}
var _443=fromScript(tn,name.toLowerCase(),_432,ns);
if((!_443)||(!_443[0])||(typeof _443[0].widgetType=="undefined")){
throw new Error("createWidget: Creation of \""+name+"\" widget failed.");
}
try{
if(_441&&_443[0].domNode.parentNode){
_443[0].domNode.parentNode.removeChild(_443[0].domNode);
}
}
catch(e){
dojo.debug(e);
}
return _443[0];
};
dojo.provide("dojo.html.style");
dojo.html.getClass=function(node){
node=dojo.byId(node);
if(!node){
return "";
}
var cs="";
if(node.className){
cs=node.className;
}else{
if(dojo.html.hasAttribute(node,"class")){
cs=dojo.html.getAttribute(node,"class");
}
}
return cs.replace(/^\s+|\s+$/g,"");
};
dojo.html.getClasses=function(node){
var c=dojo.html.getClass(node);
return (c=="")?[]:c.split(/\s+/g);
};
dojo.html.hasClass=function(node,_449){
return (new RegExp("(^|\\s+)"+_449+"(\\s+|$)")).test(dojo.html.getClass(node));
};
dojo.html.prependClass=function(node,_44b){
_44b+=" "+dojo.html.getClass(node);
return dojo.html.setClass(node,_44b);
};
dojo.html.addClass=function(node,_44d){
if(dojo.html.hasClass(node,_44d)){
return false;
}
_44d=(dojo.html.getClass(node)+" "+_44d).replace(/^\s+|\s+$/g,"");
return dojo.html.setClass(node,_44d);
};
dojo.html.setClass=function(node,_44f){
node=dojo.byId(node);
var cs=new String(_44f);
try{
if(typeof node.className=="string"){
node.className=cs;
}else{
if(node.setAttribute){
node.setAttribute("class",_44f);
node.className=cs;
}else{
return false;
}
}
}
catch(e){
dojo.debug("dojo.html.setClass() failed",e);
}
return true;
};
dojo.html.removeClass=function(node,_452,_453){
try{
if(!_453){
var _454=dojo.html.getClass(node).replace(new RegExp("(^|\\s+)"+_452+"(\\s+|$)"),"$1$2");
}else{
var _454=dojo.html.getClass(node).replace(_452,"");
}
dojo.html.setClass(node,_454);
}
catch(e){
dojo.debug("dojo.html.removeClass() failed",e);
}
return true;
};
dojo.html.replaceClass=function(node,_456,_457){
dojo.html.removeClass(node,_457);
dojo.html.addClass(node,_456);
};
dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2};
dojo.html.getElementsByClass=function(_458,_459,_45a,_45b,_45c){
_45c=false;
var _45d=dojo.doc();
_459=dojo.byId(_459)||_45d;
var _45e=_458.split(/\s+/g);
var _45f=[];
if(_45b!=1&&_45b!=2){
_45b=0;
}
var _460=new RegExp("(\\s|^)(("+_45e.join(")|(")+"))(\\s|$)");
var _461=_45e.join(" ").length;
var _462=[];
if(!_45c&&_45d.evaluate){
var _463=".//"+(_45a||"*")+"[contains(";
if(_45b!=dojo.html.classMatchType.ContainsAny){
_463+="concat(' ',@class,' '), ' "+_45e.join(" ') and contains(concat(' ',@class,' '), ' ")+" ')";
if(_45b==2){
_463+=" and string-length(@class)="+_461+"]";
}else{
_463+="]";
}
}else{
_463+="concat(' ',@class,' '), ' "+_45e.join(" ') or contains(concat(' ',@class,' '), ' ")+" ')]";
}
var _464=_45d.evaluate(_463,_459,null,XPathResult.ANY_TYPE,null);
var _465=_464.iterateNext();
while(_465){
try{
_462.push(_465);
_465=_464.iterateNext();
}
catch(e){
break;
}
}
return _462;
}else{
if(!_45a){
_45a="*";
}
_462=_459.getElementsByTagName(_45a);
var node,i=0;
outer:
while(node=_462[i++]){
var _468=dojo.html.getClasses(node);
if(_468.length==0){
continue outer;
}
var _469=0;
for(var j=0;j<_468.length;j++){
if(_460.test(_468[j])){
if(_45b==dojo.html.classMatchType.ContainsAny){
_45f.push(node);
continue outer;
}else{
_469++;
}
}else{
if(_45b==dojo.html.classMatchType.IsOnly){
continue outer;
}
}
}
if(_469==_45e.length){
if((_45b==dojo.html.classMatchType.IsOnly)&&(_469==_468.length)){
_45f.push(node);
}else{
if(_45b==dojo.html.classMatchType.ContainsAll){
_45f.push(node);
}
}
}
}
return _45f;
}
};
dojo.html.getElementsByClassName=dojo.html.getElementsByClass;
dojo.html.toCamelCase=function(_46b){
var arr=_46b.split("-"),cc=arr[0];
for(var i=1;i<arr.length;i++){
cc+=arr[i].charAt(0).toUpperCase()+arr[i].substring(1);
}
return cc;
};
dojo.html.toSelectorCase=function(_46f){
return _46f.replace(/([A-Z])/g,"-$1").toLowerCase();
};
if(dojo.render.html.ie){
dojo.html.getComputedStyle=function(node,_471,_472){
node=dojo.byId(node);
if(!node||!node.currentStyle){
return _472;
}
return node.currentStyle[dojo.html.toCamelCase(_471)];
};
dojo.html.getComputedStyles=function(node){
return node.currentStyle;
};
}else{
dojo.html.getComputedStyle=function(node,_475,_476){
node=dojo.byId(node);
if(!node||!node.style){
return _476;
}
var s=node.ownerDocument.defaultView.getComputedStyle(node,null);
return (s&&s[dojo.html.toCamelCase(_475)])||"";
};
dojo.html.getComputedStyles=function(node){
return node.ownerDocument.defaultView.getComputedStyle(node,null);
};
}
dojo.html.getStyleProperty=function(node,_47a){
node=dojo.byId(node);
return (node&&node.style?node.style[dojo.html.toCamelCase(_47a)]:undefined);
};
dojo.html.getStyle=function(node,_47c){
var _47d=dojo.html.getStyleProperty(node,_47c);
return (_47d?_47d:dojo.html.getComputedStyle(node,_47c));
};
dojo.html.setStyle=function(node,_47f,_480){
node=dojo.byId(node);
if(node&&node.style){
var _481=dojo.html.toCamelCase(_47f);
node.style[_481]=_480;
}
};
dojo.html.setStyleText=function(_482,text){
try{
_482.style.cssText=text;
}
catch(e){
_482.setAttribute("style",text);
}
};
dojo.html.copyStyle=function(_484,_485){
if(!_485.style.cssText){
_484.setAttribute("style",_485.getAttribute("style"));
}else{
_484.style.cssText=_485.style.cssText;
}
dojo.html.addClass(_484,dojo.html.getClass(_485));
};
dojo.html.getUnitValue=function(node,_487,_488){
var s=dojo.html.getComputedStyle(node,_487);
if((!s)||((s=="auto")&&(_488))){
return {value:0,units:"px"};
}
var _48a=s.match(/(\-?[\d.]+)([a-z%]*)/i);
if(!_48a){
return dojo.html.getUnitValue.bad;
}
return {value:Number(_48a[1]),units:_48a[2].toLowerCase()};
};
dojo.html.getUnitValue.bad={value:NaN,units:""};
if(dojo.render.html.ie){
dojo.html.toPixelValue=function(_48b,_48c){
if(!_48c){
return 0;
}
if(_48c.slice(-2)=="px"){
return parseFloat(_48c);
}
var _48d=0;
with(_48b){
var _48e=style.left;
var _48f=runtimeStyle.left;
runtimeStyle.left=currentStyle.left;
try{
style.left=_48c||0;
_48d=style.pixelLeft;
style.left=_48e;
runtimeStyle.left=_48f;
}
catch(e){
}
}
return _48d;
};
}else{
dojo.html.toPixelValue=function(_490,_491){
return (_491&&(_491.slice(-2)=="px")?parseFloat(_491):0);
};
}
dojo.html.getPixelValue=function(node,_493,_494){
return dojo.html.toPixelValue(node,dojo.html.getComputedStyle(node,_493));
};
dojo.html.setPositivePixelValue=function(node,_496,_497){
if(isNaN(_497)){
return false;
}
node.style[_496]=Math.max(0,_497)+"px";
return true;
};
dojo.html.styleSheet=null;
dojo.html.insertCssRule=function(_498,_499,_49a){
if(!dojo.html.styleSheet){
if(document.createStyleSheet){
dojo.html.styleSheet=document.createStyleSheet();
}else{
if(document.styleSheets[0]){
dojo.html.styleSheet=document.styleSheets[0];
}else{
return null;
}
}
}
var ss=dojo.html.styleSheet;
if(arguments.length<3){
if(ss.cssRules){
_49a=ss.cssRules.length;
}else{
if(ss.rules){
_49a=ss.rules.length;
}else{
return null;
}
}
}
if(ss.insertRule){
var rule=_498+" { "+_499+" }";
return ss.insertRule(rule,_49a);
}else{
if(ss.addRule){
return ss.addRule(_498,_499,_49a);
}else{
return null;
}
}
};
dojo.html.removeCssRule=function(_49d){
var ss=dojo.html.styleSheet;
if(!ss){
dojo.debug("no stylesheet defined for removing rules");
return false;
}
if(dojo.render.html.ie){
if(!_49d){
_49d=ss.rules.length;
ss.removeRule(_49d);
}
}else{
if(document.styleSheets[0]){
if(!_49d){
_49d=ss.cssRules.length;
}
ss.deleteRule(_49d);
}
}
return true;
};
dojo.html._insertedCssFiles=[];
dojo.html.insertCssFile=function(URI,doc,_4a1,_4a2){
if(!URI){
return;
}
if(!doc){
doc=document;
}
var _4a3=dojo.hostenv.getText(URI,false,_4a2);
if(_4a3===null){
return;
}
_4a3=dojo.html.fixPathsInCssText(_4a3,URI);
if(_4a1){
var idx=-1,node,ent=dojo.html._insertedCssFiles;
for(var i=0;i<ent.length;i++){
if((ent[i].doc==doc)&&(ent[i].cssText==_4a3)){
idx=i;
node=ent[i].nodeRef;
break;
}
}
if(node){
var _4a8=doc.getElementsByTagName("style");
for(var i=0;i<_4a8.length;i++){
if(_4a8[i]==node){
return;
}
}
dojo.html._insertedCssFiles.shift(idx,1);
}
}
var _4a9=dojo.html.insertCssText(_4a3,doc);
dojo.html._insertedCssFiles.push({"doc":doc,"cssText":_4a3,"nodeRef":_4a9});
if(_4a9&&djConfig.isDebug){
_4a9.setAttribute("dbgHref",URI);
}
return _4a9;
};
dojo.html.insertCssText=function(_4aa,doc,URI){
if(!_4aa){
return;
}
if(!doc){
doc=document;
}
if(URI){
_4aa=dojo.html.fixPathsInCssText(_4aa,URI);
}
var _4ad=doc.createElement("style");
_4ad.setAttribute("type","text/css");
var head=doc.getElementsByTagName("head")[0];
if(!head){
dojo.debug("No head tag in document, aborting styles");
return;
}else{
head.appendChild(_4ad);
}
if(_4ad.styleSheet){
var _4af=function(){
try{
_4ad.styleSheet.cssText=_4aa;
}
catch(e){
dojo.debug(e);
}
};
if(_4ad.styleSheet.disabled){
setTimeout(_4af,10);
}else{
_4af();
}
}else{
var _4b0=doc.createTextNode(_4aa);
_4ad.appendChild(_4b0);
}
return _4ad;
};
dojo.html.fixPathsInCssText=function(_4b1,URI){
if(!_4b1||!URI){
return;
}
var _4b3,str="",url="",_4b6="[\\t\\s\\w\\(\\)\\/\\.\\\\'\"-:#=&?~]+";
var _4b7=new RegExp("url\\(\\s*("+_4b6+")\\s*\\)");
var _4b8=/(file|https?|ftps?):\/\//;
regexTrim=new RegExp("^[\\s]*(['\"]?)("+_4b6+")\\1[\\s]*?$");
if(dojo.render.html.ie55||dojo.render.html.ie60){
var _4b9=new RegExp("AlphaImageLoader\\((.*)src=['\"]("+_4b6+")['\"]");
while(_4b3=_4b9.exec(_4b1)){
url=_4b3[2].replace(regexTrim,"$2");
if(!_4b8.exec(url)){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=_4b1.substring(0,_4b3.index)+"AlphaImageLoader("+_4b3[1]+"src='"+url+"'";
_4b1=_4b1.substr(_4b3.index+_4b3[0].length);
}
_4b1=str+_4b1;
str="";
}
while(_4b3=_4b7.exec(_4b1)){
url=_4b3[1].replace(regexTrim,"$2");
if(!_4b8.exec(url)){
url=(new dojo.uri.Uri(URI,url).toString());
}
str+=_4b1.substring(0,_4b3.index)+"url("+url+")";
_4b1=_4b1.substr(_4b3.index+_4b3[0].length);
}
return str+_4b1;
};
dojo.html.setActiveStyleSheet=function(_4ba){
var i=0,a,els=dojo.doc().getElementsByTagName("link");
while(a=els[i++]){
if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")){
a.disabled=true;
if(a.getAttribute("title")==_4ba){
a.disabled=false;
}
}
}
};
dojo.html.getActiveStyleSheet=function(){
var i=0,a,els=dojo.doc().getElementsByTagName("link");
while(a=els[i++]){
if((a.getAttribute("rel").indexOf("style")!=-1)&&(a.getAttribute("title"))&&(!a.disabled)){
return a.getAttribute("title");
}
}
return null;
};
dojo.html.getPreferredStyleSheet=function(){
var i=0,a,els=dojo.doc().getElementsByTagName("link");
while(a=els[i++]){
if((a.getAttribute("rel").indexOf("style")!=-1)&&(a.getAttribute("rel").indexOf("alt")==-1)&&(a.getAttribute("title"))){
return a.getAttribute("title");
}
}
return null;
};
dojo.html.applyBrowserClass=function(node){
var drh=dojo.render.html;
var _4c6={dj_ie:drh.ie,dj_ie55:drh.ie55,dj_ie6:drh.ie60,dj_ie7:drh.ie70,dj_iequirks:drh.ie&&drh.quirks,dj_opera:drh.opera,dj_opera8:drh.opera&&(Math.floor(dojo.render.version)==8),dj_opera9:drh.opera&&(Math.floor(dojo.render.version)==9),dj_khtml:drh.khtml,dj_safari:drh.safari,dj_gecko:drh.mozilla};
for(var p in _4c6){
if(_4c6[p]){
dojo.html.addClass(node,p);
}
}
};
dojo.provide("dojo.widget.DomWidget");
dojo.widget._cssFiles={};
dojo.widget._cssStrings={};
dojo.widget._templateCache={};
dojo.widget.defaultStrings={dojoRoot:dojo.hostenv.getBaseScriptUri(),dojoWidgetModuleUri:dojo.uri.moduleUri("dojo.widget"),baseScriptUri:dojo.hostenv.getBaseScriptUri()};
dojo.widget.fillFromTemplateCache=function(obj,_4c9,_4ca,_4cb){
var _4cc=_4c9||obj.templatePath;
var _4cd=dojo.widget._templateCache;
if(!_4cc&&!obj["widgetType"]){
do{
var _4ce="__dummyTemplate__"+dojo.widget._templateCache.dummyCount++;
}while(_4cd[_4ce]);
obj.widgetType=_4ce;
}
var wt=_4cc?_4cc.toString():obj.widgetType;
var ts=_4cd[wt];
if(!ts){
_4cd[wt]={"string":null,"node":null};
if(_4cb){
ts={};
}else{
ts=_4cd[wt];
}
}
if((!obj.templateString)&&(!_4cb)){
obj.templateString=_4ca||ts["string"];
}
if(obj.templateString){
obj.templateString=this._sanitizeTemplateString(obj.templateString);
}
if((!obj.templateNode)&&(!_4cb)){
obj.templateNode=ts["node"];
}
if((!obj.templateNode)&&(!obj.templateString)&&(_4cc)){
var _4d1=this._sanitizeTemplateString(dojo.hostenv.getText(_4cc));
obj.templateString=_4d1;
if(!_4cb){
_4cd[wt]["string"]=_4d1;
}
}
if((!ts["string"])&&(!_4cb)){
ts.string=obj.templateString;
}
};
dojo.widget._sanitizeTemplateString=function(_4d2){
if(_4d2){
_4d2=_4d2.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");
var _4d3=_4d2.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_4d3){
_4d2=_4d3[1];
}
}else{
_4d2="";
}
return _4d2;
};
dojo.widget._templateCache.dummyCount=0;
dojo.widget.attachProperties=["dojoAttachPoint","id"];
dojo.widget.eventAttachProperty="dojoAttachEvent";
dojo.widget.onBuildProperty="dojoOnBuild";
dojo.widget.waiNames=["waiRole","waiState"];
dojo.widget.wai={waiRole:{name:"waiRole","namespace":"http://www.w3.org/TR/xhtml2",alias:"x2",prefix:"wairole:"},waiState:{name:"waiState","namespace":"http://www.w3.org/2005/07/aaa",alias:"aaa",prefix:""},setAttr:function(node,ns,attr,_4d7){
if(dojo.render.html.ie){
node.setAttribute(this[ns].alias+":"+attr,this[ns].prefix+_4d7);
}else{
node.setAttributeNS(this[ns]["namespace"],attr,this[ns].prefix+_4d7);
}
},getAttr:function(node,ns,attr){
if(dojo.render.html.ie){
return node.getAttribute(this[ns].alias+":"+attr);
}else{
return node.getAttributeNS(this[ns]["namespace"],attr);
}
},removeAttr:function(node,ns,attr){
var _4de=true;
if(dojo.render.html.ie){
_4de=node.removeAttribute(this[ns].alias+":"+attr);
}else{
node.removeAttributeNS(this[ns]["namespace"],attr);
}
return _4de;
}};
dojo.widget.attachTemplateNodes=function(_4df,_4e0,_4e1){
var _4e2=dojo.dom.ELEMENT_NODE;
function trim(str){
return str.replace(/^\s+|\s+$/g,"");
}
if(!_4df){
_4df=_4e0.domNode;
}
if(_4df.nodeType!=_4e2){
return;
}
var _4e4=_4df.all||_4df.getElementsByTagName("*");
var _4e5=_4e0;
for(var x=-1;x<_4e4.length;x++){
var _4e7=(x==-1)?_4df:_4e4[x];
var _4e8=[];
if(!_4e0.widgetsInTemplate||!_4e7.getAttribute("dojoType")){
for(var y=0;y<this.attachProperties.length;y++){
var _4ea=_4e7.getAttribute(this.attachProperties[y]);
if(_4ea){
_4e8=_4ea.split(";");
for(var z=0;z<_4e8.length;z++){
if(dojo.lang.isArray(_4e0[_4e8[z]])){
_4e0[_4e8[z]].push(_4e7);
}else{
_4e0[_4e8[z]]=_4e7;
}
}
break;
}
}
var _4ec=_4e7.getAttribute(this.eventAttachProperty);
if(_4ec){
var evts=_4ec.split(";");
for(var y=0;y<evts.length;y++){
if((!evts[y])||(!evts[y].length)){
continue;
}
var _4ee=null;
var tevt=trim(evts[y]);
if(evts[y].indexOf(":")>=0){
var _4f0=tevt.split(":");
tevt=trim(_4f0[0]);
_4ee=trim(_4f0[1]);
}
if(!_4ee){
_4ee=tevt;
}
var tf=function(){
var ntf=new String(_4ee);
return function(evt){
if(_4e5[ntf]){
_4e5[ntf](dojo.event.browser.fixEvent(evt,this));
}
};
}();
dojo.event.browser.addListener(_4e7,tevt,tf,false,true);
}
}
for(var y=0;y<_4e1.length;y++){
var _4f4=_4e7.getAttribute(_4e1[y]);
if((_4f4)&&(_4f4.length)){
var _4ee=null;
var _4f5=_4e1[y].substr(4);
_4ee=trim(_4f4);
var _4f6=[_4ee];
if(_4ee.indexOf(";")>=0){
_4f6=dojo.lang.map(_4ee.split(";"),trim);
}
for(var z=0;z<_4f6.length;z++){
if(!_4f6[z].length){
continue;
}
var tf=function(){
var ntf=new String(_4f6[z]);
return function(evt){
if(_4e5[ntf]){
_4e5[ntf](dojo.event.browser.fixEvent(evt,this));
}
};
}();
dojo.event.browser.addListener(_4e7,_4f5,tf,false,true);
}
}
}
}
var _4f9=_4e7.getAttribute(this.templateProperty);
if(_4f9){
_4e0[_4f9]=_4e7;
}
dojo.lang.forEach(dojo.widget.waiNames,function(name){
var wai=dojo.widget.wai[name];
var val=_4e7.getAttribute(wai.name);
if(val){
if(val.indexOf("-")==-1){
dojo.widget.wai.setAttr(_4e7,wai.name,"role",val);
}else{
var _4fd=val.split("-");
dojo.widget.wai.setAttr(_4e7,wai.name,_4fd[0],_4fd[1]);
}
}
},this);
var _4fe=_4e7.getAttribute(this.onBuildProperty);
if(_4fe){
eval("var node = baseNode; var widget = targetObj; "+_4fe);
}
}
};
dojo.widget.getDojoEventsFromStr=function(str){
var re=/(dojoOn([a-z]+)(\s?))=/gi;
var evts=str?str.match(re)||[]:[];
var ret=[];
var lem={};
for(var x=0;x<evts.length;x++){
if(evts[x].length<1){
continue;
}
var cm=evts[x].replace(/\s/,"");
cm=(cm.slice(0,cm.length-1));
if(!lem[cm]){
lem[cm]=true;
ret.push(cm);
}
}
return ret;
};
dojo.declare("dojo.widget.DomWidget",dojo.widget.Widget,function(){
if((arguments.length>0)&&(typeof arguments[0]=="object")){
this.create(arguments[0]);
}
},{templateNode:null,templateString:null,templateCssString:null,preventClobber:false,domNode:null,containerNode:null,widgetsInTemplate:false,addChild:function(_506,_507,pos,ref,_50a){
if(typeof _50a=="undefined"){
_50a=this.children.length;
}
this.addWidgetAsDirectChild(_506,_507,pos,ref,_50a);
this.registerChild(_506,_50a);
return _506;
},addWidgetAsDirectChild:function(_50b,_50c,pos,ref,_50f){
if((!this.containerNode)&&(!_50c)){
this.containerNode=this.domNode;
}
var cn=(_50c)?_50c:this.containerNode;
if(!pos){
pos="after";
}
if(!ref){
if(!cn){
cn=dojo.body();
}
ref=cn.lastChild;
}
if(!_50f){
_50f=0;
}
_50b.domNode.setAttribute("dojoinsertionindex",_50f);
if(!ref){
cn.appendChild(_50b.domNode);
}else{
if(pos=="insertAtIndex"){
dojo.dom.insertAtIndex(_50b.domNode,ref.parentNode,_50f);
}else{
if((pos=="after")&&(ref===cn.lastChild)){
cn.appendChild(_50b.domNode);
}else{
dojo.dom.insertAtPosition(_50b.domNode,ref,pos);
}
}
}
},registerChild:function(_511,_512){
_511.dojoInsertionIndex=_512;
var idx=-1;
for(var i=0;i<this.children.length;i++){
if(this.children[i].dojoInsertionIndex<=_512){
idx=i;
}
}
this.children.splice(idx+1,0,_511);
_511.parent=this;
_511.addedTo(this,idx+1);
delete dojo.widget.manager.topWidgets[_511.widgetId];
},removeChild:function(_515){
dojo.dom.removeNode(_515.domNode);
return dojo.widget.DomWidget.superclass.removeChild.call(this,_515);
},getFragNodeRef:function(frag){
if(!frag){
return null;
}
if(!frag[this.getNamespacedType()]){
dojo.raise("Error: no frag for widget type "+this.getNamespacedType()+", id "+this.widgetId+" (maybe a widget has set it's type incorrectly)");
}
return frag[this.getNamespacedType()]["nodeRef"];
},postInitialize:function(args,frag,_519){
var _51a=this.getFragNodeRef(frag);
if(_519&&(_519.snarfChildDomOutput||!_51a)){
_519.addWidgetAsDirectChild(this,"","insertAtIndex","",args["dojoinsertionindex"],_51a);
}else{
if(_51a){
if(this.domNode&&(this.domNode!==_51a)){
this._sourceNodeRef=dojo.dom.replaceNode(_51a,this.domNode);
}
}
}
if(_519){
_519.registerChild(this,args.dojoinsertionindex);
}else{
dojo.widget.manager.topWidgets[this.widgetId]=this;
}
if(this.widgetsInTemplate){
var _51b=new dojo.xml.Parse();
var _51c;
var _51d=this.domNode.getElementsByTagName("*");
for(var i=0;i<_51d.length;i++){
if(_51d[i].getAttribute("dojoAttachPoint")=="subContainerWidget"){
_51c=_51d[i];
}
if(_51d[i].getAttribute("dojoType")){
_51d[i].setAttribute("isSubWidget",true);
}
}
if(this.isContainer&&!this.containerNode){
if(_51c){
var src=this.getFragNodeRef(frag);
if(src){
dojo.dom.moveChildren(src,_51c);
frag["dojoDontFollow"]=true;
}
}else{
dojo.debug("No subContainerWidget node can be found in template file for widget "+this);
}
}
var _520=_51b.parseElement(this.domNode,null,true);
dojo.widget.getParser().createSubComponents(_520,this);
var _521=[];
var _522=[this];
var w;
while((w=_522.pop())){
for(var i=0;i<w.children.length;i++){
var _524=w.children[i];
if(_524._processedSubWidgets||!_524.extraArgs["issubwidget"]){
continue;
}
_521.push(_524);
if(_524.isContainer){
_522.push(_524);
}
}
}
for(var i=0;i<_521.length;i++){
var _525=_521[i];
if(_525._processedSubWidgets){
dojo.debug("This should not happen: widget._processedSubWidgets is already true!");
return;
}
_525._processedSubWidgets=true;
if(_525.extraArgs["dojoattachevent"]){
var evts=_525.extraArgs["dojoattachevent"].split(";");
for(var j=0;j<evts.length;j++){
var _528=null;
var tevt=dojo.string.trim(evts[j]);
if(tevt.indexOf(":")>=0){
var _52a=tevt.split(":");
tevt=dojo.string.trim(_52a[0]);
_528=dojo.string.trim(_52a[1]);
}
if(!_528){
_528=tevt;
}
if(dojo.lang.isFunction(_525[tevt])){
dojo.event.kwConnect({srcObj:_525,srcFunc:tevt,targetObj:this,targetFunc:_528});
}else{
alert(tevt+" is not a function in widget "+_525);
}
}
}
if(_525.extraArgs["dojoattachpoint"]){
this[_525.extraArgs["dojoattachpoint"]]=_525;
}
}
}
if(this.isContainer&&!frag["dojoDontFollow"]){
dojo.widget.getParser().createSubComponents(frag,this);
}
},buildRendering:function(args,frag){
var ts=dojo.widget._templateCache[this.widgetType];
if(args["templatecsspath"]){
args["templateCssPath"]=args["templatecsspath"];
}
var _52e=args["templateCssPath"]||this.templateCssPath;
if(_52e&&!dojo.widget._cssFiles[_52e.toString()]){
if((!this.templateCssString)&&(_52e)){
this.templateCssString=dojo.hostenv.getText(_52e);
this.templateCssPath=null;
}
dojo.widget._cssFiles[_52e.toString()]=true;
}
if((this["templateCssString"])&&(!dojo.widget._cssStrings[this.templateCssString])){
dojo.html.insertCssText(this.templateCssString,null,_52e);
dojo.widget._cssStrings[this.templateCssString]=true;
}
if((!this.preventClobber)&&((this.templatePath)||(this.templateNode)||((this["templateString"])&&(this.templateString.length))||((typeof ts!="undefined")&&((ts["string"])||(ts["node"]))))){
this.buildFromTemplate(args,frag);
}else{
this.domNode=this.getFragNodeRef(frag);
}
this.fillInTemplate(args,frag);
},buildFromTemplate:function(args,frag){
var _531=false;
if(args["templatepath"]){
args["templatePath"]=args["templatepath"];
}
dojo.widget.fillFromTemplateCache(this,args["templatePath"],null,_531);
var ts=dojo.widget._templateCache[this.templatePath?this.templatePath.toString():this.widgetType];
if((ts)&&(!_531)){
if(!this.templateString.length){
this.templateString=ts["string"];
}
if(!this.templateNode){
this.templateNode=ts["node"];
}
}
var _533=false;
var node=null;
var tstr=this.templateString;
if((!this.templateNode)&&(this.templateString)){
_533=this.templateString.match(/\$\{([^\}]+)\}/g);
if(_533){
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<_533.length;i++){
var key=_533[i];
key=key.substring(2,key.length-1);
var kval=(key.substring(0,5)=="this.")?dojo.getObject(key.substring(5),false,this):hash[key];
var _53a;
if((kval)||(dojo.lang.isString(kval))){
_53a=new String((dojo.lang.isFunction(kval))?kval.call(this,key,this.templateString):kval);
while(_53a.indexOf("\"")>-1){
_53a=_53a.replace("\"","&quot;");
}
tstr=tstr.replace(_533[i],_53a);
}
}
}else{
this.templateNode=this.createNodesFromText(this.templateString,true)[0];
if(!_531){
ts.node=this.templateNode;
}
}
}
if((!this.templateNode)&&(!_533)){
dojo.debug("DomWidget.buildFromTemplate: could not create template");
return false;
}else{
if(!_533){
node=this.templateNode.cloneNode(true);
if(!node){
return false;
}
}else{
node=this.createNodesFromText(tstr,true)[0];
}
}
this.domNode=node;
this.attachTemplateNodes();
if(this.isContainer&&this.containerNode){
var src=this.getFragNodeRef(frag);
if(src){
dojo.dom.moveChildren(src,this.containerNode);
}
}
},attachTemplateNodes:function(_53c,_53d){
if(!_53c){
_53c=this.domNode;
}
if(!_53d){
_53d=this;
}
return dojo.widget.attachTemplateNodes(_53c,_53d,dojo.widget.getDojoEventsFromStr(this.templateString));
},fillInTemplate:function(){
},destroyRendering:function(){
try{
dojo.dom.destroyNode(this.domNode);
delete this.domNode;
}
catch(e){
}
if(this._sourceNodeRef){
try{
dojo.dom.destroyNode(this._sourceNodeRef);
}
catch(e){
}
}
},createNodesFromText:function(){
dojo.unimplemented("dojo.widget.DomWidget.createNodesFromText");
}});
dojo.provide("dojo.html.display");
dojo.html._toggle=function(node,_53f,_540){
node=dojo.byId(node);
_540(node,!_53f(node));
return _53f(node);
};
dojo.html.show=function(node){
node=dojo.byId(node);
if(dojo.html.getStyleProperty(node,"display")=="none"){
var _542=dojo.html.getAttribute("djDisplayCache");
dojo.html.setStyle(node,"display",(_542||""));
node.removeAttribute("djDisplayCache");
}
};
dojo.html.hide=function(node){
node=dojo.byId(node);
var _544=dojo.html.getAttribute("djDisplayCache");
if(_544==null){
var d=dojo.html.getStyleProperty(node,"display");
if(d!="none"){
node.setAttribute("djDisplayCache",d);
}
}
dojo.html.setStyle(node,"display","none");
};
dojo.html.setShowing=function(node,_547){
dojo.html[(_547?"show":"hide")](node);
};
dojo.html.isShowing=function(node){
return (dojo.html.getStyleProperty(node,"display")!="none");
};
dojo.html.toggleShowing=function(node){
return dojo.html._toggle(node,dojo.html.isShowing,dojo.html.setShowing);
};
dojo.html.displayMap={tr:"",td:"",th:"",img:"inline",span:"inline",input:"inline",button:"inline"};
dojo.html.suggestDisplayByTagName=function(node){
node=dojo.byId(node);
if(node&&node.tagName){
var tag=node.tagName.toLowerCase();
return (tag in dojo.html.displayMap?dojo.html.displayMap[tag]:"block");
}
};
dojo.html.setDisplay=function(node,_54d){
dojo.html.setStyle(node,"display",((_54d instanceof String||typeof _54d=="string")?_54d:(_54d?dojo.html.suggestDisplayByTagName(node):"none")));
};
dojo.html.isDisplayed=function(node){
return (dojo.html.getComputedStyle(node,"display")!="none");
};
dojo.html.toggleDisplay=function(node){
return dojo.html._toggle(node,dojo.html.isDisplayed,dojo.html.setDisplay);
};
dojo.html.setVisibility=function(node,_551){
dojo.html.setStyle(node,"visibility",((_551 instanceof String||typeof _551=="string")?_551:(_551?"visible":"hidden")));
};
dojo.html.isVisible=function(node){
return (dojo.html.getComputedStyle(node,"visibility")!="hidden");
};
dojo.html.toggleVisibility=function(node){
return dojo.html._toggle(node,dojo.html.isVisible,dojo.html.setVisibility);
};
dojo.html.setOpacity=function(node,_555,_556){
node=dojo.byId(node);
var h=dojo.render.html;
if(!_556){
if(_555>=1){
if(h.ie){
dojo.html.clearOpacity(node);
return;
}else{
_555=0.999999;
}
}else{
if(_555<0){
_555=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="+_555*100+")";
}
}
node.style.filter="Alpha(Opacity="+_555*100+")";
}else{
if(h.moz){
node.style.opacity=_555;
node.style.MozOpacity=_555;
}else{
if(h.safari){
node.style.opacity=_555;
node.style.KhtmlOpacity=_555;
}else{
node.style.opacity=_555;
}
}
}
};
dojo.html.clearOpacity=function(node){
node=dojo.byId(node);
var ns=node.style;
var h=dojo.render.html;
if(h.ie){
try{
if(node.filters&&node.filters.alpha){
ns.filter="";
}
}
catch(e){
}
}else{
if(h.moz){
ns.opacity=1;
ns.MozOpacity=1;
}else{
if(h.safari){
ns.opacity=1;
ns.KhtmlOpacity=1;
}else{
ns.opacity=1;
}
}
}
};
dojo.html.getOpacity=function(node){
node=dojo.byId(node);
var h=dojo.render.html;
if(h.ie){
var opac=(node.filters&&node.filters.alpha&&typeof node.filters.alpha.opacity=="number"?node.filters.alpha.opacity:100)/100;
}else{
var opac=node.style.opacity||node.style.MozOpacity||node.style.KhtmlOpacity||1;
}
return opac>=0.999999?1:Number(opac);
};
dojo.provide("dojo.html.layout");
dojo.html.sumAncestorProperties=function(node,prop){
node=dojo.byId(node);
if(!node){
return 0;
}
var _562=0;
while(node){
if(dojo.html.getComputedStyle(node,"position")=="fixed"){
return 0;
}
var val=node[prop];
if(val){
_562+=val-0;
if(node==dojo.body()){
break;
}
}
node=node.parentNode;
}
return _562;
};
dojo.html.setStyleAttributes=function(node,_565){
node=dojo.byId(node);
var _566=_565.replace(/(;)?\s*$/,"").split(";");
for(var i=0;i<_566.length;i++){
var _568=_566[i].split(":");
var name=_568[0].replace(/\s*$/,"").replace(/^\s*/,"").toLowerCase();
var _56a=_568[1].replace(/\s*$/,"").replace(/^\s*/,"");
switch(name){
case "opacity":
dojo.html.setOpacity(node,_56a);
break;
case "content-height":
dojo.html.setContentBox(node,{height:_56a});
break;
case "content-width":
dojo.html.setContentBox(node,{width:_56a});
break;
case "outer-height":
dojo.html.setMarginBox(node,{height:_56a});
break;
case "outer-width":
dojo.html.setMarginBox(node,{width:_56a});
break;
default:
node.style[dojo.html.toCamelCase(name)]=_56a;
}
}
};
dojo.html.boxSizing={MARGIN_BOX:"margin-box",BORDER_BOX:"border-box",PADDING_BOX:"padding-box",CONTENT_BOX:"content-box"};
dojo.html.getAbsolutePosition=dojo.html.abs=function(node,_56c,_56d){
node=dojo.byId(node);
var _56e=dojo.doc();
var ret={x:0,y:0};
var bs=dojo.html.boxSizing;
if(!_56d){
_56d=bs.CONTENT_BOX;
}
var _571=2;
var _572;
switch(_56d){
case bs.MARGIN_BOX:
_572=3;
break;
case bs.BORDER_BOX:
_572=2;
break;
case bs.PADDING_BOX:
default:
_572=1;
break;
case bs.CONTENT_BOX:
_572=0;
break;
}
var h=dojo.render.html;
var db=_56e["body"]||_56e["documentElement"];
if(h.ie){
with(node.getBoundingClientRect()){
ret.x=left-2;
ret.y=top-2;
}
}else{
if(_56e["getBoxObjectFor"]){
_571=1;
try{
var bo=_56e.getBoxObjectFor(node);
ret.x=bo.x-dojo.html.sumAncestorProperties(node,"scrollLeft");
ret.y=bo.y-dojo.html.sumAncestorProperties(node,"scrollTop");
}
catch(e){
}
}else{
if(node["offsetParent"]){
var _576;
if((h.safari)&&(node.style.getPropertyValue("position")=="absolute")&&(node.parentNode==db)){
_576=db;
}else{
_576=db.parentNode;
}
if(node.parentNode!=db){
var nd=node;
if(dojo.render.html.opera){
nd=db;
}
ret.x-=dojo.html.sumAncestorProperties(nd,"scrollLeft");
ret.y-=dojo.html.sumAncestorProperties(nd,"scrollTop");
}
var _578=node;
do{
var n=_578["offsetLeft"];
if(!h.opera||n>0){
ret.x+=isNaN(n)?0:n;
}
var m=_578["offsetTop"];
ret.y+=isNaN(m)?0:m;
_578=_578.offsetParent;
}while((_578!=_576)&&(_578!=null));
}else{
if(node["x"]&&node["y"]){
ret.x+=isNaN(node.x)?0:node.x;
ret.y+=isNaN(node.y)?0:node.y;
}
}
}
}
if(_56c){
var _57b=dojo.html.getScroll();
ret.y+=_57b.top;
ret.x+=_57b.left;
}
var _57c=[dojo.html.getPaddingExtent,dojo.html.getBorderExtent,dojo.html.getMarginExtent];
if(_571>_572){
for(var i=_572;i<_571;++i){
ret.y+=_57c[i](node,"top");
ret.x+=_57c[i](node,"left");
}
}else{
if(_571<_572){
for(var i=_572;i>_571;--i){
ret.y-=_57c[i-1](node,"top");
ret.x-=_57c[i-1](node,"left");
}
}
}
ret.top=ret.y;
ret.left=ret.x;
return ret;
};
dojo.html.isPositionAbsolute=function(node){
return (dojo.html.getComputedStyle(node,"position")=="absolute");
};
dojo.html._getComponentPixelValues=function(node,_580,_581,_582){
var _583=["top","bottom","left","right"];
var obj={};
for(var i in _583){
side=_583[i];
obj[side]=_581(node,_580+side,_582);
}
obj.width=obj.left+obj.right;
obj.height=obj.top+obj.bottom;
return obj;
};
dojo.html.getMargin=function(node){
return dojo.html._getComponentPixelValues(node,"margin-",dojo.html.getPixelValue,dojo.html.isPositionAbsolute(node));
};
dojo.html.getBorder=function(node){
return dojo.html._getComponentPixelValues(node,"",dojo.html.getBorderExtent);
};
dojo.html.getBorderExtent=function(node,side){
return (dojo.html.getStyle(node,"border-"+side+"-style")=="none"?0:dojo.html.getPixelValue(node,"border-"+side+"-width"));
};
dojo.html.getMarginExtent=function(node,side){
return dojo.html.getPixelValue(node,"margin-"+side,dojo.html.isPositionAbsolute(node));
};
dojo.html.getPaddingExtent=function(node,side){
return dojo.html.getPixelValue(node,"padding-"+side,true);
};
dojo.html.getPadding=function(node){
return dojo.html._getComponentPixelValues(node,"padding-",dojo.html.getPixelValue,true);
};
dojo.html.getPadBorder=function(node){
var pad=dojo.html.getPadding(node);
var _591=dojo.html.getBorder(node);
return {width:pad.width+_591.width,height:pad.height+_591.height};
};
dojo.html.getBoxSizing=function(node){
var h=dojo.render.html;
var bs=dojo.html.boxSizing;
if(((h.ie)||(h.opera))&&node.nodeName.toLowerCase()!="img"){
var cm=document["compatMode"];
if((cm=="BackCompat")||(cm=="QuirksMode")){
return bs.BORDER_BOX;
}else{
return bs.CONTENT_BOX;
}
}else{
if(arguments.length==0){
node=document.documentElement;
}
var _596;
if(!h.ie){
_596=dojo.html.getStyle(node,"-moz-box-sizing");
if(!_596){
_596=dojo.html.getStyle(node,"box-sizing");
}
}
return (_596?_596:bs.CONTENT_BOX);
}
};
dojo.html.isBorderBox=function(node){
return (dojo.html.getBoxSizing(node)==dojo.html.boxSizing.BORDER_BOX);
};
dojo.html.getBorderBox=function(node){
node=dojo.byId(node);
return {width:node.offsetWidth,height:node.offsetHeight};
};
dojo.html.getPaddingBox=function(node){
var box=dojo.html.getBorderBox(node);
var _59b=dojo.html.getBorder(node);
return {width:box.width-_59b.width,height:box.height-_59b.height};
};
dojo.html.getContentBox=function(node){
node=dojo.byId(node);
var _59d=dojo.html.getPadBorder(node);
return {width:node.offsetWidth-_59d.width,height:node.offsetHeight-_59d.height};
};
dojo.html.setContentBox=function(node,args){
node=dojo.byId(node);
var _5a0=0;
var _5a1=0;
var isbb=dojo.html.isBorderBox(node);
var _5a3=(isbb?dojo.html.getPadBorder(node):{width:0,height:0});
var ret={};
if(typeof args.width!="undefined"){
_5a0=args.width+_5a3.width;
ret.width=dojo.html.setPositivePixelValue(node,"width",_5a0);
}
if(typeof args.height!="undefined"){
_5a1=args.height+_5a3.height;
ret.height=dojo.html.setPositivePixelValue(node,"height",_5a1);
}
return ret;
};
dojo.html.getMarginBox=function(node){
var _5a6=dojo.html.getBorderBox(node);
var _5a7=dojo.html.getMargin(node);
return {width:_5a6.width+_5a7.width,height:_5a6.height+_5a7.height};
};
dojo.html.setMarginBox=function(node,args){
node=dojo.byId(node);
var _5aa=0;
var _5ab=0;
var isbb=dojo.html.isBorderBox(node);
var _5ad=(!isbb?dojo.html.getPadBorder(node):{width:0,height:0});
var _5ae=dojo.html.getMargin(node);
var ret={};
if(typeof args.width!="undefined"){
_5aa=args.width-_5ad.width;
_5aa-=_5ae.width;
ret.width=dojo.html.setPositivePixelValue(node,"width",_5aa);
}
if(typeof args.height!="undefined"){
_5ab=args.height-_5ad.height;
_5ab-=_5ae.height;
ret.height=dojo.html.setPositivePixelValue(node,"height",_5ab);
}
return ret;
};
dojo.html.getElementBox=function(node,type){
var bs=dojo.html.boxSizing;
switch(type){
case bs.MARGIN_BOX:
return dojo.html.getMarginBox(node);
case bs.BORDER_BOX:
return dojo.html.getBorderBox(node);
case bs.PADDING_BOX:
return dojo.html.getPaddingBox(node);
case bs.CONTENT_BOX:
default:
return dojo.html.getContentBox(node);
}
};
dojo.html.toCoordinateObject=dojo.html.toCoordinateArray=function(_5b3,_5b4,_5b5){
if(!_5b3.nodeType&&!(_5b3 instanceof String||typeof _5b3=="string")&&("width" in _5b3||"height" in _5b3||"left" in _5b3||"x" in _5b3||"top" in _5b3||"y" in _5b3)){
var ret={left:_5b3.left||_5b3.x||0,top:_5b3.top||_5b3.y||0,width:_5b3.width||0,height:_5b3.height||0};
}else{
var node=dojo.byId(_5b3);
var pos=dojo.html.abs(node,_5b4,_5b5);
var _5b9=dojo.html.getMarginBox(node);
var ret={left:pos.left,top:pos.top,width:_5b9.width,height:_5b9.height};
}
ret.x=ret.left;
ret.y=ret.top;
return ret;
};
dojo.html.setMarginBoxWidth=dojo.html.setOuterWidth=function(node,_5bb){
return dojo.html._callDeprecated("setMarginBoxWidth","setMarginBox",arguments,"width");
};
dojo.html.setMarginBoxHeight=dojo.html.setOuterHeight=function(){
return dojo.html._callDeprecated("setMarginBoxHeight","setMarginBox",arguments,"height");
};
dojo.html.getMarginBoxWidth=dojo.html.getOuterWidth=function(){
return dojo.html._callDeprecated("getMarginBoxWidth","getMarginBox",arguments,null,"width");
};
dojo.html.getMarginBoxHeight=dojo.html.getOuterHeight=function(){
return dojo.html._callDeprecated("getMarginBoxHeight","getMarginBox",arguments,null,"height");
};
dojo.html.getTotalOffset=function(node,type,_5be){
return dojo.html._callDeprecated("getTotalOffset","getAbsolutePosition",arguments,null,type);
};
dojo.html.getAbsoluteX=function(node,_5c0){
return dojo.html._callDeprecated("getAbsoluteX","getAbsolutePosition",arguments,null,"x");
};
dojo.html.getAbsoluteY=function(node,_5c2){
return dojo.html._callDeprecated("getAbsoluteY","getAbsolutePosition",arguments,null,"y");
};
dojo.html.totalOffsetLeft=function(node,_5c4){
return dojo.html._callDeprecated("totalOffsetLeft","getAbsolutePosition",arguments,null,"left");
};
dojo.html.totalOffsetTop=function(node,_5c6){
return dojo.html._callDeprecated("totalOffsetTop","getAbsolutePosition",arguments,null,"top");
};
dojo.html.getMarginWidth=function(node){
return dojo.html._callDeprecated("getMarginWidth","getMargin",arguments,null,"width");
};
dojo.html.getMarginHeight=function(node){
return dojo.html._callDeprecated("getMarginHeight","getMargin",arguments,null,"height");
};
dojo.html.getBorderWidth=function(node){
return dojo.html._callDeprecated("getBorderWidth","getBorder",arguments,null,"width");
};
dojo.html.getBorderHeight=function(node){
return dojo.html._callDeprecated("getBorderHeight","getBorder",arguments,null,"height");
};
dojo.html.getPaddingWidth=function(node){
return dojo.html._callDeprecated("getPaddingWidth","getPadding",arguments,null,"width");
};
dojo.html.getPaddingHeight=function(node){
return dojo.html._callDeprecated("getPaddingHeight","getPadding",arguments,null,"height");
};
dojo.html.getPadBorderWidth=function(node){
return dojo.html._callDeprecated("getPadBorderWidth","getPadBorder",arguments,null,"width");
};
dojo.html.getPadBorderHeight=function(node){
return dojo.html._callDeprecated("getPadBorderHeight","getPadBorder",arguments,null,"height");
};
dojo.html.getBorderBoxWidth=dojo.html.getInnerWidth=function(){
return dojo.html._callDeprecated("getBorderBoxWidth","getBorderBox",arguments,null,"width");
};
dojo.html.getBorderBoxHeight=dojo.html.getInnerHeight=function(){
return dojo.html._callDeprecated("getBorderBoxHeight","getBorderBox",arguments,null,"height");
};
dojo.html.getContentBoxWidth=dojo.html.getContentWidth=function(){
return dojo.html._callDeprecated("getContentBoxWidth","getContentBox",arguments,null,"width");
};
dojo.html.getContentBoxHeight=dojo.html.getContentHeight=function(){
return dojo.html._callDeprecated("getContentBoxHeight","getContentBox",arguments,null,"height");
};
dojo.html.setContentBoxWidth=dojo.html.setContentWidth=function(node,_5d0){
return dojo.html._callDeprecated("setContentBoxWidth","setContentBox",arguments,"width");
};
dojo.html.setContentBoxHeight=dojo.html.setContentHeight=function(node,_5d2){
return dojo.html._callDeprecated("setContentBoxHeight","setContentBox",arguments,"height");
};
dojo.provide("dojo.html.util");
dojo.html.getElementWindow=function(_5d3){
return dojo.html.getDocumentWindow(_5d3.ownerDocument);
};
dojo.html.getDocumentWindow=function(doc){
if(dojo.render.html.safari&&!doc._parentWindow){
var fix=function(win){
win.document._parentWindow=win;
for(var i=0;i<win.frames.length;i++){
fix(win.frames[i]);
}
};
fix(window.top);
}
if(dojo.render.html.ie&&window!==document.parentWindow&&!doc._parentWindow){
doc.parentWindow.execScript("document._parentWindow = window;","Javascript");
var win=doc._parentWindow;
doc._parentWindow=null;
return win;
}
return doc._parentWindow||doc.parentWindow||doc.defaultView;
};
dojo.html.getAbsolutePositionExt=function(node,_5da,_5db,_5dc){
var _5dd=dojo.html.getElementWindow(node);
var ret=dojo.withGlobal(_5dd,"getAbsolutePosition",dojo.html,arguments);
var win=dojo.html.getElementWindow(node);
if(_5dc!=win&&win.frameElement){
var ext=dojo.html.getAbsolutePositionExt(win.frameElement,_5da,_5db,_5dc);
ret.x+=ext.x;
ret.y+=ext.y;
}
ret.top=ret.y;
ret.left=ret.x;
return ret;
};
dojo.html.gravity=function(node,e){
node=dojo.byId(node);
var _5e3=dojo.html.getCursorPosition(e);
with(dojo.html){
var _5e4=getAbsolutePosition(node,true);
var bb=getBorderBox(node);
var _5e6=_5e4.x+(bb.width/2);
var _5e7=_5e4.y+(bb.height/2);
}
with(dojo.html.gravity){
return ((_5e3.x<_5e6?WEST:EAST)|(_5e3.y<_5e7?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(_5e8,e){
_5e8=dojo.byId(_5e8);
var _5ea=dojo.html.getCursorPosition(e);
var bb=dojo.html.getBorderBox(_5e8);
var _5ec=dojo.html.getAbsolutePosition(_5e8,true,dojo.html.boxSizing.BORDER_BOX);
var top=_5ec.y;
var _5ee=top+bb.height;
var left=_5ec.x;
var _5f0=left+bb.width;
return (_5ea.x>=left&&_5ea.x<=_5f0&&_5ea.y>=top&&_5ea.y<=_5ee);
};
dojo.html.renderedTextContent=function(node){
node=dojo.byId(node);
var _5f2="";
if(node==null){
return _5f2;
}
for(var i=0;i<node.childNodes.length;i++){
switch(node.childNodes[i].nodeType){
case 1:
case 5:
var _5f4="unknown";
try{
_5f4=dojo.html.getStyle(node.childNodes[i],"display");
}
catch(E){
}
switch(_5f4){
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":
_5f2+="\n";
_5f2+=dojo.html.renderedTextContent(node.childNodes[i]);
_5f2+="\n";
break;
case "none":
break;
default:
if(node.childNodes[i].tagName&&node.childNodes[i].tagName.toLowerCase()=="br"){
_5f2+="\n";
}else{
_5f2+=dojo.html.renderedTextContent(node.childNodes[i]);
}
break;
}
break;
case 3:
case 2:
case 4:
var text=node.childNodes[i].nodeValue;
var _5f6="unknown";
try{
_5f6=dojo.html.getStyle(node,"text-transform");
}
catch(E){
}
switch(_5f6){
case "capitalize":
var _5f7=text.split(" ");
for(var i=0;i<_5f7.length;i++){
_5f7[i]=_5f7[i].charAt(0).toUpperCase()+_5f7[i].substring(1);
}
text=_5f7.join(" ");
break;
case "uppercase":
text=text.toUpperCase();
break;
case "lowercase":
text=text.toLowerCase();
break;
default:
break;
}
switch(_5f6){
case "nowrap":
break;
case "pre-wrap":
break;
case "pre-line":
break;
case "pre":
break;
default:
text=text.replace(/\s+/," ");
if(/\s$/.test(_5f2)){
text.replace(/^\s/,"");
}
break;
}
_5f2+=text;
break;
default:
break;
}
}
return _5f2;
};
dojo.html.createNodesFromText=function(txt,trim){
if(trim){
txt=txt.replace(/^\s+|\s+$/g,"");
}
var tn=dojo.doc().createElement("div");
tn.style.visibility="hidden";
dojo.body().appendChild(tn);
var _5fb="none";
if((/^<t[dh][\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table><tbody><tr>"+txt+"</tr></tbody></table>";
_5fb="cell";
}else{
if((/^<tr[\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table><tbody>"+txt+"</tbody></table>";
_5fb="row";
}else{
if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(txt.replace(/^\s+/))){
txt="<table>"+txt+"</table>";
_5fb="section";
}
}
}
tn.innerHTML=txt;
if(tn["normalize"]){
tn.normalize();
}
var _5fc=null;
switch(_5fb){
case "cell":
_5fc=tn.getElementsByTagName("tr")[0];
break;
case "row":
_5fc=tn.getElementsByTagName("tbody")[0];
break;
case "section":
_5fc=tn.getElementsByTagName("table")[0];
break;
default:
_5fc=tn;
break;
}
var _5fd=[];
for(var x=0;x<_5fc.childNodes.length;x++){
_5fd.push(_5fc.childNodes[x].cloneNode(true));
}
tn.style.display="none";
dojo.html.destroyNode(tn);
return _5fd;
};
dojo.html.placeOnScreen=function(node,_600,_601,_602,_603,_604,_605){
if(_600 instanceof Array||typeof _600=="array"){
_605=_604;
_604=_603;
_603=_602;
_602=_601;
_601=_600[1];
_600=_600[0];
}
if(_604 instanceof String||typeof _604=="string"){
_604=_604.split(",");
}
if(!isNaN(_602)){
_602=[Number(_602),Number(_602)];
}else{
if(!(_602 instanceof Array||typeof _602=="array")){
_602=[0,0];
}
}
var _606=dojo.html.getScroll().offset;
var view=dojo.html.getViewport();
node=dojo.byId(node);
var _608=node.style.display;
node.style.display="";
var bb=dojo.html.getBorderBox(node);
var w=bb.width;
var h=bb.height;
node.style.display=_608;
if(!(_604 instanceof Array||typeof _604=="array")){
_604=["TL"];
}
var _60c,_60d,_60e=Infinity,_60f;
for(var _610=0;_610<_604.length;++_610){
var _611=_604[_610];
var _612=true;
var tryX=_600-(_611.charAt(1)=="L"?0:w)+_602[0]*(_611.charAt(1)=="L"?1:-1);
var tryY=_601-(_611.charAt(0)=="T"?0:h)+_602[1]*(_611.charAt(0)=="T"?1:-1);
if(_603){
tryX-=_606.x;
tryY-=_606.y;
}
if(tryX<0){
tryX=0;
_612=false;
}
if(tryY<0){
tryY=0;
_612=false;
}
var x=tryX+w;
if(x>view.width){
x=view.width-w;
_612=false;
}else{
x=tryX;
}
x=Math.max(_602[0],x)+_606.x;
var y=tryY+h;
if(y>view.height){
y=view.height-h;
_612=false;
}else{
y=tryY;
}
y=Math.max(_602[1],y)+_606.y;
if(_612){
_60c=x;
_60d=y;
_60e=0;
_60f=_611;
break;
}else{
var dist=Math.pow(x-tryX-_606.x,2)+Math.pow(y-tryY-_606.y,2);
if(_60e>dist){
_60e=dist;
_60c=x;
_60d=y;
_60f=_611;
}
}
}
if(!_605){
node.style.left=_60c+"px";
node.style.top=_60d+"px";
}
return {left:_60c,top:_60d,x:_60c,y:_60d,dist:_60e,corner:_60f};
};
dojo.html.placeOnScreenAroundElement=function(node,_619,_61a,_61b,_61c,_61d){
var best,_61f=Infinity;
_619=dojo.byId(_619);
var _620=_619.style.display;
_619.style.display="";
var mb=dojo.html.getElementBox(_619,_61b);
var _622=mb.width;
var _623=mb.height;
var _624=dojo.html.getAbsolutePosition(_619,true,_61b);
_619.style.display=_620;
for(var _625 in _61c){
var pos,_627,_628;
var _629=_61c[_625];
_627=_624.x+(_625.charAt(1)=="L"?0:_622);
_628=_624.y+(_625.charAt(0)=="T"?0:_623);
pos=dojo.html.placeOnScreen(node,_627,_628,_61a,true,_629,true);
if(pos.dist==0){
best=pos;
break;
}else{
if(_61f>pos.dist){
_61f=pos.dist;
best=pos;
}
}
}
if(!_61d){
node.style.left=best.left+"px";
node.style.top=best.top+"px";
}
return best;
};
dojo.html.scrollIntoView=function(node){
if(!node){
return;
}
if(dojo.render.html.ie){
if(dojo.html.getBorderBox(node.parentNode).height<=node.parentNode.scrollHeight){
node.scrollIntoView(false);
}
}else{
if(dojo.render.html.mozilla){
node.scrollIntoView(false);
}else{
var _62b=node.parentNode;
var _62c=_62b.scrollTop+dojo.html.getBorderBox(_62b).height;
var _62d=node.offsetTop+dojo.html.getMarginBox(node).height;
if(_62c<_62d){
_62b.scrollTop+=(_62d-_62c);
}else{
if(_62b.scrollTop>node.offsetTop){
_62b.scrollTop-=(_62b.scrollTop-node.offsetTop);
}
}
}
}
};
dojo.html.isLeftToRight=function(node){
for(;node;node=node.parentNode){
if(node.dir){
return node.dir=="ltr";
}
}
return true;
};
dojo.provide("dojo.gfx.color");
dojo.gfx.color.Color=function(r,g,b,a){
if(dojo.lang.isArray(r)){
this.r=r[0];
this.g=r[1];
this.b=r[2];
this.a=r[3]||1;
}else{
if(dojo.lang.isString(r)){
var rgb=dojo.gfx.color.extractRGB(r);
this.r=rgb[0];
this.g=rgb[1];
this.b=rgb[2];
this.a=g||1;
}else{
if(r instanceof dojo.gfx.color.Color){
this.r=r.r;
this.b=r.b;
this.g=r.g;
this.a=r.a;
}else{
this.r=r;
this.g=g;
this.b=b;
this.a=a;
}
}
}
};
dojo.gfx.color.Color.fromArray=function(arr){
return new dojo.gfx.color.Color(arr[0],arr[1],arr[2],arr[3]);
};
dojo.extend(dojo.gfx.color.Color,{toRgb:function(_635){
if(_635){
return this.toRgba();
}else{
return [this.r,this.g,this.b];
}
},toRgba:function(){
return [this.r,this.g,this.b,this.a];
},toHex:function(){
return dojo.gfx.color.rgb2hex(this.toRgb());
},toCss:function(){
return "rgb("+this.toRgb().join()+")";
},toString:function(){
return this.toHex();
},blend:function(_636,_637){
var rgb=null;
if(dojo.lang.isArray(_636)){
rgb=_636;
}else{
if(_636 instanceof dojo.gfx.color.Color){
rgb=_636.toRgb();
}else{
rgb=new dojo.gfx.color.Color(_636).toRgb();
}
}
return dojo.gfx.color.blend(this.toRgb(),rgb,_637);
}});
dojo.gfx.color.named={white:[255,255,255],black:[0,0,0],red:[255,0,0],green:[0,255,0],lime:[0,255,0],blue:[0,0,255],navy:[0,0,128],gray:[128,128,128],silver:[192,192,192]};
dojo.gfx.color.blend=function(a,b,_63b){
if(typeof a=="string"){
return dojo.gfx.color.blendHex(a,b,_63b);
}
if(!_63b){
_63b=0;
}
_63b=Math.min(Math.max(-1,_63b),1);
_63b=((_63b+1)/2);
var c=[];
for(var x=0;x<3;x++){
c[x]=parseInt(b[x]+((a[x]-b[x])*_63b));
}
return c;
};
dojo.gfx.color.blendHex=function(a,b,_640){
return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a),dojo.gfx.color.hex2rgb(b),_640));
};
dojo.gfx.color.extractRGB=function(_641){
_641=_641.toLowerCase();
if(_641.indexOf("rgb")==0){
var _642=_641.match(/rgba*\((\d+), *(\d+), *(\d+)/i);
var ret=_642.splice(1,3);
return ret;
}else{
var _644=dojo.gfx.color.hex2rgb(_641);
if(_644){
return _644;
}else{
return dojo.gfx.color.named[_641]||[255,255,255];
}
}
};
dojo.gfx.color.hex2rgb=function(hex){
var _646="0123456789ABCDEF";
var rgb=new Array(3);
if(hex.indexOf("#")==0){
hex=hex.substring(1);
}
hex=hex.toUpperCase();
if(hex.replace(new RegExp("["+_646+"]","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]=_646.indexOf(rgb[i].charAt(0))*16+_646.indexOf(rgb[i].charAt(1));
}
return rgb;
};
dojo.gfx.color.rgb2hex=function(r,g,b){
if(dojo.lang.isArray(r)){
g=r[1]||0;
b=r[2]||0;
r=r[0]||0;
}
var ret=dojo.lang.map([r,g,b],function(x){
x=new Number(x);
var s=x.toString(16);
while(s.length<2){
s="0"+s;
}
return s;
});
ret.unshift("#");
return ret.join("");
};
dojo.provide("dojo.lfx.Animation");
dojo.lfx.Line=function(_64f,end){
this.start=_64f;
this.end=end;
if(dojo.lang.isArray(_64f)){
var diff=[];
dojo.lang.forEach(this.start,function(s,i){
diff[i]=this.end[i]-s;
},this);
this.getValue=function(n){
var res=[];
dojo.lang.forEach(this.start,function(s,i){
res[i]=(diff[i]*n)+s;
},this);
return res;
};
}else{
var diff=end-_64f;
this.getValue=function(n){
return (diff*n)+this.start;
};
}
};
if((dojo.render.html.khtml)&&(!dojo.render.html.safari)){
dojo.lfx.easeDefault=function(n){
return (parseFloat("0.5")+((Math.sin((n+parseFloat("1.5"))*Math.PI))/2));
};
}else{
dojo.lfx.easeDefault=function(n){
return (0.5+((Math.sin((n+1.5)*Math.PI))/2));
};
}
dojo.lfx.easeIn=function(n){
return Math.pow(n,3);
};
dojo.lfx.easeOut=function(n){
return (1-Math.pow(1-n,3));
};
dojo.lfx.easeInOut=function(n){
return ((3*Math.pow(n,2))-(2*Math.pow(n,3)));
};
dojo.lfx.IAnimation=function(){
};
dojo.lang.extend(dojo.lfx.IAnimation,{curve:null,duration:1000,easing:null,repeatCount:0,rate:10,handler:null,beforeBegin:null,onBegin:null,onAnimate:null,onEnd:null,onPlay:null,onPause:null,onStop:null,play:null,pause:null,stop:null,connect:function(evt,_65f,_660){
if(!_660){
_660=_65f;
_65f=this;
}
_660=dojo.lang.hitch(_65f,_660);
var _661=this[evt]||function(){
};
this[evt]=function(){
var ret=_661.apply(this,arguments);
_660.apply(this,arguments);
return ret;
};
return this;
},fire:function(evt,args){
if(this[evt]){
this[evt].apply(this,(args||[]));
}
return this;
},repeat:function(_665){
this.repeatCount=_665;
return this;
},_active:false,_paused:false});
dojo.lfx.Animation=function(_666,_667,_668,_669,_66a,rate){
dojo.lfx.IAnimation.call(this);
if(dojo.lang.isNumber(_666)||(!_666&&_667.getValue)){
rate=_66a;
_66a=_669;
_669=_668;
_668=_667;
_667=_666;
_666=null;
}else{
if(_666.getValue||dojo.lang.isArray(_666)){
rate=_669;
_66a=_668;
_669=_667;
_668=_666;
_667=null;
_666=null;
}
}
if(dojo.lang.isArray(_668)){
this.curve=new dojo.lfx.Line(_668[0],_668[1]);
}else{
this.curve=_668;
}
if(_667!=null&&_667>0){
this.duration=_667;
}
if(_66a){
this.repeatCount=_66a;
}
if(rate){
this.rate=rate;
}
if(_666){
dojo.lang.forEach(["handler","beforeBegin","onBegin","onEnd","onPlay","onStop","onAnimate"],function(item){
if(_666[item]){
this.connect(item,_666[item]);
}
},this);
}
if(_669&&dojo.lang.isFunction(_669)){
this.easing=_669;
}
};
dojo.inherits(dojo.lfx.Animation,dojo.lfx.IAnimation);
dojo.lang.extend(dojo.lfx.Animation,{_startTime:null,_endTime:null,_timer:null,_percent:0,_startRepeatCount:0,play:function(_66d,_66e){
if(_66e){
clearTimeout(this._timer);
this._active=false;
this._paused=false;
this._percent=0;
}else{
if(this._active&&!this._paused){
return this;
}
}
this.fire("handler",["beforeBegin"]);
this.fire("beforeBegin");
if(_66d>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_66e);
}),_66d);
return this;
}
this._startTime=new Date().valueOf();
if(this._paused){
this._startTime-=(this.duration*this._percent/100);
}
this._endTime=this._startTime+this.duration;
this._active=true;
this._paused=false;
var step=this._percent/100;
var _670=this.curve.getValue(step);
if(this._percent==0){
if(!this._startRepeatCount){
this._startRepeatCount=this.repeatCount;
}
this.fire("handler",["begin",_670]);
this.fire("onBegin",[_670]);
}
this.fire("handler",["play",_670]);
this.fire("onPlay",[_670]);
this._cycle();
return this;
},pause:function(){
clearTimeout(this._timer);
if(!this._active){
return this;
}
this._paused=true;
var _671=this.curve.getValue(this._percent/100);
this.fire("handler",["pause",_671]);
this.fire("onPause",[_671]);
return this;
},gotoPercent:function(pct,_673){
clearTimeout(this._timer);
this._active=true;
this._paused=true;
this._percent=pct;
if(_673){
this.play();
}
return this;
},stop:function(_674){
clearTimeout(this._timer);
var step=this._percent/100;
if(_674){
step=1;
}
var _676=this.curve.getValue(step);
this.fire("handler",["stop",_676]);
this.fire("onStop",[_676]);
this._active=false;
this._paused=false;
return this;
},status:function(){
if(this._active){
return this._paused?"paused":"playing";
}else{
return "stopped";
}
return this;
},_cycle:function(){
clearTimeout(this._timer);
if(this._active){
var curr=new Date().valueOf();
var step=(curr-this._startTime)/(this._endTime-this._startTime);
if(step>=1){
step=1;
this._percent=100;
}else{
this._percent=step*100;
}
if((this.easing)&&(dojo.lang.isFunction(this.easing))){
step=this.easing(step);
}
var _679=this.curve.getValue(step);
this.fire("handler",["animate",_679]);
this.fire("onAnimate",[_679]);
if(step<1){
this._timer=setTimeout(dojo.lang.hitch(this,"_cycle"),this.rate);
}else{
this._active=false;
this.fire("handler",["end"]);
this.fire("onEnd");
if(this.repeatCount>0){
this.repeatCount--;
this.play(null,true);
}else{
if(this.repeatCount==-1){
this.play(null,true);
}else{
if(this._startRepeatCount){
this.repeatCount=this._startRepeatCount;
this._startRepeatCount=0;
}
}
}
}
}
return this;
}});
dojo.lfx.Combine=function(_67a){
dojo.lfx.IAnimation.call(this);
this._anims=[];
this._animsEnded=0;
var _67b=arguments;
if(_67b.length==1&&(dojo.lang.isArray(_67b[0])||dojo.lang.isArrayLike(_67b[0]))){
_67b=_67b[0];
}
dojo.lang.forEach(_67b,function(anim){
this._anims.push(anim);
anim.connect("onEnd",dojo.lang.hitch(this,"_onAnimsEnded"));
},this);
};
dojo.inherits(dojo.lfx.Combine,dojo.lfx.IAnimation);
dojo.lang.extend(dojo.lfx.Combine,{_animsEnded:0,play:function(_67d,_67e){
if(!this._anims.length){
return this;
}
this.fire("beforeBegin");
if(_67d>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_67e);
}),_67d);
return this;
}
if(_67e||this._anims[0].percent==0){
this.fire("onBegin");
}
this.fire("onPlay");
this._animsCall("play",null,_67e);
return this;
},pause:function(){
this.fire("onPause");
this._animsCall("pause");
return this;
},stop:function(_67f){
this.fire("onStop");
this._animsCall("stop",_67f);
return this;
},_onAnimsEnded:function(){
this._animsEnded++;
if(this._animsEnded>=this._anims.length){
this.fire("onEnd");
}
return this;
},_animsCall:function(_680){
var args=[];
if(arguments.length>1){
for(var i=1;i<arguments.length;i++){
args.push(arguments[i]);
}
}
var _683=this;
dojo.lang.forEach(this._anims,function(anim){
anim[_680](args);
},_683);
return this;
}});
dojo.lfx.Chain=function(_685){
dojo.lfx.IAnimation.call(this);
this._anims=[];
this._currAnim=-1;
var _686=arguments;
if(_686.length==1&&(dojo.lang.isArray(_686[0])||dojo.lang.isArrayLike(_686[0]))){
_686=_686[0];
}
var _687=this;
dojo.lang.forEach(_686,function(anim,i,_68a){
this._anims.push(anim);
if(i<_68a.length-1){
anim.connect("onEnd",dojo.lang.hitch(this,"_playNext"));
}else{
anim.connect("onEnd",dojo.lang.hitch(this,function(){
this.fire("onEnd");
}));
}
},this);
};
dojo.inherits(dojo.lfx.Chain,dojo.lfx.IAnimation);
dojo.lang.extend(dojo.lfx.Chain,{_currAnim:-1,play:function(_68b,_68c){
if(!this._anims.length){
return this;
}
if(_68c||!this._anims[this._currAnim]){
this._currAnim=0;
}
var _68d=this._anims[this._currAnim];
this.fire("beforeBegin");
if(_68b>0){
setTimeout(dojo.lang.hitch(this,function(){
this.play(null,_68c);
}),_68b);
return this;
}
if(_68d){
if(this._currAnim==0){
this.fire("handler",["begin",this._currAnim]);
this.fire("onBegin",[this._currAnim]);
}
this.fire("onPlay",[this._currAnim]);
_68d.play(null,_68c);
}
return this;
},pause:function(){
if(this._anims[this._currAnim]){
this._anims[this._currAnim].pause();
this.fire("onPause",[this._currAnim]);
}
return this;
},playPause:function(){
if(this._anims.length==0){
return this;
}
if(this._currAnim==-1){
this._currAnim=0;
}
var _68e=this._anims[this._currAnim];
if(_68e){
if(!_68e._active||_68e._paused){
this.play();
}else{
this.pause();
}
}
return this;
},stop:function(){
var _68f=this._anims[this._currAnim];
if(_68f){
_68f.stop();
this.fire("onStop",[this._currAnim]);
}
return _68f;
},_playNext:function(){
if(this._currAnim==-1||this._anims.length==0){
return this;
}
this._currAnim++;
if(this._anims[this._currAnim]){
this._anims[this._currAnim].play(null,true);
}
return this;
}});
dojo.lfx.combine=function(_690){
var _691=arguments;
if(dojo.lang.isArray(arguments[0])){
_691=arguments[0];
}
if(_691.length==1){
return _691[0];
}
return new dojo.lfx.Combine(_691);
};
dojo.lfx.chain=function(_692){
var _693=arguments;
if(dojo.lang.isArray(arguments[0])){
_693=arguments[0];
}
if(_693.length==1){
return _693[0];
}
return new dojo.lfx.Chain(_693);
};
dojo.provide("dojo.html.color");
dojo.html.getBackgroundColor=function(node){
node=dojo.byId(node);
var _695;
do{
_695=dojo.html.getStyle(node,"background-color");
if(_695.toLowerCase()=="rgba(0, 0, 0, 0)"){
_695="transparent";
}
if(node==document.getElementsByTagName("body")[0]){
node=null;
break;
}
node=node.parentNode;
}while(node&&dojo.lang.inArray(["transparent",""],_695));
if(_695=="transparent"){
_695=[255,255,255,0];
}else{
_695=dojo.gfx.color.extractRGB(_695);
}
return _695;
};
dojo.provide("dojo.lfx.html");
dojo.lfx.html._byId=function(_696){
if(!_696){
return [];
}
if(dojo.lang.isArrayLike(_696)){
if(!_696.alreadyChecked){
var n=[];
dojo.lang.forEach(_696,function(node){
n.push(dojo.byId(node));
});
n.alreadyChecked=true;
return n;
}else{
return _696;
}
}else{
var n=[];
n.push(dojo.byId(_696));
n.alreadyChecked=true;
return n;
}
};
dojo.lfx.html.propertyAnimation=function(_699,_69a,_69b,_69c,_69d){
_699=dojo.lfx.html._byId(_699);
var _69e={"propertyMap":_69a,"nodes":_699,"duration":_69b,"easing":_69c||dojo.lfx.easeDefault};
var _69f=function(args){
if(args.nodes.length==1){
var pm=args.propertyMap;
if(!dojo.lang.isArray(args.propertyMap)){
var parr=[];
for(var _6a3 in pm){
pm[_6a3].property=_6a3;
parr.push(pm[_6a3]);
}
pm=args.propertyMap=parr;
}
dojo.lang.forEach(pm,function(prop){
if(dj_undef("start",prop)){
if(prop.property!="opacity"){
prop.start=parseInt(dojo.html.getComputedStyle(args.nodes[0],prop.property));
}else{
prop.start=dojo.html.getOpacity(args.nodes[0]);
}
}
});
}
};
var _6a5=function(_6a6){
var _6a7=[];
dojo.lang.forEach(_6a6,function(c){
_6a7.push(Math.round(c));
});
return _6a7;
};
var _6a9=function(n,_6ab){
n=dojo.byId(n);
if(!n||!n.style){
return;
}
for(var s in _6ab){
try{
if(s=="opacity"){
dojo.html.setOpacity(n,_6ab[s]);
}else{
n.style[s]=_6ab[s];
}
}
catch(e){
dojo.debug(e);
}
}
};
var _6ad=function(_6ae){
this._properties=_6ae;
this.diffs=new Array(_6ae.length);
dojo.lang.forEach(_6ae,function(prop,i){
if(dojo.lang.isFunction(prop.start)){
prop.start=prop.start(prop,i);
}
if(dojo.lang.isFunction(prop.end)){
prop.end=prop.end(prop,i);
}
if(dojo.lang.isArray(prop.start)){
this.diffs[i]=null;
}else{
if(prop.start instanceof dojo.gfx.color.Color){
prop.startRgb=prop.start.toRgb();
prop.endRgb=prop.end.toRgb();
}else{
this.diffs[i]=prop.end-prop.start;
}
}
},this);
this.getValue=function(n){
var ret={};
dojo.lang.forEach(this._properties,function(prop,i){
var _6b5=null;
if(dojo.lang.isArray(prop.start)){
}else{
if(prop.start instanceof dojo.gfx.color.Color){
_6b5=(prop.units||"rgb")+"(";
for(var j=0;j<prop.startRgb.length;j++){
_6b5+=Math.round(((prop.endRgb[j]-prop.startRgb[j])*n)+prop.startRgb[j])+(j<prop.startRgb.length-1?",":"");
}
_6b5+=")";
}else{
_6b5=((this.diffs[i])*n)+prop.start+(prop.property!="opacity"?prop.units||"px":"");
}
}
ret[dojo.html.toCamelCase(prop.property)]=_6b5;
},this);
return ret;
};
};
var anim=new dojo.lfx.Animation({beforeBegin:function(){
_69f(_69e);
anim.curve=new _6ad(_69e.propertyMap);
},onAnimate:function(_6b8){
dojo.lang.forEach(_69e.nodes,function(node){
_6a9(node,_6b8);
});
}},_69e.duration,null,_69e.easing);
if(_69d){
for(var x in _69d){
if(dojo.lang.isFunction(_69d[x])){
anim.connect(x,anim,_69d[x]);
}
}
}
return anim;
};
dojo.lfx.html._makeFadeable=function(_6bb){
var _6bc=function(node){
if(dojo.render.html.ie){
if((node.style.zoom.length==0)&&(dojo.html.getStyle(node,"zoom")=="normal")){
node.style.zoom="1";
}
if((node.style.width.length==0)&&(dojo.html.getStyle(node,"width")=="auto")){
node.style.width="auto";
}
}
};
if(dojo.lang.isArrayLike(_6bb)){
dojo.lang.forEach(_6bb,_6bc);
}else{
_6bc(_6bb);
}
};
dojo.lfx.html.fade=function(_6be,_6bf,_6c0,_6c1,_6c2){
_6be=dojo.lfx.html._byId(_6be);
var _6c3={property:"opacity"};
if(!dj_undef("start",_6bf)){
_6c3.start=_6bf.start;
}else{
_6c3.start=function(){
return dojo.html.getOpacity(_6be[0]);
};
}
if(!dj_undef("end",_6bf)){
_6c3.end=_6bf.end;
}else{
dojo.raise("dojo.lfx.html.fade needs an end value");
}
var anim=dojo.lfx.propertyAnimation(_6be,[_6c3],_6c0,_6c1);
anim.connect("beforeBegin",function(){
dojo.lfx.html._makeFadeable(_6be);
});
if(_6c2){
anim.connect("onEnd",function(){
_6c2(_6be,anim);
});
}
return anim;
};
dojo.lfx.html.fadeIn=function(_6c5,_6c6,_6c7,_6c8){
return dojo.lfx.html.fade(_6c5,{end:1},_6c6,_6c7,_6c8);
};
dojo.lfx.html.fadeOut=function(_6c9,_6ca,_6cb,_6cc){
return dojo.lfx.html.fade(_6c9,{end:0},_6ca,_6cb,_6cc);
};
dojo.lfx.html.fadeShow=function(_6cd,_6ce,_6cf,_6d0){
_6cd=dojo.lfx.html._byId(_6cd);
dojo.lang.forEach(_6cd,function(node){
dojo.html.setOpacity(node,0);
});
var anim=dojo.lfx.html.fadeIn(_6cd,_6ce,_6cf,_6d0);
anim.connect("beforeBegin",function(){
if(dojo.lang.isArrayLike(_6cd)){
dojo.lang.forEach(_6cd,dojo.html.show);
}else{
dojo.html.show(_6cd);
}
});
return anim;
};
dojo.lfx.html.fadeHide=function(_6d3,_6d4,_6d5,_6d6){
var anim=dojo.lfx.html.fadeOut(_6d3,_6d4,_6d5,function(){
if(dojo.lang.isArrayLike(_6d3)){
dojo.lang.forEach(_6d3,dojo.html.hide);
}else{
dojo.html.hide(_6d3);
}
if(_6d6){
_6d6(_6d3,anim);
}
});
return anim;
};
dojo.lfx.html.wipeIn=function(_6d8,_6d9,_6da,_6db){
_6d8=dojo.lfx.html._byId(_6d8);
var _6dc=[];
dojo.lang.forEach(_6d8,function(node){
var _6de={};
with(node.style){
visibility="hidden";
display="";
}
var _6df=dojo.html.getBorderBox(node).height;
with(node.style){
visibility="";
display="none";
}
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:1,end:function(){
return _6df;
}}},_6d9,_6da);
anim.connect("beforeBegin",function(){
_6de.overflow=node.style.overflow;
_6de.height=node.style.height;
with(node.style){
overflow="hidden";
height="1px";
}
dojo.html.show(node);
});
anim.connect("onEnd",function(){
with(node.style){
overflow=_6de.overflow;
height=_6de.height;
}
if(_6db){
_6db(node,anim);
}
});
_6dc.push(anim);
});
return dojo.lfx.combine(_6dc);
};
dojo.lfx.html.wipeOut=function(_6e1,_6e2,_6e3,_6e4){
_6e1=dojo.lfx.html._byId(_6e1);
var _6e5=[];
dojo.lang.forEach(_6e1,function(node){
var _6e7={};
var anim=dojo.lfx.propertyAnimation(node,{"height":{start:function(){
return dojo.html.getContentBox(node).height;
},end:1}},_6e2,_6e3,{"beforeBegin":function(){
_6e7.overflow=node.style.overflow;
_6e7.height=node.style.height;
with(node.style){
overflow="hidden";
}
dojo.html.show(node);
},"onEnd":function(){
dojo.html.hide(node);
with(node.style){
overflow=_6e7.overflow;
height=_6e7.height;
}
if(_6e4){
_6e4(node,anim);
}
}});
_6e5.push(anim);
});
return dojo.lfx.combine(_6e5);
};
dojo.lfx.html.slideTo=function(_6e9,_6ea,_6eb,_6ec,_6ed){
_6e9=dojo.lfx.html._byId(_6e9);
var _6ee=[];
var _6ef=dojo.html.getComputedStyle;
dojo.lang.forEach(_6e9,function(node){
var top=null;
var left=null;
var init=(function(){
var _6f4=node;
return function(){
var pos=_6ef(_6f4,"position");
top=(pos=="absolute"?node.offsetTop:parseInt(_6ef(node,"top"))||0);
left=(pos=="absolute"?node.offsetLeft:parseInt(_6ef(node,"left"))||0);
if(!dojo.lang.inArray(["absolute","relative"],pos)){
var ret=dojo.html.abs(_6f4,true);
dojo.html.setStyleAttributes(_6f4,"position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;");
top=ret.y;
left=ret.x;
}
};
})();
init();
var anim=dojo.lfx.propertyAnimation(node,{"top":{start:top,end:(_6ea.top||0)},"left":{start:left,end:(_6ea.left||0)}},_6eb,_6ec,{"beforeBegin":init});
if(_6ed){
anim.connect("onEnd",function(){
_6ed(_6e9,anim);
});
}
_6ee.push(anim);
});
return dojo.lfx.combine(_6ee);
};
dojo.lfx.html.slideBy=function(_6f8,_6f9,_6fa,_6fb,_6fc){
_6f8=dojo.lfx.html._byId(_6f8);
var _6fd=[];
var _6fe=dojo.html.getComputedStyle;
dojo.lang.forEach(_6f8,function(node){
var top=null;
var left=null;
var init=(function(){
var _703=node;
return function(){
var pos=_6fe(_703,"position");
top=(pos=="absolute"?node.offsetTop:parseInt(_6fe(node,"top"))||0);
left=(pos=="absolute"?node.offsetLeft:parseInt(_6fe(node,"left"))||0);
if(!dojo.lang.inArray(["absolute","relative"],pos)){
var ret=dojo.html.abs(_703,true);
dojo.html.setStyleAttributes(_703,"position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;");
top=ret.y;
left=ret.x;
}
};
})();
init();
var anim=dojo.lfx.propertyAnimation(node,{"top":{start:top,end:top+(_6f9.top||0)},"left":{start:left,end:left+(_6f9.left||0)}},_6fa,_6fb).connect("beforeBegin",init);
if(_6fc){
anim.connect("onEnd",function(){
_6fc(_6f8,anim);
});
}
_6fd.push(anim);
});
return dojo.lfx.combine(_6fd);
};
dojo.lfx.html.explode=function(_707,_708,_709,_70a,_70b){
var h=dojo.html;
_707=dojo.byId(_707);
_708=dojo.byId(_708);
var _70d=h.toCoordinateObject(_707,true);
var _70e=document.createElement("div");
h.copyStyle(_70e,_708);
if(_708.explodeClassName){
_70e.className=_708.explodeClassName;
}
with(_70e.style){
position="absolute";
display="none";
var _70f=h.getStyle(_707,"background-color");
backgroundColor=_70f?_70f.toLowerCase():"transparent";
backgroundColor=(backgroundColor=="transparent")?"rgb(221, 221, 221)":backgroundColor;
}
dojo.body().appendChild(_70e);
with(_708.style){
visibility="hidden";
display="block";
}
var _710=h.toCoordinateObject(_708,true);
with(_708.style){
display="none";
visibility="visible";
}
var _711={opacity:{start:0.5,end:1}};
dojo.lang.forEach(["height","width","top","left"],function(type){
_711[type]={start:_70d[type],end:_710[type]};
});
var anim=new dojo.lfx.propertyAnimation(_70e,_711,_709,_70a,{"beforeBegin":function(){
h.setDisplay(_70e,"block");
},"onEnd":function(){
h.setDisplay(_708,"block");
_70e.parentNode.removeChild(_70e);
}});
if(_70b){
anim.connect("onEnd",function(){
_70b(_708,anim);
});
}
return anim;
};
dojo.lfx.html.implode=function(_714,end,_716,_717,_718){
var h=dojo.html;
_714=dojo.byId(_714);
end=dojo.byId(end);
var _71a=dojo.html.toCoordinateObject(_714,true);
var _71b=dojo.html.toCoordinateObject(end,true);
var _71c=document.createElement("div");
dojo.html.copyStyle(_71c,_714);
if(_714.explodeClassName){
_71c.className=_714.explodeClassName;
}
dojo.html.setOpacity(_71c,0.3);
with(_71c.style){
position="absolute";
display="none";
backgroundColor=h.getStyle(_714,"background-color").toLowerCase();
}
dojo.body().appendChild(_71c);
var _71d={opacity:{start:1,end:0.5}};
dojo.lang.forEach(["height","width","top","left"],function(type){
_71d[type]={start:_71a[type],end:_71b[type]};
});
var anim=new dojo.lfx.propertyAnimation(_71c,_71d,_716,_717,{"beforeBegin":function(){
dojo.html.hide(_714);
dojo.html.show(_71c);
},"onEnd":function(){
_71c.parentNode.removeChild(_71c);
}});
if(_718){
anim.connect("onEnd",function(){
_718(_714,anim);
});
}
return anim;
};
dojo.lfx.html.highlight=function(_720,_721,_722,_723,_724){
_720=dojo.lfx.html._byId(_720);
var _725=[];
dojo.lang.forEach(_720,function(node){
var _727=dojo.html.getBackgroundColor(node);
var bg=dojo.html.getStyle(node,"background-color").toLowerCase();
var _729=dojo.html.getStyle(node,"background-image");
var _72a=(bg=="transparent"||bg=="rgba(0, 0, 0, 0)");
while(_727.length>3){
_727.pop();
}
var rgb=new dojo.gfx.color.Color(_721);
var _72c=new dojo.gfx.color.Color(_727);
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:rgb,end:_72c}},_722,_723,{"beforeBegin":function(){
if(_729){
node.style.backgroundImage="none";
}
node.style.backgroundColor="rgb("+rgb.toRgb().join(",")+")";
},"onEnd":function(){
if(_729){
node.style.backgroundImage=_729;
}
if(_72a){
node.style.backgroundColor="transparent";
}
if(_724){
_724(node,anim);
}
}});
_725.push(anim);
});
return dojo.lfx.combine(_725);
};
dojo.lfx.html.unhighlight=function(_72e,_72f,_730,_731,_732){
_72e=dojo.lfx.html._byId(_72e);
var _733=[];
dojo.lang.forEach(_72e,function(node){
var _735=new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node));
var rgb=new dojo.gfx.color.Color(_72f);
var _737=dojo.html.getStyle(node,"background-image");
var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:_735,end:rgb}},_730,_731,{"beforeBegin":function(){
if(_737){
node.style.backgroundImage="none";
}
node.style.backgroundColor="rgb("+_735.toRgb().join(",")+")";
},"onEnd":function(){
if(_732){
_732(node,anim);
}
}});
_733.push(anim);
});
return dojo.lfx.combine(_733);
};
dojo.lang.mixin(dojo.lfx,dojo.lfx.html);
dojo.kwCompoundRequire({browser:["dojo.lfx.html"],dashboard:["dojo.lfx.html"]});
dojo.provide("dojo.lfx.*");
dojo.provide("dojo.lfx.toggler");
dojo.lfx.toggler.plain=function(){
this.stop=function(){
};
this.show=function(node,_73a,_73b,_73c){
dojo.html.show(node);
if(dojo.lang.isFunction(_73c)){
_73c();
}
};
this.hide=function(node,_73e,_73f,_740){
dojo.html.hide(node);
if(dojo.lang.isFunction(_740)){
_740();
}
};
};
dojo.lfx.toggler.common={stop:function(){
if(this.anim&&this.anim.status()!="stopped"){
this.anim.stop();
}
},_act:function(_741,node,_743,_744,_745,_746){
this.stop();
this.anim=dojo.lfx[_741](node,_743,_744,_745).play();
},show:function(node,_748,_749,_74a,_74b){
this._act(this.show_action,node,_748,_749,_74a,_74b);
},hide:function(node,_74d,_74e,_74f,_750){
this._act(this.hide_action,node,_74d,_74e,_74f,_750);
}};
dojo.lfx.toggler.fade=function(){
this.anim=null;
this.show_action="fadeShow";
this.hide_action="fadeHide";
};
dojo.extend(dojo.lfx.toggler.fade,dojo.lfx.toggler.common);
dojo.lfx.toggler.wipe=function(){
this.anim=null;
this.show_action="wipeIn";
this.hide_action="wipeOut";
};
dojo.extend(dojo.lfx.toggler.wipe,dojo.lfx.toggler.common);
dojo.lfx.toggler.explode=function(){
this.anim=null;
this.show_action="explode";
this.hide_action="implode";
this.show=function(node,_752,_753,_754,_755){
this.stop();
this.anim=dojo.lfx.explode(_755||{x:0,y:0,width:0,height:0},node,_752,_753,_754).play();
};
this.hide=function(node,_757,_758,_759,_75a){
this.stop();
this.anim=dojo.lfx.implode(node,_75a||{x:0,y:0,width:0,height:0},_757,_758,_759).play();
};
};
dojo.extend(dojo.lfx.toggler.explode,dojo.lfx.toggler.common);
dojo.provide("dojo.widget.HtmlWidget");
dojo.declare("dojo.widget.HtmlWidget",dojo.widget.DomWidget,{templateCssPath:null,templatePath:null,lang:"",toggle:"plain",toggleDuration:150,initialize:function(args,frag){
},postMixInProperties:function(args,frag){
if(this.lang===""){
this.lang=null;
}
this.toggleObj=new (dojo.lfx.toggler[this.toggle.toLowerCase()]||dojo.lfx.toggler.plain);
},createNodesFromText:function(txt,wrap){
return dojo.html.createNodesFromText(txt,wrap);
},destroyRendering:function(_761){
try{
if(this.bgIframe){
this.bgIframe.remove();
delete this.bgIframe;
}
if(!_761&&this.domNode){
dojo.event.browser.clean(this.domNode);
}
dojo.widget.HtmlWidget.superclass.destroyRendering.call(this);
}
catch(e){
}
},isShowing:function(){
return dojo.html.isShowing(this.domNode);
},toggleShowing:function(){
if(this.isShowing()){
this.hide();
}else{
this.show();
}
},show:function(){
if(this.isShowing()){
return;
}
this.animationInProgress=true;
this.toggleObj.show(this.domNode,this.toggleDuration,null,dojo.lang.hitch(this,this.onShow),this.explodeSrc);
},onShow:function(){
this.animationInProgress=false;
this.checkSize();
},hide:function(){
if(!this.isShowing()){
return;
}
this.animationInProgress=true;
this.toggleObj.hide(this.domNode,this.toggleDuration,null,dojo.lang.hitch(this,this.onHide),this.explodeSrc);
},onHide:function(){
this.animationInProgress=false;
},_isResized:function(w,h){
if(!this.isShowing()){
return false;
}
var wh=dojo.html.getMarginBox(this.domNode);
var _765=w||wh.width;
var _766=h||wh.height;
if(this.width==_765&&this.height==_766){
return false;
}
this.width=_765;
this.height=_766;
return true;
},checkSize:function(){
if(!this._isResized()){
return;
}
this.onResized();
},resizeTo:function(w,h){
dojo.html.setMarginBox(this.domNode,{width:w,height:h});
if(this.isShowing()){
this.onResized();
}
},resizeSoon:function(){
if(this.isShowing()){
dojo.lang.setTimeout(this,this.onResized,0);
}
},onResized:function(){
dojo.lang.forEach(this.children,function(_769){
if(_769.checkSize){
_769.checkSize();
}
});
}});
dojo.kwCompoundRequire({common:["dojo.xml.Parse","dojo.widget.Widget","dojo.widget.Parse","dojo.widget.Manager"],browser:["dojo.widget.DomWidget","dojo.widget.HtmlWidget"],dashboard:["dojo.widget.DomWidget","dojo.widget.HtmlWidget"],svg:["dojo.widget.SvgWidget"],rhino:["dojo.widget.SwtWidget"]});
dojo.provide("dojo.widget.*");
dojo.provide("dojo.string");
dojo.provide("dojo.io.common");
dojo.io.transports=[];
dojo.io.hdlrFuncNames=["load","error","timeout"];
dojo.io.Request=function(url,_76b,_76c,_76d){
if((arguments.length==1)&&(arguments[0].constructor==Object)){
this.fromKwArgs(arguments[0]);
}else{
this.url=url;
if(_76b){
this.mimetype=_76b;
}
if(_76c){
this.transport=_76c;
}
if(arguments.length>=4){
this.changeUrl=_76d;
}
}
};
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,jsonFilter:function(_76e){
if((this.mimetype=="text/json-comment-filtered")||(this.mimetype=="application/json-comment-filtered")){
var _76f=_76e.indexOf("/*");
var _770=_76e.lastIndexOf("*/");
if((_76f==-1)||(_770==-1)){
dojo.debug("your JSON wasn't comment filtered!");
return "";
}
return _76e.substring(_76f+2,_770);
}
dojo.debug("please consider using a mimetype of text/json-comment-filtered to avoid potential security issues with JSON endpoints");
return _76e;
},load:function(type,data,_773,_774){
},error:function(type,_776,_777,_778){
},timeout:function(type,_77a,_77b,_77c){
},handle:function(type,data,_77f,_780){
},timeoutSeconds:0,abort:function(){
},fromKwArgs:function(_781){
if(_781["url"]){
_781.url=_781.url.toString();
}
if(_781["formNode"]){
_781.formNode=dojo.byId(_781.formNode);
}
if(!_781["method"]&&_781["formNode"]&&_781["formNode"].method){
_781.method=_781["formNode"].method;
}
if(!_781["handle"]&&_781["handler"]){
_781.handle=_781.handler;
}
if(!_781["load"]&&_781["loaded"]){
_781.load=_781.loaded;
}
if(!_781["changeUrl"]&&_781["changeURL"]){
_781.changeUrl=_781.changeURL;
}
_781.encoding=dojo.lang.firstValued(_781["encoding"],djConfig["bindEncoding"],"");
_781.sendTransport=dojo.lang.firstValued(_781["sendTransport"],djConfig["ioSendTransport"],false);
var _782=dojo.lang.isFunction;
for(var x=0;x<dojo.io.hdlrFuncNames.length;x++){
var fn=dojo.io.hdlrFuncNames[x];
if(_781[fn]&&_782(_781[fn])){
continue;
}
if(_781["handle"]&&_782(_781["handle"])){
_781[fn]=_781.handle;
}
}
dojo.lang.mixin(this,_781);
}});
dojo.io.Error=function(msg,type,num){
this.message=msg;
this.type=type||"unknown";
this.number=num||0;
};
dojo.io.transports.addTransport=function(name){
this.push(name);
this[name]=dojo.io[name];
};
dojo.io.bind=function(_789){
if(!(_789 instanceof dojo.io.Request)){
try{
_789=new dojo.io.Request(_789);
}
catch(e){
dojo.debug(e);
}
}
var _78a="";
if(_789["transport"]){
_78a=_789["transport"];
if(!this[_78a]){
dojo.io.sendBindError(_789,"No dojo.io.bind() transport with name '"+_789["transport"]+"'.");
return _789;
}
if(!this[_78a].canHandle(_789)){
dojo.io.sendBindError(_789,"dojo.io.bind() transport with name '"+_789["transport"]+"' cannot handle this type of request.");
return _789;
}
}else{
for(var x=0;x<dojo.io.transports.length;x++){
var tmp=dojo.io.transports[x];
if((this[tmp])&&(this[tmp].canHandle(_789))){
_78a=tmp;
break;
}
}
if(_78a==""){
dojo.io.sendBindError(_789,"None of the loaded transports for dojo.io.bind()"+" can handle the request.");
return _789;
}
}
this[_78a].bind(_789);
_789.bindSuccess=true;
return _789;
};
dojo.io.sendBindError=function(_78d,_78e){
if((typeof _78d.error=="function"||typeof _78d.handle=="function")&&(typeof setTimeout=="function"||typeof setTimeout=="object")){
var _78f=new dojo.io.Error(_78e);
setTimeout(function(){
_78d[(typeof _78d.error=="function")?"error":"handle"]("error",_78f,null,_78d);
},50);
}else{
dojo.raise(_78e);
}
};
dojo.io.queueBind=function(_790){
if(!(_790 instanceof dojo.io.Request)){
try{
_790=new dojo.io.Request(_790);
}
catch(e){
dojo.debug(e);
}
}
var _791=_790.load;
_790.load=function(){
dojo.io._queueBindInFlight=false;
var ret=_791.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
var _793=_790.error;
_790.error=function(){
dojo.io._queueBindInFlight=false;
var ret=_793.apply(this,arguments);
dojo.io._dispatchNextQueueBind();
return ret;
};
dojo.io._bindQueue.push(_790);
dojo.io._dispatchNextQueueBind();
return _790;
};
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,_796,last){
var enc=/utf/i.test(_796||"")?encodeURIComponent:dojo.string.encodeAscii;
var _799=[];
var _79a=new Object();
for(var name in map){
var _79c=function(elt){
var val=enc(name)+"="+enc(elt);
_799[(last==name)?"push":"unshift"](val);
};
if(!_79a[name]){
var _79f=map[name];
if(dojo.lang.isArray(_79f)){
dojo.lang.forEach(_79f,_79c);
}else{
_79c(_79f);
}
}
}
return _799.join("&");
};
dojo.io.setIFrameSrc=function(_7a0,src,_7a2){
try{
var r=dojo.render.html;
if(!_7a2){
if(r.safari){
_7a0.location=src;
}else{
frames[_7a0.name].location=src;
}
}else{
var idoc;
if(r.ie){
idoc=_7a0.contentWindow.document;
}else{
if(r.safari){
idoc=_7a0.document;
}else{
idoc=_7a0.contentWindow;
}
}
if(!idoc){
_7a0.location=src;
return;
}else{
idoc.location.replace(src);
}
}
}
catch(e){
dojo.debug(e);
dojo.debug("setIFrameSrc: "+e);
}
};
dojo.provide("dojo.undo.browser");
try{
if((!djConfig["preventBackButtonFix"])&&(!dojo.hostenv.post_load_)){
document.write("<iframe style='border: 0px; width: 1px; height: 1px; position: absolute; bottom: 0px; right: 0px; visibility: visible;' name='djhistory' id='djhistory' src='"+(djConfig["dojoIframeHistoryUrl"]||dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"'></iframe>");
}
}
catch(e){
}
if(dojo.render.html.opera){
dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work.");
}
dojo.undo.browser={initialHref:(!dj_undef("window"))?window.location.href:"",initialHash:(!dj_undef("window"))?window.location.hash:"",moveForward:false,historyStack:[],forwardStack:[],historyIframe:null,bookmarkAnchor:null,locationTimer:null,setInitialState:function(args){
this.initialState=this._createState(this.initialHref,args,this.initialHash);
},addToHistory:function(args){
this.forwardStack=[];
var hash=null;
var url=null;
if(!this.historyIframe){
if(djConfig["useXDomain"]&&!djConfig["dojoIframeHistoryUrl"]){
dojo.debug("dojo.undo.browser: When using cross-domain Dojo builds,"+" please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"+" to the path on your domain to iframe_history.html");
}
this.historyIframe=window.frames["djhistory"];
}
if(!this.bookmarkAnchor){
this.bookmarkAnchor=document.createElement("a");
dojo.body().appendChild(this.bookmarkAnchor);
this.bookmarkAnchor.style.display="none";
}
if(args["changeUrl"]){
hash="#"+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime());
if(this.historyStack.length==0&&this.initialState.urlHash==hash){
this.initialState=this._createState(url,args,hash);
return;
}else{
if(this.historyStack.length>0&&this.historyStack[this.historyStack.length-1].urlHash==hash){
this.historyStack[this.historyStack.length-1]=this._createState(url,args,hash);
return;
}
}
this.changingUrl=true;
setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;",1);
this.bookmarkAnchor.href=hash;
if(dojo.render.html.ie){
url=this._loadIframeHistory();
var _7a9=args["back"]||args["backButton"]||args["handle"];
var tcb=function(_7ab){
if(window.location.hash!=""){
setTimeout("window.location.href = '"+hash+"';",1);
}
_7a9.apply(this,[_7ab]);
};
if(args["back"]){
args.back=tcb;
}else{
if(args["backButton"]){
args.backButton=tcb;
}else{
if(args["handle"]){
args.handle=tcb;
}
}
}
var _7ac=args["forward"]||args["forwardButton"]||args["handle"];
var tfw=function(_7ae){
if(window.location.hash!=""){
window.location.href=hash;
}
if(_7ac){
_7ac.apply(this,[_7ae]);
}
};
if(args["forward"]){
args.forward=tfw;
}else{
if(args["forwardButton"]){
args.forwardButton=tfw;
}else{
if(args["handle"]){
args.handle=tfw;
}
}
}
}else{
if(dojo.render.html.moz){
if(!this.locationTimer){
this.locationTimer=setInterval("dojo.undo.browser.checkLocation();",200);
}
}
}
}else{
url=this._loadIframeHistory();
}
this.historyStack.push(this._createState(url,args,hash));
},checkLocation:function(){
if(!this.changingUrl){
var hsl=this.historyStack.length;
if((window.location.hash==this.initialHash||window.location.href==this.initialHref)&&(hsl==1)){
this.handleBackButton();
return;
}
if(this.forwardStack.length>0){
if(this.forwardStack[this.forwardStack.length-1].urlHash==window.location.hash){
this.handleForwardButton();
return;
}
}
if((hsl>=2)&&(this.historyStack[hsl-2])){
if(this.historyStack[hsl-2].urlHash==window.location.hash){
this.handleBackButton();
return;
}
}
}
},iframeLoaded:function(evt,_7b1){
if(!dojo.render.html.opera){
var _7b2=this._getUrlQuery(_7b1.href);
if(_7b2==null){
if(this.historyStack.length==1){
this.handleBackButton();
}
return;
}
if(this.moveForward){
this.moveForward=false;
return;
}
if(this.historyStack.length>=2&&_7b2==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){
this.handleBackButton();
}else{
if(this.forwardStack.length>0&&_7b2==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){
this.handleForwardButton();
}
}
}
},handleBackButton:function(){
var _7b3=this.historyStack.pop();
if(!_7b3){
return;
}
var last=this.historyStack[this.historyStack.length-1];
if(!last&&this.historyStack.length==0){
last=this.initialState;
}
if(last){
if(last.kwArgs["back"]){
last.kwArgs["back"]();
}else{
if(last.kwArgs["backButton"]){
last.kwArgs["backButton"]();
}else{
if(last.kwArgs["handle"]){
last.kwArgs.handle("back");
}
}
}
}
this.forwardStack.push(_7b3);
},handleForwardButton:function(){
var last=this.forwardStack.pop();
if(!last){
return;
}
if(last.kwArgs["forward"]){
last.kwArgs.forward();
}else{
if(last.kwArgs["forwardButton"]){
last.kwArgs.forwardButton();
}else{
if(last.kwArgs["handle"]){
last.kwArgs.handle("forward");
}
}
}
this.historyStack.push(last);
},_createState:function(url,args,hash){
return {"url":url,"kwArgs":args,"urlHash":hash};
},_getUrlQuery:function(url){
var _7ba=url.split("?");
if(_7ba.length<2){
return null;
}else{
return _7ba[1];
}
},_loadIframeHistory:function(){
var url=(djConfig["dojoIframeHistoryUrl"]||dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"?"+(new Date()).getTime();
this.moveForward=true;
dojo.io.setIFrameSrc(this.historyIframe,url,false);
return url;
}};
dojo.provide("dojo.io.BrowserIO");
if(!dj_undef("window")){
dojo.io.checkChildrenForFile=function(node){
var _7bd=false;
var _7be=node.getElementsByTagName("input");
dojo.lang.forEach(_7be,function(_7bf){
if(_7bd){
return;
}
if(_7bf.getAttribute("type")=="file"){
_7bd=true;
}
});
return _7bd;
};
dojo.io.formHasFile=function(_7c0){
return dojo.io.checkChildrenForFile(_7c0);
};
dojo.io.updateNode=function(node,_7c2){
node=dojo.byId(node);
var args=_7c2;
if(dojo.lang.isString(_7c2)){
args={url:_7c2};
}
args.mimetype="text/html";
args.load=function(t,d,e){
while(node.firstChild){
dojo.dom.destroyNode(node.firstChild);
}
node.innerHTML=d;
};
dojo.io.bind(args);
};
dojo.io.formFilter=function(node){
var type=(node.type||"").toLowerCase();
return !node.disabled&&node.name&&!dojo.lang.inArray(["file","submit","image","reset","button"],type);
};
dojo.io.encodeForm=function(_7c9,_7ca,_7cb){
if((!_7c9)||(!_7c9.tagName)||(!_7c9.tagName.toLowerCase()=="form")){
dojo.raise("Attempted to encode a non-form element.");
}
if(!_7cb){
_7cb=dojo.io.formFilter;
}
var enc=/utf/i.test(_7ca||"")?encodeURIComponent:dojo.string.encodeAscii;
var _7cd=[];
for(var i=0;i<_7c9.elements.length;i++){
var elm=_7c9.elements[i];
if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_7cb(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){
_7cd.push(name+"="+enc(elm.options[j].value));
}
}
}else{
if(dojo.lang.inArray(["radio","checkbox"],type)){
if(elm.checked){
_7cd.push(name+"="+enc(elm.value));
}
}else{
_7cd.push(name+"="+enc(elm.value));
}
}
}
var _7d3=_7c9.getElementsByTagName("input");
for(var i=0;i<_7d3.length;i++){
var _7d4=_7d3[i];
if(_7d4.type.toLowerCase()=="image"&&_7d4.form==_7c9&&_7cb(_7d4)){
var name=enc(_7d4.name);
_7cd.push(name+"="+enc(_7d4.value));
_7cd.push(name+".x=0");
_7cd.push(name+".y=0");
}
}
return _7cd.join("&")+"&";
};
dojo.io.FormBind=function(args){
this.bindArgs={};
if(args&&args.formNode){
this.init(args);
}else{
if(args){
this.init({formNode:args});
}
}
};
dojo.lang.extend(dojo.io.FormBind,{form:null,bindArgs:null,clickedButton:null,init:function(args){
var form=dojo.byId(args.formNode);
if(!form||!form.tagName||form.tagName.toLowerCase()!="form"){
throw new Error("FormBind: Couldn't apply, invalid form");
}else{
if(this.form==form){
return;
}else{
if(this.form){
throw new Error("FormBind: Already applied to a form");
}
}
}
dojo.lang.mixin(this.bindArgs,args);
this.form=form;
this.connect(form,"onsubmit","submit");
for(var i=0;i<form.elements.length;i++){
var node=form.elements[i];
if(node&&node.type&&dojo.lang.inArray(["submit","button"],node.type.toLowerCase())){
this.connect(node,"onclick","click");
}
}
var _7da=form.getElementsByTagName("input");
for(var i=0;i<_7da.length;i++){
var _7db=_7da[i];
if(_7db.type.toLowerCase()=="image"&&_7db.form==form){
this.connect(_7db,"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 _7e2=false;
if(node.disabled||!node.name){
_7e2=false;
}else{
if(dojo.lang.inArray(["submit","button","image"],type)){
if(!this.clickedButton){
this.clickedButton=node;
}
_7e2=node==this.clickedButton;
}else{
_7e2=!dojo.lang.inArray(["file","submit","reset","button"],type);
}
}
return _7e2;
},connect:function(_7e3,_7e4,_7e5){
if(dojo.getObject("dojo.event.connect")){
dojo.event.connect(_7e3,_7e4,this,_7e5);
}else{
var fcn=dojo.lang.hitch(this,_7e5);
_7e3[_7e4]=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 _7e8=this;
var _7e9={};
this.useCache=false;
this.preventCache=false;
function getCacheKey(url,_7eb,_7ec){
return url+"|"+_7eb+"|"+_7ec.toLowerCase();
}
function addToCache(url,_7ee,_7ef,http){
_7e9[getCacheKey(url,_7ee,_7ef)]=http;
}
function getFromCache(url,_7f2,_7f3){
return _7e9[getCacheKey(url,_7f2,_7f3)];
}
this.clearCache=function(){
_7e9={};
};
function doLoad(_7f4,http,url,_7f7,_7f8){
if(((http.status>=200)&&(http.status<300))||(http.status==304)||(http.status==1223)||(location.protocol=="file:"&&(http.status==0||http.status==undefined))||(location.protocol=="chrome:"&&(http.status==0||http.status==undefined))){
var ret;
if(_7f4.method.toLowerCase()=="head"){
var _7fa=http.getAllResponseHeaders();
ret={};
ret.toString=function(){
return _7fa;
};
var _7fb=_7fa.split(/[\r\n]+/g);
for(var i=0;i<_7fb.length;i++){
var pair=_7fb[i].match(/^([^:]+)\s*:\s*(.+)$/i);
if(pair){
ret[pair[1]]=pair[2];
}
}
}else{
if(_7f4.mimetype=="text/javascript"){
try{
ret=dj_eval(http.responseText);
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=null;
}
}else{
if(_7f4.mimetype.substr(0,9)=="text/json"||_7f4.mimetype.substr(0,16)=="application/json"){
try{
ret=dj_eval("("+_7f4.jsonFilter(http.responseText)+")");
}
catch(e){
dojo.debug(e);
dojo.debug(http.responseText);
ret=false;
}
}else{
if((_7f4.mimetype=="application/xml")||(_7f4.mimetype=="text/xml")){
ret=http.responseXML;
if(!ret||typeof ret=="string"||!http.getResponseHeader("Content-Type")){
ret=dojo.dom.createDocumentFromText(http.responseText);
}
}else{
ret=http.responseText;
}
}
}
}
if(_7f8){
addToCache(url,_7f7,_7f4.method,http);
}
_7f4[(typeof _7f4.load=="function")?"load":"handle"]("load",ret,http,_7f4);
}else{
var _7fe=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText);
_7f4[(typeof _7f4.error=="function")?"error":"handle"]("error",_7fe,http,_7f4);
}
}
function setHeaders(http,_800){
if(_800["headers"]){
for(var _801 in _800["headers"]){
if(_801.toLowerCase()=="content-type"&&!_800["contentType"]){
_800["contentType"]=_800["headers"][_801];
}else{
http.setRequestHeader(_801,_800["headers"][_801]);
}
}
}
}
this.inFlight=[];
this.inFlightTimer=null;
this.startWatchingInFlight=function(){
if(!this.inFlightTimer){
this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10);
}
};
this.watchInFlight=function(){
var now=null;
if(!dojo.hostenv._blockAsync&&!_7e8._blockAsync){
for(var x=this.inFlight.length-1;x>=0;x--){
try{
var tif=this.inFlight[x];
if(!tif||tif.http._aborted||!tif.http.readyState){
this.inFlight.splice(x,1);
continue;
}
if(4==tif.http.readyState){
this.inFlight.splice(x,1);
doLoad(tif.req,tif.http,tif.url,tif.query,tif.useCache);
}else{
if(tif.startTime){
if(!now){
now=(new Date()).getTime();
}
if(tif.startTime+(tif.req.timeoutSeconds*1000)<now){
if(typeof tif.http.abort=="function"){
tif.http.abort();
}
this.inFlight.splice(x,1);
tif.req[(typeof tif.req.timeout=="function")?"timeout":"handle"]("timeout",null,tif.http,tif.req);
}
}
}
}
catch(e){
try{
var _805=new dojo.io.Error("XMLHttpTransport.watchInFlight Error: "+e);
tif.req[(typeof tif.req.error=="function")?"error":"handle"]("error",_805,tif.http,tif.req);
}
catch(e2){
dojo.debug("XMLHttpTransport error callback failed: "+e2);
}
}
}
}
clearTimeout(this.inFlightTimer);
if(this.inFlight.length==0){
this.inFlightTimer=null;
return;
}
this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10);
};
var _806=dojo.hostenv.getXmlhttpObject()?true:false;
this.canHandle=function(_807){
var mlc=_807["mimetype"].toLowerCase()||"";
return _806&&((dojo.lang.inArray(["text/plain","text/html","application/xml","text/xml","text/javascript"],mlc))||(mlc.substr(0,9)=="text/json"||mlc.substr(0,16)=="application/json"))&&!(_807["formNode"]&&dojo.io.formHasFile(_807["formNode"]));
};
this.multipartBoundary="45309FFF-BD65-4d50-99C9-36986896A96F";
this.bind=function(_809){
var url=_809.url;
var _80b="";
if(_809["formNode"]){
var ta=_809.formNode.getAttribute("action");
if(typeof (ta)!="string"){
ta=_809.formNode.attributes.action.value;
}
if((ta)&&(!_809["url"])){
url=ta;
}
var tp=_809.formNode.getAttribute("method");
if((tp)&&(!_809["method"])){
_809.method=tp;
}
_80b+=dojo.io.encodeForm(_809.formNode,_809.encoding,_809["formFilter"]);
}
if(url.indexOf("#")>-1){
dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url);
url=url.split("#")[0];
}
if(_809["file"]){
_809.method="post";
}
if(!_809["method"]){
_809.method="get";
}
if(_809.method.toLowerCase()=="get"){
_809.multipart=false;
}else{
if(_809["file"]){
_809.multipart=true;
}else{
if(!_809["multipart"]){
_809.multipart=false;
}
}
}
if(_809["backButton"]||_809["back"]||_809["changeUrl"]){
dojo.undo.browser.addToHistory(_809);
}
var _80e=_809["content"]||{};
if(_809.sendTransport){
_80e["dojo.transport"]="xmlhttp";
}
do{
if(_809.postContent){
_80b=_809.postContent;
break;
}
if(_80e){
_80b+=dojo.io.argsFromMap(_80e,_809.encoding);
}
if(_809.method.toLowerCase()=="get"||!_809.multipart){
break;
}
var t=[];
if(_80b.length){
var q=_80b.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(_809.file){
if(dojo.lang.isArray(_809.file)){
for(var i=0;i<_809.file.length;++i){
var o=_809.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=_809.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+"--","");
_80b=t.join("\r\n");
}
}while(false);
var _814=_809["sync"]?false:true;
var _815=_809["preventCache"]||(this.preventCache==true&&_809["preventCache"]!=false);
var _816=_809["useCache"]==true||(this.useCache==true&&_809["useCache"]!=false);
if(!_815&&_816){
var _817=getFromCache(url,_80b,_809.method);
if(_817){
doLoad(_809,_817,url,_80b,false);
return;
}
}
var http=dojo.hostenv.getXmlhttpObject(_809);
var _819=false;
if(_814){
var _81a=this.inFlight.push({"req":_809,"http":http,"url":url,"query":_80b,"useCache":_816,"startTime":_809.timeoutSeconds?(new Date()).getTime():0});
this.startWatchingInFlight();
}else{
_7e8._blockAsync=true;
}
if(_809.method.toLowerCase()=="post"){
if(!_809.user){
http.open("POST",url,_814);
}else{
http.open("POST",url,_814,_809.user,_809.password);
}
setHeaders(http,_809);
http.setRequestHeader("Content-Type",_809.multipart?("multipart/form-data; boundary="+this.multipartBoundary):(_809.contentType||"application/x-www-form-urlencoded"));
try{
http.send(_80b);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_809,{status:404},url,_80b,_816);
}
}else{
var _81b=url;
if(_80b!=""){
_81b+=(_81b.indexOf("?")>-1?"&":"?")+_80b;
}
if(_815){
_81b+=(dojo.string.endsWithAny(_81b,"?","&")?"":(_81b.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf();
}
if(!_809.user){
http.open(_809.method.toUpperCase(),_81b,_814);
}else{
http.open(_809.method.toUpperCase(),_81b,_814,_809.user,_809.password);
}
setHeaders(http,_809);
try{
http.send(null);
}
catch(e){
if(typeof http.abort=="function"){
http.abort();
}
doLoad(_809,{status:404},url,_80b,_816);
}
}
if(!_814){
doLoad(_809,http,url,_80b,_816);
_7e8._blockAsync=false;
}
_809.abort=function(){
try{
http._aborted=true;
}
catch(e){
}
return http.abort();
};
return;
};
dojo.io.transports.addTransport("XMLHTTPTransport");
};
}
dojo.provide("dojo.io.cookie");
dojo.io.cookie.setCookie=function(name,_81d,days,path,_820,_821){
var _822=-1;
if((typeof days=="number")&&(days>=0)){
var d=new Date();
d.setTime(d.getTime()+(days*24*60*60*1000));
_822=d.toGMTString();
}
_81d=escape(_81d);
document.cookie=name+"="+_81d+";"+(_822!=-1?" expires="+_822+";":"")+(path?"path="+path:"")+(_820?"; domain="+_820:"")+(_821?"; secure":"");
};
dojo.io.cookie.set=dojo.io.cookie.setCookie;
dojo.io.cookie.getCookie=function(name){
var idx=document.cookie.lastIndexOf(name+"=");
if(idx==-1){
return null;
}
var _826=document.cookie.substring(idx+name.length+1);
var end=_826.indexOf(";");
if(end==-1){
end=_826.length;
}
_826=_826.substring(0,end);
_826=unescape(_826);
return _826;
};
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,_82d,_82e,_82f){
if(arguments.length==5){
_82f=_82d;
_82d=null;
_82e=null;
}
var _830=[],_831,_832="";
if(!_82f){
_831=dojo.io.cookie.getObjectCookie(name);
}
if(days>=0){
if(!_831){
_831={};
}
for(var prop in obj){
if(obj[prop]==null){
delete _831[prop];
}else{
if((typeof obj[prop]=="string")||(typeof obj[prop]=="number")){
_831[prop]=obj[prop];
}
}
}
prop=null;
for(var prop in _831){
_830.push(escape(prop)+"="+escape(_831[prop]));
}
_832=_830.join("&");
}
dojo.io.cookie.setCookie(name,_832,days,path,_82d,_82e);
};
dojo.io.cookie.getObjectCookie=function(name){
var _835=null,_836=dojo.io.cookie.getCookie(name);
if(_836){
_835={};
var _837=_836.split("&");
for(var i=0;i<_837.length;i++){
var pair=_837[i].split("=");
var _83a=pair[1];
if(isNaN(_83a)){
_83a=unescape(pair[1]);
}
_835[unescape(pair[0])]=_83a;
}
}
return _835;
};
dojo.io.cookie.isSupported=function(){
if(typeof navigator.cookieEnabled!="boolean"){
dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null);
var _83b=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__");
navigator.cookieEnabled=(_83b=="CookiesAllowed");
if(navigator.cookieEnabled){
this.deleteCookie("__TestingYourBrowserForCookieSupport__");
}
}
return navigator.cookieEnabled;
};
if(!dojo.io.cookies){
dojo.io.cookies=dojo.io.cookie;
}
dojo.kwCompoundRequire({common:["dojo.io.common"],rhino:["dojo.io.RhinoIO"],browser:["dojo.io.BrowserIO","dojo.io.cookie"],dashboard:["dojo.io.BrowserIO","dojo.io.cookie"]});
dojo.provide("dojo.io.*");
dojo.provide("dojo.widget.ContentPane");
dojo.widget.defineWidget("dojo.widget.ContentPane",dojo.widget.HtmlWidget,function(){
this._styleNodes=[];
this._onLoadStack=[];
this._onUnloadStack=[];
this._callOnUnload=false;
this._ioBindObj;
this.scriptScope;
this.bindArgs={};
},{isContainer:true,adjustPaths:true,href:"",extractContent:true,parseContent:true,cacheContent:true,preload:false,refreshOnShow:false,handler:"",executeScripts:false,scriptSeparation:true,loadingMessage:"Loading...",isLoaded:false,"class":"dojoContentPane",templateCssString:".dojoContentPane {\n\tdisplay: block;\n\toverflow: auto;\t/* if we don't have this (or overflow:hidden), then Widget.resizeTo() doesn't make sense for ContentPane */\n}\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/ContentPane.css"),postCreate:function(args,frag,_83e){
dojo.html.addClass(this.domNode,this["class"]);
if(this.handler!==""){
this.setHandler(this.handler);
}
if(this.isShowing()||this.preload){
this._prepareForShow();
}
},show:function(){
if(this.refreshOnShow){
this.refresh();
}else{
this._prepareForShow();
}
dojo.widget.ContentPane.superclass.show.call(this);
},refresh:function(){
this.isLoaded=false;
this._prepareForShow();
},_prepareForShow:function(){
if(this.isLoaded){
return;
}
if(dojo.lang.isFunction(this.handler)){
this._runHandler();
}else{
if(this.href!=""){
this._downloadExternalContent(this.href,this.cacheContent&&!this.refreshOnShow);
}
}
},setUrl:function(url){
this.href=url;
this.isLoaded=false;
if(this.preload||this.isShowing()){
this._prepareForShow();
}
},abort:function(){
var bind=this._ioBindObj;
if(!bind||!bind.abort){
return;
}
bind.abort();
delete this._ioBindObj;
},_downloadExternalContent:function(url,_842){
this.abort();
this._handleDefaults(this.loadingMessage,"onDownloadStart");
var self=this;
this._ioBindObj=dojo.io.bind(this._cacheSetting({url:url,mimetype:"text/html",handler:function(type,data,xhr){
delete self._ioBindObj;
if(type=="load"){
self.onDownloadEnd.call(self,url,data);
}else{
var e={responseText:xhr.responseText,status:xhr.status,statusText:xhr.statusText,responseHeaders:xhr.getAllResponseHeaders(),text:"Error loading '"+url+"' ("+xhr.status+" "+xhr.statusText+")"};
self._handleDefaults.call(self,e,"onDownloadError");
self.onLoad();
}
}},_842));
},_cacheSetting:function(_848,_849){
for(var x in this.bindArgs){
if(dojo.lang.isUndefined(_848[x])){
_848[x]=this.bindArgs[x];
}
}
if(dojo.lang.isUndefined(_848.useCache)){
_848.useCache=_849;
}
if(dojo.lang.isUndefined(_848.preventCache)){
_848.preventCache=!_849;
}
if(dojo.lang.isUndefined(_848.mimetype)){
_848.mimetype="text/html";
}
return _848;
},onLoad:function(e){
this._runStack("_onLoadStack");
this.isLoaded=true;
},onUnLoad:function(e){
dojo.deprecated(this.widgetType+".onUnLoad, use .onUnload (lowercased load)",0.5);
},onUnload:function(e){
this._runStack("_onUnloadStack");
delete this.scriptScope;
if(this.onUnLoad!==dojo.widget.ContentPane.prototype.onUnLoad){
this.onUnLoad.apply(this,arguments);
}
},_runStack:function(_84e){
var st=this[_84e];
var err="";
var _851=this.scriptScope||window;
for(var i=0;i<st.length;i++){
try{
st[i].call(_851);
}
catch(e){
err+="\n"+st[i]+" failed: "+e.description;
}
}
this[_84e]=[];
if(err.length){
var name=(_84e=="_onLoadStack")?"addOnLoad":"addOnUnLoad";
this._handleDefaults(name+" failure\n "+err,"onExecError","debug");
}
},addOnLoad:function(obj,func){
this._pushOnStack(this._onLoadStack,obj,func);
},addOnUnload:function(obj,func){
this._pushOnStack(this._onUnloadStack,obj,func);
},addOnUnLoad:function(){
dojo.deprecated(this.widgetType+".addOnUnLoad, use addOnUnload instead. (lowercased Load)",0.5);
this.addOnUnload.apply(this,arguments);
},_pushOnStack:function(_858,obj,func){
if(typeof func=="undefined"){
_858.push(obj);
}else{
_858.push(function(){
obj[func]();
});
}
},destroy:function(){
this.onUnload();
dojo.widget.ContentPane.superclass.destroy.call(this);
},onExecError:function(e){
},onContentError:function(e){
},onDownloadError:function(e){
},onDownloadStart:function(e){
},onDownloadEnd:function(url,data){
data=this.splitAndFixPaths(data,url);
this.setContent(data);
},_handleDefaults:function(e,_862,_863){
if(!_862){
_862="onContentError";
}
if(dojo.lang.isString(e)){
e={text:e};
}
if(!e.text){
e.text=e.toString();
}
e.toString=function(){
return this.text;
};
if(typeof e.returnValue!="boolean"){
e.returnValue=true;
}
if(typeof e.preventDefault!="function"){
e.preventDefault=function(){
this.returnValue=false;
};
}
this[_862](e);
if(e.returnValue){
switch(_863){
case true:
case "alert":
alert(e.toString());
break;
case "debug":
dojo.debug(e.toString());
break;
default:
if(this._callOnUnload){
this.onUnload();
}
this._callOnUnload=false;
if(arguments.callee._loopStop){
dojo.debug(e.toString());
}else{
arguments.callee._loopStop=true;
this._setContent(e.toString());
}
}
}
arguments.callee._loopStop=false;
},splitAndFixPaths:function(s,url){
var _866=[],_867=[],tmp=[];
var _869=[],_86a=[],attr=[],_86c=[];
var str="",path="",fix="",_870="",tag="",_872="";
if(!url){
url="./";
}
if(s){
var _873=/<title[^>]*>([\s\S]*?)<\/title>/i;
while(_869=_873.exec(s)){
_866.push(_869[1]);
s=s.substring(0,_869.index)+s.substr(_869.index+_869[0].length);
}
if(this.adjustPaths){
var _874=/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i;
var _875=/\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@]+?)\2/i;
var _876=/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/;
while(tag=_874.exec(s)){
str+=s.substring(0,tag.index);
s=s.substring((tag.index+tag[0].length),s.length);
tag=tag[0];
_870="";
while(attr=_875.exec(tag)){
path="";
_872=attr[3];
switch(attr[1].toLowerCase()){
case "src":
case "href":
if(_876.exec(_872)){
path=_872;
}else{
path=(new dojo.uri.Uri(url,_872).toString());
}
break;
case "style":
path=dojo.html.fixPathsInCssText(_872,url);
break;
default:
path=_872;
}
fix=" "+attr[1]+"="+attr[2]+path+attr[2];
_870+=tag.substring(0,attr.index)+fix;
tag=tag.substring((attr.index+attr[0].length),tag.length);
}
str+=_870+tag;
}
s=str+s;
}
_873=/(?:<(style)[^>]*>([\s\S]*?)<\/style>|<link ([^>]*rel=['"]?stylesheet['"]?[^>]*)>)/i;
while(_869=_873.exec(s)){
if(_869[1]&&_869[1].toLowerCase()=="style"){
_86c.push(dojo.html.fixPathsInCssText(_869[2],url));
}else{
if(attr=_869[3].match(/href=(['"]?)([^'">]*)\1/i)){
_86c.push({path:attr[2]});
}
}
s=s.substring(0,_869.index)+s.substr(_869.index+_869[0].length);
}
var _873=/<script([^>]*)>([\s\S]*?)<\/script>/i;
var _877=/src=(['"]?)([^"']*)\1/i;
var _878=/.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/;
var _879=/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g;
var _87a=/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/;
while(_869=_873.exec(s)){
if(this.executeScripts&&_869[1]){
if(attr=_877.exec(_869[1])){
if(_878.exec(attr[2])){
dojo.debug("Security note! inhibit:"+attr[2]+" from  being loaded again.");
}else{
_867.push({path:attr[2]});
}
}
}
if(_869[2]){
var sc=_869[2].replace(_879,"");
if(!sc){
continue;
}
while(tmp=_87a.exec(sc)){
_86a.push(tmp[0]);
sc=sc.substring(0,tmp.index)+sc.substr(tmp.index+tmp[0].length);
}
if(this.executeScripts){
_867.push(sc);
}
}
s=s.substr(0,_869.index)+s.substr(_869.index+_869[0].length);
}
if(this.extractContent){
_869=s.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);
if(_869){
s=_869[1];
}
}
if(this.executeScripts&&this.scriptSeparation){
var _873=/(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/;
var _87c=/([\s'";:\(])scriptScope(.*)/;
str="";
while(tag=_873.exec(s)){
tmp=((tag[3]=="'")?"\"":"'");
fix="";
str+=s.substring(0,tag.index)+tag[1];
while(attr=_87c.exec(tag[2])){
tag[2]=tag[2].substring(0,attr.index)+attr[1]+"dojo.widget.byId("+tmp+this.widgetId+tmp+").scriptScope"+attr[2];
}
str+=tag[2];
s=s.substr(tag.index+tag[0].length);
}
s=str+s;
}
}
return {"xml":s,"styles":_86c,"titles":_866,"requires":_86a,"scripts":_867,"url":url};
},_setContent:function(cont){
this.destroyChildren();
for(var i=0;i<this._styleNodes.length;i++){
if(this._styleNodes[i]&&this._styleNodes[i].parentNode){
this._styleNodes[i].parentNode.removeChild(this._styleNodes[i]);
}
}
this._styleNodes=[];
try{
var node=this.containerNode||this.domNode;
while(node.firstChild){
dojo.html.destroyNode(node.firstChild);
}
if(typeof cont!="string"){
node.appendChild(cont);
}else{
node.innerHTML=cont;
}
}
catch(e){
e.text="Couldn't load content:"+e.description;
this._handleDefaults(e,"onContentError");
}
},setContent:function(data){
this.abort();
if(this._callOnUnload){
this.onUnload();
}
this._callOnUnload=true;
if(!data||dojo.html.isNode(data)){
this._setContent(data);
this.onResized();
this.onLoad();
}else{
if(typeof data.xml!="string"){
this.href="";
data=this.splitAndFixPaths(data);
}
this._setContent(data.xml);
for(var i=0;i<data.styles.length;i++){
if(data.styles[i].path){
this._styleNodes.push(dojo.html.insertCssFile(data.styles[i].path,dojo.doc(),false,true));
}else{
this._styleNodes.push(dojo.html.insertCssText(data.styles[i]));
}
}
if(this.parseContent){
for(var i=0;i<data.requires.length;i++){
try{
eval(data.requires[i]);
}
catch(e){
e.text="ContentPane: error in package loading calls, "+(e.description||e);
this._handleDefaults(e,"onContentError","debug");
}
}
}
var _882=this;
function asyncParse(){
if(_882.executeScripts){
_882._executeScripts(data.scripts);
}
if(_882.parseContent){
_882._createSubWidgets();
}
_882.onResized();
_882.onLoad();
}
if(dojo.hostenv.isXDomain&&data.requires.length){
dojo.addOnLoad(asyncParse);
}else{
asyncParse();
}
}
},_createSubWidgets:function(){
var node=this.containerNode||this.domNode;
var _884=new dojo.xml.Parse();
var frag=_884.parseElement(node,null,true);
dojo.widget.getParser().createSubComponents(frag,this);
},setHandler:function(_886){
var fcn=dojo.lang.isFunction(_886)?_886:window[_886];
if(!dojo.lang.isFunction(fcn)){
this._handleDefaults("Unable to set handler, '"+_886+"' not a function.","onExecError",true);
return;
}
this.handler=function(){
return fcn.apply(this,arguments);
};
},_runHandler:function(){
var ret=true;
if(dojo.lang.isFunction(this.handler)){
this.handler(this,this.domNode);
ret=false;
}
this.onLoad();
return ret;
},_executeScripts:function(_889){
var self=this;
var tmp="",code="";
for(var i=0;i<_889.length;i++){
if(_889[i].path){
dojo.io.bind(this._cacheSetting({"url":_889[i].path,"load":function(type,_88f){
dojo.lang.hitch(self,tmp=";"+_88f);
},"error":function(type,_891){
_891.text=type+" downloading remote script";
self._handleDefaults.call(self,_891,"onExecError","debug");
},"mimetype":"text/plain","sync":true},this.cacheContent));
code+=tmp;
}else{
code+=_889[i];
}
}
try{
if(this.scriptSeparation){
delete this.scriptScope;
this.scriptScope=new (new Function("_container_",code+"; return this;"))(self);
}else{
var djg=dojo.global();
if(djg.execScript){
djg.execScript(code);
}else{
var djd=dojo.doc();
var sc=djd.createElement("script");
sc.appendChild(djd.createTextNode(code));
(this.containerNode||this.domNode).appendChild(sc);
}
}
}
catch(e){
e.text="Error running scripts from content:\n"+e.description;
this._handleDefaults(e,"onExecError","debug");
}
}});
dojo.provide("dojo.html.selection");
dojo.html.selectionType={NONE:0,TEXT:1,CONTROL:2};
dojo.html.clearSelection=function(){
var _895=dojo.global();
var _896=dojo.doc();
try{
if(_895["getSelection"]){
if(dojo.render.html.safari){
_895.getSelection().collapse();
}else{
_895.getSelection().removeAllRanges();
}
}else{
if(_896.selection){
if(_896.selection.empty){
_896.selection.empty();
}else{
if(_896.selection.clear){
_896.selection.clear();
}
}
}
}
return true;
}
catch(e){
dojo.debug(e);
return false;
}
};
dojo.html.disableSelection=function(_897){
_897=dojo.byId(_897)||dojo.body();
var h=dojo.render.html;
if(h.mozilla){
_897.style.MozUserSelect="none";
}else{
if(h.safari){
_897.style.KhtmlUserSelect="none";
}else{
if(h.ie){
_897.unselectable="on";
}else{
return false;
}
}
}
return true;
};
dojo.html.enableSelection=function(_899){
_899=dojo.byId(_899)||dojo.body();
var h=dojo.render.html;
if(h.mozilla){
_899.style.MozUserSelect="";
}else{
if(h.safari){
_899.style.KhtmlUserSelect="";
}else{
if(h.ie){
_899.unselectable="off";
}else{
return false;
}
}
}
return true;
};
dojo.html.selectInputText=function(_89b){
var _89c=dojo.global();
var _89d=dojo.doc();
_89b=dojo.byId(_89b);
if(_89d["selection"]&&dojo.body()["createTextRange"]){
var _89e=_89b.createTextRange();
_89e.moveStart("character",0);
_89e.moveEnd("character",_89b.value.length);
_89e.select();
}else{
if(_89c["getSelection"]){
var _89f=_89c.getSelection();
_89b.setSelectionRange(0,_89b.value.length);
}
}
_89b.focus();
};
dojo.lang.mixin(dojo.html.selection,{getType:function(){
if(dojo.doc()["selection"]){
return dojo.html.selectionType[dojo.doc().selection.type.toUpperCase()];
}else{
var _8a0=dojo.html.selectionType.TEXT;
var oSel;
try{
oSel=dojo.global().getSelection();
}
catch(e){
}
if(oSel&&oSel.rangeCount==1){
var _8a2=oSel.getRangeAt(0);
if(_8a2.startContainer==_8a2.endContainer&&(_8a2.endOffset-_8a2.startOffset)==1&&_8a2.startContainer.nodeType!=dojo.dom.TEXT_NODE){
_8a0=dojo.html.selectionType.CONTROL;
}
}
return _8a0;
}
},isCollapsed:function(){
var _8a3=dojo.global();
var _8a4=dojo.doc();
if(_8a4["selection"]){
return _8a4.selection.createRange().text=="";
}else{
if(_8a3["getSelection"]){
var _8a5=_8a3.getSelection();
if(dojo.lang.isString(_8a5)){
return _8a5=="";
}else{
return _8a5.isCollapsed||_8a5.toString()=="";
}
}
}
},getSelectedElement:function(){
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
if(dojo.doc()["selection"]){
var _8a6=dojo.doc().selection.createRange();
if(_8a6&&_8a6.item){
return dojo.doc().selection.createRange().item(0);
}
}else{
var _8a7=dojo.global().getSelection();
return _8a7.anchorNode.childNodes[_8a7.anchorOffset];
}
}
},getParentElement:function(){
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
var p=dojo.html.selection.getSelectedElement();
if(p){
return p.parentNode;
}
}else{
if(dojo.doc()["selection"]){
return dojo.doc().selection.createRange().parentElement();
}else{
var _8a9=dojo.global().getSelection();
if(_8a9){
var node=_8a9.anchorNode;
while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){
node=node.parentNode;
}
return node;
}
}
}
},getSelectedText:function(){
if(dojo.doc()["selection"]){
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
return null;
}
return dojo.doc().selection.createRange().text;
}else{
var _8ab=dojo.global().getSelection();
if(_8ab){
return _8ab.toString();
}
}
},getSelectedHtml:function(){
if(dojo.doc()["selection"]){
if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){
return null;
}
return dojo.doc().selection.createRange().htmlText;
}else{
var _8ac=dojo.global().getSelection();
if(_8ac&&_8ac.rangeCount){
var frag=_8ac.getRangeAt(0).cloneContents();
var div=document.createElement("div");
div.appendChild(frag);
return div.innerHTML;
}
return null;
}
},hasAncestorElement:function(_8af){
return (dojo.html.selection.getAncestorElement.apply(this,arguments)!=null);
},getAncestorElement:function(_8b0){
var node=dojo.html.selection.getSelectedElement()||dojo.html.selection.getParentElement();
return dojo.html.selection.getParentOfType(node,arguments);
},getParentOfType:function(node,tags){
while(node){
if(dojo.html.selection.isTag(node,tags).length>0){
return node;
}
node=node.parentNode;
}
return null;
},isTag:function(node,tags){
if(node&&node.tagName){
for(var i=0;i<tags.length;i++){
if(node.tagName.toLowerCase()==String(tags[i]).toLowerCase()){
return String(tags[i]).toLowerCase();
}
}
}
return "";
},selectElement:function(_8b7){
var _8b8=dojo.global();
var _8b9=dojo.doc();
_8b7=dojo.byId(_8b7);
if(_8b9.selection&&dojo.body().createTextRange){
try{
var _8ba=dojo.body().createControlRange();
_8ba.addElement(_8b7);
_8ba.select();
}
catch(e){
dojo.html.selection.selectElementChildren(_8b7);
}
}else{
if(_8b8["getSelection"]){
var _8bb=_8b8.getSelection();
if(_8bb["removeAllRanges"]){
var _8ba=_8b9.createRange();
_8ba.selectNode(_8b7);
_8bb.removeAllRanges();
_8bb.addRange(_8ba);
}
}
}
},selectElementChildren:function(_8bc){
var _8bd=dojo.global();
var _8be=dojo.doc();
_8bc=dojo.byId(_8bc);
if(_8be.selection&&dojo.body().createTextRange){
var _8bf=_8bc.ownerDocument.body.createTextRange();
_8bf.moveToElementText(_8bc);
_8bf.select();
}else{
if(_8bd["getSelection"]){
var _8c0=_8bd.getSelection();
if(_8c0["setBaseAndExtent"]){
_8c0.setBaseAndExtent(_8bc,0,_8bc,_8bc.innerText.length-1);
}else{
if(_8c0["selectAllChildren"]){
_8c0.selectAllChildren(_8bc);
}
}
}
}
},getBookmark:function(){
var _8c1;
var _8c2=dojo.doc();
if(_8c2["selection"]){
var _8c3=_8c2.selection.createRange();
if(_8c2.selection.type.toUpperCase()=="CONTROL"){
if(_8c3.length){
_8c1=[];
var i=0;
while(i<_8c3.length){
_8c1.push(_8c3.item(i++));
}
}else{
_8c1=null;
}
}else{
_8c1=_8c3.getBookmark();
}
}else{
var _8c5;
try{
_8c5=dojo.global().getSelection();
}
catch(e){
}
if(_8c5){
var _8c3=_8c5.getRangeAt(0);
_8c1=_8c3.cloneRange();
}else{
dojo.debug("No idea how to store the current selection for this browser!");
}
}
return _8c1;
},moveToBookmark:function(_8c6){
var _8c7=dojo.doc();
if(_8c7["selection"]){
if(dojo.lang.isArray(_8c6)){
var _8c8=_8c7.body.createControlRange();
var i=0;
while(i<_8c6.length){
_8c8.addElement(_8c6[i++]);
}
_8c8.select();
}else{
var _8c8=_8c7.selection.createRange();
_8c8.moveToBookmark(_8c6);
_8c8.select();
}
}else{
var _8ca;
try{
_8ca=dojo.global().getSelection();
}
catch(e){
}
if(_8ca&&_8ca["removeAllRanges"]){
_8ca.removeAllRanges();
_8ca.addRange(_8c6);
}else{
dojo.debug("No idea how to restore selection for this browser!");
}
}
},collapse:function(_8cb){
if(dojo.global()["getSelection"]){
var _8cc=dojo.global().getSelection();
if(_8cc.removeAllRanges){
if(_8cb){
_8cc.collapseToStart();
}else{
_8cc.collapseToEnd();
}
}else{
dojo.global().getSelection().collapse(_8cb);
}
}else{
if(dojo.doc().selection){
var _8cd=dojo.doc().selection.createRange();
_8cd.collapse(_8cb);
_8cd.select();
}
}
},remove:function(){
if(dojo.doc().selection){
var _8ce=dojo.doc().selection;
if(_8ce.type.toUpperCase()!="NONE"){
_8ce.clear();
}
return _8ce;
}else{
var _8ce=dojo.global().getSelection();
_8ce.deleteFromDocument();
return _8ce;
}
}});
dojo.provide("dojo.widget.SplitContainer");
dojo.widget.defineWidget("dojo.widget.SplitContainer",dojo.widget.HtmlWidget,function(){
this.sizers=[];
},{isContainer:true,templateCssString:".dojoSplitContainer{\n\tposition: relative;\n\toverflow: hidden;\n\tdisplay: block;\n}\n\n.dojoSplitPane{\n\tposition: absolute;\n}\n\n.dojoSplitContainerSizerH,\n.dojoSplitContainerSizerV {\n\tfont-size: 1px;\n\tcursor: move;\n\tcursor: w-resize;\n\tbackground-color: #F0F0F0;\n\tborder: 1px solid;\n\tborder-color: #F0F0F0 #E1E1E1 #F0F0F0 #FDFDFD;\n\tmargin: 0;\n}\n\n.dojoSplitContainerSizerV {\n\tcursor: n-resize;\n}\n\n.dojoSplitContainerVirtualSizerH,\n.dojoSplitContainerVirtualSizerV {\n\tfont-size: 1px;\n\tcursor: move;\n\tcursor: w-resize;\n\tbackground-color: E1E1E1;\n\t-moz-opacity: 0.5;\n\topacity: 0.5;\n\tfilter: Alpha(Opacity=50);\n\tmargin: 0;\n}\n\n.dojoSplitContainerVirtualSizerV {\n\tcursor: n-resize;\n}\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/SplitContainer.css"),activeSizing:false,sizerWidth:15,orientation:"horizontal",persist:true,postMixInProperties:function(){
dojo.widget.SplitContainer.superclass.postMixInProperties.apply(this,arguments);
this.isHorizontal=(this.orientation=="horizontal");
},fillInTemplate:function(){
dojo.widget.SplitContainer.superclass.fillInTemplate.apply(this,arguments);
dojo.html.addClass(this.domNode,"dojoSplitContainer");
if(dojo.render.html.moz){
this.domNode.style.overflow="-moz-scrollbars-none";
}
var _8cf=dojo.html.getContentBox(this.domNode);
this.paneWidth=_8cf.width;
this.paneHeight=_8cf.height;
},onResized:function(e){
var _8d1=dojo.html.getContentBox(this.domNode);
this.paneWidth=_8d1.width;
this.paneHeight=_8d1.height;
this._layoutPanels();
},postCreate:function(args,_8d3,_8d4){
dojo.widget.SplitContainer.superclass.postCreate.apply(this,arguments);
for(var i=0;i<this.children.length;i++){
with(this.children[i].domNode.style){
position="absolute";
}
dojo.html.addClass(this.children[i].domNode,"dojoSplitPane");
if(i==this.children.length-1){
break;
}
this._addSizer();
}
if(typeof this.sizerWidth=="object"){
try{
this.sizerWidth=parseInt(this.sizerWidth.toString());
}
catch(e){
this.sizerWidth=15;
}
}
this.virtualSizer=document.createElement("div");
this.virtualSizer.style.position="relative";
this.virtualSizer.style.zIndex=10;
this.virtualSizer.className=this.isHorizontal?"dojoSplitContainerVirtualSizerH":"dojoSplitContainerVirtualSizerV";
this.domNode.appendChild(this.virtualSizer);
dojo.html.disableSelection(this.virtualSizer);
if(this.persist){
this._restoreState();
}
this.resizeSoon();
},_injectChild:function(_8d6){
with(_8d6.domNode.style){
position="absolute";
}
dojo.html.addClass(_8d6.domNode,"dojoSplitPane");
},_addSizer:function(){
var i=this.sizers.length;
this.sizers[i]=document.createElement("div");
this.sizers[i].style.position="absolute";
this.sizers[i].className=this.isHorizontal?"dojoSplitContainerSizerH":"dojoSplitContainerSizerV";
var self=this;
var _8d9=(function(){
var _8da=i;
return function(e){
self.beginSizing(e,_8da);
};
})();
dojo.event.connect(this.sizers[i],"onmousedown",_8d9);
this.domNode.appendChild(this.sizers[i]);
dojo.html.disableSelection(this.sizers[i]);
},removeChild:function(_8dc){
if(this.sizers.length>0){
for(var x=0;x<this.children.length;x++){
if(this.children[x]===_8dc){
var i=this.sizers.length-1;
this.domNode.removeChild(this.sizers[i]);
this.sizers.length=i;
break;
}
}
}
dojo.widget.SplitContainer.superclass.removeChild.call(this,_8dc,arguments);
this.onResized();
},addChild:function(_8df){
dojo.widget.SplitContainer.superclass.addChild.apply(this,arguments);
this._injectChild(_8df);
if(this.children.length>1){
this._addSizer();
}
this._layoutPanels();
},_layoutPanels:function(){
if(this.children.length==0){
return;
}
var _8e0=this.isHorizontal?this.paneWidth:this.paneHeight;
if(this.children.length>1){
_8e0-=this.sizerWidth*(this.children.length-1);
}
var _8e1=0;
for(var i=0;i<this.children.length;i++){
_8e1+=this.children[i].sizeShare;
}
var _8e3=_8e0/_8e1;
var _8e4=0;
for(var i=0;i<this.children.length-1;i++){
var size=Math.round(_8e3*this.children[i].sizeShare);
this.children[i].sizeActual=size;
_8e4+=size;
}
this.children[this.children.length-1].sizeActual=_8e0-_8e4;
this._checkSizes();
var pos=0;
var size=this.children[0].sizeActual;
this._movePanel(this.children[0],pos,size);
this.children[0].position=pos;
pos+=size;
for(var i=1;i<this.children.length;i++){
this._moveSlider(this.sizers[i-1],pos,this.sizerWidth);
this.sizers[i-1].position=pos;
pos+=this.sizerWidth;
size=this.children[i].sizeActual;
this._movePanel(this.children[i],pos,size);
this.children[i].position=pos;
pos+=size;
}
},_movePanel:function(_8e7,pos,size){
if(this.isHorizontal){
_8e7.domNode.style.left=pos+"px";
_8e7.domNode.style.top=0;
_8e7.resizeTo(size,this.paneHeight);
}else{
_8e7.domNode.style.left=0;
_8e7.domNode.style.top=pos+"px";
_8e7.resizeTo(this.paneWidth,size);
}
},_moveSlider:function(_8ea,pos,size){
if(this.isHorizontal){
_8ea.style.left=pos+"px";
_8ea.style.top=0;
dojo.html.setMarginBox(_8ea,{width:size,height:this.paneHeight});
}else{
_8ea.style.left=0;
_8ea.style.top=pos+"px";
dojo.html.setMarginBox(_8ea,{width:this.paneWidth,height:size});
}
},_growPane:function(_8ed,pane){
if(_8ed>0){
if(pane.sizeActual>pane.sizeMin){
if((pane.sizeActual-pane.sizeMin)>_8ed){
pane.sizeActual=pane.sizeActual-_8ed;
_8ed=0;
}else{
_8ed-=pane.sizeActual-pane.sizeMin;
pane.sizeActual=pane.sizeMin;
}
}
}
return _8ed;
},_checkSizes:function(){
var _8ef=0;
var _8f0=0;
for(var i=0;i<this.children.length;i++){
_8f0+=this.children[i].sizeActual;
_8ef+=this.children[i].sizeMin;
}
if(_8ef<=_8f0){
var _8f2=0;
for(var i=0;i<this.children.length;i++){
if(this.children[i].sizeActual<this.children[i].sizeMin){
_8f2+=this.children[i].sizeMin-this.children[i].sizeActual;
this.children[i].sizeActual=this.children[i].sizeMin;
}
}
if(_8f2>0){
if(this.isDraggingLeft){
for(var i=this.children.length-1;i>=0;i--){
_8f2=this._growPane(_8f2,this.children[i]);
}
}else{
for(var i=0;i<this.children.length;i++){
_8f2=this._growPane(_8f2,this.children[i]);
}
}
}
}else{
for(var i=0;i<this.children.length;i++){
this.children[i].sizeActual=Math.round(_8f0*(this.children[i].sizeMin/_8ef));
}
}
},beginSizing:function(e,i){
this.paneBefore=this.children[i];
this.paneAfter=this.children[i+1];
this.isSizing=true;
this.sizingSplitter=this.sizers[i];
if(!this.cover){
this.cover=dojo.doc().createElement("div");
this.domNode.appendChild(this.cover);
var s=this.cover.style;
s.position="absolute";
s.zIndex=1;
s.top=0;
s.left=0;
s.width="100%";
s.height="100%";
}else{
this.cover.style.zIndex=1;
}
this.sizingSplitter.style.zIndex=2;
this.originPos=dojo.html.getAbsolutePosition(this.children[0].domNode,true,dojo.html.boxSizing.MARGIN_BOX);
if(this.isHorizontal){
var _8f6=(e.layerX?e.layerX:e.offsetX);
var _8f7=e.pageX;
this.originPos=this.originPos.x;
}else{
var _8f6=(e.layerY?e.layerY:e.offsetY);
var _8f7=e.pageY;
this.originPos=this.originPos.y;
}
this.startPoint=this.lastPoint=_8f7;
this.screenToClientOffset=_8f7-_8f6;
this.dragOffset=this.lastPoint-this.paneBefore.sizeActual-this.originPos-this.paneBefore.position;
if(!this.activeSizing){
this._showSizingLine();
}
dojo.event.connect(document.documentElement,"onmousemove",this,"changeSizing");
dojo.event.connect(document.documentElement,"onmouseup",this,"endSizing");
dojo.event.browser.stopEvent(e);
},changeSizing:function(e){
this.lastPoint=this.isHorizontal?e.pageX:e.pageY;
if(this.activeSizing){
this.movePoint();
this._updateSize();
}else{
this.movePoint();
this._moveSizingLine();
}
dojo.event.browser.stopEvent(e);
},endSizing:function(e){
if(this.cover){
this.cover.style.zIndex=-1;
}
if(!this.activeSizing){
this._hideSizingLine();
}
this._updateSize();
this.isSizing=false;
dojo.event.disconnect(document.documentElement,"onmousemove",this,"changeSizing");
dojo.event.disconnect(document.documentElement,"onmouseup",this,"endSizing");
if(this.persist){
this._saveState(this);
}
},movePoint:function(){
var p=this.lastPoint-this.screenToClientOffset;
var a=p-this.dragOffset;
a=this.legaliseSplitPoint(a);
p=a+this.dragOffset;
this.lastPoint=p+this.screenToClientOffset;
},legaliseSplitPoint:function(a){
a+=this.sizingSplitter.position;
this.isDraggingLeft=(a>0)?true:false;
if(!this.activeSizing){
if(a<this.paneBefore.position+this.paneBefore.sizeMin){
a=this.paneBefore.position+this.paneBefore.sizeMin;
}
if(a>this.paneAfter.position+(this.paneAfter.sizeActual-(this.sizerWidth+this.paneAfter.sizeMin))){
a=this.paneAfter.position+(this.paneAfter.sizeActual-(this.sizerWidth+this.paneAfter.sizeMin));
}
}
a-=this.sizingSplitter.position;
this._checkSizes();
return a;
},_updateSize:function(){
var pos=this.lastPoint-this.dragOffset-this.originPos;
var _8fe=this.paneBefore.position;
var _8ff=this.paneAfter.position+this.paneAfter.sizeActual;
this.paneBefore.sizeActual=pos-_8fe;
this.paneAfter.position=pos+this.sizerWidth;
this.paneAfter.sizeActual=_8ff-this.paneAfter.position;
for(var i=0;i<this.children.length;i++){
this.children[i].sizeShare=this.children[i].sizeActual;
}
this._layoutPanels();
},_showSizingLine:function(){
this._moveSizingLine();
if(this.isHorizontal){
dojo.html.setMarginBox(this.virtualSizer,{width:this.sizerWidth,height:this.paneHeight});
}else{
dojo.html.setMarginBox(this.virtualSizer,{width:this.paneWidth,height:this.sizerWidth});
}
this.virtualSizer.style.display="block";
},_hideSizingLine:function(){
this.virtualSizer.style.display="none";
},_moveSizingLine:function(){
var pos=this.lastPoint-this.startPoint+this.sizingSplitter.position;
if(this.isHorizontal){
this.virtualSizer.style.left=pos+"px";
}else{
var pos=(this.lastPoint-this.startPoint)+this.sizingSplitter.position;
this.virtualSizer.style.top=pos+"px";
}
},_getCookieName:function(i){
return this.widgetId+"_"+i;
},_restoreState:function(){
for(var i=0;i<this.children.length;i++){
var _904=this._getCookieName(i);
var _905=dojo.io.cookie.getCookie(_904);
if(_905!=null){
var pos=parseInt(_905);
if(typeof pos=="number"){
this.children[i].sizeShare=pos;
}
}
}
},_saveState:function(){
for(var i=0;i<this.children.length;i++){
var _908=this._getCookieName(i);
dojo.io.cookie.setCookie(_908,this.children[i].sizeShare,null,null,null,null);
}
}});
dojo.lang.extend(dojo.widget.Widget,{sizeMin:10,sizeShare:10});
dojo.widget.defineWidget("dojo.widget.SplitContainerPanel",dojo.widget.ContentPane,{});
dojo.kwCompoundRequire({common:["dojo.html.common","dojo.html.style"]});
dojo.provide("dojo.html.*");
dojo.kwCompoundRequire({common:["dojo.dom"],browser:["dojo.html.*"],dashboard:["dojo.html.*"]});
dojo.provide("dojo.xml.*");

/*
	Copyright (c) 2004-2006, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/community/licensing.shtml
*/

dojo.provide("dojo.html.iframe");
dojo.require("dojo.html.util");

// thanks burstlib!
dojo.html.iframeContentWindow = function(/* HTMLIFrameElement */iframe_el) {
	//	summary
	//	returns the window reference of the passed iframe
	var win = dojo.html.getDocumentWindow(dojo.html.iframeContentDocument(iframe_el)) ||
		// Moz. TODO: is this available when defaultView isn't?
		dojo.html.iframeContentDocument(iframe_el).__parent__ ||
		(iframe_el.name && document.frames[iframe_el.name]) || null;
	return win;	//	Window
}

dojo.html.iframeContentDocument = function(/* HTMLIFrameElement */iframe_el){
	//	summary
	//	returns a reference to the document object inside iframe_el
	var doc = iframe_el.contentDocument // W3
		|| ((iframe_el.contentWindow)&&(iframe_el.contentWindow.document))	// IE
		|| ((iframe_el.name)&&(document.frames[iframe_el.name])&&(document.frames[iframe_el.name].document)) 
		|| null;
	return doc;	//	HTMLDocument
}

dojo.html.BackgroundIframe = function(/* HTMLElement */node) {
	//	summary
	//	For IE z-index schenanigans
	//	Two possible uses:
	//	1. new dojo.html.BackgroundIframe(node)
	//		Makes a background iframe as a child of node, that fills area (and position) of node
	//	2. new dojo.html.BackgroundIframe()
	//		Attaches frame to dojo.body().  User must call size() to set size.
	if(dojo.render.html.ie55 || dojo.render.html.ie60) {
		var html="<iframe src='javascript:false'"
			+ "' style='position: absolute; left: 0px; top: 0px; width: 100%; height: 100%;"
			+ "z-index: -1; filter:Alpha(Opacity=\"0\");' "
			+ ">";
		this.iframe = dojo.doc().createElement(html);
		this.iframe.tabIndex = -1; // Magic to prevent iframe from getting focus on tab keypress - as style didnt work.
		if(node){
			node.appendChild(this.iframe);
			this.domNode=node;
		}else{
			dojo.body().appendChild(this.iframe);
			this.iframe.style.display="none";
		}
	}
}
dojo.lang.extend(dojo.html.BackgroundIframe, {
	iframe: null,
	onResized: function(){
		//	summary
		//	Resize event handler.
		// TODO: this function shouldn't be necessary but setting width=height=100% doesn't work!
		if(this.iframe && this.domNode && this.domNode.parentNode){ // No parentElement if onResized() timeout event occurs on a removed domnode
			var outer = dojo.html.getMarginBox(this.domNode);
			if (outer.width  == 0 || outer.height == 0 ){
				dojo.lang.setTimeout(this, this.onResized, 100);
				return;
			}
			this.iframe.style.width = outer.width + "px";
			this.iframe.style.height = outer.height + "px";
		}
	},

	size: function(/* HTMLElement */node) {
		// 	Call this function if the iframe is connected to dojo.body() rather than the node being shadowed 
		//	(TODO: erase)
		if(!this.iframe) { return; }
		var coords = dojo.html.toCoordinateObject(node, true, dojo.html.boxSizing.BORDER_BOX);
		this.iframe.style.width = coords.width + "px";
		this.iframe.style.height = coords.height + "px";
		this.iframe.style.left = coords.left + "px";
		this.iframe.style.top = coords.top + "px";
	},

	setZIndex: function(/* HTMLElement */node) {
		//	summary
		//	Sets the z-index of the background iframe.
		if(!this.iframe) { return; }
		if(dojo.dom.isNode(node)) {
			this.iframe.style.zIndex = dojo.html.getStyle(node, "z-index") - 1;
		} else if(!isNaN(node)) {
			this.iframe.style.zIndex = node;
		}
	},

	show: function() {
		//	summary
		//	show the iframe
		if(!this.iframe) { return; }
		this.iframe.style.display = "block";
	},

	hide: function() {
		//	summary
		//	hide the iframe
		if(!this.iframe) { return; }
		this.iframe.style.display = "none";
	},

	remove: function() {
		//	summary
		//	remove the iframe
		dojo.html.removeNode(this.iframe);
	}
});
/*
	Copyright (c) 2004-2006, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/community/licensing.shtml
*/

dojo.provide("dojo.widget.Dialog");

dojo.require("dojo.widget.*");
dojo.require("dojo.widget.ContentPane");
dojo.require("dojo.event.*");
dojo.require("dojo.gfx.color");
dojo.require("dojo.html.layout");
dojo.require("dojo.html.display");
dojo.require("dojo.html.iframe");

// summary
//	Mixin for widgets implementing a modal dialog
dojo.declare(
	"dojo.widget.ModalDialogBase", 
	null,
	{
		isContainer: true,

		// static variables
		shared: {bg: null, bgIframe: null},

		// String
		//	provide a focusable element or element id if you need to
		//	work around FF's tendency to send focus into outer space on hide
		focusElement: "",

		// String
		//	color of viewport when displaying a dialog
		bgColor: "black",
		
		// Number
		//	opacity (0~1) of viewport color (see bgColor attribute)
		bgOpacity: 0.4,

		// Boolean
		//	if true, readjusts the dialog (and dialog background) when the user moves the scrollbar
		followScroll: true,

		trapTabs: function(/*Event*/ e){
			// summary
			//	callback on focus
			if(e.target == this.tabStartOuter) {
				if(this._fromTrap) {
					this.tabStart.focus();
					this._fromTrap = false;
				} else {
					this._fromTrap = true;
					this.tabEnd.focus();
				}
			} else if (e.target == this.tabStart) {
				if(this._fromTrap) {
					this._fromTrap = false;
				} else {
					this._fromTrap = true;
					this.tabEnd.focus();
				}
			} else if(e.target == this.tabEndOuter) {
				if(this._fromTrap) {
					this.tabEnd.focus();
					this._fromTrap = false;
				} else {
					this._fromTrap = true;
					this.tabStart.focus();
				}
			} else if(e.target == this.tabEnd) {
				if(this._fromTrap) {
					this._fromTrap = false;
				} else {
					this._fromTrap = true;
					this.tabStart.focus();
				}
			}
		},

		clearTrap: function(/*Event*/ e) {
			// summary
			//	callback on blur
			var _this = this;
			setTimeout(function() {
				_this._fromTrap = false;
			}, 100);
		},

		postCreate: function() {
			// summary
			//	if the target mixin class already defined postCreate,
			//	dojo.widget.ModalDialogBase.prototype.postCreate.call(this)
			//	should be called in its postCreate()
			with(this.domNode.style){
				position = "absolute";
				zIndex = 999;
				display = "none";
				overflow = "visible";
			}
			var b = dojo.body();
			b.appendChild(this.domNode);

			if(!this.shared.bg){
				this.shared.bg = document.createElement("div");
				this.shared.bg.className = "dialogUnderlay";
				with(this.shared.bg.style){
					position = "absolute";
					left = top = "0px";
					zIndex = 998;
					display = "none";
				}
				this.setBackgroundColor(this.bgColor);
				b.appendChild(this.shared.bg);
				this.shared.bgIframe = new dojo.html.BackgroundIframe(this.shared.bg);
			}
		},

		setBackgroundColor: function(/*String*/ color) {
			// summary
			//	changes background color specified by "bgColor" parameter
			//	usage:
			//		setBackgrounColor("black");
			//		setBackgroundColor(0xff, 0xff, 0xff);
			if(arguments.length >= 3) {
				color = new dojo.gfx.color.Color(arguments[0], arguments[1], arguments[2]);
			} else {
				color = new dojo.gfx.color.Color(color);
			}
			this.shared.bg.style.backgroundColor = color.toString();
			return this.bgColor = color;
		},

		setBackgroundOpacity: function(/*Number*/ op) {
			// summary
			//	changes background opacity set by "bgOpacity" parameter
			if(arguments.length == 0) { op = this.bgOpacity; }
			dojo.html.setOpacity(this.shared.bg, op);
			try {
				this.bgOpacity = dojo.html.getOpacity(this.shared.bg);
			} catch (e) {
				this.bgOpacity = op;
			}
			return this.bgOpacity;
		},

		_sizeBackground: function() {
			if(this.bgOpacity > 0) {
				
				var viewport = dojo.html.getViewport();
				var h = viewport.height;
				var w = viewport.width;
				with(this.shared.bg.style){
					width = w + "px";
					height = h + "px";
				}
				var scroll_offset = dojo.html.getScroll().offset;
				this.shared.bg.style.top = scroll_offset.y + "px";
				this.shared.bg.style.left = scroll_offset.x + "px";
				// process twice since the scroll bar may have been removed
				// by the previous resizing
				var viewport = dojo.html.getViewport();
				if (viewport.width != w) { this.shared.bg.style.width = viewport.width + "px"; }
				if (viewport.height != h) { this.shared.bg.style.height = viewport.height + "px"; }
			}
		},

		_showBackground: function() {
			if(this.bgOpacity > 0) {
				this.shared.bg.style.display = "block";
			}
		},

		placeModalDialog: function() {
			var scroll_offset = dojo.html.getScroll().offset;
			var viewport_size = dojo.html.getViewport();
			
			// find the size of the dialog
			var mb = dojo.html.getMarginBox(this.containerNode);
			
			var x = scroll_offset.x + (viewport_size.width - mb.width)/2;
			var y = scroll_offset.y + (viewport_size.height - mb.height)/2;

			with(this.domNode.style){
				left = x + "px";
				top = y + "px";
			}
		},

		showModalDialog: function() {
			// summary
			//	call this function in show() of subclass
			if (this.followScroll && !this._scrollConnected){
				this._scrollConnected = true;
				dojo.event.connect(window, "onscroll", this, "_onScroll");
			}
			
			this.setBackgroundOpacity();
			this._sizeBackground();
			this._showBackground();
		},

		hideModalDialog: function(){
			// summary
			//	call this function in hide() of subclass

			// workaround for FF focus going into outer space
			if (this.focusElement) { 
				dojo.byId(this.focusElement).focus(); 
				dojo.byId(this.focusElement).blur();
			}

			this.shared.bg.style.display = "none";
			this.shared.bg.style.width = this.shared.bg.style.height = "1px";

			if (this._scrollConnected){
				this._scrollConnected = false;
				dojo.event.disconnect(window, "onscroll", this, "_onScroll");
			}
		},

		_onScroll: function(){
			var scroll_offset = dojo.html.getScroll().offset;
			this.shared.bg.style.top = scroll_offset.y + "px";
			this.shared.bg.style.left = scroll_offset.x + "px";
			this.placeModalDialog();
		},

		checkSize: function() {
			if(this.isShowing()){
				this._sizeBackground();
				this.placeModalDialog();
				this.onResized();
			}
		}
	});

// summary
//	Pops up a modal dialog window, blocking access to the screen and also graying out the screen
//	Dialog is extended from ContentPane so it supports all the same parameters (href, etc.)
dojo.widget.defineWidget(
	"dojo.widget.Dialog",
	[dojo.widget.ContentPane, dojo.widget.ModalDialogBase],
	{
		templatePath: dojo.uri.dojoUri("src/widget/templates/Dialog.html"),

		// Integer
		//	number of seconds for which the user cannot dismiss the dialog
		blockDuration: 0,
		
		// Integer
		//	if set, this controls the number of seconds the dialog will be displayed before automatically disappearing
		lifetime: 0,

		show: function() {
			if(this.lifetime){
				this.timeRemaining = this.lifetime;
				if(!this.blockDuration){
					dojo.event.connect(this.shared.bg, "onclick", this, "hide");
				}else{
					dojo.event.disconnect(this.shared.bg, "onclick", this, "hide");
				}
				if(this.timerNode){
					this.timerNode.innerHTML = Math.ceil(this.timeRemaining/1000);
				}
				if(this.blockDuration && this.closeNode){
					if(this.lifetime > this.blockDuration){
						this.closeNode.style.visibility = "hidden";
					}else{
						this.closeNode.style.display = "none";
					}
				}
				this.timer = setInterval(dojo.lang.hitch(this, "_onTick"), 100);
			}

			this.showModalDialog();
			dojo.widget.Dialog.superclass.show.call(this);
		},

		onLoad: function(){
			// when href is specified we need to reposition
			// the dialog after the data is loaded
			this.placeModalDialog();
			dojo.widget.Dialog.superclass.onLoad.call(this);
		},
		
		fillInTemplate: function(){
			// dojo.event.connect(this.domNode, "onclick", this, "killEvent");
		},

		hide: function(){
			this.hideModalDialog();
			dojo.widget.Dialog.superclass.hide.call(this);

			if(this.timer){
				clearInterval(this.timer);
			}
		},
		
		setTimerNode: function(node){
			// summary
			//	specify into which node to write the remaining # of seconds
			// TODO: make this a parameter too
			this.timerNode = node;
		},

		setCloseControl: function(node) {
			// summary
			//	specify which node is the close button for this dialog
			// TODO: make this a parameter too
			this.closeNode = node;
			dojo.event.connect(node, "onclick", this, "hide");
		},

		setShowControl: function(node) {
			// summary
			//	when specified node is clicked, show this dialog
			// TODO: make this a parameter too
			dojo.event.connect(node, "onclick", this, "show");
		},
		
		_onTick: function(){
			// summary
			//	callback every second that the timer clicks
			if(this.timer){
				this.timeRemaining -= 100;
				if(this.lifetime - this.timeRemaining >= this.blockDuration){
					dojo.event.connect(this.shared.bg, "onclick", this, "hide");
					if(this.closeNode){
						this.closeNode.style.visibility = "visible";
					}
				}
				if(!this.timeRemaining){
					clearInterval(this.timer);
					this.hide();
				}else if(this.timerNode){
					this.timerNode.innerHTML = Math.ceil(this.timeRemaining/1000);
				}
			}
		}
	}
);
var Prototype={Version:"1.5.1.1",Browser:{IE:!!(window.attachEvent&&!window.opera),Opera:!!window.opera,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1},BrowserFeatures:{XPath:!!document.evaluate,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:(document.createElement("div").__proto__!==document.createElement("form").__proto__)},ScriptFragment:"<script[^>]*>([\\S\\s]*?)</script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){
},K:function(x){
return x;
}};
var Class={create:function(){
return function(){
this.initialize.apply(this,arguments);
};
}};
var Abstract=new Object();
Object.extend=function(_2,_3){
for(var _4 in _3){
_2[_4]=_3[_4];
}
return _2;
};
Object.extend(Object,{inspect:function(_5){
try{
if(_5===undefined){
return "undefined";
}
if(_5===null){
return "null";
}
return _5.inspect?_5.inspect():_5.toString();
}
catch(e){
if(e instanceof RangeError){
return "...";
}
throw e;
}
},toJSON:function(_6){
var _7=typeof _6;
switch(_7){
case "undefined":
case "function":
case "unknown":
return;
case "boolean":
return _6.toString();
}
if(_6===null){
return "null";
}
if(_6.toJSON){
return _6.toJSON();
}
if(_6.ownerDocument===document){
return;
}
var _8=[];
for(var _9 in _6){
var _a=Object.toJSON(_6[_9]);
if(_a!==undefined){
_8.push(_9.toJSON()+": "+_a);
}
}
return "{"+_8.join(", ")+"}";
},keys:function(_b){
var _c=[];
for(var _d in _b){
_c.push(_d);
}
return _c;
},values:function(_e){
var _f=[];
for(var _10 in _e){
_f.push(_e[_10]);
}
return _f;
},clone:function(_11){
return Object.extend({},_11);
}});
Function.prototype.bind=function(){
var _12=this,_13=$A(arguments),_14=_13.shift();
return function(){
return _12.apply(_14,_13.concat($A(arguments)));
};
};
Function.prototype.bindAsEventListener=function(_15){
var _16=this,_17=$A(arguments),_15=_17.shift();
return function(_18){
return _16.apply(_15,[_18||window.event].concat(_17));
};
};
Object.extend(Number.prototype,{toColorPart:function(){
return this.toPaddedString(2,16);
},succ:function(){
return this+1;
},times:function(_19){
$R(0,this,true).each(_19);
return this;
},toPaddedString:function(_1a,_1b){
var _1c=this.toString(_1b||10);
return "0".times(_1a-_1c.length)+_1c;
},toJSON:function(){
return isFinite(this)?this.toString():"null";
}});
Date.prototype.toJSON=function(){
return "\""+this.getFullYear()+"-"+(this.getMonth()+1).toPaddedString(2)+"-"+this.getDate().toPaddedString(2)+"T"+this.getHours().toPaddedString(2)+":"+this.getMinutes().toPaddedString(2)+":"+this.getSeconds().toPaddedString(2)+"\"";
};
var Try={these:function(){
var _1d;
for(var i=0,_1f=arguments.length;i<_1f;i++){
var _20=arguments[i];
try{
_1d=_20();
break;
}
catch(e){
}
}
return _1d;
}};
var PeriodicalExecuter=Class.create();
PeriodicalExecuter.prototype={initialize:function(_21,_22){
this.callback=_21;
this.frequency=_22;
this.currentlyExecuting=false;
this.registerCallback();
},registerCallback:function(){
this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000);
},stop:function(){
if(!this.timer){
return;
}
clearInterval(this.timer);
this.timer=null;
},onTimerEvent:function(){
if(!this.currentlyExecuting){
try{
this.currentlyExecuting=true;
this.callback(this);
}
finally{
this.currentlyExecuting=false;
}
}
}};
Object.extend(String,{interpret:function(_23){
return _23==null?"":String(_23);
},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});
Object.extend(String.prototype,{gsub:function(_24,_25){
var _26="",_27=this,_28;
_25=arguments.callee.prepareReplacement(_25);
while(_27.length>0){
if(_28=_27.match(_24)){
_26+=_27.slice(0,_28.index);
_26+=String.interpret(_25(_28));
_27=_27.slice(_28.index+_28[0].length);
}else{
_26+=_27,_27="";
}
}
return _26;
},sub:function(_29,_2a,_2b){
_2a=this.gsub.prepareReplacement(_2a);
_2b=_2b===undefined?1:_2b;
return this.gsub(_29,function(_2c){
if(--_2b<0){
return _2c[0];
}
return _2a(_2c);
});
},scan:function(_2d,_2e){
this.gsub(_2d,_2e);
return this;
},truncate:function(_2f,_30){
_2f=_2f||30;
_30=_30===undefined?"...":_30;
return this.length>_2f?this.slice(0,_2f-_30.length)+_30:this;
},strip:function(){
return this.replace(/^\s+/,"").replace(/\s+$/,"");
},stripTags:function(){
return this.replace(/<\/?[^>]+>/gi,"");
},stripScripts:function(){
return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"");
},extractScripts:function(){
var _31=new RegExp(Prototype.ScriptFragment,"img");
var _32=new RegExp(Prototype.ScriptFragment,"im");
return (this.match(_31)||[]).map(function(_33){
return (_33.match(_32)||["",""])[1];
});
},evalScripts:function(){
return this.extractScripts().map(function(_34){
return eval(_34);
});
},escapeHTML:function(){
var _35=arguments.callee;
_35.text.data=this;
return _35.div.innerHTML;
},unescapeHTML:function(){
var div=document.createElement("div");
div.innerHTML=this.stripTags();
return div.childNodes[0]?(div.childNodes.length>1?$A(div.childNodes).inject("",function(_37,_38){
return _37+_38.nodeValue;
}):div.childNodes[0].nodeValue):"";
},toQueryParams:function(_39){
var _3a=this.strip().match(/([^?#]*)(#.*)?$/);
if(!_3a){
return {};
}
return _3a[1].split(_39||"&").inject({},function(_3b,_3c){
if((_3c=_3c.split("="))[0]){
var key=decodeURIComponent(_3c.shift());
var _3e=_3c.length>1?_3c.join("="):_3c[0];
if(_3e!=undefined){
_3e=decodeURIComponent(_3e);
}
if(key in _3b){
if(_3b[key].constructor!=Array){
_3b[key]=[_3b[key]];
}
_3b[key].push(_3e);
}else{
_3b[key]=_3e;
}
}
return _3b;
});
},toArray:function(){
return this.split("");
},succ:function(){
return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1);
},times:function(_3f){
var _40="";
for(var i=0;i<_3f;i++){
_40+=this;
}
return _40;
},camelize:function(){
var _42=this.split("-"),len=_42.length;
if(len==1){
return _42[0];
}
var _44=this.charAt(0)=="-"?_42[0].charAt(0).toUpperCase()+_42[0].substring(1):_42[0];
for(var i=1;i<len;i++){
_44+=_42[i].charAt(0).toUpperCase()+_42[i].substring(1);
}
return _44;
},capitalize:function(){
return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase();
},underscore:function(){
return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase();
},dasherize:function(){
return this.gsub(/_/,"-");
},inspect:function(_46){
var _47=this.gsub(/[\x00-\x1f\\]/,function(_48){
var _49=String.specialChar[_48[0]];
return _49?_49:"\\u00"+_48[0].charCodeAt().toPaddedString(2,16);
});
if(_46){
return "\""+_47.replace(/"/g,"\\\"")+"\"";
}
return "'"+_47.replace(/'/g,"\\'")+"'";
},toJSON:function(){
return this.inspect(true);
},unfilterJSON:function(_4a){
return this.sub(_4a||Prototype.JSONFilter,"#{1}");
},isJSON:function(){
var str=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");
return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
},evalJSON:function(_4c){
var _4d=this.unfilterJSON();
try{
if(!_4c||_4d.isJSON()){
return eval("("+_4d+")");
}
}
catch(e){
}
throw new SyntaxError("Badly formed JSON string: "+this.inspect());
},include:function(_4e){
return this.indexOf(_4e)>-1;
},startsWith:function(_4f){
return this.indexOf(_4f)===0;
},endsWith:function(_50){
var d=this.length-_50.length;
return d>=0&&this.lastIndexOf(_50)===d;
},empty:function(){
return this=="";
},blank:function(){
return /^\s*$/.test(this);
}});
if(Prototype.Browser.WebKit||Prototype.Browser.IE){
Object.extend(String.prototype,{escapeHTML:function(){
return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
},unescapeHTML:function(){
return this.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">");
}});
}
String.prototype.gsub.prepareReplacement=function(_52){
if(typeof _52=="function"){
return _52;
}
var _53=new Template(_52);
return function(_54){
return _53.evaluate(_54);
};
};
String.prototype.parseQuery=String.prototype.toQueryParams;
Object.extend(String.prototype.escapeHTML,{div:document.createElement("div"),text:document.createTextNode("")});
with(String.prototype.escapeHTML){
div.appendChild(text);
}
var Template=Class.create();
Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;
Template.prototype={initialize:function(_55,_56){
this.template=_55.toString();
this.pattern=_56||Template.Pattern;
},evaluate:function(_57){
return this.template.gsub(this.pattern,function(_58){
var _59=_58[1];
if(_59=="\\"){
return _58[2];
}
return _59+String.interpret(_57[_58[3]]);
});
}};
var $break={},$continue=new Error("\"throw $continue\" is deprecated, use \"return\" instead");
var Enumerable={each:function(_5a){
var _5b=0;
try{
this._each(function(_5c){
_5a(_5c,_5b++);
});
}
catch(e){
if(e!=$break){
throw e;
}
}
return this;
},eachSlice:function(_5d,_5e){
var _5f=-_5d,_60=[],_61=this.toArray();
while((_5f+=_5d)<_61.length){
_60.push(_61.slice(_5f,_5f+_5d));
}
return _60.map(_5e);
},all:function(_62){
var _63=true;
this.each(function(_64,_65){
_63=_63&&!!(_62||Prototype.K)(_64,_65);
if(!_63){
throw $break;
}
});
return _63;
},any:function(_66){
var _67=false;
this.each(function(_68,_69){
if(_67=!!(_66||Prototype.K)(_68,_69)){
throw $break;
}
});
return _67;
},collect:function(_6a){
var _6b=[];
this.each(function(_6c,_6d){
_6b.push((_6a||Prototype.K)(_6c,_6d));
});
return _6b;
},detect:function(_6e){
var _6f;
this.each(function(_70,_71){
if(_6e(_70,_71)){
_6f=_70;
throw $break;
}
});
return _6f;
},findAll:function(_72){
var _73=[];
this.each(function(_74,_75){
if(_72(_74,_75)){
_73.push(_74);
}
});
return _73;
},grep:function(_76,_77){
var _78=[];
this.each(function(_79,_7a){
var _7b=_79.toString();
if(_7b.match(_76)){
_78.push((_77||Prototype.K)(_79,_7a));
}
});
return _78;
},include:function(_7c){
var _7d=false;
this.each(function(_7e){
if(_7e==_7c){
_7d=true;
throw $break;
}
});
return _7d;
},inGroupsOf:function(_7f,_80){
_80=_80===undefined?null:_80;
return this.eachSlice(_7f,function(_81){
while(_81.length<_7f){
_81.push(_80);
}
return _81;
});
},inject:function(_82,_83){
this.each(function(_84,_85){
_82=_83(_82,_84,_85);
});
return _82;
},invoke:function(_86){
var _87=$A(arguments).slice(1);
return this.map(function(_88){
return _88[_86].apply(_88,_87);
});
},max:function(_89){
var _8a;
this.each(function(_8b,_8c){
_8b=(_89||Prototype.K)(_8b,_8c);
if(_8a==undefined||_8b>=_8a){
_8a=_8b;
}
});
return _8a;
},min:function(_8d){
var _8e;
this.each(function(_8f,_90){
_8f=(_8d||Prototype.K)(_8f,_90);
if(_8e==undefined||_8f<_8e){
_8e=_8f;
}
});
return _8e;
},partition:function(_91){
var _92=[],_93=[];
this.each(function(_94,_95){
((_91||Prototype.K)(_94,_95)?_92:_93).push(_94);
});
return [_92,_93];
},pluck:function(_96){
var _97=[];
this.each(function(_98,_99){
_97.push(_98[_96]);
});
return _97;
},reject:function(_9a){
var _9b=[];
this.each(function(_9c,_9d){
if(!_9a(_9c,_9d)){
_9b.push(_9c);
}
});
return _9b;
},sortBy:function(_9e){
return this.map(function(_9f,_a0){
return {value:_9f,criteria:_9e(_9f,_a0)};
}).sort(function(_a1,_a2){
var a=_a1.criteria,b=_a2.criteria;
return a<b?-1:a>b?1:0;
}).pluck("value");
},toArray:function(){
return this.map();
},zip:function(){
var _a5=Prototype.K,_a6=$A(arguments);
if(typeof _a6.last()=="function"){
_a5=_a6.pop();
}
var _a7=[this].concat(_a6).map($A);
return this.map(function(_a8,_a9){
return _a5(_a7.pluck(_a9));
});
},size:function(){
return this.toArray().length;
},inspect:function(){
return "#<Enumerable:"+this.toArray().inspect()+">";
}};
Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});
var $A=Array.from=function(_aa){
if(!_aa){
return [];
}
if(_aa.toArray){
return _aa.toArray();
}else{
var _ab=[];
for(var i=0,_ad=_aa.length;i<_ad;i++){
_ab.push(_aa[i]);
}
return _ab;
}
};
if(Prototype.Browser.WebKit){
$A=Array.from=function(_ae){
if(!_ae){
return [];
}
if(!(typeof _ae=="function"&&_ae=="[object NodeList]")&&_ae.toArray){
return _ae.toArray();
}else{
var _af=[];
for(var i=0,_b1=_ae.length;i<_b1;i++){
_af.push(_ae[i]);
}
return _af;
}
};
}
Object.extend(Array.prototype,Enumerable);
if(!Array.prototype._reverse){
Array.prototype._reverse=Array.prototype.reverse;
}
Object.extend(Array.prototype,{_each:function(_b2){
for(var i=0,_b4=this.length;i<_b4;i++){
_b2(this[i]);
}
},clear:function(){
this.length=0;
return this;
},first:function(){
return this[0];
},last:function(){
return this[this.length-1];
},compact:function(){
return this.select(function(_b5){
return _b5!=null;
});
},flatten:function(){
return this.inject([],function(_b6,_b7){
return _b6.concat(_b7&&_b7.constructor==Array?_b7.flatten():[_b7]);
});
},without:function(){
var _b8=$A(arguments);
return this.select(function(_b9){
return !_b8.include(_b9);
});
},indexOf:function(_ba){
for(var i=0,_bc=this.length;i<_bc;i++){
if(this[i]==_ba){
return i;
}
}
return -1;
},reverse:function(_bd){
return (_bd!==false?this:this.toArray())._reverse();
},reduce:function(){
return this.length>1?this:this[0];
},uniq:function(_be){
return this.inject([],function(_bf,_c0,_c1){
if(0==_c1||(_be?_bf.last()!=_c0:!_bf.include(_c0))){
_bf.push(_c0);
}
return _bf;
});
},clone:function(){
return [].concat(this);
},size:function(){
return this.length;
},inspect:function(){
return "["+this.map(Object.inspect).join(", ")+"]";
},toJSON:function(){
var _c2=[];
this.each(function(_c3){
var _c4=Object.toJSON(_c3);
if(_c4!==undefined){
_c2.push(_c4);
}
});
return "["+_c2.join(", ")+"]";
}});
Array.prototype.toArray=Array.prototype.clone;
function $w(_c5){
_c5=_c5.strip();
return _c5?_c5.split(/\s+/):[];
}
if(Prototype.Browser.Opera){
Array.prototype.concat=function(){
var _c6=[];
for(var i=0,_c8=this.length;i<_c8;i++){
_c6.push(this[i]);
}
for(var i=0,_c8=arguments.length;i<_c8;i++){
if(arguments[i].constructor==Array){
for(var j=0,_ca=arguments[i].length;j<_ca;j++){
_c6.push(arguments[i][j]);
}
}else{
_c6.push(arguments[i]);
}
}
return _c6;
};
}
var Hash=function(_cb){
if(_cb instanceof Hash){
this.merge(_cb);
}else{
Object.extend(this,_cb||{});
}
};
Object.extend(Hash,{toQueryString:function(obj){
var _cd=[];
_cd.add=arguments.callee.addPair;
this.prototype._each.call(obj,function(_ce){
if(!_ce.key){
return;
}
var _cf=_ce.value;
if(_cf&&typeof _cf=="object"){
if(_cf.constructor==Array){
_cf.each(function(_d0){
_cd.add(_ce.key,_d0);
});
}
return;
}
_cd.add(_ce.key,_cf);
});
return _cd.join("&");
},toJSON:function(_d1){
var _d2=[];
this.prototype._each.call(_d1,function(_d3){
var _d4=Object.toJSON(_d3.value);
if(_d4!==undefined){
_d2.push(_d3.key.toJSON()+": "+_d4);
}
});
return "{"+_d2.join(", ")+"}";
}});
Hash.toQueryString.addPair=function(key,_d6,_d7){
key=encodeURIComponent(key);
if(_d6===undefined){
this.push(key);
}else{
this.push(key+"="+(_d6==null?"":encodeURIComponent(_d6)));
}
};
Object.extend(Hash.prototype,Enumerable);
Object.extend(Hash.prototype,{_each:function(_d8){
for(var key in this){
var _da=this[key];
if(_da&&_da==Hash.prototype[key]){
continue;
}
var _db=[key,_da];
_db.key=key;
_db.value=_da;
_d8(_db);
}
},keys:function(){
return this.pluck("key");
},values:function(){
return this.pluck("value");
},merge:function(_dc){
return $H(_dc).inject(this,function(_dd,_de){
_dd[_de.key]=_de.value;
return _dd;
});
},remove:function(){
var _df;
for(var i=0,_e1=arguments.length;i<_e1;i++){
var _e2=this[arguments[i]];
if(_e2!==undefined){
if(_df===undefined){
_df=_e2;
}else{
if(_df.constructor!=Array){
_df=[_df];
}
_df.push(_e2);
}
}
delete this[arguments[i]];
}
return _df;
},toQueryString:function(){
return Hash.toQueryString(this);
},inspect:function(){
return "#<Hash:{"+this.map(function(_e3){
return _e3.map(Object.inspect).join(": ");
}).join(", ")+"}>";
},toJSON:function(){
return Hash.toJSON(this);
}});
function $H(_e4){
if(_e4 instanceof Hash){
return _e4;
}
return new Hash(_e4);
}
if(function(){
var i=0,_e6=function(_e7){
this.key=_e7;
};
_e6.prototype.key="foo";
for(var _e8 in new _e6("bar")){
i++;
}
return i>1;
}()){
Hash.prototype._each=function(_e9){
var _ea=[];
for(var key in this){
var _ec=this[key];
if((_ec&&_ec==Hash.prototype[key])||_ea.include(key)){
continue;
}
_ea.push(key);
var _ed=[key,_ec];
_ed.key=key;
_ed.value=_ec;
_e9(_ed);
}
};
}
ObjectRange=Class.create();
Object.extend(ObjectRange.prototype,Enumerable);
Object.extend(ObjectRange.prototype,{initialize:function(_ee,end,_f0){
this.start=_ee;
this.end=end;
this.exclusive=_f0;
},_each:function(_f1){
var _f2=this.start;
while(this.include(_f2)){
_f1(_f2);
_f2=_f2.succ();
}
},include:function(_f3){
if(_f3<this.start){
return false;
}
if(this.exclusive){
return _f3<this.end;
}
return _f3<=this.end;
}});
var $R=function(_f4,end,_f6){
return new ObjectRange(_f4,end,_f6);
};
var Ajax={getTransport:function(){
return Try.these(function(){
return new XMLHttpRequest();
},function(){
return new ActiveXObject("Msxml2.XMLHTTP");
},function(){
return new ActiveXObject("Microsoft.XMLHTTP");
})||false;
},activeRequestCount:0};
Ajax.Responders={responders:[],_each:function(_f7){
this.responders._each(_f7);
},register:function(_f8){
if(!this.include(_f8)){
this.responders.push(_f8);
}
},unregister:function(_f9){
this.responders=this.responders.without(_f9);
},dispatch:function(_fa,_fb,_fc,_fd){
this.each(function(_fe){
if(typeof _fe[_fa]=="function"){
try{
_fe[_fa].apply(_fe,[_fb,_fc,_fd]);
}
catch(e){
}
}
});
}};
Object.extend(Ajax.Responders,Enumerable);
Ajax.Responders.register({onCreate:function(){
Ajax.activeRequestCount++;
},onComplete:function(){
Ajax.activeRequestCount--;
}});
Ajax.Base=function(){
};
Ajax.Base.prototype={setOptions:function(_ff){
this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:""};
Object.extend(this.options,_ff||{});
this.options.method=this.options.method.toLowerCase();
if(typeof this.options.parameters=="string"){
this.options.parameters=this.options.parameters.toQueryParams();
}
}};
Ajax.Request=Class.create();
Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];
Ajax.Request.prototype=Object.extend(new Ajax.Base(),{_complete:false,initialize:function(url,_101){
this.transport=Ajax.getTransport();
this.setOptions(_101);
this.request(url);
},request:function(url){
this.url=url;
this.method=this.options.method;
var _103=Object.clone(this.options.parameters);
if(!["get","post"].include(this.method)){
_103["_method"]=this.method;
this.method="post";
}
this.parameters=_103;
if(_103=Hash.toQueryString(_103)){
if(this.method=="get"){
this.url+=(this.url.include("?")?"&":"?")+_103;
}else{
if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){
_103+="&_=";
}
}
}
try{
if(this.options.onCreate){
this.options.onCreate(this.transport);
}
Ajax.Responders.dispatch("onCreate",this,this.transport);
this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);
if(this.options.asynchronous){
setTimeout(function(){
this.respondToReadyState(1);
}.bind(this),10);
}
this.transport.onreadystatechange=this.onStateChange.bind(this);
this.setRequestHeaders();
this.body=this.method=="post"?(this.options.postBody||_103):null;
this.transport.send(this.body);
if(!this.options.asynchronous&&this.transport.overrideMimeType){
this.onStateChange();
}
}
catch(e){
this.dispatchException(e);
}
},onStateChange:function(){
var _104=this.transport.readyState;
if(_104>1&&!((_104==4)&&this._complete)){
this.respondToReadyState(this.transport.readyState);
}
},setRequestHeaders:function(){
var _105={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,"Accept":"text/javascript, text/html, application/xml, text/xml, */*"};
if(this.method=="post"){
_105["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");
if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){
_105["Connection"]="close";
}
}
if(typeof this.options.requestHeaders=="object"){
var _106=this.options.requestHeaders;
if(typeof _106.push=="function"){
for(var i=0,_108=_106.length;i<_108;i+=2){
_105[_106[i]]=_106[i+1];
}
}else{
$H(_106).each(function(pair){
_105[pair.key]=pair.value;
});
}
}
for(var name in _105){
this.transport.setRequestHeader(name,_105[name]);
}
},success:function(){
return !this.transport.status||(this.transport.status>=200&&this.transport.status<300);
},respondToReadyState:function(_10b){
var _10c=Ajax.Request.Events[_10b];
var _10d=this.transport,json=this.evalJSON();
if(_10c=="Complete"){
try{
this._complete=true;
(this.options["on"+this.transport.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(_10d,json);
}
catch(e){
this.dispatchException(e);
}
var _10f=this.getHeader("Content-type");
if(_10f&&_10f.strip().match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i)){
this.evalResponse();
}
}
try{
(this.options["on"+_10c]||Prototype.emptyFunction)(_10d,json);
Ajax.Responders.dispatch("on"+_10c,this,_10d,json);
}
catch(e){
this.dispatchException(e);
}
if(_10c=="Complete"){
this.transport.onreadystatechange=Prototype.emptyFunction;
}
},getHeader:function(name){
try{
return this.transport.getResponseHeader(name);
}
catch(e){
return null;
}
},evalJSON:function(){
try{
var json=this.getHeader("X-JSON");
return json?json.evalJSON():null;
}
catch(e){
return null;
}
},evalResponse:function(){
try{
return eval((this.transport.responseText||"").unfilterJSON());
}
catch(e){
this.dispatchException(e);
}
},dispatchException:function(_112){
(this.options.onException||Prototype.emptyFunction)(this,_112);
Ajax.Responders.dispatch("onException",this,_112);
}});
Ajax.Updater=Class.create();
Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(_113,url,_115){
this.container={success:(_113.success||_113),failure:(_113.failure||(_113.success?null:_113))};
this.transport=Ajax.getTransport();
this.setOptions(_115);
var _116=this.options.onComplete||Prototype.emptyFunction;
this.options.onComplete=(function(_117,_118){
this.updateContent();
_116(_117,_118);
}).bind(this);
this.request(url);
},updateContent:function(){
var _119=this.container[this.success()?"success":"failure"];
var _11a=this.transport.responseText;
if(!this.options.evalScripts){
_11a=_11a.stripScripts();
}
if(_119=$(_119)){
if(this.options.insertion){
new this.options.insertion(_119,_11a);
}else{
_119.update(_11a);
}
}
if(this.success()){
if(this.onComplete){
setTimeout(this.onComplete.bind(this),10);
}
}
}});
Ajax.PeriodicalUpdater=Class.create();
Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(_11b,url,_11d){
this.setOptions(_11d);
this.onComplete=this.options.onComplete;
this.frequency=(this.options.frequency||2);
this.decay=(this.options.decay||1);
this.updater={};
this.container=_11b;
this.url=url;
this.start();
},start:function(){
this.options.onComplete=this.updateComplete.bind(this);
this.onTimerEvent();
},stop:function(){
this.updater.options.onComplete=undefined;
clearTimeout(this.timer);
(this.onComplete||Prototype.emptyFunction).apply(this,arguments);
},updateComplete:function(_11e){
if(this.options.decay){
this.decay=(_11e.responseText==this.lastText?this.decay*this.options.decay:1);
this.lastText=_11e.responseText;
}
this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000);
},onTimerEvent:function(){
this.updater=new Ajax.Updater(this.container,this.url,this.options);
}});
function $(_11f){
if(arguments.length>1){
for(var i=0,_121=[],_122=arguments.length;i<_122;i++){
_121.push($(arguments[i]));
}
return _121;
}
if(typeof _11f=="string"){
_11f=document.getElementById(_11f);
}
return Element.extend(_11f);
}
if(Prototype.BrowserFeatures.XPath){
document._getElementsByXPath=function(_123,_124){
var _125=[];
var _126=document.evaluate(_123,$(_124)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);
for(var i=0,_128=_126.snapshotLength;i<_128;i++){
_125.push(_126.snapshotItem(i));
}
return _125;
};
document.getElementsByClassName=function(_129,_12a){
var q=".//*[contains(concat(' ', @class, ' '), ' "+_129+" ')]";
return document._getElementsByXPath(q,_12a);
};
}else{
document.getElementsByClassName=function(_12c,_12d){
var _12e=($(_12d)||document.body).getElementsByTagName("*");
var _12f=[],_130,_131=new RegExp("(^|\\s)"+_12c+"(\\s|$)");
for(var i=0,_133=_12e.length;i<_133;i++){
_130=_12e[i];
var _134=_130.className;
if(_134.length==0){
continue;
}
if(_134==_12c||_134.match(_131)){
_12f.push(Element.extend(_130));
}
}
return _12f;
};
}
if(!window.Element){
var Element={};
}
Element.extend=function(_135){
var F=Prototype.BrowserFeatures;
if(!_135||!_135.tagName||_135.nodeType==3||_135._extended||F.SpecificElementExtensions||_135==window){
return _135;
}
var _137={},_138=_135.tagName,_139=Element.extend.cache,T=Element.Methods.ByTag;
if(!F.ElementExtensions){
Object.extend(_137,Element.Methods),Object.extend(_137,Element.Methods.Simulated);
}
if(T[_138]){
Object.extend(_137,T[_138]);
}
for(var _13b in _137){
var _13c=_137[_13b];
if(typeof _13c=="function"&&!(_13b in _135)){
_135[_13b]=_139.findOrStore(_13c);
}
}
_135._extended=Prototype.emptyFunction;
return _135;
};
Element.extend.cache={findOrStore:function(_13d){
return this[_13d]=this[_13d]||function(){
return _13d.apply(null,[this].concat($A(arguments)));
};
}};
Element.Methods={visible:function(_13e){
return $(_13e).style.display!="none";
},toggle:function(_13f){
_13f=$(_13f);
Element[Element.visible(_13f)?"hide":"show"](_13f);
return _13f;
},hide:function(_140){
$(_140).style.display="none";
return _140;
},show:function(_141){
$(_141).style.display="";
return _141;
},remove:function(_142){
_142=$(_142);
_142.parentNode.removeChild(_142);
return _142;
},update:function(_143,html){
html=typeof html=="undefined"?"":html.toString();
$(_143).innerHTML=html.stripScripts();
setTimeout(function(){
html.evalScripts();
},10);
return _143;
},replace:function(_145,html){
_145=$(_145);
html=typeof html=="undefined"?"":html.toString();
if(_145.outerHTML){
_145.outerHTML=html.stripScripts();
}else{
var _147=_145.ownerDocument.createRange();
_147.selectNodeContents(_145);
_145.parentNode.replaceChild(_147.createContextualFragment(html.stripScripts()),_145);
}
setTimeout(function(){
html.evalScripts();
},10);
return _145;
},inspect:function(_148){
_148=$(_148);
var _149="<"+_148.tagName.toLowerCase();
$H({"id":"id","className":"class"}).each(function(pair){
var _14b=pair.first(),_14c=pair.last();
var _14d=(_148[_14b]||"").toString();
if(_14d){
_149+=" "+_14c+"="+_14d.inspect(true);
}
});
return _149+">";
},recursivelyCollect:function(_14e,_14f){
_14e=$(_14e);
var _150=[];
while(_14e=_14e[_14f]){
if(_14e.nodeType==1){
_150.push(Element.extend(_14e));
}
}
return _150;
},ancestors:function(_151){
return $(_151).recursivelyCollect("parentNode");
},descendants:function(_152){
return $A($(_152).getElementsByTagName("*")).each(Element.extend);
},firstDescendant:function(_153){
_153=$(_153).firstChild;
while(_153&&_153.nodeType!=1){
_153=_153.nextSibling;
}
return $(_153);
},immediateDescendants:function(_154){
if(!(_154=$(_154).firstChild)){
return [];
}
while(_154&&_154.nodeType!=1){
_154=_154.nextSibling;
}
if(_154){
return [_154].concat($(_154).nextSiblings());
}
return [];
},previousSiblings:function(_155){
return $(_155).recursivelyCollect("previousSibling");
},nextSiblings:function(_156){
return $(_156).recursivelyCollect("nextSibling");
},siblings:function(_157){
_157=$(_157);
return _157.previousSiblings().reverse().concat(_157.nextSiblings());
},match:function(_158,_159){
if(typeof _159=="string"){
_159=new Selector(_159);
}
return _159.match($(_158));
},up:function(_15a,_15b,_15c){
_15a=$(_15a);
if(arguments.length==1){
return $(_15a.parentNode);
}
var _15d=_15a.ancestors();
return _15b?Selector.findElement(_15d,_15b,_15c):_15d[_15c||0];
},down:function(_15e,_15f,_160){
_15e=$(_15e);
if(arguments.length==1){
return _15e.firstDescendant();
}
var _161=_15e.descendants();
return _15f?Selector.findElement(_161,_15f,_160):_161[_160||0];
},previous:function(_162,_163,_164){
_162=$(_162);
if(arguments.length==1){
return $(Selector.handlers.previousElementSibling(_162));
}
var _165=_162.previousSiblings();
return _163?Selector.findElement(_165,_163,_164):_165[_164||0];
},next:function(_166,_167,_168){
_166=$(_166);
if(arguments.length==1){
return $(Selector.handlers.nextElementSibling(_166));
}
var _169=_166.nextSiblings();
return _167?Selector.findElement(_169,_167,_168):_169[_168||0];
},getElementsBySelector:function(){
var args=$A(arguments),_16b=$(args.shift());
return Selector.findChildElements(_16b,args);
},getElementsByClassName:function(_16c,_16d){
return document.getElementsByClassName(_16d,_16c);
},readAttribute:function(_16e,name){
_16e=$(_16e);
if(Prototype.Browser.IE){
if(!_16e.attributes){
return null;
}
var t=Element._attributeTranslations;
if(t.values[name]){
return t.values[name](_16e,name);
}
if(t.names[name]){
name=t.names[name];
}
var _171=_16e.attributes[name];
return _171?_171.nodeValue:null;
}
return _16e.getAttribute(name);
},getHeight:function(_172){
return $(_172).getDimensions().height;
},getWidth:function(_173){
return $(_173).getDimensions().width;
},classNames:function(_174){
return new Element.ClassNames(_174);
},hasClassName:function(_175,_176){
if(!(_175=$(_175))){
return;
}
var _177=_175.className;
if(_177.length==0){
return false;
}
if(_177==_176||_177.match(new RegExp("(^|\\s)"+_176+"(\\s|$)"))){
return true;
}
return false;
},addClassName:function(_178,_179){
if(!(_178=$(_178))){
return;
}
Element.classNames(_178).add(_179);
return _178;
},removeClassName:function(_17a,_17b){
if(!(_17a=$(_17a))){
return;
}
Element.classNames(_17a).remove(_17b);
return _17a;
},toggleClassName:function(_17c,_17d){
if(!(_17c=$(_17c))){
return;
}
Element.classNames(_17c)[_17c.hasClassName(_17d)?"remove":"add"](_17d);
return _17c;
},observe:function(){
Event.observe.apply(Event,arguments);
return $A(arguments).first();
},stopObserving:function(){
Event.stopObserving.apply(Event,arguments);
return $A(arguments).first();
},cleanWhitespace:function(_17e){
_17e=$(_17e);
var node=_17e.firstChild;
while(node){
var _180=node.nextSibling;
if(node.nodeType==3&&!/\S/.test(node.nodeValue)){
_17e.removeChild(node);
}
node=_180;
}
return _17e;
},empty:function(_181){
return $(_181).innerHTML.blank();
},descendantOf:function(_182,_183){
_182=$(_182),_183=$(_183);
while(_182=_182.parentNode){
if(_182==_183){
return true;
}
}
return false;
},scrollTo:function(_184){
_184=$(_184);
var pos=Position.cumulativeOffset(_184);
window.scrollTo(pos[0],pos[1]);
return _184;
},getStyle:function(_186,_187){
_186=$(_186);
_187=_187=="float"?"cssFloat":_187.camelize();
var _188=_186.style[_187];
if(!_188){
var css=document.defaultView.getComputedStyle(_186,null);
_188=css?css[_187]:null;
}
if(_187=="opacity"){
return _188?parseFloat(_188):1;
}
return _188=="auto"?null:_188;
},getOpacity:function(_18a){
return $(_18a).getStyle("opacity");
},setStyle:function(_18b,_18c,_18d){
_18b=$(_18b);
var _18e=_18b.style;
for(var _18f in _18c){
if(_18f=="opacity"){
_18b.setOpacity(_18c[_18f]);
}else{
_18e[(_18f=="float"||_18f=="cssFloat")?(_18e.styleFloat===undefined?"cssFloat":"styleFloat"):(_18d?_18f:_18f.camelize())]=_18c[_18f];
}
}
return _18b;
},setOpacity:function(_190,_191){
_190=$(_190);
_190.style.opacity=(_191==1||_191==="")?"":(_191<0.00001)?0:_191;
return _190;
},getDimensions:function(_192){
_192=$(_192);
var _193=$(_192).getStyle("display");
if(_193!="none"&&_193!=null){
return {width:_192.offsetWidth,height:_192.offsetHeight};
}
var els=_192.style;
var _195=els.visibility;
var _196=els.position;
var _197=els.display;
els.visibility="hidden";
els.position="absolute";
els.display="block";
var _198=_192.clientWidth;
var _199=_192.clientHeight;
els.display=_197;
els.position=_196;
els.visibility=_195;
return {width:_198,height:_199};
},makePositioned:function(_19a){
_19a=$(_19a);
var pos=Element.getStyle(_19a,"position");
if(pos=="static"||!pos){
_19a._madePositioned=true;
_19a.style.position="relative";
if(window.opera){
_19a.style.top=0;
_19a.style.left=0;
}
}
return _19a;
},undoPositioned:function(_19c){
_19c=$(_19c);
if(_19c._madePositioned){
_19c._madePositioned=undefined;
_19c.style.position=_19c.style.top=_19c.style.left=_19c.style.bottom=_19c.style.right="";
}
return _19c;
},makeClipping:function(_19d){
_19d=$(_19d);
if(_19d._overflow){
return _19d;
}
_19d._overflow=_19d.style.overflow||"auto";
if((Element.getStyle(_19d,"overflow")||"visible")!="hidden"){
_19d.style.overflow="hidden";
}
return _19d;
},undoClipping:function(_19e){
_19e=$(_19e);
if(!_19e._overflow){
return _19e;
}
_19e.style.overflow=_19e._overflow=="auto"?"":_19e._overflow;
_19e._overflow=null;
return _19e;
}};
Object.extend(Element.Methods,{childOf:Element.Methods.descendantOf,childElements:Element.Methods.immediateDescendants});
if(Prototype.Browser.Opera){
Element.Methods._getStyle=Element.Methods.getStyle;
Element.Methods.getStyle=function(_19f,_1a0){
switch(_1a0){
case "left":
case "top":
case "right":
case "bottom":
if(Element._getStyle(_19f,"position")=="static"){
return null;
}
default:
return Element._getStyle(_19f,_1a0);
}
};
}else{
if(Prototype.Browser.IE){
Element.Methods.getStyle=function(_1a1,_1a2){
_1a1=$(_1a1);
_1a2=(_1a2=="float"||_1a2=="cssFloat")?"styleFloat":_1a2.camelize();
var _1a3=_1a1.style[_1a2];
if(!_1a3&&_1a1.currentStyle){
_1a3=_1a1.currentStyle[_1a2];
}
if(_1a2=="opacity"){
if(_1a3=(_1a1.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){
if(_1a3[1]){
return parseFloat(_1a3[1])/100;
}
}
return 1;
}
if(_1a3=="auto"){
if((_1a2=="width"||_1a2=="height")&&(_1a1.getStyle("display")!="none")){
return _1a1["offset"+_1a2.capitalize()]+"px";
}
return null;
}
return _1a3;
};
Element.Methods.setOpacity=function(_1a4,_1a5){
_1a4=$(_1a4);
var _1a6=_1a4.getStyle("filter"),_1a7=_1a4.style;
if(_1a5==1||_1a5===""){
_1a7.filter=_1a6.replace(/alpha\([^\)]*\)/gi,"");
return _1a4;
}else{
if(_1a5<0.00001){
_1a5=0;
}
}
_1a7.filter=_1a6.replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+(_1a5*100)+")";
return _1a4;
};
Element.Methods.update=function(_1a8,html){
_1a8=$(_1a8);
html=typeof html=="undefined"?"":html.toString();
var _1aa=_1a8.tagName.toUpperCase();
if(["THEAD","TBODY","TR","TD"].include(_1aa)){
var div=document.createElement("div");
switch(_1aa){
case "THEAD":
case "TBODY":
div.innerHTML="<table><tbody>"+html.stripScripts()+"</tbody></table>";
depth=2;
break;
case "TR":
div.innerHTML="<table><tbody><tr>"+html.stripScripts()+"</tr></tbody></table>";
depth=3;
break;
case "TD":
div.innerHTML="<table><tbody><tr><td>"+html.stripScripts()+"</td></tr></tbody></table>";
depth=4;
}
$A(_1a8.childNodes).each(function(node){
_1a8.removeChild(node);
});
depth.times(function(){
div=div.firstChild;
});
$A(div.childNodes).each(function(node){
_1a8.appendChild(node);
});
}else{
_1a8.innerHTML=html.stripScripts();
}
setTimeout(function(){
html.evalScripts();
},10);
return _1a8;
};
}else{
if(Prototype.Browser.Gecko){
Element.Methods.setOpacity=function(_1ae,_1af){
_1ae=$(_1ae);
_1ae.style.opacity=(_1af==1)?0.999999:(_1af==="")?"":(_1af<0.00001)?0:_1af;
return _1ae;
};
}
}
}
Element._attributeTranslations={names:{colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",datetime:"dateTime",accesskey:"accessKey",tabindex:"tabIndex",enctype:"encType",maxlength:"maxLength",readonly:"readOnly",longdesc:"longDesc"},values:{_getAttr:function(_1b0,_1b1){
return _1b0.getAttribute(_1b1,2);
},_flag:function(_1b2,_1b3){
return $(_1b2).hasAttribute(_1b3)?_1b3:null;
},style:function(_1b4){
return _1b4.style.cssText.toLowerCase();
},title:function(_1b5){
var node=_1b5.getAttributeNode("title");
return node.specified?node.nodeValue:null;
}}};
(function(){
Object.extend(this,{href:this._getAttr,src:this._getAttr,type:this._getAttr,disabled:this._flag,checked:this._flag,readonly:this._flag,multiple:this._flag});
}).call(Element._attributeTranslations.values);
Element.Methods.Simulated={hasAttribute:function(_1b7,_1b8){
var t=Element._attributeTranslations,node;
_1b8=t.names[_1b8]||_1b8;
node=$(_1b7).getAttributeNode(_1b8);
return node&&node.specified;
}};
Element.Methods.ByTag={};
Object.extend(Element,Element.Methods);
if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement("div").__proto__){
window.HTMLElement={};
window.HTMLElement.prototype=document.createElement("div").__proto__;
Prototype.BrowserFeatures.ElementExtensions=true;
}
Element.hasAttribute=function(_1bb,_1bc){
if(_1bb.hasAttribute){
return _1bb.hasAttribute(_1bc);
}
return Element.Methods.Simulated.hasAttribute(_1bb,_1bc);
};
Element.addMethods=function(_1bd){
var F=Prototype.BrowserFeatures,T=Element.Methods.ByTag;
if(!_1bd){
Object.extend(Form,Form.Methods);
Object.extend(Form.Element,Form.Element.Methods);
Object.extend(Element.Methods.ByTag,{"FORM":Object.clone(Form.Methods),"INPUT":Object.clone(Form.Element.Methods),"SELECT":Object.clone(Form.Element.Methods),"TEXTAREA":Object.clone(Form.Element.Methods)});
}
if(arguments.length==2){
var _1c0=_1bd;
_1bd=arguments[1];
}
if(!_1c0){
Object.extend(Element.Methods,_1bd||{});
}else{
if(_1c0.constructor==Array){
_1c0.each(extend);
}else{
extend(_1c0);
}
}
function extend(_1c1){
_1c1=_1c1.toUpperCase();
if(!Element.Methods.ByTag[_1c1]){
Element.Methods.ByTag[_1c1]={};
}
Object.extend(Element.Methods.ByTag[_1c1],_1bd);
}
function copy(_1c2,_1c3,_1c4){
_1c4=_1c4||false;
var _1c5=Element.extend.cache;
for(var _1c6 in _1c2){
var _1c7=_1c2[_1c6];
if(!_1c4||!(_1c6 in _1c3)){
_1c3[_1c6]=_1c5.findOrStore(_1c7);
}
}
}
function findDOMClass(_1c8){
var _1c9;
var _1ca={"OPTGROUP":"OptGroup","TEXTAREA":"TextArea","P":"Paragraph","FIELDSET":"FieldSet","UL":"UList","OL":"OList","DL":"DList","DIR":"Directory","H1":"Heading","H2":"Heading","H3":"Heading","H4":"Heading","H5":"Heading","H6":"Heading","Q":"Quote","INS":"Mod","DEL":"Mod","A":"Anchor","IMG":"Image","CAPTION":"TableCaption","COL":"TableCol","COLGROUP":"TableCol","THEAD":"TableSection","TFOOT":"TableSection","TBODY":"TableSection","TR":"TableRow","TH":"TableCell","TD":"TableCell","FRAMESET":"FrameSet","IFRAME":"IFrame"};
if(_1ca[_1c8]){
_1c9="HTML"+_1ca[_1c8]+"Element";
}
if(window[_1c9]){
return window[_1c9];
}
_1c9="HTML"+_1c8+"Element";
if(window[_1c9]){
return window[_1c9];
}
_1c9="HTML"+_1c8.capitalize()+"Element";
if(window[_1c9]){
return window[_1c9];
}
window[_1c9]={};
window[_1c9].prototype=document.createElement(_1c8).__proto__;
return window[_1c9];
}
if(F.ElementExtensions){
copy(Element.Methods,HTMLElement.prototype);
copy(Element.Methods.Simulated,HTMLElement.prototype,true);
}
if(F.SpecificElementExtensions){
for(var tag in Element.Methods.ByTag){
var _1cc=findDOMClass(tag);
if(typeof _1cc=="undefined"){
continue;
}
copy(T[tag],_1cc.prototype);
}
}
Object.extend(Element,Element.Methods);
delete Element.ByTag;
};
var Toggle={display:Element.toggle};
Abstract.Insertion=function(_1cd){
this.adjacency=_1cd;
};
Abstract.Insertion.prototype={initialize:function(_1ce,_1cf){
this.element=$(_1ce);
this.content=_1cf.stripScripts();
if(this.adjacency&&this.element.insertAdjacentHTML){
try{
this.element.insertAdjacentHTML(this.adjacency,this.content);
}
catch(e){
var _1d0=this.element.tagName.toUpperCase();
if(["TBODY","TR"].include(_1d0)){
this.insertContent(this.contentFromAnonymousTable());
}else{
throw e;
}
}
}else{
this.range=this.element.ownerDocument.createRange();
if(this.initializeRange){
this.initializeRange();
}
this.insertContent([this.range.createContextualFragment(this.content)]);
}
setTimeout(function(){
_1cf.evalScripts();
},10);
},contentFromAnonymousTable:function(){
var div=document.createElement("div");
div.innerHTML="<table><tbody>"+this.content+"</tbody></table>";
return $A(div.childNodes[0].childNodes[0].childNodes);
}};
var Insertion=new Object();
Insertion.Before=Class.create();
Insertion.Before.prototype=Object.extend(new Abstract.Insertion("beforeBegin"),{initializeRange:function(){
this.range.setStartBefore(this.element);
},insertContent:function(_1d2){
_1d2.each((function(_1d3){
this.element.parentNode.insertBefore(_1d3,this.element);
}).bind(this));
}});
Insertion.Top=Class.create();
Insertion.Top.prototype=Object.extend(new Abstract.Insertion("afterBegin"),{initializeRange:function(){
this.range.selectNodeContents(this.element);
this.range.collapse(true);
},insertContent:function(_1d4){
_1d4.reverse(false).each((function(_1d5){
this.element.insertBefore(_1d5,this.element.firstChild);
}).bind(this));
}});
Insertion.Bottom=Class.create();
Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion("beforeEnd"),{initializeRange:function(){
this.range.selectNodeContents(this.element);
this.range.collapse(this.element);
},insertContent:function(_1d6){
_1d6.each((function(_1d7){
this.element.appendChild(_1d7);
}).bind(this));
}});
Insertion.After=Class.create();
Insertion.After.prototype=Object.extend(new Abstract.Insertion("afterEnd"),{initializeRange:function(){
this.range.setStartAfter(this.element);
},insertContent:function(_1d8){
_1d8.each((function(_1d9){
this.element.parentNode.insertBefore(_1d9,this.element.nextSibling);
}).bind(this));
}});
Element.ClassNames=Class.create();
Element.ClassNames.prototype={initialize:function(_1da){
this.element=$(_1da);
},_each:function(_1db){
this.element.className.split(/\s+/).select(function(name){
return name.length>0;
})._each(_1db);
},set:function(_1dd){
this.element.className=_1dd;
},add:function(_1de){
if(this.include(_1de)){
return;
}
this.set($A(this).concat(_1de).join(" "));
},remove:function(_1df){
if(!this.include(_1df)){
return;
}
this.set($A(this).without(_1df).join(" "));
},toString:function(){
return $A(this).join(" ");
}};
Object.extend(Element.ClassNames.prototype,Enumerable);
var Selector=Class.create();
Selector.prototype={initialize:function(_1e0){
this.expression=_1e0.strip();
this.compileMatcher();
},compileMatcher:function(){
if(Prototype.BrowserFeatures.XPath&&!(/\[[\w-]*?:/).test(this.expression)){
return this.compileXPathMatcher();
}
var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;
if(Selector._cache[e]){
this.matcher=Selector._cache[e];
return;
}
this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];
while(e&&le!=e&&(/\S/).test(e)){
le=e;
for(var i in ps){
p=ps[i];
if(m=e.match(p)){
this.matcher.push(typeof c[i]=="function"?c[i](m):new Template(c[i]).evaluate(m));
e=e.replace(m[0],"");
break;
}
}
}
this.matcher.push("return h.unique(n);\n}");
eval(this.matcher.join("\n"));
Selector._cache[this.expression]=this.matcher;
},compileXPathMatcher:function(){
var e=this.expression,ps=Selector.patterns,x=Selector.xpath,le,m;
if(Selector._cache[e]){
this.xpath=Selector._cache[e];
return;
}
this.matcher=[".//*"];
while(e&&le!=e&&(/\S/).test(e)){
le=e;
for(var i in ps){
if(m=e.match(ps[i])){
this.matcher.push(typeof x[i]=="function"?x[i](m):new Template(x[i]).evaluate(m));
e=e.replace(m[0],"");
break;
}
}
}
this.xpath=this.matcher.join("");
Selector._cache[this.expression]=this.xpath;
},findElements:function(root){
root=root||document;
if(this.xpath){
return document._getElementsByXPath(this.xpath,root);
}
return this.matcher(root);
},match:function(_1f0){
return this.findElements(document).include(_1f0);
},toString:function(){
return this.expression;
},inspect:function(){
return "#<Selector:"+this.expression.inspect()+">";
}};
Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(m){
if(m[1]=="*"){
return "";
}
return "[local-name()='"+m[1].toLowerCase()+"' or local-name()='"+m[1].toUpperCase()+"']";
},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:"[@#{1}]",attr:function(m){
m[3]=m[5]||m[6];
return new Template(Selector.xpath.operators[m[2]]).evaluate(m);
},pseudo:function(m){
var h=Selector.xpath.pseudos[m[1]];
if(!h){
return "";
}
if(typeof h==="function"){
return h(m);
}
return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);
},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]","empty":"[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]","checked":"[@checked]","disabled":"[@disabled]","enabled":"[not(@disabled)]","not":function(m){
var e=m[6],p=Selector.patterns,x=Selector.xpath,le,m,v;
var _1fb=[];
while(e&&le!=e&&(/\S/).test(e)){
le=e;
for(var i in p){
if(m=e.match(p[i])){
v=typeof x[i]=="function"?x[i](m):new Template(x[i]).evaluate(m);
_1fb.push("("+v.substring(1,v.length-1)+")");
e=e.replace(m[0],"");
break;
}
}
}
return "[not("+_1fb.join(" and ")+")]";
},"nth-child":function(m){
return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",m);
},"nth-last-child":function(m){
return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",m);
},"nth-of-type":function(m){
return Selector.xpath.pseudos.nth("position() ",m);
},"nth-last-of-type":function(m){
return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",m);
},"first-of-type":function(m){
m[6]="1";
return Selector.xpath.pseudos["nth-of-type"](m);
},"last-of-type":function(m){
m[6]="1";
return Selector.xpath.pseudos["nth-last-of-type"](m);
},"only-of-type":function(m){
var p=Selector.xpath.pseudos;
return p["first-of-type"](m)+p["last-of-type"](m);
},nth:function(_205,m){
var mm,_208=m[6],_209;
if(_208=="even"){
_208="2n+0";
}
if(_208=="odd"){
_208="2n+1";
}
if(mm=_208.match(/^(\d+)$/)){
return "["+_205+"= "+mm[1]+"]";
}
if(mm=_208.match(/^(-?\d*)?n(([+-])(\d+))?/)){
if(mm[1]=="-"){
mm[1]=-1;
}
var a=mm[1]?Number(mm[1]):1;
var b=mm[2]?Number(mm[2]):0;
_209="[((#{fragment} - #{b}) mod #{a} = 0) and "+"((#{fragment} - #{b}) div #{a} >= 0)]";
return new Template(_209).evaluate({fragment:_205,a:a,b:b});
}
}}},criteria:{tagName:"n = h.tagName(n, r, \"#{1}\", c);   c = false;",className:"n = h.className(n, r, \"#{1}\", c); c = false;",id:"n = h.id(n, r, \"#{1}\", c);        c = false;",attrPresence:"n = h.attrPresence(n, r, \"#{1}\"); c = false;",attr:function(m){
m[3]=(m[5]||m[6]);
return new Template("n = h.attr(n, r, \"#{1}\", \"#{3}\", \"#{2}\"); c = false;").evaluate(m);
},pseudo:function(m){
if(m[6]){
m[6]=m[6].replace(/"/g,"\\\"");
}
return new Template("n = h.pseudo(n, \"#{1}\", \"#{6}\", r, c); c = false;").evaluate(m);
},descendant:"c = \"descendant\";",child:"c = \"child\";",adjacent:"c = \"adjacent\";",laterSibling:"c = \"laterSibling\";"},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|\s|(?=:))/,attrPresence:/^\[([\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\]]*?)\4|([^'"][^\]]*?)))?\]/},handlers:{concat:function(a,b){
for(var i=0,node;node=b[i];i++){
a.push(node);
}
return a;
},mark:function(_212){
for(var i=0,node;node=_212[i];i++){
node._counted=true;
}
return _212;
},unmark:function(_215){
for(var i=0,node;node=_215[i];i++){
node._counted=undefined;
}
return _215;
},index:function(_218,_219,_21a){
_218._counted=true;
if(_219){
for(var _21b=_218.childNodes,i=_21b.length-1,j=1;i>=0;i--){
node=_21b[i];
if(node.nodeType==1&&(!_21a||node._counted)){
node.nodeIndex=j++;
}
}
}else{
for(var i=0,j=1,_21b=_218.childNodes;node=_21b[i];i++){
if(node.nodeType==1&&(!_21a||node._counted)){
node.nodeIndex=j++;
}
}
}
},unique:function(_21e){
if(_21e.length==0){
return _21e;
}
var _21f=[],n;
for(var i=0,l=_21e.length;i<l;i++){
if(!(n=_21e[i])._counted){
n._counted=true;
_21f.push(Element.extend(n));
}
}
return Selector.handlers.unmark(_21f);
},descendant:function(_223){
var h=Selector.handlers;
for(var i=0,_226=[],node;node=_223[i];i++){
h.concat(_226,node.getElementsByTagName("*"));
}
return _226;
},child:function(_228){
var h=Selector.handlers;
for(var i=0,_22b=[],node;node=_228[i];i++){
for(var j=0,_22e=[],_22f;_22f=node.childNodes[j];j++){
if(_22f.nodeType==1&&_22f.tagName!="!"){
_22b.push(_22f);
}
}
}
return _22b;
},adjacent:function(_230){
for(var i=0,_232=[],node;node=_230[i];i++){
var next=this.nextElementSibling(node);
if(next){
_232.push(next);
}
}
return _232;
},laterSibling:function(_235){
var h=Selector.handlers;
for(var i=0,_238=[],node;node=_235[i];i++){
h.concat(_238,Element.nextSiblings(node));
}
return _238;
},nextElementSibling:function(node){
while(node=node.nextSibling){
if(node.nodeType==1){
return node;
}
}
return null;
},previousElementSibling:function(node){
while(node=node.previousSibling){
if(node.nodeType==1){
return node;
}
}
return null;
},tagName:function(_23c,root,_23e,_23f){
_23e=_23e.toUpperCase();
var _240=[],h=Selector.handlers;
if(_23c){
if(_23f){
if(_23f=="descendant"){
for(var i=0,node;node=_23c[i];i++){
h.concat(_240,node.getElementsByTagName(_23e));
}
return _240;
}else{
_23c=this[_23f](_23c);
}
if(_23e=="*"){
return _23c;
}
}
for(var i=0,node;node=_23c[i];i++){
if(node.tagName.toUpperCase()==_23e){
_240.push(node);
}
}
return _240;
}else{
return root.getElementsByTagName(_23e);
}
},id:function(_244,root,id,_247){
var _248=$(id),h=Selector.handlers;
if(!_244&&root==document){
return _248?[_248]:[];
}
if(_244){
if(_247){
if(_247=="child"){
for(var i=0,node;node=_244[i];i++){
if(_248.parentNode==node){
return [_248];
}
}
}else{
if(_247=="descendant"){
for(var i=0,node;node=_244[i];i++){
if(Element.descendantOf(_248,node)){
return [_248];
}
}
}else{
if(_247=="adjacent"){
for(var i=0,node;node=_244[i];i++){
if(Selector.handlers.previousElementSibling(_248)==node){
return [_248];
}
}
}else{
_244=h[_247](_244);
}
}
}
}
for(var i=0,node;node=_244[i];i++){
if(node==_248){
return [_248];
}
}
return [];
}
return (_248&&Element.descendantOf(_248,root))?[_248]:[];
},className:function(_24c,root,_24e,_24f){
if(_24c&&_24f){
_24c=this[_24f](_24c);
}
return Selector.handlers.byClassName(_24c,root,_24e);
},byClassName:function(_250,root,_252){
if(!_250){
_250=Selector.handlers.descendant([root]);
}
var _253=" "+_252+" ";
for(var i=0,_255=[],node,_257;node=_250[i];i++){
_257=node.className;
if(_257.length==0){
continue;
}
if(_257==_252||(" "+_257+" ").include(_253)){
_255.push(node);
}
}
return _255;
},attrPresence:function(_258,root,attr){
var _25b=[];
for(var i=0,node;node=_258[i];i++){
if(Element.hasAttribute(node,attr)){
_25b.push(node);
}
}
return _25b;
},attr:function(_25e,root,attr,_261,_262){
if(!_25e){
_25e=root.getElementsByTagName("*");
}
var _263=Selector.operators[_262],_264=[];
for(var i=0,node;node=_25e[i];i++){
var _267=Element.readAttribute(node,attr);
if(_267===null){
continue;
}
if(_263(_267,_261)){
_264.push(node);
}
}
return _264;
},pseudo:function(_268,name,_26a,root,_26c){
if(_268&&_26c){
_268=this[_26c](_268);
}
if(!_268){
_268=root.getElementsByTagName("*");
}
return Selector.pseudos[name](_268,_26a,root);
}},pseudos:{"first-child":function(_26d,_26e,root){
for(var i=0,_271=[],node;node=_26d[i];i++){
if(Selector.handlers.previousElementSibling(node)){
continue;
}
_271.push(node);
}
return _271;
},"last-child":function(_273,_274,root){
for(var i=0,_277=[],node;node=_273[i];i++){
if(Selector.handlers.nextElementSibling(node)){
continue;
}
_277.push(node);
}
return _277;
},"only-child":function(_279,_27a,root){
var h=Selector.handlers;
for(var i=0,_27e=[],node;node=_279[i];i++){
if(!h.previousElementSibling(node)&&!h.nextElementSibling(node)){
_27e.push(node);
}
}
return _27e;
},"nth-child":function(_280,_281,root){
return Selector.pseudos.nth(_280,_281,root);
},"nth-last-child":function(_283,_284,root){
return Selector.pseudos.nth(_283,_284,root,true);
},"nth-of-type":function(_286,_287,root){
return Selector.pseudos.nth(_286,_287,root,false,true);
},"nth-last-of-type":function(_289,_28a,root){
return Selector.pseudos.nth(_289,_28a,root,true,true);
},"first-of-type":function(_28c,_28d,root){
return Selector.pseudos.nth(_28c,"1",root,false,true);
},"last-of-type":function(_28f,_290,root){
return Selector.pseudos.nth(_28f,"1",root,true,true);
},"only-of-type":function(_292,_293,root){
var p=Selector.pseudos;
return p["last-of-type"](p["first-of-type"](_292,_293,root),_293,root);
},getIndices:function(a,b,_298){
if(a==0){
return b>0?[b]:[];
}
return $R(1,_298).inject([],function(memo,i){
if(0==(i-b)%a&&(i-b)/a>=0){
memo.push(i);
}
return memo;
});
},nth:function(_29b,_29c,root,_29e,_29f){
if(_29b.length==0){
return [];
}
if(_29c=="even"){
_29c="2n+0";
}
if(_29c=="odd"){
_29c="2n+1";
}
var h=Selector.handlers,_2a1=[],_2a2=[],m;
h.mark(_29b);
for(var i=0,node;node=_29b[i];i++){
if(!node.parentNode._counted){
h.index(node.parentNode,_29e,_29f);
_2a2.push(node.parentNode);
}
}
if(_29c.match(/^\d+$/)){
_29c=Number(_29c);
for(var i=0,node;node=_29b[i];i++){
if(node.nodeIndex==_29c){
_2a1.push(node);
}
}
}else{
if(m=_29c.match(/^(-?\d*)?n(([+-])(\d+))?/)){
if(m[1]=="-"){
m[1]=-1;
}
var a=m[1]?Number(m[1]):1;
var b=m[2]?Number(m[2]):0;
var _2a8=Selector.pseudos.getIndices(a,b,_29b.length);
for(var i=0,node,l=_2a8.length;node=_29b[i];i++){
for(var j=0;j<l;j++){
if(node.nodeIndex==_2a8[j]){
_2a1.push(node);
}
}
}
}
}
h.unmark(_29b);
h.unmark(_2a2);
return _2a1;
},"empty":function(_2ab,_2ac,root){
for(var i=0,_2af=[],node;node=_2ab[i];i++){
if(node.tagName=="!"||(node.firstChild&&!node.innerHTML.match(/^\s*$/))){
continue;
}
_2af.push(node);
}
return _2af;
},"not":function(_2b1,_2b2,root){
var h=Selector.handlers,_2b5,m;
var _2b7=new Selector(_2b2).findElements(root);
h.mark(_2b7);
for(var i=0,_2b9=[],node;node=_2b1[i];i++){
if(!node._counted){
_2b9.push(node);
}
}
h.unmark(_2b7);
return _2b9;
},"enabled":function(_2bb,_2bc,root){
for(var i=0,_2bf=[],node;node=_2bb[i];i++){
if(!node.disabled){
_2bf.push(node);
}
}
return _2bf;
},"disabled":function(_2c1,_2c2,root){
for(var i=0,_2c5=[],node;node=_2c1[i];i++){
if(node.disabled){
_2c5.push(node);
}
}
return _2c5;
},"checked":function(_2c7,_2c8,root){
for(var i=0,_2cb=[],node;node=_2c7[i];i++){
if(node.checked){
_2cb.push(node);
}
}
return _2cb;
}},operators:{"=":function(nv,v){
return nv==v;
},"!=":function(nv,v){
return nv!=v;
},"^=":function(nv,v){
return nv.startsWith(v);
},"$=":function(nv,v){
return nv.endsWith(v);
},"*=":function(nv,v){
return nv.include(v);
},"~=":function(nv,v){
return (" "+nv+" ").include(" "+v+" ");
},"|=":function(nv,v){
return ("-"+nv.toUpperCase()+"-").include("-"+v.toUpperCase()+"-");
}},matchElements:function(_2db,_2dc){
var _2dd=new Selector(_2dc).findElements(),h=Selector.handlers;
h.mark(_2dd);
for(var i=0,_2e0=[],_2e1;_2e1=_2db[i];i++){
if(_2e1._counted){
_2e0.push(_2e1);
}
}
h.unmark(_2dd);
return _2e0;
},findElement:function(_2e2,_2e3,_2e4){
if(typeof _2e3=="number"){
_2e4=_2e3;
_2e3=false;
}
return Selector.matchElements(_2e2,_2e3||"*")[_2e4||0];
},findChildElements:function(_2e5,_2e6){
var _2e7=_2e6.join(","),_2e6=[];
_2e7.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(m){
_2e6.push(m[1].strip());
});
var _2e9=[],h=Selector.handlers;
for(var i=0,l=_2e6.length,_2ed;i<l;i++){
_2ed=new Selector(_2e6[i].strip());
h.concat(_2e9,_2ed.findElements(_2e5));
}
return (l>1)?h.unique(_2e9):_2e9;
}});
function $$(){
return Selector.findChildElements(document,$A(arguments));
}
var Form={reset:function(form){
$(form).reset();
return form;
},serializeElements:function(_2ef,_2f0){
var data=_2ef.inject({},function(_2f2,_2f3){
if(!_2f3.disabled&&_2f3.name){
var key=_2f3.name,_2f5=$(_2f3).getValue();
if(_2f5!=null){
if(key in _2f2){
if(_2f2[key].constructor!=Array){
_2f2[key]=[_2f2[key]];
}
_2f2[key].push(_2f5);
}else{
_2f2[key]=_2f5;
}
}
}
return _2f2;
});
return _2f0?data:Hash.toQueryString(data);
}};
Form.Methods={serialize:function(form,_2f7){
return Form.serializeElements(Form.getElements(form),_2f7);
},getElements:function(form){
return $A($(form).getElementsByTagName("*")).inject([],function(_2f9,_2fa){
if(Form.Element.Serializers[_2fa.tagName.toLowerCase()]){
_2f9.push(Element.extend(_2fa));
}
return _2f9;
});
},getInputs:function(form,_2fc,name){
form=$(form);
var _2fe=form.getElementsByTagName("input");
if(!_2fc&&!name){
return $A(_2fe).map(Element.extend);
}
for(var i=0,_300=[],_301=_2fe.length;i<_301;i++){
var _302=_2fe[i];
if((_2fc&&_302.type!=_2fc)||(name&&_302.name!=name)){
continue;
}
_300.push(Element.extend(_302));
}
return _300;
},disable:function(form){
form=$(form);
Form.getElements(form).invoke("disable");
return form;
},enable:function(form){
form=$(form);
Form.getElements(form).invoke("enable");
return form;
},findFirstElement:function(form){
return $(form).getElements().find(function(_306){
return _306.type!="hidden"&&!_306.disabled&&["input","select","textarea"].include(_306.tagName.toLowerCase());
});
},focusFirstElement:function(form){
form=$(form);
form.findFirstElement().activate();
return form;
},request:function(form,_309){
form=$(form),_309=Object.clone(_309||{});
var _30a=_309.parameters;
_309.parameters=form.serialize(true);
if(_30a){
if(typeof _30a=="string"){
_30a=_30a.toQueryParams();
}
Object.extend(_309.parameters,_30a);
}
if(form.hasAttribute("method")&&!_309.method){
_309.method=form.method;
}
return new Ajax.Request(form.readAttribute("action"),_309);
}};
Form.Element={focus:function(_30b){
$(_30b).focus();
return _30b;
},select:function(_30c){
$(_30c).select();
return _30c;
}};
Form.Element.Methods={serialize:function(_30d){
_30d=$(_30d);
if(!_30d.disabled&&_30d.name){
var _30e=_30d.getValue();
if(_30e!=undefined){
var pair={};
pair[_30d.name]=_30e;
return Hash.toQueryString(pair);
}
}
return "";
},getValue:function(_310){
_310=$(_310);
var _311=_310.tagName.toLowerCase();
return Form.Element.Serializers[_311](_310);
},clear:function(_312){
$(_312).value="";
return _312;
},present:function(_313){
return $(_313).value!="";
},activate:function(_314){
_314=$(_314);
try{
_314.focus();
if(_314.select&&(_314.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(_314.type))){
_314.select();
}
}
catch(e){
}
return _314;
},disable:function(_315){
_315=$(_315);
_315.blur();
_315.disabled=true;
return _315;
},enable:function(_316){
_316=$(_316);
_316.disabled=false;
return _316;
}};
var Field=Form.Element;
var $F=Form.Element.Methods.getValue;
Form.Element.Serializers={input:function(_317){
switch(_317.type.toLowerCase()){
case "checkbox":
case "radio":
return Form.Element.Serializers.inputSelector(_317);
default:
return Form.Element.Serializers.textarea(_317);
}
},inputSelector:function(_318){
return _318.checked?_318.value:null;
},textarea:function(_319){
return _319.value;
},select:function(_31a){
return this[_31a.type=="select-one"?"selectOne":"selectMany"](_31a);
},selectOne:function(_31b){
var _31c=_31b.selectedIndex;
return _31c>=0?this.optionValue(_31b.options[_31c]):null;
},selectMany:function(_31d){
var _31e,_31f=_31d.length;
if(!_31f){
return null;
}
for(var i=0,_31e=[];i<_31f;i++){
var opt=_31d.options[i];
if(opt.selected){
_31e.push(this.optionValue(opt));
}
}
return _31e;
},optionValue:function(opt){
return Element.extend(opt).hasAttribute("value")?opt.value:opt.text;
}};
Abstract.TimedObserver=function(){
};
Abstract.TimedObserver.prototype={initialize:function(_323,_324,_325){
this.frequency=_324;
this.element=$(_323);
this.callback=_325;
this.lastValue=this.getValue();
this.registerCallback();
},registerCallback:function(){
setInterval(this.onTimerEvent.bind(this),this.frequency*1000);
},onTimerEvent:function(){
var _326=this.getValue();
var _327=("string"==typeof this.lastValue&&"string"==typeof _326?this.lastValue!=_326:String(this.lastValue)!=String(_326));
if(_327){
this.callback(this.element,_326);
this.lastValue=_326;
}
}};
Form.Element.Observer=Class.create();
Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){
return Form.Element.getValue(this.element);
}});
Form.Observer=Class.create();
Form.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){
return Form.serialize(this.element);
}});
Abstract.EventObserver=function(){
};
Abstract.EventObserver.prototype={initialize:function(_328,_329){
this.element=$(_328);
this.callback=_329;
this.lastValue=this.getValue();
if(this.element.tagName.toLowerCase()=="form"){
this.registerFormCallbacks();
}else{
this.registerCallback(this.element);
}
},onElementEvent:function(){
var _32a=this.getValue();
if(this.lastValue!=_32a){
this.callback(this.element,_32a);
this.lastValue=_32a;
}
},registerFormCallbacks:function(){
Form.getElements(this.element).each(this.registerCallback.bind(this));
},registerCallback:function(_32b){
if(_32b.type){
switch(_32b.type.toLowerCase()){
case "checkbox":
case "radio":
Event.observe(_32b,"click",this.onElementEvent.bind(this));
break;
default:
Event.observe(_32b,"change",this.onElementEvent.bind(this));
break;
}
}
}};
Form.Element.EventObserver=Class.create();
Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){
return Form.Element.getValue(this.element);
}});
Form.EventObserver=Class.create();
Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){
return Form.serialize(this.element);
}});
if(!window.Event){
var Event=new Object();
}
Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,element:function(_32c){
return $(_32c.target||_32c.srcElement);
},isLeftClick:function(_32d){
return (((_32d.which)&&(_32d.which==1))||((_32d.button)&&(_32d.button==1)));
},pointerX:function(_32e){
return _32e.pageX||(_32e.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));
},pointerY:function(_32f){
return _32f.pageY||(_32f.clientY+(document.documentElement.scrollTop||document.body.scrollTop));
},stop:function(_330){
if(_330.preventDefault){
_330.preventDefault();
_330.stopPropagation();
}else{
_330.returnValue=false;
_330.cancelBubble=true;
}
},findElement:function(_331,_332){
var _333=Event.element(_331);
while(_333.parentNode&&(!_333.tagName||(_333.tagName.toUpperCase()!=_332.toUpperCase()))){
_333=_333.parentNode;
}
return _333;
},observers:false,_observeAndCache:function(_334,name,_336,_337){
if(!this.observers){
this.observers=[];
}
if(_334.addEventListener){
this.observers.push([_334,name,_336,_337]);
_334.addEventListener(name,_336,_337);
}else{
if(_334.attachEvent){
this.observers.push([_334,name,_336,_337]);
_334.attachEvent("on"+name,_336);
}
}
},unloadCache:function(){
if(!Event.observers){
return;
}
for(var i=0,_339=Event.observers.length;i<_339;i++){
Event.stopObserving.apply(this,Event.observers[i]);
Event.observers[i][0]=null;
}
Event.observers=false;
},observe:function(_33a,name,_33c,_33d){
_33a=$(_33a);
_33d=_33d||false;
if(name=="keypress"&&(Prototype.Browser.WebKit||_33a.attachEvent)){
name="keydown";
}
Event._observeAndCache(_33a,name,_33c,_33d);
},stopObserving:function(_33e,name,_340,_341){
_33e=$(_33e);
_341=_341||false;
if(name=="keypress"&&(Prototype.Browser.WebKit||_33e.attachEvent)){
name="keydown";
}
if(_33e.removeEventListener){
_33e.removeEventListener(name,_340,_341);
}else{
if(_33e.detachEvent){
try{
_33e.detachEvent("on"+name,_340);
}
catch(e){
}
}
}
}});
if(Prototype.Browser.IE){
Event.observe(window,"unload",Event.unloadCache,false);
}
var Position={includeScrollOffsets:false,prepare:function(){
this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;
this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;
},realOffset:function(_342){
var _343=0,_344=0;
do{
_343+=_342.scrollTop||0;
_344+=_342.scrollLeft||0;
_342=_342.parentNode;
}while(_342);
return [_344,_343];
},cumulativeOffset:function(_345){
var _346=0,_347=0;
do{
_346+=_345.offsetTop||0;
_347+=_345.offsetLeft||0;
_345=_345.offsetParent;
}while(_345);
return [_347,_346];
},positionedOffset:function(_348){
var _349=0,_34a=0;
do{
_349+=_348.offsetTop||0;
_34a+=_348.offsetLeft||0;
_348=_348.offsetParent;
if(_348){
if(_348.tagName=="BODY"){
break;
}
var p=Element.getStyle(_348,"position");
if(p=="relative"||p=="absolute"){
break;
}
}
}while(_348);
return [_34a,_349];
},offsetParent:function(_34c){
if(_34c.offsetParent){
return _34c.offsetParent;
}
if(_34c==document.body){
return _34c;
}
while((_34c=_34c.parentNode)&&_34c!=document.body){
if(Element.getStyle(_34c,"position")!="static"){
return _34c;
}
}
return document.body;
},within:function(_34d,x,y){
if(this.includeScrollOffsets){
return this.withinIncludingScrolloffsets(_34d,x,y);
}
this.xcomp=x;
this.ycomp=y;
this.offset=this.cumulativeOffset(_34d);
return (y>=this.offset[1]&&y<this.offset[1]+_34d.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+_34d.offsetWidth);
},withinIncludingScrolloffsets:function(_350,x,y){
var _353=this.realOffset(_350);
this.xcomp=x+_353[0]-this.deltaX;
this.ycomp=y+_353[1]-this.deltaY;
this.offset=this.cumulativeOffset(_350);
return (this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+_350.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+_350.offsetWidth);
},overlap:function(mode,_355){
if(!mode){
return 0;
}
if(mode=="vertical"){
return ((this.offset[1]+_355.offsetHeight)-this.ycomp)/_355.offsetHeight;
}
if(mode=="horizontal"){
return ((this.offset[0]+_355.offsetWidth)-this.xcomp)/_355.offsetWidth;
}
},page:function(_356){
var _357=0,_358=0;
var _359=_356;
do{
_357+=_359.offsetTop||0;
_358+=_359.offsetLeft||0;
if(_359.offsetParent==document.body){
if(Element.getStyle(_359,"position")=="absolute"){
break;
}
}
}while(_359=_359.offsetParent);
_359=_356;
do{
if(!window.opera||_359.tagName=="BODY"){
_357-=_359.scrollTop||0;
_358-=_359.scrollLeft||0;
}
}while(_359=_359.parentNode);
return [_358,_357];
},clone:function(_35a,_35b){
var _35c=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});
_35a=$(_35a);
var p=Position.page(_35a);
_35b=$(_35b);
var _35e=[0,0];
var _35f=null;
if(Element.getStyle(_35b,"position")=="absolute"){
_35f=Position.offsetParent(_35b);
_35e=Position.page(_35f);
}
if(_35f==document.body){
_35e[0]-=document.body.offsetLeft;
_35e[1]-=document.body.offsetTop;
}
if(_35c.setLeft){
_35b.style.left=(p[0]-_35e[0]+_35c.offsetLeft)+"px";
}
if(_35c.setTop){
_35b.style.top=(p[1]-_35e[1]+_35c.offsetTop)+"px";
}
if(_35c.setWidth){
_35b.style.width=_35a.offsetWidth+"px";
}
if(_35c.setHeight){
_35b.style.height=_35a.offsetHeight+"px";
}
},absolutize:function(_360){
_360=$(_360);
if(_360.style.position=="absolute"){
return;
}
Position.prepare();
var _361=Position.positionedOffset(_360);
var top=_361[1];
var left=_361[0];
var _364=_360.clientWidth;
var _365=_360.clientHeight;
_360._originalLeft=left-parseFloat(_360.style.left||0);
_360._originalTop=top-parseFloat(_360.style.top||0);
_360._originalWidth=_360.style.width;
_360._originalHeight=_360.style.height;
_360.style.position="absolute";
_360.style.top=top+"px";
_360.style.left=left+"px";
_360.style.width=_364+"px";
_360.style.height=_365+"px";
},relativize:function(_366){
_366=$(_366);
if(_366.style.position=="relative"){
return;
}
Position.prepare();
_366.style.position="relative";
var top=parseFloat(_366.style.top||0)-(_366._originalTop||0);
var left=parseFloat(_366.style.left||0)-(_366._originalLeft||0);
_366.style.top=top+"px";
_366.style.left=left+"px";
_366.style.height=_366._originalHeight;
_366.style.width=_366._originalWidth;
}};
if(Prototype.Browser.WebKit){
Position.cumulativeOffset=function(_369){
var _36a=0,_36b=0;
do{
_36a+=_369.offsetTop||0;
_36b+=_369.offsetLeft||0;
if(_369.offsetParent==document.body){
if(Element.getStyle(_369,"position")=="absolute"){
break;
}
}
_369=_369.offsetParent;
}while(_369);
return [_36b,_36a];
};
}
Element.addMethods();
function refreshPage(){
document.location.href=document.location.href;
}
function refreshSearch(){
window.parent.sendSearchRefresh(window.parent.document.getElementById("s").value);
}
function openSubWindow(url){
if(window.parent!=null){
window.parent.location=url;
}else{
window.location=url;
}
}
function getRequest(){
var _36d=false;
if(!_36d&&typeof XMLHttpRequest!="undefined"){
_36d=new XMLHttpRequest();
}
return _36d;
}
function SWURLEncode(text){
var _36f="0123456789"+"ABCDEFGHIJKLMNOPQRSTUVWXYZ"+"abcdefghijklmnopqrstuvwxyz"+"-_.!~*'()%";
var HEX="0123456789ABCDEF";
var _371=text;
var _372="";
for(var i=0;i<_371.length;i++){
var ch=_371.charAt(i);
if(ch==" "){
_372+="%20";
}else{
if(_36f.indexOf(ch)!=-1){
_372+=ch;
}else{
var _375=ch.charCodeAt(0);
if(_375=="\x19"){
_372+="'";
}else{
if(_375>255){
_372+="+";
}else{
_372+="%";
_372+=HEX.charAt((_375>>4)&15);
_372+=HEX.charAt(_375&15);
}
}
}
}
}
return _372;
}
function convertNewLinesToBrs(text){
var x=text.replace(/\n/g,"<br/>");
return x;
}
function convertBrsToNewLines(text){
var x=text.replace(/<br\/>/g,"\n");
return x;
}
function swQuoteUrl(text){
return SWURLEncode(text).replace(/\+/g,"%2C").replace(/\"/g,"%22").replace(/\'/g,"%27");
}
function isFunction(a){
return typeof a=="function";
}
function isObject(a){
return (a&&typeof a=="object")||isFunction(a);
}
function isArray(a){
return isObject(a)&&a.constructor==Array;
}
function isString(o){
return (typeof (o)=="string");
}
function swExtractData(_37f){
var data=new Array();
if(!_37f||!_37f.responseXML){
data[0]="";
return data;
}
var _381=new Array();
var xml=_37f.responseXML.documentElement;
if(xml){
_381=xml.getElementsByTagName("sp");
}
var _383=_381.length;
for(var i=0;i<_383;i++){
if(_381[i].childNodes.length>1){
data[i]="";
for(var j=0;j<_381[i].childNodes.length;j++){
var _386=_381[i].childNodes[j];
data[i]+=_386.data;
}
}else{
var _386=_381[i].firstChild;
if(_386){
data[i]=_386.data;
}else{
data[i]="";
}
}
}
return data;
}
function sendAjaxRequest(_387,page,_389,_38a,_38b,_38c,_38d){
if(!_38b){
_38b="get";
}
var url="/app?component="+_387+"&page="+page+"&service=xtile";
if(!_38c){
url+="&rand="+(Math.random()*1000);
}
if(_38a==null){
_38a=sendAjaxRequest.arguments;
}
if(isArray(_38a)==false){
var _38f=new Array(1);
_38f[0]=_38a;
_38a=_38f;
}
var _390=_38a.length;
if(_390==1&&isArray(_38a[0])){
_38a=_38a[0];
_390=_38a.length;
}
var pars="";
var _392=new Array();
for(i=0;i<_390;i++){
if(i==0){
pars+=("sp="+encodeURIComponent(""+_38a[i]));
}else{
pars+=("&sp="+encodeURIComponent(""+_38a[i]));
}
}
var _393={method:_38b,parameters:pars,onSuccess:forwardSuccess,onFailure:forwardFailure};
var _394=new Ajax.Request(url,_393);
function forwardSuccess(_395){
var data=swExtractData(_395);
if(_389){
_389(data);
}
}
function forwardFailure(_397){
if(_38d){
_38d(_397.statusText,_397.responseText);
}
}
}
function insertIntoDom(_398,item,_39a){
if(!_398.childNodes||!_39a||_39a>=_398.childNodes.length){
_398.appendChild(item);
return;
}
var _39b=_398.firstChild;
for(var i=0;i<_39a;i++){
_39b=_39b.nextSibling;
_398.insertBefore(item,_39b);
}
}
function removeFromDomByClass(_39d,_39e){
if(!_39d.childNodes){
return false;
}
var _39f=Element.childrenWithClassName(_39d,_39e,true);
if(_39f.length==0){
return false;
}
_39d.removeChild(_39f[0]);
return true;
}
var Popup={open:function(_3a0){
this.options={url:"#",width:600,height:500,name:"_blank",location:"no",menubar:"no",toolbar:"no",status:"yes",scrollbars:"yes",resizable:"yes",left:"",top:"",normal:false};
Object.extend(this.options,_3a0||{});
if(this.options.normal){
this.options.menubar="yes";
this.options.status="yes";
this.options.toolbar="yes";
this.options.location="yes";
}
this.options.width=this.options.width<screen.availWidth?this.options.width:screen.availWidth;
this.options.height=this.options.height<screen.availHeight?this.options.height:screen.availHeight;
var _3a1=(screen.availWidth-this.options.width)/2,_3a2=(screen.availHeight-this.options.height)/2;
var _3a3="width="+this.options.width+",height="+this.options.height+",location="+this.options.location+",menubar="+this.options.menubar+",toolbar="+this.options.toolbar+",scrollbars="+this.options.scrollbars+",resizable="+this.options.resizable+",status="+this.options.status;
if(this.options.top!=""){
_3a3+=",top="+this.options.top;
}else{
_3a3+=",top="+_3a2;
}
if(this.options.left!=""){
_3a3+=",left="+this.options.left;
}else{
_3a3+=",left="+_3a1;
}
window.open(this.options.url,this.options.name,_3a3);
return false;
}};
String.prototype.trim=function(){
function LTrim(_3a4){
var re=/\s*((\S+\s*)*)/;
return _3a4.replace(re,"$1");
}
function RTrim(_3a6){
var re=/((\s*\S+)*)\s*/;
return _3a6.replace(re,"$1");
}
return LTrim(RTrim(this));
};
function getHistoryNode(){
if($("history_node")){
return $("history_node");
}else{
return window.parent.document.getElementById("history_node");
}
}
function addHistory(url){
}
function cleanHistory(node,_3aa){
node.removeChild(node.firstChild);
}
function objectToJSONString(_3ab,_3ac){
if(isArray(_3ab)){
return arrayToJSONString(_3ab,_3ac);
}
var _3ad="{";
var _3ae=true;
for(var _3af in _3ab){
if(isFunction(_3ab[_3af])){
continue;
}
if(arrayOfStringsContains(_3ac,_3af)){
continue;
}
if(!_3ae){
_3ad+=",";
}
_3ae=false;
_3ad+="\""+_3af+"\":";
if(isObject(_3ab[_3af])){
_3ad+=objectToJSONString(_3ab[_3af],_3ac);
}else{
if(isString(_3ab[_3af])){
_3ad+="\""+_3ab[_3af].replace(/"/g,"\\\"")+"\"";
}else{
_3ad+=_3ab[_3af];
}
}
}
_3ad+="}";
return _3ad;
}
function arrayOfStringsContains(_3b0,_3b1){
if(!_3b0){
return false;
}
for(var i=0;i<_3b0.length;i++){
if(_3b0[i]==_3b1){
return true;
}
}
return false;
}
function arrayToJSONString(_3b3,_3b4){
var _3b5="[";
var i;
for(i=0;i<_3b3.length;i++){
if(i>0){
_3b5+=",";
}
var _3b7=_3b3[i];
if(isObject(_3b7)){
_3b5+=objectToJSONString(_3b7,_3b4);
}else{
if(isString(_3b7)){
_3b5+="\""+_3b7+"\"";
}else{
_3b5+=_3b7;
}
}
}
_3b5+="]";
return _3b5;
}
var audioLoaded=false;
function showAudioPlayer(url,_3b9){
var data="/audio/xspf_player_slim.swf?autoplay=true&song_url="+url+"&song_title="+_3b9+"&setup=0&color=000000&alpha=1";
if(audioLoaded){
$("audio_player_div").removeChild($("audio_player"));
}
var _3bb=document.createElement("object");
_3bb.id="audio_player";
_3bb.type="application/x-shockwave-flash";
_3bb.height=15;
_3bb.width=200;
_3bb.data=data;
var _3bc=document.createElement("param");
_3bc.id="audio_player_movie";
_3bc.name="move";
_3bc.value=data;
_3bb.appendChild(_3bc);
$("audio_player_div").insertBefore(_3bb,$("audio_player_cancel"));
$("audio_player_div").style.display="";
audioLoaded=true;
}
function getFavIconUrl(url){
var _3be=false;
var href=null;
if(url!=null&&url.length>0){
try {	if (url.indexOf("reverb.feedxi.com") != -1) 
		return "http://static.ziftsolutions.com/i/feed-icon-14x14.gif"; } catch(l) {}
if(url.lastIndexOf("/")==6){
href=url+"/favicon.ico";
}else{
var fbre=new RegExp("(http://feeds.feedburner.com/)(\\w*)?");
var m=fbre.exec(url);
if(m!=null){
href="http://www."+m[2]+".com/favicon.ico";
}else{
var re=new RegExp("(http://.*?)(/|\\s)");
m=re.exec(url);
if(m!=null){
href=m[0]+"favicon.ico";
}else{
href="http://"+url+"/favicon.ico";
}
}
}
if(href){
var _3c3=new RegExp("(http://(\\w*)?\\.(\\w*)?\\.(\\w*)?)/(.*)?");
var m=_3c3.exec(href);
if(m!=null){
href="http://www."+m[3]+"."+m[4]+"/"+m[5];
}
}else{
href="http://static.ziftsolutions.com/i/feed-icon-14x14.gif";
}
}else{
href="http://static.ziftsolutions.com/i/feed-icon-14x14.gif";
}
return href;
}
function openLiteReader(feed,_3c5,type,_3c7,_3c8,_3c9){
if(!_3c8){
_3c8=600;
}
if(!_3c9){
_3c9=850;
}
if(!type){
type="RssReaderLite";
}
var link="/"+type+".html?f="+encodeURIComponent(feed)+(_3c5?"&e="+encodeURIComponent(_3c5):"")+(_3c7?"&"+_3c7:"");
Popup.open({url:link,width:_3c9,height:_3c8});
return false;
}
function openLiteReaderById(id,_3cc,type,_3ce,_3cf,_3d0){
if(!_3cf){
_3cf=600;
}
if(!_3d0){
_3d0=850;
}
if(!type){
type="RssReaderLite";
}
var link="/"+type+".html?id="+id+(_3cc?"&e="+encodeURIComponent(_3cc):"")+(_3ce?"&"+_3ce:"");
Popup.open({url:link,width:_3d0,height:_3cf});
return false;
}
function openReader(_3d2,feed,_3d4,_3d5){
var _3d6=["view","rss","isFav","type","jsSource"];
var _3d7={};
var _3d8="http://"+document.location.host;
_3d8+="/XIReader.html?";
_3d8+="title="+escape(_3d2);
_3d8+="&file="+escape(feed);
if(_3d4){
_3d8+="&entry="+escape(_3d4);
}
var _3d9=Object.extend(_3d7,_3d5);
for(var i=0;i<_3d6.length;i++){
var _3db=_3d6[i];
if(_3d9[_3db]){
_3d8+="&"+_3db+"="+escape(_3d9[_3db]);
}
}
dojo.require("sw.xi.reader.utils.popup");
var _3dc=SWFactory.createObject("Popup",_3d8,{width:800,height:600});
_3dc.open();
return false;
}
function signIn(){
dojo.require("sw.common.widget.XILoginDialog");
var d=dojo.widget.createWidget("sw.common:XILoginDialog");
document.body.appendChild(d.domNode);
d.domNode.style.left="-2000px";
d.domNode.style.position="absolute";
d.show();
}
function register(){
dojo.require("sw.common.widget.XILoginDialog");
var d=dojo.widget.createWidget("sw.common:XILoginDialog");
document.body.appendChild(d.domNode);
d.domNode.style.left="-2000px";
d.domNode.style.position="absolute";
d.showRegister();
}
function getRootUrl(){
var _3df=location.href;
var _3e0=_3df.indexOf(".html");
while(_3df.charAt(_3e0)!="/"){
_3e0--;
}
_3e0++;
return _3df.substring(0,_3e0);
}
function popupTAC(){
openReader("Terms and Conditions","http://"+document.location.host+"/manual/xiTAC.xml",null,{view:"o,-e"});
}
function popupPrivacy(){
openReader("Privacy Policy","http://"+document.location.host+"/manual/xiPrivacy.xml",null,{view:"o,-e"});
}
function popupFAQ(){
openReader("Frequently bAsked Questions","http://"+document.location.host+"/manual/xiFAQ.xml",null,{view:"o,-3p"});
}
function reloadTopMenu(){
dojo.require("dojo.widget.ContentPane");
var _3e1="xiTopMenu";
aDlg=$(_3e1);
var _3e2=aDlg.parentNode;
var _3e3=document.createElement("div");
_3e2.removeChild(aDlg);
_3e3.setAttribute("id","xiTopMenuReloaded");
_3e2.appendChild(_3e3);
aDlg=_3e3;
aDlg.setAttribute("dojoType","contentPane");
var href=getRootUrl()+"block/TopMenuForReload.html";
aDlg.setAttribute("href",href);
var _99=new dojo.xml.Parse();
var _9c=_99.parseElement(aDlg,false,true);
dojo.widget.getParser().createComponents(_9c);
var _3e7=dojo.widget.byId("xiTopMenuReloaded");
_3e7.show();
if(xiTabSet){
xiTabSet.rerender();
}
}
function notifyXiReaderLoaded(_3e8){
dojo.require("dojo.event.topic");
dojo.event.topic.publish("AgrLoaded",{node:_3e8});
}
function loadSearchTab(){
if(xi_ts&&xi_ts.search){
xi_ts.search($("s").value,false,xiTabSet.getUid());
}
}
function refreshSearchTab(){
if(xi_ts&&xi_ts.search){
xi_ts.search($("s").value);
}
}
function getParameter(_3e9,_3ea){
if(!_3ea){
_3ea=window.top.location.search.substring(1);
}
var _3e9=_3e9+"=";
if(_3ea.length>0){
begin=_3ea.indexOf(_3e9);
if(begin!=-1){
begin+=_3e9.length;
end=_3ea.indexOf("&",begin);
if(end==-1){
end=_3ea.length;
}
return unescape(_3ea.substring(begin,end));
}
return null;
}
}
var SWFactory={ClassRegistry:new Object(),pendingClasses:new Object(),createClass:function(_3eb,_3ec,_3ed){
if(!arguments[2]){
_3ed=_3ec;
_3ec=SWObject;
}
if(typeof _3ec=="string"){
var _3ee=this.ClassRegistry[_3ec];
if(!_3ee){
var _3ef=this.pendingClasses[_3ec];
if(!_3ef){
_3ef=new Array();
this.pendingClasses[_3ec]=_3ef;
}
_3ef.push({name:_3eb,methods:_3ed});
return null;
}
_3ec=_3ee;
}
if((typeof _3eb!="string")||(typeof _3ec!="function")){
throw ("SWFactory::createClass requires a string and (optionally) a function");
}
var _3f0=Class.create();
_3f0.getName=function(){
return _3eb;
};
Object.extend(_3f0.prototype,_3ec.prototype);
Object.extend(_3f0.prototype,{swsuper:_3ec,getClass:function(){
return _3f0;
}});
var _3f1=_3ec.getName();
for(var _3f2 in _3ed){
if(typeof _3ed[_3f2]=="function"){
var _3f3=_3ec.prototype[_3f2];
if(_3f3&&typeof _3f3=="function"){
_3ed[_3f1+"_"+_3f2]=_3ec.prototype[_3f2];
_3ed[_3f1+"_"+_3f2].isSuper=true;
}
}
}
Object.extend(_3f0.prototype,_3ed);
this.registerClass(_3eb,_3f0);
var _3ef=this.pendingClasses[_3eb];
if(_3ef){
var _3f4=0;
for(_3f4=0;_3f4<_3ef.length;_3f4++){
this.createClass(_3ef[_3f4].name,_3eb,_3ef[_3f4].methods);
}
delete this.pendingClasses[_3eb];
}
return _3f0;
},registerClass:function(_3f5,_3f6){
if((typeof _3f5!="string")||(typeof _3f6!="function")){
throw ("SWFactory::registerClass requires a string and a function");
}
this.ClassRegistry[_3f5]=_3f6;
},createObject:function(_3f7){
var func=this.ClassRegistry[_3f7];
if(func==null){
throw ("SWFactory::createObject doesn't have a registered class "+_3f7);
}
var oNew=new func();
for(var _3fa in oNew.prototype){
if(oNew.prototype[_3fa].isSuper==true){
oNew[_3fa]=oNew[_3fa].bind(oNew);
}
}
if(arguments.length<2){
oNew.init();
}else{
if(arguments.length<3){
oNew.init(arguments[1]);
}else{
if(arguments.length<4){
oNew.init(arguments[1],arguments[2]);
}else{
if(arguments.length<5){
oNew.init(arguments[1],arguments[2],arguments[3]);
}else{
oNew.init(arguments[1],arguments[2],arguments[3],arguments[4]);
}
}
}
}
return oNew;
},returnClass:function(_3fb){
return this.ClassRegistry[_3fb];
},extendBaseClass:function(_3fc,_3fd){
var _3fe=this.createClass(_3fc+"2",_3fc,_3fd);
this.registerClass(_3fc,_3fe);
}};
var SWObject=Class.create();
SWFactory.registerClass("SWObject",SWObject);
SWObject.getName=function(){
return "SWObject";
};
SWObject.prototype={getDefaults:function(){
return {};
},getClass:function(){
return SWObject;
},initialize:function(){
},init:function(){
this.options=Object.extend(this.getDefaults(),arguments[0]||{});
},getOption:function(_3ff){
return this.options[_3ff];
},getDefaultValue:function(_400,_401){
var t1=this.getOption(_400);
if(t1){
return t1;
}
return _401;
}};

/**
 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");}
_19="<embed class=\"video_embed\" type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";
}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object class=\"video_embed\" id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();return true;
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
var _23=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return _23;};
deconcept.PlayerVersion=function(_27){
this.major=_27[0]!=null?parseInt(_27[0]):0;
this.minor=_27[1]!=null?parseInt(_27[1]):0;
this.rev=_27[2]!=null?parseInt(_27[2]):0;
};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){
return false;
}return true;};
deconcept.util={getRequestParameter:function(_29){
var q=document.location.search||document.location.hash;
if(q){var _2b=q.substring(1).split("&");
for(var i=0;i<_2b.length;i++){
if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
return "";}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
var _2d=document.getElementsByTagName("OBJECT");
for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){
if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};
deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
__flash_savedUnloadHandler=function(){};
if(typeof window.onunload=="function"){
var _30=window.onunload;
window.onunload=function(){
deconcept.SWFObjectUtil.cleanupSWFs();_30();};
}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};
if(typeof window.onbeforeunload=="function"){
var oldBeforeUnload=window.onbeforeunload;
window.onbeforeunload=function(){
//deconcept.SWFObjectUtil.prepUnload();
//oldBeforeUnload();
};
}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
if(Array.prototype.push==null){
Array.prototype.push=function(_31){
this[this.length]=_31;
return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject;
var SWFObject=deconcept.SWFObject;
/*
  SortTable
  version 2
  7th April 2007
  Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/
  
  Instructions:
  Download this file
  Add <script src="sorttable.js"></script> to your HTML
  Add class="sortable" to any table you'd like to make sortable
  Click on the headers to sort
  
  Thanks to many, many people for contributions and suggestions.
  Licenced as X11: http://www.kryogenix.org/code/browser/licence.html
  This basically means: do what you want with it.
*/

 
var stIsIE = /*@cc_on!@*/false;

sorttable = {
  init: function() {
    // quit if this function has already been called
    if (arguments.callee.done) return;
    // flag this function so we don't do the same thing twice
    arguments.callee.done = true;
    // kill the timer
    if (_timer) clearInterval(_timer);
    
    if (!document.createElement || !document.getElementsByTagName) return;
    
    sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/;
    
    forEach(document.getElementsByTagName('table'), function(table) {
      if (table.className.search(/\bsortable\b/) != -1) {
        sorttable.makeSortable(table);
      }
    });
    
  },
  
  makeSortable: function(table) {
    if (table.getElementsByTagName('thead').length == 0) {
      // table doesn't have a tHead. Since it should have, create one and
      // put the first table row in it.
      the = document.createElement('thead');
      the.appendChild(table.rows[0]);
      table.insertBefore(the,table.firstChild);
    }
    // Safari doesn't support table.tHead, sigh
    if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0];
    
    if (table.tHead.rows.length != 1) return; // can't cope with two header rows
    
    // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as
    // "total" rows, for example). This is B&R, since what you're supposed
    // to do is put them in a tfoot. So, if there are sortbottom rows,
    // for backwards compatibility, move them to tfoot (creating it if needed).
    sortbottomrows = [];
    for (var i=0; i<table.rows.length; i++) {
      if (table.rows[i].className.search(/\bsortbottom\b/) != -1) {
        sortbottomrows[sortbottomrows.length] = table.rows[i];
      }
    }
    if (sortbottomrows) {
      if (table.tFoot == null) {
        // table doesn't have a tfoot. Create one.
        tfo = document.createElement('tfoot');
        table.appendChild(tfo);
      }
      for (var i=0; i<sortbottomrows.length; i++) {
        tfo.appendChild(sortbottomrows[i]);
      }
      delete sortbottomrows;
    }
    
    // work through each column and calculate its type
    headrow = table.tHead.rows[0].cells;
    for (var i=0; i<headrow.length; i++) {
      // manually override the type with a sorttable_type attribute
      if (!headrow[i].className.match(/\bsorttable_nosort\b/)) { // skip this col
        mtch = headrow[i].className.match(/\bsorttable_([a-z0-9]+)\b/);
        if (mtch) { override = mtch[1]; }
	      if (mtch && typeof sorttable["sort_"+override] == 'function') {
	        headrow[i].sorttable_sortfunction = sorttable["sort_"+override];
	      } else {
	        headrow[i].sorttable_sortfunction = sorttable.guessType(table,i);
	      }
	      // make it clickable to sort
	      headrow[i].sorttable_columnindex = i;
	      headrow[i].sorttable_tbody = table.tBodies[0];
	      dean_addEvent(headrow[i],"click", function(e) {

          if (this.className.search(/\bsorttable_sorted\b/) != -1) {
            // if we're already sorted by this column, just 
            // reverse the table, which is quicker
            sorttable.reverse(this.sorttable_tbody);
            this.className = this.className.replace('sorttable_sorted',
                                                    'sorttable_sorted_reverse');
            this.removeChild(document.getElementById('sorttable_sortfwdind'));
            sortrevind = document.createElement('span');
            sortrevind.id = "sorttable_sortrevind";
            sortrevind.innerHTML = stIsIE ? '&nbsp<font face="webdings">5</font>' : '&nbsp;&#x25B4;';
            this.appendChild(sortrevind);
            return;
          }
          if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) {
            // if we're already sorted by this column in reverse, just 
            // re-reverse the table, which is quicker
            sorttable.reverse(this.sorttable_tbody);
            this.className = this.className.replace('sorttable_sorted_reverse',
                                                    'sorttable_sorted');
            this.removeChild(document.getElementById('sorttable_sortrevind'));
            sortfwdind = document.createElement('span');
            sortfwdind.id = "sorttable_sortfwdind";
            sortfwdind.innerHTML = stIsIE ? '&nbsp<font face="webdings">6</font>' : '&nbsp;&#x25BE;';
            this.appendChild(sortfwdind);
            return;
          }
          
          // remove sorttable_sorted classes
          theadrow = this.parentNode;
          forEach(theadrow.childNodes, function(cell) {
            if (cell.nodeType == 1) { // an element
              cell.className = cell.className.replace('sorttable_sorted_reverse','');
              cell.className = cell.className.replace('sorttable_sorted','');
            }
          });
          sortfwdind = document.getElementById('sorttable_sortfwdind');
          if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); }
          sortrevind = document.getElementById('sorttable_sortrevind');
          if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); }
          
          this.className += ' sorttable_sorted';
          sortfwdind = document.createElement('span');
          sortfwdind.id = "sorttable_sortfwdind";
          sortfwdind.innerHTML = stIsIE ? '&nbsp<font face="webdings">6</font>' : '&nbsp;&#x25BE;';
          this.appendChild(sortfwdind);

	        // build an array to sort. This is a Schwartzian transform thing,
	        // i.e., we "decorate" each row with the actual sort key,
	        // sort based on the sort keys, and then put the rows back in order
	        // which is a lot faster because you only do getInnerText once per row
	        row_array = [];
	        col = this.sorttable_columnindex;
	        rows = this.sorttable_tbody.rows;
	        for (var j=0; j<rows.length; j++) {
	          row_array[row_array.length] = [sorttable.getInnerText(rows[j].cells[col]), rows[j]];
	        }
	        /* If you want a stable sort, uncomment the following line */
	        //sorttable.shaker_sort(row_array, this.sorttable_sortfunction);
	        /* and comment out this one */
	        row_array.sort(this.sorttable_sortfunction);
	        
	        tb = this.sorttable_tbody;
	        for (var j=0; j<row_array.length; j++) {
	          tb.appendChild(row_array[j][1]);
	        }
	        
	        delete row_array;
	      });
	    }
    }
  },
  
  guessType: function(table, column) {
    // guess the type of a column based on its first non-blank row
    sortfn = sorttable.sort_alpha;
    for (var i=0; i<table.tBodies[0].rows.length; i++) {
      text = sorttable.getInnerText(table.tBodies[0].rows[i].cells[column]);
      if (text != '') {
        if (text.match(/^-?[�$�]?[\d,.]+%?$/)) {
          return sorttable.sort_numeric;
        }
        // check for a date: dd/mm/yyyy or dd/mm/yy 
        // can have / or . or - as separator
        // can be mm/dd as well
        possdate = text.match(sorttable.DATE_RE);
        if (possdate) {
          // looks like a date
          first = parseInt(possdate[1]);
          second = parseInt(possdate[2]);
          if (first > 12) {
            // definitely dd/mm
            return sorttable.sort_ddmm;
          } else if (second > 12) {
            return sorttable.sort_mmdd;
          } else {
            // looks like a date, but we can't tell which, so assume
            // that it's dd/mm (English imperialism!) and keep looking
            sortfn = sorttable.sort_ddmm;
          }
        }
      }
    }
    return sortfn;
  },
  
  getInnerText: function(node) {
    // gets the text we want to use for sorting for a cell.
    // strips leading and trailing whitespace.
    // this is *not* a generic getInnerText function; it's special to sorttable.
    // for example, you can override the cell text with a customkey attribute.
    // it also gets .value for <input> fields.
    
    hasInputs = (typeof node.getElementsByTagName == 'function') &&
                 node.getElementsByTagName('input').length;
    
    if (node.getAttribute("sorttable_customkey") != null) {
      return node.getAttribute("sorttable_customkey");
    }
    else if (typeof node.textContent != 'undefined' && !hasInputs) {
      return node.textContent.replace(/^\s+|\s+$/g, '');
    }
    else if (typeof node.innerText != 'undefined' && !hasInputs) {
      return node.innerText.replace(/^\s+|\s+$/g, '');
    }
    else if (typeof node.text != 'undefined' && !hasInputs) {
      return node.text.replace(/^\s+|\s+$/g, '');
    }
    else {
      switch (node.nodeType) {
        case 3:
          if (node.nodeName.toLowerCase() == 'input') {
            return node.value.replace(/^\s+|\s+$/g, '');
          }
        case 4:
          return node.nodeValue.replace(/^\s+|\s+$/g, '');
          break;
        case 1:
        case 11:
          var innerText = '';
          for (var i = 0; i < node.childNodes.length; i++) {
            innerText += sorttable.getInnerText(node.childNodes[i]);
          }
          return innerText.replace(/^\s+|\s+$/g, '');
          break;
        default:
          return '';
      }
    }
  },
  
  reverse: function(tbody) {
    // reverse the rows in a tbody
    newrows = [];
    for (var i=0; i<tbody.rows.length; i++) {
      newrows[newrows.length] = tbody.rows[i];
    }
    for (var i=newrows.length-1; i>=0; i--) {
       tbody.appendChild(newrows[i]);
    }
    delete newrows;
  },
  
  /* sort functions
     each sort function takes two parameters, a and b
     you are comparing a[0] and b[0] */
  sort_numeric: function(a,b) {
    aa = parseFloat(a[0].replace(/[^0-9.-]/g,''));
    if (isNaN(aa)) aa = 0;
    bb = parseFloat(b[0].replace(/[^0-9.-]/g,'')); 
    if (isNaN(bb)) bb = 0;
    return aa-bb;
  },
  sort_alpha: function(a,b) {
    if (a[0]==b[0]) return 0;
    if (a[0]<b[0]) return -1;
    return 1;
  },
  sort_ddmm: function(a,b) {
    mtch = a[0].match(sorttable.DATE_RE);
    y = mtch[3]; m = mtch[2]; d = mtch[1];
    if (m.length == 1) m = '0'+m;
    if (d.length == 1) d = '0'+d;
    dt1 = y+m+d;
    mtch = b[0].match(sorttable.DATE_RE);
    y = mtch[3]; m = mtch[2]; d = mtch[1];
    if (m.length == 1) m = '0'+m;
    if (d.length == 1) d = '0'+d;
    dt2 = y+m+d;
    if (dt1==dt2) return 0;
    if (dt1<dt2) return -1;
    return 1;
  },
  sort_mmdd: function(a,b) {
    mtch = a[0].match(sorttable.DATE_RE);
    y = mtch[3]; d = mtch[2]; m = mtch[1];
    if (m.length == 1) m = '0'+m;
    if (d.length == 1) d = '0'+d;
    dt1 = y+m+d;
    mtch = b[0].match(sorttable.DATE_RE);
    y = mtch[3]; d = mtch[2]; m = mtch[1];
    if (m.length == 1) m = '0'+m;
    if (d.length == 1) d = '0'+d;
    dt2 = y+m+d;
    if (dt1==dt2) return 0;
    if (dt1<dt2) return -1;
    return 1;
  },
  
  shaker_sort: function(list, comp_func) {
    // A stable sort function to allow multi-level sorting of data
    // see: http://en.wikipedia.org/wiki/Cocktail_sort
    // thanks to Joseph Nahmias
    var b = 0;
    var t = list.length - 1;
    var swap = true;

    while(swap) {
        swap = false;
        for(var i = b; i < t; ++i) {
            if ( comp_func(list[i], list[i+1]) > 0 ) {
                var q = list[i]; list[i] = list[i+1]; list[i+1] = q;
                swap = true;
            }
        } // for
        t--;

        if (!swap) break;

        for(var i = t; i > b; --i) {
            if ( comp_func(list[i], list[i-1]) < 0 ) {
                var q = list[i]; list[i] = list[i-1]; list[i-1] = q;
                swap = true;
            }
        } // for
        b++;

    } // while(swap)
  }  
};

/* ******************************************************************
   Supporting functions: bundled here to avoid depending on a library
   ****************************************************************** */

// Dean Edwards/Matthias Miller/John Resig

/* for Mozilla/Opera9 */
if (document.addEventListener) {
    document.addEventListener("DOMContentLoaded", sorttable.init, false);
}

/* for Internet Explorer */
/*@cc_on @*/
/*@if (@_win32)
    document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
    var script = document.getElementById("__ie_onload");
    script.onreadystatechange = function() {
        if (this.readyState == "complete") {
            sorttable.init(); // call the onload handler
        }
    };
/*@end @*/

/* for Safari */
if (/WebKit/i.test(navigator.userAgent)) { // sniff
    var _timer = setInterval(function() {
        if (/loaded|complete/.test(document.readyState)) {
            sorttable.init(); // call the onload handler
        }
    }, 10);
}

/* for other browsers */
window.onload = sorttable.init;

// written by Dean Edwards, 2005
// with input from Tino Zijdel, Matthias Miller, Diego Perini

// http://dean.edwards.name/weblog/2005/10/add-event/

function dean_addEvent(element, type, handler) {
	if (element.addEventListener) {
		element.addEventListener(type, handler, false);
	} else {
		// assign each event handler a unique ID
		if (!handler.$$guid) handler.$$guid = dean_addEvent.guid++;
		// create a hash table of event types for the element
		if (!element.events) element.events = {};
		// create a hash table of event handlers for each element/event pair
		var handlers = element.events[type];
		if (!handlers) {
			handlers = element.events[type] = {};
			// store the existing event handler (if there is one)
			if (element["on" + type]) {
				handlers[0] = element["on" + type];
			}
		}
		// store the event handler in the hash table
		handlers[handler.$$guid] = handler;
		// assign a global event handler to do all the work
		element["on" + type] = handleEvent;
	}
};
// a counter used to create unique IDs
dean_addEvent.guid = 1;

function removeEvent(element, type, handler) {
	if (element.removeEventListener) {
		element.removeEventListener(type, handler, false);
	} else {
		// delete the event handler from the hash table
		if (element.events && element.events[type]) {
			delete element.events[type][handler.$$guid];
		}
	}
};

function handleEvent(event) {
	var returnValue = true;
	// grab the event object (IE uses a global event object)
	event = event || fixEvent(((this.ownerDocument || this.document || this).parentWindow || window).event);
	// get a reference to the hash table of event handlers
	var handlers = this.events[event.type];
	// execute each event handler
	for (var i in handlers) {
		this.$$handleEvent = handlers[i];
		if (this.$$handleEvent(event) === false) {
			returnValue = false;
		}
	}
	return returnValue;
};

function fixEvent(event) {
	// add W3C standard event methods
	event.preventDefault = fixEvent.preventDefault;
	event.stopPropagation = fixEvent.stopPropagation;
	return event;
};
fixEvent.preventDefault = function() {
	this.returnValue = false;
};
fixEvent.stopPropagation = function() {
  this.cancelBubble = true;
};

// Dean's forEach: http://dean.edwards.name/base/forEach.js
/*
	forEach, version 1.0
	Copyright 2006, Dean Edwards
	License: http://www.opensource.org/licenses/mit-license.php
*/

// array-like enumeration
if (!Array.forEach) { // mozilla already supports this
	Array.forEach = function(array, block, context) {
		for (var i = 0; i < array.length; i++) {
			block.call(context, array[i], i, array);
		}
	};
}

// generic enumeration
Function.prototype.forEach = function(object, block, context) {
	for (var key in object) {
		if (typeof this.prototype[key] == "undefined") {
			block.call(context, object[key], key, object);
		}
	}
};

// character enumeration
String.forEach = function(string, block, context) {
	Array.forEach(string.split(""), function(chr, index) {
		block.call(context, chr, index, string);
	});
};

// globally resolve forEach enumeration
var forEach = function(object, block, context) {
	if (object) {
		var resolve = Object; // default
		if (object instanceof Function) {
			// functions have a "length" property
			resolve = Function;
		} else if (object.forEach instanceof Function) {
			// the object implements a custom forEach method so use that
			object.forEach(block, context);
			return;
		} else if (typeof object == "string") {
			// the object is a string
			resolve = String;
		} else if (typeof object.length == "number") {
			// the object is array-like
			resolve = Array;
		}
		resolve.forEach(object, block, context);
	}
};

var keyCounter = 0;
var listOffSet = 0;
function doKeyAction(newSelect){ 
	if (newSelect) {
		keyCounter++;
		if (selectedLi) {
			Element.removeClassName(selectedLi, 'selected');
		}
		selectedLi = newSelect;
		Element.addClassName(selectedLi, 'selected');
		dojo.lang.setTimeout(setContentPane, 250, newSelect.id, true);
	}
}

function handleDownKey(){
	var sib = selectedLi.nextSibling;
	var done = false;
	while (sib && !done) {
		if (sib.nodeType == 1) { 
			doKeyAction(sib);
			done = true;
			listOffSet += 24; 
		} else {
			sib = sib.nextSibling;
		}
	}
}

function handleUpKey(){ 
	var sib = selectedLi.previousSibling;
	var done = false;
	while (sib && !done) {
		if (sib.nodeType == 1) { 
			doKeyAction(sib);
			done = true;
			listOffSet -= 24; 
		} else {
			sib = sib.previousSibling;
		}
	}
}

function handleKeyPress(evt) {  
	var keyCode = evt.keyCode;
    switch (keyCode) {
         case 40:    //down key
             handleDownKey();
             break;
         case 38:    //up key    
             handleUpKey();
             break;
         return;
    }
}

var okToLoad = true;
function setContentPane(entryUrl, fromKey){
	if (!fromKey) {
		if (selectedLi) {
			Element.removeClassName(selectedLi, 'selected');
		}   
		selectedLi = $(entryUrl);
		Element.addClassName(selectedLi, 'selected');
		Element.addClassName(selectedLi, 'link_visited');
		selectedLi.focus();
	}
	if (keyCounter > 0) {
		keyCounter--;
	}
	if (keyCounter == 0 || !fromKey) {
		keyCounter = 0;
		if (okToLoad) {
			setMessage("Loading...");
			scrollToView();
			sendAjaxRequest("getEntryContent_xtiles", page, handleContentReturn, [entryUrl, feedUrl]);						
		}
	}
}

function handleContentReturn(arr){
	if (arr[0] != "0" && arr[0] != "-1" && arr[0] != "-2") {
		var entry = arr[0].evalJSON();
		showEntry(entry);
		setMessage(""); 
		if (storyDisplay != null) {
			if (!(storyDisplay.showingWebPage && storyDisplay.persistViewOption)) {
				$('mainDisplay').scrollTop = 0;
				$('mainDisplay').scrollLeft = 0;
			}
		}
		listOffSet = 0;
	} else {
		var answer = confirm("Your feed has been updated since you viewed it last. We need to refresh your page.  Ready?");
		if (answer){
			window.location = document.location.href;
		}
	}
}

function scrollToView() {
	var offSet = ($('keyList')?20:0); //keyList is used in fixed headers
	var e = ($('keyList')?$('keyList'):$('mainList'));
	var y = Position.positionedOffset(selectedLi)[1] - e.scrollTop;
	var h = e.getDimensions().height;
	//if (y > (h / 2)) {  // for over 50% to start scrolling, always centered in view
		//$('mainList').scrollTop = $('mainList').scrollTop + (y - (h / 2));
	if ((y + Element.getHeight(selectedLi)) > h) {
		e.scrollTop = e.scrollTop + (y - h + Element.getHeight(selectedLi)) - offSet; 
	} else if (y < 0) {
		e.scrollTop += y - offSet;
	}	
}

function handleNavReturn(arr) {
	setMessage("");
	if (arr[0] == "-1" || arr[0] == "-2" || arr[0] == "-3") {
		showError(arr[0]);
		$('feedTitle').innerHTML = "";
		document.title = "Feed not valid.";
	} else { 
		$('mainList').innerHTML = arr[1];
		$('feedTitle').innerHTML = arr[2];
		$('feedTitle').href = arr[3];
		document.title = arr[2];
		e = arr[4].evalJSON();
		selectedLi = e.uri;
		Element.addClassName(selectedLi, 'link_visited');
		showEntry(e);
		if (processExtraNav) {
			processExtraNav(arr);
		} 
	}
}

function showError(type) {
	var ePre = "<table><tr><td><img src='http://static.ziftsolutions.com/i/cross.gif'/></td><td>";
	var ePost = "</td></tr></table>";
	if (type == "-1") {
		$('mainList').innerHTML = ePre + "Error processing feed." + ePost;		
	} else if (type == "-2") {
		$('mainList').innerHTML = ePre + "Error processing feed. Feed was found, but not valid. Please check your feed url." + ePost;			
	} else if (type == "-3") {
		$('mainList').innerHTML = ePre + "Feed was found, but its empty.  So no posts to display." + ePost;			
	} else {
		$('mainList').innerHTML = ePre + "Error processing feed." + ePost;			
	}
	if (storyDisplay) { 
		storyDisplay.hideForError();
	}
}

function showWebPage(){
	this.storyDisplay.showWebPage();
}

function hideWebPage(){
	this.storyDisplay.hideWebPage();
}
	
function setMessage(msg){
	$('message').innerHTML = msg;
}dojo.provide("sw.common.widget.XIReaderLiteSplitContainer");
dojo.provide("sw.common.widget.XIReaderLiteFixedHeaderSplitContainer");

dojo.require("dojo.widget.SplitContainer");

dojo.widget.defineWidget("sw.common.widget.XIReaderLiteSplitContainer", dojo.widget.SplitContainer, {
	ns: "sw.common"
	//for overloading if we need to
	
});

dojo.widget.defineWidget("sw.common.widget.XIReaderLiteFixedHeaderSplitContainer", sw.common.widget.XIReaderLiteSplitContainer, {
	ns: "sw.common",
	endSizing: function(e){
		sw.common.widget.XIReaderLiteFixedHeaderSplitContainer.superclass.endSizing.apply(this, arguments);
		this.resizeFixedTable();
	},
	
	onResized:function(e){
		sw.common.widget.XIReaderLiteFixedHeaderSplitContainer.superclass.onResized.apply(this, arguments);
		this.resizeFixedTable(2);
	},
	
	resizeFixedTable:function(offsetTop){
		changecss('.scrollTable table > tbody','height',(this.children[0].sizeActual-20) + 'px');
		if (!offsetTop) offSetTop = 2;
		$('mainList').style.width = $('mainList').getWidth() - offsetTop + "px";
	}
});

//Custom JavaScript Function by Shawn Olson
//Copyright 2006
//http://www.shawnolson.net
function changecss(theClass,element,value) {
//documentation for this script at http://www.shawnolson.net/a/503/
 var cssRules;
 if (document.all) {
  cssRules = 'rules';
 }
 else if (document.getElementById) {
  cssRules = 'cssRules';
 }
 for (var S = 0; S < document.styleSheets.length; S++){
  for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
   if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
    document.styleSheets[S][cssRules][R].style[element] = value;
   }
  }
 }	
}dojo.provide("sw.common.widget.XIStoryDisplay");

dojo.require("dojo.widget.ContentPane");

dojo.widget.defineWidget("sw.common.widget.XIStoryDisplay", dojo.widget.HtmlWidget, {
		ns: "sw.common",
		//templatePath: dojo.uri.dojoUri("../sw/common/widget/templates/XIStoryDisplay.html"),
		templateString:'' + 
			'<div id="${this.widgetId}" >' + 
				'<div dojoAttachPoint="div_display" class="story_display" >' +
					'<table cellpadding="2" cellspacing="0" width="100%" >' +
						'<tr dojoAttachPoint="editorNoteRow" style="display:none" >' +
							'<td>' + 
								'<table class="editorNote" >' + 
									'<tr>' +
										'<td width="85" valign="top">Editor\'s Note:&nbsp;</td>' +
										'<td><span dojoAttachPoint="editorNote" ></span></td>' + 
									'</tr>' +
									
									'<tr>' + 
										'<td colspan="2">' +
											'<span dojoAttachPoint="xiCommentLinkRow"><img src="http://static.ziftsolutions.com/i/comments.gif" />' + 
											'&nbsp;<a href="#" dojoAttachPoint="xiCommentLink" name="${this.widgetId}_xicomments"  title="Show Comments" dojoAttachEvent="onclick:loadXICommentRssData"></a></span>' +
											'&nbsp;<img src="http://static.ziftsolutions.com/i/comment_add.gif" />' + 
											'&nbsp;<a href="#" name="${this.widgetId}_addxicomments"  title="Add a Comment" dojoAttachEvent="onclick:showXICommentForm">Add a Comment</a>' +
										'</td>' +
									'</tr>' +
									
									'<tr dojoAttachPoint="renderedXICommentsRow" style="display:none;">' + 
										'<td colspan="2">' +
											'<div dojoAttachPoint="renderedXIComments" class="comment_block" ></div>' +
										'</td>' +
									'</tr>' +

									'<tr dojoAttachPoint="xiCommentFormRow" style="display:none;">' + 
										'<td colspan="2">' +
											'<form dojoAttachPoint="xiCommentForm" id="${this.widgetId}_xiCommentForm" style="margin:0px;">' +
												'<table>' +
													'<tr dojoAttachPoint="commentAuthorNameRow">' +
														'<td class="input_label">Name:</td>' +
														'<td>' +
															'<input type="text" name="commentAuthorName" id="${this.widgetId}_commentAuthorName" value="" size="25" /> (required)' +
														'</td>' +
													'</tr> ' +
													'<tr dojoAttachPoint="commentAuthorEmailRow">' +
														'<td class="input_label">Email:</td>' +
														'<td>' +
															'<input type="text" name="commentAuthorEmail" id="${this.widgetId}_commentAuthorEmail" value="" size="25" /> (required but not displayed)' +
														'</td>' +
													'</tr>' +
													'<tr>' +
														'<td class="input_label" valign="top">Comment:</td>' +
														'<td>' +
															'<textarea type="text" name="commentText" id="${this.widgetId}_commentText" rows="5" cols="60"></textarea>' +
														'</td>' +
													'</tr>' +
													'<tr>' +
														'<td colspan="4" align="right" valign="middle">' +
															'<input type="button" class="btn thin" value="Post Comment" accesskey="enter" tabindex="4" dojoAttachEvent="onclick:saveXIComment"/>' +
														'</td>' +
													'</tr>' +
												'</table>' +
											'</form>' +
										'</td>' +
									'</tr>' +
									
								'</table>' +
							'</td>' + 
						'</tr>' +
						'<tr>' + 
							'<td>' +
								'<table cellpadding="0" cellspacing="0" width="100%" >' +
									'<tr>' +
									'<td class="posttitle" >' +
										'<a dojoAttachPoint="titleNode" id="title_${this.node.outline.id}" style="display: inline;" target="_blank" ></a>' +
									'</td>' +
									'<td valign="middle" align="right" style="padding-right:15px" nowrap dojoAttachPoint="audio" ></td>' +
									'</tr>' +
								'</table>' +
							'</td>' +
						'</tr>' +
						'<tr>' +
							'<td>' +
								'<span class="postauthor" dojoAttachPoint="author" ></span>' +
							'</td>' + 
						'</tr>' +
						'<tr>' +
							'<td><span class="postdate" dojoAttachPoint="date" ></span></td>' +
						'</tr>' + 
						'<tr>' +
							'<td colspan="2" dojoAttachPoint="video" id="${this.widgetId}_video" align="center" class="video" ></td>' +
						'</tr>' +
						'<tr>' + 
							'<td class="postcontent" colspan="2" dojoAttachPoint="content" ></td>' +
						'</tr>' +
						'<tr>' +
							'<td class="postcontent" colspan="2" dojoAttachPoint="comments" style="padding:0px" >' +
								'<table cellpadding="0" cellspacing="0" >' +
									'<tr>' + 
										'<td width="16" ><img src="http://static.ziftsolutions.com/i/comments.gif" /></td>' +
										'<td>' +
											'<a href="#" dojoAttachPoint="commentLink" name="${this.widgetId}_comments"  title="Show Comments on Post" dojoAttachEvent="onclick:loadCommentRssData" >Show Comments on Post</a>' +
										'</td>' +
									'</tr>' +
								'</table>' + 
								'<div dojoAttachPoint="renderedComments" class="wfw_comment_block" ></div>' +
							'</td>' +
						'</tr>' +
						'<tr>' + 
							'<td class="postfooter" colspan="2" dojoAttachPoint="footer" ></td>' +
						'</tr>' +
					'</table>' + 
				'</div>' + 
				'<iframe dojoAttachPoint="iframe_display" class="iframe_display" scrolling="no" frameborder="0" style="z-index: 1000" ></iframe>' +
			'</div>',

		entry:null,
		async:true,
		commentsLoaded:false,
		xiCommentsLoaded:false,
		showingWebPage:false,
		persistViewOption:true,
		bPromptForRegister:true,
		bAugmentAuthor:true,
		defaultPostComment:"Show Comments on Post",
		bAllowReaderComments:true,
		
		postCreate: function() {
			if (this.async) {
				this.setTitle(this.entry.trackBack, this.entry.name);
				this.setAuthor((this.bAugmentAuthor?this.getAugmentedAuthor(this.entry.publisher):this.entry.publisher));
				this.setDate(this.entry.updateDateAsString)
				this.setContent(this.entry.content);
				this.setEditorComment(this.entry.editorComment);				
			} else {
				this.setTitle(this.entry.trackBack, this.entry.name.unescapeHTML());
				this.setAuthor((this.bAugmentAuthor?this.getAugmentedAuthor(this.entry.publisher.unescapeHTML()):this.entry.publisher.unescapeHTML()));
				this.setDate(this.entry.updateDateAsString.unescapeHTML())
				this.setContent(this.entry.content.unescapeHTML());
				this.setEditorComment(this.entry.editorComment);
			}
			if (this.entry.validUser) {
				this.bPromptForRegister = false;
			}
			if (this.bUserLoggedIn) {
				this.hideObj(this.commentAuthorNameRow);
				this.hideObj(this.commentAuthorEmailRow);
			}
			if (this.bAllowReaderComments) {
				this.setNumberOfReaderComments(this.entry.nReaderComments);
			}
		},

		update: function(e) {
			this.showObj(this.domNode);
			this.entry = e;
			this.setTitle(this.entry.trackBack, this.entry.name);
			this.setAuthor((this.bAugmentAuthor?this.getAugmentedAuthor(this.entry.publisher):this.entry.publisher));
			this.setDate(this.entry.updateDateAsString.unescapeHTML())
			this.setContent(this.entry.content);
			this.setEditorComment(this.entry.editorComment);
			if (this.showingWebPage && this.persistViewOption) {
				this.showWebPage();
			} else this.hideWebPage();
			this.commentLink.innerHTML = this.defaultPostComment;
			
			this.xiCommentsLoaded = false;
			if (this.bAllowReaderComments) {
				this.setNumberOfReaderComments(this.entry.nReaderComments);
				this.setNumberOfReaderComments(this.entry.nReaderComments);
				this.renderedXICommentsRow.style.display = "none";
				this.renderedXIComments.innerHTML = "";
				this.xiCommentFormRow.style.display = "none";
			}			
		},
		
		getAugmentedAuthor: function(author) {
			var augmentedAuthor = null;
			var feedName = this.entry._feedTitle ? this.entry._feedTitle : this.entry._feedTrackback;
			var feedTrackback = this.entry._feedTrackback;
			
			if (feedName) {
				if (feedTrackback) {
					augmentedAuthor = "<a target='_blank' href='" + feedTrackback + "'>" + feedName + "</a>";
				} else {
					augmentedAuthor = feedName;
				}
			}
			
			if (author) {
				augmentedAuthor = author + (augmentedAuthor ? " from " + augmentedAuthor : "");
			}
			
			return augmentedAuthor;
		},
		
		
		
		hideForError:function(){
			this.hideObj(this.domNode);
		},
		
		setTitle: function(url, title){
			this.trackback = url;
			this.title = title;

			if (url == null || url == "") {
				this.titleNode.target = "";
				this.titleNode.href = "#";					
			} else {
				this.titleNode.href = url;
			}
			this.titleNode.innerHTML = title;
			
			//if title not set, don't show tools
			this.bTitleSet = true;
			
			if (this.entry.enclosureUrl != null && this.entry.enclosureType == "audio/mpeg") {
				this.audio.innerHTML = ""; 
				this.getAudioPlayer(this.entry.enclosureUrl, this.entry.name);
			} if (this.entry.mediaUrl != null && this.entry.enclosureType == "audio/mpeg") { 
				this.audio.innerHTML = "";
				this.getAudioPlayer(this.entry.mediaUrl, this.entry.name);
			} else {
				this.audio.innerHTML = "";
			}
		},
		
		getAudioPlayer:function(url, title){
			var data = '/audio/xspf_player_slim.swf?player_title=' + title + '&song_url=' + url + '&song_title=' + title + "&setup=0&color=000000&alpha=1";
			var audioObject = document.createElement("object");
			audioObject.id = 'audio_player';
			audioObject.type = "application/x-shockwave-flash";
			audioObject.height = 15;
			audioObject.width = 200;
			audioObject.data = data;		
			var audioParam = document.createElement("param");
			audioParam.id = 'audio_player_movie';
			audioParam.name = "move";
			audioParam.value = data;
			audioObject.appendChild(audioParam);
			this.audio.appendChild(audioObject);
		},
		
		setAuthor: function(author){
			if (this.author && author) {
				this.author.style.display = "";
				this.author.innerHTML = author;
			} else this.author.style.display = "none";
		},
		
		setDate: function(date){
			this.date.innerHTML = date;
		},
		
		setEditorComment: function(comment){
			if (this.editorNoteRow == null || this.editorNote == null) return;
			if (comment) {
				this.showObj(this.editorNoteRow);
				this.editorNote.innerHTML = convertNewLinesToBrs(comment);
			} else {
				this.hideObj(this.editorNoteRow);
				this.editorNote.innerHTML = "";
			}
		},
		
		setContent: function(content){ 
			if (this.entry.enclosureUrl != null && this.entry.enclosureType == "application/x-shockwave-flash") { 
				var so = new SWFObject(this.entry.enclosureUrl, this.entry.uri + "_media", "340", "280", "7", "#FFFFFF", true);
				so.write(this.video);
				this.video.style.display = "";				
			} else if (this.entry.mediaUrl != null && this.entry.mediaType == "application/x-shockwave-flash") { 
				var so = new SWFObject(this.entry.mediaUrl, this.entry.uri + "_media", "340", "280", "7", "#FFFFFF", true);
				so.write(this.video);
				this.video.style.display = "";
			} else {
				this.video.innerHTML = "";
				this.video.style.display = "none";
			}
			this.content.innerHTML = content;
			this.content.innerHTML.evalScripts();
			if (this.entry.wfwCommentRss != null && this.entry.wfwCommentRss != "") {
				this.comments.style.display = "";
				this.commentsLoaded = false;
				this.renderedComments.innerHTML = "";
			} else {
				this.comments.style.display = "none";
				this.renderedComments.innerHTML = "";
			}			
		},
		
		/*setEditorNode: function(note) {
			dojo.html.show(this.editorNoteRow);
			this.editorNote.innerHTML = "Editor's Note: " + note;
		},*/
		
		setFooter: function(footer){
			
		},
		
		setNumberOfReaderComments: function(n) {
			if (n == -1)
				this.xiCommentLinkRow.style.display = "none";
			else if (n == 0) {
				//disable link here? or just hide?
				//this.xiCommentLink.innerHTML = "0 comments";
				this.xiCommentLinkRow.style.display = "none";
			}
			else if (n == 1) {
				this.xiCommentLink.innerHTML = "1 comment";
				this.xiCommentLinkRow.style.display = "";
				}
			else {
				this.xiCommentLink.innerHTML = n + " comments";
				this.xiCommentLinkRow.style.display = "";
			}
		},
		
		showWebPage:function(){
			this.hideObj(this.div_display);
			this.div_display.style.display.zIndex = "-1";
			this.iframe_display.style.display = "block";
			this.iframe_display.style.display.zIndex = "5";
			if (this.iframe_display.src != this.entry.uri)  {
				this.iframe_display.src = this.entry.uri;
			}
			var hb = $('htmlButton');
			if (hb) hb.hide();
			var rb = $('rssButton');
			if (rb) rb.show();
			var cb = $('clipButton');
			if (cb) cb.hide();
			this.showingWebPage = true;
		},
		
		hideWebPage:function(){
			if (this.iframe_display) {
				this.hideObj(this.iframe_display);
				this.iframe_display.style.display.zIndex = "-1";
				this.showObj(this.div_display);
				this.div_display.style.display.zIndex = "5";
			}
			var rb = $('rssButton');
			if (rb) rb.hide();
			var hb = $('htmlButton');
			if (hb) hb.show();
			var cb = $('clipButton');
			if (cb) cb.show();
			this.showingWebPage = false;						
		},
		
		hideObj:function(obj){
			obj.style.display = "none";
		},
		  
		showObj:function(obj){
			obj.style.display = "";	
		},
		
		loadCommentRssData:function(){
			if (!this.commentsLoaded) {
				if (this.entry.wfwCommentRss != null && this.entry.wfwCommentRss != "") {
					setMessage("Loading Post Comments...");
					sendAjaxRequest("getCommentRSS_xtiles", "RssReaderLite", this.handleCommentRssReturn.bind(this), this.entry.wfwCommentRss);
				} else {
					alert("No comments on post");
				}
			}
		},
		
		handleCommentRssReturn:function(arr){
			setMessage("");
			if (arr[0] == "1") {
				this.commentsLoaded = true;
				entries = arr[1].evalJSON();
				for (var i = 0; i < entries.length; i ++ ){
					var c = dojo.widget.createWidget('sw.common:XIStoryCommentDisplay', {entry:entries[i]});
					this.renderedComments.appendChild(c.domNode);
				}
				document.location.href = "#" + this.widgetId + "_comments";
			} else {
				this.commentLink.innerHTML = "Post contains no comments";				
			}
		},
		
		refreshComments:function(arr){
			this.commentsLoaded = false;
			this.renderedComments.innerHTML = "";
			this.loadCommentRssData();
		},

		loadXICommentRssData:function(){
			if (!this.xiCommentsLoaded) {
				setMessage("Loading Comments...");
				sendAjaxRequest("getReaderComments_xtiles", "RssReaderLite", this.handleXICommentRssReturn.bind(this), this.entry.uri);
			} else {
				if (this.renderedXICommentsRow.style.display == "")
					this.hideObj(this.renderedXICommentsRow);
				else
					this.showObj(this.renderedXICommentsRow);
			}
		},
		
		handleXICommentRssReturn:function(arr){
			setMessage("");
			if (arr[0] == "1") {
				this.xiCommentsLoaded = true;
				var comments = arr[1].evalJSON();
				this.showObj(this.renderedXICommentsRow);
				for (var i = 0; i < comments.length; i ++ ){
					var c = dojo.widget.createWidget('sw.common:XIReaderCommentDisplay', {comment:comments[i]});
					this.renderedXIComments.appendChild(c.domNode);
				}
				document.location.href = "#" + this.widgetId + "_xicomments";
			} else {
				this.xiCommentLink.innerHTML = "There are no comments.";				
			}
		},
				
		refreshXIComments:function(arr){
			this.xiCommentsLoaded = false;
			this.renderedXIComments.innerHTML = "";
			this.loadXICommentRssData();
		},
		
		showXICommentForm: function() {
			if (this.xiCommentFormRow.style.display == "") {
				this.hideObj(this.xiCommentFormRow);
			} else {
				this.showObj(this.xiCommentFormRow);
			}
		},
		
		saveXIComment:function() {
			var params = new Array();
			params.push(this.entry.uri);

			var commentText = $F(this.widgetId + "_commentText");
			if (!commentText) {
				alert("You must enter a comment.");
				return false;
			}
			params.push(commentText);
						
			if (!this.bUserLoggedIn) {
				var userName = $F(this.widgetId + "_commentAuthorName");
				var userEmail = $F(this.widgetId + "_commentAuthorEmail");
				
				if (!userName) {
					alert("You must enter a name.");
					return false;
				}
				if (!userEmail) {
					alert("You must enter a valid email address.");
					return false;
				}
				
				params.push(userName);
				params.push(userEmail);
			} 
			sendAjaxRequest("saveReaderComment_xtiles", "RssReaderLite", this.handleXICommentSaveReturn.bind(this), params);		
		},
		
		handleXICommentSaveReturn:function(arr){
			if (arr[0] == "1") {
				setMessage("Comment saved.");
				this.hideObj(this.xiCommentFormRow);
				$(this.widgetId + "_commentText").value = "";
				
				this.setNumberOfReaderComments(arr[2]);
				if (this.xiCommentsLoaded) {
					var comment = arr[1].evalJSON();
					var c = dojo.widget.createWidget('sw.common:XIReaderCommentDisplay', {comment:comment});
					this.renderedXIComments.appendChild(c.domNode);
				}
			} else {
				setMessage("Error saving comment.");
			}
			dojo.lang.setTimeout(setMessage, 1000, "");
		},
		
		clipPost:function(){
			dojo.require("sw.common.widget.XIClipDialog");
			var content = this.content.innerHTML;
			if (this.video.innerHTML != "") {
				content = "<div align='center'>" + this.video.innerHTML + "</div>" + content;
			}
			if (this.audio.innerHTML != "") {
				content = "<div align='center'>" + this.audio.innerHTML + "</div>" + content;
			}
			var widget = dojo.widget.createWidget("sw.common:XIClipDialog", {_title: this.entry.name.replace(/(<([^>]+)>)/ig,""), _link:this.entry.uri, _content: content, postSave:this.clipPostSave.bind(this)});	
			window.document.body.appendChild(widget.domNode);
			widget.show();
		},
		
		clipPostSave:function(link, clip){
			if (this.bPromptForRegister) {
				this.bPromptForRegister = false;
			    dojo.require("sw.common.widget.XILoginDialog");
			    var clippingURL = "http://" + document.location.host + "/my/Clippings.html";
			    var msg = "<p>Your can view all your clippings <a style='color:#FFF;' target='_blank' href='" + clippingURL + "'>here</a>. Or if your new to feedxi.com, go to My XI located in the top bar, and select clippings.</p><p>Your clippings are only valid for your current browser session. To save your clippings permanently, you must register with feedXI.</p>";
				var dialog = dojo.widget.createWidget("sw.common:XILoginDialog");
				window.document.body.appendChild(dialog.domNode);
				dialog.showRegisterWarning("Clipping Saved!", msg);
			}
		}		
});

dojo.widget.defineWidget("sw.common.widget.XIStoryCommentDisplay", sw.common.widget.XIStoryDisplay, {
		ns: "sw.common",
		templatePath: dojo.uri.dojoUri("../sw/common/widget/templates/XIStoryCommentDisplay.html")		
});

dojo.widget.defineWidget("sw.common.widget.XIReaderCommentDisplay", dojo.widget.HtmlWidget, {
		ns: "sw.common",
		templatePath: null, //dojo.uri.dojoUri("../sw/common/widget/templates/XIReaderCommentDisplay.html"),
		templateString: '' +
			'<div id="${this.widgetId}" class="story_display" style="background-color: transparent;">' +
				'<table cellpadding="2" cellspacing="0" width="100%" >' +
					'<tr>' +
						'<td class="postauthor">${this.comment.userName}</td>' +
					'</tr>' +
					'<tr>' +
						'<td class="postdate">${this.comment.formattedCreateDate}</td>' +
					'</tr>' +
					'<tr>' +
						'<td class="postcontent"style="padding-top:0px;padding-bottom:0px;">${this.formattedText}</td>' +
					'</tr>' +
				'</table>' +
			'</div>',
			
		postMixInProperties: function() {
			this.formattedText = convertNewLinesToBrs(this.comment.text);
			sw.common.widget.XIReaderCommentDisplay.superclass.postMixInProperties.apply(this, arguments);
		}
});

dojo.provide("sw.common.widget.XIDialog");

dojo.require("dojo.widget.Dialog");

dojo.widget.defineWidget("sw.common.widget.XIDialog", dojo.widget.Dialog,
{
	ns: "sw.common",
	
	idTinyMCE: null,
	tinyInst: null,
	tinyDelay: 0,
	bTinyInitialized: null,
	statusNode: null,
	titlebarNode: null,
	closeDelay: 1000,
	errorMessageClass: "error",
	onShow: null,
	onHide: null,
	onSave: null,
	firstFocusField: null,
	bDestroyOnHide: true,
	app: null,
	
	//btt - having to override default postCreate to work around FF bug				
	postCreate: function() {
		if (document.all) {//isIE 
			return sw.common.widget.XIDialog.superclass.postCreate.apply(this, arguments);
		}
		// summary
		//	if the target mixin class already defined postCreate,
		//	dojo.widget.ModalDialogBase.prototype.postCreate.call(this)
		//	should be called in its postCreate()
		with(this.domNode.style){
			position = "absolute";
			zIndex = 999;
			display = "none";
			//btt - FF missing caret workaround is to set the dialog div overflow to auto
			// could not achieve this with overrides in css (b/c the style is applied to the element?)
			// so changing here. note...there is still an issue with the caret blinking too fast.
			//overflow = "visible";
			overflow = "auto";
		}
		var b = dojo.body();
		b.appendChild(this.domNode);

		if(!this.shared.bg){
			this.shared.bg = document.createElement("div");
			this.shared.bg.className = "dialogUnderlay";
			with(this.shared.bg.style){
				position = "absolute";
				left = top = "0px";
				zIndex = 998;
				display = "none";
			}
			this.setBackgroundColor(this.bgColor);
			b.appendChild(this.shared.bg);
			this.shared.bgIframe = new dojo.html.BackgroundIframe(this.shared.bg);
		}
	},
	
	show: function(e) {
		if (this.app && this.app.keyManager) {
			this.app.keyManager.disable();
		}
		if (this.idTinyMCE && !this.bTinyInitialized) {
			dojo.require("sw.xi.reader.utils.tinyMceLoader");
			if (this.tinyDelay > 0)
				dojo.lang.setTimeout(this, this.initTiny, this.tinyDelay);
			else
				this.initTiny();
		} else {
			this._show();
		}
	},

	_show: function() {
		this.preShow();
		sw.common.widget.XIDialog.superclass.show.apply(this, arguments);
		//btt - something is stopping the dialog from being centered, so calling resize method explicitly
		this.checkSize();	
		this.postShow();
	},
		
	preShow: function() {
		//overload this to meet you needs
		this.setTitle();
	},

	postShow: function() {
		//overload this to meet you needs
		if (this.firstFocusField) {
			var f = dojo.byId(this.firstFocusField);
			if (f) {
				f.focus();
				f.select();
			}
		}
		if (this.onShow)
			this.onShow();
	},
	
	hide: function(e) {
		sw.common.widget.XIDialog.superclass.hide.apply(this, arguments);
		this.clearStatusMessage();
		if (this.onHide)
			this.onHide();
		if (this.idTinyMCE) {
		  	tinyMCE.execCommand("mceRemoveControl", true, this.idTinyMCE );
		  	this.tinyInst = null;
		}
		if (this.app && this.app.keyManager) {
			this.app.keyManager.enable();
		}
		if (this.bDestroyOnHide)
			this.destroy();
	},
	
	closeDialog: function() {
		if (!this.closeDelay || this.closeDelay == 0) {
			this.hide();
			return;
		}
		dojo.lang.setTimeout(this, this.hide.bind(this), this.closeDelay);
	},
	
	/*setEnterHandler: function(func)
	{
		if (this.enterKeyFunc) {
			throw("XIDialog::setEnterHandler should only be called once");
		}
		this.enterKeyFunc = func;
		this.domNode.onkeydown = this.enterHandler.bind(this);
	},
	
	enterHandler: function(e)
	{
		if (this.hasPressedEnter(e))
		{
			if (this.enterKeyFunc)
				this.enterKeyFunc();
			return this.finishPressHandling(e);
		}
		return true;
	},
	
	changeEnterHandler: function(func)
	{
		this.enterKeyFunc = func;
	},
	
	restoreEnterHandler: function(func)
	{
		delete this.enterKeyFunc;
	},

	hasPressedEnter: function(e) {
	    if (!e)
	    {
	        var e = window.event;
	    }
	    if (!e.target)
	    {
	        e.target = e.srcElement;
	    }
		var numCode = e.keyCode || e.chatCode;
		return numCode == 13;
	},
	
	finishPressHandling: function(e) {
	    if (!e)
	    {
	        var e = window.event;
	    }
        e.cancelBubble = true;
        if (e.stopPropagation) e.stopPropagation();
        return false;
	},*/

	initTiny: function() {
		var tinyInst = TinyMceLoader.getTinyInst(this.idTinyMCE, this.initTiny.bind(this));
		if (!tinyInst) {
			return;
		} else {
			this.tinyInst = tinyInst;
		}
		
		if (this.bTinyInitialized) {
			return;
		}
		this.bTinyInitialized = true;
		//this.postShow();
		this._show();
	},
	
	setTitle: function() {
		if (this.titlebarNode && this.dlgTitle) {
			this.titlebarNode.innerHTML = this.dlgTitle;
		}
	},
	
	setStatusMessage: function(msg) {
		if (this.statusNode) {
			dojo.html.removeClass(this.statusNode, this.errorMessageClass);
			this.statusNode.innerHTML = msg;
		}
	},
	
	setErrorMessage: function(msg) {
		if (this.statusNode) {
			dojo.html.addClass(this.statusNode, this.errorMessageClass);
			this.statusNode.innerHTML = msg;
		}
	},
	
	clearStatusMessage: function(msg) {
		this.setStatusMessage("");
		}
	}
);
 
dojo.provide("reverbnation.widget.ReverbStoryDisplay");

dojo.require("sw.common.widget.XIStoryDisplay");

dojo.widget.defineWidget("reverbnation.widget.ReverbStoryDisplay", sw.common.widget.XIStoryDisplay, {
		ns: "reverbnation",
		//templatePath: dojo.uri.dojoUri("../reverbnation/widget/templates/ReverbStoryDisplay.html"),
		templateString:'<div id="${this.widgetId}" ><div dojoAttachPoint="div_display" class="story_display" ><table cellpadding="2" cellspacing="0" width="100%" ><tr dojoAttachPoint="editorNoteRow" style="display:none" ><td class="editorNote" ><span class="editorNote" dojoAttachPoint="editorNote" ></span></td></tr><tr><td><table cellpadding="0" cellspacing="0" border="0" width="100%" ><tr><td nowrap="nowrap" class="postdate" dojoAttachPoint="date" ></td><td align="right" ><a href="#" dojoAttachPoint="orig_link" target="_blank" style="padding-right:10px;font-size:.95em;font-weight:bold" >View Original Post</a></td></tr></table></td></tr><tr><td><table cellpadding="0" cellspacing="0" width="100%" ><tr><td class="posttitle" ><a dojoAttachPoint="titleNode" id="title_${this.node.outline.id}" style="display: inline;" target="_blank" ></a></td><td valign="middle" align="right" style="padding-right:15px" nowrap dojoAttachPoint="audio" ></td></tr></table></td></tr><tr><td><span class="postauthor" dojoAttachPoint="author" ></span></td></tr><tr><td dojoAttachPoint="video" id="${this.widgetId}_video" align="center" ></td></tr><tr><td class="postcontent" dojoAttachPoint="content" ></td></tr><tr><td class="postcontent" colspan="2" dojoAttachPoint="comments" style="padding:0px" ><table cellpadding="0" cellspacing="0" ><tr><td width="16" ><img src="http://static.ziftsolutions.com/i/comments.gif" /></td><td><a href="#" dojoAttachPoint="commentLink" name="${this.widgetId}_comments" title="Show Comments on Post" dojoAttachEvent="onclick:loadCommentRssData" >Show Comments on Post</a><td><td dojoAttachPoint="addCommentWrapper" style="display:none" >&nbsp;&nbsp;&nbsp;<a href="#" dojoAttachEvent="click:showCommentDialog" name="comments" title="Add Comment" >(Add your own comment)</a><td></tr></table><div dojoAttachPoint="renderedComments" class="wfw_comment_block" ></div></td></tr><tr><td class="postfooter" dojoAttachPoint="footer" ></td></tr></table></div><iframe dojoAttachPoint="iframe_display" class="iframe_display" scrolling="no" frameborder="0" ></iframe></div>',
		entry:null,
		entryDate:null,
		async:true,
		hasButtonBar:false,
		bAugmentAuthor:false,
		bAllowReaderComments:false,
		
		postCreate: function() {
			reverbnation.widget.ReverbStoryDisplay.superclass.postCreate.apply(this, arguments);
			this.orig_link.href = this.entry.trackBack;
		},
		
		update: function(e, d) {
			reverbnation.widget.ReverbStoryDisplay.superclass.update.apply(this, arguments);
			this.orig_link.href = this.entry.trackBack;
		},
		 
		showAddCommentButton:function() {
			this.addCommentWrapper.style.display="";			
		},
		
		hideAddCommentButton:function() {
			this.addCommentWrapper.style.display="none";
		},
		
		showCommentDialog:function() { 
			var d = dojo.widget.createWidget('reverbnation:ReverbCommentDialog', {key:key,chal:chal,feedUrl:this.entry.trackBack});
			document.body.appendChild(d.domNode);
			d.show();
			d.domNode.style.display = "";
		}
}); 

dojo.provide("reverbnation.widget.ReverbCommentDialog");

dojo.require("sw.common.widget.XIDialog");

dojo.widget.defineWidget("reverbnation.widget.ReverbCommentDialog", sw.common.widget.XIDialog, {
		templateString: 
		'<div id="${this.widgetId}" dojoAttachPoint="containerNode" class="dlg" bgColor="#333" style="border: 3px solid #FFA017;background-color:#444;color:#EEE;display:none">\n' +
		'	<div dojoAttachPoint="titlebarNode" class="tbar" style="color:#FFA017;border:none;"></div>' +
		'	<form id="AddCommentForm"  action="">' +
		'		<input type="hidden" id="key" name="key" value="${this.key}"/>' +
		'		<input type="hidden" id="chal" name="chal" value="${this.chal}"/>' +
		'		<input type="hidden" id="urlInput" name="feedUrl" value="${this.feedUrl}"/>' +
		'		<table>'+
		'			<tr><td colspan="4" align="center">	  '+
		'					<textarea name="bodyx" dojoAttachPoint="comment" dojoAttachEvent="onkeydown:checkButton;onblur:checkButton" id="del_body" rows="9" cols="40" style="width:350px" tabindex="3"></textarea></td></tr>' +
		'			<tr><td colspan="4" align="right" valign="middle"> '+
		'					<div dojoAttachPoint="statusNode" style="color:#eee;font-size:.9em;float:left;margin-top:10px;"></div>' +
		'					<input type="button" style="font-size:9px;font-family:Verdana, sans-serif;color:#333333;background-color:#FFFFFF;margin:0 0 0 5px;padding:0;outline:invert none medium;" value="OK" dojoAttachPoint="okButton" accesskey="enter" disabled="true" tabindex="4" dojoAttachEvent="onclick:save"/>'+
		'					<input type="button" style="font-size:9px;font-family:Verdana, sans-serif;color:#333333;background-color:#FFFFFF;margin:0 0 0 5px;padding:0;outline:invert none medium;" value="CANCEL" tabindex="5" dojoAttachEvent="onclick:hide"/>' +
		'				</td></tr></table></form></div>',

		dlgTitle: "ADD COMMENT",
		firstFocusField: "del_body",
		
		ns:"reverbnation",
		
		node: null, //set by create call options
		feedUrl: null, //set by create call options
		commentBody: null, 

		preShow: function() {
			reverbnation.widget.ReverbCommentDialog.superclass.preShow.apply(this, arguments);	
			//dojo.require("dojo.io.XhrIframeProxy");		
			this.checkButton();
		},
		
		checkButton:function(){
			if (this.comment.value.length > 0) {
				this.okButton.disabled = false;
			} else this.okButton.disabled = true;
		},
		
		save: function() {
			setMessage("Saving Comment...");
			////var kw = {
			//	iframeProxyUrl: "http://www.reverbnation.com/javascripts/pageXI/xip_server.html",
			//	url:            "http://www.reverbnation.com/controller/artist/add_feedxi_comment",
			//	formNode:       dojo.byId("AddCommentForm"),
			//	load:           this.handleSendCallback.bind(this),
			//	method:         "POST",
			//	multipart:      true
			//}
			//if (debug) {
			//	kw.iframeProxyUrl = debugBaseUrl + "/javascripts/pageXI/xip_server.html";
			//	kw.url =            debugBaseUrl + "/controller/artist/add_feedxi_comment";
			//}
			//dojo.io.bind(kw);
			var url = "http://www.reverbnation.com/controller/artist/add_feedxi_comment";
			if (debug) {
				url = debugBaseUrl + "/controller/artist/add_feedxi_comment";
			}
			url += "?controller=artist&action=add_feedxi_comment&key=" + this.key.value + "&chal=" + this.chal.value + "&feedUrl=" + encodeURIComponent(this.feedUrl) + "&bodyx=" + this.comment.value ;
			var spt = document.createElement("script");
			spt.src = url;
			document.body.appendChild(spt)			
			dojo.lang.setTimeout(setMessage,1000,"Comment submitted for approval");
			dojo.lang.setTimeout(setMessage,3000,"");
			this.closeDialog();			
		  }, 

		handleSendCallback: function(type, data) {
			//this.parent.refreshComments();
			this.closeDialog();			
		}
	}
);